From 0aabb42db37c862cc5e670f24ef79bff91410865 Mon Sep 17 00:00:00 2001 From: Harvey Zack Date: Sun, 20 Apr 2025 10:12:14 +0800 Subject: [PATCH] update deps --- CHANGELOG_CN.md | 392 ++--- README.md | 46 +- docs/compiled/artplayer-plugin-ads.js | 2 +- docs/compiled/artplayer-plugin-ads.legacy.js | 2 +- docs/compiled/artplayer-plugin-ambilight.js | 2 +- .../artplayer-plugin-ambilight.legacy.js | 2 +- .../artplayer-plugin-auto-thumbnail.js | 2 +- .../artplayer-plugin-auto-thumbnail.legacy.js | 2 +- docs/compiled/artplayer-plugin-chapter.js | 2 +- .../artplayer-plugin-chapter.legacy.js | 2 +- docs/compiled/artplayer-plugin-chromecast.js | 2 +- .../artplayer-plugin-chromecast.legacy.js | 2 +- docs/compiled/artplayer-plugin-danmuku.js | 4 +- .../artplayer-plugin-danmuku.legacy.js | 4 +- .../compiled/artplayer-plugin-dash-control.js | 2 +- .../artplayer-plugin-dash-control.legacy.js | 2 +- docs/compiled/artplayer-plugin-hls-control.js | 2 +- .../artplayer-plugin-hls-control.legacy.js | 2 +- docs/compiled/artplayer-plugin-iframe.js | 2 +- .../artplayer-plugin-iframe.legacy.js | 2 +- docs/compiled/artplayer-plugin-libass.js | 2 +- .../artplayer-plugin-libass.legacy.js | 2 +- .../artplayer-plugin-multiple-subtitles.js | 2 +- ...player-plugin-multiple-subtitles.legacy.js | 2 +- docs/compiled/artplayer-plugin-vast.js | 2 +- docs/compiled/artplayer-plugin-vast.legacy.js | 2 +- .../artplayer-plugin-vtt-thumbnail.js | 2 +- .../artplayer-plugin-vtt-thumbnail.legacy.js | 2 +- docs/compiled/artplayer-proxy-canvas.js | 2 +- .../compiled/artplayer-proxy-canvas.legacy.js | 2 +- docs/compiled/artplayer-proxy-webav.js | 2 +- docs/compiled/artplayer-proxy-webav.legacy.js | 2 +- docs/compiled/artplayer-tool-thumbnail.js | 2 +- .../artplayer-tool-thumbnail.legacy.js | 2 +- docs/compiled/artplayer.js | 2 +- docs/compiled/artplayer.legacy.js | 2 +- docs/document/404.html | 9 +- docs/document/advanced/built-in.html | 19 +- docs/document/advanced/class.html | 19 +- docs/document/advanced/event.html | 19 +- docs/document/advanced/global.html | 19 +- docs/document/advanced/plugin.html | 19 +- docs/document/advanced/property.html | 19 +- .../advanced_built-in.md.Bo4XQb8X.lean.js | 1 - ...8X.js => advanced_built-in.md.xIN6yJEQ.js} | 36 +- .../advanced_built-in.md.xIN6yJEQ.lean.js | 1 + .../assets/advanced_class.md.BNit_d6q.js | 8 - .../assets/advanced_class.md.BNit_d6q.lean.js | 1 - .../assets/advanced_class.md.eY3DVSC3.js | 8 + .../assets/advanced_class.md.eY3DVSC3.lean.js | 1 + .../assets/advanced_event.md.RJ7ayOSh.lean.js | 1 - ...ayOSh.js => advanced_event.md.c-TsYEyx.js} | 90 +- .../assets/advanced_event.md.c-TsYEyx.lean.js | 1 + .../advanced_global.md.BhN7_gRt.lean.js | 1 - ..._gRt.js => advanced_global.md.BrPgVIjS.js} | 66 +- .../advanced_global.md.BrPgVIjS.lean.js | 1 + ...SsG5.js => advanced_plugin.md.BXZAPwSl.js} | 8 +- .../advanced_plugin.md.BXZAPwSl.lean.js | 1 + .../advanced_plugin.md.BreKSsG5.lean.js | 1 - ...Vh.js => advanced_property.md.Bv9cWBio.js} | 88 +- .../advanced_property.md.Bv9cWBio.lean.js | 1 + .../advanced_property.md.DxYgetVh.lean.js | 1 - docs/document/assets/app.7_G5wuQ7.js | 1 + docs/document/assets/app.CgT6V0gx.js | 1 - .../assets/chunks/framework.CIzAx-5p.js | 18 + .../assets/chunks/framework.DHbvjPBJ.js | 17 - docs/document/assets/chunks/theme.DtPPs-el.js | 1 - docs/document/assets/chunks/theme.LLaJeaxP.js | 1 + .../chunks/virtual_search-data.CMKl0EDN.js | 1327 ---------------- .../chunks/virtual_search-data.z0DSvrjA.js | 1364 +++++++++++++++++ .../component_contextmenu.md.-4hZtk2p.lean.js | 1 - ...s => component_contextmenu.md.-d4adzZb.js} | 10 +- .../component_contextmenu.md.-d4adzZb.lean.js | 1 + .../component_controls.md.DQKRBMXp.lean.js | 1 - ...p.js => component_controls.md.DZNfg7M_.js} | 10 +- .../component_controls.md.DZNfg7M_.lean.js | 1 + ...3XP.js => component_layers.md.BYX-1Wvu.js} | 10 +- .../component_layers.md.BYX-1Wvu.lean.js | 1 + .../component_layers.md.C9che3XP.lean.js | 1 - ...Ku.js => component_setting.md.B_SkzqZZ.js} | 33 +- .../component_setting.md.B_SkzqZZ.lean.js | 1 + .../component_setting.md.DotXGGKu.lean.js | 1 - .../en_advanced_built-in.md.C8MvISE7.lean.js | 1 - ...js => en_advanced_built-in.md.TNSAz5Xl.js} | 36 +- .../en_advanced_built-in.md.TNSAz5Xl.lean.js | 1 + .../assets/en_advanced_class.md.CWL182-9.js | 8 - .../en_advanced_class.md.CWL182-9.lean.js | 1 - .../assets/en_advanced_class.md.g5hMOwKP.js | 8 + .../en_advanced_class.md.g5hMOwKP.lean.js | 1 + .../en_advanced_event.md.BY6ISfQM.lean.js | 1 - ...QM.js => en_advanced_event.md.rzb3kj1q.js} | 90 +- .../en_advanced_event.md.rzb3kj1q.lean.js | 1 + .../en_advanced_global.md.BryBJDhD.lean.js | 1 - ...D.js => en_advanced_global.md.CeJCRiyy.js} | 68 +- .../en_advanced_global.md.CeJCRiyy.lean.js | 1 + ...O.js => en_advanced_plugin.md.BS5dhI7P.js} | 6 +- .../en_advanced_plugin.md.BS5dhI7P.lean.js | 1 + .../en_advanced_plugin.md.CK2r-NOO.lean.js | 1 - .../en_advanced_property.md.CM0QsujK.lean.js | 1 - ...js => en_advanced_property.md.DT7zAMKq.js} | 88 +- .../en_advanced_property.md.DT7zAMKq.lean.js | 1 + ..._component_contextmenu.md.B4StaLLI.lean.js | 1 - ...> en_component_contextmenu.md.CSeB35ob.js} | 10 +- ..._component_contextmenu.md.CSeB35ob.lean.js | 1 + .../en_component_controls.md.C7L6lFR8.lean.js | 1 - ...s => en_component_controls.md.CamUOgKQ.js} | 10 +- .../en_component_controls.md.CamUOgKQ.lean.js | 1 + .../en_component_layers.md.B0OnEPFl.lean.js | 1 - ....js => en_component_layers.md.BtuRSWO9.js} | 10 +- .../en_component_layers.md.BtuRSWO9.lean.js | 1 + ...js => en_component_setting.md.DHxmIQKF.js} | 33 +- .../en_component_setting.md.DHxmIQKF.lean.js | 1 + .../en_component_setting.md.DzbjefWf.lean.js | 1 - ...md.DJnDZ3oN.js => en_index.md.C5Q5CphE.js} | 8 +- .../assets/en_index.md.C5Q5CphE.lean.js | 1 + .../assets/en_index.md.DJnDZ3oN.lean.js | 1 - .../assets/en_start_i18n.md.BI37jYR8.lean.js | 1 - ...37jYR8.js => en_start_i18n.md.DdodGftR.js} | 6 +- .../assets/en_start_i18n.md.DdodGftR.lean.js | 1 + .../en_start_option.md.DLSwtP6A.lean.js | 1 - ...tP6A.js => en_start_option.md.WkjoTmIK.js} | 108 +- .../en_start_option.md.WkjoTmIK.lean.js | 1 + .../document/assets/index.md.13DkGx_-.lean.js | 1 - ...ex.md.13DkGx_-.js => index.md.D3g3xAoX.js} | 10 +- .../document/assets/index.md.D3g3xAoX.lean.js | 1 + .../assets/plugin_danmuku.md.2scAzaGY.lean.js | 1 - ...AzaGY.js => plugin_danmuku.md.DbxWAnMR.js} | 30 +- .../assets/plugin_danmuku.md.DbxWAnMR.lean.js | 1 + .../assets/start_i18n.md.MhBE-9Zy.lean.js | 1 - ....MhBE-9Zy.js => start_i18n.md.pF9oCBr8.js} | 6 +- .../assets/start_i18n.md.pF9oCBr8.lean.js | 1 + .../assets/start_option.md.Cxa3QDj_.lean.js | 1 - ...xa3QDj_.js => start_option.md.VVl3BaRC.js} | 108 +- .../assets/start_option.md.VVl3BaRC.lean.js | 1 + docs/document/assets/style.BCFi8ev9.css | 1 - docs/document/assets/style.BFaiTuR6.css | 1 + docs/document/component/contextmenu.html | 19 +- docs/document/component/controls.html | 19 +- docs/document/component/layers.html | 19 +- docs/document/component/setting.html | 36 +- docs/document/en/advanced/built-in.html | 19 +- docs/document/en/advanced/class.html | 19 +- docs/document/en/advanced/event.html | 19 +- docs/document/en/advanced/global.html | 19 +- docs/document/en/advanced/plugin.html | 19 +- docs/document/en/advanced/property.html | 19 +- docs/document/en/component/contextmenu.html | 19 +- docs/document/en/component/controls.html | 19 +- docs/document/en/component/layers.html | 19 +- docs/document/en/component/setting.html | 36 +- docs/document/en/index.html | 23 +- docs/document/en/start/i18n.html | 21 +- docs/document/en/start/option.html | 23 +- docs/document/hashmap.json | 2 +- docs/document/index.html | 25 +- docs/document/plugin/danmuku.html | 19 +- docs/document/start/i18n.html | 21 +- docs/document/start/option.html | 23 +- docs/document/vp-icons.css | 1 + package.json | 36 +- .../dist/artplayer-plugin-ads.js | 2 +- .../dist/artplayer-plugin-ads.legacy.js | 2 +- .../dist/artplayer-plugin-ambilight.js | 2 +- .../dist/artplayer-plugin-ambilight.legacy.js | 2 +- .../dist/artplayer-plugin-auto-thumbnail.js | 2 +- .../artplayer-plugin-auto-thumbnail.legacy.js | 2 +- .../package.json | 2 +- .../dist/artplayer-plugin-chapter.js | 2 +- .../dist/artplayer-plugin-chapter.legacy.js | 2 +- .../artplayer-plugin-chapter/package.json | 2 +- .../dist/artplayer-plugin-chromecast.js | 2 +- .../artplayer-plugin-chromecast.legacy.js | 2 +- .../artplayer-plugin-chromecast/package.json | 2 +- .../dist/artplayer-plugin-danmuku.js | 4 +- .../dist/artplayer-plugin-danmuku.legacy.js | 4 +- .../artplayer-plugin-danmuku/package.json | 2 +- .../dist/artplayer-plugin-dash-control.js | 2 +- .../artplayer-plugin-dash-control.legacy.js | 2 +- .../package.json | 2 +- .../dist/artplayer-plugin-hls-control.js | 2 +- .../artplayer-plugin-hls-control.legacy.js | 2 +- .../artplayer-plugin-hls-control/package.json | 2 +- .../dist/artplayer-plugin-iframe.js | 2 +- .../dist/artplayer-plugin-iframe.legacy.js | 2 +- .../dist/artplayer-plugin-libass.js | 2 +- .../dist/artplayer-plugin-libass.legacy.js | 2 +- .../artplayer-plugin-multiple-subtitles.js | 2 +- ...player-plugin-multiple-subtitles.legacy.js | 2 +- .../package.json | 2 +- .../dist/artplayer-plugin-vast.js | 2 +- .../dist/artplayer-plugin-vast.legacy.js | 2 +- packages/artplayer-plugin-vast/package.json | 50 +- .../dist/artplayer-plugin-vtt-thumbnail.js | 2 +- .../artplayer-plugin-vtt-thumbnail.legacy.js | 2 +- .../package.json | 2 +- .../dist/artplayer-proxy-canvas.js | 2 +- .../dist/artplayer-proxy-canvas.legacy.js | 2 +- packages/artplayer-proxy-canvas/package.json | 46 +- .../dist/artplayer-proxy-webav.js | 2 +- .../dist/artplayer-proxy-webav.legacy.js | 2 +- packages/artplayer-proxy-webav/package.json | 50 +- packages/artplayer-template/next.js/README.md | 4 +- .../artplayer-template/react.js/src/index.css | 3 +- .../dist/artplayer-tool-thumbnail.js | 2 +- .../dist/artplayer-tool-thumbnail.legacy.js | 2 +- packages/artplayer-vitepress/package.json | 4 +- packages/artplayer/dist/artplayer.js | 2 +- packages/artplayer/dist/artplayer.legacy.js | 2 +- packages/artplayer/dist/i18n/ar.js | 2 +- packages/artplayer/dist/i18n/cs.js | 2 +- packages/artplayer/dist/i18n/es.js | 2 +- packages/artplayer/dist/i18n/fa.js | 2 +- packages/artplayer/dist/i18n/fr.js | 2 +- packages/artplayer/dist/i18n/id.js | 2 +- packages/artplayer/dist/i18n/pl.js | 2 +- packages/artplayer/dist/i18n/ru.js | 2 +- packages/artplayer/dist/i18n/tr.js | 2 +- packages/artplayer/dist/i18n/vi.js | 2 +- packages/artplayer/dist/i18n/zh-tw.js | 2 +- packages/artplayer/package.json | 2 +- packages/artplayer/src/i18n/vi.js | 74 +- scripts/trans-docs.js | 128 +- 222 files changed, 2791 insertions(+), 2603 deletions(-) delete mode 100644 docs/document/assets/advanced_built-in.md.Bo4XQb8X.lean.js rename docs/document/assets/{advanced_built-in.md.Bo4XQb8X.js => advanced_built-in.md.xIN6yJEQ.js} (83%) create mode 100644 docs/document/assets/advanced_built-in.md.xIN6yJEQ.lean.js delete mode 100644 docs/document/assets/advanced_class.md.BNit_d6q.js delete mode 100644 docs/document/assets/advanced_class.md.BNit_d6q.lean.js create mode 100644 docs/document/assets/advanced_class.md.eY3DVSC3.js create mode 100644 docs/document/assets/advanced_class.md.eY3DVSC3.lean.js delete mode 100644 docs/document/assets/advanced_event.md.RJ7ayOSh.lean.js rename docs/document/assets/{advanced_event.md.RJ7ayOSh.js => advanced_event.md.c-TsYEyx.js} (80%) create mode 100644 docs/document/assets/advanced_event.md.c-TsYEyx.lean.js delete mode 100644 docs/document/assets/advanced_global.md.BhN7_gRt.lean.js rename docs/document/assets/{advanced_global.md.BhN7_gRt.js => advanced_global.md.BrPgVIjS.js} (77%) create mode 100644 docs/document/assets/advanced_global.md.BrPgVIjS.lean.js rename docs/document/assets/{advanced_plugin.md.BreKSsG5.js => advanced_plugin.md.BXZAPwSl.js} (89%) create mode 100644 docs/document/assets/advanced_plugin.md.BXZAPwSl.lean.js delete mode 100644 docs/document/assets/advanced_plugin.md.BreKSsG5.lean.js rename docs/document/assets/{advanced_property.md.DxYgetVh.js => advanced_property.md.Bv9cWBio.js} (88%) create mode 100644 docs/document/assets/advanced_property.md.Bv9cWBio.lean.js delete mode 100644 docs/document/assets/advanced_property.md.DxYgetVh.lean.js create mode 100644 docs/document/assets/app.7_G5wuQ7.js delete mode 100644 docs/document/assets/app.CgT6V0gx.js create mode 100644 docs/document/assets/chunks/framework.CIzAx-5p.js delete mode 100644 docs/document/assets/chunks/framework.DHbvjPBJ.js delete mode 100644 docs/document/assets/chunks/theme.DtPPs-el.js create mode 100644 docs/document/assets/chunks/theme.LLaJeaxP.js delete mode 100644 docs/document/assets/chunks/virtual_search-data.CMKl0EDN.js create mode 100644 docs/document/assets/chunks/virtual_search-data.z0DSvrjA.js delete mode 100644 docs/document/assets/component_contextmenu.md.-4hZtk2p.lean.js rename docs/document/assets/{component_contextmenu.md.-4hZtk2p.js => component_contextmenu.md.-d4adzZb.js} (82%) create mode 100644 docs/document/assets/component_contextmenu.md.-d4adzZb.lean.js delete mode 100644 docs/document/assets/component_controls.md.DQKRBMXp.lean.js rename docs/document/assets/{component_controls.md.DQKRBMXp.js => component_controls.md.DZNfg7M_.js} (86%) create mode 100644 docs/document/assets/component_controls.md.DZNfg7M_.lean.js rename docs/document/assets/{component_layers.md.C9che3XP.js => component_layers.md.BYX-1Wvu.js} (86%) create mode 100644 docs/document/assets/component_layers.md.BYX-1Wvu.lean.js delete mode 100644 docs/document/assets/component_layers.md.C9che3XP.lean.js rename docs/document/assets/{component_setting.md.DotXGGKu.js => component_setting.md.B_SkzqZZ.js} (84%) create mode 100644 docs/document/assets/component_setting.md.B_SkzqZZ.lean.js delete mode 100644 docs/document/assets/component_setting.md.DotXGGKu.lean.js delete mode 100644 docs/document/assets/en_advanced_built-in.md.C8MvISE7.lean.js rename docs/document/assets/{en_advanced_built-in.md.C8MvISE7.js => en_advanced_built-in.md.TNSAz5Xl.js} (84%) create mode 100644 docs/document/assets/en_advanced_built-in.md.TNSAz5Xl.lean.js delete mode 100644 docs/document/assets/en_advanced_class.md.CWL182-9.js delete mode 100644 docs/document/assets/en_advanced_class.md.CWL182-9.lean.js create mode 100644 docs/document/assets/en_advanced_class.md.g5hMOwKP.js create mode 100644 docs/document/assets/en_advanced_class.md.g5hMOwKP.lean.js delete mode 100644 docs/document/assets/en_advanced_event.md.BY6ISfQM.lean.js rename docs/document/assets/{en_advanced_event.md.BY6ISfQM.js => en_advanced_event.md.rzb3kj1q.js} (81%) create mode 100644 docs/document/assets/en_advanced_event.md.rzb3kj1q.lean.js delete mode 100644 docs/document/assets/en_advanced_global.md.BryBJDhD.lean.js rename docs/document/assets/{en_advanced_global.md.BryBJDhD.js => en_advanced_global.md.CeJCRiyy.js} (77%) create mode 100644 docs/document/assets/en_advanced_global.md.CeJCRiyy.lean.js rename docs/document/assets/{en_advanced_plugin.md.CK2r-NOO.js => en_advanced_plugin.md.BS5dhI7P.js} (92%) create mode 100644 docs/document/assets/en_advanced_plugin.md.BS5dhI7P.lean.js delete mode 100644 docs/document/assets/en_advanced_plugin.md.CK2r-NOO.lean.js delete mode 100644 docs/document/assets/en_advanced_property.md.CM0QsujK.lean.js rename docs/document/assets/{en_advanced_property.md.CM0QsujK.js => en_advanced_property.md.DT7zAMKq.js} (84%) create mode 100644 docs/document/assets/en_advanced_property.md.DT7zAMKq.lean.js delete mode 100644 docs/document/assets/en_component_contextmenu.md.B4StaLLI.lean.js rename docs/document/assets/{en_component_contextmenu.md.B4StaLLI.js => en_component_contextmenu.md.CSeB35ob.js} (81%) create mode 100644 docs/document/assets/en_component_contextmenu.md.CSeB35ob.lean.js delete mode 100644 docs/document/assets/en_component_controls.md.C7L6lFR8.lean.js rename docs/document/assets/{en_component_controls.md.C7L6lFR8.js => en_component_controls.md.CamUOgKQ.js} (86%) create mode 100644 docs/document/assets/en_component_controls.md.CamUOgKQ.lean.js delete mode 100644 docs/document/assets/en_component_layers.md.B0OnEPFl.lean.js rename docs/document/assets/{en_component_layers.md.B0OnEPFl.js => en_component_layers.md.BtuRSWO9.js} (86%) create mode 100644 docs/document/assets/en_component_layers.md.BtuRSWO9.lean.js rename docs/document/assets/{en_component_setting.md.DzbjefWf.js => en_component_setting.md.DHxmIQKF.js} (82%) create mode 100644 docs/document/assets/en_component_setting.md.DHxmIQKF.lean.js delete mode 100644 docs/document/assets/en_component_setting.md.DzbjefWf.lean.js rename docs/document/assets/{en_index.md.DJnDZ3oN.js => en_index.md.C5Q5CphE.js} (87%) create mode 100644 docs/document/assets/en_index.md.C5Q5CphE.lean.js delete mode 100644 docs/document/assets/en_index.md.DJnDZ3oN.lean.js delete mode 100644 docs/document/assets/en_start_i18n.md.BI37jYR8.lean.js rename docs/document/assets/{en_start_i18n.md.BI37jYR8.js => en_start_i18n.md.DdodGftR.js} (81%) create mode 100644 docs/document/assets/en_start_i18n.md.DdodGftR.lean.js delete mode 100644 docs/document/assets/en_start_option.md.DLSwtP6A.lean.js rename docs/document/assets/{en_start_option.md.DLSwtP6A.js => en_start_option.md.WkjoTmIK.js} (81%) create mode 100644 docs/document/assets/en_start_option.md.WkjoTmIK.lean.js delete mode 100644 docs/document/assets/index.md.13DkGx_-.lean.js rename docs/document/assets/{index.md.13DkGx_-.js => index.md.D3g3xAoX.js} (85%) create mode 100644 docs/document/assets/index.md.D3g3xAoX.lean.js delete mode 100644 docs/document/assets/plugin_danmuku.md.2scAzaGY.lean.js rename docs/document/assets/{plugin_danmuku.md.2scAzaGY.js => plugin_danmuku.md.DbxWAnMR.js} (85%) create mode 100644 docs/document/assets/plugin_danmuku.md.DbxWAnMR.lean.js delete mode 100644 docs/document/assets/start_i18n.md.MhBE-9Zy.lean.js rename docs/document/assets/{start_i18n.md.MhBE-9Zy.js => start_i18n.md.pF9oCBr8.js} (82%) create mode 100644 docs/document/assets/start_i18n.md.pF9oCBr8.lean.js delete mode 100644 docs/document/assets/start_option.md.Cxa3QDj_.lean.js rename docs/document/assets/{start_option.md.Cxa3QDj_.js => start_option.md.VVl3BaRC.js} (83%) create mode 100644 docs/document/assets/start_option.md.VVl3BaRC.lean.js delete mode 100644 docs/document/assets/style.BCFi8ev9.css create mode 100644 docs/document/assets/style.BFaiTuR6.css create mode 100644 docs/document/vp-icons.css diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 0e73b7013..74b9f5312 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -8,236 +8,236 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [5.2.3] - 2025-04-20 -- 添加越南语 `vi` -- 销毁时,清空 `video.src` 属性 -- 为 `Setting` 添加 `onClick` 选项 -- 修复当网页没有head时,弹幕插件和章节插件引起的样式加载失败问题 -- 添加 `gesture` 选项,用于是否开启移动端的 `video` 元素的手势事件 +- 添加越南语 `vi` +- 销毁时,清空 `video.src` 属性 +- 为 `Setting` 添加 `onClick` 选项 +- 修复当网页没有head时,弹幕插件和章节插件引起的样式加载失败问题 +- 添加 `gesture` 选项,用于是否开启移动端的 `video` 元素的手势事件 ## [5.2.2] - 2025-01-19 -- 修复缩略图跨越问题 -- 修复当网页没有head时引起的样式加载失败问题 -- 新增字幕插件的设置面板的滑块支持移动端拖动 -- 修复设置面板在旋屏时的定位错误 -- 修复全屏状态变化时类名切换错误问题 +- 修复缩略图跨越问题 +- 修复当网页没有head时引起的样式加载失败问题 +- 新增字幕插件的设置面板的滑块支持移动端拖动 +- 修复设置面板在旋屏时的定位错误 +- 修复全屏状态变化时类名切换错误问题 ## [5.2.1] - 2024-10-26 -- 重构 `Setting` 组件,修复状态丢失的问题 -- 类型是 `range` 的 `Setting`,现在回调函数返回的 `range` 是数字的数组,不再是单一数字 -- 删除 `isStringOrNumber` 工具函数 -- 修复 `artplayer-plugin-hls-control` 状态不统一的问题 -- 废弃 `artplayer-plugin-dash-quality` 插件 -- 新增 `artplayer-plugin-dash-control` 插件 -- 使用 `code` 替代已废弃的`keyCode` 监听键盘事件 -- 新增 `keydown` 事件,监听来自 `document` 的 `keydown` 事件 +- 重构 `Setting` 组件,修复状态丢失的问题 +- 类型是 `range` 的 `Setting`,现在回调函数返回的 `range` 是数字的数组,不再是单一数字 +- 删除 `isStringOrNumber` 工具函数 +- 修复 `artplayer-plugin-hls-control` 状态不统一的问题 +- 废弃 `artplayer-plugin-dash-quality` 插件 +- 新增 `artplayer-plugin-dash-control` 插件 +- 使用 `code` 替代已废弃的`keyCode` 监听键盘事件 +- 新增 `keydown` 事件,监听来自 `document` 的 `keydown` 事件 ## [5.2.0] - 2024-10-19 -- 新增 `option.proxy` 选项,用于代理第三方的 `video` 和 `canvas` -- 新增 `artplayer-proxy-canvas` 代理,可以使用 `canvas` 播放视频 -- 新增 `artplayer-proxy-webav` 代理,来自 [bilibili/WebAV](https://github.com/bilibili/WebAV) -- 新增 `option.thumbnails.scale`, 用于预览图缩放 -- 修复 `art.url` 更改不能触发 `autoPlayBack` 的 `bug`: [#797](https://github.com/zhw2590582/ArtPlayer/issues/797) -- 新增 `art.subtitle.cues` 属性, 获取整体的字幕列表 -- 新增 `art.subtitle.activeCues` 属性, 获取活跃的字幕列表 -- 新增 `subtitleBeforeUpdate` 事件, 在字幕元素渲染前触发 -- 修改 `subtitleUpdate` 事件为 `subtitleAfterUpdate`, 在字幕元素渲染后触发 -- 优化 `subtitleLoad` 事件的触发时机和回调参数 -- 删除 `subtitleSwitch` 事件,请使用 `subtitleLoad` 代替 -- 升级 `artplayer-plugin-hls-quality` 为 `artplayer-plugin-hls-control` -- 新增 `artplayer-plugin-ambilight` 插件 -- 修复 `thumbnails` 显示 bug +- 新增 `option.proxy` 选项,用于代理第三方的 `video` 和 `canvas` +- 新增 `artplayer-proxy-canvas` 代理,可以使用 `canvas` 播放视频 +- 新增 `artplayer-proxy-webav` 代理,来自 [bilibili/WebAV](https://github.com/bilibili/WebAV) +- 新增 `option.thumbnails.scale`, 用于预览图缩放 +- 修复 `art.url` 更改不能触发 `autoPlayBack` 的 `bug`: [#797](https://github.com/zhw2590582/ArtPlayer/issues/797) +- 新增 `art.subtitle.cues` 属性, 获取整体的字幕列表 +- 新增 `art.subtitle.activeCues` 属性, 获取活跃的字幕列表 +- 新增 `subtitleBeforeUpdate` 事件, 在字幕元素渲染前触发 +- 修改 `subtitleUpdate` 事件为 `subtitleAfterUpdate`, 在字幕元素渲染后触发 +- 优化 `subtitleLoad` 事件的触发时机和回调参数 +- 删除 `subtitleSwitch` 事件,请使用 `subtitleLoad` 代替 +- 升级 `artplayer-plugin-hls-quality` 为 `artplayer-plugin-hls-control` +- 新增 `artplayer-plugin-ambilight` 插件 +- 修复 `thumbnails` 显示 bug ## [5.1.7] - 2024-8-15 -- 新增 `Artplayer.STYLE` 属性,返回播放器样式文本 -- `art.screenshot('your-name')` 截图功能支持自定义文件名字 -- `Artplayer.CONTEXTMENU` 为 `false` 时,不再隐藏默认右键菜单 -- 新增 `art.thumbnails` 属性,用于动态设置 `thumbnails` +- 新增 `Artplayer.STYLE` 属性,返回播放器样式文本 +- `art.screenshot('your-name')` 截图功能支持自定义文件名字 +- `Artplayer.CONTEXTMENU` 为 `false` 时,不再隐藏默认右键菜单 +- 新增 `art.thumbnails` 属性,用于动态设置 `thumbnails` ## [5.1.6] - 2024-6-15 -- 优化 `setBar` 事件 -- 新增 `artplayerPluginChapter` 插件 -- 新增 `art.plugins.artplayerPluginDanmuku.load(target)` 参数,用于追加弹幕库 -- 新增弹幕插件的 `width` 选项参数,当播放器宽度小于此值时,弹幕发射器置于播放器底部 -- 修复 `artplayerPluginVttThumbnail` 在移动端不显示的问题 -- 修复弹幕插件样式,和字号百分比显示的 `bug` -- 移动端也可以看到 `thumbnails` 了 -- 恢复 `screen.orientation.lock` 功能 +- 优化 `setBar` 事件 +- 新增 `artplayerPluginChapter` 插件 +- 新增 `art.plugins.artplayerPluginDanmuku.load(target)` 参数,用于追加弹幕库 +- 新增弹幕插件的 `width` 选项参数,当播放器宽度小于此值时,弹幕发射器置于播放器底部 +- 修复 `artplayerPluginVttThumbnail` 在移动端不显示的问题 +- 修复弹幕插件样式,和字号百分比显示的 `bug` +- 移动端也可以看到 `thumbnails` 了 +- 恢复 `screen.orientation.lock` 功能 ## [5.1.5] - 2024-6-1 -- 重构 `artplayerPluginDanmuku` 插件 -- 新增 `artplayerPluginChromecast` 插件 -- 添加 `fullscreenError` 事件 -- 优化双击事件: [#728](https://github.com/zhw2590582/ArtPlayer/pull/728) -- 修复 `thumbnails` 延迟显示问题 -- 新增 `art.plugins.lock.state = true/false`, 用于手动控制 `lock` 状态 -- 当鼠标在控制栏上,或者打开了设置面板,控制栏不再自动隐藏 -- 由于兼容性不足,删除 `screen.orientation.lock` 功能 -- 修复移动端的 `fullscreen` bug +- 重构 `artplayerPluginDanmuku` 插件 +- 新增 `artplayerPluginChromecast` 插件 +- 添加 `fullscreenError` 事件 +- 优化双击事件: [#728](https://github.com/zhw2590582/ArtPlayer/pull/728) +- 修复 `thumbnails` 延迟显示问题 +- 新增 `art.plugins.lock.state = true/false`, 用于手动控制 `lock` 状态 +- 当鼠标在控制栏上,或者打开了设置面板,控制栏不再自动隐藏 +- 由于兼容性不足,删除 `screen.orientation.lock` 功能 +- 修复移动端的 `fullscreen` bug ## [5.1.1] - 2024-1-11 -- 插件函数支持同步和异步返回 +- 插件函数支持同步和异步返回 ## [5.1.0] - 2023-12-23 -- 插件函数改为支持异步返回 -- 当播放地址发生错误到达上限后,不会再主动销毁播放器 -- 分离语言文件,核心代码不再捆绑多国语言 [语言设置](https://artplayer.org/document/start/i18n.html) -- 更新组件时,支持填写只更新的字段 [pull/549](https://github.com/zhw2590582/ArtPlayer/pull/549) -- 添加 `muted` 事件,当静音的状态变化时触发 -- 添加 `Artplayer.LOG_VERSION` 全局配置,设置是否打印播放器版本,默认为 `true` -- 添加 `Artplayer.USE_RAF` 全局配置,设置是否使用 `requestAnimationFrame` ,默认为 `false`,目前主要用于进度条的平滑效果 -- 移除默认样式 `margin:0;padding:0;`,因为容易与第三方库起样式冲突,导致难以覆写 -- 字幕行从 `p` 标签改为 `div` 标签,并且添加类名 `art-subtitle-line` -- 在移动端,点击视频会切换控制栏的显示与隐藏 -- 由于功能不常用,删除 `art.loop` 区间播放功能 -- 字幕轨添加 `label` 属性,用于在移动设备上显示字幕名字 -- 添加 `unescape`, `isBrowser`, `setStyleText` 工具函数 -- 添加 `artplayerPluginMultipleSubtitles` 插件,用于显示合并后的字幕文件: [demo](https://www.artplayer.org/?libs=./uncompiled/artplayer-plugin-multiple-subtitles/index.js&example=multiple.subtitles) -- 修改迷你进度条的显示方式 +- 插件函数改为支持异步返回 +- 当播放地址发生错误到达上限后,不会再主动销毁播放器 +- 分离语言文件,核心代码不再捆绑多国语言 [语言设置](https://artplayer.org/document/start/i18n.html) +- 更新组件时,支持填写只更新的字段 [pull/549](https://github.com/zhw2590582/ArtPlayer/pull/549) +- 添加 `muted` 事件,当静音的状态变化时触发 +- 添加 `Artplayer.LOG_VERSION` 全局配置,设置是否打印播放器版本,默认为 `true` +- 添加 `Artplayer.USE_RAF` 全局配置,设置是否使用 `requestAnimationFrame` ,默认为 `false`,目前主要用于进度条的平滑效果 +- 移除默认样式 `margin:0;padding:0;`,因为容易与第三方库起样式冲突,导致难以覆写 +- 字幕行从 `p` 标签改为 `div` 标签,并且添加类名 `art-subtitle-line` +- 在移动端,点击视频会切换控制栏的显示与隐藏 +- 由于功能不常用,删除 `art.loop` 区间播放功能 +- 字幕轨添加 `label` 属性,用于在移动设备上显示字幕名字 +- 添加 `unescape`, `isBrowser`, `setStyleText` 工具函数 +- 添加 `artplayerPluginMultipleSubtitles` 插件,用于显示合并后的字幕文件: [demo](https://www.artplayer.org/?libs=./uncompiled/artplayer-plugin-multiple-subtitles/index.js&example=multiple.subtitles) +- 修改迷你进度条的显示方式 ## [5.0.9] - 2023-5-14 -- 修复 `art.autoOrientation` 样式错误问题 -- 移除播放器容器的动画效果 +- 修复 `art.autoOrientation` 样式错误问题 +- 移除播放器容器的动画效果 ## [5.0.8] - 2023-5-13 -- 修复 `art.mini` 的互斥关系 -- 修复 `art.aspectRatio` 动画效果问题 +- 修复 `art.mini` 的互斥关系 +- 修复 `art.aspectRatio` 动画效果问题 ## [5.0.7] - 2023-5-13 -- 使用 `switchUrl` 或者 `switchQuality` 方法切换地址后会保持原有的调整如:`aspectRatio`, `playbackRate`, `flip`, `autoSize` -- 删除 `switchUrl` 方法和 `switchQuality` 方法的第二个 `name` 参数 -- 添加 `isIOS13` 工具,用于修复在 `IOS13` 以上版本的设备上的 `isMobile` 判断不准确的问题 -- `art.autoSize` 和 `art.autoHeight` 改为方法的形式调用,即 `art.autoSize()` 和 `art.autoHeight()` -- 添加新的属性 `art.quality`,用于动态更新画质列表 -- 修复 `art.aspectRatio` 属性不正确的问题 -- 添加 `art.switch` Setter 属性, 功能和 `art.switchUrl` 方法一样 +- 使用 `switchUrl` 或者 `switchQuality` 方法切换地址后会保持原有的调整如:`aspectRatio`, `playbackRate`, `flip`, `autoSize` +- 删除 `switchUrl` 方法和 `switchQuality` 方法的第二个 `name` 参数 +- 添加 `isIOS13` 工具,用于修复在 `IOS13` 以上版本的设备上的 `isMobile` 判断不准确的问题 +- `art.autoSize` 和 `art.autoHeight` 改为方法的形式调用,即 `art.autoSize()` 和 `art.autoHeight()` +- 添加新的属性 `art.quality`,用于动态更新画质列表 +- 修复 `art.aspectRatio` 属性不正确的问题 +- 添加 `art.switch` Setter 属性, 功能和 `art.switchUrl` 方法一样 ## [5.0.6] - 2023-5-3 -- 修复设置面板的样式错误 +- 修复设置面板的样式错误 ## [5.0.5] - 2023-5-3 -- 弹幕插件添加 `heatmap` 选项,用于是否开启热度图,默认为关闭 -- 修复英文字幕换行的样式错误 -- 修复设置面板的样式错误 -- 移除多余的全局属性 -- 移除 `title` 选项,因为目前用处不大 -- 移除 `whitelist` 选项,因为目前用处不大 +- 弹幕插件添加 `heatmap` 选项,用于是否开启热度图,默认为关闭 +- 修复英文字幕换行的样式错误 +- 修复设置面板的样式错误 +- 移除多余的全局属性 +- 移除 `title` 选项,因为目前用处不大 +- 移除 `whitelist` 选项,因为目前用处不大 ## [5.0.4] - 2023-4-27 -- 修复控制器的上拉列表的样式 bug +- 修复控制器的上拉列表的样式 bug ## [5.0.3] - 2023-4-26 -- 修复音量控制器 `event.pageY` 取值错误 -- 修改构建配置,`artplayer.legacy.js` 可以兼容到 `IE 11` +- 修复音量控制器 `event.pageY` 取值错误 +- 修改构建配置,`artplayer.legacy.js` 可以兼容到 `IE 11` ## [5.0.2] - 2023-4-24 -- 修复控制栏位置的样式兼容问题 +- 修复控制栏位置的样式兼容问题 ## [5.0.1] - 2023-4-24 -- 修复网页全屏的样式错误 -- 修改内置设置项的文本错误 +- 修复网页全屏的样式错误 +- 修改内置设置项的文本错误 ## [5.0.0] - 2023-4-23 -- 重写了音量控制器 -- 修复在移动端下,进度拖动的角度不正确的问题 -- 重写了 `mini` 模式,现在这个模式下,视频会脱离原来的容器 -- 全部组件(层,控制器,右键菜单,设置面板)支持动态删除和动态更新 -- 字幕选项添加了 `onVttLoad` 方法,用于在字幕输出前修改 `vtt` 文本 -- 重写了全部样式,添加了许多 `css` 变量 -- 添加 `cssVar` 选项,用于初始化 `css` 变量 -- 添加 `cssVar` 方法,用于设置和获取 `css` 变量 -- 插件 `artplayer-plugin-hls-quality` 添加 `getResolution` 函数选项,用于获取从 `level` 中分辨率的文本 -- 新增 `artplayer-plugin-dash-quality` 插件,用于添加 `Dash` 画质列表到播放器 -- 修复 `lock` 和 `loop` 事件失效问题 -- 添加俄语 `ru` 和印度尼西亚 `id` 语言 -- 更新 `artplayer-plugin-control`,用于兼容`artplayer@5.0.0` -- 更新 `artplayer-plugin-dash-quality`,用于兼容`artplayer@5.0.0` -- 更新 `artplayer-plugin-hls-quality`,用于兼容`artplayer@5.0.0` -- 更新 `artplayer-plugin-danmuku`,用于兼容`artplayer@5.0.0` +- 重写了音量控制器 +- 修复在移动端下,进度拖动的角度不正确的问题 +- 重写了 `mini` 模式,现在这个模式下,视频会脱离原来的容器 +- 全部组件(层,控制器,右键菜单,设置面板)支持动态删除和动态更新 +- 字幕选项添加了 `onVttLoad` 方法,用于在字幕输出前修改 `vtt` 文本 +- 重写了全部样式,添加了许多 `css` 变量 +- 添加 `cssVar` 选项,用于初始化 `css` 变量 +- 添加 `cssVar` 方法,用于设置和获取 `css` 变量 +- 插件 `artplayer-plugin-hls-quality` 添加 `getResolution` 函数选项,用于获取从 `level` 中分辨率的文本 +- 新增 `artplayer-plugin-dash-quality` 插件,用于添加 `Dash` 画质列表到播放器 +- 修复 `lock` 和 `loop` 事件失效问题 +- 添加俄语 `ru` 和印度尼西亚 `id` 语言 +- 更新 `artplayer-plugin-control`,用于兼容`artplayer@5.0.0` +- 更新 `artplayer-plugin-dash-quality`,用于兼容`artplayer@5.0.0` +- 更新 `artplayer-plugin-hls-quality`,用于兼容`artplayer@5.0.0` +- 更新 `artplayer-plugin-danmuku`,用于兼容`artplayer@5.0.0` ## [4.6.2] - 2023-1-26 -- `Artplayer.PROGRESS_HEIGHT` 默认值改为 `6` -- 添加 `artplayer-plugin-vtt-thumbnail` 用于使用 `vtt` 字幕文件生成视频预览图 -- 添加 `Artplayer.FULLSCREEN_WEB_IN_BODY` 用于网页全屏时,是否把播放器挂载于 `document.body` 上,默认为 `false` -- 修改字幕偏移的方式为滑块 -- 字幕选项添加 `escape`,用于是否转义 `html` 标签,默认为 `true` +- `Artplayer.PROGRESS_HEIGHT` 默认值改为 `6` +- 添加 `artplayer-plugin-vtt-thumbnail` 用于使用 `vtt` 字幕文件生成视频预览图 +- 添加 `Artplayer.FULLSCREEN_WEB_IN_BODY` 用于网页全屏时,是否把播放器挂载于 `document.body` 上,默认为 `false` +- 修改字幕偏移的方式为滑块 +- 字幕选项添加 `escape`,用于是否转义 `html` 标签,默认为 `true` ## [4.6.1] - 2023-1-11 -- 编写全新的文档 -- 优化`d.ts` -- 移除多余的事件 -- 优化部分样式 -- 添加`i18n`选项 +- 编写全新的文档 +- 优化`d.ts` +- 移除多余的事件 +- 优化部分样式 +- 添加`i18n`选项 ## [4.6.0] - 2022-12-31 -- 优化控制栏图标的样式效果 -- 优化设置面板的样式效果 -- 修复 `art.fullscreen` 监听状态错误的问题 -- 添加 `artplayer-plugin-control` 插件,用于改变控制栏样式 +- 优化控制栏图标的样式效果 +- 优化设置面板的样式效果 +- 修复 `art.fullscreen` 监听状态错误的问题 +- 添加 `artplayer-plugin-control` 插件,用于改变控制栏样式 ## [4.5.12] - 2022-11-20 -- 修复 `art.loop = []` 的显示 `bug` +- 修复 `art.loop = []` 的显示 `bug` ## [4.5.11] - 2022-11-6 -- 新增 `Artplayer.CONTEXTMENU` 用于设置是否显示右键菜单,默认为 `true` -- 移动设备 `Whitelist` 功能默认为 `true`,即全部移动设备都使用播放器 `UI` +- 新增 `Artplayer.CONTEXTMENU` 用于设置是否显示右键菜单,默认为 `true` +- 移动设备 `Whitelist` 功能默认为 `true`,即全部移动设备都使用播放器 `UI` ## [4.5.10] - 2022-11-5 -- 修复字幕在 `firefox` 不显示的问题:[#pull/415](https://github.com/zhw2590582/ArtPlayer/pull/415) -- 信息弹窗支持点击选中视频属性文本值 +- 修复字幕在 `firefox` 不显示的问题:[#pull/415](https://github.com/zhw2590582/ArtPlayer/pull/415) +- 信息弹窗支持点击选中视频属性文本值 ## [4.5.9] - 2022-11-5 -- 添加 `art.type` 属性,用于获取和设置视频类型 -- 添加 `art.video` 属性,用于获取 `video` 元素 -- 添加 `artplayer-plugin-iframe` 插件,用于控制 `iframe` 里的播放器 -- 添加 `artplayer-plugin-hls-quality` 插件,用于添加 `Hls` 画质列表到播放器 -- 新增 `Artplayer.PLAYBACK_RATE` 用于设置默认播放速度,默认 `[0.5, 0.75, 1, 1.25, 1.5, 2]` -- 新增 `Artplayer.ASPECT_RATIO` 用于设置默认长宽比,默认 `['default', '4:3', '16:9']` -- 新增 `Artplayer.FLIP` 用于设置默认翻转功能,默认 `['normal', 'horizontal', 'vertical']` -- 新增 `Artplayer.PROGRESS_HEIGHT` 用于设置进度条高度,默认为 `4` -- 添加 `legacy.js` 版本,用于兼容更老的浏览器,但相对体积较大 -- 移除 `examples` 目录,不再提供 `vue.js` 和 `react.js` 的例子文件 +- 添加 `art.type` 属性,用于获取和设置视频类型 +- 添加 `art.video` 属性,用于获取 `video` 元素 +- 添加 `artplayer-plugin-iframe` 插件,用于控制 `iframe` 里的播放器 +- 添加 `artplayer-plugin-hls-quality` 插件,用于添加 `Hls` 画质列表到播放器 +- 新增 `Artplayer.PLAYBACK_RATE` 用于设置默认播放速度,默认 `[0.5, 0.75, 1, 1.25, 1.5, 2]` +- 新增 `Artplayer.ASPECT_RATIO` 用于设置默认长宽比,默认 `['default', '4:3', '16:9']` +- 新增 `Artplayer.FLIP` 用于设置默认翻转功能,默认 `['normal', 'horizontal', 'vertical']` +- 新增 `Artplayer.PROGRESS_HEIGHT` 用于设置进度条高度,默认为 `4` +- 添加 `legacy.js` 版本,用于兼容更老的浏览器,但相对体积较大 +- 移除 `examples` 目录,不再提供 `vue.js` 和 `react.js` 的例子文件 ## [4.5.8] - 2022-10-9 -- 添加 `farsi` 语言 -- 新增 `Artplayer.DEBUG` 用于打印 `debug` 信息,默认为 `false` -- 新增 `art.setting.update()` 用于动态更新设置面板 -- 优化 `artplayer.d.ts` +- 添加 `farsi` 语言 +- 新增 `Artplayer.DEBUG` 用于打印 `debug` 信息,默认为 `false` +- 新增 `art.setting.update()` 用于动态更新设置面板 +- 优化 `artplayer.d.ts` ## [4.5.7] - 2022-9-28 -- 新增 `Artplayer.VOLUME_STEP` 用于控制调整 `音量` 的步长,默认为 `0.1` -- 新增 `Artplayer.SEEK_STEP` 用于控制调整 `快进/快退` 的步长,默认为 `5` 秒 -- 修复部分 `svg` 图标在移动端不显示的问题 -- 修复在桌面端进度条不能同时点击和拖动的问题 -- 修复在移动端进度条不能点击和拖动的问题 -- 新增 `art.isRotate` 属性,用于识别是否自动全屏旋转 -- 设置面板 `range` 添加 `onChange` 选项,可以实时获取当前值 +- 新增 `Artplayer.VOLUME_STEP` 用于控制调整 `音量` 的步长,默认为 `0.1` +- 新增 `Artplayer.SEEK_STEP` 用于控制调整 `快进/快退` 的步长,默认为 `5` 秒 +- 修复部分 `svg` 图标在移动端不显示的问题 +- 修复在桌面端进度条不能同时点击和拖动的问题 +- 修复在移动端进度条不能点击和拖动的问题 +- 新增 `art.isRotate` 属性,用于识别是否自动全屏旋转 +- 设置面板 `range` 添加 `onChange` 选项,可以实时获取当前值 ```js var art = new Artplayer({ @@ -259,30 +259,30 @@ var art = new Artplayer({ ## [4.5.6] - 2022-9-19 -- 修复 `hls.js` 在 `Safari` 播放失效的问题 +- 修复 `hls.js` 在 `Safari` 播放失效的问题 ## [4.5.5] - 2022-9-19 -- 广告插件添加 `option.muted` 选项,用于静音自动播放广告 -- 弹幕库插件暴露 `art.plugins.artplayerPluginDanmuku.reset()` 方法,用于清空当前弹幕显示 -- 弹幕库插件暴露 `art.plugins.artplayerPluginDanmuku.option` 属性,用于获取当前弹幕配置 -- 修复在 `IOS` 全屏模式下,字幕失效的问题 -- 添加 `es` 语言 +- 广告插件添加 `option.muted` 选项,用于静音自动播放广告 +- 弹幕库插件暴露 `art.plugins.artplayerPluginDanmuku.reset()` 方法,用于清空当前弹幕显示 +- 弹幕库插件暴露 `art.plugins.artplayerPluginDanmuku.option` 属性,用于获取当前弹幕配置 +- 修复在 `IOS` 全屏模式下,字幕失效的问题 +- 添加 `es` 语言 ## [4.5.4] - 2022-8-1 ### Added -- 新增 `Artplayer.AUTO_PLAYBACK_MIN` 用于控制最小可以记忆播放的进度值,默认为 `5` 秒 -- 新增 `Artplayer.TOUCH_MOVE_RATIO` 用于控制移动端进度条拖放比例,默认为 `0.5` -- `option.thumbnails` 添加可选的 `width` 和 `height` -- 新增播放器编号选项 `option.id`,可用于记忆播放时的唯一标识 +- 新增 `Artplayer.AUTO_PLAYBACK_MIN` 用于控制最小可以记忆播放的进度值,默认为 `5` 秒 +- 新增 `Artplayer.TOUCH_MOVE_RATIO` 用于控制移动端进度条拖放比例,默认为 `0.5` +- `option.thumbnails` 添加可选的 `width` 和 `height` +- 新增播放器编号选项 `option.id`,可用于记忆播放时的唯一标识 ## [4.5.3] - 2022-7-13 ### Added -- `url` 选项允许传空字符串,可用于异步设置 `art.url` +- `url` 选项允许传空字符串,可用于异步设置 `art.url` ```js const art = new Artplayer({ @@ -295,7 +295,7 @@ setTimeout(() => { }, 1000); ``` -- `art.play()` 方法统一返回 `Promise`, `play` 事件也改为异步触发 +- `art.play()` 方法统一返回 `Promise`, `play` 事件也改为异步触发 ```js const art = new Artplayer({ @@ -313,7 +313,7 @@ art.on('ready', async () => { }); ``` -- 新增 `airplay` (隔空播放) 功能,当前只在 Safari 下可用 +- 新增 `airplay` (隔空播放) 功能,当前只在 Safari 下可用 ```js const art = new Artplayer({ @@ -327,77 +327,77 @@ const art = new Artplayer({ ### Added -- 优化自动回放功能,让用户自行选择 +- 优化自动回放功能,让用户自行选择 ## [4.5.0] - 2022-6-21 ### Added -- 移除内置广告功能 -- 新增广告插件 +- 移除内置广告功能 +- 新增广告插件 ## [4.4.7] - 2022-6-13 ### Added -- 兼容弹幕库 d.ts -- 更新依赖库 +- 兼容弹幕库 d.ts +- 更新依赖库 ## [4.4.6] - 2022-6-11 ### Added -- 添加弹幕库 d.ts -- 调整字幕字体大小参数 -- 优化正则解析 xml 弹幕 +- 添加弹幕库 d.ts +- 调整字幕字体大小参数 +- 优化正则解析 xml 弹幕 ## [4.4.5] - 2022-6-2 ### Added -- 修复迷你模式时,主题色缺失的 bug +- 修复迷你模式时,主题色缺失的 bug ## [4.4.3] - 2022-05-26 ### Added -- 修复弹幕库销毁时,自定义挂载输入框的残留 -- 修复迷你模式的尺寸计算错误 +- 修复弹幕库销毁时,自定义挂载输入框的残留 +- 修复迷你模式的尺寸计算错误 ## [4.4.2] - 2022-05-20 ### Added -- 移除播放器 UI 初始化的 video:loadedmetadata 事件 -- 弹幕库暴露 load 方法,用于切换弹幕源 -- 添加 error 图标,出现于视频加载错误达到上限后 -- 修复 setting 多次初始化时产生的 bug +- 移除播放器 UI 初始化的 video:loadedmetadata 事件 +- 弹幕库暴露 load 方法,用于切换弹幕源 +- 添加 error 图标,出现于视频加载错误达到上限后 +- 修复 setting 多次初始化时产生的 bug ## [4.4.1] - 2022-05-17 ### Added -- 添加 art.isInput 属性,当为 true 的时候不自动隐藏控制栏,如弹幕正在输入时 -- 添加 art.isLock 属性,在移动端当为 true 的时候不能操作快进、开始和暂停 -- 修复弹幕输入框的固定宽度 bug -- 设置面板支持 range 和 onRange 选项 -- 添加 isAndroid 和 isIOS 工具函数 -- 弹幕库添加 lockTime 选项,可自定义输入框的锁定时间 -- 弹幕库添加 maxLength 选项,控制输入最大可输入字数 -- 弹幕库添加 minWidth 选项,控制输入框最小宽度 -- 弹幕库添加 maxWidth 选项,控制输入框最大宽度 -- 弹幕库添加 mount 选项,控制输入框自定义挂载位置 -- 弹幕库添加 beforeEmit 选项,控制弹幕发送前的校验 -- 弹幕库添加 theme 选项,控制输入框自定义挂载的主题色 +- 添加 art.isInput 属性,当为 true 的时候不自动隐藏控制栏,如弹幕正在输入时 +- 添加 art.isLock 属性,在移动端当为 true 的时候不能操作快进、开始和暂停 +- 修复弹幕输入框的固定宽度 bug +- 设置面板支持 range 和 onRange 选项 +- 添加 isAndroid 和 isIOS 工具函数 +- 弹幕库添加 lockTime 选项,可自定义输入框的锁定时间 +- 弹幕库添加 maxLength 选项,控制输入最大可输入字数 +- 弹幕库添加 minWidth 选项,控制输入框最小宽度 +- 弹幕库添加 maxWidth 选项,控制输入框最大宽度 +- 弹幕库添加 mount 选项,控制输入框自定义挂载位置 +- 弹幕库添加 beforeEmit 选项,控制弹幕发送前的校验 +- 弹幕库添加 theme 选项,控制输入框自定义挂载的主题色 ## [4.4.0] - 2022-05-15 ### Added -- 设置面板支持 switch 和 onSwitch 选项 -- 弹幕库插件添加设置面板和弹幕发送 -- 弹幕库的选项添加默认模式和默认字号 -- 弹幕库字号支持按播放器的百分百 -- 修复翻转设置的图标缺失 -- 默认播放器获取了焦点后,不会自动隐藏控制栏 -- 删除字幕开关按钮,需要自行配置字幕开关 +- 设置面板支持 switch 和 onSwitch 选项 +- 弹幕库插件添加设置面板和弹幕发送 +- 弹幕库的选项添加默认模式和默认字号 +- 弹幕库字号支持按播放器的百分百 +- 修复翻转设置的图标缺失 +- 默认播放器获取了焦点后,不会自动隐藏控制栏 +- 删除字幕开关按钮,需要自行配置字幕开关 diff --git a/README.md b/README.md index 8e4f16207..533545b30 100644 --- a/README.md +++ b/README.md @@ -95,33 +95,33 @@ var art = new Artplayer({ ## Plugins -- [artplayer-plugin-danmuku](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js&example=danmuku) -- [artplayer-plugin-danmuku-mask](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js%0A./uncompiled/artplayer-plugin-danmuku-mask/index.js&example=danmuku.mask) (WIP) -- [artplayer-plugin-ads](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-ads/index.js&example=ads) (WIP) -- [artplayer-plugin-iframe](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-iframe/index.js&example=iframe) -- [artplayer-plugin-hls-control](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.5.17/hls.min.js%0A./uncompiled/artplayer-plugin-hls-control/index.js&example=hls.control) -- [artplayer-plugin-dash-control](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.5.2/dash.all.min.js%0A./uncompiled/artplayer-plugin-dash-control/index.js&example=dash.control) -- [artplayer-plugin-vtt-thumbnail](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-vtt-thumbnail/index.js&example=vtt.thumbnail) -- [artplayer-plugin-multiple-subtitles](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-multiple-subtitles/index.js&example=multiple.subtitles) -- [artplayer-plugin-libass](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-libass/index.js&example=libass) -- [artplayer-plugin-chromecast](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chromecast/index.js&example=chromecast) -- [artplayer-plugin-vast](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-vast/index.js&example=vast) -- [artplayer-plugin-chapter](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chapter/index.js&example=chapter) -- [artplayer-plugin-auto-thumbnail](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-auto-thumbnail/index.js&example=auto.thumbnail) -- [artplayer-plugin-ambilight](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-ambilight/index.js&example=ambilight) +- [artplayer-plugin-danmuku](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js&example=danmuku) +- [artplayer-plugin-danmuku-mask](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js%0A./uncompiled/artplayer-plugin-danmuku-mask/index.js&example=danmuku.mask) (WIP) +- [artplayer-plugin-ads](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-ads/index.js&example=ads) (WIP) +- [artplayer-plugin-iframe](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-iframe/index.js&example=iframe) +- [artplayer-plugin-hls-control](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.5.17/hls.min.js%0A./uncompiled/artplayer-plugin-hls-control/index.js&example=hls.control) +- [artplayer-plugin-dash-control](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.5.2/dash.all.min.js%0A./uncompiled/artplayer-plugin-dash-control/index.js&example=dash.control) +- [artplayer-plugin-vtt-thumbnail](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-vtt-thumbnail/index.js&example=vtt.thumbnail) +- [artplayer-plugin-multiple-subtitles](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-multiple-subtitles/index.js&example=multiple.subtitles) +- [artplayer-plugin-libass](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-libass/index.js&example=libass) +- [artplayer-plugin-chromecast](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chromecast/index.js&example=chromecast) +- [artplayer-plugin-vast](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-vast/index.js&example=vast) +- [artplayer-plugin-chapter](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chapter/index.js&example=chapter) +- [artplayer-plugin-auto-thumbnail](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-auto-thumbnail/index.js&example=auto.thumbnail) +- [artplayer-plugin-ambilight](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-ambilight/index.js&example=ambilight) ## Libraries -- [hls.js](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.5.17/hls.min.js&example=hls) -- [dash.js](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.5.2/dash.all.min.js&example=dash) -- [flv.js](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.6.2/flv.min.js&example=flv) -- [mpegts.js](https://artplayer.org/?libs=https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3/dist/mpegts.min.js&example=mpegts) -- [webtorrent.js](https://artplayer.org/?libs=https://cdn.jsdelivr.net/npm/webtorrent@1/webtorrent.min.js&example=webtorrent) +- [hls.js](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.5.17/hls.min.js&example=hls) +- [dash.js](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.5.2/dash.all.min.js&example=dash) +- [flv.js](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.6.2/flv.min.js&example=flv) +- [mpegts.js](https://artplayer.org/?libs=https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3/dist/mpegts.min.js&example=mpegts) +- [webtorrent.js](https://artplayer.org/?libs=https://cdn.jsdelivr.net/npm/webtorrent@1/webtorrent.min.js&example=webtorrent) ## Proxys -- [Canvas](https://artplayer.org/?libs=./uncompiled/artplayer-proxy-canvas/index.js&example=canvas) -- [WebAV](https://artplayer.org/?libs=./uncompiled/artplayer-proxy-webav/index.js&example=webav) (WIP) +- [Canvas](https://artplayer.org/?libs=./uncompiled/artplayer-proxy-canvas/index.js&example=canvas) +- [WebAV](https://artplayer.org/?libs=./uncompiled/artplayer-proxy-webav/index.js&example=webav) (WIP) ## Changelog @@ -137,8 +137,8 @@ We accept donations through these channels: ![pay](./images/pay.png) -- [Patreon](https://www.patreon.com/artplayer) -- [Paypal](https://www.paypal.me/harveyzack) +- [Patreon](https://www.patreon.com/artplayer) +- [Paypal](https://www.paypal.me/harveyzack) ## QQ Group diff --git a/docs/compiled/artplayer-plugin-ads.js b/docs/compiled/artplayer-plugin-ads.js index e3a334731..744ac59a0 100644 --- a/docs/compiled/artplayer-plugin-ads.js +++ b/docs/compiled/artplayer-plugin-ads.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a[t]&&a[t],o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(n,l){if(!o[n]){if(!e[n]){var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var s=Error("Cannot find module '"+n+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},c.cache={};var u=o[n]=new p.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:p(n)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=o,p.parent=r,p.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(p,"root",{get:function(){return a[t]}}),a[t]=p;for(var s=0;sr);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{!function(e){let{version:n,utils:{errorHandle:l}}=e.constructor,t=n.split(".").map(Number);l(t[0]+t[1]/100>=5,`Artplayer.js@${n} is not compatible the artplayerPluginAds@${r.version}. Please update it to version Artplayer.js@5.x.x`)}(n);let{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:o,loading:d},constructor:{validator:p,utils:{query:s,append:u,setStyle:c}}}=n;e=p({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let y=null,f=null,g=null,m=null,x=null,v=null,h=0,b=null,w=!1,j=!1,D=!1;function P(e,n){return n.replace("%s",e)}function $(){w=!0,n.play(),e.video&&y.pause(),c(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function k(){w||(b=setTimeout(()=>{h+=1;let n=e.playDuration-h;n>=1?g.innerHTML=P(n,e.i18n.canBeClosed):(g.innerHTML=e.i18n.close,D||(D=!0)),m.innerHTML=P(e.totalDuration-h,e.i18n.countdown),h>=e.totalDuration?$():k()},1e3))}function A(){w||clearTimeout(b)}function O(){j||(j=!0,function(){n.template.$ads=u(l,'
'),y=u(n.template.$ads,e.video?``:`
${e.html}
`),v=u(n.template.$ads,'
'),u(v,d),g=s(".artplayer-plugin-ads-close",f=u(n.template.$ads,`
${e.playDuration<=0?e.i18n.close:P(e.playDuration,e.i18n.canBeClosed)}
${P(e.totalDuration,e.i18n.countdown)}
`)),m=s(".artplayer-plugin-ads-countdown",f),e.playDuration>=e.totalDuration&&c(g,"display","none"),n.proxy(g,"click",()=>{D&&$()});let r=s(".artplayer-plugin-ads-detail",x=u(n.template.$ads,`
${e.i18n.detail}
`)),p=s(".artplayer-plugin-ads-muted",x),h=s(".artplayer-plugin-ads-fullscreen",x);if(e.url?n.proxy(r,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):c(r,"display","none"),e.video){let l=u(p,t),a=u(p,i);c(a,"display","none"),e.muted&&(y.muted=!0,c(l,"display","none"),c(a,"display","inline-flex")),n.proxy(p,"click",()=>{y.muted=!y.muted,y.muted?(c(l,"display","none"),c(a,"display","inline-flex")):(c(l,"display","inline-flex"),c(a,"display","none"))})}else c(p,"display","none");let b=u(h,a),w=u(h,o);c(w,"display","none"),n.proxy(h,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(c(b,"display","inline-flex"),c(w,"display","none")):(c(b,"display","none"),c(w,"display","inline-flex"))}),n.proxy(y,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(y,"error",$),n.proxy(y,"loadedmetadata",()=>{k(),y.play(),c(f,"display","flex"),c(x,"display","flex"),c(v,"display","none")})):(k(),c(f,"display","flex"),c(x,"display","flex"),c(v,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?A():k()}))}return n.on("ready",()=>{n.once("play",O),n.once("video:playing",O)}),{name:"artplayerPluginAds",skip:$,pause:A,play:k}}}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){let e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginAds=r)},{"bundle-text:./style.less":"jDrWj","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jDrWj:[function(e,n,l){n.exports=".artplayer-plugin-ads{z-index:150;color:#fff;background-color:#000;width:100%;height:100%;font-size:13px;line-height:1;position:absolute;inset:0;overflow:hidden}.artplayer-plugin-ads .artplayer-plugin-ads-html{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-video{width:100%;height:100%}.artplayer-plugin-ads .artplayer-plugin-ads-timer{display:none;position:absolute;top:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-timer>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}"},{}],"9pCYc":[function(e,n,l){l.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},l.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.exportAll=function(e,n){return Object.keys(e).forEach(function(l){"default"===l||"__esModule"===l||Object.prototype.hasOwnProperty.call(n,l)||Object.defineProperty(n,l,{enumerable:!0,get:function(){return e[l]}})}),n},l.export=function(e,n,l){Object.defineProperty(e,n,{enumerable:!0,get:l})}},{}]},["hUYA0"],"hUYA0","parcelRequire4dc0"); \ No newline at end of file +!function(e,n,l,t,i,r,a,o){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[t]&&d[t],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function y(n,l){if(!u[n]){if(!e[n]){if(i[n])return i[n];var r="function"==typeof d[t]&&d[t];if(!l&&r)return r(n,!0);if(p)return p(n,!0);if(c&&"string"==typeof n)return c(n);var a=Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},s.cache={};var o=u[n]=new y.Module(n);e[n][0].call(o.exports,s,o,o.exports,d)}return u[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:y(n)}}y.isParcelRequire=!0,y.Module=function(e){this.id=e,this.bundle=y,this.require=c,this.exports={}},y.modules=e,y.cache=u,y.parent=p,y.distDir=void 0,y.publicUrl=void 0,y.devServer=void 0,y.i=s,y.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(y,"root",{get:function(){return d[t]}}),d[t]=y;for(var f=0;fo);var r=e("bundle-text:./style.less"),a=i.interopDefault(r);function o(e){return n=>{let{version:l,utils:{errorHandle:t}}=n.constructor,i=l.split(".").map(Number);t(i[0]+i[1]/100>=5,`Artplayer.js@${l} is not compatible the artplayerPluginAds@${o.version}. Please update it to version Artplayer.js@5.x.x`);let{template:{$player:r},icons:{volume:a,volumeClose:d,fullscreenOn:p,fullscreenOff:s,loading:u},constructor:{validator:c,utils:{query:y,append:f,setStyle:g}}}=n;e=c({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let m=null,v=null,x=null,h=null,b=null,w=null,j=0,D=null,P=!1,$=!1,k=!1;function A(e,n){return n.replace("%s",e)}function O(){P=!0,n.play(),e.video&&m.pause(),g(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function C(){P||(D=setTimeout(()=>{j+=1;let n=e.playDuration-j;n>=1?x.innerHTML=A(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,k||(k=!0)),h.innerHTML=A(e.totalDuration-j,e.i18n.countdown),j>=e.totalDuration?O():C()},1e3))}function M(){P||clearTimeout(D)}function T(){$||($=!0,function(){n.template.$ads=f(r,'
'),m=f(n.template.$ads,e.video?``:`
${e.html}
`),w=f(n.template.$ads,'
'),f(w,u),x=y(".artplayer-plugin-ads-close",v=f(n.template.$ads,`
${e.playDuration<=0?e.i18n.close:A(e.playDuration,e.i18n.canBeClosed)}
${A(e.totalDuration,e.i18n.countdown)}
`)),h=y(".artplayer-plugin-ads-countdown",v),e.playDuration>=e.totalDuration&&g(x,"display","none"),n.proxy(x,"click",()=>{k&&O()});let l=y(".artplayer-plugin-ads-detail",b=f(n.template.$ads,`
${e.i18n.detail}
`)),t=y(".artplayer-plugin-ads-muted",b),i=y(".artplayer-plugin-ads-fullscreen",b);if(e.url?n.proxy(l,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):g(l,"display","none"),e.video){let l=f(t,a),i=f(t,d);g(i,"display","none"),e.muted&&(m.muted=!0,g(l,"display","none"),g(i,"display","inline-flex")),n.proxy(t,"click",()=>{m.muted=!m.muted,m.muted?(g(l,"display","none"),g(i,"display","inline-flex")):(g(l,"display","inline-flex"),g(i,"display","none"))})}else g(t,"display","none");let o=f(i,p),c=f(i,s);g(c,"display","none"),n.proxy(i,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(g(o,"display","inline-flex"),g(c,"display","none")):(g(o,"display","none"),g(c,"display","inline-flex"))}),n.proxy(m,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(m,"error",O),n.proxy(m,"loadedmetadata",()=>{C(),m.play(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")})):(C(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?M():C()}))}return n.on("ready",()=>{n.once("play",T),n.once("video:playing",T)}),{name:"artplayerPluginAds",skip:O,pause:M,play:C}}}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){let e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginAds=o)},{"bundle-text:./style.less":"jDrWj","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jDrWj:[function(e,n,l,t){n.exports=".artplayer-plugin-ads{z-index:150;color:#fff;background-color:#000;width:100%;height:100%;font-size:13px;line-height:1;position:absolute;inset:0;overflow:hidden}.artplayer-plugin-ads .artplayer-plugin-ads-html{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-video{width:100%;height:100%}.artplayer-plugin-ads .artplayer-plugin-ads-timer{display:none;position:absolute;top:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-timer>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}"},{}],"9pCYc":[function(e,n,l,t){l.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},l.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.exportAll=function(e,n){return Object.keys(e).forEach(function(l){"default"===l||"__esModule"===l||Object.prototype.hasOwnProperty.call(n,l)||Object.defineProperty(n,l,{enumerable:!0,get:function(){return e[l]}})}),n},l.export=function(e,n,l){Object.defineProperty(e,n,{enumerable:!0,get:l})}},{}]},["hUYA0"],"hUYA0","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-ads.legacy.js b/docs/compiled/artplayer-plugin-ads.legacy.js index 1080ef076..7815d74ac 100644 --- a/docs/compiled/artplayer-plugin-ads.legacy.js +++ b/docs/compiled/artplayer-plugin-ads.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,n,t,r,l){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[r]&&i[r],o=a.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(n,t){if(!o[n]){if(!e[n]){var l="function"==typeof i[r]&&i[r];if(!t&&l)return l(n,!0);if(a)return a(n,!0);if(s&&"string"==typeof n)return s(n);var p=Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}c.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},c.cache={};var u=o[n]=new d.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:d(n)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=o,d.parent=a,d.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var p=0;p=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginAds@").concat(o.version,". Please update it to version Artplayer.js@5.x.x"));var t,r,i,a=n.template.$player,s=n.icons,d=s.volume,p=s.volumeClose,u=s.fullscreenOn,c=s.fullscreenOff,f=s.loading,y=n.constructor,g=y.validator,m=y.utils,v=m.query,h=m.append,x=m.setStyle;e=g((0,l._)({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"}},e),{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});var b=null,w=null,j=null,_=null,D=null,O=null,P=0,k=null,A=!1,I=!1,M=!1;function C(e,n){return n.replace("%s",e)}function L(){A=!0,n.play(),e.video&&b.pause(),x(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function T(){A||(k=setTimeout(function(){P+=1;var n=e.playDuration-P;n>=1?j.innerHTML=C(n,e.i18n.canBeClosed):(j.innerHTML=e.i18n.close,M||(M=!0)),_.innerHTML=C(e.totalDuration-P,e.i18n.countdown),P>=e.totalDuration?L():T()},1e3))}function F(){A||clearTimeout(k)}function U(){I||(I=!0,function(){n.template.$ads=h(a,'
'),b=h(n.template.$ads,e.video?''):'
'.concat(e.html,"
")),O=h(n.template.$ads,'
'),h(O,f),j=v(".artplayer-plugin-ads-close",w=h(n.template.$ads,'
\n
'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'
\n
').concat(C(e.totalDuration,e.i18n.countdown),"
\n
"))),_=v(".artplayer-plugin-ads-countdown",w),e.playDuration>=e.totalDuration&&x(j,"display","none"),n.proxy(j,"click",function(){M&&L()});var t=v(".artplayer-plugin-ads-detail",D=h(n.template.$ads,'
\n
'.concat(e.i18n.detail,'
\n
\n
\n
'))),r=v(".artplayer-plugin-ads-muted",D),l=v(".artplayer-plugin-ads-fullscreen",D);if(e.url?n.proxy(t,"click",function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)}):x(t,"display","none"),e.video){var i=h(r,d),o=h(r,p);x(o,"display","none"),e.muted&&(b.muted=!0,x(i,"display","none"),x(o,"display","inline-flex")),n.proxy(r,"click",function(){b.muted=!b.muted,b.muted?(x(i,"display","none"),x(o,"display","inline-flex")):(x(i,"display","inline-flex"),x(o,"display","none"))})}else x(r,"display","none");var s=h(l,u),y=h(l,c);x(y,"display","none"),n.proxy(l,"click",function(){n.fullscreen=!n.fullscreen,n.fullscreen?(x(s,"display","inline-flex"),x(y,"display","none")):(x(s,"display","none"),x(y,"display","inline-flex"))}),n.proxy(b,"click",function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(b,"error",L),n.proxy(b,"loadedmetadata",function(){T(),b.play(),x(w,"display","flex"),x(D,"display","flex"),x(O,"display","none")})):(T(),x(w,"display","flex"),x(D,"display","flex"),x(O,"display","none")),n.proxy(document,"visibilitychange",function(){document.hidden?F():T()}))}return n.on("ready",function(){n.once("play",U),n.once("video:playing",U)}),{name:"artplayerPluginAds",skip:L,pause:F,play:T}}}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){var s=document.createElement("style");s.id="artplayer-plugin-ads",s.textContent=a.default,document.head.appendChild(s)}"undefined"!=typeof window&&(window.artplayerPluginAds=o)},{"@swc/helpers/_/_object_spread":"9agdF","bundle-text:./style.less":"1LZhU","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"_",function(){return i});var l=e("./_define_property.js");function i(e){for(var n=1;ndiv{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}"},{}]},["69VIU"],"69VIU","parcelRequire4dc0"); \ No newline at end of file +!function(e,n,t,r,l,i,a,o){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof s[r]&&s[r],p=d.i||{},u=d.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(n,t){if(!u[n]){if(!e[n]){if(l[n])return l[n];var i="function"==typeof s[r]&&s[r];if(!t&&i)return i(n,!0);if(d)return d(n,!0);if(c&&"string"==typeof n)return c(n);var a=Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}p.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},p.cache={};var o=u[n]=new f.Module(n);e[n][0].call(o.exports,p,o,o.exports,s)}return u[n].exports;function p(e){var n=p.resolve(e);return!1===n?{}:f(n)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=u,f.parent=d,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=p,f.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(f,"root",{get:function(){return s[r]}}),s[r]=f;for(var y=0;y=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginAds@").concat(s.version,". Please update it to version Artplayer.js@5.x.x"));var t,r,l,a=n.template.$player,o=n.icons,d=o.volume,p=o.volumeClose,u=o.fullscreenOn,c=o.fullscreenOff,f=o.loading,y=n.constructor,g=y.validator,m=y.utils,v=m.query,h=m.append,x=m.setStyle;e=g((0,i._)({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"}},e),{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});var b=null,w=null,j=null,D=null,_=null,O=null,P=0,k=null,A=!1,I=!1,M=!1;function C(e,n){return n.replace("%s",e)}function L(){A=!0,n.play(),e.video&&b.pause(),x(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function T(){A||(k=setTimeout(function(){P+=1;var n=e.playDuration-P;n>=1?j.innerHTML=C(n,e.i18n.canBeClosed):(j.innerHTML=e.i18n.close,M||(M=!0)),D.innerHTML=C(e.totalDuration-P,e.i18n.countdown),P>=e.totalDuration?L():T()},1e3))}function U(){A||clearTimeout(k)}function F(){I||(I=!0,function(){n.template.$ads=h(a,'
'),b=h(n.template.$ads,e.video?''):'
'.concat(e.html,"
")),O=h(n.template.$ads,'
'),h(O,f),j=v(".artplayer-plugin-ads-close",w=h(n.template.$ads,'
\n
'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'
\n
').concat(C(e.totalDuration,e.i18n.countdown),"
\n
"))),D=v(".artplayer-plugin-ads-countdown",w),e.playDuration>=e.totalDuration&&x(j,"display","none"),n.proxy(j,"click",function(){M&&L()});var t=v(".artplayer-plugin-ads-detail",_=h(n.template.$ads,'
\n
'.concat(e.i18n.detail,'
\n
\n
\n
'))),r=v(".artplayer-plugin-ads-muted",_),l=v(".artplayer-plugin-ads-fullscreen",_);if(e.url?n.proxy(t,"click",function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)}):x(t,"display","none"),e.video){var i=h(r,d),o=h(r,p);x(o,"display","none"),e.muted&&(b.muted=!0,x(i,"display","none"),x(o,"display","inline-flex")),n.proxy(r,"click",function(){b.muted=!b.muted,b.muted?(x(i,"display","none"),x(o,"display","inline-flex")):(x(i,"display","inline-flex"),x(o,"display","none"))})}else x(r,"display","none");var s=h(l,u),y=h(l,c);x(y,"display","none"),n.proxy(l,"click",function(){n.fullscreen=!n.fullscreen,n.fullscreen?(x(s,"display","inline-flex"),x(y,"display","none")):(x(s,"display","none"),x(y,"display","inline-flex"))}),n.proxy(b,"click",function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(b,"error",L),n.proxy(b,"loadedmetadata",function(){T(),b.play(),x(w,"display","flex"),x(_,"display","flex"),x(O,"display","none")})):(T(),x(w,"display","flex"),x(_,"display","flex"),x(O,"display","none")),n.proxy(document,"visibilitychange",function(){document.hidden?U():T()}))}return n.on("ready",function(){n.once("play",F),n.once("video:playing",F)}),{name:"artplayerPluginAds",skip:L,pause:U,play:T}}}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){var d=document.createElement("style");d.id="artplayer-plugin-ads",d.textContent=o.default,document.head.appendChild(d)}"undefined"!=typeof window&&(window.artplayerPluginAds=s)},{"@swc/helpers/_/_object_spread":"9agdF","bundle-text:./style.less":"1LZhU","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,n,t,r){var l=e("@parcel/transformer-js/src/esmodule-helpers.js");l.defineInteropFlag(t),l.export(t,"_",function(){return a});var i=e("./_define_property.js");function a(e){for(var n=1;ndiv{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}"},{}]},["69VIU"],"69VIU","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-ambilight.js b/docs/compiled/artplayer-plugin-ambilight.js index 3e405f004..9f24a629c 100644 --- a/docs/compiled/artplayer-plugin-ambilight.js +++ b/docs/compiled/artplayer-plugin-ambilight.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof i[r]&&i[r],l=u.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,n){if(!l[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(u)return u(t,!0);if(f&&"string"==typeof t)return f(t);var d=Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},p.cache={};var c=l[t]=new a.Module(t);e[t][0].call(c.exports,p,c,c.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=l,a.parent=u,a.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(a,"root",{get:function(){return i[r]}}),i[r]=a;for(var d=0;d{let{$video:n}=t.template,{createElement:r,addClass:o,setStyles:i}=t.constructor.utils,{blur:u="50px",opacity:l=.5,frequency:f=10,duration:a=.3}=e,d=r("div"),c=(d.innerHTML=Array(9).fill("
").join(""),Array.from(d.children));o(d,"artplayer-plugin-ambilight"),n.parentNode.insertBefore(d,n),i(d,{position:"absolute",top:0,left:0,zIndex:9,inset:0,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr 1fr"}),function(e,t,n,r){e.forEach(e=>{i(e,{opacity:n,filter:`blur(${t})`,transition:`background-color ${r}s ease`})})}(c,u,l,a);let p=function(e,n,o){let i=r("canvas"),u=i.getContext("2d");i.width=3,i.height=3;let l=0;return function r(){let i=performance.now();if(i-l<1e3/o||!t.playing){s=requestAnimationFrame(r);return}l=i;let f=e.videoWidth/3,a=e.videoHeight/3,d=[[0,0],[f,0],[2*f,0],[0,a],[f,a],[2*f,a],[0,2*a],[f,2*a],[2*f,2*a]].map(([t,n])=>(function(t,n,r,o){u.drawImage(e,t,n,r,o,0,0,1,1);let[i,l,f]=u.getImageData(0,0,1,1).data;return`rgb(${i}, ${l}, ${f})`})(t,n,f,a));n.forEach((e,t)=>{e.style.backgroundColor=d[t]}),s=requestAnimationFrame(r)}}(n,c,f),s=null;function m(){s||p()}function g(){s&&(cancelAnimationFrame(s),s=null)}return t.on("ready",m),t.on("destroy",g),{name:"artplayerPluginAmbilight",start:m,stop:g}}}r.defineInteropFlag(n),r.export(n,"default",()=>o),"undefined"!=typeof window&&(window.artplayerPluginAmbilight=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["4TtJY"],"4TtJY","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,n,o,i,u,l){var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof f[n]&&f[n],d=a.i||{},c=a.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(r,t){if(!c[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof f[n]&&f[n];if(!t&&i)return i(r,!0);if(a)return a(r,!0);if(p&&"string"==typeof r)return p(r);var u=Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},d.cache={};var l=c[r]=new s.Module(r);e[r][0].call(l.exports,d,l,l.exports,f)}return c[r].exports;function d(e){var r=d.resolve(e);return!1===r?{}:s(r)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.require=p,this.exports={}},s.modules=e,s.cache=c,s.parent=a,s.distDir=void 0,s.publicUrl=void 0,s.devServer=void 0,s.i=d,s.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return f[n]}}),f[n]=s;for(var m=0;m{var t,n,o,i,u,l,f;let{$video:a}=r.template,{createElement:d,addClass:c,setStyles:p}=r.constructor.utils,{blur:s="50px",opacity:m=.5,frequency:g=10,duration:y=.3}=e,h=d("div"),b=((t=h).innerHTML=Array(9).fill("
").join(""),Array.from(t.children));n=h,o=a,c(n,"artplayer-plugin-ambilight"),o.parentNode.insertBefore(n,o),p(n,{position:"absolute",top:0,left:0,zIndex:9,inset:0,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr 1fr"}),i=b,u=s,l=m,f=y,i.forEach(e=>{p(e,{opacity:l,filter:`blur(${u})`,transition:`background-color ${f}s ease`})});let v=function(e,t,n){let o=d("canvas"),i=o.getContext("2d");o.width=3,o.height=3;let u=0;return function o(){let l=performance.now();if(l-u<1e3/n||!r.playing){w=requestAnimationFrame(o);return}u=l;let f=e.videoWidth/3,a=e.videoHeight/3,d=[[0,0],[f,0],[2*f,0],[0,a],[f,a],[2*f,a],[0,2*a],[f,2*a],[2*f,2*a]].map(([r,t])=>(function(r,t,n,o){i.drawImage(e,r,t,n,o,0,0,1,1);let[u,l,f]=i.getImageData(0,0,1,1).data;return`rgb(${u}, ${l}, ${f})`})(r,t,f,a));t.forEach((e,r)=>{e.style.backgroundColor=d[r]}),w=requestAnimationFrame(o)}}(a,b,g),w=null;function x(){w||v()}function j(){w&&(cancelAnimationFrame(w),w=null)}return r.on("ready",x),r.on("destroy",j),{name:"artplayerPluginAmbilight",start:x,stop:j}}}o.defineInteropFlag(t),o.export(t,"default",()=>i),"undefined"!=typeof window&&(window.artplayerPluginAmbilight=i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,r,t,n){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}]},["4TtJY"],"4TtJY","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-ambilight.legacy.js b/docs/compiled/artplayer-plugin-ambilight.legacy.js index 698a79374..6d71e7a2a 100644 --- a/docs/compiled/artplayer-plugin-ambilight.legacy.js +++ b/docs/compiled/artplayer-plugin-ambilight.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,r,t,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],l=i.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!l[r]){if(!e[r]){var o="function"==typeof a[n]&&a[n];if(!t&&o)return o(r,!0);if(i)return i(r,!0);if(s&&"string"==typeof r)return s(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},d.cache={};var c=l[r]=new u.Module(r);e[r][0].call(c.exports,d,c,c.exports,this)}return l[r].exports;function d(e){var r=d.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=l,u.parent=i,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return a[n]}}),a[n]=u;for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:{};return function(r){var t,n,a,i,l=r.template.$video,s=r.constructor.utils,u=s.createElement,f=s.addClass,c=s.setStyles,d=e.blur,p=e.opacity,m=e.frequency,y=e.duration,_=u("div"),h=(_.innerHTML=Array(9).fill("
").join(""),Array.from(_.children));f(_,"artplayer-plugin-ambilight"),l.parentNode.insertBefore(_,l),c(_,{position:"absolute",top:0,left:0,zIndex:9,inset:0,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr 1fr"}),function(e,r,t,n){e.forEach(function(e){c(e,{opacity:t,filter:"blur(".concat(r,")"),transition:"background-color ".concat(n,"s ease")})})}(h,void 0===d?"50px":d,void 0===p?.5:p,void 0===y?.3:y);var j=(t=void 0===m?10:m,a=(n=u("canvas")).getContext("2d"),n.width=3,n.height=3,i=0,function e(){var n=performance.now();if(n-i<1e3/t||!r.playing){v=requestAnimationFrame(e);return}i=n;var s=l.videoWidth/3,u=l.videoHeight/3,f=[[0,0],[s,0],[2*s,0],[0,u],[s,u],[2*s,u],[0,2*u],[s,2*u],[2*s,2*u]].map(function(e){var r,t,n,i,f=(0,o._)(e,2),c=f[0],d=f[1];return a.drawImage(l,c,d,s,u,0,0,1,1),t=(r=(0,o._)(a.getImageData(0,0,1,1).data,3))[0],n=r[1],i=r[2],"rgb(".concat(t,", ").concat(n,", ").concat(i,")")});h.forEach(function(e,r){e.style.backgroundColor=f[r]}),v=requestAnimationFrame(e)}),v=null;function g(){v||j()}function b(){v&&(cancelAnimationFrame(v),v=null)}return r.on("ready",g),r.on("destroy",b),{name:"artplayerPluginAmbilight",start:g,stop:b}}}"undefined"!=typeof window&&(window.artplayerPluginAmbilight=a)},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return s});var o=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),i=e("./_non_iterable_rest.js"),l=e("./_unsupported_iterable_to_array.js");function s(e,r){return(0,o._)(e)||(0,a._)(e,r)||(0,l._)(e,r)||(0,i._)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(Array.isArray(e))return e}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],loYCM:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(t=o.next()).done)&&(a.push(t.value),!r||a.length!==r);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(l)throw n}}return a}}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5m31D":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return a});var o=e("./_array_like_to_array.js");function a(e,r){if(e){if("string"==typeof e)return(0,o._)(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return(0,o._)(e,r)}}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t0&&void 0!==arguments[0]?arguments[0]:{};return function(r){var t,n,o,a,l,u,s,f,c,d,p,m,y,_=r.template.$video,h=r.constructor.utils,j=h.createElement,v=h.addClass,g=h.setStyles,b=e.blur,w=e.opacity,x=e.frequency,D=e.duration,A=j("div"),F=((t=A).innerHTML=Array(9).fill("
").join(""),Array.from(t.children));n=A,o=_,v(n,"artplayer-plugin-ambilight"),o.parentNode.insertBefore(n,o),g(n,{position:"absolute",top:0,left:0,zIndex:9,inset:0,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr 1fr"}),a=F,l=void 0===b?"50px":b,u=void 0===w?.5:w,s=void 0===D?.3:D,a.forEach(function(e){g(e,{opacity:u,filter:"blur(".concat(l,")"),transition:"background-color ".concat(s,"s ease")})});var I=(f=_,c=F,d=void 0===x?10:x,m=(p=j("canvas")).getContext("2d"),p.width=3,p.height=3,y=0,function e(){var t=performance.now();if(t-y<1e3/d||!r.playing){M=requestAnimationFrame(e);return}y=t;var n=f.videoWidth/3,o=f.videoHeight/3,a=[[0,0],[n,0],[2*n,0],[0,o],[n,o],[2*n,o],[0,2*o],[n,2*o],[2*n,2*o]].map(function(e){var r,t,a,l,u=(0,i._)(e,2),s=u[0],c=u[1];return m.drawImage(f,s,c,n,o,0,0,1,1),t=(r=(0,i._)(m.getImageData(0,0,1,1).data,3))[0],a=r[1],l=r[2],"rgb(".concat(t,", ").concat(a,", ").concat(l,")")});c.forEach(function(e,r){e.style.backgroundColor=a[r]}),M=requestAnimationFrame(e)}),M=null;function O(){M||I()}function W(){M&&(cancelAnimationFrame(M),M=null)}return r.on("ready",O),r.on("destroy",W),{name:"artplayerPluginAmbilight",start:O,stop:W}}}"undefined"!=typeof window&&(window.artplayerPluginAmbilight=a)},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return s});var i=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),l=e("./_non_iterable_rest.js"),u=e("./_unsupported_iterable_to_array.js");function s(e,r){return(0,i._)(e)||(0,a._)(e,r)||(0,u._)(e,r)||(0,l._)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){if(Array.isArray(e))return e}o.defineInteropFlag(t),o.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t,n){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],loYCM:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(t=o.next()).done)&&(i.push(t.value),!r||i.length!==r);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw n}}return i}}o.defineInteropFlag(t),o.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}o.defineInteropFlag(t),o.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5m31D":[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return a});var i=e("./_array_like_to_array.js");function a(e,r){if(e){if("string"==typeof e)return(0,i._)(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return(0,i._)(e,r)}}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t(t.on("video:loadedmetadata",()=>{let n=e.url||t.option.url,o=e.width||160,r=e.number||100,i=e.scale||1;!function({url:e,width:t,number:n},o){let r=document.createElement("video");r.crossOrigin="anonymous",r.src=e,r.onloadedmetadata=()=>{let e=r.duration,i=document.createElement("canvas"),u=i.getContext("2d"),l=Math.floor(t*r.videoHeight/r.videoWidth);i.width=10*t,i.height=l*Math.ceil(n/10);let f=0,d=null;!function a(c){i.toBlob(e=>{URL.revokeObjectURL(d),o({url:d=URL.createObjectURL(e),height:l})},"image/jpeg"),c>=n||(r.currentTime=e*c/n,r.onseeked=()=>{u.drawImage(r,c%10*t,Math.floor(c/10)*l,t,l),f++,a(c+1)})}(0)}}({url:n,width:o,number:r},e=>{t.thumbnails={...e,column:10,number:r,width:o,scale:i}})}),{name:"artplayerPluginAutoThumbnail"})}o.defineInteropFlag(n),o.export(n,"default",()=>r),"undefined"!=typeof window&&(window.artplayerPluginAutoThumbnail=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["gj1wy"],"gj1wy","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,o,r,i,u,l){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},f="function"==typeof d[o]&&d[o],a=f.i||{},c=f.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!c[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof d[o]&&d[o];if(!n&&i)return i(t,!0);if(f)return f(t,!0);if(s&&"string"==typeof t)return s(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}a.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},a.cache={};var l=c[t]=new p.Module(t);e[t][0].call(l.exports,a,l,l.exports,d)}return c[t].exports;function a(e){var t=a.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=s,this.exports={}},p.modules=e,p.cache=c,p.parent=f,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=a,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return d[o]}}),d[o]=p;for(var m=0;m(t.on("video:loadedmetadata",()=>{let n=e.url||t.option.url,o=e.width||160,r=e.number||100,i=e.scale||1;!function({url:e,width:t,number:n},o){let r=document.createElement("video");r.crossOrigin="anonymous",r.src=e,r.onloadedmetadata=()=>{let e=r.duration,i=document.createElement("canvas"),u=i.getContext("2d"),l=Math.floor(t*r.videoHeight/r.videoWidth);i.width=10*t,i.height=l*Math.ceil(n/10);let d=0,f=null;!function a(c){i.toBlob(e=>{URL.revokeObjectURL(f),o({url:f=URL.createObjectURL(e),height:l})},"image/jpeg"),c>=n||(r.currentTime=e*c/n,r.onseeked=()=>{u.drawImage(r,c%10*t,Math.floor(c/10)*l,t,l),d++,a(c+1)})}(0)}}({url:n,width:o,number:r},e=>{t.thumbnails={...e,column:10,number:r,width:o,scale:i}})}),{name:"artplayerPluginAutoThumbnail"})}r.defineInteropFlag(n),r.export(n,"default",()=>i),"undefined"!=typeof window&&(window.artplayerPluginAutoThumbnail=i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["gj1wy"],"gj1wy","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-auto-thumbnail.legacy.js b/docs/compiled/artplayer-plugin-auto-thumbnail.legacy.js index d87fb4953..88b0a720e 100644 --- a/docs/compiled/artplayer-plugin-auto-thumbnail.legacy.js +++ b/docs/compiled/artplayer-plugin-auto-thumbnail.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof i[n]&&i[n],a=c.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(r,t){if(!a[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(c)return c(r,!0);if(u&&"string"==typeof r)return u(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},p.cache={};var l=a[r]=new s.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return a[r].exports;function p(e){var r=p.resolve(e);return!1===r?{}:s(r)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=a,s.parent=c,s.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return i[n]}}),i[n]=s;for(var f=0;f=u||(s.currentTime=e*l/u,s.onseeked=function(){t.drawImage(s,l%10*a,Math.floor(l/10)*o,a,o),i++,f(l+1)})}(0)}}),[2,{name:"artplayerPluginAutoThumbnail"}]})}),function(e){return r.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginAutoThumbnail=u)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r,t,n,o,i,c){try{var a=e[i](c),u=a.value}catch(e){t(e);return}a.done?r(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var c=e.apply(r,t);function a(e){o(c,n,i,a,u,"next",e)}function u(e){o(c,n,i,a,u,"throw",e)}a(void 0)})}}n.defineInteropFlag(t),n.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],"9agdF":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return i});var o=e("./_define_property.js");function i(e){for(var r=1;rr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function s(e,r,t,n){var o,i=arguments.length,c=i<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,r,t,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(r,t,c):o(r,t))||c);return i>3&&c&&Object.defineProperty(r,t,c),c}function f(e,r){return function(t,n){r(t,n,e)}}function l(e,r,t,n,o,i){function c(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=n.kind,s="getter"===u?"get":"setter"===u?"set":"value",f=!r&&e?n.static?e:e.prototype:null,l=r||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=t.length-1;d>=0;d--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(c(e||null))};var h=(0,t[d])("accessor"===u?{get:l.get,set:l.set}:l[s],y);if("accessor"===u){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(a=c(h.get))&&(l.get=a),(a=c(h.set))&&(l.set=a),(a=c(h.init))&&o.unshift(a)}else(a=c(h))&&("field"===u?o.unshift(a):l[s]=a)}f&&Object.defineProperty(f,n.name,l),p=!0}function p(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),c=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return c}function g(){for(var e=[],r=0;r1||a(e,r)})},r&&(n[e]=r(n[e])))}function a(e,r){try{var t;(t=o[e](r)).value instanceof P?Promise.resolve(t.value.v).then(u,s):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function u(e){a("next",e)}function s(e){a("throw",e)}function f(e,r){e(r),i.shift(),i.length&&a(i[0][0],i[0][1])}}function E(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:P(e[n](r)),done:!1}:o?o(r):r}:o}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=j(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){!function(e,r,t,n){Promise.resolve(n).then(function(r){e({value:r,done:t})},r)}(n,o,(r=e[t](r)).done,r.value)})}}}function I(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var T=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r};function F(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&m(r,e,t);return T(r,e),r}function R(e){return e&&e.__esModule?e:{default:e}}function k(e,r,t,n){if("a"===t&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function A(e,r,t,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!o:!r.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,t):o?o.value=t:r.set(e,t),t}function M(e,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?r===e:e.has(r)}function N(e,r,t){if(null!=r){var n,o;if("object"!=typeof r&&"function"!=typeof r)throw TypeError("Object expected.");if(t){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=r[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=r[Symbol.dispose],t&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:r,dispose:n,async:t})}else t&&e.stack.push({async:!0});return r}var W="function"==typeof SuppressedError?SuppressedError:function(e,r,t){var n=Error(t);return n.name="SuppressedError",n.error=e,n.suppressed=r,n};function C(e){function r(r){e.error=e.hasError?new W(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}var t,n=0;return function o(){for(;t=e.stack.pop();)try{if(!t.async&&1===n)return n=0,e.stack.push(t),Promise.resolve().then(o);if(t.dispose){var i=t.dispose.call(t.value);if(t.async)return n|=2,Promise.resolve(i).then(o,function(e){return r(e),o()})}else n|=1}catch(e){r(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function L(e,r){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,t,n,o,i){return t?r?".jsx":".js":!n||o&&i?n+o+"."+i.toLowerCase()+"js":e}):e}t.default={__extends:c,__assign:a,__rest:u,__decorate:s,__param:f,__esDecorate:l,__runInitializers:p,__propKey:d,__setFunctionName:y,__metadata:_,__awaiter:h,__generator:b,__createBinding:m,__exportStar:v,__values:j,__read:w,__spread:g,__spreadArrays:O,__spreadArray:x,__await:P,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:D,__makeTemplateObject:I,__importStar:F,__importDefault:R,__classPrivateFieldGet:k,__classPrivateFieldSet:A,__classPrivateFieldIn:M,__addDisposableResource:N,__disposeResources:C,__rewriteRelativeImportExtension:L}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["htF8d"],"htF8d","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,n,o,i,c,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[n]&&a[n],f=s.i||{},l=s.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(r,t){if(!l[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof a[n]&&a[n];if(!t&&i)return i(r,!0);if(s)return s(r,!0);if(p&&"string"==typeof r)return p(r);var c=Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var u=l[r]=new d.Module(r);e[r][0].call(u.exports,f,u,u.exports,a)}return l[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:d(r)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=l,d.parent=s,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return a[n]}}),a[n]=d;for(var _=0;_=a||(s.currentTime=e*l/a,s.onseeked=function(){t.drawImage(s,l%10*i,Math.floor(l/10)*o,i,o),c++,f(l+1)})}(0)}}),[2,{name:"artplayerPluginAutoThumbnail"}]})}),function(e){return r.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginAutoThumbnail=s)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r,t,n,o,i,c){try{var u=e[i](c),a=u.value}catch(e){t(e);return}u.done?r(a):Promise.resolve(a).then(n,o)}function c(e){return function(){var r=this,t=arguments;return new Promise(function(n,o){var c=e.apply(r,t);function u(e){i(c,n,o,u,a,"next",e)}function a(e){i(c,n,o,u,a,"throw",e)}u(void 0)})}}o.defineInteropFlag(t),o.export(t,"_",function(){return c})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t,n){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],"9agdF":[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return c});var i=e("./_define_property.js");function c(e){for(var r=1;rr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function f(e,r,t,n){var o,c=arguments.length,u=c<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,r,t,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(u=(c<3?o(u):c>3?o(r,t,u):o(r,t))||u);return c>3&&u&&Object.defineProperty(r,t,u),u}function l(e,r){return function(t,n){r(t,n,e)}}function p(e,r,t,n,o,c){function u(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,s=n.kind,f="getter"===s?"get":"setter"===s?"set":"value",l=!r&&e?n.static?e:e.prototype:null,p=r||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,_=t.length-1;_>=0;_--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");c.push(u(e||null))};var v=(0,t[_])("accessor"===s?{get:p.get,set:p.set}:p[f],y);if("accessor"===s){if(void 0===v)continue;if(null===v||(void 0===v?"undefined":(0,i._)(v))!=="object")throw TypeError("Object expected");(a=u(v.get))&&(p.get=a),(a=u(v.set))&&(p.set=a),(a=u(v.init))&&o.unshift(a)}else(a=u(v))&&("field"===s?o.unshift(a):p[f]=a)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),c=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return c}function O(){for(var e=[],r=0;r1||u(e,r)})},r&&(n[e]=r(n[e])))}function u(e,r){try{var t;(t=o[e](r)).value instanceof S?Promise.resolve(t.value.v).then(a,s):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function a(e){u("next",e)}function s(e){u("throw",e)}function f(e,r){e(r),i.shift(),i.length&&u(i[0][0],i[0][1])}}function D(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:S(e[n](r)),done:!1}:o?o(r):r}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=w(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){var i,c,u;i=n,c=o,u=(r=e[t](r)).done,Promise.resolve(r.value).then(function(e){i({value:e,done:u})},c)})}}}function T(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var F=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r},R=function(e){return(R=Object.getOwnPropertyNames||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)};function k(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t=R(e),n=0;ni);var n=e("bundle-text:./style.less"),o=a.interopDefault(n);function i(e={}){return t=>{let{$player:r}=t.template,{setStyle:a,append:n,clamp:o,query:i,isMobile:l,addClass:d,removeClass:p}=t.constructor.utils,s=`
`,u=null,c=[],f=t.query(".art-control-progress"),h=t.query(".art-control-progress-inner"),g=n(h,'
'),y=n(h,'
');function m({$chapter:e,width:t}){let r=e.dataset.title.trim();if(r){a(y,"display","flex"),y.innerText=r;let e=y.clientWidth;t<=e/2?a(y,"left",0):t>h.clientWidth-e/2?a(y,"left",`${h.clientWidth-e}px`):a(y,"left",`${t-e/2}px`)}else a(y,"display","none")}function v(e=[]){if(c=[],g.innerText="",p(r,"artplayer-plugin-chapter"),Array.isArray(e)&&e.length&&t.duration){e=e.sort((e,t)=>e.start-t.start);for(let r=0;rt.duration||a.start>=a.end||n&&a.end>n.start)throw Error("Illegal chapter time point")}e[0].start>0&&e.unshift({start:0,end:e[0].start,title:""}),e[e.length-1].end{let r=n(g,s),a=o(e.start,0,t.duration),l=o(e.end,0,t.duration),d=l-a,p=d/t.duration;return r.dataset.start=a,r.dataset.end=l,r.dataset.duration=d,r.dataset.title=e.title.trim(),r.style.width=`${100*p}%`,{$chapter:r,$hover:i(".art-progress-hover",r),$loaded:i(".art-progress-loaded",r),$played:i(".art-progress-played",r)}}),d(r,"artplayer-plugin-chapter"),t.emit("setBar","loaded",t.loaded||0)}}return t.on("setBar",(e,r,n)=>{if(c.length)for(let o=0;ow&&a(f,"width","100%"),v>=x&&v<=w){let t=(v-x)/b;a(f,"width",`${100*t}%`),l?"played"===e&&n&&(m({$chapter:i,width:h}),clearTimeout(u),u=setTimeout(()=>{a(y,"display","none")},500)):"hover"===e&&m({$chapter:i,width:h})}}}),l||t.proxy(f,"mouseleave",()=>{c.length&&a(y,"display","none")}),t.once("video:loadedmetadata",()=>v(e.chapters)),{name:"artplayerPluginChapter",update:({chapters:e})=>v(e)}}}if("undefined"!=typeof document){let e="artplayer-plugin-chapter",t=document.getElementById(e);t||((t=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(t)}):(document.head||document.documentElement).appendChild(t)),t.textContent=o.default}"undefined"!=typeof window&&(window.artplayerPluginChapter=i)},{"bundle-text:./style.less":"9CXLk","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9CXLk":[function(e,t,r){t.exports=".artplayer-plugin-chapter .art-control-progress-inner{background-color:#0000!important;height:100%!important}.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-hover,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-loaded,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-played{display:none!important}.artplayer-plugin-chapter .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 64px)!important}.artplayer-plugin-chapter .art-chapters{z-index:0;align-items:center;gap:4px;height:100%;display:flex;position:absolute;inset:0;transform:scaleY(1.25)}.artplayer-plugin-chapter .art-chapters .art-chapter{align-items:center;height:100%;display:flex}.artplayer-plugin-chapter .art-chapters .art-chapter .art-chapter-inner{cursor:pointer;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);border-radius:10px;width:100%;height:50%;position:relative;overflow:hidden}.artplayer-plugin-chapter .art-chapters .art-chapter:hover .art-chapter-inner{height:100%}.artplayer-plugin-chapter .art-chapter-title{z-index:70;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:14px;line-height:1;display:none;position:absolute;top:-50px;left:0}"},{}],"9pCYc":[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["eSFsM"],"eSFsM","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,a,n,o,i,l){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[a]&&d[a],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(n[t])return n[t];var o="function"==typeof d[a]&&d[a];if(!r&&o)return o(t,!0);if(p)return p(t,!0);if(c&&"string"==typeof t)return c(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}s.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},s.cache={};var l=u[t]=new f.Module(t);e[t][0].call(l.exports,s,l,l.exports,d)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=u,f.parent=p,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=s,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return d[a]}}),d[a]=f;for(var h=0;hl);var o=e("bundle-text:./style.less"),i=n.interopDefault(o);function l(e={}){return t=>{let{$player:r}=t.template,{setStyle:a,append:n,clamp:o,query:i,isMobile:l,addClass:d,removeClass:p}=t.constructor.utils,s=`
`,u=null,c=[],f=t.query(".art-control-progress"),h=t.query(".art-control-progress-inner"),g=n(h,'
'),y=n(h,'
');function m({$chapter:e,width:t}){let r=e.dataset.title.trim();if(r){a(y,"display","flex"),y.innerText=r;let e=y.clientWidth;t<=e/2?a(y,"left",0):t>h.clientWidth-e/2?a(y,"left",`${h.clientWidth-e}px`):a(y,"left",`${t-e/2}px`)}else a(y,"display","none")}function v(e=[]){if((c=[],g.innerText="",p(r,"artplayer-plugin-chapter"),Array.isArray(e)&&e.length)&&t.duration){e=e.sort((e,t)=>e.start-t.start);for(let r=0;rt.duration||a.start>=a.end||n&&a.end>n.start)throw Error("Illegal chapter time point")}e[0].start>0&&e.unshift({start:0,end:e[0].start,title:""}),e[e.length-1].end{let r=n(g,s),a=o(e.start,0,t.duration),l=o(e.end,0,t.duration),d=l-a,p=d/t.duration;return r.dataset.start=a,r.dataset.end=l,r.dataset.duration=d,r.dataset.title=e.title.trim(),r.style.width=`${100*p}%`,{$chapter:r,$hover:i(".art-progress-hover",r),$loaded:i(".art-progress-loaded",r),$played:i(".art-progress-played",r)}}),d(r,"artplayer-plugin-chapter"),t.emit("setBar","loaded",t.loaded||0)}}return t.on("setBar",(e,r,n)=>{if(c.length)for(let o=0;ow&&a(f,"width","100%"),v>=x&&v<=w){let t=(v-x)/b;a(f,"width",`${100*t}%`),l?"played"===e&&n&&(m({$chapter:i,width:h}),clearTimeout(u),u=setTimeout(()=>{a(y,"display","none")},500)):"hover"===e&&m({$chapter:i,width:h})}}}),l||t.proxy(f,"mouseleave",()=>{c.length&&a(y,"display","none")}),t.once("video:loadedmetadata",()=>v(e.chapters)),{name:"artplayerPluginChapter",update:({chapters:e})=>v(e)}}}if("undefined"!=typeof document){let e="artplayer-plugin-chapter",t=document.getElementById(e);t||((t=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(t)}):(document.head||document.documentElement).appendChild(t)),t.textContent=i.default}"undefined"!=typeof window&&(window.artplayerPluginChapter=l)},{"bundle-text:./style.less":"9CXLk","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9CXLk":[function(e,t,r,a){t.exports=".artplayer-plugin-chapter .art-control-progress-inner{background-color:#0000!important;height:100%!important}.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-hover,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-loaded,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-played{display:none!important}.artplayer-plugin-chapter .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 64px)!important}.artplayer-plugin-chapter .art-chapters{z-index:0;align-items:center;gap:4px;height:100%;display:flex;position:absolute;inset:0;transform:scaleY(1.25)}.artplayer-plugin-chapter .art-chapters .art-chapter{align-items:center;height:100%;display:flex}.artplayer-plugin-chapter .art-chapters .art-chapter .art-chapter-inner{cursor:pointer;width:100%;height:50%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);border-radius:10px;position:relative;overflow:hidden}.artplayer-plugin-chapter .art-chapters .art-chapter:hover .art-chapter-inner{height:100%}.artplayer-plugin-chapter .art-chapter-title{z-index:70;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:14px;line-height:1;display:none;position:absolute;top:-50px;left:0}"},{}],"9pCYc":[function(e,t,r,a){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["eSFsM"],"eSFsM","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-chapter.legacy.js b/docs/compiled/artplayer-plugin-chapter.legacy.js index c9efa9cf1..0303a1e69 100644 --- a/docs/compiled/artplayer-plugin-chapter.legacy.js +++ b/docs/compiled/artplayer-plugin-chapter.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,a,n){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[a]&&o[a],l=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!l[t]){if(!e[t]){var n="function"==typeof o[a]&&o[a];if(!r&&n)return n(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},c.cache={};var u=l[t]=new p.Module(t);e[t][0].call(u.exports,c,u,u.exports,this)}return l[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=l,p.parent=i,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return o[a]}}),o[a]=p;for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.template.$player,a=t.constructor.utils,n=a.setStyle,o=a.append,i=a.clamp,l=a.query,d=a.isMobile,p=a.addClass,s=a.removeClass,u=null,c=[],f=t.query(".art-control-progress"),h=t.query(".art-control-progress-inner"),g=o(h,'
'),y=o(h,'
');function v(e){var t=e.$chapter,r=e.width,a=t.dataset.title.trim();if(a){n(y,"display","flex"),y.innerText=a;var o=y.clientWidth;r<=o/2?n(y,"left",0):r>h.clientWidth-o/2?n(y,"left","".concat(h.clientWidth-o,"px")):n(y,"left","".concat(r-o/2,"px"))}else n(y,"display","none")}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(c=[],g.innerText="",s(r,"artplayer-plugin-chapter"),Array.isArray(e)&&e.length&&t.duration){e=e.sort(function(e,t){return e.start-t.start});for(var a=0;at.duration||n.start>=n.end||d&&n.end>d.start)throw Error("Illegal chapter time point")}e[0].start>0&&e.unshift({start:0,end:e[0].start,title:""}),e[e.length-1].end\n
\n
\n
\n
\n
\n\n '),a=i(e.start,0,t.duration),n=i(e.end,0,t.duration),d=n-a,p=d/t.duration;return r.dataset.start=a,r.dataset.end=n,r.dataset.duration=d,r.dataset.title=e.title.trim(),r.style.width="".concat(100*p,"%"),{$chapter:r,$hover:l(".art-progress-hover",r),$loaded:l(".art-progress-loaded",r),$played:l(".art-progress-played",r)}}),p(r,"artplayer-plugin-chapter"),t.emit("setBar","loaded",t.loaded||0)}}return t.on("setBar",function(e,r,a){if(c.length)for(var o=0;ow&&n(f,"width","100%"),m>=x&&m<=w){var j=(m-x)/b;n(f,"width","".concat(100*j,"%")),d?"played"===e&&a&&(v({$chapter:l,width:h}),clearTimeout(u),u=setTimeout(function(){n(y,"display","none")},500)):"hover"===e&&v({$chapter:l,width:h})}}}),d||t.proxy(f,"mouseleave",function(){c.length&&n(y,"display","none")}),t.once("video:loadedmetadata",function(){return m(e.chapters)}),{name:"artplayerPluginChapter",update:function(e){return m(e.chapters)}}}}if("undefined"!=typeof document){var l="artplayer-plugin-chapter",d=document.getElementById(l);d||((d=document.createElement("style")).id=l,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){document.head.appendChild(d)}):(document.head||document.documentElement).appendChild(d)),d.textContent=o.default}"undefined"!=typeof window&&(window.artplayerPluginChapter=i)},{"bundle-text:./style.less":"4jhrf","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"4jhrf":[function(e,t,r){t.exports=".artplayer-plugin-chapter .art-control-progress-inner{background-color:transparent!important;height:100%!important}.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-hover,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-loaded,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-played{display:none!important}.artplayer-plugin-chapter .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 64px)!important}.artplayer-plugin-chapter .art-chapters{z-index:0;align-items:center;gap:4px;height:100%;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;transform:scaleY(1.25)}.artplayer-plugin-chapter .art-chapters .art-chapter{align-items:center;height:100%;display:flex}.artplayer-plugin-chapter .art-chapters .art-chapter .art-chapter-inner{cursor:pointer;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);border-radius:10px;width:100%;height:50%;position:relative;overflow:hidden}.artplayer-plugin-chapter .art-chapters .art-chapter:hover .art-chapter-inner{height:100%}.artplayer-plugin-chapter .art-chapter-title{z-index:70;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:14px;line-height:1;display:none;position:absolute;top:-50px;left:0}"},{}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["9rqDr"],"9rqDr","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,a,n,o,i,l){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[a]&&d[a],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(n[t])return n[t];var o="function"==typeof d[a]&&d[a];if(!r&&o)return o(t,!0);if(p)return p(t,!0);if(c&&"string"==typeof t)return c(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}s.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},s.cache={};var l=u[t]=new f.Module(t);e[t][0].call(l.exports,s,l,l.exports,d)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=u,f.parent=p,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=s,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return d[a]}}),d[a]=f;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.template.$player,a=t.constructor.utils,n=a.setStyle,o=a.append,i=a.clamp,l=a.query,d=a.isMobile,p=a.addClass,s=a.removeClass,u=null,c=[],f=t.query(".art-control-progress"),h=t.query(".art-control-progress-inner"),g=o(h,'
'),y=o(h,'
');function v(e){var t=e.$chapter,r=e.width,a=t.dataset.title.trim();if(a){n(y,"display","flex"),y.innerText=a;var o=y.clientWidth;r<=o/2?n(y,"left",0):r>h.clientWidth-o/2?n(y,"left","".concat(h.clientWidth-o,"px")):n(y,"left","".concat(r-o/2,"px"))}else n(y,"display","none")}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if((c=[],g.innerText="",s(r,"artplayer-plugin-chapter"),Array.isArray(e)&&e.length)&&t.duration){e=e.sort(function(e,t){return e.start-t.start});for(var a=0;at.duration||n.start>=n.end||d&&n.end>d.start)throw Error("Illegal chapter time point")}e[0].start>0&&e.unshift({start:0,end:e[0].start,title:""}),e[e.length-1].end\n
\n
\n
\n
\n
\n\n '),a=i(e.start,0,t.duration),n=i(e.end,0,t.duration),d=n-a,p=d/t.duration;return r.dataset.start=a,r.dataset.end=n,r.dataset.duration=d,r.dataset.title=e.title.trim(),r.style.width="".concat(100*p,"%"),{$chapter:r,$hover:l(".art-progress-hover",r),$loaded:l(".art-progress-loaded",r),$played:l(".art-progress-played",r)}}),p(r,"artplayer-plugin-chapter"),t.emit("setBar","loaded",t.loaded||0)}}return t.on("setBar",function(e,r,a){if(c.length)for(var o=0;ow&&n(f,"width","100%"),m>=x&&m<=w){var j=(m-x)/b;n(f,"width","".concat(100*j,"%")),d?"played"===e&&a&&(v({$chapter:l,width:h}),clearTimeout(u),u=setTimeout(function(){n(y,"display","none")},500)):"hover"===e&&v({$chapter:l,width:h})}}}),d||t.proxy(f,"mouseleave",function(){c.length&&n(y,"display","none")}),t.once("video:loadedmetadata",function(){return m(e.chapters)}),{name:"artplayerPluginChapter",update:function(e){return m(e.chapters)}}}}if("undefined"!=typeof document){var d="artplayer-plugin-chapter",p=document.getElementById(d);p||((p=document.createElement("style")).id=d,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){document.head.appendChild(p)}):(document.head||document.documentElement).appendChild(p)),p.textContent=i.default}"undefined"!=typeof window&&(window.artplayerPluginChapter=l)},{"bundle-text:./style.less":"4jhrf","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"4jhrf":[function(e,t,r,a){t.exports=".artplayer-plugin-chapter .art-control-progress-inner{background-color:transparent!important;height:100%!important}.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-hover,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-loaded,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-played{display:none!important}.artplayer-plugin-chapter .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 64px)!important}.artplayer-plugin-chapter .art-chapters{z-index:0;align-items:center;gap:4px;height:100%;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;transform:scaleY(1.25)}.artplayer-plugin-chapter .art-chapters .art-chapter{align-items:center;height:100%;display:flex}.artplayer-plugin-chapter .art-chapters .art-chapter .art-chapter-inner{cursor:pointer;width:100%;height:50%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);border-radius:10px;position:relative;overflow:hidden}.artplayer-plugin-chapter .art-chapters .art-chapter:hover .art-chapter-inner{height:100%}.artplayer-plugin-chapter .art-chapter-title{z-index:70;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:14px;line-height:1;display:none;position:absolute;top:-50px;left:0}"},{}],iWrD0:[function(e,t,r,a){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["9rqDr"],"9rqDr","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-chromecast.js b/docs/compiled/artplayer-plugin-chromecast.js index d5277b04a..becbbcc00 100644 --- a/docs/compiled/artplayer-plugin-chromecast.js +++ b/docs/compiled/artplayer-plugin-chromecast.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,o,n,a){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof i[n]&&i[n],c=r.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,o){if(!c[t]){if(!e[t]){var a="function"==typeof i[n]&&i[n];if(!o&&a)return a(t,!0);if(r)return r(t,!0);if(s&&"string"==typeof t)return s(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}f.resolve=function(o){var n=e[t][1][o];return null!=n?n:o},f.cache={};var u=c[t]=new d.Module(t);e[t][0].call(u.exports,f,u,u.exports,this)}return c[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=c,d.parent=r,d.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(d,"root",{get:function(){return i[n]}}),i[n]=d;for(var l=0;lr);let a=e=>new Promise((t,o)=>{let n=document.createElement("script");n.src=e,n.onload=t,n.onerror=o,document.body.appendChild(n)}),i=e=>({mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",mp3:"audio/mp3",wav:"audio/wav",flv:"video/x-flv",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mpd:"application/dash+xml",m3u8:"application/x-mpegURL"})[e.split("?")[0].split("#")[0].split(".").pop().toLowerCase()]||"application/octet-stream";function r(e){let t=!1,o=null,n=null,r=()=>new Promise((i,r)=>{window.__onGCastApiAvailable=a=>{if(a){let a=window.cast.framework.CastContext.getInstance();a.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),a.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=>{let a=window.cast.framework.SessionState;switch(n=t.sessionState,o=t.session,t.sessionState){case a.NO_SESSION:e.onStateChange?.("disconnected"),s("disconnected");break;case a.SESSION_STARTING:e.onStateChange?.("connecting"),s("connecting");break;case a.SESSION_STARTED:e.onStateChange?.("connected"),s("connected");break;case a.SESSION_ENDING:e.onStateChange?.("disconnecting"),s("disconnecting");break;case a.SESSION_RESUMED:e.onStateChange?.("connected"),s("connected")}}),a.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,t=>{let o=window.cast.framework.CastState;switch(t.castState){case o.NO_DEVICES_AVAILABLE:e.onCastAvailable?.(!1);break;case o.NOT_CONNECTED:case o.CONNECTING:case o.CONNECTED:e.onCastAvailable?.(!0)}}),t=!0,i()}else r(Error("Cast API is not available"))},window.chrome&&window.chrome.cast||a(e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").catch(r)}),c=(t,o)=>{let n=e.url||t.option.url,a=new window.chrome.cast.media.MediaInfo(n,e.mimeType||i(n)),r=new window.chrome.cast.media.LoadRequest(a);o.loadMedia(r).then(()=>{t.notice.show="Casting started",e.onCastStart?.()}).catch(o=>{throw t.notice.show="Error casting media",e.onError?.(o),o})},s=e=>{let t=document.querySelector(".art-icon-cast");if(t)switch(e){case"connected":t.style.color="red";break;case"connecting":case"disconnecting":t.style.color="orange";break;default:t.style.color="white"}};return async a=>(a.controls.add({name:"chromecast",position:"right",tooltip:"Chromecast",html:`${e.icon||''}`,click:async()=>{if(!t)try{await r()}catch(t){throw a.notice.show="Failed to initialize Cast API",e.onError?.(t),t}let n=window.cast.framework.CastContext.getInstance();if(o)c(a,o);else try{let e=await n.requestSession();c(a,e)}catch(t){throw a.notice.show="Error connecting to cast session",e.onError?.(t),t}}}),{name:"artplayerPluginChromecast",getCastState:()=>n,isCasting:()=>null!==o})}"undefined"!=typeof window&&(window.artplayerPluginChromecast=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,o){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,t){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[o]}})}),t},o.export=function(e,t,o){Object.defineProperty(e,t,{enumerable:!0,get:o})}},{}]},["3wl5Y"],"3wl5Y","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,o,n,i,r,a,c){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof s[n]&&s[n],l=d.i||{},u=d.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function w(t,o){if(!u[t]){if(!e[t]){if(i[t])return i[t];var r="function"==typeof s[n]&&s[n];if(!o&&r)return r(t,!0);if(d)return d(t,!0);if(f&&"string"==typeof t)return f(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}l.resolve=function(o){var n=e[t][1][o];return null!=n?n:o},l.cache={};var c=u[t]=new w.Module(t);e[t][0].call(c.exports,l,c,c.exports,s)}return u[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:w(t)}}w.isParcelRequire=!0,w.Module=function(e){this.id=e,this.bundle=w,this.require=f,this.exports={}},w.modules=e,w.cache=u,w.parent=d,w.distDir=void 0,w.publicUrl=void 0,w.devServer=void 0,w.i=l,w.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(w,"root",{get:function(){return s[n]}}),s[n]=w;for(var p=0;pc);let r=e=>new Promise((t,o)=>{let n=document.createElement("script");n.src=e,n.onload=t,n.onerror=o,document.body.appendChild(n)}),a=e=>({mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",mp3:"audio/mp3",wav:"audio/wav",flv:"video/x-flv",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mpd:"application/dash+xml",m3u8:"application/x-mpegURL"})[e.split("?")[0].split("#")[0].split(".").pop().toLowerCase()]||"application/octet-stream";function c(e){let t=!1,o=null,n=null,i=()=>new Promise((i,a)=>{window.__onGCastApiAvailable=r=>{if(r){let r=window.cast.framework.CastContext.getInstance();r.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),r.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=>{let i=window.cast.framework.SessionState;switch(n=t.sessionState,o=t.session,t.sessionState){case i.NO_SESSION:e.onStateChange?.("disconnected"),s("disconnected");break;case i.SESSION_STARTING:e.onStateChange?.("connecting"),s("connecting");break;case i.SESSION_STARTED:e.onStateChange?.("connected"),s("connected");break;case i.SESSION_ENDING:e.onStateChange?.("disconnecting"),s("disconnecting");break;case i.SESSION_RESUMED:e.onStateChange?.("connected"),s("connected")}}),r.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,t=>{let o=window.cast.framework.CastState;switch(t.castState){case o.NO_DEVICES_AVAILABLE:e.onCastAvailable?.(!1);break;case o.NOT_CONNECTED:case o.CONNECTING:case o.CONNECTED:e.onCastAvailable?.(!0)}}),t=!0,i()}else a(Error("Cast API is not available"))},window.chrome&&window.chrome.cast||r(e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").catch(a)}),c=(t,o)=>{let n=e.url||t.option.url,i=new window.chrome.cast.media.MediaInfo(n,e.mimeType||a(n)),r=new window.chrome.cast.media.LoadRequest(i);o.loadMedia(r).then(()=>{t.notice.show="Casting started",e.onCastStart?.()}).catch(o=>{throw t.notice.show="Error casting media",e.onError?.(o),o})},s=e=>{let t=document.querySelector(".art-icon-cast");if(t)switch(e){case"connected":t.style.color="red";break;case"connecting":case"disconnecting":t.style.color="orange";break;default:t.style.color="white"}};return async r=>(r.controls.add({name:"chromecast",position:"right",tooltip:"Chromecast",html:`${e.icon||''}`,click:async()=>{if(!t)try{await i()}catch(t){throw r.notice.show="Failed to initialize Cast API",e.onError?.(t),t}let n=window.cast.framework.CastContext.getInstance();if(o)c(r,o);else try{let e=await n.requestSession();c(r,e)}catch(t){throw r.notice.show="Error connecting to cast session",e.onError?.(t),t}}}),{name:"artplayerPluginChromecast",getCastState:()=>n,isCasting:()=>null!==o})}"undefined"!=typeof window&&(window.artplayerPluginChromecast=c)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,o,n){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,t){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[o]}})}),t},o.export=function(e,t,o){Object.defineProperty(e,t,{enumerable:!0,get:o})}},{}]},["3wl5Y"],"3wl5Y","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-chromecast.legacy.js b/docs/compiled/artplayer-plugin-chromecast.legacy.js index 919f9892c..86dfe2a45 100644 --- a/docs/compiled/artplayer-plugin-chromecast.legacy.js +++ b/docs/compiled/artplayer-plugin-chromecast.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],c=a.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!c[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(s&&"string"==typeof t)return s(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=c[t]=new u.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return c[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=c,u.parent=a,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var l=0;l'.concat(e.icon||'',""),click:/*#__PURE__*/(0,o._)(function(){var o,u,l,f,p;return(0,i._)(this,function(i){switch(i.label){case 0:if(r)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,new Promise(function(t,o){if(window.__onGCastApiAvailable=function(i){if(i){var c=window.cast.framework.CastContext.getInstance();c.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),c.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,function(t){var r,o,i,c,u,l=window.cast.framework.SessionState;switch(a=t.sessionState,n=t.session,t.sessionState){case l.NO_SESSION:null===(r=e.onStateChange)||void 0===r||r.call(e,"disconnected"),s("disconnected");break;case l.SESSION_STARTING:null===(o=e.onStateChange)||void 0===o||o.call(e,"connecting"),s("connecting");break;case l.SESSION_STARTED:null===(i=e.onStateChange)||void 0===i||i.call(e,"connected"),s("connected");break;case l.SESSION_ENDING:null===(c=e.onStateChange)||void 0===c||c.call(e,"disconnecting"),s("disconnecting");break;case l.SESSION_RESUMED:null===(u=e.onStateChange)||void 0===u||u.call(e,"connected"),s("connected")}}),c.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,function(t){var r,n,o,i=window.cast.framework.CastState;switch(t.castState){case i.NO_DEVICES_AVAILABLE:null===(r=e.onCastAvailable)||void 0===r||r.call(e,!1);break;case i.NOT_CONNECTED:null===(n=e.onCastAvailable)||void 0===n||n.call(e,!0);break;case i.CONNECTING:case i.CONNECTED:null===(o=e.onCastAvailable)||void 0===o||o.call(e,!0)}}),r=!0,t()}else o(Error("Cast API is not available"))},!window.chrome||!window.chrome.cast){var i;(i=e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",new Promise(function(e,t){var r=document.createElement("script");r.src=i,r.onload=e,r.onerror=t,document.body.appendChild(r)})).catch(o)}})];case 2:return i.sent(),[3,4];case 3:throw o=i.sent(),t.notice.show="Failed to initialize Cast API",null===(u=e.onError)||void 0===u||u.call(e,o),o;case 4:if(l=window.cast.framework.CastContext.getInstance(),!n)return[3,5];return c(t,n),[3,8];case 5:return i.trys.push([5,7,,8]),[4,l.requestSession()];case 6:return c(t,i.sent()),[3,8];case 7:throw f=i.sent(),t.notice.show="Error connecting to cast session",null===(p=e.onError)||void 0===p||p.call(e,f),f;case 8:return[2]}})})}),[2,{name:"artplayerPluginChromecast",getCastState:function(){return a},isCasting:function(){return null!==n}}]})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginChromecast=a)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var c=e[i](a),s=c.value}catch(e){r(e);return}c.done?t(s):Promise.resolve(s).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function c(e){o(a,n,i,c,s,"next",e)}function s(e){o(a,n,i,c,s,"throw",e)}c(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator});var o=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return a}),n.export(r,"__assign",function(){return c}),n.export(r,"__rest",function(){return s}),n.export(r,"__decorate",function(){return u}),n.export(r,"__param",function(){return l}),n.export(r,"__esDecorate",function(){return f}),n.export(r,"__runInitializers",function(){return p}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return y}),n.export(r,"__metadata",function(){return _}),n.export(r,"__awaiter",function(){return h}),n.export(r,"__generator",function(){return v}),n.export(r,"__createBinding",function(){return m}),n.export(r,"__exportStar",function(){return w}),n.export(r,"__values",function(){return b}),n.export(r,"__read",function(){return g}),n.export(r,"__spread",function(){return S}),n.export(r,"__spreadArrays",function(){return x}),n.export(r,"__spreadArray",function(){return O}),n.export(r,"__await",function(){return E}),n.export(r,"__asyncGenerator",function(){return j}),n.export(r,"__asyncDelegator",function(){return P}),n.export(r,"__asyncValues",function(){return C}),n.export(r,"__makeTemplateObject",function(){return I}),n.export(r,"__importStar",function(){return D}),n.export(r,"__importDefault",function(){return A}),n.export(r,"__classPrivateFieldGet",function(){return k}),n.export(r,"__classPrivateFieldSet",function(){return N}),n.export(r,"__classPrivateFieldIn",function(){return R}),n.export(r,"__addDisposableResource",function(){return F}),n.export(r,"__disposeResources",function(){return G});var o=e("@swc/helpers/_/_type_of"),i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,s=n.kind,u="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var h=(0,r[d])("accessor"===s?{get:f.get,set:f.set}:f[u],y);if("accessor"===s){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(c=a(h.get))&&(f.get=c),(c=a(h.set))&&(f.set=c),(c=a(h.init))&&o.unshift(c)}else(c=a(h))&&("field"===s?o.unshift(c):f[u]=c)}l&&Object.defineProperty(l,n.name,f),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function S(){for(var e=[],t=0;t1||c(e,t)})},t&&(n[e]=t(n[e])))}function c(e,t){try{var r;(r=o[e](t)).value instanceof E?Promise.resolve(r.value.v).then(s,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function s(e){c("next",e)}function u(e){c("throw",e)}function l(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:!1}:o?o(t):t}:o}}function C(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return T(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function N(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function F(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var M="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function G(e){function t(t){e.error=e.hasError?new M(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:a,__assign:c,__rest:s,__decorate:u,__param:l,__metadata:_,__awaiter:h,__generator:v,__createBinding:m,__exportStar:w,__values:b,__read:g,__spread:S,__spreadArrays:x,__spreadArray:O,__await:E,__asyncGenerator:j,__asyncDelegator:P,__asyncValues:C,__makeTemplateObject:I,__importStar:D,__importDefault:A,__classPrivateFieldGet:k,__classPrivateFieldSet:N,__classPrivateFieldIn:R,__addDisposableResource:F,__disposeResources:G}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["ipx5S"],"ipx5S","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,i,a,c){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof s[n]&&s[n],l=u.i||{},f=u.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!f[t]){if(!e[t]){if(o[t])return o[t];var i="function"==typeof s[n]&&s[n];if(!r&&i)return i(t,!0);if(u)return u(t,!0);if(p&&"string"==typeof t)return p(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var c=f[t]=new d.Module(t);e[t][0].call(c.exports,l,c,c.exports,s)}return f[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=f,d.parent=u,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=l,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return s[n]}}),s[n]=d;for(var _=0;_'.concat(e.icon||'',""),click:(0,i._)(function(){var i,u,l,f,p;return(0,a._)(this,function(a){switch(a.label){case 0:if(r)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,new Promise(function(t,i){var a;window.__onGCastApiAvailable=function(a){if(a){var c=window.cast.framework.CastContext.getInstance();c.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),c.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,function(t){var r,i,a,c,u,l=window.cast.framework.SessionState;switch(o=t.sessionState,n=t.session,t.sessionState){case l.NO_SESSION:null==(r=e.onStateChange)||r.call(e,"disconnected"),s("disconnected");break;case l.SESSION_STARTING:null==(i=e.onStateChange)||i.call(e,"connecting"),s("connecting");break;case l.SESSION_STARTED:null==(a=e.onStateChange)||a.call(e,"connected"),s("connected");break;case l.SESSION_ENDING:null==(c=e.onStateChange)||c.call(e,"disconnecting"),s("disconnecting");break;case l.SESSION_RESUMED:null==(u=e.onStateChange)||u.call(e,"connected"),s("connected")}}),c.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,function(t){var r,n,o,i=window.cast.framework.CastState;switch(t.castState){case i.NO_DEVICES_AVAILABLE:null==(r=e.onCastAvailable)||r.call(e,!1);break;case i.NOT_CONNECTED:null==(n=e.onCastAvailable)||n.call(e,!0);break;case i.CONNECTING:case i.CONNECTED:null==(o=e.onCastAvailable)||o.call(e,!0)}}),r=!0,t()}else i(Error("Cast API is not available"))},window.chrome&&window.chrome.cast||(a=e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",new Promise(function(e,t){var r=document.createElement("script");r.src=a,r.onload=e,r.onerror=t,document.body.appendChild(r)})).catch(i)})];case 2:return a.sent(),[3,4];case 3:throw i=a.sent(),t.notice.show="Failed to initialize Cast API",null==(u=e.onError)||u.call(e,i),i;case 4:if(l=window.cast.framework.CastContext.getInstance(),!n)return[3,5];return c(t,n),[3,8];case 5:return a.trys.push([5,7,,8]),[4,l.requestSession()];case 6:return c(t,a.sent()),[3,8];case 7:throw f=a.sent(),t.notice.show="Error connecting to cast session",null==(p=e.onError)||p.call(e,f),f;case 8:return[2]}})})}),[2,{name:"artplayerPluginChromecast",getCastState:function(){return o},isCasting:function(){return null!==n}}]})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginChromecast=c)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r,n,o,i,a){try{var c=e[i](a),s=c.value}catch(e){r(e);return}c.done?t(s):Promise.resolve(s).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function c(e){i(a,n,o,c,s,"next",e)}function s(e){i(a,n,o,c,s,"throw",e)}c(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return i.__generator});var i=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"__extends",function(){return c}),o.export(r,"__assign",function(){return s}),o.export(r,"__rest",function(){return u}),o.export(r,"__decorate",function(){return l}),o.export(r,"__param",function(){return f}),o.export(r,"__esDecorate",function(){return p}),o.export(r,"__runInitializers",function(){return d}),o.export(r,"__propKey",function(){return _}),o.export(r,"__setFunctionName",function(){return y}),o.export(r,"__metadata",function(){return h}),o.export(r,"__awaiter",function(){return v}),o.export(r,"__generator",function(){return m}),o.export(r,"__createBinding",function(){return w}),o.export(r,"__exportStar",function(){return b}),o.export(r,"__values",function(){return g}),o.export(r,"__read",function(){return x}),o.export(r,"__spread",function(){return S}),o.export(r,"__spreadArrays",function(){return j}),o.export(r,"__spreadArray",function(){return O}),o.export(r,"__await",function(){return E}),o.export(r,"__asyncGenerator",function(){return P}),o.export(r,"__asyncDelegator",function(){return C}),o.export(r,"__asyncValues",function(){return I}),o.export(r,"__makeTemplateObject",function(){return T}),o.export(r,"__importStar",function(){return k}),o.export(r,"__importDefault",function(){return N}),o.export(r,"__classPrivateFieldGet",function(){return R}),o.export(r,"__classPrivateFieldSet",function(){return F}),o.export(r,"__classPrivateFieldIn",function(){return M}),o.export(r,"__addDisposableResource",function(){return G}),o.export(r,"__disposeResources",function(){return q}),o.export(r,"__rewriteRelativeImportExtension",function(){return z});var i=e("@swc/helpers/_/_type_of"),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function l(e,t,r,n){var o,a=arguments.length,c=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(t,r,c):o(t,r))||c);return a>3&&c&&Object.defineProperty(t,r,c),c}function f(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function c(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?n.static?e:e.prototype:null,p=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),d=!1,_=r.length-1;_>=0;_--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(c(e||null))};var v=(0,r[_])("accessor"===u?{get:p.get,set:p.set}:p[l],y);if("accessor"===u){if(void 0===v)continue;if(null===v||(void 0===v?"undefined":(0,i._)(v))!=="object")throw TypeError("Object expected");(s=c(v.get))&&(p.get=s),(s=c(v.set))&&(p.set=s),(s=c(v.init))&&o.unshift(s)}else(s=c(v))&&("field"===u?o.unshift(s):p[l]=s)}f&&Object.defineProperty(f,n.name,p),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function S(){for(var e=[],t=0;t1||c(e,t)})},t&&(n[e]=t(n[e])))}function c(e,t){try{var r;(r=o[e](t)).value instanceof E?Promise.resolve(r.value.v).then(s,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function s(e){c("next",e)}function u(e){c("throw",e)}function l(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function C(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var i,a,c;i=n,a=o,c=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){i({value:e,done:c})},a)})}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var D=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},A=function(e){return(A=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=A(e),n=0;np);var n=t("./danmuku"),o=a.interopDefault(n),s=t("./setting"),l=a.interopDefault(s),r=t("./heatmap"),d=a.interopDefault(r);function p(t){return e=>{let i=new o.default(e,t),a=new l.default(e,i);return i.option.heatmap&&(0,d.default)(e,i,i.option.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),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}p.icons=l.default.icons,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=p)},{"./danmuku":"4ns48","./setting":"lO8OT","./heatmap":"8AxLD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,i){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var n=t("./bilibili"),o=t("bundle-text:./worker"),s=a.interopDefault(o);class l{constructor(t,e){let{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=l.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e);let n=new Blob([s.default],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return` user-select: none; position: absolute; white-space: pre; pointer-events: none; perspective: 500px; display: inline-block; will-change: transform; font-weight: normal; line-height: 1.125; visibility: hidden; font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif; 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; `}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){let{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;return"number"==typeof e?t(e,0,i):"string"==typeof e&&e.endsWith("%")?t(i*(parseFloat(e)/100),0,i):l.option.margin[0]}get marginBottom(){let{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;return"number"==typeof e?t(e,0,i):"string"==typeof e&&e.endsWith("%")?t(i*(parseFloat(e)/100),0,i):l.option.margin[1]}get fontSize(){let{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;return"number"==typeof i?Math.round(t(i,12,e)):"string"==typeof i&&i.endsWith("%")?Math.round(t(e*(parseFloat(i)/100),12,e)):l.option.fontSize}get $ref(){let t=this.$refs.pop()||document.createElement("div");return t.style.cssText=l.cssText,t.dataset.mode="",t.className="",t}get readys(){let{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){let t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{let n=a.$ref.offsetTop,o=this.getLeft(a.$ref)-i,s=a.$ref.clientHeight,l=a.$ref.clientWidth,r=o+l,d=r/a.$restTime,p={};p.top=n,p.left=o,p.height=s,p.width=l,p.right=e-r,p.speed=d,p.distance=r,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}async load(t){let{errorHandle:e}=this.utils,i=[],a=t||this.option.danmuku;try{"function"==typeof a?i=await a():a instanceof Promise?i=await a:"string"==typeof a?i=await (0,n.bilibiliDanmuParseFromUrl)(a):Array.isArray(a)&&(i=a),e(Array.isArray(i),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.innerText="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))&&(this.option=Object.assign({},l.option,this.option,t),this.validator(this.option,l.scheme),this.option.mode=e(this.option.mode,0,2),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.lockTime=e(this.option.lockTime,1,60),this.option.maxLength=e(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||i,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option)),this}getLeft(t){let e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{let{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){let i=this.states[t]||[];for(let t=0;te!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=l.cssText,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)}update(){let{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{let e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});let e=this.readys;for(let i=0;i{0===e.mode&&(e.$ref.style.left=`${t}px`)}),this.filter("emit",e=>{if(e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}})}continue(){let{clientWidth:t}=this.$player;return this.filter("stop",e=>{if(this.setState(e,"emit"),e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}}),this}suspend(){let{clientWidth:t}=this.$player;return this.filter("emit",e=>{if(this.setState(e,"stop"),0===e.mode){let 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"}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}i.default=l},{"./bilibili":"f83sx","bundle-text:./worker":"lfIAi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f83sx:[function(t,e,i){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");function n(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function o(t){if("string"!=typeof t)return[];let e=new RegExp(/(?.+?)<\/d>/gs);return Array.from(t.matchAll(e)).map(t=>{let e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:n(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null}).filter(Boolean)}function s({data:t}){let{xml:e,id:i}=t;if(!i||!e)return;let a=o(e);self.postMessage({danmus:a,id:i})}function l(t){return new Promise(async e=>{let i=await fetch(t),a=await i.text();try{let t=function(){let t=new Blob([` ${n.toString()} ${o.toString()} onmessage = ${s.toString()} `],{type:"application/javascript"});return new Worker(URL.createObjectURL(t))}();t.onmessage=i=>{let{danmus:a,id:n}=i.data;n&&a&&(e(a),t.terminate())},t.postMessage({xml:a,id:Date.now()})}catch(t){e(o(a))}})}a.defineInteropFlag(i),a.export(i,"bilibiliDanmuParseFromUrl",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[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||Object.prototype.hasOwnProperty.call(e,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})}},{}],lfIAi:[function(t,e,i){e.exports='!function(e,t,n,o,i){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},f="function"==typeof r[o]&&r[o],l=f.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!l[t]){if(!e[t]){var i="function"==typeof r[o]&&r[o];if(!n&&i)return i(t,!0);if(f)return f(t,!0);if(d&&"string"==typeof t)return d(t);var h=Error("Cannot find module \'"+t+"\'");throw h.code="MODULE_NOT_FOUND",h}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var p=l[t]=new u.Module(t);e[t][0].call(p.exports,s,p,p.exports,this)}return l[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=l,u.parent=f,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return r[o]}}),r[o]=u;for(var h=0;ht.mode===e.mode&&t.top<=l).sort((e,t)=>e.top-t.top);if(0===d.length)return 2===e.mode?l-e.height:r;if(d.unshift({type:"top",top:0,left:0,right:0,height:r,width:n,speed:0,distance:n}),d.push({type:"bottom",top:l,left:0,right:0,height:i,width:n,speed:0,distance:n}),2===e.mode)for(let t=d.length-2;t>=0;t-=1){let n=d[t],o=d[t+1],i=n.top+n.height;if(o.top-i>=e.height)return o.top-e.height}else for(let t=1;t=e.height)return i}let u=[];for(let e=1;et.every(t=>!(nt.time)));return t&&t[0]?t[0].top:void 0}case 1:case 2:return}else{switch(e.mode){case 0:u.sort((e,t)=>{let n=Math.min(...t.map(e=>e.right)),o=Math.min(...e.map(e=>e.right));return n*t.length-o*e.length});break;case 1:case 2:u.sort((e,t)=>{let n=Math.max(...t.map(e=>e.width));return Math.max(...e.map(e=>e.width))*e.length-n*t.length})}return u[0][0].top}}onmessage=e=>{let{data:t}=e;if(!t.id||!t.type)return;let n=(0,({getDanmuTop:o})[t.type])(t);self.postMessage({result:n,id:t.id})}},{}]},["59OZS"],"59OZS","parcelRequire4dc0");'},{}],lO8OT:[function(t,e,i){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var n=t("bundle-text:./style.less"),o=a.interopDefault(n),s=t("bundle-text:./img/on.svg"),l=a.interopDefault(s),r=t("bundle-text:./img/off.svg"),d=a.interopDefault(r),p=t("bundle-text:./img/config.svg"),u=a.interopDefault(p),h=t("bundle-text:./img/style.svg"),m=a.interopDefault(h),c=t("bundle-text:./img/mode_0_off.svg"),f=a.interopDefault(c),g=t("bundle-text:./img/mode_0_on.svg"),y=a.interopDefault(g),v=t("bundle-text:./img/mode_1_off.svg"),x=a.interopDefault(v),k=t("bundle-text:./img/mode_1_on.svg"),b=a.interopDefault(k),$=t("bundle-text:./img/mode_2_off.svg"),w=a.interopDefault($),M=t("bundle-text:./img/mode_2_on.svg"),E=a.interopDefault(M),S=t("bundle-text:./img/check_on.svg"),D=a.interopDefault(S),z=t("bundle-text:./img/check_off.svg"),A=a.interopDefault(z);if(i.default=class{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;let{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:l.default,$off:d.default,$config:u.default,$style:m.default,$mode_0_off:f.default,$mode_0_on:y.default,$mode_1_off:x.default,$mode_1_on:b.default,$mode_2_off:w.default,$mode_2_on:E.default,$check_on:D.default,$check_off:A.default}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){let{option:t}=this;return`
${l.default}${d.default}
${u.default}
\u{6309}\u{7C7B}\u{578B}\u{5C4F}\u{853D}
${f.default}${y.default}
\u{6EDA}\u{52A8}
${x.default}${b.default}
\u{9876}\u{90E8}
${w.default}${E.default}
\u{5E95}\u{90E8}
${D.default}${A.default} \u{9632}\u{6B62}\u{5F39}\u{5E55}\u{91CD}\u{53E0}
${D.default}${A.default} \u{540C}\u{6B65}\u{89C6}\u{9891}\u{901F}\u{5EA6}
\u{4E0D}\u{900F}\u{660E}\u{5EA6}
\u{672A}\u{77E5}
\u{663E}\u{793A}\u{533A}\u{57DF}
\u{672A}\u{77E5}
\u{5F39}\u{5E55}\u{5B57}\u{53F7}
\u{672A}\u{77E5}
\u{5F39}\u{5E55}\u{901F}\u{5EA6}
\u{672A}\u{77E5}
${m.default}
\u{6A21}\u{5F0F}
${y.default}
\u{6EDA}\u{52A8}
${b.default}
\u{9876}\u{90E8}
${E.default}
\u{5E95}\u{90E8}
\u{989C}\u{8272}
${this.COLOR.map(t=>`
`).join("")}
\u{53D1}\u{9001}
`}get OPACITY(){return{min:0,max:100,steps:[],...this.option.OPACITY}}get FONT_SIZE(){return{min:12,max:120,steps:[],...this.option.FONT_SIZE}}get MARGIN(){return{min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}],...this.option.MARGIN}}get SPEED(){return{min:0,max:4,steps:[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}],...this.option.SPEED}}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){let{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){let{append:i}=this.utils;[...t.children].some(t=>t===e)||i(t,e)}setData(t,e){let{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){let{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");let{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"关闭弹幕")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"打开弹幕")})}createEvents(){let{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:o,$send:s,$input:l}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{let e=t.target.closest(".apd-mode");if(!e)return;let i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(o,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{let e=t.target.closest(".apd-mode");if(!e)return;let i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{let e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(s,"click",()=>this.emit()),this.art.proxy(l,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider({...this.OPACITY,container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{let{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}}),this.slider.margin=this.createSlider({...this.MARGIN,container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{let e=this.MARGIN.steps[t];if(!e)return;let{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}}),this.slider.fontSize=this.createSlider({...this.FONT_SIZE,container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{let{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}}),this.slider.speed=this.createSlider({...this.SPEED,container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{let e=this.SPEED.steps[t];if(!e)return;let{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}})}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:o=[]}){let{query:s,clamp:l,setStyle:r}=this.utils;r(i,"touch-action","none"),i.innerHTML=`
${o.map(()=>'
').join("")}
${o.map(t=>t.hide?"":`
${t.name}
`).join("")}
`;let d=s(".apd-slider-dot",i),p=s(".apd-slider-progress",i),u=!1;function h(i=a()){if(ie)return;let s=(i-t)/(e-t);d.style.left=`${100*s}%`,0===o.length&&(p.style.width=d.style.left),n(i)}function m(a){let{top:n,height:o,left:s,width:r}=i.getBoundingClientRect();this.art.isRotate?h(Math.round(l(a.clientY-n,0,o)/o*(e-t)+t)):h(Math.round(l(a.clientX-s,0,r)/r*(e-t)+t))}return this.art.proxy(i,"click",t=>{m.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{u=0===t.button}),this.art.proxy(document,"pointermove",t=>{u&&m.call(this,t)}),this.art.proxy(document,"pointerup",t=>{u&&(u=!1,m.call(this,t))}),{reset:h}}onFullscreen(t){let{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){let{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=i.getBoundingClientRect(),s=n.width/2-a.width/2,l=o.left-(a.left-s),r=a.right+s-o.right;l>0?e.style.left=`${-s+l}px`:r>0?e.style.left=`${-s-r}px`:e.style.left=`${-s}px`}async emit(){let{$input:t}=this.template,e=t.value.trim();if(!e.length||this.isLock||this.emitting)return;let i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;let e=await this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(t){this.emitting=!1}}lock(){let{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.innerText=i,t(e,"apd-lock");let a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.innerText=i,a())},1e3)};a()}unlock(){let{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.innerText="发送",t(e,"apd-lock")}resize(){if(this.outside||this.art.fullscreen||this.art.fullscreenWeb)return;let{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());n&&t(n,"apd-active"),e(i,this.option.visible?"关闭弹幕":"打开弹幕"),this.resize()}mount(t){let{errorHandle:e}=this.utils,i="string"==typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}},"undefined"!=typeof document){let t="artplayer-plugin-danmuku",e=document.getElementById(t);if(e)e.textContent=o.default;else{let e=document.createElement("style");e.id=t,e.textContent=o.default,document.head.appendChild(e)}}},{"bundle-text:./style.less":"hViDo","bundle-text:./img/on.svg":"9pjcf","bundle-text:./img/off.svg":"b2dkP","bundle-text:./img/config.svg":"l8tyy","bundle-text:./img/style.svg":"5iZC3","bundle-text:./img/mode_0_off.svg":"i0Vut","bundle-text:./img/mode_0_on.svg":"hOSvZ","bundle-text:./img/mode_1_off.svg":"bOXC3","bundle-text:./img/mode_1_on.svg":"lKuh0","bundle-text:./img/mode_2_off.svg":"eB8W6","bundle-text:./img/mode_2_on.svg":"bpe2E","bundle-text:./img/check_on.svg":"kL9zy","bundle-text:./img/check_off.svg":"22xpM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hViDo:[function(t,e,i){e.exports='.artplayer-plugin-danmuku{z-index:99;color:#fff;flex-shrink:0;justify-content:center;align-items:center;gap:10px;width:100%;height:32px;font-size:12px;font-weight:300;display:flex;position:relative}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;fill:#fff;transition:all .2s}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{opacity:0;pointer-events:none;width:320px;padding:10px;position:absolute;bottom:24px;left:0}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{background-color:#000000d9;border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{align-items:center;gap:20px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{align-items:center;gap:12px;display:flex}.artplayer-plugin-danmuku .apd-config-slider .apd-value{text-align:right;width:32px}.artplayer-plugin-danmuku .apd-slider{cursor:pointer;flex:1;justify-content:center;align-items:center;height:20px;display:flex;position:relative}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{background-color:#ffffff40;border-radius:3px;width:100%;height:2px;position:relative;overflow:hidden}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{justify-content:space-between;align-items:center;display:flex;position:absolute;inset:0}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{background-color:#ffffff80;border-radius:50%;width:2px;height:2px}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{background-color:#00a1d6;width:0%;height:100%}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{background-color:#00a1d6;border-radius:50%;width:12px;height:12px;position:absolute;left:0%;transform:translate(-6px)}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{color:#777;justify-content:space-between;align-items:center;width:calc(100% + 32px);display:flex;position:absolute;bottom:-12px}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{text-align:center;flex-shrink:0;width:36px;scale:.95}.artplayer-plugin-danmuku .apd-config-other{align-items:center;gap:20px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{cursor:pointer;align-items:center;gap:2px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{background-color:#ffffff40;border-radius:5px;flex:1;align-items:center;height:100%;display:flex}.artplayer-plugin-danmuku .apd-style{justify-content:center;align-items:center;display:flex;position:relative}.artplayer-plugin-danmuku .apd-style .apd-style-panel{opacity:0;pointer-events:none;width:200px;padding:10px;position:absolute;bottom:24px;left:0}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{background-color:#000000d9;border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{flex-wrap:wrap;gap:8px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-colors .apd-color{cursor:pointer;border-radius:2px;width:16px;height:16px}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid #000;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{color:#fff;background-color:#0000;border:none;outline:none;flex:1;width:auto;min-width:0;height:100%;line-height:1}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{cursor:pointer;text-shadow:none;background-color:#00a1d6;border-top-right-radius:5px;border-bottom-right-radius:5px;flex-shrink:0;justify-content:center;align-items:center;width:60px;height:100%;display:flex}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{flex:none;width:260px}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{gap:16px;height:38px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{flex:none;width:400px}.art-video-player>.artplayer-plugin-danmuku{padding:0 10px;position:absolute;bottom:-40px;left:0;right:0}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"9pjcf":[function(t,e,i){e.exports=''},{}],b2dkP:[function(t,e,i){e.exports=''},{}],l8tyy:[function(t,e,i){e.exports=''},{}],"5iZC3":[function(t,e,i){e.exports=''},{}],i0Vut:[function(t,e,i){e.exports=''},{}],hOSvZ:[function(t,e,i){e.exports=''},{}],bOXC3:[function(t,e,i){e.exports=''},{}],lKuh0:[function(t,e,i){e.exports=''},{}],eB8W6:[function(t,e,i){e.exports=''},{}],bpe2E:[function(t,e,i){e.exports=''},{}],kL9zy:[function(t,e,i){e.exports=''},{}],"22xpM":[function(t,e,i){e.exports=''},{}],"8AxLD":[function(t,e,i){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"default",()=>s);let n={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){let a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}},o=(t,e)=>{let i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),angle:Math.atan2(a,i)}};function s(t,e,i){let{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(s){let l=null,r=null;function d(p=[]){if(l=null,r=null,s.innerHTML="",!t.duration||t.option.isLive)return;let u={w:s.offsetWidth,h:s.offsetHeight},h={xMin:0,xMax:u.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*u.h),sampling:Math.floor(u.w/100),smoothing:.2,flattening:.2};"object"==typeof i&&Object.assign(h,i);let m=[];if(Array.isArray(p)&&p.length)m=[...p];else{let i=t.duration/u.w;for(let t=0;t<=u.w;t+=h.sampling){let a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+h.sampling)*i).length;m.push([t,a])}}if(0===m.length)return;let c=m[m.length-1],f=c[0],g=c[1];f!==u.w&&m.push([u.w,g]);let y=m.map(t=>t[1]),v=(Math.min(...y)+Math.max(...y))/2;for(let t=0;tv?1+h.scale:1-h.scale)+h.minHeight}let x=(t,e,i,a)=>{let s=o(e||t,i||t),l=n.map(Math.cos(s.angle)*h.flattening,0,1,1,0),r=s.angle*l+(a?Math.PI:0),d=s.length*h.smoothing;return[t[0]+Math.cos(r)*d,t[1]+Math.sin(r)*d]},k=(t,e,i)=>{let a=x(i[e-1],i[e-2],t),n=x(t,i[e-1],i[e+1],!0),o=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${o}`},b=m.map(t=>[n.map(t[0],h.xMin,h.xMax,0,u.w),n.map(t[1],h.yMin,h.yMax,u.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${u.h} L ${e[0]},${u.h} L ${e[0]},${e[1]}`:`${t} ${k(e,i,a)}`,"");s.innerHTML=``,l=a("#heatmap-start",s),r=a("#heatmap-stop",s),l.setAttribute("offset",`${100*t.played}%`),r.setAttribute("offset",`${100*t.played}%`)}t.on("video:timeupdate",()=>{l&&r&&(l.setAttribute("offset",`${100*t.played}%`),r.setAttribute("offset",`${100*t.played}%`))}),t.on("setBar",(t,e)=>{l&&r&&"played"===t&&(l.setAttribute("offset",`${100*e}%`),r.setAttribute("offset",`${100*e}%`))}),t.on("ready",()=>d()),t.on("resize",()=>d()),t.on("artplayerPluginDanmuku:loaded",()=>d()),t.on("artplayerPluginDanmuku:points",t=>d(t))}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["bgm6t"],"bgm6t","parcelRequire4dc0"); \ No newline at end of file +!function(t,e,i,a,n,o,s,l){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof r[a]&&r[a],p=d.i||{},u=d.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function m(e,i){if(!u[e]){if(!t[e]){if(n[e])return n[e];var o="function"==typeof r[a]&&r[a];if(!i&&o)return o(e,!0);if(d)return d(e,!0);if(h&&"string"==typeof e)return h(e);var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}p.resolve=function(i){var a=t[e][1][i];return null!=a?a:i},p.cache={};var l=u[e]=new m.Module(e);t[e][0].call(l.exports,p,l,l.exports,r)}return u[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:m(e)}}m.isParcelRequire=!0,m.Module=function(t){this.id=t,this.bundle=m,this.require=h,this.exports={}},m.modules=t,m.cache=u,m.parent=d,m.distDir=void 0,m.publicUrl=void 0,m.devServer=void 0,m.i=p,m.register=function(e,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(m,"root",{get:function(){return r[a]}}),r[a]=m;for(var c=0;cu);var o=t("./danmuku"),s=n.interopDefault(o),l=t("./setting"),r=n.interopDefault(l),d=t("./heatmap"),p=n.interopDefault(d);function u(t){return e=>{let i=new(0,s.default)(e,t),a=new(0,r.default)(e,i);return i.option.heatmap&&(0,p.default)(e,i,i.option.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),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}u.icons=r.default.icons,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=u)},{"./danmuku":"4ns48","./setting":"lO8OT","./heatmap":"8AxLD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,i,a){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=t("./bilibili"),s=t("bundle-text:./worker"),l=n.interopDefault(s);class r{constructor(t,e){let{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=r.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e);let n=new Blob([l.default],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return` user-select: none; position: absolute; white-space: pre; pointer-events: none; perspective: 500px; display: inline-block; will-change: transform; font-weight: normal; line-height: 1.125; visibility: hidden; font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif; 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; `}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){let{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;return"number"==typeof e?t(e,0,i):"string"==typeof e&&e.endsWith("%")?t(i*(parseFloat(e)/100),0,i):r.option.margin[0]}get marginBottom(){let{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;return"number"==typeof e?t(e,0,i):"string"==typeof e&&e.endsWith("%")?t(i*(parseFloat(e)/100),0,i):r.option.margin[1]}get fontSize(){let{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;return"number"==typeof i?Math.round(t(i,12,e)):"string"==typeof i&&i.endsWith("%")?Math.round(t(e*(parseFloat(i)/100),12,e)):r.option.fontSize}get $ref(){let t=this.$refs.pop()||document.createElement("div");return t.style.cssText=r.cssText,t.dataset.mode="",t.className="",t}get readys(){let{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){let t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{let n=a.$ref.offsetTop,o=this.getLeft(a.$ref)-i,s=a.$ref.clientHeight,l=a.$ref.clientWidth,r=o+l,d=r/a.$restTime,p={};p.top=n,p.left=o,p.height=s,p.width=l,p.right=e-r,p.speed=d,p.distance=r,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}async load(t){let{errorHandle:e}=this.utils,i=[],a=t||this.option.danmuku;try{"function"==typeof a?i=await a():a instanceof Promise?i=await a:"string"==typeof a?i=await (0,o.bilibiliDanmuParseFromUrl)(a):Array.isArray(a)&&(i=a),e(Array.isArray(i),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.innerText="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))&&(this.option=Object.assign({},r.option,this.option,t),this.validator(this.option,r.scheme),this.option.mode=e(this.option.mode,0,2),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.lockTime=e(this.option.lockTime,1,60),this.option.maxLength=e(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||i,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option)),this}getLeft(t){let e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{let{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){let i=this.states[t]||[];for(let t=0;te!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=r.cssText,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)}update(){let{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{let e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});let e=this.readys;for(let i=0;i{0===e.mode&&(e.$ref.style.left=`${t}px`)}),this.filter("emit",e=>{if(e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}})}continue(){let{clientWidth:t}=this.$player;return this.filter("stop",e=>{if(this.setState(e,"emit"),e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}}),this}suspend(){let{clientWidth:t}=this.$player;return this.filter("emit",e=>{if(this.setState(e,"stop"),0===e.mode){let 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"}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}i.default=r},{"./bilibili":"f83sx","bundle-text:./worker":"lfIAi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f83sx:[function(t,e,i,a){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function o(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function s(t){if("string"!=typeof t)return[];let e=new RegExp(/(?.+?)<\/d>/gs);return Array.from(t.matchAll(e)).map(t=>{let e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:o(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null}).filter(Boolean)}function l({data:t}){let{xml:e,id:i}=t;if(!i||!e)return;let a=s(e);self.postMessage({danmus:a,id:i})}function r(t){return new Promise(async e=>{let i=await fetch(t),a=await i.text();try{let t=function(){let t=new Blob([` ${o.toString()} ${s.toString()} onmessage = ${l.toString()} `],{type:"application/javascript"});return new Worker(URL.createObjectURL(t))}();t.onmessage=i=>{let{danmus:a,id:n}=i.data;n&&a&&(e(a),t.terminate())},t.postMessage({xml:a,id:Date.now()})}catch(t){e(s(a))}})}n.defineInteropFlag(i),n.export(i,"bilibiliDanmuParseFromUrl",()=>r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(t,e,i,a){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||Object.prototype.hasOwnProperty.call(e,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})}},{}],lfIAi:[function(t,e,i,a){e.exports='!function(e,t,i,o,n,r,f,d){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof l[o]&&l[o],h=u.i||{},p=u.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,i){if(!p[t]){if(!e[t]){if(n[t])return n[t];var r="function"==typeof l[o]&&l[o];if(!i&&r)return r(t,!0);if(u)return u(t,!0);if(s&&"string"==typeof t)return s(t);var f=Error("Cannot find module \'"+t+"\'");throw f.code="MODULE_NOT_FOUND",f}h.resolve=function(i){var o=e[t][1][i];return null!=o?o:i},h.cache={};var d=p[t]=new a.Module(t);e[t][0].call(d.exports,h,d,d.exports,l)}return p[t].exports;function h(e){var t=h.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.require=s,this.exports={}},a.modules=e,a.cache=p,a.parent=u,a.distDir=void 0,a.publicUrl=void 0,a.devServer=void 0,a.i=h,a.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(a,"root",{get:function(){return l[o]}}),l[o]=a;for(var c=0;ct.mode===e.mode&&t.top<=d).sort((e,t)=>e.top-t.top);if(0===l.length)if(2===e.mode)return d-e.height;else return r;if(l.unshift({type:"top",top:0,left:0,right:0,height:r,width:i,speed:0,distance:i}),l.push({type:"bottom",top:d,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===e.mode)for(let t=l.length-2;t>=0;t-=1){let i=l[t],o=l[t+1],n=i.top+i.height;if(o.top-n>=e.height)return o.top-e.height}else for(let t=1;t=e.height)return n}let u=[];for(let e=1;et.every(t=>!(it.time))));return t&&t[0]?t[0].top:void 0}case 1:case 2:return}else{switch(e.mode){case 0:u.sort((e,t)=>{let i=Math.min(...t.map(e=>e.right)),o=Math.min(...e.map(e=>e.right));return i*t.length-o*e.length});break;case 1:case 2:u.sort((e,t)=>{let i=Math.max(...t.map(e=>e.width));return Math.max(...e.map(e=>e.width))*e.length-i*t.length})}return u[0][0].top}}onmessage=e=>{let{data:t}=e;if(!t.id||!t.type)return;let i=(0,({getDanmuTop:n})[t.type])(t);self.postMessage({result:i,id:t.id})}},{}]},["59OZS"],"59OZS","parcelRequire4dc0",{});'},{}],lO8OT:[function(t,e,i,a){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=t("bundle-text:./style.less"),s=n.interopDefault(o),l=t("bundle-text:./img/on.svg"),r=n.interopDefault(l),d=t("bundle-text:./img/off.svg"),p=n.interopDefault(d),u=t("bundle-text:./img/config.svg"),h=n.interopDefault(u),m=t("bundle-text:./img/style.svg"),c=n.interopDefault(m),f=t("bundle-text:./img/mode_0_off.svg"),g=n.interopDefault(f),y=t("bundle-text:./img/mode_0_on.svg"),v=n.interopDefault(y),x=t("bundle-text:./img/mode_1_off.svg"),k=n.interopDefault(x),b=t("bundle-text:./img/mode_1_on.svg"),$=n.interopDefault(b),w=t("bundle-text:./img/mode_2_off.svg"),M=n.interopDefault(w),E=t("bundle-text:./img/mode_2_on.svg"),S=n.interopDefault(E),D=t("bundle-text:./img/check_on.svg"),A=n.interopDefault(D),z=t("bundle-text:./img/check_off.svg"),F=n.interopDefault(z);if(i.default=class{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;let{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:r.default,$off:p.default,$config:h.default,$style:c.default,$mode_0_off:g.default,$mode_0_on:v.default,$mode_1_off:k.default,$mode_1_on:$.default,$mode_2_off:M.default,$mode_2_on:S.default,$check_on:A.default,$check_off:F.default}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){let{option:t}=this;return`
${r.default}${p.default}
${h.default}
\u{6309}\u{7C7B}\u{578B}\u{5C4F}\u{853D}
${g.default}${v.default}
\u{6EDA}\u{52A8}
${k.default}${$.default}
\u{9876}\u{90E8}
${M.default}${S.default}
\u{5E95}\u{90E8}
${A.default}${F.default} \u{9632}\u{6B62}\u{5F39}\u{5E55}\u{91CD}\u{53E0}
${A.default}${F.default} \u{540C}\u{6B65}\u{89C6}\u{9891}\u{901F}\u{5EA6}
\u{4E0D}\u{900F}\u{660E}\u{5EA6}
\u{672A}\u{77E5}
\u{663E}\u{793A}\u{533A}\u{57DF}
\u{672A}\u{77E5}
\u{5F39}\u{5E55}\u{5B57}\u{53F7}
\u{672A}\u{77E5}
\u{5F39}\u{5E55}\u{901F}\u{5EA6}
\u{672A}\u{77E5}
${c.default}
\u{6A21}\u{5F0F}
${v.default}
\u{6EDA}\u{52A8}
${$.default}
\u{9876}\u{90E8}
${S.default}
\u{5E95}\u{90E8}
\u{989C}\u{8272}
${this.COLOR.map(t=>`
`).join("")}
\u{53D1}\u{9001}
`}get OPACITY(){return{min:0,max:100,steps:[],...this.option.OPACITY}}get FONT_SIZE(){return{min:12,max:120,steps:[],...this.option.FONT_SIZE}}get MARGIN(){return{min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}],...this.option.MARGIN}}get SPEED(){return{min:0,max:4,steps:[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}],...this.option.SPEED}}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){let{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){let{append:i}=this.utils;[...t.children].some(t=>t===e)||i(t,e)}setData(t,e){let{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){let{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");let{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"关闭弹幕")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"打开弹幕")})}createEvents(){let{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:o,$send:s,$input:l}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{let e=t.target.closest(".apd-mode");if(!e)return;let i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(o,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{let e=t.target.closest(".apd-mode");if(!e)return;let i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{let e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(s,"click",()=>this.emit()),this.art.proxy(l,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider({...this.OPACITY,container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{let{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}}),this.slider.margin=this.createSlider({...this.MARGIN,container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{let e=this.MARGIN.steps[t];if(!e)return;let{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}}),this.slider.fontSize=this.createSlider({...this.FONT_SIZE,container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{let{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}}),this.slider.speed=this.createSlider({...this.SPEED,container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{let e=this.SPEED.steps[t];if(!e)return;let{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}})}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:o=[]}){let{query:s,clamp:l,setStyle:r}=this.utils;r(i,"touch-action","none"),i.innerHTML=`
${o.map(()=>'
').join("")}
${o.map(t=>t.hide?"":`
${t.name}
`).join("")}
`;let d=s(".apd-slider-dot",i),p=s(".apd-slider-progress",i),u=!1;function h(i=a()){if(ie)return;let s=(i-t)/(e-t);d.style.left=`${100*s}%`,0===o.length&&(p.style.width=d.style.left),n(i)}function m(a){let{top:n,height:o,left:s,width:r}=i.getBoundingClientRect();this.art.isRotate?h(Math.round(l(a.clientY-n,0,o)/o*(e-t)+t)):h(Math.round(l(a.clientX-s,0,r)/r*(e-t)+t))}return this.art.proxy(i,"click",t=>{m.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{u=0===t.button}),this.art.proxy(document,"pointermove",t=>{u&&m.call(this,t)}),this.art.proxy(document,"pointerup",t=>{u&&(u=!1,m.call(this,t))}),{reset:h}}onFullscreen(t){let{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){let{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=i.getBoundingClientRect(),s=n.width/2-a.width/2,l=o.left-(a.left-s),r=a.right+s-o.right;l>0?e.style.left=`${-s+l}px`:r>0?e.style.left=`${-s-r}px`:e.style.left=`${-s}px`}async emit(){let{$input:t}=this.template,e=t.value.trim();if(!e.length||this.isLock||this.emitting)return;let i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;let e=await this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(t){this.emitting=!1}}lock(){let{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.innerText=i,t(e,"apd-lock");let a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(e.innerText=i-=1,a())},1e3)};a()}unlock(){let{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.innerText="发送",t(e,"apd-lock")}resize(){if(this.outside||this.art.fullscreen||this.art.fullscreenWeb)return;let{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());n&&t(n,"apd-active"),e(i,this.option.visible?"关闭弹幕":"打开弹幕"),this.resize()}mount(t){let{errorHandle:e}=this.utils,i="string"==typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}},"undefined"!=typeof document){let t="artplayer-plugin-danmuku",e=document.getElementById(t);e||((e=document.createElement("style")).id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent=s.default}},{"bundle-text:./style.less":"hViDo","bundle-text:./img/on.svg":"9pjcf","bundle-text:./img/off.svg":"b2dkP","bundle-text:./img/config.svg":"l8tyy","bundle-text:./img/style.svg":"5iZC3","bundle-text:./img/mode_0_off.svg":"i0Vut","bundle-text:./img/mode_0_on.svg":"hOSvZ","bundle-text:./img/mode_1_off.svg":"bOXC3","bundle-text:./img/mode_1_on.svg":"lKuh0","bundle-text:./img/mode_2_off.svg":"eB8W6","bundle-text:./img/mode_2_on.svg":"bpe2E","bundle-text:./img/check_on.svg":"kL9zy","bundle-text:./img/check_off.svg":"22xpM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hViDo:[function(t,e,i,a){e.exports='.artplayer-plugin-danmuku{z-index:99;color:#fff;flex-shrink:0;justify-content:center;align-items:center;gap:10px;width:100%;height:32px;font-size:12px;font-weight:300;display:flex;position:relative}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;fill:#fff;transition:all .2s}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{opacity:0;pointer-events:none;width:320px;padding:10px;position:absolute;bottom:24px;left:0}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{background-color:#000000d9;border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{align-items:center;gap:20px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{align-items:center;gap:12px;display:flex}.artplayer-plugin-danmuku .apd-config-slider .apd-value{text-align:right;width:32px}.artplayer-plugin-danmuku .apd-slider{cursor:pointer;flex:1;justify-content:center;align-items:center;height:20px;display:flex;position:relative}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{background-color:#ffffff40;border-radius:3px;width:100%;height:2px;position:relative;overflow:hidden}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{justify-content:space-between;align-items:center;display:flex;position:absolute;inset:0}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{background-color:#ffffff80;border-radius:50%;width:2px;height:2px}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{background-color:#00a1d6;width:0%;height:100%}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{background-color:#00a1d6;border-radius:50%;width:12px;height:12px;position:absolute;left:0%;transform:translate(-6px)}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{color:#777;justify-content:space-between;align-items:center;width:calc(100% + 32px);display:flex;position:absolute;bottom:-12px}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{text-align:center;flex-shrink:0;width:36px;scale:.95}.artplayer-plugin-danmuku .apd-config-other{align-items:center;gap:20px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{cursor:pointer;align-items:center;gap:2px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{background-color:#ffffff40;border-radius:5px;flex:1;align-items:center;height:100%;display:flex}.artplayer-plugin-danmuku .apd-style{justify-content:center;align-items:center;display:flex;position:relative}.artplayer-plugin-danmuku .apd-style .apd-style-panel{opacity:0;pointer-events:none;width:200px;padding:10px;position:absolute;bottom:24px;left:0}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{background-color:#000000d9;border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{flex-wrap:wrap;gap:8px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-colors .apd-color{cursor:pointer;border-radius:2px;width:16px;height:16px}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid #000;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{color:#fff;background-color:#0000;border:none;outline:none;flex:1;width:auto;min-width:0;height:100%;line-height:1}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{cursor:pointer;width:60px;height:100%;text-shadow:none;background-color:#00a1d6;border-top-right-radius:5px;border-bottom-right-radius:5px;flex-shrink:0;justify-content:center;align-items:center;display:flex}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{flex:none;width:260px}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{gap:16px;height:38px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{flex:none;width:400px}.art-video-player>.artplayer-plugin-danmuku{padding:0 10px;position:absolute;bottom:-40px;left:0;right:0}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"9pjcf":[function(t,e,i,a){e.exports=''},{}],b2dkP:[function(t,e,i,a){e.exports=''},{}],l8tyy:[function(t,e,i,a){e.exports=''},{}],"5iZC3":[function(t,e,i,a){e.exports=''},{}],i0Vut:[function(t,e,i,a){e.exports=''},{}],hOSvZ:[function(t,e,i,a){e.exports=''},{}],bOXC3:[function(t,e,i,a){e.exports=''},{}],lKuh0:[function(t,e,i,a){e.exports=''},{}],eB8W6:[function(t,e,i,a){e.exports=''},{}],bpe2E:[function(t,e,i,a){e.exports=''},{}],kL9zy:[function(t,e,i,a){e.exports=''},{}],"22xpM":[function(t,e,i,a){e.exports=''},{}],"8AxLD":[function(t,e,i,a){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",()=>l);let o={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){let a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}},s=(t,e)=>{let i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),angle:Math.atan2(a,i)}};function l(t,e,i){let{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let l=null,r=null;function d(p=[]){if(l=null,r=null,n.innerHTML="",!t.duration||t.option.isLive)return;let u={w:n.offsetWidth,h:n.offsetHeight},h={xMin:0,xMax:u.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*u.h),sampling:Math.floor(u.w/100),smoothing:.2,flattening:.2};"object"==typeof i&&Object.assign(h,i);let m=[];if(Array.isArray(p)&&p.length)m=[...p];else{let i=t.duration/u.w;for(let t=0;t<=u.w;t+=h.sampling){let a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+h.sampling)*i).length;m.push([t,a])}}if(0===m.length)return;let c=m[m.length-1],f=c[0],g=c[1];f!==u.w&&m.push([u.w,g]);let y=m.map(t=>t[1]),v=(Math.min(...y)+Math.max(...y))/2;for(let t=0;tv?1+h.scale:1-h.scale)+h.minHeight}let x=(t,e,i,a)=>{let n=s(e||t,i||t),l=o.map(Math.cos(n.angle)*h.flattening,0,1,1,0),r=n.angle*l+(a?Math.PI:0),d=n.length*h.smoothing;return[t[0]+Math.cos(r)*d,t[1]+Math.sin(r)*d]},k=(t,e,i)=>{let a=x(i[e-1],i[e-2],t),n=x(t,i[e-1],i[e+1],!0),o=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${o}`},b=m.map(t=>[o.map(t[0],h.xMin,h.xMax,0,u.w),o.map(t[1],h.yMin,h.yMax,u.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${u.h} L ${e[0]},${u.h} L ${e[0]},${e[1]}`:`${t} ${k(e,i,a)}`,"");n.innerHTML=``,l=a("#heatmap-start",n),r=a("#heatmap-stop",n),l.setAttribute("offset",`${100*t.played}%`),r.setAttribute("offset",`${100*t.played}%`)}t.on("video:timeupdate",()=>{l&&r&&(l.setAttribute("offset",`${100*t.played}%`),r.setAttribute("offset",`${100*t.played}%`))}),t.on("setBar",(t,e)=>{l&&r&&"played"===t&&(l.setAttribute("offset",`${100*e}%`),r.setAttribute("offset",`${100*e}%`))}),t.on("ready",()=>d()),t.on("resize",()=>d()),t.on("artplayerPluginDanmuku:loaded",()=>d()),t.on("artplayerPluginDanmuku:points",t=>d(t))}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["bgm6t"],"bgm6t","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-danmuku.legacy.js b/docs/compiled/artplayer-plugin-danmuku.legacy.js index 2b62561b5..1634220b0 100644 --- a/docs/compiled/artplayer-plugin-danmuku.legacy.js +++ b/docs/compiled/artplayer-plugin-danmuku.legacy.js @@ -1,8 +1,8 @@ /*! - * artplayer-plugin-danmuku.js v5.1.5 + * artplayer-plugin-danmuku.js v5.1.6 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,r,a){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[r]&&o[r],s=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!s[t]){if(!e[t]){var a="function"==typeof o[r]&&o[r];if(!n&&a)return a(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var p=s[t]=new u.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=i,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return o[r]}}),o[r]=u;for(var c=0;c=n.time&&n.time>=e-.1&&t.push(n)}),t}},{key:"visibles",get:function(){var e=this,t=[],n=this.$player.clientWidth,r=this.getLeft(this.$player);return this.filter("emit",function(a){var o=a.$ref.offsetTop,i=e.getLeft(a.$ref)-r,s=a.$ref.clientHeight,l=a.$ref.clientWidth,u=i+l,c=u/a.$restTime,p={};p.top=o,p.left=i,p.height=s,p.width=l,p.right=n-u,p.speed=c,p.distance=u,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}},{key:"speed",get:function(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}},{key:"load",value:function(e){var t=this;return(0,a._)(function(){var n,r,a,o,i,s;return(0,u._)(this,function(l){switch(l.label){case 0:n=t.utils.errorHandle,r=[],a=e||t.option.danmuku,l.label=1;case 1:if(l.trys.push([1,13,,14]),"function"!=typeof a)return[3,3];return[4,a()];case 2:case 4:case 6:return r=l.sent(),[3,8];case 3:if(!(a instanceof Promise))return[3,5];return[4,a];case 5:if("string"!=typeof a)return[3,7];return[4,(0,c.bilibiliDanmuParseFromUrl)(a)];case 7:Array.isArray(a)&&(r=a),l.label=8;case 8:n(Array.isArray(r),"Danmuku need return an array as result"),void 0===e&&(t.reset(),t.queue=[],t.states={wait:[],ready:[],emit:[],stop:[]},t.$refs=[],t.$danmuku.innerText=""),o=0,l.label=9;case 9:if(!(o0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(n){t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var r=e.data;r.id===t.id&&n(r)}})}},{key:"filter",value:function(e,t){for(var n=this.states[e]||[],r=0;rt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function u(e,t,n,r){var a,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,r){t(n,r,e)}}function p(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,p=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),d=!1,f=n.length-1;f>=0;f--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var y=(0,n[f])("accessor"===l?{get:p.get,set:p.set}:p[u],h);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(s=i(y.get))&&(p.get=s),(s=i(y.set))&&(p.set=s),(s=i(y.init))&&a.unshift(s)}else(s=i(y))&&("field"===l?a.unshift(s):p[u]=s)}c&&Object.defineProperty(c,r.name,p),d=!0}function d(e,t,n){for(var r=arguments.length>2,a=0;a0&&a[a.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function k(){for(var e=[],t=0;t1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{var n;(n=a[e](t)).value instanceof $?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function S(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:$(e[r](t)),done:!1}:a?a(t):t}:a}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,a,(t=e[n](t)).done,t.value)})}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&v(t,e,n);return P(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function A(e,t,n,r,a){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n}function z(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function I(e,t,n){if(null!=t){var r,a;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(n){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(a=r)}if("function"!=typeof r)throw TypeError("Object not disposable.");a&&(r=function(){try{a.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var C="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function R(e){function t(t){e.error=e.hasError?new C(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var a=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(a).then(n,function(e){return t(e),n()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}n.default={__extends:i,__assign:s,__rest:l,__decorate:u,__param:c,__metadata:m,__awaiter:y,__generator:g,__createBinding:v,__exportStar:_,__values:b,__read:x,__spread:k,__spreadArrays:w,__spreadArray:j,__await:$,__asyncGenerator:O,__asyncDelegator:S,__asyncValues:D,__makeTemplateObject:M,__importStar:F,__importDefault:E,__classPrivateFieldGet:T,__classPrivateFieldSet:A,__classPrivateFieldIn:z,__addDisposableResource:I,__disposeResources:R}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}r.defineInteropFlag(n),r.export(n,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kMsXR:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"bilibiliDanmuParseFromUrl",function(){return u});var a=e("@swc/helpers/_/_async_to_generator"),o=e("@swc/helpers/_/_ts_generator");function i(e){switch(e){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function s(e){if("string"!=typeof e)return[];var t=new RegExp(RegExp('(?.+?)<\\/d>',"gs"));return Array.from(e.matchAll(t)).map(function(e){var t=e.groups.p.split(",");return t.length>=8?{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(t[0]),mode:i(Number(t[1])),fontSize:Number(t[2]),color:"#".concat(Number(t[3]).toString(16)),timestamp:Number(t[4]),pool:Number(t[5]),userID:t[6],rowID:Number(t[7])}:null}).filter(Boolean)}function l(e){var t=e.data,n=t.xml,r=t.id;if(r&&n){var a=s(n);self.postMessage({danmus:a,id:r})}}function u(e){var t;return new Promise((t=(0,a._)(function(t){var n,r;return(0,o._)(this,function(a){switch(a.label){case 0:return[4,fetch(e)];case 1:return[4,a.sent().text()];case 2:n=a.sent();try{var o;o=new Blob(["\n ".concat(i.toString(),"\n ").concat(s.toString(),"\n onmessage = ").concat(l.toString(),"\n ")],{type:"application/javascript"}),(r=new Worker(URL.createObjectURL(o))).onmessage=function(e){var n=e.data,a=n.danmus;n.id&&a&&(t(a),r.terminate())},r.postMessage({xml:n,id:Date.now()})}catch(e){t(s(n))}return[2]}})}),function(e){return t.apply(this,arguments)}))}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1gMd5":[function(e,t,n){t.exports='!function(e,r,t,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],s=i.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(r,t){if(!s[r]){if(!e[r]){var o="function"==typeof a[n]&&a[n];if(!t&&o)return o(r,!0);if(i)return i(r,!0);if(u&&"string"==typeof r)return u(r);var f=Error("Cannot find module \'"+r+"\'");throw f.code="MODULE_NOT_FOUND",f}c.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},c.cache={};var p=s[r]=new l.Module(r);e[r][0].call(p.exports,c,p,p.exports,this)}return s[r].exports;function c(e){var r=c.resolve(e);return!1===r?{}:l(r)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=s,l.parent=i,l.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(l,"root",{get:function(){return a[n]}}),a[n]=l;for(var f=0;f=0;p-=1){var c=f[p],d=f[p+1],h=c.top+c.height;if(d.top-h>=r.height)return d.top-r.height}else for(var _=1;_=r.height)return g}for(var j=[],v=1;ve.time)})});return x&&x[0]?x[0].top:void 0;case 1:case 2:return}else{switch(r.mode){case 0:j.sort(function(e,r){var t,o,a=(t=Math).min.apply(t,(0,n._)(r.map(function(e){return e.right}))),i=(o=Math).min.apply(o,(0,n._)(e.map(function(e){return e.right})));return a*r.length-i*e.length});break;case 1:case 2:j.sort(function(e,r){var t,o,a=(t=Math).max.apply(t,(0,n._)(r.map(function(e){return e.width})));return(o=Math).max.apply(o,(0,n._)(e.map(function(e){return e.width})))*e.length-a*r.length})}return j[0][0].top}}onmessage=function(e){var r=e.data;if(r.id&&r.type){var t=(0,({getDanmuTop:o})[r.type])(r);self.postMessage({result:t,id:r.id})}}},{"@swc/helpers/_/_to_consumable_array":"iwLF0"}],iwLF0:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return u});var o=e("./_array_without_holes.js"),a=e("./_iterable_to_array.js"),i=e("./_non_iterable_spread.js"),s=e("./_unsupported_iterable_to_array.js");function u(e){return(0,o._)(e)||(0,a._)(e)||(0,s._)(e)||(0,i._)()}},{"./_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(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return a});var o=e("./_array_like_to_array.js");function a(e){if(Array.isArray(e))return(0,o._)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t\n '.concat(h.default).concat(y.default,'\n\n
\n ').concat(v.default,'\n
\n
\n
\n 按类型屏蔽\n
\n
\n ').concat(k.default).concat(j.default,'\n
滚动
\n
\n
\n ').concat(O.default).concat(D.default,'\n
顶部
\n
\n
\n ').concat(P.default).concat(E.default,'\n
底部
\n
\n
\n
\n
\n
\n ').concat(A.default).concat(I.default,'\n 防止弹幕重叠\n
\n
\n ').concat(A.default).concat(I.default,'\n 同步视频速度\n
\n
\n
\n 不透明度\n
\n
未知
\n
\n
\n 显示区域\n
\n
未知
\n
\n
\n 弹幕字号\n
\n
未知
\n
\n
\n 弹幕速度\n
\n
未知
\n
\n
\n
\n
\n
\n
\n ').concat(b.default,'\n
\n
\n
\n 模式\n
\n
\n ').concat(j.default,'\n
滚动
\n
\n
\n ').concat(D.default,'\n
顶部
\n
\n
\n ').concat(E.default,'\n
底部
\n
\n
\n
\n
\n 颜色\n
\n ').concat(this.COLOR.map(function(e){return'
')}).join(""),'\n
\n
\n
\n
\n
\n\n
发送
\n
\n ')}},{key:"OPACITY",get:function(){return(0,s._)({min:0,max:100,steps:[]},this.option.OPACITY)}},{key:"FONT_SIZE",get:function(){return(0,s._)({min:12,max:120,steps:[]},this.option.FONT_SIZE)}},{key:"MARGIN",get:function(){return(0,s._)({min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}]},this.option.MARGIN)}},{key:"SPEED",get:function(){return(0,s._)({min:0,max:4,steps:[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}]},this.option.SPEED)}},{key:"COLOR",get:function(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}},{key:"query",value:function(e){return(0,this.utils.query)(e,this.template.$danmuku)}},{key:"append",value:function(e,t){var n=this.utils.append;(0,u._)(e.children).some(function(e){return e===t})||n(e,t)}},{key:"setData",value:function(e,t){var n=this.art.template.$player,r=this.template.$mount;n.dataset[e]=t,this.outside&&(r.dataset[e]=t)}},{key:"createTemplate",value:function(){var e=this.utils,t=e.createElement,n=e.tooltip,r=t("div");r.className="artplayer-plugin-danmuku",r.innerHTML=this.TEMPLATE,this.template.$danmuku=r,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");var a=this.template.$toggle;this.art.on("artplayerPluginDanmuku:show",function(){n(a,"关闭弹幕")}),this.art.on("artplayerPluginDanmuku:hide",function(){n(a,"打开弹幕")})}},{key:"createEvents",value:function(){var e=this,t=this.template,n=t.$toggle,r=t.$configModes,a=t.$styleModes,o=t.$colors,i=t.$antiOverlap,s=t.$syncVideo,l=t.$send,c=t.$input;this.art.proxy(n,"click",function(){e.danmuku.config({visible:!e.option.visible}),e.reset()}),this.art.proxy(r,"click",function(t){var n=t.target.closest(".apd-mode");if(n){var r=Number(n.dataset.mode);e.option.modes.includes(r)?e.danmuku.config({modes:e.option.modes.filter(function(e){return e!==r})}):e.danmuku.config({modes:(0,u._)(e.option.modes).concat([r])}),e.reset()}}),this.art.proxy(i,"click",function(){e.danmuku.config({antiOverlap:!e.option.antiOverlap}),e.reset()}),this.art.proxy(s,"click",function(){e.danmuku.config({synchronousPlayback:!e.option.synchronousPlayback}),e.reset()}),this.art.proxy(a,"click",function(t){var n=t.target.closest(".apd-mode");if(n){var r=Number(n.dataset.mode);e.danmuku.config({mode:r}),e.reset()}}),this.art.proxy(o,"click",function(t){var n=t.target.closest(".apd-color");n&&(e.danmuku.config({color:n.dataset.color}),e.reset())}),this.art.proxy(l,"click",function(){return e.emit()}),this.art.proxy(c,"keypress",function(t){"Enter"===t.key&&(t.preventDefault(),e.emit())})}},{key:"createSliders",value:function(){var e=this;this.slider.opacity=this.createSlider((0,l._)((0,s._)({},this.OPACITY),{container:this.template.$opacitySlider,findIndex:function(){return Math.round(100*e.option.opacity)},onChange:function(t){e.template.$opacityValue.textContent="".concat(t,"%"),e.danmuku.config({opacity:t/100})}})),this.slider.margin=this.createSlider((0,l._)((0,s._)({},this.MARGIN),{container:this.template.$marginSlider,findIndex:function(){return e.MARGIN.steps.findIndex(function(t){return t.value[0]===e.option.margin[0]&&t.value[1]===e.option.margin[1]})},onChange:function(t){var n=e.MARGIN.steps[t];n&&(e.template.$marginValue.textContent=n.name,e.danmuku.config({margin:n.value}))}})),this.slider.fontSize=this.createSlider((0,l._)((0,s._)({},this.FONT_SIZE),{container:this.template.$fontSizeSlider,findIndex:function(){return e.danmuku.fontSize},onChange:function(t){e.template.$fontSizeValue.textContent="".concat(t,"px"),t!==e.danmuku.fontSize&&e.danmuku.config({fontSize:t})}})),this.slider.speed=this.createSlider((0,l._)((0,s._)({},this.SPEED),{container:this.template.$speedSlider,findIndex:function(){return e.SPEED.steps.findIndex(function(t){return t.value===e.option.speed})},onChange:function(t){var n=e.SPEED.steps[t];n&&(e.template.$speedValue.textContent=n.name,e.danmuku.config({speed:n.value}))}}))}},{key:"createSlider",value:function(e){var t=this,n=e.min,r=e.max,a=e.container,o=e.findIndex,i=e.onChange,s=e.steps,l=void 0===s?[]:s,u=this.utils,c=u.query,p=u.clamp;(0,u.setStyle)(a,"touch-action","none"),a.innerHTML='\n
\n
\n '.concat(l.map(function(){return'
'}).join(""),'\n
\n
\n
\n
\n
\n ').concat(l.map(function(e){return e.hide?"":'
'.concat(e.name,"
")}).join(""),"\n
\n ");var d=c(".apd-slider-dot",a),f=c(".apd-slider-progress",a),h=!1;function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();if(!(er)){var t=(e-n)/(r-n);d.style.left="".concat(100*t,"%"),0===l.length&&(f.style.width=d.style.left),i(e)}}function y(e){var t=a.getBoundingClientRect(),o=t.top,i=t.height,s=t.left,l=t.width;this.art.isRotate?m(Math.round(p(e.clientY-o,0,i)/i*(r-n)+n)):m(Math.round(p(e.clientX-s,0,l)/l*(r-n)+n))}return this.art.proxy(a,"click",function(e){y.call(t,e)}),this.art.proxy(a,"pointerdown",function(e){h=0===e.button}),this.art.proxy(document,"pointermove",function(e){h&&y.call(t,e)}),this.art.proxy(document,"pointerup",function(e){h&&(h=!1,y.call(t,e))}),{reset:m}}},{key:"onFullscreen",value:function(e){var t=this.template,n=t.$danmuku,r=t.$controlsCenter,a=t.$mount;this.outside?e?this.append(r,n):this.append(a,n):this.append(r,n)}},{key:"onMouseEnter",value:function(e){var t=e.$control,n=e.$panel,r=this.art.template.$player,a=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=r.getBoundingClientRect(),s=o.width/2-a.width/2,l=i.left-(a.left-s),u=a.right+s-i.right;l>0?n.style.left="".concat(-s+l,"px"):u>0?n.style.left="".concat(-s-u,"px"):n.style.left="".concat(-s,"px")}},{key:"emit",value:function(){var e=this;return(0,a._)(function(){var t,n,r,a;return(0,c._)(this,function(o){switch(o.label){case 0:if(!(n=(t=e.template.$input).value.trim()).length||e.isLock||e.emitting)return[2];r={text:n,mode:e.option.mode,color:e.option.color,time:e.art.currentTime},o.label=1;case 1:return o.trys.push([1,3,,4]),e.emitting=!0,[4,e.option.beforeEmit(r)];case 2:if(a=o.sent(),e.emitting=!1,!0!==a)return[2];return r.border=!0,delete r.time,e.danmuku.emit(r),t.value="",e.lock(),[3,4];case 3:return o.sent(),e.emitting=!1,[3,4];case 4:return[2]}})})()}},{key:"lock",value:function(){var e=this,t=this.utils.addClass,n=this.template.$send;this.isLock=!0;var r=this.option.lockTime;n.innerText=r,t(n,"apd-lock");var a=function(){e.timer=setTimeout(function(){0===r?e.unlock():(r-=1,n.innerText=r,a())},1e3)};a()}},{key:"unlock",value:function(){var e=this.utils.removeClass,t=this.template.$send;clearTimeout(this.timer),this.isLock=!1,t.innerText="发送",e(t,"apd-lock")}},{key:"resize",value:function(){if(!this.outside&&!this.art.fullscreen&&!this.art.fullscreenWeb){var e=this.art.template,t=e.$player,n=e.$controlsCenter,r=this.template.$danmuku;this.art.widthe.length)&&(t=e.length);for(var n=0,r=Array(t);n.artplayer-plugin-danmuku{padding:0 10px;position:absolute;bottom:-40px;left:0;right:0}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"4mwSI":[function(e,t,n){t.exports=''},{}],"9bQDs":[function(e,t,n){t.exports=''},{}],cciuY:[function(e,t,n){t.exports=''},{}],e5G6o:[function(e,t,n){t.exports=''},{}],fC4yA:[function(e,t,n){t.exports=''},{}],fUkVg:[function(e,t,n){t.exports=''},{}],isoJm:[function(e,t,n){t.exports=''},{}],"20nBM":[function(e,t,n){t.exports=''},{}],"6x9CL":[function(e,t,n){t.exports=''},{}],"7GKdL":[function(e,t,n){t.exports=''},{}],"9SCIh":[function(e,t,n){t.exports=''},{}],"6KRxn":[function(e,t,n){t.exports=''},{}],dXFn2:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"default",function(){return s});var a=e("@swc/helpers/_/_to_consumable_array"),o={map:function(e,t,n,r,a){return(e-t)*(a-r)/(n-t)+r}},i=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),angle:Math.atan2(r,n)}};function s(e,t,n){var r=e.constructor.utils.query;e.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted:function(s){var l=null,u=null;function c(){var c,p,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(l=null,u=null,s.innerHTML="",e.duration&&!e.option.isLive){var f={w:s.offsetWidth,h:s.offsetHeight},h={xMin:0,xMax:f.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*f.h),sampling:Math.floor(f.w/100),smoothing:.2,flattening:.2};"object"==typeof n&&Object.assign(h,n);var m=[];if(Array.isArray(d)&&d.length)m=(0,a._)(d);else for(var y=function(e){var n=t.queue.filter(function(t){var n=t.time;return n>e*g&&n<=(e+h.sampling)*g}).length;m.push([e,n])},g=e.duration/f.w,v=0;v<=f.w;v+=h.sampling)y(v);if(0!==m.length){var _=m[m.length-1],b=_[0],x=_[1];b!==f.w&&m.push([f.w,x]);for(var k=m.map(function(e){return e[1]}),w=((c=Math).min.apply(c,(0,a._)(k))+(p=Math).max.apply(p,(0,a._)(k)))/2,j=0;jw?1+h.scale:1-h.scale)+h.minHeight}var S=function(e,t,n,r){var a=i(t||e,n||e),s=o.map(Math.cos(a.angle)*h.flattening,0,1,1,0),l=a.angle*s+(r?Math.PI:0),u=a.length*h.smoothing;return[e[0]+Math.cos(l)*u,e[1]+Math.sin(l)*u]},D=function(e,t,n){var r=S(n[t-1],n[t-2],e),a=S(e,n[t-1],n[t+1],!0),o=t===n.length-1?" z":"";return"C ".concat(r[0],",").concat(r[1]," ").concat(a[0],",").concat(a[1]," ").concat(e[0],",").concat(e[1]).concat(o)},M=m.map(function(e){return[o.map(e[0],h.xMin,h.xMax,0,f.w),o.map(e[1],h.yMin,h.yMax,f.h,0)]}).reduce(function(e,t,n,r){return 0===n?"M ".concat(r[r.length-1][0],",").concat(f.h," L ").concat(t[0],",").concat(f.h," L ").concat(t[0],",").concat(t[1]):"".concat(e," ").concat(D(t,n,r))},"");s.innerHTML='\n\n\n\n\n\n\n\n\n\n\n\n '),l=r("#heatmap-start",s),u=r("#heatmap-stop",s),l.setAttribute("offset","".concat(100*e.played,"%")),u.setAttribute("offset","".concat(100*e.played,"%"))}}}e.on("video:timeupdate",function(){l&&u&&(l.setAttribute("offset","".concat(100*e.played,"%")),u.setAttribute("offset","".concat(100*e.played,"%")))}),e.on("setBar",function(e,t){l&&u&&"played"===e&&(l.setAttribute("offset","".concat(100*t,"%")),u.setAttribute("offset","".concat(100*t,"%")))}),e.on("ready",function(){return c()}),e.on("resize",function(){return c()}),e.on("artplayerPluginDanmuku:loaded",function(){return c()}),e.on("artplayerPluginDanmuku:points",function(e){return c(e)})}})}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,r,a,o,i,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof l[r]&&l[r],c=u.i||{},p=u.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!p[t]){if(!e[t]){if(a[t])return a[t];var o="function"==typeof l[r]&&l[r];if(!n&&o)return o(t,!0);if(u)return u(t,!0);if(d&&"string"==typeof t)return d(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}c.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},c.cache={};var s=p[t]=new f.Module(t);e[t][0].call(s.exports,c,s,s.exports,l)}return p[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=d,this.exports={}},f.modules=e,f.cache=p,f.parent=u,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=c,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return l[r]}}),l[r]=f;for(var h=0;h=n.time&&n.time>=e-.1&&t.push(n)}),t}},{key:"visibles",get:function(){var e=this,t=[],n=this.$player.clientWidth,r=this.getLeft(this.$player);return this.filter("emit",function(a){var o=a.$ref.offsetTop,i=e.getLeft(a.$ref)-r,s=a.$ref.clientHeight,l=a.$ref.clientWidth,u=i+l,c=u/a.$restTime,p={};p.top=o,p.left=i,p.height=s,p.width=l,p.right=n-u,p.speed=c,p.distance=u,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}},{key:"speed",get:function(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}},{key:"load",value:function(e){var t=this;return(0,o._)(function(){var n,r,a,o,i,s;return(0,c._)(this,function(l){switch(l.label){case 0:n=t.utils.errorHandle,r=[],a=e||t.option.danmuku,l.label=1;case 1:if(l.trys.push([1,13,,14]),"function"!=typeof a)return[3,3];return[4,a()];case 2:case 4:case 6:return r=l.sent(),[3,8];case 3:if(!(a instanceof Promise))return[3,5];return[4,a];case 5:if("string"!=typeof a)return[3,7];return[4,(0,p.bilibiliDanmuParseFromUrl)(a)];case 7:Array.isArray(a)&&(r=a),l.label=8;case 8:n(Array.isArray(r),"Danmuku need return an array as result"),void 0===e&&(t.reset(),t.queue=[],t.states={wait:[],ready:[],emit:[],stop:[]},t.$refs=[],t.$danmuku.innerText=""),o=0,l.label=9;case 9:if(!(o0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(n){t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var r=e.data;r.id===t.id&&n(r)}})}},{key:"filter",value:function(e,t){for(var n=this.states[e]||[],r=0;rt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function c(e,t,n,r){var a,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(("undefined"==typeof Reflect?"undefined":(0,o._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function p(e,t){return function(n,r){t(n,r,e)}}function d(e,t,n,r,a,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",p=!t&&e?r.static?e:e.prototype:null,d=t||(p?Object.getOwnPropertyDescriptor(p,r.name):{}),f=!1,h=n.length-1;h>=0;h--){var m={};for(var y in r)m[y]="access"===y?{}:r[y];for(var y in r.access)m.access[y]=r.access[y];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var g=(0,n[h])("accessor"===u?{get:d.get,set:d.set}:d[c],m);if("accessor"===u){if(void 0===g)continue;if(null===g||(void 0===g?"undefined":(0,o._)(g))!=="object")throw TypeError("Object expected");(l=s(g.get))&&(d.get=l),(l=s(g.set))&&(d.set=l),(l=s(g.init))&&a.unshift(l)}else(l=s(g))&&("field"===u?a.unshift(l):d[c]=l)}p&&Object.defineProperty(p,r.name,d),f=!0}function f(e,t,n){for(var r=arguments.length>2,a=0;a0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function w(){for(var e=[],t=0;t1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{var n;(n=a[e](t)).value instanceof O?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function D(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:O(e[r](t)),done:!1}:a?a(t):t}:a}}function P(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=x(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){var o,i,s;o=r,i=a,s=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:s})},i)})}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var E=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},F=function(e){return(F=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=F(e),r=0;r(?.+?)<\\/d>',"gs"));return Array.from(e.matchAll(t)).map(function(e){var t=e.groups.p.split(",");return t.length>=8?{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(t[0]),mode:s(Number(t[1])),fontSize:Number(t[2]),color:"#".concat(Number(t[3]).toString(16)),timestamp:Number(t[4]),pool:Number(t[5]),userID:t[6],rowID:Number(t[7])}:null}).filter(Boolean)}function u(e){var t=e.data,n=t.xml,r=t.id;if(r&&n){var a=l(n);self.postMessage({danmus:a,id:r})}}function c(e){var t;return new Promise((t=(0,o._)(function(t){var n,r;return(0,i._)(this,function(a){switch(a.label){case 0:return[4,fetch(e)];case 1:return[4,a.sent().text()];case 2:n=a.sent();try{var o;o=new Blob(["\n ".concat(s.toString(),"\n ").concat(l.toString(),"\n onmessage = ").concat(u.toString(),"\n ")],{type:"application/javascript"}),(r=new Worker(URL.createObjectURL(o))).onmessage=function(e){var n=e.data,a=n.danmus;n.id&&a&&(t(a),r.terminate())},r.postMessage({xml:n,id:Date.now()})}catch(e){t(l(n))}return[2]}})}),function(e){return t.apply(this,arguments)}))}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1gMd5":[function(e,t,n,r){t.exports='!function(e,r,t,n,o,i,a,s){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof u[n]&&u[n],f=l.i||{},p=l.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(r,t){if(!p[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof u[n]&&u[n];if(!t&&i)return i(r,!0);if(l)return l(r,!0);if(c&&"string"==typeof r)return c(r);var a=Error("Cannot find module \'"+r+"\'");throw a.code="MODULE_NOT_FOUND",a}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var s=p[r]=new d.Module(r);e[r][0].call(s.exports,f,s,s.exports,u)}return p[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:d(r)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=c,this.exports={}},d.modules=e,d.cache=p,d.parent=l,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return u[n]}}),u[n]=d;for(var h=0;h=0;p-=1){var c=f[p],d=f[p+1],h=c.top+c.height;if(d.top-h>=r.height)return d.top-r.height}else for(var _=1;_=r.height)return g}for(var j=[],v=1;ve.time))})});return x&&x[0]?x[0].top:void 0;case 1:case 2:return}else{switch(r.mode){case 0:j.sort(function(e,r){var t,n,i=(t=Math).min.apply(t,(0,o._)(r.map(function(e){return e.right}))),a=(n=Math).min.apply(n,(0,o._)(e.map(function(e){return e.right})));return i*r.length-a*e.length});break;case 1:case 2:j.sort(function(e,r){var t,n,i=(t=Math).max.apply(t,(0,o._)(r.map(function(e){return e.width})));return(n=Math).max.apply(n,(0,o._)(e.map(function(e){return e.width})))*e.length-i*r.length})}return j[0][0].top}}onmessage=function(e){var r=e.data;if(r.id&&r.type){var t=(0,({getDanmuTop:i})[r.type])(r);self.postMessage({result:t,id:r.id})}}},{"@swc/helpers/_/_to_consumable_array":"iwLF0"}],iwLF0:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return l});var i=e("./_array_without_holes.js"),a=e("./_iterable_to_array.js"),s=e("./_non_iterable_spread.js"),u=e("./_unsupported_iterable_to_array.js");function l(e){return(0,i._)(e)||(0,a._)(e)||(0,u._)(e)||(0,s._)()}},{"./_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(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return a});var i=e("./_array_like_to_array.js");function a(e){if(Array.isArray(e))return(0,i._)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t\n '.concat(m.default).concat(g.default,'\n\n
\n ').concat(_.default,'\n
\n
\n
\n 按类型屏蔽\n
\n
\n ').concat(w.default).concat($.default,'\n
滚动
\n
\n
\n ').concat(S.default).concat(P.default,'\n
顶部
\n
\n
\n ').concat(E.default).concat(T.default,'\n
底部
\n
\n
\n
\n
\n
\n ').concat(I.default).concat(C.default,'\n 防止弹幕重叠\n
\n
\n ').concat(I.default).concat(C.default,'\n 同步视频速度\n
\n
\n
\n 不透明度\n
\n
未知
\n
\n
\n 显示区域\n
\n
未知
\n
\n
\n 弹幕字号\n
\n
未知
\n
\n
\n 弹幕速度\n
\n
未知
\n
\n
\n
\n
\n
\n
\n ').concat(x.default,'\n
\n
\n
\n 模式\n
\n
\n ').concat($.default,'\n
滚动
\n
\n
\n ').concat(P.default,'\n
顶部
\n
\n
\n ').concat(T.default,'\n
底部
\n
\n
\n
\n
\n 颜色\n
\n ').concat(this.COLOR.map(function(e){return'
')}).join(""),'\n
\n
\n
\n
\n
\n\n
发送
\n
\n ')}},{key:"OPACITY",get:function(){return(0,l._)({min:0,max:100,steps:[]},this.option.OPACITY)}},{key:"FONT_SIZE",get:function(){return(0,l._)({min:12,max:120,steps:[]},this.option.FONT_SIZE)}},{key:"MARGIN",get:function(){return(0,l._)({min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}]},this.option.MARGIN)}},{key:"SPEED",get:function(){return(0,l._)({min:0,max:4,steps:[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}]},this.option.SPEED)}},{key:"COLOR",get:function(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}},{key:"query",value:function(e){return(0,this.utils.query)(e,this.template.$danmuku)}},{key:"append",value:function(e,t){var n=this.utils.append;(0,c._)(e.children).some(function(e){return e===t})||n(e,t)}},{key:"setData",value:function(e,t){var n=this.art.template.$player,r=this.template.$mount;n.dataset[e]=t,this.outside&&(r.dataset[e]=t)}},{key:"createTemplate",value:function(){var e=this.utils,t=e.createElement,n=e.tooltip,r=t("div");r.className="artplayer-plugin-danmuku",r.innerHTML=this.TEMPLATE,this.template.$danmuku=r,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");var a=this.template.$toggle;this.art.on("artplayerPluginDanmuku:show",function(){n(a,"关闭弹幕")}),this.art.on("artplayerPluginDanmuku:hide",function(){n(a,"打开弹幕")})}},{key:"createEvents",value:function(){var e=this,t=this.template,n=t.$toggle,r=t.$configModes,a=t.$styleModes,o=t.$colors,i=t.$antiOverlap,s=t.$syncVideo,l=t.$send,u=t.$input;this.art.proxy(n,"click",function(){e.danmuku.config({visible:!e.option.visible}),e.reset()}),this.art.proxy(r,"click",function(t){var n=t.target.closest(".apd-mode");if(n){var r=Number(n.dataset.mode);e.option.modes.includes(r)?e.danmuku.config({modes:e.option.modes.filter(function(e){return e!==r})}):e.danmuku.config({modes:(0,c._)(e.option.modes).concat([r])}),e.reset()}}),this.art.proxy(i,"click",function(){e.danmuku.config({antiOverlap:!e.option.antiOverlap}),e.reset()}),this.art.proxy(s,"click",function(){e.danmuku.config({synchronousPlayback:!e.option.synchronousPlayback}),e.reset()}),this.art.proxy(a,"click",function(t){var n=t.target.closest(".apd-mode");if(n){var r=Number(n.dataset.mode);e.danmuku.config({mode:r}),e.reset()}}),this.art.proxy(o,"click",function(t){var n=t.target.closest(".apd-color");n&&(e.danmuku.config({color:n.dataset.color}),e.reset())}),this.art.proxy(l,"click",function(){return e.emit()}),this.art.proxy(u,"keypress",function(t){"Enter"===t.key&&(t.preventDefault(),e.emit())})}},{key:"createSliders",value:function(){var e=this;this.slider.opacity=this.createSlider((0,u._)((0,l._)({},this.OPACITY),{container:this.template.$opacitySlider,findIndex:function(){return Math.round(100*e.option.opacity)},onChange:function(t){e.template.$opacityValue.textContent="".concat(t,"%"),e.danmuku.config({opacity:t/100})}})),this.slider.margin=this.createSlider((0,u._)((0,l._)({},this.MARGIN),{container:this.template.$marginSlider,findIndex:function(){return e.MARGIN.steps.findIndex(function(t){return t.value[0]===e.option.margin[0]&&t.value[1]===e.option.margin[1]})},onChange:function(t){var n=e.MARGIN.steps[t];n&&(e.template.$marginValue.textContent=n.name,e.danmuku.config({margin:n.value}))}})),this.slider.fontSize=this.createSlider((0,u._)((0,l._)({},this.FONT_SIZE),{container:this.template.$fontSizeSlider,findIndex:function(){return e.danmuku.fontSize},onChange:function(t){e.template.$fontSizeValue.textContent="".concat(t,"px"),t!==e.danmuku.fontSize&&e.danmuku.config({fontSize:t})}})),this.slider.speed=this.createSlider((0,u._)((0,l._)({},this.SPEED),{container:this.template.$speedSlider,findIndex:function(){return e.SPEED.steps.findIndex(function(t){return t.value===e.option.speed})},onChange:function(t){var n=e.SPEED.steps[t];n&&(e.template.$speedValue.textContent=n.name,e.danmuku.config({speed:n.value}))}}))}},{key:"createSlider",value:function(e){var t=this,n=e.min,r=e.max,a=e.container,o=e.findIndex,i=e.onChange,s=e.steps,l=void 0===s?[]:s,u=this.utils,c=u.query,p=u.clamp;(0,u.setStyle)(a,"touch-action","none"),a.innerHTML='\n
\n
\n '.concat(l.map(function(){return'
'}).join(""),'\n
\n
\n
\n
\n
\n ').concat(l.map(function(e){return e.hide?"":'
'.concat(e.name,"
")}).join(""),"\n
\n ");var d=c(".apd-slider-dot",a),f=c(".apd-slider-progress",a),h=!1;function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();if(!(er)){var t=(e-n)/(r-n);d.style.left="".concat(100*t,"%"),0===l.length&&(f.style.width=d.style.left),i(e)}}function y(e){var t=a.getBoundingClientRect(),o=t.top,i=t.height,s=t.left,l=t.width;this.art.isRotate?m(Math.round(p(e.clientY-o,0,i)/i*(r-n)+n)):m(Math.round(p(e.clientX-s,0,l)/l*(r-n)+n))}return this.art.proxy(a,"click",function(e){y.call(t,e)}),this.art.proxy(a,"pointerdown",function(e){h=0===e.button}),this.art.proxy(document,"pointermove",function(e){h&&y.call(t,e)}),this.art.proxy(document,"pointerup",function(e){h&&(h=!1,y.call(t,e))}),{reset:m}}},{key:"onFullscreen",value:function(e){var t=this.template,n=t.$danmuku,r=t.$controlsCenter,a=t.$mount;this.outside?e?this.append(r,n):this.append(a,n):this.append(r,n)}},{key:"onMouseEnter",value:function(e){var t=e.$control,n=e.$panel,r=this.art.template.$player,a=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=r.getBoundingClientRect(),s=o.width/2-a.width/2,l=i.left-(a.left-s),u=a.right+s-i.right;l>0?n.style.left="".concat(-s+l,"px"):u>0?n.style.left="".concat(-s-u,"px"):n.style.left="".concat(-s,"px")}},{key:"emit",value:function(){var e=this;return(0,o._)(function(){var t,n,r,a;return(0,p._)(this,function(o){switch(o.label){case 0:if(!(n=(t=e.template.$input).value.trim()).length||e.isLock||e.emitting)return[2];r={text:n,mode:e.option.mode,color:e.option.color,time:e.art.currentTime},o.label=1;case 1:return o.trys.push([1,3,,4]),e.emitting=!0,[4,e.option.beforeEmit(r)];case 2:if(a=o.sent(),e.emitting=!1,!0!==a)return[2];return r.border=!0,delete r.time,e.danmuku.emit(r),t.value="",e.lock(),[3,4];case 3:return o.sent(),e.emitting=!1,[3,4];case 4:return[2]}})})()}},{key:"lock",value:function(){var e=this,t=this.utils.addClass,n=this.template.$send;this.isLock=!0;var r=this.option.lockTime;n.innerText=r,t(n,"apd-lock");var a=function(){e.timer=setTimeout(function(){0===r?e.unlock():(n.innerText=r-=1,a())},1e3)};a()}},{key:"unlock",value:function(){var e=this.utils.removeClass,t=this.template.$send;clearTimeout(this.timer),this.isLock=!1,t.innerText="发送",e(t,"apd-lock")}},{key:"resize",value:function(){if(!this.outside&&!this.art.fullscreen&&!this.art.fullscreenWeb){var e=this.art.template,t=e.$player,n=e.$controlsCenter,r=this.template.$danmuku;this.art.widthe.length)&&(t=e.length);for(var n=0,r=Array(t);n.artplayer-plugin-danmuku{padding:0 10px;position:absolute;bottom:-40px;left:0;right:0}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"4mwSI":[function(e,t,n,r){t.exports=''},{}],"9bQDs":[function(e,t,n,r){t.exports=''},{}],cciuY:[function(e,t,n,r){t.exports=''},{}],e5G6o:[function(e,t,n,r){t.exports=''},{}],fC4yA:[function(e,t,n,r){t.exports=''},{}],fUkVg:[function(e,t,n,r){t.exports=''},{}],isoJm:[function(e,t,n,r){t.exports=''},{}],"20nBM":[function(e,t,n,r){t.exports=''},{}],"6x9CL":[function(e,t,n,r){t.exports=''},{}],"7GKdL":[function(e,t,n,r){t.exports=''},{}],"9SCIh":[function(e,t,n,r){t.exports=''},{}],"6KRxn":[function(e,t,n,r){t.exports=''},{}],dXFn2:[function(e,t,n,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(n),a.export(n,"default",function(){return u});var o=e("@swc/helpers/_/_to_consumable_array"),i=e("@swc/helpers/_/_type_of"),s={map:function(e,t,n,r,a){return(e-t)*(a-r)/(n-t)+r}},l=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),angle:Math.atan2(r,n)}};function u(e,t,n){var r=e.constructor.utils.query;e.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted:function(a){var u=null,c=null;function p(){var p,d,f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(u=null,c=null,a.innerHTML="",e.duration&&!e.option.isLive){var h={w:a.offsetWidth,h:a.offsetHeight},m={xMin:0,xMax:h.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*h.h),sampling:Math.floor(h.w/100),smoothing:.2,flattening:.2};(void 0===n?"undefined":(0,i._)(n))==="object"&&Object.assign(m,n);var y=[];if(Array.isArray(f)&&f.length)y=(0,o._)(f);else for(var g=function(e){var n=t.queue.filter(function(t){var n=t.time;return n>e*v&&n<=(e+m.sampling)*v}).length;y.push([e,n])},v=e.duration/h.w,_=0;_<=h.w;_+=m.sampling)g(_);if(0!==y.length){var b=y[y.length-1],x=b[0],k=b[1];x!==h.w&&y.push([h.w,k]);for(var w=y.map(function(e){return e[1]}),j=((p=Math).min.apply(p,(0,o._)(w))+(d=Math).max.apply(d,(0,o._)(w)))/2,$=0;$j?1+m.scale:1-m.scale)+m.minHeight}var D=function(e,t,n,r){var a=l(t||e,n||e),o=s.map(Math.cos(a.angle)*m.flattening,0,1,1,0),i=a.angle*o+(r?Math.PI:0),u=a.length*m.smoothing;return[e[0]+Math.cos(i)*u,e[1]+Math.sin(i)*u]},P=function(e,t,n){var r=D(n[t-1],n[t-2],e),a=D(e,n[t-1],n[t+1],!0),o=t===n.length-1?" z":"";return"C ".concat(r[0],",").concat(r[1]," ").concat(a[0],",").concat(a[1]," ").concat(e[0],",").concat(e[1]).concat(o)},M=y.map(function(e){return[s.map(e[0],m.xMin,m.xMax,0,h.w),s.map(e[1],m.yMin,m.yMax,h.h,0)]}).reduce(function(e,t,n,r){return 0===n?"M ".concat(r[r.length-1][0],",").concat(h.h," L ").concat(t[0],",").concat(h.h," L ").concat(t[0],",").concat(t[1]):"".concat(e," ").concat(P(t,n,r))},"");a.innerHTML='\n\n\n\n\n\n\n\n\n\n\n\n '),u=r("#heatmap-start",a),c=r("#heatmap-stop",a),u.setAttribute("offset","".concat(100*e.played,"%")),c.setAttribute("offset","".concat(100*e.played,"%"))}}}e.on("video:timeupdate",function(){u&&c&&(u.setAttribute("offset","".concat(100*e.played,"%")),c.setAttribute("offset","".concat(100*e.played,"%")))}),e.on("setBar",function(e,t){u&&c&&"played"===e&&(u.setAttribute("offset","".concat(100*t,"%")),c.setAttribute("offset","".concat(100*t,"%")))}),e.on("ready",function(){return p()}),e.on("resize",function(){return p()}),e.on("artplayerPluginDanmuku:loaded",function(){return p()}),e.on("artplayerPluginDanmuku:points",function(e){return p(e)})}})}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-dash-control.js b/docs/compiled/artplayer-plugin-dash-control.js index d5718a480..fdfbf4455 100644 --- a/docs/compiled/artplayer-plugin-dash-control.js +++ b/docs/compiled/artplayer-plugin-dash-control.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(a&&"string"==typeof t)return a(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}f.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},f.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,f,c,c.exports,this)}return u[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var s=0;sd);var r=e("bundle-text:./quality.svg"),i=o.interopDefault(r),l=e("bundle-text:./audio.svg"),u=o.interopDefault(l);function a(e,t){let n=new Map;return e.filter(e=>{let o=e[t];return void 0===o||!n.has(o)&&n.set(o,1)})}function d(e={}){return t=>{let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function r(){o(t.dash.getVideoElement()===n,'Cannot find instance of DASH from "art.dash"'),function(n){let o=n.getBitrateInfoListFor("video");if(!o||!o.length)return;let r=e.quality||{},l=r.auto||"Auto",u=r.title||"Quality",d=r.getName||(e=>`${e.height}p`),s=n.getQualityFor("video"),c=n.getSettings().streaming.abr.autoSwitchBitrate.video,f=c?l:d(o[s]),h=a(o.map(e=>({html:d(e),value:e.qualityIndex,default:s===e.qualityIndex&&!c})),"html").sort((e,t)=>t.value-e.value);h.push({html:l,value:"auto",default:c});let p=e=>("auto"===e.value?n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):(n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),n.setQualityFor("video",e.value)),t.notice.show=`${u}: ${e.html}`,r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html);r.control&&t.controls.update({name:"dash-quality",position:"right",html:f,style:{padding:"0 10px"},selector:h,onSelect:p}),r.setting&&t.setting.update({name:"dash-quality",tooltip:f,html:u,icon:i.default,width:200,selector:h,onSelect:p})}(t.dash),function(n){let o=n.getTracksFor("audio");if(!o||!o.length)return;let r=e.audio||{},i=r.auto||"Auto",l=r.title||"Audio",d=r.getName||(e=>e.lang||e.id),s=n.getCurrentTrackFor("audio")||o[0],c=s?d(s):i,f=a(o.map(e=>({html:d(e),value:e,default:s===e})),"html"),h=e=>(n.setCurrentTrack(e.value),t.notice.show=`${l}: ${e.html}`,r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html);r.control&&t.controls.update({name:"dash-audio",position:"right",html:c,style:{padding:"0 10px"},selector:f,onSelect:h}),r.setting&&t.setting.update({name:"dash-audio",tooltip:c,html:l,icon:u.default,width:200,selector:f,onSelect:h})}(t.dash)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginDashControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginDashControl=d)},{"bundle-text:./quality.svg":"aRkFd","bundle-text:./audio.svg":"hfT2T","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aRkFd:[function(e,t,n){t.exports=''},{}],hfT2T:[function(e,t,n){t.exports=''},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["hRBuj"],"hRBuj","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,o,n,r,i,l,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof a[n]&&a[n],s=d.i||{},c=d.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,o){if(!c[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof a[n]&&a[n];if(!o&&i)return i(t,!0);if(d)return d(t,!0);if(f&&"string"==typeof t)return f(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}s.resolve=function(o){var n=e[t][1][o];return null!=n?n:o},s.cache={};var u=c[t]=new h.Module(t);e[t][0].call(u.exports,s,u,u.exports,a)}return c[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.require=f,this.exports={}},h.modules=e,h.cache=c,h.parent=d,h.distDir=void 0,h.publicUrl=void 0,h.devServer=void 0,h.i=s,h.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(h,"root",{get:function(){return a[n]}}),a[n]=h;for(var p=0;ps);var i=e("bundle-text:./quality.svg"),l=r.interopDefault(i),u=e("bundle-text:./audio.svg"),a=r.interopDefault(u);function d(e,t){let o=new Map;return e.filter(e=>{let n=e[t];return void 0===n||!o.has(n)&&o.set(n,1)})}function s(e={}){return t=>{let{$video:o}=t.template,{errorHandle:n}=t.constructor.utils;function r(){n(t.dash.getVideoElement()===o,'Cannot find instance of DASH from "art.dash"'),function(o){let n=o.getBitrateInfoListFor("video");if(!n||!n.length)return;let r=e.quality||{},i=r.auto||"Auto",u=r.title||"Quality",a=r.getName||(e=>`${e.height}p`),s=o.getQualityFor("video"),c=o.getSettings().streaming.abr.autoSwitchBitrate.video,f=c?i:a(n[s]),h=d(n.map(e=>({html:a(e),value:e.qualityIndex,default:s===e.qualityIndex&&!c})),"html").sort((e,t)=>t.value-e.value);h.push({html:i,value:"auto",default:c});let p=e=>("auto"===e.value?o.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):(o.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),o.setQualityFor("video",e.value)),t.notice.show=`${u}: ${e.html}`,r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html);r.control&&t.controls.update({name:"dash-quality",position:"right",html:f,style:{padding:"0 10px"},selector:h,onSelect:p}),r.setting&&t.setting.update({name:"dash-quality",tooltip:f,html:u,icon:l.default,width:200,selector:h,onSelect:p})}(t.dash),function(o){let n=o.getTracksFor("audio");if(!n||!n.length)return;let r=e.audio||{},i=r.auto||"Auto",l=r.title||"Audio",u=r.getName||(e=>e.lang||e.id),s=o.getCurrentTrackFor("audio")||n[0],c=s?u(s):i,f=d(n.map(e=>({html:u(e),value:e,default:s===e})),"html"),h=e=>(o.setCurrentTrack(e.value),t.notice.show=`${l}: ${e.html}`,r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html);r.control&&t.controls.update({name:"dash-audio",position:"right",html:c,style:{padding:"0 10px"},selector:f,onSelect:h}),r.setting&&t.setting.update({name:"dash-audio",tooltip:c,html:l,icon:a.default,width:200,selector:f,onSelect:h})}(t.dash)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginDashControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginDashControl=s)},{"bundle-text:./quality.svg":"aRkFd","bundle-text:./audio.svg":"hfT2T","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aRkFd:[function(e,t,o,n){t.exports=''},{}],hfT2T:[function(e,t,o,n){t.exports=''},{}],"9pCYc":[function(e,t,o,n){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,t){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[o]}})}),t},o.export=function(e,t,o){Object.defineProperty(e,t,{enumerable:!0,get:o})}},{}]},["hRBuj"],"hRBuj","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-dash-control.legacy.js b/docs/compiled/artplayer-plugin-dash-control.legacy.js index a9e878e48..bcf036734 100644 --- a/docs/compiled/artplayer-plugin-dash-control.legacy.js +++ b/docs/compiled/artplayer-plugin-dash-control.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(t,e,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof i[o]&&i[o],a=u.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(e,n){if(!a[e]){if(!t[e]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(e,!0);if(u)return u(e,!0);if(l&&"string"==typeof e)return l(e);var d=Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}s.resolve=function(n){var o=t[e][1][n];return null!=o?o:n},s.cache={};var f=a[e]=new c.Module(e);t[e][0].call(f.exports,s,f,f.exports,this)}return a[e].exports;function s(t){var e=s.resolve(t);return!1===e?{}:c(e)}}c.isParcelRequire=!0,c.Module=function(t){this.id=t,this.bundle=c,this.exports={}},c.modules=t,c.cache=a,c.parent=u,c.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return i[o]}}),i[o]=c;for(var d=0;d0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var n=e.template.$video,o=e.constructor.utils.errorHandle;function r(){o(e.dash.getVideoElement()===n,'Cannot find instance of DASH from "art.dash"'),function(n){var o=n.getBitrateInfoListFor("video");if(o&&o.length){var r=t.quality||{},u=r.auto||"Auto",a=r.title||"Quality",c=r.getName||function(t){return"".concat(t.height,"p")},d=n.getQualityFor("video"),f=n.getSettings().streaming.abr.autoSwitchBitrate.video,s=f?u:c(o[d]),p=l(o.map(function(t){return{html:c(t),value:t.qualityIndex,default:d===t.qualityIndex&&!f}}),"html").sort(function(t,e){return e.value-t.value});p.push({html:u,value:"auto",default:f});var h=function(t){return"auto"===t.value?n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):(n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),n.setQualityFor("video",t.value)),e.notice.show="".concat(a,": ").concat(t.html),r.control&&e.controls.check(t),r.setting&&e.setting.check(t),t.html};r.control&&e.controls.update({name:"dash-quality",position:"right",html:s,style:{padding:"0 10px"},selector:p,onSelect:h}),r.setting&&e.setting.update({name:"dash-quality",tooltip:s,html:a,icon:i.default,width:200,selector:p,onSelect:h})}}(e.dash),function(n){var o=n.getTracksFor("audio");if(o&&o.length){var r=t.audio||{},i=r.auto||"Auto",u=r.title||"Audio",c=r.getName||function(t){return t.lang||t.id},d=n.getCurrentTrackFor("audio")||o[0],f=d?c(d):i,s=l(o.map(function(t){return{html:c(t),value:t,default:d===t}}),"html"),p=function(t){return n.setCurrentTrack(t.value),e.notice.show="".concat(u,": ").concat(t.html),r.control&&e.controls.check(t),r.setting&&e.setting.check(t),t.html};r.control&&e.controls.update({name:"dash-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:p}),r.setting&&e.setting.update({name:"dash-audio",tooltip:f,html:u,icon:a.default,width:200,selector:s,onSelect:p})}}(e.dash)}return e.on("ready",r),e.on("restart",r),{name:"artplayerPluginDashControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginDashControl=c)},{"bundle-text:./quality.svg":"eOZxP","bundle-text:./audio.svg":"2wNMP","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eOZxP:[function(t,e,n){e.exports=''},{}],"2wNMP":[function(t,e,n){e.exports=''},{}],iWrD0:[function(t,e,n){n.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},n.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.exportAll=function(t,e){return Object.keys(t).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})}),e},n.export=function(t,e,n){Object.defineProperty(t,e,{enumerable:!0,get:n})}},{}]},["cjCOF"],"cjCOF","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,o,r,i,u,a){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[o]&&l[o],d=c.i||{},f=c.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!f[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof l[o]&&l[o];if(!n&&i)return i(t,!0);if(c)return c(t,!0);if(s&&"string"==typeof t)return s(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var a=f[t]=new p.Module(t);e[t][0].call(a.exports,d,a,a.exports,l)}return f[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=s,this.exports={}},p.modules=e,p.cache=f,p.parent=c,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=d,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return l[o]}}),l[o]=p;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.template.$video,o=t.constructor.utils.errorHandle;function r(){o(t.dash.getVideoElement()===n,'Cannot find instance of DASH from "art.dash"'),function(n){var o=n.getBitrateInfoListFor("video");if(o&&o.length){var r=e.quality||{},i=r.auto||"Auto",a=r.title||"Quality",l=r.getName||function(e){return"".concat(e.height,"p")},d=n.getQualityFor("video"),f=n.getSettings().streaming.abr.autoSwitchBitrate.video,s=f?i:l(o[d]),p=c(o.map(function(e){return{html:l(e),value:e.qualityIndex,default:d===e.qualityIndex&&!f}}),"html").sort(function(e,t){return t.value-e.value});p.push({html:i,value:"auto",default:f});var h=function(e){return"auto"===e.value?n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):(n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),n.setQualityFor("video",e.value)),t.notice.show="".concat(a,": ").concat(e.html),r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html};r.control&&t.controls.update({name:"dash-quality",position:"right",html:s,style:{padding:"0 10px"},selector:p,onSelect:h}),r.setting&&t.setting.update({name:"dash-quality",tooltip:s,html:a,icon:u.default,width:200,selector:p,onSelect:h})}}(t.dash),function(n){var o=n.getTracksFor("audio");if(o&&o.length){var r=e.audio||{},i=r.auto||"Auto",u=r.title||"Audio",a=r.getName||function(e){return e.lang||e.id},d=n.getCurrentTrackFor("audio")||o[0],f=d?a(d):i,s=c(o.map(function(e){return{html:a(e),value:e,default:d===e}}),"html"),p=function(e){return n.setCurrentTrack(e.value),t.notice.show="".concat(u,": ").concat(e.html),r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html};r.control&&t.controls.update({name:"dash-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:p}),r.setting&&t.setting.update({name:"dash-audio",tooltip:f,html:u,icon:l.default,width:200,selector:s,onSelect:p})}}(t.dash)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginDashControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginDashControl=d)},{"bundle-text:./quality.svg":"eOZxP","bundle-text:./audio.svg":"2wNMP","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eOZxP:[function(e,t,n,o){t.exports=''},{}],"2wNMP":[function(e,t,n,o){t.exports=''},{}],iWrD0:[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["cjCOF"],"cjCOF","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-hls-control.js b/docs/compiled/artplayer-plugin-hls-control.js index f386ac999..3e7f5e7a9 100644 --- a/docs/compiled/artplayer-plugin-hls-control.js +++ b/docs/compiled/artplayer-plugin-hls-control.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,o,l){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof r[o]&&r[o],u=i.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!u[t]){if(!e[t]){var l="function"==typeof r[o]&&r[o];if(!n&&l)return l(t,!0);if(i)return i(t,!0);if(a&&"string"==typeof t)return a(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var f=u[t]=new c.Module(t);e[t][0].call(f.exports,d,f,f.exports,this)}return u[t].exports;function d(e){var t=d.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=u,c.parent=i,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return r[o]}}),r[o]=c;for(var s=0;sc);var l=e("bundle-text:./quality.svg"),r=o.interopDefault(l),i=e("bundle-text:./audio.svg"),u=o.interopDefault(i);function a(e,t){let n=new Map;return e.filter(e=>{let o=e[t];return void 0===o||!n.has(o)&&n.set(o,1)})}function c(e={}){return t=>{let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function l(){o(t.hls?.media===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(!n.levels.length)return;let o=e.quality||{},l=o.auto||"Auto",i=o.title||"Quality",u=o.getName||(e=>e.name||e.height+"P"),c=n.levels[n.currentLevel],s=c?u(c):l,f=a(n.levels.map((e,t)=>({html:u(e,t),value:t,default:n.currentLevel===t})),"html").sort((e,t)=>t.value-e.value);f.push({html:l,value:-1,default:-1===n.currentLevel});let d=e=>(n.currentLevel=e.value,t.notice.show=`${i}: ${e.html}`,o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html);o.control&&t.controls.update({name:"hls-quality",position:"right",html:s,style:{padding:"0 10px"},selector:f,onSelect:d}),o.setting&&t.setting.update({name:"hls-quality",tooltip:s,html:i,icon:r.default,width:200,selector:f,onSelect:d})}(t.hls),function(n){if(!n.audioTracks.length)return;let o=e.audio||{},l=o.auto||"Auto",r=o.title||"Audio",i=o.getName||(e=>e.name||e.lang||e.language),c=n.audioTracks[n.audioTrack],s=c?i(c):l,f=a(n.audioTracks.map((e,t)=>({html:i(e,t),value:e.id,default:n.audioTrack===e.id})),"html"),d=e=>(n.audioTrack=e.value,t.notice.show=`${r}: ${e.html}`,o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html);o.control&&t.controls.update({name:"hls-audio",position:"right",html:s,style:{padding:"0 10px"},selector:f,onSelect:d}),o.setting&&t.setting.update({name:"hls-audio",tooltip:s,html:r,icon:u.default,width:200,selector:f,onSelect:d})}(t.hls)}return t.on("ready",l),t.on("restart",l),{name:"artplayerPluginHlsControl",update:l}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=c)},{"bundle-text:./quality.svg":"5aI3W","bundle-text:./audio.svg":"kbgg8","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aI3W":[function(e,t,n){t.exports=''},{}],kbgg8:[function(e,t,n){t.exports=''},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["haa6A"],"haa6A","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,o,l,r,i,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof a[o]&&a[o],s=c.i||{},d=c.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!d[t]){if(!e[t]){if(l[t])return l[t];var r="function"==typeof a[o]&&a[o];if(!n&&r)return r(t,!0);if(c)return c(t,!0);if(f&&"string"==typeof t)return f(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var u=d[t]=new p.Module(t);e[t][0].call(u.exports,s,u,u.exports,a)}return d[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=f,this.exports={}},p.modules=e,p.cache=d,p.parent=c,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=s,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return a[o]}}),a[o]=p;for(var h=0;hs);var r=e("bundle-text:./quality.svg"),i=l.interopDefault(r),u=e("bundle-text:./audio.svg"),a=l.interopDefault(u);function c(e,t){let n=new Map;return e.filter(e=>{let o=e[t];return void 0===o||!n.has(o)&&n.set(o,1)})}function s(e={}){return t=>{let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function l(){o(t.hls?.media===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(!n.levels.length)return;let o=e.quality||{},l=o.auto||"Auto",r=o.title||"Quality",u=o.getName||(e=>e.name||e.height+"P"),a=n.levels[n.currentLevel],s=a?u(a):l,d=c(n.levels.map((e,t)=>({html:u(e,t),value:t,default:n.currentLevel===t})),"html").sort((e,t)=>t.value-e.value);d.push({html:l,value:-1,default:-1===n.currentLevel});let f=e=>(n.currentLevel=e.value,t.notice.show=`${r}: ${e.html}`,o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html);o.control&&t.controls.update({name:"hls-quality",position:"right",html:s,style:{padding:"0 10px"},selector:d,onSelect:f}),o.setting&&t.setting.update({name:"hls-quality",tooltip:s,html:r,icon:i.default,width:200,selector:d,onSelect:f})}(t.hls),function(n){if(!n.audioTracks.length)return;let o=e.audio||{},l=o.auto||"Auto",r=o.title||"Audio",i=o.getName||(e=>e.name||e.lang||e.language),u=n.audioTracks[n.audioTrack],s=u?i(u):l,d=c(n.audioTracks.map((e,t)=>({html:i(e,t),value:e.id,default:n.audioTrack===e.id})),"html"),f=e=>(n.audioTrack=e.value,t.notice.show=`${r}: ${e.html}`,o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html);o.control&&t.controls.update({name:"hls-audio",position:"right",html:s,style:{padding:"0 10px"},selector:d,onSelect:f}),o.setting&&t.setting.update({name:"hls-audio",tooltip:s,html:r,icon:a.default,width:200,selector:d,onSelect:f})}(t.hls)}return t.on("ready",l),t.on("restart",l),{name:"artplayerPluginHlsControl",update:l}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=s)},{"bundle-text:./quality.svg":"5aI3W","bundle-text:./audio.svg":"kbgg8","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aI3W":[function(e,t,n,o){t.exports=''},{}],kbgg8:[function(e,t,n,o){t.exports=''},{}],"9pCYc":[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["haa6A"],"haa6A","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-hls-control.legacy.js b/docs/compiled/artplayer-plugin-hls-control.legacy.js index fc3b27f38..6d6669deb 100644 --- a/docs/compiled/artplayer-plugin-hls-control.legacy.js +++ b/docs/compiled/artplayer-plugin-hls-control.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,o,r){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[o]&&l[o],u=i.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(a&&"string"==typeof t)return a(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var s=u[t]=new c.Module(t);e[t][0].call(s.exports,d,s,s.exports,this)}return u[t].exports;function d(e){var t=d.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=u,c.parent=i,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return l[o]}}),l[o]=c;for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.template.$video,o=t.constructor.utils.errorHandle;function r(){var r;o((null===(r=t.hls)||void 0===r?void 0:r.media)===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(n.levels.length){var o=e.quality||{},r=o.auto||"Auto",i=o.title||"Quality",u=o.getName||function(e){return e.name||e.height+"P"},c=n.levels[n.currentLevel],f=c?u(c):r,s=a(n.levels.map(function(e,t){return{html:u(e,t),value:t,default:n.currentLevel===t}}),"html").sort(function(e,t){return t.value-e.value});s.push({html:r,value:-1,default:-1===n.currentLevel});var d=function(e){return n.currentLevel=e.value,t.notice.show="".concat(i,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-quality",tooltip:f,html:i,icon:l.default,width:200,selector:s,onSelect:d})}}(t.hls),function(n){if(n.audioTracks.length){var o=e.audio||{},r=o.auto||"Auto",l=o.title||"Audio",i=o.getName||function(e){return e.name||e.lang||e.language},c=n.audioTracks[n.audioTrack],f=c?i(c):r,s=a(n.audioTracks.map(function(e,t){return{html:i(e,t),value:e.id,default:n.audioTrack===e.id}}),"html"),d=function(e){return n.audioTrack=e.value,t.notice.show="".concat(l,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-audio",tooltip:f,html:l,icon:u.default,width:200,selector:s,onSelect:d})}}(t.hls)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginHlsControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=c)},{"bundle-text:./quality.svg":"ghIYQ","bundle-text:./audio.svg":"cPSEW","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ghIYQ:[function(e,t,n){t.exports=''},{}],cPSEW:[function(e,t,n){t.exports=''},{}],iWrD0:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["6nh0Z"],"6nh0Z","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,o,r,i,l,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof a[o]&&a[o],f=c.i||{},s=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,n){if(!s[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof a[o]&&a[o];if(!n&&i)return i(t,!0);if(c)return c(t,!0);if(d&&"string"==typeof t)return d(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}f.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},f.cache={};var u=s[t]=new h.Module(t);e[t][0].call(u.exports,f,u,u.exports,a)}return s[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.require=d,this.exports={}},h.modules=e,h.cache=s,h.parent=c,h.distDir=void 0,h.publicUrl=void 0,h.devServer=void 0,h.i=f,h.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(h,"root",{get:function(){return a[o]}}),a[o]=h;for(var p=0;p0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.template.$video,o=t.constructor.utils.errorHandle;function r(){var r;o((null==(r=t.hls)?void 0:r.media)===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(n.levels.length){var o=e.quality||{},r=o.auto||"Auto",i=o.title||"Quality",u=o.getName||function(e){return e.name||e.height+"P"},a=n.levels[n.currentLevel],f=a?u(a):r,s=c(n.levels.map(function(e,t){return{html:u(e,t),value:t,default:n.currentLevel===t}}),"html").sort(function(e,t){return t.value-e.value});s.push({html:r,value:-1,default:-1===n.currentLevel});var d=function(e){return n.currentLevel=e.value,t.notice.show="".concat(i,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-quality",tooltip:f,html:i,icon:l.default,width:200,selector:s,onSelect:d})}}(t.hls),function(n){if(n.audioTracks.length){var o=e.audio||{},r=o.auto||"Auto",i=o.title||"Audio",l=o.getName||function(e){return e.name||e.lang||e.language},u=n.audioTracks[n.audioTrack],f=u?l(u):r,s=c(n.audioTracks.map(function(e,t){return{html:l(e,t),value:e.id,default:n.audioTrack===e.id}}),"html"),d=function(e){return n.audioTrack=e.value,t.notice.show="".concat(i,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-audio",tooltip:f,html:i,icon:a.default,width:200,selector:s,onSelect:d})}}(t.hls)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginHlsControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=f)},{"bundle-text:./quality.svg":"ghIYQ","bundle-text:./audio.svg":"cPSEW","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ghIYQ:[function(e,t,n,o){t.exports=''},{}],cPSEW:[function(e,t,n,o){t.exports=''},{}],iWrD0:[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["6nh0Z"],"6nh0Z","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-iframe.js b/docs/compiled/artplayer-plugin-iframe.js index bb507be1e..9233d41e6 100644 --- a/docs/compiled/artplayer-plugin-iframe.js +++ b/docs/compiled/artplayer-plugin-iframe.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,s){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],a=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!a[t]){if(!e[t]){var s="function"==typeof o[n]&&o[n];if(!r&&s)return s(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}u.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},u.cache={};var c=a[t]=new d.Module(t);e[t][0].call(c.exports,u,c,c.exports,this)}return a[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=i,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return o[n]}}),o[n]=d;for(var l=0;lnull,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){let{type:t,data:r,id:n}=e.data;"inject"===t&&(this.injected=!0),this.promises[n]&&("error"===t?this.promises[n].reject(Error(r)):this.promises[n].resove(r),delete this.promises[n]),this.messageCallback&&this.messageCallback({type:t,data:r})}postMessage({type:e,data:t}){return new Promise((r,n)=>{(function s(){if(this.destroyed)n(Error("The instance has been destroyed"));else if(this.injected){let s=Date.now();this.promises[s]={resove:r,reject:n},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)})}commit(e){if("function"!=typeof e)throw Error('"commit.callback" needs to be a function');let t=e.toString(),r=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:r})}message(e){if("function"!=typeof e)throw Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}r.default=n,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,s,i,a){var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof f[n]&&f[n],l=d.i||{},u=d.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!u[t]){if(!e[t]){if(o[t])return o[t];var s="function"==typeof f[n]&&f[n];if(!r&&s)return s(t,!0);if(d)return d(t,!0);if(c&&"string"==typeof t)return c(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var a=u[t]=new p.Module(t);e[t][0].call(a.exports,l,a,a.exports,f)}return u[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=c,this.exports={}},p.modules=e,p.cache=u,p.parent=d,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=l,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return f[n]}}),f[n]=p;for(var m=0;mnull,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){let{type:t,data:r,id:n}=e.data;"inject"===t&&(this.injected=!0),this.promises[n]&&("error"===t?this.promises[n].reject(Error(r)):this.promises[n].resove(r),delete this.promises[n]),this.messageCallback&&this.messageCallback({type:t,data:r})}postMessage({type:e,data:t}){return new Promise((r,n)=>{(function o(){if(this.destroyed)n(Error("The instance has been destroyed"));else if(this.injected){let o=Date.now();this.promises[o]={resove:r,reject:n},this.$iframe.contentWindow.postMessage({type:e,data:t,id:o},"*")}else setTimeout(o.bind(this),200)}).call(this)})}commit(e){if("function"!=typeof e)throw Error('"commit.callback" needs to be a function');let t=e.toString(),r=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:r})}message(e){if("function"!=typeof e)throw Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}r.default=o,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-iframe.legacy.js b/docs/compiled/artplayer-plugin-iframe.legacy.js index 7f178337c..dc4ca7e60 100644 --- a/docs/compiled/artplayer-plugin-iframe.legacy.js +++ b/docs/compiled/artplayer-plugin-iframe.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],s=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!s[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(c&&"string"==typeof r)return c(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},p.cache={};var l=s[r]=new u.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return s[r].exports;function p(e){var r=p.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=a,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var f=0;fr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function u(e,r,t,n){var o,i=arguments.length,a=i<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,r,t,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(r,t,a):o(r,t))||a);return i>3&&a&&Object.defineProperty(r,t,a),a}function f(e,r){return function(t,n){r(t,n,e)}}function l(e,r,t,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",f=!r&&e?n.static?e:e.prototype:null,l=r||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=t.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var _=(0,t[d])("accessor"===c?{get:l.get,set:l.set}:l[u],y);if("accessor"===c){if(void 0===_)continue;if(null===_||"object"!=typeof _)throw TypeError("Object expected");(s=a(_.get))&&(l.get=s),(s=a(_.set))&&(l.set=s),(s=a(_.init))&&o.unshift(s)}else(s=a(_))&&("field"===c?o.unshift(s):l[u]=s)}f&&Object.defineProperty(f,n.name,l),p=!0}function p(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function j(){for(var e=[],r=0;r1||s(e,r)})},r&&(n[e]=r(n[e])))}function s(e,r){try{var t;(t=o[e](r)).value instanceof P?Promise.resolve(t.value.v).then(c,u):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function f(e,r){e(r),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:P(e[n](r)),done:!1}:o?o(r):r}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=w(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){!function(e,r,t,n){Promise.resolve(n).then(function(r){e({value:r,done:t})},r)}(n,o,(r=e[t](r)).done,r.value)})}}}function k(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var M=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r};function I(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&v(r,e,t);return M(r,e),r}function D(e){return e&&e.__esModule?e:{default:e}}function F(e,r,t,n){if("a"===t&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function A(e,r,t,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!o:!r.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,t):o?o.value=t:r.set(e,t),t}function R(e,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?r===e:e.has(r)}function C(e,r,t){if(null!=r){var n,o;if("object"!=typeof r&&"function"!=typeof r)throw TypeError("Object expected.");if(t){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=r[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=r[Symbol.dispose],t&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:r,dispose:n,async:t})}else t&&e.stack.push({async:!0});return r}var W="function"==typeof SuppressedError?SuppressedError:function(e,r,t){var n=Error(t);return n.name="SuppressedError",n.error=e,n.suppressed=r,n};function N(e){function r(r){e.error=e.hasError?new W(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(t,function(e){return r(e),t()})}catch(e){r(e)}}if(e.hasError)throw e.error}()}t.default={__extends:a,__assign:s,__rest:c,__decorate:u,__param:f,__metadata:h,__awaiter:_,__generator:m,__createBinding:v,__exportStar:b,__values:w,__read:g,__spread:j,__spreadArrays:x,__spreadArray:O,__await:P,__asyncGenerator:E,__asyncDelegator:S,__asyncValues:T,__makeTemplateObject:k,__importStar:I,__importDefault:D,__classPrivateFieldGet:F,__classPrivateFieldSet:A,__classPrivateFieldIn:R,__addDisposableResource:C,__disposeResources:N}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["akNoT"],"akNoT","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,n,o,i,a,s){var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof c[n]&&c[n],f=u.i||{},l=u.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(r,t){if(!l[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof c[n]&&c[n];if(!t&&i)return i(r,!0);if(u)return u(r,!0);if(p&&"string"==typeof r)return p(r);var a=Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var s=l[r]=new d.Module(r);e[r][0].call(s.exports,f,s,s.exports,c)}return l[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:d(r)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=l,d.parent=u,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return c[n]}}),c[n]=d;for(var y=0;yr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function f(e,r,t,n){var o,a=arguments.length,s=a<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,r,t,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(r,t,s):o(r,t))||s);return a>3&&s&&Object.defineProperty(r,t,s),s}function l(e,r){return function(t,n){r(t,n,e)}}function p(e,r,t,n,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,u=n.kind,f="getter"===u?"get":"setter"===u?"set":"value",l=!r&&e?n.static?e:e.prototype:null,p=r||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,y=t.length-1;y>=0;y--){var _={};for(var h in n)_[h]="access"===h?{}:n[h];for(var h in n.access)_.access[h]=n.access[h];_.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,t[y])("accessor"===u?{get:p.get,set:p.set}:p[f],_);if("accessor"===u){if(void 0===m)continue;if(null===m||(void 0===m?"undefined":(0,i._)(m))!=="object")throw TypeError("Object expected");(c=s(m.get))&&(p.get=c),(c=s(m.set))&&(p.set=c),(c=s(m.init))&&o.unshift(c)}else(c=s(m))&&("field"===u?o.unshift(c):p[f]=c)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],r=0;r1||s(e,r)})},r&&(n[e]=r(n[e])))}function s(e,r){try{var t;(t=o[e](r)).value instanceof E?Promise.resolve(t.value.v).then(c,u):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function f(e,r){e(r),i.shift(),i.length&&s(i[0][0],i[0][1])}}function I(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:E(e[n](r)),done:!1}:o?o(r):r}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=g(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){var i,a,s;i=n,a=o,s=(r=e[t](r)).done,Promise.resolve(r.value).then(function(e){i({value:e,done:s})},a)})}}}function k(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var M=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r},D=function(e){return(D=Object.getOwnPropertyNames||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)};function F(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t=D(e),n=0;na);var n=e("./adapter"),i=r.interopDefault(n);function a(e){return t=>{let s=new i.default(t,e);return{name:"artplayerPluginLibass",libass:s.libass,visible:s.visible,init:s.init.bind(s),switch:s.switch.bind(s),show:s.show.bind(s),hide:s.hide.bind(s),destroy:s.destroy.bind(s)}}}"undefined"!=typeof window&&(window.artplayerPluginLibass=a)},{"./adapter":"2m9sB","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2m9sB":[function(e,t,s){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(s);var n=e("libass-wasm"),i=r.interopDefault(n);let a=`[Script Info] ScriptType: v4.00+`;s.default=class{constructor(e,t){let{constructor:s,template:r}=e;this.art=e,this.$video=r.$video,this.$webvtt=r.$subtitle,this.utils=s.utils,this.libass=null,e.once("ready",this.init.bind(this,t))}async init(e){this.#e(),await this.#t(e),this.#s(),this.art.emit("artplayerPluginLibass:init",this);let t=this.art?.option?.subtitle?.url;t&&"ass"===this.utils.getExt(t)&&this.switch(t)}switch(e){this.art.emit("artplayerPluginLibass:switch",e),e&&"ass"===this.utils.getExt(e)?(this.currentType="ass",this.libass.freeTrack(),this.libass.setTrackByUrl(this.#r(e)),this.visible=this.art.subtitle.show):(this.currentType="webvtt",this.hide(),this.libass.freeTrack())}setVisibility(e){this.visible=e}setOffset(e){this.timeOffset=e}get active(){return"ass"===this.currentType}get visible(){return!!this.libass&&"none"!==this.libass.canvasParent.style.display}set visible(e){this.art.emit("artplayerPluginLibass:visible",e),this.#n(!this.active),this.libass.canvasParent&&(this.libass.canvasParent.style.display=e?"block":"none",e&&this.libass.resize())}get timeOffset(){return this.libass.timeOffset}set timeOffset(e){this.art.emit("artplayerPluginLibass:timeOffset",e),this.libass.timeOffset=e}show(){this.visible=!0}hide(){this.visible=!1}destroy(){this.art.emit("artplayerPluginLibass:destroy"),this.#i(),this.libass.dispose(),URL.revokeObjectURL(this.workerScriptUrl),this.libass=null}async #t(e={}){if(!e.fallbackFont)return this.utils.errorHandle(e.fallbackFont,"artplayerPluginLibass: fallbackFont is required");e.workerUrl||(e.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),e.availableFonts&&(e.availableFonts=Object.entries(e.availableFonts).reduce((e,[t,s])=>(e[t]=this.#r(s),e),{})),this.libass=new i.default({subContent:a,video:this.$video,...e,workerUrl:await this.#a(e),fallbackFont:this.#r(e.fallbackFont),fonts:e.fonts?.map(e=>this.#r(e))}),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText=` position: absolute; top: 0; left: 0; width: 100%; height: 100%; user-select: none; pointer-events: none; z-index: 20;`}#s(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}#i(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}#n(e){this.$webvtt.style.visibility=e?"visible":"hidden"}#r(e){return this.#o(e)?e:new URL(e,document.baseURI).toString()}#o(e){return/^https?:\/\//.test(e)}#a({workerUrl:e,wasmUrl:t}){return new Promise(s=>{fetch(e).then(e=>e.text()).then(r=>{let n=r,i=new Blob([n=n.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,(s,r)=>(t=t?this.#r(t):new URL(r,e).toString(),`wasmBinaryFile = "${t}"`))],{type:"text/javascript"});s(URL.createObjectURL(i))})})}#e(){let e=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));t instanceof WebAssembly.Module&&(e=new WebAssembly.Instance(t) instanceof WebAssembly.Instance)}}catch(e){}this.utils.errorHandle(e,"Browser does not support WebAssembly")}}},{"libass-wasm":"lHkek","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lHkek:[function(e,t,s){"function"==typeof SubtitlesOctopusOnLoad&&SubtitlesOctopusOnLoad(),t.exports&&(t.exports=function(e){var t=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));e instanceof WebAssembly.Module&&(t=new WebAssembly.Instance(e) instanceof WebAssembly.Instance)}}catch(e){}console.log("WebAssembly support detected: "+(t?"yes":"no"));var s=this;function r(){s.setCurrentTime(s.video.currentTime+s.timeOffset)}function n(){s.setIsPaused(!1,s.video.currentTime+s.timeOffset)}function i(){s.setIsPaused(!0,s.video.currentTime+s.timeOffset)}function a(){s.video.removeEventListener("timeupdate",r,!1)}function o(){s.video.addEventListener("timeupdate",r,!1);var e=s.video.currentTime+s.timeOffset;s.setCurrentTime(e)}function l(){s.setRate(s.video.playbackRate)}function c(){s.setIsPaused(!0,s.video.currentTime+s.timeOffset)}function d(e){e.target.removeEventListener(e.type,d,!1),s.resize()}function u(){var e=s.renderFramesData,t=performance.now();s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height);for(var r=0;r=1?i[a]:1;var o=new ImageData(i,n.w,n.h);s.bufferCanvasCtx.putImageData(o,0,0),s.ctx.drawImage(s.bufferCanvas,n.x,n.y)}if(s.debug){var l=Math.round(performance.now()-t),c=e.blendTime;void 0!==c?console.log("render: "+Math.round(e.spentTime-c)+" ms, blend: "+Math.round(c)+" ms, draw: "+l+" ms; TOTAL="+Math.round(e.spentTime+l)+" ms"):console.log(Math.round(e.spentTime)+" ms (+ "+l+" ms draw)"),s.renderStart=performance.now()}}function v(){var e=s.renderFramesData,t=performance.now();s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height);for(var r=0;r0?s.resize():s.video.addEventListener("loadedmetadata",d,!1))},s.getVideoPosition=function(){var e=s.video.videoWidth/s.video.videoHeight,t=s.video.offsetWidth,r=s.video.offsetHeight,n=t,i=r;t/r>e?n=Math.floor(r*e):i=Math.floor(t/e);var a=(t-n)/2,o=(r-i)/2;return{width:n,height:i,x:a,y:o}},s.setSubUrl=function(e){s.subUrl=e},s.renderFrameData=null,s.workerActive=!1,s.frameId=0,s.onWorkerMessage=function(e){!s.workerActive&&(s.workerActive=!0,s.onReadyEvent&&s.onReadyEvent());var t=e.data;switch(t.target){case"stdout":console.log(t.content);break;case"console-log":console.log.apply(console,JSON.parse(t.content));break;case"console-debug":console.debug.apply(console,JSON.parse(t.content));break;case"console-info":console.info.apply(console,JSON.parse(t.content));break;case"console-warn":console.warn.apply(console,JSON.parse(t.content));break;case"console-error":console.error.apply(console,JSON.parse(t.content));break;case"stderr":console.error(t.content);break;case"window":window[t.method]();break;case"canvas":switch(t.op){case"getContext":s.ctx=s.canvas.getContext(t.type,t.attributes);break;case"resize":s.resize(t.width,t.height);break;case"renderCanvas":s.lastRenderTime0&&i>s.maxRenderHeight&&(i=s.maxRenderHeight),e*=i/t,t=i}return{width:e,height:t}}((i=s.getVideoPosition()).width*s.pixelRatio,i.height*s.pixelRatio);e=a.width,t=a.height;var o=s.canvasParent.getBoundingClientRect().top-s.video.getBoundingClientRect().top;r=i.y-o,n=i.x}if(!e||!t){s.video||console.error("width or height is 0. You should specify width & height for resize.");return}(s.canvas.width!=e||s.canvas.height!=t||s.canvas.style.top!=r||s.canvas.style.left!=n)&&(s.canvas.width=e,s.canvas.height=t,null!=i&&(s.canvasParent.style.position="relative",s.canvas.style.display="block",s.canvas.style.position="absolute",s.canvas.style.width=i.width+"px",s.canvas.style.height=i.height+"px",s.canvas.style.top=r+"px",s.canvas.style.left=n+"px",s.canvas.style.pointerEvents="none"),s.worker.postMessage({target:"canvas",width:s.canvas.width,height:s.canvas.height}))},s.resizeWithTimeout=function(){s.resize(),setTimeout(s.resize,100)},s.runBenchmark=function(){s.worker.postMessage({target:"runBenchmark"})},s.customMessage=function(e,t){t=t||{},s.worker.postMessage({target:"custom",userData:e,preMain:t.preMain})},s.setCurrentTime=function(e){s.worker.postMessage({target:"video",currentTime:e})},s.setTrackByUrl=function(e){s.worker.postMessage({target:"set-track-by-url",url:e})},s.setTrack=function(e){s.worker.postMessage({target:"set-track",content:e})},s.freeTrack=function(e){s.worker.postMessage({target:"free-track"})},s.render=s.setCurrentTime,s.setIsPaused=function(e,t){s.worker.postMessage({target:"video",isPaused:e,currentTime:t})},s.setRate=function(e){s.worker.postMessage({target:"video",rate:e})},s.dispose=function(){s.worker.postMessage({target:"destroy"}),s.worker.terminate(),s.worker.removeEventListener("message",s.onWorkerMessage),s.worker.removeEventListener("error",s.workerError),s.workerActive=!1,s.worker=null,s.video&&(s.video.removeEventListener("timeupdate",r,!1),s.video.removeEventListener("playing",n,!1),s.video.removeEventListener("pause",i,!1),s.video.removeEventListener("seeking",a,!1),s.video.removeEventListener("seeked",o,!1),s.video.removeEventListener("ratechange",l,!1),s.video.removeEventListener("waiting",c,!1),s.video.removeEventListener("loadedmetadata",d,!1),document.removeEventListener("fullscreenchange",s.resizeWithTimeout,!1),document.removeEventListener("mozfullscreenchange",s.resizeWithTimeout,!1),document.removeEventListener("webkitfullscreenchange",s.resizeWithTimeout,!1),document.removeEventListener("msfullscreenchange",s.resizeWithTimeout,!1),window.removeEventListener("resize",s.resizeWithTimeout,!1),s.video.parentNode.removeChild(s.canvasParent),s.video=null),s.ro&&(s.ro.disconnect(),s.ro=null),s.onCustomMessage=null,s.onErrorEvent=null,s.onReadyEvent=null},s.fetchFromWorker=function(e,t,r){try{var n=e.target,i=setTimeout(function(){o(Error("Error: Timeout while try to fetch "+n))},5e3),a=function(e){e.data.target==n&&(t(e.data),s.worker.removeEventListener("message",a),s.worker.removeEventListener("error",o),clearTimeout(i))},o=function(e){r(e),s.worker.removeEventListener("message",a),s.worker.removeEventListener("error",o),clearTimeout(i)};s.worker.addEventListener("message",a),s.worker.addEventListener("error",o),s.worker.postMessage(e)}catch(e){r(e)}},s.createEvent=function(e){s.worker.postMessage({target:"create-event",event:e})},s.getEvents=function(e,t){s.fetchFromWorker({target:"get-events"},function(t){e(t.events)},t)},s.setEvent=function(e,t){s.worker.postMessage({target:"set-event",event:e,index:t})},s.removeEvent=function(e){s.worker.postMessage({target:"remove-event",index:e})},s.createStyle=function(e){s.worker.postMessage({target:"create-style",style:e})},s.getStyles=function(e,t){s.fetchFromWorker({target:"get-styles"},function(t){e(t.styles)},t)},s.setStyle=function(e,t){s.worker.postMessage({target:"set-style",style:e,index:t})},s.removeStyle=function(e){s.worker.postMessage({target:"remove-style",index:e})},s.init()})},{}],"9pCYc":[function(e,t,s){s.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},s.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},s.exportAll=function(e,t){return Object.keys(e).forEach(function(s){"default"===s||"__esModule"===s||Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[s]}})}),t},s.export=function(e,t,s){Object.defineProperty(e,t,{enumerable:!0,get:s})}},{}]},["5lsnt"],"5lsnt","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,s,i,n,a,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[s]&&l[s],d=c.i||{},u=c.cache||{},v="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(i[t])return i[t];var n="function"==typeof l[s]&&l[s];if(!r&&n)return n(t,!0);if(c)return c(t,!0);if(v&&"string"==typeof t)return v(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}d.resolve=function(r){var s=e[t][1][r];return null!=s?s:r},d.cache={};var o=u[t]=new f.Module(t);e[t][0].call(o.exports,d,o,o.exports,l)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=v,this.exports={}},f.modules=e,f.cache=u,f.parent=c,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=d,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return l[s]}}),l[s]=f;for(var h=0;ho);var n=e("./adapter"),a=i.interopDefault(n);function o(e){return t=>{let r=new(0,a.default)(t,e);return{name:"artplayerPluginLibass",libass:r.libass,visible:r.visible,init:r.init.bind(r),switch:r.switch.bind(r),show:r.show.bind(r),hide:r.hide.bind(r),destroy:r.destroy.bind(r)}}}"undefined"!=typeof window&&(window.artplayerPluginLibass=o)},{"./adapter":"2m9sB","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2m9sB":[function(e,t,r,s){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(r);var n=e("libass-wasm"),a=i.interopDefault(n);let o=`[Script Info] ScriptType: v4.00+`;r.default=class{constructor(e,t){let{constructor:r,template:s}=e;this.art=e,this.$video=s.$video,this.$webvtt=s.$subtitle,this.utils=r.utils,this.libass=null,e.once("ready",this.init.bind(this,t))}async init(e){this.#e(),await this.#t(e),this.#r(),this.art.emit("artplayerPluginLibass:init",this);let t=this.art?.option?.subtitle?.url;t&&"ass"===this.utils.getExt(t)&&this.switch(t)}switch(e){this.art.emit("artplayerPluginLibass:switch",e),e&&"ass"===this.utils.getExt(e)?(this.currentType="ass",this.libass.freeTrack(),this.libass.setTrackByUrl(this.#s(e)),this.visible=this.art.subtitle.show):(this.currentType="webvtt",this.hide(),this.libass.freeTrack())}setVisibility(e){this.visible=e}setOffset(e){this.timeOffset=e}get active(){return"ass"===this.currentType}get visible(){return!!this.libass&&"none"!==this.libass.canvasParent.style.display}set visible(e){this.art.emit("artplayerPluginLibass:visible",e),this.#i(!this.active),this.libass.canvasParent&&(this.libass.canvasParent.style.display=e?"block":"none",e&&this.libass.resize())}get timeOffset(){return this.libass.timeOffset}set timeOffset(e){this.art.emit("artplayerPluginLibass:timeOffset",e),this.libass.timeOffset=e}show(){this.visible=!0}hide(){this.visible=!1}destroy(){this.art.emit("artplayerPluginLibass:destroy"),this.#n(),this.libass.dispose(),URL.revokeObjectURL(this.workerScriptUrl),this.libass=null}async #t(e={}){if(!e.fallbackFont)return this.utils.errorHandle(e.fallbackFont,"artplayerPluginLibass: fallbackFont is required");e.workerUrl||(e.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),e.availableFonts&&(e.availableFonts=Object.entries(e.availableFonts).reduce((e,[t,r])=>(e[t]=this.#s(r),e),{})),this.libass=new(0,a.default)({subContent:o,video:this.$video,...e,workerUrl:await this.#a(e),fallbackFont:this.#s(e.fallbackFont),fonts:e.fonts?.map(e=>this.#s(e))}),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText=` position: absolute; top: 0; left: 0; width: 100%; height: 100%; user-select: none; pointer-events: none; z-index: 20;`}#r(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}#n(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}#i(e){this.$webvtt.style.visibility=e?"visible":"hidden"}#s(e){return this.#o(e)?e:new URL(e,document.baseURI).toString()}#o(e){return/^https?:\/\//.test(e)}#a({workerUrl:e,wasmUrl:t}){return new Promise(r=>{fetch(e).then(e=>e.text()).then(s=>{let i=s,n=new Blob([i=i.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,(r,s)=>(t=t?this.#s(t):new URL(s,e).toString(),`wasmBinaryFile = "${t}"`))],{type:"text/javascript"});r(URL.createObjectURL(n))})})}#e(){let e=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));t instanceof WebAssembly.Module&&(e=new WebAssembly.Instance(t)instanceof WebAssembly.Instance)}}catch(e){}this.utils.errorHandle(e,"Browser does not support WebAssembly")}}},{"libass-wasm":"lHkek","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lHkek:[function(e,t,r,s){"use strict";"function"==typeof SubtitlesOctopusOnLoad&&SubtitlesOctopusOnLoad(),t.exports&&(t.exports=function(e){var t=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));e instanceof WebAssembly.Module&&(t=new WebAssembly.Instance(e)instanceof WebAssembly.Instance)}}catch(e){}console.log("WebAssembly support detected: "+(t?"yes":"no"));var r=this;function s(){r.setCurrentTime(r.video.currentTime+r.timeOffset)}function i(){r.setIsPaused(!1,r.video.currentTime+r.timeOffset)}function n(){r.setIsPaused(!0,r.video.currentTime+r.timeOffset)}function a(){r.video.removeEventListener("timeupdate",s,!1)}function o(){r.video.addEventListener("timeupdate",s,!1);var e=r.video.currentTime+r.timeOffset;r.setCurrentTime(e)}function l(){r.setRate(r.video.playbackRate)}function c(){r.setIsPaused(!0,r.video.currentTime+r.timeOffset)}function d(e){e.target.removeEventListener(e.type,d,!1),r.resize()}function u(){var e=r.renderFramesData,t=performance.now();r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height);for(var s=0;s=1?n[a]:1;var o=new ImageData(n,i.w,i.h);r.bufferCanvasCtx.putImageData(o,0,0),r.ctx.drawImage(r.bufferCanvas,i.x,i.y)}if(r.debug){var l=Math.round(performance.now()-t),c=e.blendTime;void 0!==c?console.log("render: "+Math.round(e.spentTime-c)+" ms, blend: "+Math.round(c)+" ms, draw: "+l+" ms; TOTAL="+Math.round(e.spentTime+l)+" ms"):console.log(Math.round(e.spentTime)+" ms (+ "+l+" ms draw)"),r.renderStart=performance.now()}}function v(){var e=r.renderFramesData,t=performance.now();r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height);for(var s=0;s0?r.resize():r.video.addEventListener("loadedmetadata",d,!1))},r.getVideoPosition=function(){var e=r.video.videoWidth/r.video.videoHeight,t=r.video.offsetWidth,s=r.video.offsetHeight,i=t,n=s;t/s>e?i=Math.floor(s*e):n=Math.floor(t/e);var a=(t-i)/2,o=(s-n)/2;return{width:i,height:n,x:a,y:o}},r.setSubUrl=function(e){r.subUrl=e},r.renderFrameData=null,r.workerActive=!1,r.frameId=0,r.onWorkerMessage=function(e){!r.workerActive&&(r.workerActive=!0,r.onReadyEvent&&r.onReadyEvent());var t=e.data;switch(t.target){case"stdout":console.log(t.content);break;case"console-log":console.log.apply(console,JSON.parse(t.content));break;case"console-debug":console.debug.apply(console,JSON.parse(t.content));break;case"console-info":console.info.apply(console,JSON.parse(t.content));break;case"console-warn":console.warn.apply(console,JSON.parse(t.content));break;case"console-error":console.error.apply(console,JSON.parse(t.content));break;case"stderr":console.error(t.content);break;case"window":window[t.method]();break;case"canvas":switch(t.op){case"getContext":r.ctx=r.canvas.getContext(t.type,t.attributes);break;case"resize":r.resize(t.width,t.height);break;case"renderCanvas":r.lastRenderTime0&&n>r.maxRenderHeight&&(n=r.maxRenderHeight),e*=n/t,t=n}return{width:e,height:t}}((n=r.getVideoPosition()).width*r.pixelRatio,n.height*r.pixelRatio);e=a.width,t=a.height;var o=r.canvasParent.getBoundingClientRect().top-r.video.getBoundingClientRect().top;s=n.y-o,i=n.x}if(!e||!t){r.video||console.error("width or height is 0. You should specify width & height for resize.");return}(r.canvas.width!=e||r.canvas.height!=t||r.canvas.style.top!=s||r.canvas.style.left!=i)&&(r.canvas.width=e,r.canvas.height=t,null!=n&&(r.canvasParent.style.position="relative",r.canvas.style.display="block",r.canvas.style.position="absolute",r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.canvas.style.top=s+"px",r.canvas.style.left=i+"px",r.canvas.style.pointerEvents="none"),r.worker.postMessage({target:"canvas",width:r.canvas.width,height:r.canvas.height}))},r.resizeWithTimeout=function(){r.resize(),setTimeout(r.resize,100)},r.runBenchmark=function(){r.worker.postMessage({target:"runBenchmark"})},r.customMessage=function(e,t){t=t||{},r.worker.postMessage({target:"custom",userData:e,preMain:t.preMain})},r.setCurrentTime=function(e){r.worker.postMessage({target:"video",currentTime:e})},r.setTrackByUrl=function(e){r.worker.postMessage({target:"set-track-by-url",url:e})},r.setTrack=function(e){r.worker.postMessage({target:"set-track",content:e})},r.freeTrack=function(e){r.worker.postMessage({target:"free-track"})},r.render=r.setCurrentTime,r.setIsPaused=function(e,t){r.worker.postMessage({target:"video",isPaused:e,currentTime:t})},r.setRate=function(e){r.worker.postMessage({target:"video",rate:e})},r.dispose=function(){r.worker.postMessage({target:"destroy"}),r.worker.terminate(),r.worker.removeEventListener("message",r.onWorkerMessage),r.worker.removeEventListener("error",r.workerError),r.workerActive=!1,r.worker=null,r.video&&(r.video.removeEventListener("timeupdate",s,!1),r.video.removeEventListener("playing",i,!1),r.video.removeEventListener("pause",n,!1),r.video.removeEventListener("seeking",a,!1),r.video.removeEventListener("seeked",o,!1),r.video.removeEventListener("ratechange",l,!1),r.video.removeEventListener("waiting",c,!1),r.video.removeEventListener("loadedmetadata",d,!1),document.removeEventListener("fullscreenchange",r.resizeWithTimeout,!1),document.removeEventListener("mozfullscreenchange",r.resizeWithTimeout,!1),document.removeEventListener("webkitfullscreenchange",r.resizeWithTimeout,!1),document.removeEventListener("msfullscreenchange",r.resizeWithTimeout,!1),window.removeEventListener("resize",r.resizeWithTimeout,!1),r.video.parentNode.removeChild(r.canvasParent),r.video=null),r.ro&&(r.ro.disconnect(),r.ro=null),r.onCustomMessage=null,r.onErrorEvent=null,r.onReadyEvent=null},r.fetchFromWorker=function(e,t,s){try{var i=e.target,n=setTimeout(function(){o(Error("Error: Timeout while try to fetch "+i))},5e3),a=function(e){e.data.target==i&&(t(e.data),r.worker.removeEventListener("message",a),r.worker.removeEventListener("error",o),clearTimeout(n))},o=function(e){s(e),r.worker.removeEventListener("message",a),r.worker.removeEventListener("error",o),clearTimeout(n)};r.worker.addEventListener("message",a),r.worker.addEventListener("error",o),r.worker.postMessage(e)}catch(e){s(e)}},r.createEvent=function(e){r.worker.postMessage({target:"create-event",event:e})},r.getEvents=function(e,t){r.fetchFromWorker({target:"get-events"},function(t){e(t.events)},t)},r.setEvent=function(e,t){r.worker.postMessage({target:"set-event",event:e,index:t})},r.removeEvent=function(e){r.worker.postMessage({target:"remove-event",index:e})},r.createStyle=function(e){r.worker.postMessage({target:"create-style",style:e})},r.getStyles=function(e,t){r.fetchFromWorker({target:"get-styles"},function(t){e(t.styles)},t)},r.setStyle=function(e,t){r.worker.postMessage({target:"set-style",style:e,index:t})},r.removeStyle=function(e){r.worker.postMessage({target:"remove-style",index:e})},r.init()})},{}],"9pCYc":[function(e,t,r,s){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["5lsnt"],"5lsnt","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-libass.legacy.js b/docs/compiled/artplayer-plugin-libass.legacy.js index 0dd447df8..f02fbb2ef 100644 --- a/docs/compiled/artplayer-plugin-libass.legacy.js +++ b/docs/compiled/artplayer-plugin-libass.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[n]&&s[n],i=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(t,r){if(!i[t]){if(!e[t]){var o="function"==typeof s[n]&&s[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var f=i[t]=new l.Module(t);e[t][0].call(f.exports,d,f,f.exports,this)}return i[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:l(t)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=i,l.parent=a,l.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return s[n]}}),s[n]=l;for(var u=0;u0&&void 0!==c[0]?c[0]:{}).fallbackFont)return[2,this.utils.errorHandle(t.fallbackFont,"artplayerPluginLibass: fallbackFont is required")];return t.workerUrl||(t.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),t.availableFonts&&(t.availableFonts=Object.entries(t.availableFonts).reduce(function(t,r){var n=(0,f._)(r,2),o=n[0],s=n[1];return t[o]=(0,a._)(e,_,L).call(e,s),t},{})),n=this,o=h.default.bind,s=[(0,l._)({subContent:"[Script Info]\nScriptType: v4.00+",video:this.$video},t)],i={},[4,(0,a._)(this,w,F).call(this,t)];case 1:return n.libass=new(o.apply(h.default,[void 0,(0,u._).apply(void 0,s.concat([(i.workerUrl=d.sent(),i.fallbackFont=(0,a._)(this,_,L).call(this,t.fallbackFont),i.fonts=null===(r=t.fonts)||void 0===r?void 0:r.map(function(t){return(0,a._)(e,_,L).call(e,t)}),i)]))])),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n z-index: 20;",[2]}})})).apply(this,arguments)}function E(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}function P(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}function T(e){this.$webvtt.style.visibility=e?"visible":"hidden"}function L(e){return(0,a._)(this,g,S).call(this,e)?e:new URL(e,document.baseURI).toString()}function S(e){return/^https?:\/\//.test(e)}function F(e){var t=this,r=e.workerUrl,n=e.wasmUrl;return new Promise(function(e){fetch(r).then(function(e){return e.text()}).then(function(o){var s=o,i=new Blob([s=s.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,function(e,o){return n=n?(0,a._)(t,_,L).call(t,n):new URL(o,r).toString(),'wasmBinaryFile = "'.concat(n,'"')})],{type:"text/javascript"});e(URL.createObjectURL(i))})})}function I(){var e=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));t instanceof WebAssembly.Module&&(e=new WebAssembly.Instance(t) instanceof WebAssembly.Instance)}}catch(e){}this.utils.errorHandle(e,"Browser does not support WebAssembly")}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_class_private_method_get":"g3ohx","@swc/helpers/_/_class_private_method_init":"7mIdc","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_ts_generator":"6Xyd0","libass-wasm":"gKNB2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,s,a){try{var i=e[s](a),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var a=e.apply(t,r);function i(e){o(a,n,s,i,c,"next",e)}function c(e){o(a,n,s,i,c,"throw",e)}i(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9iJMm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],g3ohx:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7mIdc":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return s});var o=e("./_check_private_redeclaration.js");function s(e,t){(0,o._)(e,t),t.add(e)}},{"./_check_private_redeclaration.js":"7Xw9a","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7Xw9a":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function l(e,t,r,n){var o,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(a=(s<3?o(a):s>3?o(t,r,a):o(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var i,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?n.static?e:e.prototype:null,f=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),d=!1,p=r.length-1;p>=0;p--){var h={};for(var v in n)h[v]="access"===v?{}:n[v];for(var v in n.access)h.access[v]=n.access[v];h.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,r[p])("accessor"===c?{get:f.get,set:f.set}:f[l],h);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(i=a(m.get))&&(f.get=i),(i=a(m.set))&&(f.set=i),(i=a(m.init))&&o.unshift(i)}else(i=a(m))&&("field"===c?o.unshift(i):f[l]=i)}u&&Object.defineProperty(u,n.name,f),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a}function j(){for(var e=[],t=0;t1||i(e,t)})},t&&(n[e]=t(n[e])))}function i(e,t){try{var r;(r=o[e](t)).value instanceof O?Promise.resolve(r.value.v).then(c,l):u(s[0][2],r)}catch(e){u(s[0][3],e)}}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),s.shift(),s.length&&i(s[0][0],s[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:O(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function L(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return S(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function M(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function W(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function D(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function C(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var A="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function R(e){function t(t){e.error=e.hasError?new A(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:a,__assign:i,__rest:c,__decorate:l,__param:u,__metadata:v,__awaiter:m,__generator:y,__createBinding:b,__exportStar:_,__values:g,__read:w,__spread:j,__spreadArrays:k,__spreadArray:x,__await:O,__asyncGenerator:E,__asyncDelegator:P,__asyncValues:T,__makeTemplateObject:L,__importStar:F,__importDefault:I,__classPrivateFieldGet:M,__classPrivateFieldSet:W,__classPrivateFieldIn:D,__addDisposableResource:C,__disposeResources:R}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gKNB2:[function(e,t,r){"function"==typeof SubtitlesOctopusOnLoad&&SubtitlesOctopusOnLoad(),t.exports&&(t.exports=function(e){var t=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var r=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));r instanceof WebAssembly.Module&&(t=new WebAssembly.Instance(r) instanceof WebAssembly.Instance)}}catch(e){}console.log("WebAssembly support detected: "+(t?"yes":"no"));var n=this;function o(){n.setCurrentTime(n.video.currentTime+n.timeOffset)}function s(){n.setIsPaused(!1,n.video.currentTime+n.timeOffset)}function a(){n.setIsPaused(!0,n.video.currentTime+n.timeOffset)}function i(){n.video.removeEventListener("timeupdate",o,!1)}function c(){n.video.addEventListener("timeupdate",o,!1);var e=n.video.currentTime+n.timeOffset;n.setCurrentTime(e)}function l(){n.setRate(n.video.playbackRate)}function u(){n.setIsPaused(!0,n.video.currentTime+n.timeOffset)}function f(e){e.target.removeEventListener(e.type,f,!1),n.resize()}function d(){var e=n.renderFramesData,t=performance.now();n.ctx.clearRect(0,0,n.canvas.width,n.canvas.height);for(var r=0;r=1?s[a]:1;var i=new ImageData(s,o.w,o.h);n.bufferCanvasCtx.putImageData(i,0,0),n.ctx.drawImage(n.bufferCanvas,o.x,o.y)}if(n.debug){var c=Math.round(performance.now()-t),l=e.blendTime;void 0!==l?console.log("render: "+Math.round(e.spentTime-l)+" ms, blend: "+Math.round(l)+" ms, draw: "+c+" ms; TOTAL="+Math.round(e.spentTime+c)+" ms"):console.log(Math.round(e.spentTime)+" ms (+ "+c+" ms draw)"),n.renderStart=performance.now()}}function p(){var e=n.renderFramesData,t=performance.now();n.ctx.clearRect(0,0,n.canvas.width,n.canvas.height);for(var r=0;r0?n.resize():n.video.addEventListener("loadedmetadata",f,!1))},n.getVideoPosition=function(){var e=n.video.videoWidth/n.video.videoHeight,t=n.video.offsetWidth,r=n.video.offsetHeight,o=t,s=r;t/r>e?o=Math.floor(r*e):s=Math.floor(t/e);var a=(t-o)/2,i=(r-s)/2;return{width:o,height:s,x:a,y:i}},n.setSubUrl=function(e){n.subUrl=e},n.renderFrameData=null,n.workerActive=!1,n.frameId=0,n.onWorkerMessage=function(e){!n.workerActive&&(n.workerActive=!0,n.onReadyEvent&&n.onReadyEvent());var t=e.data;switch(t.target){case"stdout":console.log(t.content);break;case"console-log":console.log.apply(console,JSON.parse(t.content));break;case"console-debug":console.debug.apply(console,JSON.parse(t.content));break;case"console-info":console.info.apply(console,JSON.parse(t.content));break;case"console-warn":console.warn.apply(console,JSON.parse(t.content));break;case"console-error":console.error.apply(console,JSON.parse(t.content));break;case"stderr":console.error(t.content);break;case"window":window[t.method]();break;case"canvas":switch(t.op){case"getContext":n.ctx=n.canvas.getContext(t.type,t.attributes);break;case"resize":n.resize(t.width,t.height);break;case"renderCanvas":n.lastRenderTime0&&s>n.maxRenderHeight&&(s=n.maxRenderHeight),e*=s/t,t=s}return{width:e,height:t}}((s=n.getVideoPosition()).width*n.pixelRatio,s.height*n.pixelRatio);e=a.width,t=a.height;var i=n.canvasParent.getBoundingClientRect().top-n.video.getBoundingClientRect().top;r=s.y-i,o=s.x}if(!e||!t){n.video||console.error("width or height is 0. You should specify width & height for resize.");return}(n.canvas.width!=e||n.canvas.height!=t||n.canvas.style.top!=r||n.canvas.style.left!=o)&&(n.canvas.width=e,n.canvas.height=t,null!=s&&(n.canvasParent.style.position="relative",n.canvas.style.display="block",n.canvas.style.position="absolute",n.canvas.style.width=s.width+"px",n.canvas.style.height=s.height+"px",n.canvas.style.top=r+"px",n.canvas.style.left=o+"px",n.canvas.style.pointerEvents="none"),n.worker.postMessage({target:"canvas",width:n.canvas.width,height:n.canvas.height}))},n.resizeWithTimeout=function(){n.resize(),setTimeout(n.resize,100)},n.runBenchmark=function(){n.worker.postMessage({target:"runBenchmark"})},n.customMessage=function(e,t){t=t||{},n.worker.postMessage({target:"custom",userData:e,preMain:t.preMain})},n.setCurrentTime=function(e){n.worker.postMessage({target:"video",currentTime:e})},n.setTrackByUrl=function(e){n.worker.postMessage({target:"set-track-by-url",url:e})},n.setTrack=function(e){n.worker.postMessage({target:"set-track",content:e})},n.freeTrack=function(e){n.worker.postMessage({target:"free-track"})},n.render=n.setCurrentTime,n.setIsPaused=function(e,t){n.worker.postMessage({target:"video",isPaused:e,currentTime:t})},n.setRate=function(e){n.worker.postMessage({target:"video",rate:e})},n.dispose=function(){n.worker.postMessage({target:"destroy"}),n.worker.terminate(),n.worker.removeEventListener("message",n.onWorkerMessage),n.worker.removeEventListener("error",n.workerError),n.workerActive=!1,n.worker=null,n.video&&(n.video.removeEventListener("timeupdate",o,!1),n.video.removeEventListener("playing",s,!1),n.video.removeEventListener("pause",a,!1),n.video.removeEventListener("seeking",i,!1),n.video.removeEventListener("seeked",c,!1),n.video.removeEventListener("ratechange",l,!1),n.video.removeEventListener("waiting",u,!1),n.video.removeEventListener("loadedmetadata",f,!1),document.removeEventListener("fullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("mozfullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("webkitfullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("msfullscreenchange",n.resizeWithTimeout,!1),window.removeEventListener("resize",n.resizeWithTimeout,!1),n.video.parentNode.removeChild(n.canvasParent),n.video=null),n.ro&&(n.ro.disconnect(),n.ro=null),n.onCustomMessage=null,n.onErrorEvent=null,n.onReadyEvent=null},n.fetchFromWorker=function(e,t,r){try{var o=e.target,s=setTimeout(function(){i(Error("Error: Timeout while try to fetch "+o))},5e3),a=function(e){e.data.target==o&&(t(e.data),n.worker.removeEventListener("message",a),n.worker.removeEventListener("error",i),clearTimeout(s))},i=function(e){r(e),n.worker.removeEventListener("message",a),n.worker.removeEventListener("error",i),clearTimeout(s)};n.worker.addEventListener("message",a),n.worker.addEventListener("error",i),n.worker.postMessage(e)}catch(e){r(e)}},n.createEvent=function(e){n.worker.postMessage({target:"create-event",event:e})},n.getEvents=function(e,t){n.fetchFromWorker({target:"get-events"},function(t){e(t.events)},t)},n.setEvent=function(e,t){n.worker.postMessage({target:"set-event",event:e,index:t})},n.removeEvent=function(e){n.worker.postMessage({target:"remove-event",index:e})},n.createStyle=function(e){n.worker.postMessage({target:"create-style",style:e})},n.getStyles=function(e,t){n.fetchFromWorker({target:"get-styles"},function(t){e(t.styles)},t)},n.setStyle=function(e,t){n.worker.postMessage({target:"set-style",style:e,index:t})},n.removeStyle=function(e){n.worker.postMessage({target:"remove-style",index:e})},n.init()})},{}]},["1dPf1"],"1dPf1","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,s,a,i){var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof c[n]&&c[n],u=l.i||{},f=l.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!f[t]){if(!e[t]){if(o[t])return o[t];var s="function"==typeof c[n]&&c[n];if(!r&&s)return s(t,!0);if(l)return l(t,!0);if(d&&"string"==typeof t)return d(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}u.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},u.cache={};var i=f[t]=new p.Module(t);e[t][0].call(i.exports,u,i,i.exports,c)}return f[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=d,this.exports={}},p.modules=e,p.cache=f,p.parent=l,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=u,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return c[n]}}),c[n]=p;for(var h=0;h0&&void 0!==c[0]?c[0]:{}).fallbackFont)return[2,this.utils.errorHandle(t.fallbackFont,"artplayerPluginLibass: fallbackFont is required")];return t.workerUrl||(t.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),t.availableFonts&&(t.availableFonts=Object.entries(t.availableFonts).reduce(function(t,r){var n=(0,d._)(r,2),o=n[0],s=n[1];return t[o]=(0,i._)(e,w,F).call(e,s),t},{})),n=this,o=m.default.bind,s=[(0,u._)({subContent:"[Script Info]\nScriptType: v4.00+",video:this.$video},t)],a={},[4,(0,i._)(this,k,W).call(this,t)];case 1:return n.libass=new(o.apply(m.default,[void 0,f._.apply(void 0,s.concat([(a.workerUrl=l.sent(),a.fallbackFont=(0,i._)(this,w,F).call(this,t.fallbackFont),a.fonts=null==(r=t.fonts)?void 0:r.map(function(t){return(0,i._)(e,w,F).call(e,t)}),a)]))])),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n z-index: 20;",[2]}})})).apply(this,arguments)}function L(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}function T(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}function S(e){this.$webvtt.style.visibility=e?"visible":"hidden"}function F(e){return(0,i._)(this,j,I).call(this,e)?e:new URL(e,document.baseURI).toString()}function I(e){return/^https?:\/\//.test(e)}function W(e){var t=this,r=e.workerUrl,n=e.wasmUrl;return new Promise(function(e){fetch(r).then(function(e){return e.text()}).then(function(o){var s=o,a=new Blob([s=s.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,function(e,o){return n=n?(0,i._)(t,w,F).call(t,n):new URL(o,r).toString(),'wasmBinaryFile = "'.concat(n,'"')})],{type:"text/javascript"});e(URL.createObjectURL(a))})})}function M(){var e=!1;try{if(("undefined"==typeof WebAssembly?"undefined":(0,p._)(WebAssembly))==="object"&&"function"==typeof WebAssembly.instantiate){var t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));t instanceof WebAssembly.Module&&(e=new WebAssembly.Instance(t)instanceof WebAssembly.Instance)}}catch(e){}this.utils.errorHandle(e,"Browser does not support WebAssembly")}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_class_private_method_get":"g3ohx","@swc/helpers/_/_class_private_method_init":"7mIdc","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","libass-wasm":"gKNB2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t,r,n,o,s,a){try{var i=e[s](a),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){s(a,n,o,i,c,"next",e)}function c(e){s(a,n,o,i,c,"throw",e)}i(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9iJMm":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}o.defineInteropFlag(r),o.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],g3ohx:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}o.defineInteropFlag(r),o.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7mIdc":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return a});var s=e("./_check_private_redeclaration.js");function a(e,t){(0,s._)(e,t),t.add(e)}},{"./_check_private_redeclaration.js":"7Xw9a","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7Xw9a":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}o.defineInteropFlag(r),o.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,s._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function f(e,t){return function(r,n){t(r,n,e)}}function d(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,u="getter"===l?"get":"setter"===l?"set":"value",f=!t&&e?n.static?e:e.prototype:null,d=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,h=r.length-1;h>=0;h--){var v={};for(var m in n)v[m]="access"===m?{}:n[m];for(var m in n.access)v.access[m]=n.access[m];v.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var y=(0,r[h])("accessor"===l?{get:d.get,set:d.set}:d[u],v);if("accessor"===l){if(void 0===y)continue;if(null===y||(void 0===y?"undefined":(0,s._)(y))!=="object")throw TypeError("Object expected");(c=i(y.get))&&(d.get=c),(c=i(y.set))&&(d.set=c),(c=i(y.init))&&o.unshift(c)}else(c=i(y))&&("field"===l?o.unshift(c):d[u]=c)}f&&Object.defineProperty(f,n.name,d),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a}function k(){for(var e=[],t=0;t1||i(e,t)})},t&&(n[e]=t(n[e])))}function i(e,t){try{var r;(r=o[e](t)).value instanceof E?Promise.resolve(r.value.v).then(c,l):u(s[0][2],r)}catch(e){u(s[0][3],e)}}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),s.shift(),s.length&&i(s[0][0],s[0][1])}}function L(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=w(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var s,a,i;s=n,a=o,i=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){s({value:e,done:i})},a)})}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},I=function(e){return(I=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function W(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=I(e),n=0;n=1?s[a]:1;var i=new ImageData(s,o.w,o.h);n.bufferCanvasCtx.putImageData(i,0,0),n.ctx.drawImage(n.bufferCanvas,o.x,o.y)}if(n.debug){var c=Math.round(performance.now()-t),l=e.blendTime;void 0!==l?console.log("render: "+Math.round(e.spentTime-l)+" ms, blend: "+Math.round(l)+" ms, draw: "+c+" ms; TOTAL="+Math.round(e.spentTime+c)+" ms"):console.log(Math.round(e.spentTime)+" ms (+ "+c+" ms draw)"),n.renderStart=performance.now()}}function h(){var e=n.renderFramesData,t=performance.now();n.ctx.clearRect(0,0,n.canvas.width,n.canvas.height);for(var r=0;r0?n.resize():n.video.addEventListener("loadedmetadata",d,!1))},n.getVideoPosition=function(){var e=n.video.videoWidth/n.video.videoHeight,t=n.video.offsetWidth,r=n.video.offsetHeight,o=t,s=r;t/r>e?o=Math.floor(r*e):s=Math.floor(t/e);var a=(t-o)/2,i=(r-s)/2;return{width:o,height:s,x:a,y:i}},n.setSubUrl=function(e){n.subUrl=e},n.renderFrameData=null,n.workerActive=!1,n.frameId=0,n.onWorkerMessage=function(e){!n.workerActive&&(n.workerActive=!0,n.onReadyEvent&&n.onReadyEvent());var t=e.data;switch(t.target){case"stdout":console.log(t.content);break;case"console-log":console.log.apply(console,JSON.parse(t.content));break;case"console-debug":console.debug.apply(console,JSON.parse(t.content));break;case"console-info":console.info.apply(console,JSON.parse(t.content));break;case"console-warn":console.warn.apply(console,JSON.parse(t.content));break;case"console-error":console.error.apply(console,JSON.parse(t.content));break;case"stderr":console.error(t.content);break;case"window":window[t.method]();break;case"canvas":switch(t.op){case"getContext":n.ctx=n.canvas.getContext(t.type,t.attributes);break;case"resize":n.resize(t.width,t.height);break;case"renderCanvas":n.lastRenderTime0&&s>n.maxRenderHeight&&(s=n.maxRenderHeight),e*=s/t,t=s}return{width:e,height:t}}((s=n.getVideoPosition()).width*n.pixelRatio,s.height*n.pixelRatio);e=a.width,t=a.height;var i=n.canvasParent.getBoundingClientRect().top-n.video.getBoundingClientRect().top;r=s.y-i,o=s.x}if(!e||!t){n.video||console.error("width or height is 0. You should specify width & height for resize.");return}(n.canvas.width!=e||n.canvas.height!=t||n.canvas.style.top!=r||n.canvas.style.left!=o)&&(n.canvas.width=e,n.canvas.height=t,null!=s&&(n.canvasParent.style.position="relative",n.canvas.style.display="block",n.canvas.style.position="absolute",n.canvas.style.width=s.width+"px",n.canvas.style.height=s.height+"px",n.canvas.style.top=r+"px",n.canvas.style.left=o+"px",n.canvas.style.pointerEvents="none"),n.worker.postMessage({target:"canvas",width:n.canvas.width,height:n.canvas.height}))},n.resizeWithTimeout=function(){n.resize(),setTimeout(n.resize,100)},n.runBenchmark=function(){n.worker.postMessage({target:"runBenchmark"})},n.customMessage=function(e,t){t=t||{},n.worker.postMessage({target:"custom",userData:e,preMain:t.preMain})},n.setCurrentTime=function(e){n.worker.postMessage({target:"video",currentTime:e})},n.setTrackByUrl=function(e){n.worker.postMessage({target:"set-track-by-url",url:e})},n.setTrack=function(e){n.worker.postMessage({target:"set-track",content:e})},n.freeTrack=function(e){n.worker.postMessage({target:"free-track"})},n.render=n.setCurrentTime,n.setIsPaused=function(e,t){n.worker.postMessage({target:"video",isPaused:e,currentTime:t})},n.setRate=function(e){n.worker.postMessage({target:"video",rate:e})},n.dispose=function(){n.worker.postMessage({target:"destroy"}),n.worker.terminate(),n.worker.removeEventListener("message",n.onWorkerMessage),n.worker.removeEventListener("error",n.workerError),n.workerActive=!1,n.worker=null,n.video&&(n.video.removeEventListener("timeupdate",s,!1),n.video.removeEventListener("playing",a,!1),n.video.removeEventListener("pause",i,!1),n.video.removeEventListener("seeking",c,!1),n.video.removeEventListener("seeked",l,!1),n.video.removeEventListener("ratechange",u,!1),n.video.removeEventListener("waiting",f,!1),n.video.removeEventListener("loadedmetadata",d,!1),document.removeEventListener("fullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("mozfullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("webkitfullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("msfullscreenchange",n.resizeWithTimeout,!1),window.removeEventListener("resize",n.resizeWithTimeout,!1),n.video.parentNode.removeChild(n.canvasParent),n.video=null),n.ro&&(n.ro.disconnect(),n.ro=null),n.onCustomMessage=null,n.onErrorEvent=null,n.onReadyEvent=null},n.fetchFromWorker=function(e,t,r){try{var o=e.target,s=setTimeout(function(){i(Error("Error: Timeout while try to fetch "+o))},5e3),a=function(e){e.data.target==o&&(t(e.data),n.worker.removeEventListener("message",a),n.worker.removeEventListener("error",i),clearTimeout(s))},i=function(e){r(e),n.worker.removeEventListener("message",a),n.worker.removeEventListener("error",i),clearTimeout(s)};n.worker.addEventListener("message",a),n.worker.addEventListener("error",i),n.worker.postMessage(e)}catch(e){r(e)}},n.createEvent=function(e){n.worker.postMessage({target:"create-event",event:e})},n.getEvents=function(e,t){n.fetchFromWorker({target:"get-events"},function(t){e(t.events)},t)},n.setEvent=function(e,t){n.worker.postMessage({target:"set-event",event:e,index:t})},n.removeEvent=function(e){n.worker.postMessage({target:"remove-event",index:e})},n.createStyle=function(e){n.worker.postMessage({target:"create-style",style:e})},n.getStyles=function(e,t){n.fetchFromWorker({target:"get-styles"},function(t){e(t.styles)},t)},n.setStyle=function(e,t){n.worker.postMessage({target:"set-style",style:e,index:t})},n.removeStyle=function(e){n.worker.postMessage({target:"remove-style",index:e})},n.init()})},{"@swc/helpers/_/_type_of":"felZi"}]},["1dPf1"],"1dPf1","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-multiple-subtitles.js b/docs/compiled/artplayer-plugin-multiple-subtitles.js index 84155269a..3acd6d473 100644 --- a/docs/compiled/artplayer-plugin-multiple-subtitles.js +++ b/docs/compiled/artplayer-plugin-multiple-subtitles.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[i]&&a[i],s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!s[t]){if(!e[t]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(t,!0);if(o)return o(t,!0);if(l&&"string"==typeof t)return l(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(n){var i=e[t][1][n];return null!=i?i:n},d.cache={};var c=s[t]=new u.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=o,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var f=0;fo);var r=e("./parser");async function a(e,{getExt:t,srtToVtt:n,assToVtt:i}){let r=await fetch(e.url),a=await r.arrayBuffer(),o=new TextDecoder(e.encoding||"utf-8").decode(a);switch(e.type||t(e.url)){case"srt":return n(o);case"ass":return i(o);case"vtt":return o;default:return""}}function o({subtitles:e=[]}){return async t=>{let{unescape:n,getExt:i,srtToVtt:o,assToVtt:s}=t.constructor.utils,l=new r.WebVTTParser,u=new r.WebVTTSerializer,f=(await Promise.all(e.map(e=>a(e,{getExt:i,srtToVtt:o,assToVtt:s})))).map((t,n)=>{let i=l.parse(t,"metadata");return i.url=e[n].url,i.name=e[n].name,i}),c="";function d(e=[]){let i=function(e){let t=new r.WebVTTParser().parse("","metadata");for(let n=0;n${n.value}`}}}t.cues.push(...i.cues)}return t}(e),a=u.serialize(i.cues);URL.revokeObjectURL(c);let o=URL.createObjectURL(new Blob([a],{type:"text/vtt"}));c=o,t.option.subtitle.escape=!1,t.subtitle.init({...t.option.subtitle,url:o,type:"vtt",onVttLoad:n})}return d(f),{name:"multipleSubtitles",tracks:(e=[])=>d(e.map(e=>f.find(t=>t.name===e))),reset:()=>d(f)}}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=o)},{"./parser":"cU78l","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cU78l:[function(e,t,n){!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},t=function(t){t||(t={"&":"&","<":"<",">":">","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=t,this.parse=function(n,a){n=n.replace(/\0/g,"�");var o=Date.now(),s=0,l=n.split(/\r\n|\r|\n/),u=!1,f=[],c=[],d=[];function p(e,t){d.push({message:e,line:s+1,col:t})}var m=l[s],g=m.length,h="WEBVTT",v=0,b=h.length;for("\uFEFF"===m[0]&&(v=1,b+=1),(gb&&" "!==m[b]&&" "!==m[b])&&p('No valid signature. (File needs to start with "WEBVTT".)'),s++;""!=l[s]&&void 0!=l[s];){if(p("No blank line after the signature."),-1!=l[s].indexOf("-->")){u=!0;break}s++}for(;void 0!=l[s];){for(;!u&&""==l[s];)s++;if(!u&&void 0==l[s])break;T=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null});var T,y=!0;if(-1==l[s].indexOf("-->")){if(T.id=l[s],/^NOTE($|[ \t])/.test(T.id)){for(s++;""!=l[s]&&void 0!=l[s];)-1!=l[s].indexOf("-->")&&p("Cannot have timestamp in a comment."),s++;continue}if(/^STYLE($|[ \t])/.test(T.id)){var x=[],w=!1;for(s++;""!=l[s]&&void 0!=l[s];)-1!=l[s].indexOf("-->")&&(p("Cannot have timestamp in a style block."),w=!0),x.push(l[s]),s++;if(c.length){p("Style blocks cannot appear after the first cue.");continue}w||f.push(x.join("\n"));continue}if(""==l[++s]||void 0==l[s]){p("Cue identifier cannot be standalone.");continue}if(-1==l[s].indexOf("-->")){y=!1,p("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var O=new i(l[s],p),P=0;if(c.length>0&&(P=c[c.length-1].startTime),y&&!O.parse(T,P)){for(T=null,s++;""!=l[s]&&void 0!=l[s];){if(-1!=l[s].indexOf("-->")){u=!0;break}s++}continue}for(s++;""!=l[s]&&void 0!=l[s];){if(-1!=l[s].indexOf("-->")){p("Blank line missing before cue."),u=!0;break}""!=T.text&&(T.text+="\n"),T.text+=l[s],s++}var j=new r(T.text,p,a,t);T.tree=j.parse(T.startTime,T.endTime),c.push(T)}return c.sort(function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:e.endTime2||parseInt(t,10)>59)&&(l="hours"),":"!=e[r]){a("No time unit separator found.");return}if(r++,2!=(n=s(/\d/)).length){a("Must be exactly two digits.");return}if("hours"==l||":"==e[r]){if(":"!=e[r]){a("No seconds found or minutes is greater than 59.");return}if(r++,2!=(i=s(/\d/)).length){a("Must be exactly two digits.");return}}else{if(2!=t.length){a("Must be exactly two digits.");return}i=n,n=t,t="0"}if("."!=e[r]){a('No decimal separator (".") found.');return}if(r++,3!=(o=s(/\d/)).length){a("Milliseconds must be given in three digits.");return}if(parseInt(n,10)>59){a("You cannot have more than 59 minutes.");return}if(parseInt(i,10)>59){a("You cannot have more than 59 seconds.");return}return 3600*parseInt(t,10)+60*parseInt(n,10)+parseInt(i,10)+parseInt(o,10)/1e3}this.parse=function(t,s){if(o(n),t.startTime=l(),void 0!=t.startTime){if(t.startTime' by whitespace."),o(n),"-"!=e[r]||"-"!=e[++r]||">"!=e[++r]){a("No valid timestamp separator found.");return}if(r++,i.test(e[r])&&a("'-->' not separated from timestamp by whitespace."),o(n),t.endTime=l(),void 0!=t.endTime)return t.endTime<=t.startTime&&a("End timestamp is not greater than start timestamp."),i.test(e[r]),o(n),function(e,t){for(var i=e.split(n),r=[],o=0;o100)){a("Line position cannot be >100%.");continue}if(""===d||isNaN(d)||!isFinite(d)){a("Line position needs to be a number");continue}if(void 0!==c){if(!["start","center","end"].includes(c)){a("Line alignment needs to be one of start, center or end");continue}t.lineAlign=c}t.snapToLines=!p,t.linePosition=parseFloat(d),parseFloat(d).toString()!==d&&(t.nonSerializable=!0)}else if("position"==l){if(/,/.test(u)){var f=u.split(",");u=f[0];var m=f[1]}if("%"!=u[u.length-1]){a("Text position must be a percentage.");continue}if(parseInt(u,10)>100||0>parseInt(u,10)){a("Text position needs to be between 0 and 100%.");continue}if(""===(d=u.slice(0,u.length-1))||isNaN(d)||!isFinite(d)){a("Line position needs to be a number");continue}if(void 0!==m){if(!["line-left","center","line-right"].includes(m)){a("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=m}t.textPosition=parseFloat(d)}else if("size"==l){if("%"!=u[u.length-1]){a("Size must be a percentage.");continue}if(parseInt(u,10)>100){a("Size cannot be >100%.");continue}var g=u.slice(0,u.length-1);if(void 0===g||""===g||isNaN(g)){a("Size needs to be a number"),g=100;continue}if((g=parseFloat(g))<0||g>100){a("Size needs to be between 0 and 100%.");continue}t.size=g}else if("align"==l){var h=["start","center","end","left","right"];if(-1==h.indexOf(u)){a("Alignment can only be set to one of "+h.join(", ")+".");continue}t.alignment=u}else a("Invalid setting.")}}(e.substring(r),t),!0}},this.parseTimestamp=function(){var t=l();if(void 0!=e[r]){a("Timestamp must not have trailing characters.");return}return t}},r=function(e,t,n,r){this.entities=r;var a=this,e=e,o=0,s=function(e){"metadata"!=n&&t(e,o+1)};this.parse=function(t,l){var u={children:[]},f=u,c=[];function d(e){f.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:f}),f=f.children[f.children.length-1]}for(;void 0!=e[o];){var p=function(){for(var t="data",n="",i="",l=[];void 0!=e[o-1]||0==o;){var u=e[o];if("data"==t){if("&"==u)i=u,t="escape";else if("<"==u&&""==n)t="tag";else{if("<"==u||void 0==u)return["text",n];n+=u}}else if("escape"==t){if("<"==u||void 0==u){let e;return s("Incorrect escape."),(e=i.match(/^&#([0-9]+)$/))?n+=String.fromCharCode(e[1]):a.entities[i]?n+=a.entities[i]:n+=i,["text",n]}if("&"==u)s("Incorrect escape."),n+=i,i=u;else if(/[a-z#0-9]/i.test(u))i+=u;else if(";"==u){let e;(e=i.match(/^&#(x?[0-9]+)$/))?n+=String.fromCharCode("0"+e[1]):a.entities[i+u]?n+=a.entities[i+u]:(e=Object.keys(r).find(e=>i.startsWith(e)))?n+=a.entities[e]+i.slice(e.length)+u:(s("Incorrect escape."),n+=i+";"),t="data"}else s("Incorrect escape."),n+=i+u,t="data"}else if("tag"==t){if(" "==u||"\n"==u||"\f"==u||" "==u)t="start tag annotation";else if("."==u)t="start tag class";else if("/"==u)t="end tag";else if(/\d/.test(u))n=u,t="timestamp tag";else{if(">"==u||void 0==u)return">"==u&&o++,["start tag","",[],""];n=u,t="start tag"}}else if("start tag"==t){if(" "==u||"\f"==u||" "==u)t="start tag annotation";else if("\n"==u)i=u,t="start tag annotation";else if("."==u)t="start tag class";else{if(">"==u||void 0==u)return">"==u&&o++,["start tag",n,[],""];n+=u}}else if("start tag class"==t){if(" "==u||"\f"==u||" "==u)i&&l.push(i),i="",t="start tag annotation";else if("\n"==u)i&&l.push(i),i=u,t="start tag annotation";else if("."==u)i&&l.push(i),i="";else{if(">"==u||void 0==u)return">"==u&&o++,i&&l.push(i),["start tag",n,l,""];i+=u}}else if("start tag annotation"==t){if(">"==u||void 0==u)return">"==u&&o++,["start tag",n,l,i=i.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];i+=u}else if("end tag"==t){if(">"==u||void 0==u)return">"==u&&o++,["end tag",n];n+=u}else if("timestamp tag"==t){if(">"==u||void 0==u)return">"==u&&o++,["timestamp",n];n+=u}else s("Never happens.");o++}}();if("text"==p[0])f.children.push({type:"text",value:p[1],parent:f});else if("start tag"==p[0]){"chapters"==n&&s("Start tags not allowed in chapter title text.");var m=p[1];"v"!=m&&"lang"!=m&&""!=p[3]&&s("Onlyandcan have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m?d(p):"rt"==m&&"ruby"==f.name?d(p):"v"==m?(function(e){for(var t=f;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&s("cannot be nested inside itself."),d(p),f.value=p[3],p[3]||s("requires an annotation.")):"lang"==m?(d(p),f.value=p[3]):s("Incorrect start tag.")}else if("end tag"==p[0])"chapters"==n&&s("End tags not allowed in chapter title text."),p[1]==f.name?f=f.parent:"ruby"==p[1]&&"rt"==f.name?f=f.parent.parent:s("Incorrect end tag.");else if("timestamp"==p[0]){"chapters"==n&&s("Timestamp not allowed in chapter title text.");var g=new i(p[1],s).parseTimestamp();void 0!=g&&((g<=t||g>=l)&&s("Timestamp must be between start timestamp and end timestamp."),c.length>0&&c[c.length-1]>=g&&s("Timestamp must be greater than any previous timestamp."),f.children.push({type:"timestamp",value:g,parent:f}),c.push(g))}}for(;f.parent;)"v"!=f.name&&s("Required end tag missing."),f=f.parent;return function e(t){let n={...t};return t.children&&(n.children=t.children.map(e)),n.parent&&delete n.parent,n}(u)}},a=function(){function t(e){let t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),n=0,i=0,r=0;return e>=3600&&(n=Math.floor(e/3600)),i=Math.floor((e-3600*n)/60),r=Math.floor(e-3600*n-60*i),(n?n+":":"")+(""+i).padStart(2,"0")+":"+(""+r).padStart(2,"0")+"."+t}this.serialize=function(n,i){var r,a="WEBVTT\n\n";if(i)for(var o=0;o"+t(r.endTime)+function(t){var n="";let i=Object.keys(e).filter(n=>t[n]!==e[n]);return i.includes("direction")&&(n+=" vertical:"+t.direction),i.includes("alignment")&&(n+=" align:"+t.alignment),i.includes("size")&&(n+=" size:"+t.size+"%"),(i.includes("lineAlign")||i.includes("linePosition"))&&(n+=" line:"+t.linePosition+(t.snapToLines?"":"%")+(t.lineAlign&&t.lineAlign!=e.lineAlign?","+t.lineAlign:"")),(i.includes("textPosition")||i.includes("positionAlign"))&&(n+=" position:"+t.textPosition+"%"+(t.positionAlign&&t.positionAlign!==e.positionAlign?","+t.positionAlign:"")),n}(r)+"\n"+function e(n){for(var i="",r=0;r/g,">");else if("object"==a.type){if(i+="<"+a.name,a.classes)for(var o=0;o"}else"timestamp"==a.type?i+="<"+t(a.value)+">":i+="<"+a.value+">"}return i}(r.tree.children)+"\n\n";return a}};function o(e){e.WebVTTParser=t,e.WebVTTCueTimingsAndSettingsParser=i,e.WebVTTCueTextParser=r,e.WebVTTSerializer=a}"undefined"!=typeof window&&o(window),o(n)}()},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["4Kbf6"],"4Kbf6","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,i,r,a,o,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof l[i]&&l[i],f=u.i||{},d=u.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!d[t]){if(!e[t]){if(r[t])return r[t];var a="function"==typeof l[i]&&l[i];if(!n&&a)return a(t,!0);if(u)return u(t,!0);if(c&&"string"==typeof t)return c(t);var o=Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(n){var i=e[t][1][n];return null!=i?i:n},f.cache={};var s=d[t]=new p.Module(t);e[t][0].call(s.exports,f,s,s.exports,l)}return d[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=c,this.exports={}},p.modules=e,p.cache=d,p.parent=u,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=f,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return l[i]}}),l[i]=p;for(var m=0;ms);var a=e("./parser");async function o(e,{getExt:t,srtToVtt:n,assToVtt:i}){let r=await fetch(e.url),a=await r.arrayBuffer(),o=new TextDecoder(e.encoding||"utf-8").decode(a);switch(e.type||t(e.url)){case"srt":return n(o);case"ass":return i(o);case"vtt":return o;default:return""}}function s({subtitles:e=[]}){return async t=>{let{unescape:n,getExt:i,srtToVtt:r,assToVtt:s}=t.constructor.utils,l=new(0,a.WebVTTParser),u=new(0,a.WebVTTSerializer),f=(await Promise.all(e.map(e=>o(e,{getExt:i,srtToVtt:r,assToVtt:s})))).map((t,n)=>{let i=l.parse(t,"metadata");return i.url=e[n].url,i.name=e[n].name,i}),d="";function c(e=[]){let i=function(e){let t=new(0,a.WebVTTParser)().parse("","metadata");for(let n=0;n${n.value}`}}}t.cues.push(...i.cues)}return t}(e),r=u.serialize(i.cues);URL.revokeObjectURL(d);let o=URL.createObjectURL(new Blob([r],{type:"text/vtt"}));d=o,t.option.subtitle.escape=!1,t.subtitle.init({...t.option.subtitle,url:o,type:"vtt",onVttLoad:n})}return c(f),{name:"multipleSubtitles",tracks:(e=[])=>c(e.map(e=>f.find(t=>t.name===e))),reset:()=>c(f)}}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=s)},{"./parser":"cU78l","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cU78l:[function(e,t,n,i){!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},t=function(t){t||(t={"&":"&","<":"<",">":">","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=t,this.parse=function(n,a){n=n.replace(/\0/g,"�");var o=Date.now(),s=0,l=n.split(/\r\n|\r|\n/),u=!1,f=[],d=[],c=[];function p(e,t){c.push({message:e,line:s+1,col:t})}var m=l[s],g=m.length,v="WEBVTT",h=0,b=v.length;for("\uFEFF"===m[0]&&(h=1,b+=1),(gb&&" "!==m[b]&&" "!==m[b])&&p('No valid signature. (File needs to start with "WEBVTT".)'),s++;""!=l[s]&&void 0!=l[s];){if(p("No blank line after the signature."),-1!=l[s].indexOf("--\x3e")){u=!0;break}s++}for(;void 0!=l[s];){for(;!u&&""==l[s];)s++;if(!u&&void 0==l[s])break;var T=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null}),y=!0;if(-1==l[s].indexOf("--\x3e")){if(T.id=l[s],/^NOTE($|[ \t])/.test(T.id)){for(s++;""!=l[s]&&void 0!=l[s];)-1!=l[s].indexOf("--\x3e")&&p("Cannot have timestamp in a comment."),s++;continue}if(/^STYLE($|[ \t])/.test(T.id)){var x=[],w=!1;for(s++;""!=l[s]&&void 0!=l[s];)-1!=l[s].indexOf("--\x3e")&&(p("Cannot have timestamp in a style block."),w=!0),x.push(l[s]),s++;if(d.length){p("Style blocks cannot appear after the first cue.");continue}w||f.push(x.join("\n"));continue}if(""==l[++s]||void 0==l[s]){p("Cue identifier cannot be standalone.");continue}if(-1==l[s].indexOf("--\x3e")){y=!1,p("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var O=new i(l[s],p),P=0;if(d.length>0&&(P=d[d.length-1].startTime),y&&!O.parse(T,P)){for(T=null,s++;""!=l[s]&&void 0!=l[s];){if(-1!=l[s].indexOf("--\x3e")){u=!0;break}s++}continue}for(s++;""!=l[s]&&void 0!=l[s];){if(-1!=l[s].indexOf("--\x3e")){p("Blank line missing before cue."),u=!0;break}""!=T.text&&(T.text+="\n"),T.text+=l[s],s++}var j=new r(T.text,p,a,t);T.tree=j.parse(T.startTime,T.endTime),d.push(T)}return d.sort(function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:+(e.endTime2||parseInt(t,10)>59)&&(l="hours"),":"!=e[r])return void a("No time unit separator found.");if(r++,2!=(n=s(/\d/)).length)return void a("Must be exactly two digits.");if("hours"==l||":"==e[r]){if(":"!=e[r])return void a("No seconds found or minutes is greater than 59.");if(r++,2!=(i=s(/\d/)).length)return void a("Must be exactly two digits.")}else{if(2!=t.length)return void a("Must be exactly two digits.");i=n,n=t,t="0"}return"."!=e[r]?void a('No decimal separator (".") found.'):(r++,3!=(o=s(/\d/)).length)?void a("Milliseconds must be given in three digits."):parseInt(n,10)>59?void a("You cannot have more than 59 minutes."):parseInt(i,10)>59?void a("You cannot have more than 59 seconds."):3600*parseInt(t,10)+60*parseInt(n,10)+parseInt(i,10)+parseInt(o,10)/1e3}this.parse=function(t,s){return(o(n),t.startTime=l(),void 0==t.startTime)?void 0:(t.startTime"!=e[++r])?void a("No valid timestamp separator found."):(r++,i.test(e[r])&&a("'--\x3e' not separated from timestamp by whitespace."),o(n),t.endTime=l(),void 0!=t.endTime)?(t.endTime<=t.startTime&&a("End timestamp is not greater than start timestamp."),i.test(e[r]),o(n),!function(e,t){for(var i=e.split(n),r=[],o=0;o100)){a("Line position cannot be >100%.");continue}if(""===c||isNaN(c)||!isFinite(c)){a("Line position needs to be a number");continue}if(void 0!==d){if(!["start","center","end"].includes(d)){a("Line alignment needs to be one of start, center or end");continue}t.lineAlign=d}t.snapToLines=!p,t.linePosition=parseFloat(c),parseFloat(c).toString()!==c&&(t.nonSerializable=!0)}else if("position"==l){if(/,/.test(u)){var f=u.split(",");u=f[0];var m=f[1]}if("%"!=u[u.length-1]){a("Text position must be a percentage.");continue}if(parseInt(u,10)>100||0>parseInt(u,10)){a("Text position needs to be between 0 and 100%.");continue}if(""===(c=u.slice(0,u.length-1))||isNaN(c)||!isFinite(c)){a("Line position needs to be a number");continue}if(void 0!==m){if(!["line-left","center","line-right"].includes(m)){a("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=m}t.textPosition=parseFloat(c)}else if("size"==l){if("%"!=u[u.length-1]){a("Size must be a percentage.");continue}if(parseInt(u,10)>100){a("Size cannot be >100%.");continue}var g=u.slice(0,u.length-1);if(void 0===g||""===g||isNaN(g)){a("Size needs to be a number"),g=100;continue}if((g=parseFloat(g))<0||g>100){a("Size needs to be between 0 and 100%.");continue}t.size=g}else if("align"==l){var v=["start","center","end","left","right"];if(-1==v.indexOf(u)){a("Alignment can only be set to one of "+v.join(", ")+".");continue}t.alignment=u}else a("Invalid setting.")}}(e.substring(r),t),!0):void 0},this.parseTimestamp=function(){var t=l();return void 0!=e[r]?void a("Timestamp must not have trailing characters."):t}},r=function(e,t,n,r){this.entities=r;var a=this,e=e,o=0,s=function(e){"metadata"!=n&&t(e,o+1)};this.parse=function(t,l){var u={children:[]},f=u,d=[];function c(e){f.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:f}),f=f.children[f.children.length-1]}for(;void 0!=e[o];){var p=function(){for(var t="data",n="",i="",l=[];void 0!=e[o-1]||0==o;){var u=e[o];if("data"==t)if("&"==u)i=u,t="escape";else if("<"==u&&""==n)t="tag";else{if("<"==u||void 0==u)return["text",n];n+=u}else if("escape"==t)if("<"==u||void 0==u){let e;return s("Incorrect escape."),(e=i.match(/^&#([0-9]+)$/))?n+=String.fromCharCode(e[1]):a.entities[i]?n+=a.entities[i]:n+=i,["text",n]}else if("&"==u)s("Incorrect escape."),n+=i,i=u;else if(/[a-z#0-9]/i.test(u))i+=u;else if(";"==u){let e;(e=i.match(/^&#(x?[0-9]+)$/))?n+=String.fromCharCode("0"+e[1]):a.entities[i+u]?n+=a.entities[i+u]:(e=Object.keys(r).find(e=>i.startsWith(e)))?n+=a.entities[e]+i.slice(e.length)+u:(s("Incorrect escape."),n+=i+";"),t="data"}else s("Incorrect escape."),n+=i+u,t="data";else if("tag"==t)if(" "==u||"\n"==u||"\f"==u||" "==u)t="start tag annotation";else if("."==u)t="start tag class";else if("/"==u)t="end tag";else if(/\d/.test(u))n=u,t="timestamp tag";else{if(">"==u||void 0==u)return">"==u&&o++,["start tag","",[],""];n=u,t="start tag"}else if("start tag"==t)if(" "==u||"\f"==u||" "==u)t="start tag annotation";else if("\n"==u)i=u,t="start tag annotation";else if("."==u)t="start tag class";else{if(">"==u||void 0==u)return">"==u&&o++,["start tag",n,[],""];n+=u}else if("start tag class"==t)if(" "==u||"\f"==u||" "==u)i&&l.push(i),i="",t="start tag annotation";else if("\n"==u)i&&l.push(i),i=u,t="start tag annotation";else if("."==u)i&&l.push(i),i="";else{if(">"==u||void 0==u)return">"==u&&o++,i&&l.push(i),["start tag",n,l,""];i+=u}else if("start tag annotation"==t)if(">"==u||void 0==u)return">"==u&&o++,["start tag",n,l,i=i.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];else i+=u;else if("end tag"==t)if(">"==u||void 0==u)return">"==u&&o++,["end tag",n];else n+=u;else if("timestamp tag"==t)if(">"==u||void 0==u)return">"==u&&o++,["timestamp",n];else n+=u;else s("Never happens.");o++}}();if("text"==p[0])f.children.push({type:"text",value:p[1],parent:f});else if("start tag"==p[0]){"chapters"==n&&s("Start tags not allowed in chapter title text.");var m=p[1];"v"!=m&&"lang"!=m&&""!=p[3]&&s("Onlyandcan have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m||"rt"==m&&"ruby"==f.name?c(p):"v"==m?(function(e){for(var t=f;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&s("cannot be nested inside itself."),c(p),f.value=p[3],p[3]||s("requires an annotation.")):"lang"==m?(c(p),f.value=p[3]):s("Incorrect start tag.")}else if("end tag"==p[0])"chapters"==n&&s("End tags not allowed in chapter title text."),p[1]==f.name?f=f.parent:"ruby"==p[1]&&"rt"==f.name?f=f.parent.parent:s("Incorrect end tag.");else if("timestamp"==p[0]){"chapters"==n&&s("Timestamp not allowed in chapter title text.");var g=new i(p[1],s).parseTimestamp();void 0!=g&&((g<=t||g>=l)&&s("Timestamp must be between start timestamp and end timestamp."),d.length>0&&d[d.length-1]>=g&&s("Timestamp must be greater than any previous timestamp."),f.children.push({type:"timestamp",value:g,parent:f}),d.push(g))}}for(;f.parent;)"v"!=f.name&&s("Required end tag missing."),f=f.parent;return function e(t){let n={...t};return t.children&&(n.children=t.children.map(e)),n.parent&&delete n.parent,n}(u)}},a=function(){function t(e){let t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),n=0,i=0,r=0;return e>=3600&&(n=Math.floor(e/3600)),i=Math.floor((e-3600*n)/60),r=Math.floor(e-3600*n-60*i),(n?n+":":"")+(""+i).padStart(2,"0")+":"+(""+r).padStart(2,"0")+"."+t}this.serialize=function(n,i){var r,a="WEBVTT\n\n";if(i)for(var o=0;ot[n]!==e[n]);return i.includes("direction")&&(n+=" vertical:"+t.direction),i.includes("alignment")&&(n+=" align:"+t.alignment),i.includes("size")&&(n+=" size:"+t.size+"%"),(i.includes("lineAlign")||i.includes("linePosition"))&&(n+=" line:"+t.linePosition+(t.snapToLines?"":"%")+(t.lineAlign&&t.lineAlign!=e.lineAlign?","+t.lineAlign:"")),(i.includes("textPosition")||i.includes("positionAlign"))&&(n+=" position:"+t.textPosition+"%"+(t.positionAlign&&t.positionAlign!==e.positionAlign?","+t.positionAlign:"")),n}(r)+"\n"+function e(n){for(var i="",r=0;r/g,">");else if("object"==a.type){if(i+="<"+a.name,a.classes)for(var o=0;o"}else"timestamp"==a.type?i+="<"+t(a.value)+">":i+="<"+a.value+">"}return i}(r.tree.children)+"\n\n";return a}};function o(e){e.WebVTTParser=t,e.WebVTTCueTimingsAndSettingsParser=i,e.WebVTTCueTextParser=r,e.WebVTTSerializer=a}"undefined"!=typeof window&&o(window),o(n)}()},{}],"9pCYc":[function(e,t,n,i){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["4Kbf6"],"4Kbf6","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-multiple-subtitles.legacy.js b/docs/compiled/artplayer-plugin-multiple-subtitles.legacy.js index 411573ad2..be55eca84 100644 --- a/docs/compiled/artplayer-plugin-multiple-subtitles.legacy.js +++ b/docs/compiled/artplayer-plugin-multiple-subtitles.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],s=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=s[t]=new u.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return s[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=a,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:[],n=function(e){for(var t=new u.WebVTTParser().parse("","metadata"),r=0;r').concat(l.value,"")}}(n=t.cues).push.apply(n,(0,s._)(o.cues))}return t}(t),o=h.serialize(n.cues);URL.revokeObjectURL(v);var c=URL.createObjectURL(new Blob([o],{type:"text/vtt"}));v=c,e.option.subtitle.escape=!1,e.subtitle.init((0,a._)((0,i._)({},e.option.subtitle),{url:c,type:"vtt",onVttLoad:r}))}return(0,c._)(this,function(i){switch(i.label){case 0:return r=(t=e.constructor.utils).unescape,o=t.getExt,f=t.srtToVtt,p=t.assToVtt,d=new u.WebVTTParser,h=new u.WebVTTSerializer,[4,Promise.all(n.map(function(e){return function(e,t){return l.apply(this,arguments)}(e,{getExt:o,srtToVtt:f,assToVtt:p})}))];case 1:return m=i.sent().map(function(e,t){var r=d.parse(e,"metadata");return r.url=n[t].url,r.name=n[t].name,r}),v="",_(m),[2,{name:"multipleSubtitles",tracks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return _(e.map(function(e){return m.find(function(t){return t.name===e})}))},reset:function(){return _(m)}}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=f)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","./parser":"8YYw5","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,c,"next",e)}function c(e){o(a,n,i,s,c,"throw",e)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9agdF":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return i});var o=e("./_define_property.js");function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,r[d])("accessor"===c?{get:f.get,set:f.set}:f[u],h);if("accessor"===c){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(s=a(v.get))&&(f.get=s),(s=a(v.set))&&(f.set=s),(s=a(v.init))&&o.unshift(s)}else(s=a(v))&&("field"===c?o.unshift(s):f[u]=s)}l&&Object.defineProperty(l,n.name,f),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function w(){for(var e=[],t=0;t1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=o[e](t)).value instanceof T?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:T(e[n](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var D=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&y(t,e,r);return D(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function W(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function L(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function z(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function R(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:a,__assign:s,__rest:c,__decorate:u,__param:l,__metadata:m,__awaiter:v,__generator:_,__createBinding:y,__exportStar:g,__values:b,__read:j,__spread:w,__spreadArrays:x,__spreadArray:O,__await:T,__asyncGenerator:P,__asyncDelegator:S,__asyncValues:I,__makeTemplateObject:E,__importStar:F,__importDefault:A,__classPrivateFieldGet:k,__classPrivateFieldSet:W,__classPrivateFieldIn:L,__addDisposableResource:z,__disposeResources:R}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"8YYw5":[function(e,t,r){var n=e("@swc/helpers/_/_object_spread");!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},t=function(t){t||(t={"&":"&","<":"<",">":">","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=t,this.parse=function(r,n){r=r.replace(/\0/g,"�");var a=Date.now(),s=0,c=r.split(/\r\n|\r|\n/),u=!1,l=[],f=[],p=[];function d(e,t){p.push({message:e,line:s+1,col:t})}var h=c[s],m=h.length,v="WEBVTT",_=0,y=v.length;for("\uFEFF"===h[0]&&(_=1,y+=1),(my&&" "!==h[y]&&" "!==h[y])&&d('No valid signature. (File needs to start with "WEBVTT".)'),s++;""!=c[s]&&void 0!=c[s];){if(d("No blank line after the signature."),-1!=c[s].indexOf("-->")){u=!0;break}s++}for(;void 0!=c[s];){for(;!u&&""==c[s];)s++;if(!u&&void 0==c[s])break;g=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null});var g,b=!0;if(-1==c[s].indexOf("-->")){if(g.id=c[s],/^NOTE($|[ \t])/.test(g.id)){for(s++;""!=c[s]&&void 0!=c[s];)-1!=c[s].indexOf("-->")&&d("Cannot have timestamp in a comment."),s++;continue}if(/^STYLE($|[ \t])/.test(g.id)){var j=[],w=!1;for(s++;""!=c[s]&&void 0!=c[s];)-1!=c[s].indexOf("-->")&&(d("Cannot have timestamp in a style block."),w=!0),j.push(c[s]),s++;if(f.length){d("Style blocks cannot appear after the first cue.");continue}w||l.push(j.join("\n"));continue}if(""==c[++s]||void 0==c[s]){d("Cue identifier cannot be standalone.");continue}if(-1==c[s].indexOf("-->")){b=!1,d("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var x=new o(c[s],d),O=0;if(f.length>0&&(O=f[f.length-1].startTime),b&&!x.parse(g,O)){for(g=null,s++;""!=c[s]&&void 0!=c[s];){if(-1!=c[s].indexOf("-->")){u=!0;break}s++}continue}for(s++;""!=c[s]&&void 0!=c[s];){if(-1!=c[s].indexOf("-->")){d("Blank line missing before cue."),u=!0;break}""!=g.text&&(g.text+="\n"),g.text+=c[s],s++}var T=new i(g.text,d,n,t);g.tree=T.parse(g.startTime,g.endTime),f.push(g)}return f.sort(function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:e.endTime2||parseInt(t,10)>59)&&(c="hours"),":"!=e[o]){i("No time unit separator found.");return}if(o++,2!=(r=s(/\d/)).length){i("Must be exactly two digits.");return}if("hours"==c||":"==e[o]){if(":"!=e[o]){i("No seconds found or minutes is greater than 59.");return}if(o++,2!=(n=s(/\d/)).length){i("Must be exactly two digits.");return}}else{if(2!=t.length){i("Must be exactly two digits.");return}n=r,r=t,t="0"}if("."!=e[o]){i('No decimal separator (".") found.');return}if(o++,3!=(a=s(/\d/)).length){i("Milliseconds must be given in three digits.");return}if(parseInt(r,10)>59){i("You cannot have more than 59 minutes.");return}if(parseInt(n,10)>59){i("You cannot have more than 59 seconds.");return}return 3600*parseInt(t,10)+60*parseInt(r,10)+parseInt(n,10)+parseInt(a,10)/1e3}this.parse=function(t,s){if(a(r),t.startTime=c(),void 0!=t.startTime){if(t.startTime' by whitespace."),a(r),"-"!=e[o]||"-"!=e[++o]||">"!=e[++o]){i("No valid timestamp separator found.");return}if(o++,n.test(e[o])&&i("'-->' not separated from timestamp by whitespace."),a(r),t.endTime=c(),void 0!=t.endTime)return t.endTime<=t.startTime&&i("End timestamp is not greater than start timestamp."),n.test(e[o]),a(r),function(e,t){for(var n=e.split(r),o=[],a=0;a100)){i("Line position cannot be >100%.");continue}if(""===p||isNaN(p)||!isFinite(p)){i("Line position needs to be a number");continue}if(void 0!==f){if(!["start","center","end"].includes(f)){i("Line alignment needs to be one of start, center or end");continue}t.lineAlign=f}t.snapToLines=!d,t.linePosition=parseFloat(p),parseFloat(p).toString()!==p&&(t.nonSerializable=!0)}else if("position"==c){if(/,/.test(u)){var l=u.split(",");u=l[0];var h=l[1]}if("%"!=u[u.length-1]){i("Text position must be a percentage.");continue}if(parseInt(u,10)>100||0>parseInt(u,10)){i("Text position needs to be between 0 and 100%.");continue}if(""===(p=u.slice(0,u.length-1))||isNaN(p)||!isFinite(p)){i("Line position needs to be a number");continue}if(void 0!==h){if(!["line-left","center","line-right"].includes(h)){i("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=h}t.textPosition=parseFloat(p)}else if("size"==c){if("%"!=u[u.length-1]){i("Size must be a percentage.");continue}if(parseInt(u,10)>100){i("Size cannot be >100%.");continue}var m=u.slice(0,u.length-1);if(void 0===m||""===m||isNaN(m)){i("Size needs to be a number"),m=100;continue}if((m=parseFloat(m))<0||m>100){i("Size needs to be between 0 and 100%.");continue}t.size=m}else if("align"==c){var v=["start","center","end","left","right"];if(-1==v.indexOf(u)){i("Alignment can only be set to one of "+v.join(", ")+".");continue}t.alignment=u}else i("Invalid setting.")}}(e.substring(o),t),!0}},this.parseTimestamp=function(){var t=c();if(void 0!=e[o]){i("Timestamp must not have trailing characters.");return}return t}},i=function(e,t,r,i){this.entities=i;var a=this,e=e,s=0,c=function(e){"metadata"!=r&&t(e,s+1)};this.parse=function(t,u){var l={children:[]},f=l,p=[];function d(e){f.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:f}),f=f.children[f.children.length-1]}for(;void 0!=e[s];){var h=function(){for(var t="data",r="",n="",o=[];void 0!=e[s-1]||0==s;){var u=e[s];if("data"==t){if("&"==u)n=u,t="escape";else if("<"==u&&""==r)t="tag";else{if("<"==u||void 0==u)return["text",r];r+=u}}else if("escape"==t){if("<"==u||void 0==u){c("Incorrect escape.");var l=void 0;return(l=n.match(/^&#([0-9]+)$/))?r+=String.fromCharCode(l[1]):a.entities[n]?r+=a.entities[n]:r+=n,["text",r]}if("&"==u)c("Incorrect escape."),r+=n,n=u;else if(/[a-z#0-9]/i.test(u))n+=u;else if(";"==u){var f=void 0;(f=n.match(/^&#(x?[0-9]+)$/))?r+=String.fromCharCode("0"+f[1]):a.entities[n+u]?r+=a.entities[n+u]:(f=Object.keys(i).find(function(e){return n.startsWith(e)}))?r+=a.entities[f]+n.slice(f.length)+u:(c("Incorrect escape."),r+=n+";"),t="data"}else c("Incorrect escape."),r+=n+u,t="data"}else if("tag"==t){if(" "==u||"\n"==u||"\f"==u||" "==u)t="start tag annotation";else if("."==u)t="start tag class";else if("/"==u)t="end tag";else if(/\d/.test(u))r=u,t="timestamp tag";else{if(">"==u||void 0==u)return">"==u&&s++,["start tag","",[],""];r=u,t="start tag"}}else if("start tag"==t){if(" "==u||"\f"==u||" "==u)t="start tag annotation";else if("\n"==u)n=u,t="start tag annotation";else if("."==u)t="start tag class";else{if(">"==u||void 0==u)return">"==u&&s++,["start tag",r,[],""];r+=u}}else if("start tag class"==t){if(" "==u||"\f"==u||" "==u)n&&o.push(n),n="",t="start tag annotation";else if("\n"==u)n&&o.push(n),n=u,t="start tag annotation";else if("."==u)n&&o.push(n),n="";else{if(">"==u||void 0==u)return">"==u&&s++,n&&o.push(n),["start tag",r,o,""];n+=u}}else if("start tag annotation"==t){if(">"==u||void 0==u)return">"==u&&s++,["start tag",r,o,n=n.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];n+=u}else if("end tag"==t){if(">"==u||void 0==u)return">"==u&&s++,["end tag",r];r+=u}else if("timestamp tag"==t){if(">"==u||void 0==u)return">"==u&&s++,["timestamp",r];r+=u}else c("Never happens.");s++}}();if("text"==h[0])f.children.push({type:"text",value:h[1],parent:f});else if("start tag"==h[0]){"chapters"==r&&c("Start tags not allowed in chapter title text.");var m=h[1];"v"!=m&&"lang"!=m&&""!=h[3]&&c("Onlyandcan have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m?d(h):"rt"==m&&"ruby"==f.name?d(h):"v"==m?(function(e){for(var t=f;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&c("cannot be nested inside itself."),d(h),f.value=h[3],h[3]||c("requires an annotation.")):"lang"==m?(d(h),f.value=h[3]):c("Incorrect start tag.")}else if("end tag"==h[0])"chapters"==r&&c("End tags not allowed in chapter title text."),h[1]==f.name?f=f.parent:"ruby"==h[1]&&"rt"==f.name?f=f.parent.parent:c("Incorrect end tag.");else if("timestamp"==h[0]){"chapters"==r&&c("Timestamp not allowed in chapter title text.");var v=new o(h[1],c).parseTimestamp();void 0!=v&&((v<=t||v>=u)&&c("Timestamp must be between start timestamp and end timestamp."),p.length>0&&p[p.length-1]>=v&&c("Timestamp must be greater than any previous timestamp."),f.children.push({type:"timestamp",value:v,parent:f}),p.push(v))}}for(;f.parent;)"v"!=f.name&&c("Required end tag missing."),f=f.parent;return function e(t){var r=(0,n._)({},t);return t.children&&(r.children=t.children.map(e)),r.parent&&delete r.parent,r}(l)}},a=function(){function t(e){var t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),r=0,n=0,o=0;return e>=3600&&(r=Math.floor(e/3600)),n=Math.floor((e-3600*r)/60),o=Math.floor(e-3600*r-60*n),(r?r+":":"")+(""+n).padStart(2,"0")+":"+(""+o).padStart(2,"0")+"."+t}this.serialize=function(r,n){var o="WEBVTT\n\n";if(n)for(var i=0;i"+t(r.endTime)+(n="",(o=Object.keys(e).filter(function(t){return r[t]!==e[t]})).includes("direction")&&(n+=" vertical:"+r.direction),o.includes("alignment")&&(n+=" align:"+r.alignment),o.includes("size")&&(n+=" size:"+r.size+"%"),(o.includes("lineAlign")||o.includes("linePosition"))&&(n+=" line:"+r.linePosition+(r.snapToLines?"":"%")+(r.lineAlign&&r.lineAlign!=e.lineAlign?","+r.lineAlign:"")),(o.includes("textPosition")||o.includes("positionAlign"))&&(n+=" position:"+r.textPosition+"%"+(r.positionAlign&&r.positionAlign!==e.positionAlign?","+r.positionAlign:"")),n)+"\n"+function e(r){for(var n="",o=0;o/g,">");else if("object"==i.type){if(n+="<"+i.name,i.classes)for(var a=0;a"}else"timestamp"==i.type?n+="<"+t(i.value)+">":n+="<"+i.value+">"}return n}(r.tree.children)+"\n\n"}(r[i]);return o}};function s(e){e.WebVTTParser=t,e.WebVTTCueTimingsAndSettingsParser=o,e.WebVTTCueTextParser=i,e.WebVTTSerializer=a}"undefined"!=typeof window&&s(window),s(r)}()},{"@swc/helpers/_/_object_spread":"9agdF"}]},["2hz0c"],"2hz0c","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,i,a,s){var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof c[n]&&c[n],l=u.i||{},f=u.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!f[t]){if(!e[t]){if(o[t])return o[t];var i="function"==typeof c[n]&&c[n];if(!r&&i)return i(t,!0);if(u)return u(t,!0);if(p&&"string"==typeof t)return p(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var s=f[t]=new d.Module(t);e[t][0].call(s.exports,l,s,s.exports,c)}return f[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=f,d.parent=u,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=l,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return c[n]}}),c[n]=d;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:[],n=function(e){for(var t=new(0,l.WebVTTParser)().parse("","metadata"),r=0;r').concat(u.value,"")}}(n=t.cues).push.apply(n,(0,c._)(o.cues))}return t}(t),o=h.serialize(n.cues);URL.revokeObjectURL(v);var i=URL.createObjectURL(new Blob([o],{type:"text/vtt"}));v=i,e.option.subtitle.escape=!1,e.subtitle.init((0,s._)((0,a._)({},e.option.subtitle),{url:i,type:"vtt",onVttLoad:r}))}return(0,u._)(this,function(a){switch(a.label){case 0:return r=(t=e.constructor.utils).unescape,o=t.getExt,i=t.srtToVtt,p=t.assToVtt,d=new(0,l.WebVTTParser),h=new(0,l.WebVTTSerializer),[4,Promise.all(n.map(function(e){return function(e,t){return f.apply(this,arguments)}(e,{getExt:o,srtToVtt:i,assToVtt:p})}))];case 1:return m=a.sent().map(function(e,t){var r=d.parse(e,"metadata");return r.url=n[t].url,r.name=n[t].name,r}),v="",_(m),[2,{name:"multipleSubtitles",tracks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return _(e.map(function(e){return m.find(function(t){return t.name===e})}))},reset:function(){return _(m)}}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=p)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","./parser":"8YYw5","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(e){i(a,n,o,s,c,"next",e)}function c(e){i(a,n,o,s,c,"throw",e)}s(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9agdF":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return a});var i=e("./_define_property.js");function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function l(e,t,r,n){var o,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(t,r,s):o(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}function f(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?n.static?e:e.prototype:null,p=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var m={};for(var v in n)m[v]="access"===v?{}:n[v];for(var v in n.access)m.access[v]=n.access[v];m.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var _=(0,r[h])("accessor"===u?{get:p.get,set:p.set}:p[l],m);if("accessor"===u){if(void 0===_)continue;if(null===_||(void 0===_?"undefined":(0,i._)(_))!=="object")throw TypeError("Object expected");(c=s(_.get))&&(p.get=c),(c=s(_.set))&&(p.set=c),(c=s(_.init))&&o.unshift(c)}else(c=s(_))&&("field"===u?o.unshift(c):p[l]=c)}f&&Object.defineProperty(f,n.name,p),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],t=0;t1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function E(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=j(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var i,a,s;i=n,a=o,s=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){i({value:e,done:s})},a)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},A=function(e){return(A=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=A(e),n=0;n","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=t,this.parse=function(r,o){r=r.replace(/\0/g,"�");var a=Date.now(),s=0,c=r.split(/\r\n|\r|\n/),u=!1,l=[],f=[],p=[];function d(e,t){p.push({message:e,line:s+1,col:t})}var h=c[s],m=h.length,v="WEBVTT",_=0,y=v.length;for("\uFEFF"===h[0]&&(_=1,y+=1),(my&&" "!==h[y]&&" "!==h[y])&&d('No valid signature. (File needs to start with "WEBVTT".)'),s++;""!=c[s]&&void 0!=c[s];){if(d("No blank line after the signature."),-1!=c[s].indexOf("--\x3e")){u=!0;break}s++}for(;void 0!=c[s];){for(;!u&&""==c[s];)s++;if(!u&&void 0==c[s])break;var g=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null}),b=!0;if(-1==c[s].indexOf("--\x3e")){if(g.id=c[s],/^NOTE($|[ \t])/.test(g.id)){for(s++;""!=c[s]&&void 0!=c[s];)-1!=c[s].indexOf("--\x3e")&&d("Cannot have timestamp in a comment."),s++;continue}if(/^STYLE($|[ \t])/.test(g.id)){var j=[],w=!1;for(s++;""!=c[s]&&void 0!=c[s];)-1!=c[s].indexOf("--\x3e")&&(d("Cannot have timestamp in a style block."),w=!0),j.push(c[s]),s++;if(f.length){d("Style blocks cannot appear after the first cue.");continue}w||l.push(j.join("\n"));continue}if(""==c[++s]||void 0==c[s]){d("Cue identifier cannot be standalone.");continue}if(-1==c[s].indexOf("--\x3e")){b=!1,d("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var x=new n(c[s],d),O=0;if(f.length>0&&(O=f[f.length-1].startTime),b&&!x.parse(g,O)){for(g=null,s++;""!=c[s]&&void 0!=c[s];){if(-1!=c[s].indexOf("--\x3e")){u=!0;break}s++}continue}for(s++;""!=c[s]&&void 0!=c[s];){if(-1!=c[s].indexOf("--\x3e")){d("Blank line missing before cue."),u=!0;break}""!=g.text&&(g.text+="\n"),g.text+=c[s],s++}var T=new i(g.text,d,o,t);g.tree=T.parse(g.startTime,g.endTime),f.push(g)}return f.sort(function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:+(e.endTime2||parseInt(t,10)>59)&&(c="hours"),":"!=e[o])return void i("No time unit separator found.");if(o++,2!=(r=s(/\d/)).length)return void i("Must be exactly two digits.");if("hours"==c||":"==e[o]){if(":"!=e[o])return void i("No seconds found or minutes is greater than 59.");if(o++,2!=(n=s(/\d/)).length)return void i("Must be exactly two digits.")}else{if(2!=t.length)return void i("Must be exactly two digits.");n=r,r=t,t="0"}return"."!=e[o]?void i('No decimal separator (".") found.'):(o++,3!=(a=s(/\d/)).length)?void i("Milliseconds must be given in three digits."):parseInt(r,10)>59?void i("You cannot have more than 59 minutes."):parseInt(n,10)>59?void i("You cannot have more than 59 seconds."):3600*parseInt(t,10)+60*parseInt(r,10)+parseInt(n,10)+parseInt(a,10)/1e3}this.parse=function(t,s){return(a(r),t.startTime=c(),void 0==t.startTime)?void 0:(t.startTime"!=e[++o])?void i("No valid timestamp separator found."):(o++,n.test(e[o])&&i("'--\x3e' not separated from timestamp by whitespace."),a(r),t.endTime=c(),void 0!=t.endTime)?(t.endTime<=t.startTime&&i("End timestamp is not greater than start timestamp."),n.test(e[o]),a(r),!function(e,t){for(var n=e.split(r),o=[],a=0;a100)){i("Line position cannot be >100%.");continue}if(""===p||isNaN(p)||!isFinite(p)){i("Line position needs to be a number");continue}if(void 0!==f){if(!["start","center","end"].includes(f)){i("Line alignment needs to be one of start, center or end");continue}t.lineAlign=f}t.snapToLines=!d,t.linePosition=parseFloat(p),parseFloat(p).toString()!==p&&(t.nonSerializable=!0)}else if("position"==c){if(/,/.test(u)){var l=u.split(",");u=l[0];var h=l[1]}if("%"!=u[u.length-1]){i("Text position must be a percentage.");continue}if(parseInt(u,10)>100||0>parseInt(u,10)){i("Text position needs to be between 0 and 100%.");continue}if(""===(p=u.slice(0,u.length-1))||isNaN(p)||!isFinite(p)){i("Line position needs to be a number");continue}if(void 0!==h){if(!["line-left","center","line-right"].includes(h)){i("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=h}t.textPosition=parseFloat(p)}else if("size"==c){if("%"!=u[u.length-1]){i("Size must be a percentage.");continue}if(parseInt(u,10)>100){i("Size cannot be >100%.");continue}var m=u.slice(0,u.length-1);if(void 0===m||""===m||isNaN(m)){i("Size needs to be a number"),m=100;continue}if((m=parseFloat(m))<0||m>100){i("Size needs to be between 0 and 100%.");continue}t.size=m}else if("align"==c){var v=["start","center","end","left","right"];if(-1==v.indexOf(u)){i("Alignment can only be set to one of "+v.join(", ")+".");continue}t.alignment=u}else i("Invalid setting.")}}(e.substring(o),t),!0):void 0},this.parseTimestamp=function(){var t=c();return void 0!=e[o]?void i("Timestamp must not have trailing characters."):t}},i=function(e,t,r,i){this.entities=i;var a=this,e=e,s=0,c=function(e){"metadata"!=r&&t(e,s+1)};this.parse=function(t,u){var l={children:[]},f=l,p=[];function d(e){f.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:f}),f=f.children[f.children.length-1]}for(;void 0!=e[s];){var h=function(){for(var t="data",r="",n="",o=[];void 0!=e[s-1]||0==s;){var u=e[s];if("data"==t)if("&"==u)n=u,t="escape";else if("<"==u&&""==r)t="tag";else{if("<"==u||void 0==u)return["text",r];r+=u}else if("escape"==t)if("<"==u||void 0==u){c("Incorrect escape.");var l=void 0;return(l=n.match(/^&#([0-9]+)$/))?r+=String.fromCharCode(l[1]):a.entities[n]?r+=a.entities[n]:r+=n,["text",r]}else if("&"==u)c("Incorrect escape."),r+=n,n=u;else if(/[a-z#0-9]/i.test(u))n+=u;else if(";"==u){var f=void 0;(f=n.match(/^&#(x?[0-9]+)$/))?r+=String.fromCharCode("0"+f[1]):a.entities[n+u]?r+=a.entities[n+u]:(f=Object.keys(i).find(function(e){return n.startsWith(e)}))?r+=a.entities[f]+n.slice(f.length)+u:(c("Incorrect escape."),r+=n+";"),t="data"}else c("Incorrect escape."),r+=n+u,t="data";else if("tag"==t)if(" "==u||"\n"==u||"\f"==u||" "==u)t="start tag annotation";else if("."==u)t="start tag class";else if("/"==u)t="end tag";else if(/\d/.test(u))r=u,t="timestamp tag";else{if(">"==u||void 0==u)return">"==u&&s++,["start tag","",[],""];r=u,t="start tag"}else if("start tag"==t)if(" "==u||"\f"==u||" "==u)t="start tag annotation";else if("\n"==u)n=u,t="start tag annotation";else if("."==u)t="start tag class";else{if(">"==u||void 0==u)return">"==u&&s++,["start tag",r,[],""];r+=u}else if("start tag class"==t)if(" "==u||"\f"==u||" "==u)n&&o.push(n),n="",t="start tag annotation";else if("\n"==u)n&&o.push(n),n=u,t="start tag annotation";else if("."==u)n&&o.push(n),n="";else{if(">"==u||void 0==u)return">"==u&&s++,n&&o.push(n),["start tag",r,o,""];n+=u}else if("start tag annotation"==t)if(">"==u||void 0==u)return">"==u&&s++,["start tag",r,o,n=n.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];else n+=u;else if("end tag"==t)if(">"==u||void 0==u)return">"==u&&s++,["end tag",r];else r+=u;else if("timestamp tag"==t)if(">"==u||void 0==u)return">"==u&&s++,["timestamp",r];else r+=u;else c("Never happens.");s++}}();if("text"==h[0])f.children.push({type:"text",value:h[1],parent:f});else if("start tag"==h[0]){"chapters"==r&&c("Start tags not allowed in chapter title text.");var m=h[1];"v"!=m&&"lang"!=m&&""!=h[3]&&c("Onlyandcan have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m||"rt"==m&&"ruby"==f.name?d(h):"v"==m?(function(e){for(var t=f;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&c("cannot be nested inside itself."),d(h),f.value=h[3],h[3]||c("requires an annotation.")):"lang"==m?(d(h),f.value=h[3]):c("Incorrect start tag.")}else if("end tag"==h[0])"chapters"==r&&c("End tags not allowed in chapter title text."),h[1]==f.name?f=f.parent:"ruby"==h[1]&&"rt"==f.name?f=f.parent.parent:c("Incorrect end tag.");else if("timestamp"==h[0]){"chapters"==r&&c("Timestamp not allowed in chapter title text.");var v=new n(h[1],c).parseTimestamp();void 0!=v&&((v<=t||v>=u)&&c("Timestamp must be between start timestamp and end timestamp."),p.length>0&&p[p.length-1]>=v&&c("Timestamp must be greater than any previous timestamp."),f.children.push({type:"timestamp",value:v,parent:f}),p.push(v))}}for(;f.parent;)"v"!=f.name&&c("Required end tag missing."),f=f.parent;return function e(t){var r=(0,o._)({},t);return t.children&&(r.children=t.children.map(e)),r.parent&&delete r.parent,r}(l)}},a=function(){function t(e){var t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),r=0,n=0,o=0;return e>=3600&&(r=Math.floor(e/3600)),n=Math.floor((e-3600*r)/60),o=Math.floor(e-3600*r-60*n),(r?r+":":"")+(""+n).padStart(2,"0")+":"+(""+o).padStart(2,"0")+"."+t}this.serialize=function(r,n){var o="WEBVTT\n\n";if(n)for(var i=0;i/g,">");else if("object"==i.type){if(n+="<"+i.name,i.classes)for(var a=0;a"}else"timestamp"==i.type?n+="<"+t(i.value)+">":n+="<"+i.value+">"}return n}(r.tree.children)+"\n\n"}(r[i]);return o}};function s(e){e.WebVTTParser=t,e.WebVTTCueTimingsAndSettingsParser=n,e.WebVTTCueTextParser=i,e.WebVTTSerializer=a}"undefined"!=typeof window&&s(window),s(r)}()},{"@swc/helpers/_/_object_spread":"9agdF"}]},["2hz0c"],"2hz0c","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-vast.js b/docs/compiled/artplayer-plugin-vast.js index 58db817af..2f2bfae52 100644 --- a/docs/compiled/artplayer-plugin-vast.js +++ b/docs/compiled/artplayer-plugin-vast.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,i,n,s){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof r[n]&&r[n],a=o.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,i){if(!a[t]){if(!e[t]){var s="function"==typeof r[n]&&r[n];if(!i&&s)return s(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var h=Error("Cannot find module '"+t+"'");throw h.code="MODULE_NOT_FOUND",h}c.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},c.cache={};var l=a[t]=new d.Module(t);e[t][0].call(l.exports,c,l,l.exports,this)}return a[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=o,d.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(d,"root",{get:function(){return r[n]}}),r[n]=d;for(var h=0;hr);var s=e("@glomex/vast-ima-player");function r(e){return async t=>{let{template:i,constructor:n}=t,{createElement:r,setStyles:o,append:a}=n.utils,{$video:u,$player:d}=i;await (0,s.loadImaSdk)();let h=window.google.ima,l=new h.AdsRenderingSettings,c=new s.PlayerOptions,f=`art-${Date.now()}`,p=r("div");a(d,p),p.id=f,o(p,{position:"absolute",inset:"0",width:"100%",height:"100%",zIndex:"150",display:"none"});let v=new s.Player(h,u,p,l,c);return"function"==typeof e&&await e({art:t,id:f,ima:h,imaPlayer:v,$container:p,playUrl:function(e){let t=new h.AdsRequest;t.adTagUrl=e,v.playAds(t)},playRes:function(e){let t=new h.AdsRequest;t.adsResponse=e,v.playAds(t)}}),{name:"artplayerPluginVast"}}}"undefined"!=typeof window&&(window.artplayerPluginVast=r)},{"@glomex/vast-ima-player":"bQPGX","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bQPGX:[function(e,t,i){var n,s,r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"Player",()=>eu),r.export(i,"PlayerError",()=>j),r.export(i,"PlayerEvent",()=>k),r.export(i,"PlayerOptions",()=>M),r.export(i,"loadImaSdk",()=>u);var o=null,a=function(){o=null},u=function(){var e=window;return e.google&&e.google.ima?Promise.resolve(e.google.ima):o||((o=new Promise(function(e,t){var i=document.createElement("script");i.async=!0,i.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",i.onload=e,i.onerror=t,document.body.appendChild(i)}).then(function(){return e.google.ima})).then(a).catch(a),o)};function d(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=Array(t);i-1&&(g(this,J)[J].splice(t,1),this.g(g(this,J)[J]))},i.resizeAd=function(e,t){g(this,F)[F]=e,g(this,G)[G]=t,g(this,V)[V]&&g(this,V)[V].resize(e,t,this.k()),g(this,N)[N].style.width=e+"px",g(this,N)[N].style.height=t+"px"},i.reset=function(e){void 0===e&&(e=!1),e&&(g(this,X)[X]=!1,g(this,K)[K]=!1,g(this,Z)[Z]=!1),this.C(),g(this,J)[J]=[],g(this,er)[er]=!1,g(this,ei)[ei]=void 0,g(this,V)[V]&&g(this,V)[V].destroy(),g(this,V)[V]=void 0,g(this,z)[z].settings.setAutoPlayAdBreaks(!0),e&&this.P(),g(this,N)[N].style.display="none"},i.P=function(){g(this,H)[H]&&(g(this,H)[H].removeEventListener(g(this,z)[z].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),g(this,H)[H].removeEventListener(g(this,z)[z].AdErrorEvent.Type.AD_ERROR,this.l,!1),g(this,H)[H].destroy()),g(this,B)[B]&&g(this,B)[B].destroy()},i.destroy=function(){var e,t,i,n,s=this;this.reset(!0),g(this,x)[x].destroy(),I.forEach(function(e){g(s,L)[L].removeEventListener(e,s.o)}),null==(e=g(this,H)[H])||e.removeEventListener(g(this,z)[z].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),null==(t=g(this,B)[B])||t.destroy(),null==(i=g(this,H)[H])||i.destroy(),g(this,X)[X]=!1,g(this,Z)[Z]=!1,g(this,K)[K]=!1,null==(n=g(this,q)[q])||n.disconnect()},i.isCustomPlaybackUsed=function(){return!1===g(this,z)[z].settings.getDisableCustomPlaybackForIOS10Plus()&&!g(this,N)[N].querySelector("video")},i.C=function(){window.clearTimeout(g(this,en)[en]),window.clearTimeout(g(this,es)[es]),g(this,en)[en]=void 0,g(this,es)[es]=void 0,g(this,Q)[Q]=void 0,g(this,ee)[ee]=void 0,g(this,et)[et]=void 0,g(this,N)[N].style.display="none",g(this,N)[N].classList.remove("nonlinear"),g(this,V)[V]&&this.R()},i.o=function(e){var t=this;if(g(this,x)[x].enabled||"volumechange"===e.type){if("timeupdate"===e.type){if(g(this,L)[L].currentTime<.5)return;if(g(this,V)[V]){var i=g(this,V)[V].getCuePoints().filter(function(e){return e>=0&&e-1&&(g(this,L)[L].currentTime=g(this,L)[L].duration-1e-5,g(this,Z)[Z]=!0),g(this,H)[H].contentComplete(),g(this,V)[V]||this.T()),!window.ResizeObserver&&g(this,W)[W].autoResize&&"loadedmetadata"===e.type){var n=g(this,L)[L],s=n.offsetHeight,r=n.offsetWidth;g(this,F)[F]=r,g(this,G)[G]=s,this.R()}g(this,$)[$]&&"volumechange"!==e.type||this.dispatchEvent(new T(e.type))}},i.S=function(e){var t=this,i=g(this,z)[z].AdEvent;switch(e.type){case i.Type.LOADED:var n=e.getAd();g(this,ei)[ei]&&0===g(this,J)[J].length?g(this,ei)[ei]({ad:n,start:function(){t.M(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.M()}}):g(this,Y)[Y]=n;break;case i.Type.AD_BREAK_READY:this.C(),g(this,ei)[ei]?(g(this,ei)[ei]({ad:g(this,Y)[Y],adBreakTime:e.getAdData().adBreakTime,start:function(){t.M(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.M()}}),g(this,Y)[Y]=void 0):this.M();break;case i.Type.STARTED:var s=g(this,Q)[Q]=e.getAd();s.getAdPodInfo().getAdPosition()>1&&g(this,V)[V].setVolume(g(this,V)[V].getVolume()),g(this,N)[N].classList.remove("nonlinear"),this.R(),s.isLinear()?(g(this,x)[x].disable(),g(this,et)[et]=s.getDuration(),g(this,ee)[ee]=0):(g(this,N)[N].classList.add("nonlinear"),this.I()),g(this,N)[N].style.display="",g(this,er)[er]&&(g(this,er)[er]=!1,g(this,V)[V].pause());break;case i.Type.ALL_ADS_COMPLETED:if(g(this,Z)[Z])return;this.isCustomPlaybackUsed()&&g(this,Q)[Q]&&-1!==g(this,Q)[Q].getAdPodInfo().getTimeOffset()&&this.I(),this.reset();break;case i.Type.CONTENT_PAUSE_REQUESTED:this.C(),g(this,Q)[Q]=e.getAd(),g(this,N)[N].style.display="",g(this,L)[L].pause(),this.R(),g(this,Q)[Q]&&this.A(g(this,Q)[Q].getAdPodInfo().getTimeOffset()),g(this,V)[V].setVolume(g(this,L)[L].muted?0:g(this,L)[L].volume),g(this,x)[x].disable(),g(this,et)[et]=g(this,Q)[Q].getDuration(),g(this,ee)[ee]=0;break;case i.Type.CONTENT_RESUME_REQUESTED:var r=!!g(this,Q)[Q];if(r){var o=g(this,V)[V].getVolume();g(this,L)[L].muted=0===o,g(this,L)[L].volume=g(this,eo)[eo]}g(this,Z)[Z]&&(g(this,L)[L].currentTime=g(this,L)[L].duration+1,g(this,Z)[Z]=!1),g(this,L)[L].ended?(this.reset(),this.T()):this.C(),r&&(g(this,er)[er]=!1,this.I());break;case i.Type.AD_METADATA:this.g(g(this,V)[V].getCuePoints()),-1===g(this,J)[J].indexOf(0)&&(g(this,ei)[ei]?g(this,ei)[ei]({start:function(){t.I(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.I()}}):this.I());break;case i.Type.AD_PROGRESS:var a=e.getAdData();g(this,ee)[ee]=a.currentTime,g(this,et)[et]=a.duration;break;case i.Type.LOG:var u=e.getAdData();g(this,ei)[ei]?g(this,ei)[ei]({start:function(){t.I(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.I()}}):u.adError&&!g(this,Q)[Q]&&this.I();break;case i.Type.VOLUME_CHANGED:var d=g(this,V)[V].getVolume();d>0&&(g(this,eo)[eo]=d)}},i.l=function(e){this.j(this.B(e))},i.u=function(e){var t,i=this,n=g(this,z)[z],s=n.AdEvent,r=n.AdErrorEvent.Type.AD_ERROR;window.clearTimeout(g(this,en)[en]);var o=g(this,V)[V]=e.getAdsManager(g(this,x)[x],g(this,U)[U]);Object.keys(s.Type).forEach(function(e){o.addEventListener(s.Type[e],function(t){if(i.S(t),k[e]){var n=["LOG","AD_PROGRESS"].indexOf(e)>-1;i.dispatchEvent(new T(k[e],{detail:{ad:t.getAd()||g(i,Q)[Q],adData:n?t.getAdData():{}}}))}})}),o.addEventListener(r,function(e){return i.j(i.B(e))});try{o.init(g(this,F)[F],g(this,G)[G],this.k()),o.setVolume(g(this,L)[L].muted?0:g(this,L)[L].volume),null==(t=g(this,B)[B])||t.initialize(),g(this,ei)[ei]||this.M()}catch(e){this.j(new j(e.message))}},i.M=function(){if(g(this,K)[K]||(this.dispatchEvent(new T(k.MEDIA_START)),g(this,K)[K]=!0),g(this,V)[V])try{g(this,V)[V].start()}catch(e){this.j(new j(e.message))}else this.I()},i.T=function(){var e=this;setTimeout(function(){g(e,X)[X]=!1,g(e,K)[K]=!1,g(e,Z)[Z]=!1,e.dispatchEvent(new T(k.MEDIA_STOP))},1)},i.v=function(e){for(var t,i=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return m(e,void 0);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?m(e,void 0):void 0}}(e))){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=i()).done;){var n=t.value;n.contentBoxSize&&1===n.contentBoxSize.length?(g(this,F)[F]=n.contentBoxSize[0].inlineSize,g(this,G)[G]=n.contentBoxSize[0].blockSize):n.contentBoxSize&&n.contentBoxSize.inlineSize?(g(this,F)[F]=n.contentBoxSize.inlineSize,g(this,G)[G]=n.contentBoxSize.blockSize):(g(this,F)[F]=n.contentRect.width,g(this,G)[G]=n.contentRect.height)}this.R()},i.R=function(){if(g(this,W)[W].autoResize&&g(this,V)[V]){var e=g(this,Q)[Q],t=this.k();e&&!e.isLinear()?e&&(e.getWidth()>g(this,F)[F]||e.getHeight()>g(this,G)[G]?this.resizeAd(g(this,F)[F],g(this,G)[G]):(g(this,V)[V].resize(e.getWidth(),e.getHeight()+20,t),g(this,N)[N].style.width=e.getWidth()+"px",g(this,N)[N].style.height=e.getHeight()+20+"px")):this.resizeAd(g(this,F)[F],g(this,G)[G])}},i.k=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||g(this,L)[L].webkitDisplayingFullscreen?g(this,z)[z].ViewMode.FULLSCREEN:g(this,z)[z].ViewMode.NORMAL},i.I=function(){var e=this;g(this,N)[N].style.display="none",g(this,L)[L].ended||(g(this,x)[x].enable(),g(this,er)[er]?(g(this,L)[L].pause(),this.dispatchEvent(new T("pause"))):(this.p().then(function(){}).catch(function(){e.dispatchEvent(new T("pause"))}),this.dispatchEvent(new T("play")),this.dispatchEvent(new T(k.MEDIA_RESUMED))),g(this,er)[er]=!1)},i.B=function(e){var t=e.getError(),i=new j(t.getMessage());return i.type=t.getType(),i.errorCode=t.getErrorCode(),i.vastErrorCode=t.getVastErrorCode&&t.getVastErrorCode(),i.innerError=t.getInnerError(),i},i.j=function(e){var t=this;this.dispatchEvent(new T(k.AD_ERROR,{detail:{error:e}})),this.C(),g(this,ei)[ei]?g(this,ei)[ei]({start:function(){t.I(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.I()}}):this.I()},h(t,[{key:"volume",get:function(){return!g(this,x)[x].enabled&&g(this,V)[V]?g(this,V)[V].getVolume():g(this,L)[L].volume},set:function(e){!g(this,x)[x].enabled&&g(this,V)[V]&&g(this,V)[V].setVolume(e),g(this,L)[L].volume=e}},{key:"muted",get:function(){return!g(this,x)[x].enabled&&g(this,V)[V]?0===g(this,V)[V].getVolume():g(this,L)[L].muted},set:function(e){!g(this,x)[x].enabled&&g(this,V)[V]&&g(this,V)[V].setVolume(e?0:g(this,eo)[eo]),g(this,L)[L].muted=e}},{key:"currentTime",get:function(){return void 0!==g(this,ee)[ee]?g(this,ee)[ee]:g(this,L)[L].currentTime},set:function(e){g(this,x)[x].enabled&&(g(this,L)[L].currentTime=e)}},{key:"duration",get:function(){return void 0!==g(this,et)[et]?g(this,et)[et]:g(this,L)[L].duration}},{key:"cuePoints",get:function(){return[].concat(g(this,J)[J])}}]),t}(C)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,i){i.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},i.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.exportAll=function(e,t){return Object.keys(e).forEach(function(i){"default"===i||"__esModule"===i||Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[i]}})}),t},i.export=function(e,t,i){Object.defineProperty(e,t,{enumerable:!0,get:i})}},{}]},["iW4Tm"],"iW4Tm","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,i,n,s,r,o,a){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof u[n]&&u[n],h=d.i||{},l=d.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,i){if(!l[t]){if(!e[t]){if(s[t])return s[t];var r="function"==typeof u[n]&&u[n];if(!i&&r)return r(t,!0);if(d)return d(t,!0);if(c&&"string"==typeof t)return c(t);var o=Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}h.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},h.cache={};var a=l[t]=new f.Module(t);e[t][0].call(a.exports,h,a,a.exports,u)}return l[t].exports;function h(e){var t=h.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=l,f.parent=d,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=h,f.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(f,"root",{get:function(){return u[n]}}),u[n]=f;for(var p=0;po);var r=e("@glomex/vast-ima-player");function o(e){return async t=>{let{template:i,constructor:n}=t,{createElement:s,setStyles:o,append:a}=n.utils,{$video:u,$player:d}=i;await (0,r.loadImaSdk)();let h=window.google.ima,l=new h.AdsRenderingSettings,c=new(0,r.PlayerOptions),f=`art-${Date.now()}`,p=s("div");a(d,p),p.id=f,o(p,{position:"absolute",inset:"0",width:"100%",height:"100%",zIndex:"150",display:"none"});let v=new(0,r.Player)(h,u,p,l,c);return"function"==typeof e&&await e({art:t,id:f,ima:h,imaPlayer:v,$container:p,playUrl:function(e){let t=new h.AdsRequest;t.adTagUrl=e,v.playAds(t)},playRes:function(e){let t=new h.AdsRequest;t.adsResponse=e,v.playAds(t)}}),{name:"artplayerPluginVast"}}}"undefined"!=typeof window&&(window.artplayerPluginVast=o)},{"@glomex/vast-ima-player":"bnIjt","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bnIjt:[function(e,t,i,n){var s,r,o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(i),o.export(i,"Player",()=>ed),o.export(i,"PlayerError",()=>L),o.export(i,"PlayerEvent",()=>M),o.export(i,"PlayerOptions",()=>j),o.export(i,"loadImaSdk",()=>d);var a=null,u=function(){a=null},d=function(){var e=window;return e.google&&e.google.ima?Promise.resolve(e.google.ima):a||((a=new Promise(function(e,t){var i=document.createElement("script");i.async=!0,i.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",i.onload=e,i.onerror=t,document.body.appendChild(i)}).then(function(){return e.google.ima})).then(u).catch(u),a)};function h(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=Array(t);i-1&&(O(this,ee)[ee].splice(t,1),this.g(O(this,ee)[ee]))},i.resizeAd=function(e,t){O(this,G)[G]=e,O(this,H)[H]=t,O(this,F)[F]&&O(this,F)[F].resize(e,t,this.k()),O(this,x)[x].style.width=e+"px",O(this,x)[x].style.height=t+"px"},i.reset=function(e){void 0===e&&(e=!1),e&&(O(this,X)[X]=!1,O(this,$)[$]=!1,O(this,J)[J]=!1),this.C(),O(this,ee)[ee]=[],O(this,eo)[eo]=!1,O(this,en)[en]=void 0,O(this,F)[F]&&O(this,F)[F].destroy(),O(this,F)[F]=void 0,O(this,B)[B].settings.setAutoPlayAdBreaks(!0),e&&this.P(),O(this,x)[x].style.display="none"},i.P=function(){O(this,W)[W]&&(O(this,W)[W].removeEventListener(O(this,B)[B].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),O(this,W)[W].removeEventListener(O(this,B)[B].AdErrorEvent.Type.AD_ERROR,this.l,!1),O(this,W)[W].destroy()),O(this,V)[V]&&O(this,V)[V].destroy()},i.destroy=function(){var e,t,i,n,s=this;this.reset(!0),O(this,U)[U].destroy(),k.forEach(function(e){O(s,N)[N].removeEventListener(e,s.o)}),null==(e=O(this,W)[W])||e.removeEventListener(O(this,B)[B].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),null==(t=O(this,V)[V])||t.destroy(),null==(i=O(this,W)[W])||i.destroy(),O(this,X)[X]=!1,O(this,J)[J]=!1,O(this,$)[$]=!1,null==(n=O(this,Q)[Q])||n.disconnect()},i.isCustomPlaybackUsed=function(){return!1===O(this,B)[B].settings.getDisableCustomPlaybackForIOS10Plus()&&!O(this,x)[x].querySelector("video")},i.C=function(){window.clearTimeout(O(this,es)[es]),window.clearTimeout(O(this,er)[er]),O(this,es)[es]=void 0,O(this,er)[er]=void 0,O(this,Y)[Y]=void 0,O(this,et)[et]=void 0,O(this,ei)[ei]=void 0,O(this,x)[x].style.display="none",O(this,x)[x].classList.remove("nonlinear"),O(this,F)[F]&&this.R()},i.o=function(e){var t=this;if(O(this,U)[U].enabled||"volumechange"===e.type){if("timeupdate"===e.type){if(O(this,F)[F]){var i=O(this,F)[F].getCuePoints().filter(function(e){return e>=0&&e=.5&&(this.dispatchEvent(new R(M.MEDIA_IMPRESSION)),O(this,X)[X]=!0)}if("play"!==e.type||O(this,$)[$]||O(this,Z)[Z]||(this.dispatchEvent(new R(M.MEDIA_START)),O(this,$)[$]=!0),"ended"===e.type&&(this.isCustomPlaybackUsed()&&O(this,N)[N].currentTime===O(this,N)[N].duration&&O(this,ee)[ee].indexOf(-1)>-1&&(O(this,N)[N].currentTime=O(this,N)[N].duration-1e-5,O(this,J)[J]=!0),O(this,W)[W].contentComplete(),O(this,F)[F]||this.T()),!window.ResizeObserver&&O(this,q)[q].autoResize&&"loadedmetadata"===e.type){var n=O(this,N)[N],s=n.offsetHeight,r=n.offsetWidth;O(this,G)[G]=r,O(this,H)[H]=s,this.R()}O(this,Z)[Z]&&"volumechange"!==e.type||this.dispatchEvent(new R(e.type))}},i.S=function(e){var t=this,i=O(this,B)[B].AdEvent;switch(e.type){case i.Type.LOADED:var n=e.getAd();O(this,en)[en]&&0===O(this,ee)[ee].length?O(this,en)[en]({ad:n,start:function(){t.M(),O(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}):O(this,K)[K]=n;break;case i.Type.AD_BREAK_READY:this.C(),O(this,en)[en]?(O(this,en)[en]({ad:O(this,K)[K],adBreakTime:e.getAdData().adBreakTime,start:function(){t.M(),O(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}),O(this,K)[K]=void 0):this.M();break;case i.Type.STARTED:var s=O(this,Y)[Y]=e.getAd();s.getAdPodInfo().getAdPosition()>1&&O(this,F)[F].setVolume(O(this,F)[F].getVolume()),O(this,x)[x].classList.remove("nonlinear"),this.R(),s.isLinear()?(O(this,U)[U].disable(),O(this,ei)[ei]=s.getDuration(),O(this,et)[et]=0):(O(this,x)[x].classList.add("nonlinear"),this.I()),O(this,x)[x].style.display="",O(this,eo)[eo]&&(O(this,eo)[eo]=!1,O(this,F)[F].pause());break;case i.Type.ALL_ADS_COMPLETED:if(O(this,J)[J])return;this.isCustomPlaybackUsed()&&O(this,Y)[Y]&&-1!==O(this,Y)[Y].getAdPodInfo().getTimeOffset()&&this.I(),this.reset();break;case i.Type.CONTENT_PAUSE_REQUESTED:this.C(),O(this,Y)[Y]=e.getAd(),O(this,x)[x].style.display="",O(this,N)[N].pause(),this.R(),O(this,Y)[Y]&&this.A(O(this,Y)[Y].getAdPodInfo().getTimeOffset()),O(this,F)[F].setVolume(O(this,N)[N].muted?0:O(this,N)[N].volume),O(this,U)[U].disable(),O(this,ei)[ei]=O(this,Y)[Y].getDuration(),O(this,et)[et]=0;break;case i.Type.CONTENT_RESUME_REQUESTED:var r=!!O(this,Y)[Y];if(r){var o=O(this,F)[F].getVolume();O(this,N)[N].muted=0===o,O(this,N)[N].volume=O(this,ea)[ea]}O(this,J)[J]&&(O(this,N)[N].currentTime=O(this,N)[N].duration+1,O(this,J)[J]=!1),O(this,N)[N].ended?(this.reset(),this.T()):this.C(),r&&(O(this,eo)[eo]=!1,this.I());break;case i.Type.AD_METADATA:this.g(O(this,F)[F].getCuePoints()),-1===O(this,ee)[ee].indexOf(0)&&(O(this,en)[en]?O(this,en)[en]({start:function(){t.I(),O(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I());break;case i.Type.AD_PROGRESS:var a=e.getAdData();O(this,et)[et]=a.currentTime,O(this,ei)[ei]=a.duration;break;case i.Type.LOG:var u=e.getAdData();O(this,en)[en]?O(this,en)[en]({start:function(){t.I(),O(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):u.adError&&!O(this,Y)[Y]&&this.I();break;case i.Type.VOLUME_CHANGED:var d=O(this,F)[F].getVolume();d>0&&(O(this,ea)[ea]=d)}},i.l=function(e){this.j(this.B(e))},i.u=function(e){var t,i=this,n=O(this,B)[B],s=n.AdEvent,r=n.AdErrorEvent.Type.AD_ERROR;window.clearTimeout(O(this,es)[es]);var o=O(this,F)[F]=e.getAdsManager(O(this,U)[U],O(this,z)[z]);Object.keys(s.Type).forEach(function(e){o.addEventListener(s.Type[e],function(t){if(i.S(t),M[e]){var n=["LOG","AD_PROGRESS"].indexOf(e)>-1;i.dispatchEvent(new R(M[e],{detail:{ad:t.getAd()||O(i,Y)[Y],adData:n?t.getAdData():{}}}))}})}),o.addEventListener(r,function(e){return i.j(i.B(e))});try{o.init(O(this,G)[G],O(this,H)[H],this.k()),o.setVolume(O(this,N)[N].muted?0:O(this,N)[N].volume),null==(t=O(this,V)[V])||t.initialize(),O(this,en)[en]||this.M()}catch(e){this.j(new L(e.message))}},i.M=function(){if(O(this,$)[$]||(this.dispatchEvent(new R(M.MEDIA_START)),O(this,$)[$]=!0),O(this,F)[F])try{O(this,F)[F].start()}catch(e){this.j(new L(e.message))}else this.I()},i.T=function(){var e=this;setTimeout(function(){O(e,X)[X]=!1,O(e,$)[$]=!1,O(e,J)[J]=!1,e.dispatchEvent(new R(M.MEDIA_STOP))},1)},i.v=function(e){for(var t,i=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return A(e,void 0);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?A(e,void 0):void 0}}(e))){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=i()).done;){var n=t.value;n.contentBoxSize&&1===n.contentBoxSize.length?(O(this,G)[G]=n.contentBoxSize[0].inlineSize,O(this,H)[H]=n.contentBoxSize[0].blockSize):n.contentBoxSize&&n.contentBoxSize.inlineSize?(O(this,G)[G]=n.contentBoxSize.inlineSize,O(this,H)[H]=n.contentBoxSize.blockSize):(O(this,G)[G]=n.contentRect.width,O(this,H)[H]=n.contentRect.height)}this.R()},i.R=function(){if(O(this,q)[q].autoResize&&O(this,F)[F]){var e=O(this,Y)[Y],t=this.k();e&&!e.isLinear()?e&&(e.getWidth()>O(this,G)[G]||e.getHeight()>O(this,H)[H]?this.resizeAd(O(this,G)[G],O(this,H)[H]):(O(this,F)[F].resize(e.getWidth(),e.getHeight()+20,t),O(this,x)[x].style.width=e.getWidth()+"px",O(this,x)[x].style.height=e.getHeight()+20+"px")):this.resizeAd(O(this,G)[G],O(this,H)[H])}},i.k=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||O(this,N)[N].webkitDisplayingFullscreen?O(this,B)[B].ViewMode.FULLSCREEN:O(this,B)[B].ViewMode.NORMAL},i.I=function(){var e=this;O(this,x)[x].style.display="none",O(this,N)[N].ended||(O(this,U)[U].enable(),O(this,eo)[eo]?(O(this,N)[N].pause(),this.dispatchEvent(new R("pause"))):(this.p().then(function(){}).catch(function(){e.dispatchEvent(new R("pause"))}),this.dispatchEvent(new R("play")),this.dispatchEvent(new R(M.MEDIA_RESUMED))),O(this,eo)[eo]=!1)},i.B=function(e){var t=e.getError(),i=new L(t.getMessage());return i.type=t.getType(),i.errorCode=t.getErrorCode(),i.vastErrorCode=t.getVastErrorCode&&t.getVastErrorCode(),i.innerError=t.getInnerError(),i},i.j=function(e){var t=this;this.dispatchEvent(new R(M.AD_ERROR,{detail:{error:e}})),this.C(),O(this,en)[en]?O(this,en)[en]({start:function(){t.I(),O(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I()},l(t,[{key:"volume",get:function(){return!O(this,U)[U].enabled&&O(this,F)[F]?O(this,F)[F].getVolume():O(this,N)[N].volume},set:function(e){!O(this,U)[U].enabled&&O(this,F)[F]&&O(this,F)[F].setVolume(e),O(this,N)[N].volume=e}},{key:"muted",get:function(){return!O(this,U)[U].enabled&&O(this,F)[F]?0===O(this,F)[F].getVolume():O(this,N)[N].muted},set:function(e){!O(this,U)[U].enabled&&O(this,F)[F]&&O(this,F)[F].setVolume(e?0:O(this,ea)[ea]),O(this,N)[N].muted=e}},{key:"currentTime",get:function(){return void 0!==O(this,et)[et]?O(this,et)[et]:O(this,N)[N].currentTime},set:function(e){O(this,U)[U].enabled&&(O(this,N)[N].currentTime=e)}},{key:"duration",get:function(){return void 0!==O(this,ei)[ei]?O(this,ei)[ei]:O(this,N)[N].duration}},{key:"cuePoints",get:function(){return[].concat(O(this,ee)[ee])}}]),t}(I)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,i,n){i.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},i.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.exportAll=function(e,t){return Object.keys(e).forEach(function(i){"default"===i||"__esModule"===i||Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[i]}})}),t},i.export=function(e,t,i){Object.defineProperty(e,t,{enumerable:!0,get:i})}},{}]},["iW4Tm"],"iW4Tm","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-vast.legacy.js b/docs/compiled/artplayer-plugin-vast.legacy.js index edc2e30e3..516d9ae00 100644 --- a/docs/compiled/artplayer-plugin-vast.legacy.js +++ b/docs/compiled/artplayer-plugin-vast.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,r,i){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof o[r]&&o[r],a=s.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!a[t]){if(!e[t]){var i="function"==typeof o[r]&&o[r];if(!n&&i)return i(t,!0);if(s)return s(t,!0);if(u&&"string"==typeof t)return u(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}h.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},h.cache={};var d=a[t]=new c.Module(t);e[t][0].call(d.exports,h,d,d.exports,this)}return a[t].exports;function h(e){var t=h.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=a,c.parent=s,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return o[r]}}),o[r]=c;for(var l=0;lt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function c(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function l(e,t){return function(n,r){t(n,r,e)}}function d(e,t,n,r,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),h=!1,f=n.length-1;f>=0;f--){var p={};for(var y in r)p[y]="access"===y?{}:r[y];for(var y in r.access)p.access[y]=r.access[y];p.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,n[f])("accessor"===u?{get:d.get,set:d.set}:d[c],p);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(a=s(v.get))&&(d.get=a),(a=s(v.set))&&(d.set=a),(a=s(v.init))&&i.unshift(a)}else(a=s(v))&&("field"===u?i.unshift(a):d[c]=a)}l&&Object.defineProperty(l,r.name,d),h=!0}function h(e,t,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function A(){for(var e=[],t=0;t1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{var n;(n=i[e](t)).value instanceof P?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function T(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:P(e[r](t)),done:!1}:i?i(t):t}:i}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=E(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function R(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var j=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&b(t,e,n);return j(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function C(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function k(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function L(e,t,n){if(null!=t){var r,i;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(n){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function U(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(e){return t(e),n()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}n.default={__extends:s,__assign:a,__rest:u,__decorate:c,__param:l,__metadata:y,__awaiter:v,__generator:m,__createBinding:b,__exportStar:_,__values:E,__read:g,__spread:A,__spreadArrays:w,__spreadArray:O,__await:P,__asyncGenerator:S,__asyncDelegator:T,__asyncValues:D,__makeTemplateObject:R,__importStar:x,__importDefault:I,__classPrivateFieldGet:C,__classPrivateFieldSet:k,__classPrivateFieldIn:M,__addDisposableResource:L,__disposeResources:U}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}r.defineInteropFlag(n),r.export(n,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cqJrZ:[function(e,t,n){var r,i,o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n),o.export(n,"Player",function(){return eu}),o.export(n,"PlayerError",function(){return k}),o.export(n,"PlayerEvent",function(){return I}),o.export(n,"PlayerOptions",function(){return C}),o.export(n,"loadImaSdk",function(){return u});var s=null,a=function(){s=null},u=function(){var e=window;return e.google&&e.google.ima?Promise.resolve(e.google.ima):s||((s=new Promise(function(e,t){var n=document.createElement("script");n.async=!0,n.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",n.onload=e,n.onerror=t,document.body.appendChild(n)}).then(function(){return e.google.ima})).then(a).catch(a),s)};function c(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&(g(this,J)[J].splice(t,1),this.g(g(this,J)[J]))},n.resizeAd=function(e,t){g(this,G)[G]=e,g(this,V)[V]=t,g(this,B)[B]&&g(this,B)[B].resize(e,t,this.k()),g(this,L)[L].style.width=e+"px",g(this,L)[L].style.height=t+"px"},n.reset=function(e){void 0===e&&(e=!1),e&&(g(this,$)[$]=!1,g(this,Z)[Z]=!1,g(this,Y)[Y]=!1),this.C(),g(this,J)[J]=[],g(this,eo)[eo]=!1,g(this,en)[en]=void 0,g(this,B)[B]&&g(this,B)[B].destroy(),g(this,B)[B]=void 0,g(this,F)[F].settings.setAutoPlayAdBreaks(!0),e&&this.P(),g(this,L)[L].style.display="none"},n.P=function(){g(this,W)[W]&&(g(this,W)[W].removeEventListener(g(this,F)[F].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),g(this,W)[W].removeEventListener(g(this,F)[F].AdErrorEvent.Type.AD_ERROR,this.l,!1),g(this,W)[W].destroy()),g(this,z)[z]&&g(this,z)[z].destroy()},n.destroy=function(){var e,t,n,r,i=this;this.reset(!0),g(this,N)[N].destroy(),x.forEach(function(e){g(i,M)[M].removeEventListener(e,i.o)}),null==(e=g(this,W)[W])||e.removeEventListener(g(this,F)[F].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),null==(t=g(this,z)[z])||t.destroy(),null==(n=g(this,W)[W])||n.destroy(),g(this,$)[$]=!1,g(this,Y)[Y]=!1,g(this,Z)[Z]=!1,null==(r=g(this,q)[q])||r.disconnect()},n.isCustomPlaybackUsed=function(){return!1===g(this,F)[F].settings.getDisableCustomPlaybackForIOS10Plus()&&!g(this,L)[L].querySelector("video")},n.C=function(){window.clearTimeout(g(this,er)[er]),window.clearTimeout(g(this,ei)[ei]),g(this,er)[er]=void 0,g(this,ei)[ei]=void 0,g(this,Q)[Q]=void 0,g(this,ee)[ee]=void 0,g(this,et)[et]=void 0,g(this,L)[L].style.display="none",g(this,L)[L].classList.remove("nonlinear"),g(this,B)[B]&&this.R()},n.o=function(e){var t=this;if(g(this,N)[N].enabled||"volumechange"===e.type){if("timeupdate"===e.type){if(g(this,M)[M].currentTime<.5)return;if(g(this,B)[B]){var n=g(this,B)[B].getCuePoints().filter(function(e){return e>=0&&e-1&&(g(this,M)[M].currentTime=g(this,M)[M].duration-1e-5,g(this,Y)[Y]=!0),g(this,W)[W].contentComplete(),g(this,B)[B]||this.T()),!window.ResizeObserver&&g(this,H)[H].autoResize&&"loadedmetadata"===e.type){var r=g(this,M)[M],i=r.offsetHeight,o=r.offsetWidth;g(this,G)[G]=o,g(this,V)[V]=i,this.R()}g(this,X)[X]&&"volumechange"!==e.type||this.dispatchEvent(new P(e.type))}},n.S=function(e){var t=this,n=g(this,F)[F].AdEvent;switch(e.type){case n.Type.LOADED:var r=e.getAd();g(this,en)[en]&&0===g(this,J)[J].length?g(this,en)[en]({ad:r,start:function(){t.M(),g(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}):g(this,K)[K]=r;break;case n.Type.AD_BREAK_READY:this.C(),g(this,en)[en]?(g(this,en)[en]({ad:g(this,K)[K],adBreakTime:e.getAdData().adBreakTime,start:function(){t.M(),g(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}),g(this,K)[K]=void 0):this.M();break;case n.Type.STARTED:var i=g(this,Q)[Q]=e.getAd();i.getAdPodInfo().getAdPosition()>1&&g(this,B)[B].setVolume(g(this,B)[B].getVolume()),g(this,L)[L].classList.remove("nonlinear"),this.R(),i.isLinear()?(g(this,N)[N].disable(),g(this,et)[et]=i.getDuration(),g(this,ee)[ee]=0):(g(this,L)[L].classList.add("nonlinear"),this.I()),g(this,L)[L].style.display="",g(this,eo)[eo]&&(g(this,eo)[eo]=!1,g(this,B)[B].pause());break;case n.Type.ALL_ADS_COMPLETED:if(g(this,Y)[Y])return;this.isCustomPlaybackUsed()&&g(this,Q)[Q]&&-1!==g(this,Q)[Q].getAdPodInfo().getTimeOffset()&&this.I(),this.reset();break;case n.Type.CONTENT_PAUSE_REQUESTED:this.C(),g(this,Q)[Q]=e.getAd(),g(this,L)[L].style.display="",g(this,M)[M].pause(),this.R(),g(this,Q)[Q]&&this.A(g(this,Q)[Q].getAdPodInfo().getTimeOffset()),g(this,B)[B].setVolume(g(this,M)[M].muted?0:g(this,M)[M].volume),g(this,N)[N].disable(),g(this,et)[et]=g(this,Q)[Q].getDuration(),g(this,ee)[ee]=0;break;case n.Type.CONTENT_RESUME_REQUESTED:var o=!!g(this,Q)[Q];if(o){var s=g(this,B)[B].getVolume();g(this,M)[M].muted=0===s,g(this,M)[M].volume=g(this,es)[es]}g(this,Y)[Y]&&(g(this,M)[M].currentTime=g(this,M)[M].duration+1,g(this,Y)[Y]=!1),g(this,M)[M].ended?(this.reset(),this.T()):this.C(),o&&(g(this,eo)[eo]=!1,this.I());break;case n.Type.AD_METADATA:this.g(g(this,B)[B].getCuePoints()),-1===g(this,J)[J].indexOf(0)&&(g(this,en)[en]?g(this,en)[en]({start:function(){t.I(),g(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I());break;case n.Type.AD_PROGRESS:var a=e.getAdData();g(this,ee)[ee]=a.currentTime,g(this,et)[et]=a.duration;break;case n.Type.LOG:var u=e.getAdData();g(this,en)[en]?g(this,en)[en]({start:function(){t.I(),g(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):u.adError&&!g(this,Q)[Q]&&this.I();break;case n.Type.VOLUME_CHANGED:var c=g(this,B)[B].getVolume();c>0&&(g(this,es)[es]=c)}},n.l=function(e){this.j(this.B(e))},n.u=function(e){var t,n=this,r=g(this,F)[F],i=r.AdEvent,o=r.AdErrorEvent.Type.AD_ERROR;window.clearTimeout(g(this,er)[er]);var s=g(this,B)[B]=e.getAdsManager(g(this,N)[N],g(this,U)[U]);Object.keys(i.Type).forEach(function(e){s.addEventListener(i.Type[e],function(t){if(n.S(t),I[e]){var r=["LOG","AD_PROGRESS"].indexOf(e)>-1;n.dispatchEvent(new P(I[e],{detail:{ad:t.getAd()||g(n,Q)[Q],adData:r?t.getAdData():{}}}))}})}),s.addEventListener(o,function(e){return n.j(n.B(e))});try{s.init(g(this,G)[G],g(this,V)[V],this.k()),s.setVolume(g(this,M)[M].muted?0:g(this,M)[M].volume),null==(t=g(this,z)[z])||t.initialize(),g(this,en)[en]||this.M()}catch(e){this.j(new k(e.message))}},n.M=function(){if(g(this,Z)[Z]||(this.dispatchEvent(new P(I.MEDIA_START)),g(this,Z)[Z]=!0),g(this,B)[B])try{g(this,B)[B].start()}catch(e){this.j(new k(e.message))}else this.I()},n.T=function(){var e=this;setTimeout(function(){g(e,$)[$]=!1,g(e,Z)[Z]=!1,g(e,Y)[Y]=!1,e.dispatchEvent(new P(I.MEDIA_STOP))},1)},n.v=function(e){for(var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return b(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,void 0):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=n()).done;){var r=t.value;r.contentBoxSize&&1===r.contentBoxSize.length?(g(this,G)[G]=r.contentBoxSize[0].inlineSize,g(this,V)[V]=r.contentBoxSize[0].blockSize):r.contentBoxSize&&r.contentBoxSize.inlineSize?(g(this,G)[G]=r.contentBoxSize.inlineSize,g(this,V)[V]=r.contentBoxSize.blockSize):(g(this,G)[G]=r.contentRect.width,g(this,V)[V]=r.contentRect.height)}this.R()},n.R=function(){if(g(this,H)[H].autoResize&&g(this,B)[B]){var e=g(this,Q)[Q],t=this.k();e&&!e.isLinear()?e&&(e.getWidth()>g(this,G)[G]||e.getHeight()>g(this,V)[V]?this.resizeAd(g(this,G)[G],g(this,V)[V]):(g(this,B)[B].resize(e.getWidth(),e.getHeight()+20,t),g(this,L)[L].style.width=e.getWidth()+"px",g(this,L)[L].style.height=e.getHeight()+20+"px")):this.resizeAd(g(this,G)[G],g(this,V)[V])}},n.k=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||g(this,M)[M].webkitDisplayingFullscreen?g(this,F)[F].ViewMode.FULLSCREEN:g(this,F)[F].ViewMode.NORMAL},n.I=function(){var e=this;g(this,L)[L].style.display="none",g(this,M)[M].ended||(g(this,N)[N].enable(),g(this,eo)[eo]?(g(this,M)[M].pause(),this.dispatchEvent(new P("pause"))):(this.p().then(function(){}).catch(function(){e.dispatchEvent(new P("pause"))}),this.dispatchEvent(new P("play")),this.dispatchEvent(new P(I.MEDIA_RESUMED))),g(this,eo)[eo]=!1)},n.B=function(e){var t=e.getError(),n=new k(t.getMessage());return n.type=t.getType(),n.errorCode=t.getErrorCode(),n.vastErrorCode=t.getVastErrorCode&&t.getVastErrorCode(),n.innerError=t.getInnerError(),n},n.j=function(e){var t=this;this.dispatchEvent(new P(I.AD_ERROR,{detail:{error:e}})),this.C(),g(this,en)[en]?g(this,en)[en]({start:function(){t.I(),g(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I()},l(t,[{key:"volume",get:function(){return!g(this,N)[N].enabled&&g(this,B)[B]?g(this,B)[B].getVolume():g(this,M)[M].volume},set:function(e){!g(this,N)[N].enabled&&g(this,B)[B]&&g(this,B)[B].setVolume(e),g(this,M)[M].volume=e}},{key:"muted",get:function(){return!g(this,N)[N].enabled&&g(this,B)[B]?0===g(this,B)[B].getVolume():g(this,M)[M].muted},set:function(e){!g(this,N)[N].enabled&&g(this,B)[B]&&g(this,B)[B].setVolume(e?0:g(this,es)[es]),g(this,M)[M].muted=e}},{key:"currentTime",get:function(){return void 0!==g(this,ee)[ee]?g(this,ee)[ee]:g(this,M)[M].currentTime},set:function(e){g(this,N)[N].enabled&&(g(this,M)[M].currentTime=e)}},{key:"duration",get:function(){return void 0!==g(this,et)[et]?g(this,et)[et]:g(this,M)[M].duration}},{key:"cuePoints",get:function(){return[].concat(g(this,J)[J])}}]),t}(j)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["lmDdD"],"lmDdD","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,i,o,s,a){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof u[n]&&u[n],l=c.i||{},d=c.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!d[t]){if(!e[t]){if(i[t])return i[t];var o="function"==typeof u[n]&&u[n];if(!r&&o)return o(t,!0);if(c)return c(t,!0);if(h&&"string"==typeof t)return h(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var a=d[t]=new f.Module(t);e[t][0].call(a.exports,l,a,a.exports,u)}return d[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=h,this.exports={}},f.modules=e,f.cache=d,f.parent=c,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=l,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return u[n]}}),u[n]=f;for(var p=0;pt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function l(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,o._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function d(e,t){return function(r,n){t(r,n,e)}}function h(e,t,r,n,i,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",d=!t&&e?n.static?e:e.prototype:null,h=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var y in n)v[y]="access"===y?{}:n[y];for(var y in n.access)v.access[y]=n.access[y];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,r[p])("accessor"===c?{get:h.get,set:h.set}:h[l],v);if("accessor"===c){if(void 0===m)continue;if(null===m||(void 0===m?"undefined":(0,o._)(m))!=="object")throw TypeError("Object expected");(u=a(m.get))&&(h.get=u),(u=a(m.set))&&(h.set=u),(u=a(m.init))&&i.unshift(u)}else(u=a(m))&&("field"===c?i.unshift(u):h[l]=u)}d&&Object.defineProperty(d,n.name,h),f=!0}function f(e,t,r){for(var n=arguments.length>2,i=0;i0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function w(){for(var e=[],t=0;t1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{var r;(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function j(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var o,s,a;o=n,s=i,a=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:a})},s)})}}}function R(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},x=function(e){return(x=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=x(e),n=0;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r-1&&(A(this,ee)[ee].splice(t,1),this.g(A(this,ee)[ee]))},r.resizeAd=function(e,t){A(this,V)[V]=e,A(this,H)[H]=t,A(this,G)[G]&&A(this,G)[G].resize(e,t,this.k()),A(this,N)[N].style.width=e+"px",A(this,N)[N].style.height=t+"px"},r.reset=function(e){void 0===e&&(e=!1),e&&(A(this,Y)[Y]=!1,A(this,X)[X]=!1,A(this,J)[J]=!1),this.C(),A(this,ee)[ee]=[],A(this,es)[es]=!1,A(this,en)[en]=void 0,A(this,G)[G]&&A(this,G)[G].destroy(),A(this,G)[G]=void 0,A(this,z)[z].settings.setAutoPlayAdBreaks(!0),e&&this.P(),A(this,N)[N].style.display="none"},r.P=function(){A(this,W)[W]&&(A(this,W)[W].removeEventListener(A(this,z)[z].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),A(this,W)[W].removeEventListener(A(this,z)[z].AdErrorEvent.Type.AD_ERROR,this.l,!1),A(this,W)[W].destroy()),A(this,B)[B]&&A(this,B)[B].destroy()},r.destroy=function(){var e,t,r,n,i=this;this.reset(!0),A(this,U)[U].destroy(),x.forEach(function(e){A(i,L)[L].removeEventListener(e,i.o)}),null==(e=A(this,W)[W])||e.removeEventListener(A(this,z)[z].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),null==(t=A(this,B)[B])||t.destroy(),null==(r=A(this,W)[W])||r.destroy(),A(this,Y)[Y]=!1,A(this,J)[J]=!1,A(this,X)[X]=!1,null==(n=A(this,Q)[Q])||n.disconnect()},r.isCustomPlaybackUsed=function(){return!1===A(this,z)[z].settings.getDisableCustomPlaybackForIOS10Plus()&&!A(this,N)[N].querySelector("video")},r.C=function(){window.clearTimeout(A(this,ei)[ei]),window.clearTimeout(A(this,eo)[eo]),A(this,ei)[ei]=void 0,A(this,eo)[eo]=void 0,A(this,K)[K]=void 0,A(this,et)[et]=void 0,A(this,er)[er]=void 0,A(this,N)[N].style.display="none",A(this,N)[N].classList.remove("nonlinear"),A(this,G)[G]&&this.R()},r.o=function(e){var t=this;if(A(this,U)[U].enabled||"volumechange"===e.type){if("timeupdate"===e.type){if(A(this,G)[G]){var r=A(this,G)[G].getCuePoints().filter(function(e){return e>=0&&e=.5&&(this.dispatchEvent(new S(k.MEDIA_IMPRESSION)),A(this,Y)[Y]=!0)}if("play"!==e.type||A(this,X)[X]||A(this,Z)[Z]||(this.dispatchEvent(new S(k.MEDIA_START)),A(this,X)[X]=!0),"ended"===e.type&&(this.isCustomPlaybackUsed()&&A(this,L)[L].currentTime===A(this,L)[L].duration&&A(this,ee)[ee].indexOf(-1)>-1&&(A(this,L)[L].currentTime=A(this,L)[L].duration-1e-5,A(this,J)[J]=!0),A(this,W)[W].contentComplete(),A(this,G)[G]||this.T()),!window.ResizeObserver&&A(this,q)[q].autoResize&&"loadedmetadata"===e.type){var n=A(this,L)[L],i=n.offsetHeight,o=n.offsetWidth;A(this,V)[V]=o,A(this,H)[H]=i,this.R()}A(this,Z)[Z]&&"volumechange"!==e.type||this.dispatchEvent(new S(e.type))}},r.S=function(e){var t=this,r=A(this,z)[z].AdEvent;switch(e.type){case r.Type.LOADED:var n=e.getAd();A(this,en)[en]&&0===A(this,ee)[ee].length?A(this,en)[en]({ad:n,start:function(){t.M(),A(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}):A(this,$)[$]=n;break;case r.Type.AD_BREAK_READY:this.C(),A(this,en)[en]?(A(this,en)[en]({ad:A(this,$)[$],adBreakTime:e.getAdData().adBreakTime,start:function(){t.M(),A(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}),A(this,$)[$]=void 0):this.M();break;case r.Type.STARTED:var i=A(this,K)[K]=e.getAd();i.getAdPodInfo().getAdPosition()>1&&A(this,G)[G].setVolume(A(this,G)[G].getVolume()),A(this,N)[N].classList.remove("nonlinear"),this.R(),i.isLinear()?(A(this,U)[U].disable(),A(this,er)[er]=i.getDuration(),A(this,et)[et]=0):(A(this,N)[N].classList.add("nonlinear"),this.I()),A(this,N)[N].style.display="",A(this,es)[es]&&(A(this,es)[es]=!1,A(this,G)[G].pause());break;case r.Type.ALL_ADS_COMPLETED:if(A(this,J)[J])return;this.isCustomPlaybackUsed()&&A(this,K)[K]&&-1!==A(this,K)[K].getAdPodInfo().getTimeOffset()&&this.I(),this.reset();break;case r.Type.CONTENT_PAUSE_REQUESTED:this.C(),A(this,K)[K]=e.getAd(),A(this,N)[N].style.display="",A(this,L)[L].pause(),this.R(),A(this,K)[K]&&this.A(A(this,K)[K].getAdPodInfo().getTimeOffset()),A(this,G)[G].setVolume(A(this,L)[L].muted?0:A(this,L)[L].volume),A(this,U)[U].disable(),A(this,er)[er]=A(this,K)[K].getDuration(),A(this,et)[et]=0;break;case r.Type.CONTENT_RESUME_REQUESTED:var o=!!A(this,K)[K];if(o){var s=A(this,G)[G].getVolume();A(this,L)[L].muted=0===s,A(this,L)[L].volume=A(this,ea)[ea]}A(this,J)[J]&&(A(this,L)[L].currentTime=A(this,L)[L].duration+1,A(this,J)[J]=!1),A(this,L)[L].ended?(this.reset(),this.T()):this.C(),o&&(A(this,es)[es]=!1,this.I());break;case r.Type.AD_METADATA:this.g(A(this,G)[G].getCuePoints()),-1===A(this,ee)[ee].indexOf(0)&&(A(this,en)[en]?A(this,en)[en]({start:function(){t.I(),A(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I());break;case r.Type.AD_PROGRESS:var a=e.getAdData();A(this,et)[et]=a.currentTime,A(this,er)[er]=a.duration;break;case r.Type.LOG:var u=e.getAdData();A(this,en)[en]?A(this,en)[en]({start:function(){t.I(),A(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):u.adError&&!A(this,K)[K]&&this.I();break;case r.Type.VOLUME_CHANGED:var c=A(this,G)[G].getVolume();c>0&&(A(this,ea)[ea]=c)}},r.l=function(e){this.j(this.B(e))},r.u=function(e){var t,r=this,n=A(this,z)[z],i=n.AdEvent,o=n.AdErrorEvent.Type.AD_ERROR;window.clearTimeout(A(this,ei)[ei]);var s=A(this,G)[G]=e.getAdsManager(A(this,U)[U],A(this,F)[F]);Object.keys(i.Type).forEach(function(e){s.addEventListener(i.Type[e],function(t){if(r.S(t),k[e]){var n=["LOG","AD_PROGRESS"].indexOf(e)>-1;r.dispatchEvent(new S(k[e],{detail:{ad:t.getAd()||A(r,K)[K],adData:n?t.getAdData():{}}}))}})}),s.addEventListener(o,function(e){return r.j(r.B(e))});try{s.init(A(this,V)[V],A(this,H)[H],this.k()),s.setVolume(A(this,L)[L].muted?0:A(this,L)[L].volume),null==(t=A(this,B)[B])||t.initialize(),A(this,en)[en]||this.M()}catch(e){this.j(new M(e.message))}},r.M=function(){if(A(this,X)[X]||(this.dispatchEvent(new S(k.MEDIA_START)),A(this,X)[X]=!0),A(this,G)[G])try{A(this,G)[G].start()}catch(e){this.j(new M(e.message))}else this.I()},r.T=function(){var e=this;setTimeout(function(){A(e,Y)[Y]=!1,A(e,X)[X]=!1,A(e,J)[J]=!1,e.dispatchEvent(new S(k.MEDIA_STOP))},1)},r.v=function(e){for(var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return _(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,void 0):void 0}}(e))){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=r()).done;){var n=t.value;n.contentBoxSize&&1===n.contentBoxSize.length?(A(this,V)[V]=n.contentBoxSize[0].inlineSize,A(this,H)[H]=n.contentBoxSize[0].blockSize):n.contentBoxSize&&n.contentBoxSize.inlineSize?(A(this,V)[V]=n.contentBoxSize.inlineSize,A(this,H)[H]=n.contentBoxSize.blockSize):(A(this,V)[V]=n.contentRect.width,A(this,H)[H]=n.contentRect.height)}this.R()},r.R=function(){if(A(this,q)[q].autoResize&&A(this,G)[G]){var e=A(this,K)[K],t=this.k();e&&!e.isLinear()?e&&(e.getWidth()>A(this,V)[V]||e.getHeight()>A(this,H)[H]?this.resizeAd(A(this,V)[V],A(this,H)[H]):(A(this,G)[G].resize(e.getWidth(),e.getHeight()+20,t),A(this,N)[N].style.width=e.getWidth()+"px",A(this,N)[N].style.height=e.getHeight()+20+"px")):this.resizeAd(A(this,V)[V],A(this,H)[H])}},r.k=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||A(this,L)[L].webkitDisplayingFullscreen?A(this,z)[z].ViewMode.FULLSCREEN:A(this,z)[z].ViewMode.NORMAL},r.I=function(){var e=this;A(this,N)[N].style.display="none",A(this,L)[L].ended||(A(this,U)[U].enable(),A(this,es)[es]?(A(this,L)[L].pause(),this.dispatchEvent(new S("pause"))):(this.p().then(function(){}).catch(function(){e.dispatchEvent(new S("pause"))}),this.dispatchEvent(new S("play")),this.dispatchEvent(new S(k.MEDIA_RESUMED))),A(this,es)[es]=!1)},r.B=function(e){var t=e.getError(),r=new M(t.getMessage());return r.type=t.getType(),r.errorCode=t.getErrorCode(),r.vastErrorCode=t.getVastErrorCode&&t.getVastErrorCode(),r.innerError=t.getInnerError(),r},r.j=function(e){var t=this;this.dispatchEvent(new S(k.AD_ERROR,{detail:{error:e}})),this.C(),A(this,en)[en]?A(this,en)[en]({start:function(){t.I(),A(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I()},d(t,[{key:"volume",get:function(){return!A(this,U)[U].enabled&&A(this,G)[G]?A(this,G)[G].getVolume():A(this,L)[L].volume},set:function(e){!A(this,U)[U].enabled&&A(this,G)[G]&&A(this,G)[G].setVolume(e),A(this,L)[L].volume=e}},{key:"muted",get:function(){return!A(this,U)[U].enabled&&A(this,G)[G]?0===A(this,G)[G].getVolume():A(this,L)[L].muted},set:function(e){!A(this,U)[U].enabled&&A(this,G)[G]&&A(this,G)[G].setVolume(e?0:A(this,ea)[ea]),A(this,L)[L].muted=e}},{key:"currentTime",get:function(){return void 0!==A(this,et)[et]?A(this,et)[et]:A(this,L)[L].currentTime},set:function(e){A(this,U)[U].enabled&&(A(this,L)[L].currentTime=e)}},{key:"duration",get:function(){return void 0!==A(this,er)[er]?A(this,er)[er]:A(this,L)[L].duration}},{key:"cuePoints",get:function(){return[].concat(A(this,ee)[ee])}}]),t}(I)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["lmDdD"],"lmDdD","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-vtt-thumbnail.js b/docs/compiled/artplayer-plugin-vtt-thumbnail.js index 35b46056e..db6592bdf 100644 --- a/docs/compiled/artplayer-plugin-vtt-thumbnail.js +++ b/docs/compiled/artplayer-plugin-vtt-thumbnail.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var p=u[t]=new a.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=u,a.parent=l,a.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(a,"root",{get:function(){return i[r]}}),i[r]=a;for(var s=0;sl);var o=e("./getVttArray"),i=r.interopDefault(o);function l(e){return async t=>{let{constructor:{utils:{setStyle:n,isMobile:r,addClass:o}},template:{$progress:l}}=t,u=null,f=await (0,i.default)(e.vtt);return t.controls.add({name:"vtt-thumbnail",position:"top",index:20,style:e.style||{},mounted(e){o(e,"art-control-thumbnails"),t.on("setBar",async(o,i,a)=>{let s="played"===o&&a&&r;if("hover"===o||s){let o=l.clientWidth*i,a=i*t.duration;n(e,"display","flex");let p=f.find(e=>a>=e.start&&a<=e.end);if(!p)return n(e,"display","none");o>0&&ol.clientWidth-p.w/2?n(e,"left",`${l.clientWidth-p.w}px`):n(e,"left",`${o-p.w/2}px`)):r||n(e,"display","none"),s&&(clearTimeout(u),u=setTimeout(()=>{n(e,"display","none")},500))}})}}),{name:"artplayerPluginVttThumbnail"}}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=l)},{"./getVttArray":"4IFMi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IFMi":[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){var t,n,r,o=e.split("."),i=o[0].split(":")||[],l=Number((t=o[1]||"0",n=3,r="0",t.length>n?String(t):((n-=t.length)>r.length&&(r+=r.repeat(n/r.length)),String(t)+r.slice(0,n))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+l}async function i(e=""){let t=(await (await fetch(e)).text()).split(/[\n\r]/gm).filter(e=>e.trim()),n=[];for(let r=1;r?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(u),a=/(.*)#(\w{4})=(.*)/i,s=l.match(a),p=Math.floor(o(f[1])),d=Math.floor(o(f[2])),c=s[1];if(!/^\/|((https?|ftp|file):\/\/)/i.test(c)){let t=e.split("/");t.pop(),t.push(c),c=t.join("/")}let h={start:p,end:d,url:c},m=s[2].split(""),y=s[3].split(",");for(let e=0;ei)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["YTqB2"],"YTqB2","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,r,i,o,l,u){var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof f[r]&&f[r],d=a.i||{},s=a.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!s[t]){if(!e[t]){if(i[t])return i[t];var o="function"==typeof f[r]&&f[r];if(!n&&o)return o(t,!0);if(a)return a(t,!0);if(p&&"string"==typeof t)return p(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,f)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.require=p,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.distDir=void 0,c.publicUrl=void 0,c.devServer=void 0,c.i=d,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return f[r]}}),f[r]=c;for(var h=0;hu);var o=e("./getVttArray"),l=i.interopDefault(o);function u(e){return async t=>{let{constructor:{utils:{setStyle:n,isMobile:r,addClass:i}},template:{$progress:o}}=t,u=null,f=await (0,l.default)(e.vtt);return t.controls.add({name:"vtt-thumbnail",position:"top",index:20,style:e.style||{},mounted(e){i(e,"art-control-thumbnails"),t.on("setBar",async(i,l,a)=>{let d="played"===i&&a&&r;if("hover"===i||d){let i=o.clientWidth*l,a=l*t.duration;n(e,"display","flex");let s=f.find(e=>a>=e.start&&a<=e.end);if(!s)return n(e,"display","none");if(i>0&&io.clientWidth-s.w/2?n(e,"left",`${o.clientWidth-s.w}px`):n(e,"left",`${i-s.w/2}px`);else r||n(e,"display","none");d&&(clearTimeout(u),u=setTimeout(()=>{n(e,"display","none")},500))}})}}),{name:"artplayerPluginVttThumbnail"}}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=u)},{"./getVttArray":"4IFMi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IFMi":[function(e,t,n,r){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){var t,n,r,i=e.split("."),o=i[0].split(":")||[],l=Number((t=i[1]||"0",n=3,r="0",t.length>n?String(t):((n-=t.length)>r.length&&(r+=r.repeat(n/r.length)),String(t)+r.slice(0,n))))/1e3;return 3600*Number(o[o.length-3]||0)+60*Number(o[o.length-2]||0)+Number(o[o.length-1]||0)+l}async function l(e=""){let t=(await (await fetch(e)).text()).split(/[\n\r]/gm).filter(e=>e.trim()),n=[];for(let r=1;r?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(u),a=/(.*)#(\w{4})=(.*)/i,d=l.match(a),s=Math.floor(o(f[1])),p=Math.floor(o(f[2])),c=d[1];if(!/^\/|((https?|ftp|file):\/\/)/i.test(c)){let t=e.split("/");t.pop(),t.push(c),c=t.join("/")}let h={start:s,end:p,url:c},m=d[2].split(""),y=d[3].split(",");for(let e=0;el)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n,r){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["YTqB2"],"YTqB2","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-vtt-thumbnail.legacy.js b/docs/compiled/artplayer-plugin-vtt-thumbnail.legacy.js index 449184014..a014fcd90 100644 --- a/docs/compiled/artplayer-plugin-vtt-thumbnail.legacy.js +++ b/docs/compiled/artplayer-plugin-vtt-thumbnail.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],u=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,r){if(!u[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=u[t]=new s.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return u[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=u,s.parent=a,s.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(s,"root",{get:function(){return i[n]}}),i[n]=s;for(var l=0;l=e.start&&d<=e.end})))return[2,n(e,"display","none")];p>0&&ps.clientWidth-y.w/2?n(e,"left","".concat(s.clientWidth-y.w,"px")):n(e,"left","".concat(p-y.w/2,"px"))):a||n(e,"display","none"),c&&(clearTimeout(l),l=setTimeout(function(){n(e,"display","none")},500))}return[2]})}),function(e,t,n){return r.apply(this,arguments)}))}}),[2,{name:"artplayerPluginVttThumbnail"}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=c)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","./getVttArray":"iUpz3","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){r(e);return}u.done?t(c):Promise.resolve(c).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator});var o=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return a}),n.export(r,"__assign",function(){return u}),n.export(r,"__rest",function(){return c}),n.export(r,"__decorate",function(){return s}),n.export(r,"__param",function(){return l}),n.export(r,"__esDecorate",function(){return f}),n.export(r,"__runInitializers",function(){return p}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return y}),n.export(r,"__metadata",function(){return _}),n.export(r,"__awaiter",function(){return h}),n.export(r,"__generator",function(){return v}),n.export(r,"__createBinding",function(){return m}),n.export(r,"__exportStar",function(){return b}),n.export(r,"__values",function(){return g}),n.export(r,"__read",function(){return w}),n.export(r,"__spread",function(){return x}),n.export(r,"__spreadArrays",function(){return j}),n.export(r,"__spreadArray",function(){return O}),n.export(r,"__await",function(){return P}),n.export(r,"__asyncGenerator",function(){return S}),n.export(r,"__asyncDelegator",function(){return E}),n.export(r,"__asyncValues",function(){return T}),n.export(r,"__makeTemplateObject",function(){return D}),n.export(r,"__importStar",function(){return F}),n.export(r,"__importDefault",function(){return k}),n.export(r,"__classPrivateFieldGet",function(){return A}),n.export(r,"__classPrivateFieldSet",function(){return M}),n.export(r,"__classPrivateFieldIn",function(){return R}),n.export(r,"__addDisposableResource",function(){return W}),n.export(r,"__disposeResources",function(){return q});var o=e("@swc/helpers/_/_type_of"),i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,c=n.kind,s="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var h=(0,r[d])("accessor"===c?{get:f.get,set:f.set}:f[s],y);if("accessor"===c){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(u=a(h.get))&&(f.get=u),(u=a(h.set))&&(f.set=u),(u=a(h.init))&&o.unshift(u)}else(u=a(h))&&("field"===c?o.unshift(u):f[s]=u)}l&&Object.defineProperty(l,n.name,f),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],t=0;t1||u(e,t)})},t&&(n[e]=t(n[e])))}function u(e,t){try{var r;(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(c,s):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function c(e){u("next",e)}function s(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function E(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return I(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function A(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function M(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function W(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function q(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:a,__assign:u,__rest:c,__decorate:s,__param:l,__metadata:_,__awaiter:h,__generator:v,__createBinding:m,__exportStar:b,__values:g,__read:w,__spread:x,__spreadArrays:j,__spreadArray:O,__await:P,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:T,__makeTemplateObject:D,__importStar:F,__importDefault:k,__classPrivateFieldGet:A,__classPrivateFieldSet:M,__classPrivateFieldIn:R,__addDisposableResource:W,__disposeResources:q}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iUpz3:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var o=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator");function a(e){var t,r,n,o=e.split("."),i=o[0].split(":")||[],a=Number((t=o[1]||"0",r=3,n="0",t.length>r?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+a}function u(){return c.apply(this,arguments)}function c(){return(c=(0,o._)(function(){var e,t,r,n,o,u,c,s,l,f,p,d,y,_,h,v,m,b,g=arguments;return(0,i._)(this,function(i){switch(i.label){case 0:return[4,fetch(e=g.length>0&&void 0!==g[0]?g[0]:"")];case 1:return[4,i.sent().text()];case 2:for(n=1,t=i.sent().split(/[\n\r]/gm).filter(function(e){return e.trim()}),r=[];n?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,s=o.match(c),l=/(.*)#(\w{4})=(.*)/i,f=u.match(l),p=Math.floor(a(s[1])),d=Math.floor(a(s[2])),y=f[1],/^\/|((https?|ftp|file):\/\/)/i.test(y)||((_=e.split("/")).pop(),_.push(y),y=_.join("/")),h={start:p,end:d,url:y},v=f[2].split(""),m=f[3].split(","),b=0;b=e.start&&d<=e.end})))return[2,n(e,"display","none")];if(p>0&&ps.clientWidth-y.w/2?n(e,"left","".concat(s.clientWidth-y.w,"px")):n(e,"left","".concat(p-y.w/2,"px"));else o||n(e,"display","none");c&&(clearTimeout(f),f=setTimeout(function(){n(e,"display","none")},500))}return[2]})}),function(e,t,n){return r.apply(this,arguments)}))}}),[2,{name:"artplayerPluginVttThumbnail"}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=s)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","./getVttArray":"iUpz3","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){r(e);return}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return i.__generator});var i=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"__extends",function(){return u}),o.export(r,"__assign",function(){return c}),o.export(r,"__rest",function(){return s}),o.export(r,"__decorate",function(){return f}),o.export(r,"__param",function(){return l}),o.export(r,"__esDecorate",function(){return p}),o.export(r,"__runInitializers",function(){return d}),o.export(r,"__propKey",function(){return y}),o.export(r,"__setFunctionName",function(){return _}),o.export(r,"__metadata",function(){return h}),o.export(r,"__awaiter",function(){return v}),o.export(r,"__generator",function(){return m}),o.export(r,"__createBinding",function(){return b}),o.export(r,"__exportStar",function(){return w}),o.export(r,"__values",function(){return g}),o.export(r,"__read",function(){return x}),o.export(r,"__spread",function(){return j}),o.export(r,"__spreadArrays",function(){return O}),o.export(r,"__spreadArray",function(){return P}),o.export(r,"__await",function(){return S}),o.export(r,"__asyncGenerator",function(){return E}),o.export(r,"__asyncDelegator",function(){return I}),o.export(r,"__asyncValues",function(){return T}),o.export(r,"__makeTemplateObject",function(){return D}),o.export(r,"__importStar",function(){return k}),o.export(r,"__importDefault",function(){return A}),o.export(r,"__classPrivateFieldGet",function(){return M}),o.export(r,"__classPrivateFieldSet",function(){return N}),o.export(r,"__classPrivateFieldIn",function(){return W}),o.export(r,"__addDisposableResource",function(){return q}),o.export(r,"__disposeResources",function(){return z}),o.export(r,"__rewriteRelativeImportExtension",function(){return V});var i=e("@swc/helpers/_/_type_of"),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function f(e,t,r,n){var o,a=arguments.length,u=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(u=(a<3?o(u):a>3?o(t,r,u):o(t,r))||u);return a>3&&u&&Object.defineProperty(t,r,u),u}function l(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function u(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,s=n.kind,f="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?n.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,y=r.length-1;y>=0;y--){var _={};for(var h in n)_[h]="access"===h?{}:n[h];for(var h in n.access)_.access[h]=n.access[h];_.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(u(e||null))};var v=(0,r[y])("accessor"===s?{get:p.get,set:p.set}:p[f],_);if("accessor"===s){if(void 0===v)continue;if(null===v||(void 0===v?"undefined":(0,i._)(v))!=="object")throw TypeError("Object expected");(c=u(v.get))&&(p.get=c),(c=u(v.set))&&(p.set=c),(c=u(v.init))&&o.unshift(c)}else(c=u(v))&&("field"===s?o.unshift(c):p[f]=c)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function j(){for(var e=[],t=0;t1||u(e,t)})},t&&(n[e]=t(n[e])))}function u(e,t){try{var r;(r=o[e](t)).value instanceof S?Promise.resolve(r.value.v).then(c,s):f(i[0][2],r)}catch(e){f(i[0][3],e)}}function c(e){u("next",e)}function s(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var i,a,u;i=n,a=o,u=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){i({value:e,done:u})},a)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},R=function(e){return(R=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=R(e),n=0;nr?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+a}function c(){return s.apply(this,arguments)}function s(){return(s=(0,i._)(function(){var e,t,r,n,o,i,c,s,f,l,p,d,y,_,h,v,m,b,w=arguments;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,fetch(e=w.length>0&&void 0!==w[0]?w[0]:"")];case 1:return[4,a.sent().text()];case 2:for(n=1,t=a.sent().split(/[\n\r]/gm).filter(function(e){return e.trim()}),r=[];n?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,s=o.match(c),f=/(.*)#(\w{4})=(.*)/i,l=i.match(f),p=Math.floor(u(s[1])),d=Math.floor(u(s[2])),y=l[1],/^\/|((https?|ftp|file):\/\/)/i.test(y)||((_=e.split("/")).pop(),_.push(y),y=_.join("/")),h={start:p,end:d,url:y},v=l[2].split(""),m=l[3].split(","),b=0;b{let{constructor:n}=t,{createElement:o}=n.utils,i=o("canvas"),r=o("video"),a=i.getContext("2d"),u=null,f={};for(let e in i)"function"==typeof i[e]&&(f[e]=i[e].bind(i));for(let e in r)e in i||Object.defineProperty(i,e,{get(){let t=r[e];return"function"==typeof t?t.bind(r):t},set(t){r[e]=t},configurable:!0,enumerable:!0});for(let e in f)i[e]=function(...t){return e in f?f[e](...t):r[e].apply(r,t)};return function(){let{events:e}=n.config;setTimeout(()=>{e.forEach(e=>{t.proxy(r,e,e=>{t.emit(`video:${e.type}`,e)})})})}(),t.on("video:loadedmetadata",()=>{i.width=r.videoWidth,i.height=r.videoHeight}),t.on("video:play",()=>{cancelAnimationFrame(u),d()}),t.on("video:pause",()=>{cancelAnimationFrame(u)}),t.on("resize",()=>{(function(){let e,n;let o=t.template?.$player;if(!o||t.option.autoSize)return;let a=r.videoWidth/r.videoHeight,u=o.clientWidth,f=o.clientHeight;u/f>a?e=(n=f)*a:n=(e=u)/a,i.width=e,i.height=n;let l=(u-e)/2,d=(f-n)/2;Object.assign(i.style,{padding:`${d}px ${l}px`})})(),l()}),t.on("destroy",()=>{cancelAnimationFrame(u)}),i;async function l(){try{if("undefined"!=typeof createImageBitmap){let e=await createImageBitmap(r);a.drawImage(e,0,0,i.width,i.height),e.close()}else a.drawImage(r,0,0,i.width,i.height);e&&e(a,r),t.emit("artplayerProxyCanvas:draw",a,r)}catch(e){t.emit("artplayerProxyCanvas:error",e)}}async function d(){await l(),u=requestAnimationFrame(d)}}}o.defineInteropFlag(n),o.export(n,"default",()=>i),"undefined"!=typeof window&&(window.artplayerProxyCanvas=i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["16i3K"],"16i3K","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,i,r,o,a,u){var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof f[i]&&f[i],l=d.i||{},c=d.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,n){if(!c[t]){if(!e[t]){if(r[t])return r[t];var o="function"==typeof f[i]&&f[i];if(!n&&o)return o(t,!0);if(d)return d(t,!0);if(p&&"string"==typeof t)return p(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}l.resolve=function(n){var i=e[t][1][n];return null!=i?i:n},l.cache={};var u=c[t]=new s.Module(t);e[t][0].call(u.exports,l,u,u.exports,f)}return c[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.require=p,this.exports={}},s.modules=e,s.cache=c,s.parent=d,s.distDir=void 0,s.publicUrl=void 0,s.devServer=void 0,s.i=l,s.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(s,"root",{get:function(){return f[i]}}),f[i]=s;for(var y=0;y{let{constructor:n}=t,{createElement:i}=n.utils,r=i("canvas"),o=i("video"),a=r.getContext("2d"),u=null,f={};for(let e in r)"function"==typeof r[e]&&(f[e]=r[e].bind(r));for(let e in o)e in r||Object.defineProperty(r,e,{get(){let t=o[e];return"function"==typeof t?t.bind(o):t},set(t){o[e]=t},configurable:!0,enumerable:!0});for(let e in f)r[e]=function(...t){return e in f?f[e](...t):o[e].apply(o,t)};return function(){let{events:e}=n.config;setTimeout(()=>{e.forEach(e=>{t.proxy(o,e,e=>{t.emit(`video:${e.type}`,e)})})})}(),t.on("video:loadedmetadata",()=>{r.width=o.videoWidth,r.height=o.videoHeight}),t.on("video:play",()=>{cancelAnimationFrame(u),l()}),t.on("video:pause",()=>{cancelAnimationFrame(u)}),t.on("resize",()=>{!function(){let e,n,i=t.template?.$player;if(!i||t.option.autoSize)return;let a=o.videoWidth/o.videoHeight,u=i.clientWidth,f=i.clientHeight;u/f>a?e=(n=f)*a:n=(e=u)/a,r.width=e,r.height=n;let d=(u-e)/2,l=(f-n)/2;Object.assign(r.style,{padding:`${l}px ${d}px`})}(),d()}),t.on("destroy",()=>{cancelAnimationFrame(u)}),r;async function d(){try{if("undefined"!=typeof createImageBitmap){let e=await createImageBitmap(o);a.drawImage(e,0,0,r.width,r.height),e.close()}else a.drawImage(o,0,0,r.width,r.height);e&&e(a,o),t.emit("artplayerProxyCanvas:draw",a,o)}catch(e){t.emit("artplayerProxyCanvas:error",e)}}async function l(){await d(),u=requestAnimationFrame(l)}}}r.defineInteropFlag(n),r.export(n,"default",()=>o),"undefined"!=typeof window&&(window.artplayerProxyCanvas=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n,i){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["16i3K"],"16i3K","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-proxy-canvas.legacy.js b/docs/compiled/artplayer-proxy-canvas.legacy.js index 34b05f6d1..74990e109 100644 --- a/docs/compiled/artplayer-proxy-canvas.legacy.js +++ b/docs/compiled/artplayer-proxy-canvas.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],c=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(r,t){if(!c[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(u&&"string"==typeof r)return u(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},p.cache={};var l=c[r]=new s.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return c[r].exports;function p(e){var r=p.resolve(e);return!1===r?{}:s(r)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=c,s.parent=a,s.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return i[n]}}),i[n]=s;for(var f=0;fi?t=(n=c)*i:n=(t=a)/i,f.width=t,f.height=n;var u=(a-t)/2,s=(c-n)/2;Object.assign(f.style,{padding:"".concat(s,"px ").concat(u,"px")})}})(),v()}),r.on("destroy",function(){cancelAnimationFrame(d)}),f;function v(){return b.apply(this,arguments)}function b(){return(b=(0,o._)(function(){var t,n;return(0,a._)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,4,,5]),!("undefined"!=typeof createImageBitmap))return[3,2];return[4,createImageBitmap(l)];case 1:return t=o.sent(),p.drawImage(t,0,0,f.width,f.height),t.close(),[3,3];case 2:p.drawImage(l,0,0,f.width,f.height),o.label=3;case 3:return e&&e(p,l),r.emit("artplayerProxyCanvas:draw",p,l),[3,5];case 4:return n=o.sent(),r.emit("artplayerProxyCanvas:error",n),[3,5];case 5:return[2]}})})).apply(this,arguments)}function j(){return w.apply(this,arguments)}function w(){return(w=(0,o._)(function(){return(0,a._)(this,function(e){switch(e.label){case 0:return[4,v()];case 1:return e.sent(),d=requestAnimationFrame(j),[2]}})})).apply(this,arguments)}}}"undefined"!=typeof window&&(window.artplayerProxyCanvas=c)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r,t,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){t(e);return}c.done?r(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function c(e){o(a,n,i,c,u,"next",e)}function u(e){o(a,n,i,c,u,"throw",e)}c(void 0)})}}n.defineInteropFlag(t),n.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],iwLF0:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return u});var o=e("./_array_without_holes.js"),i=e("./_iterable_to_array.js"),a=e("./_non_iterable_spread.js"),c=e("./_unsupported_iterable_to_array.js");function u(e){return(0,o._)(e)||(0,i._)(e)||(0,c._)(e)||(0,a._)()}},{"./_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(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return i});var o=e("./_array_like_to_array.js");function i(e){if(Array.isArray(e))return(0,o._)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);tr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function s(e,r,t,n){var o,i=arguments.length,a=i<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,r,t,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(r,t,a):o(r,t))||a);return i>3&&a&&Object.defineProperty(r,t,a),a}function f(e,r){return function(t,n){r(t,n,e)}}function l(e,r,t,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,u=n.kind,s="getter"===u?"get":"setter"===u?"set":"value",f=!r&&e?n.static?e:e.prototype:null,l=r||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=t.length-1;d>=0;d--){var _={};for(var y in n)_[y]="access"===y?{}:n[y];for(var y in n.access)_.access[y]=n.access[y];_.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var h=(0,t[d])("accessor"===u?{get:l.get,set:l.set}:l[s],_);if("accessor"===u){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(c=a(h.get))&&(l.get=c),(c=a(h.set))&&(l.set=c),(c=a(h.init))&&o.unshift(c)}else(c=a(h))&&("field"===u?o.unshift(c):l[s]=c)}f&&Object.defineProperty(f,n.name,l),p=!0}function p(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],r=0;r1||c(e,r)})},r&&(n[e]=r(n[e])))}function c(e,r){try{var t;(t=o[e](r)).value instanceof P?Promise.resolve(t.value.v).then(u,s):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function u(e){c("next",e)}function s(e){c("throw",e)}function f(e,r){e(r),i.shift(),i.length&&c(i[0][0],i[0][1])}}function E(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:P(e[n](r)),done:!1}:o?o(r):r}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=j(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){!function(e,r,t,n){Promise.resolve(n).then(function(r){e({value:r,done:t})},r)}(n,o,(r=e[t](r)).done,r.value)})}}}function D(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var F=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r};function T(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&v(r,e,t);return F(r,e),r}function A(e){return e&&e.__esModule?e:{default:e}}function R(e,r,t,n){if("a"===t&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function k(e,r,t,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!o:!r.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,t):o?o.value=t:r.set(e,t),t}function W(e,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?r===e:e.has(r)}function C(e,r,t){if(null!=r){var n,o;if("object"!=typeof r&&"function"!=typeof r)throw TypeError("Object expected.");if(t){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=r[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=r[Symbol.dispose],t&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:r,dispose:n,async:t})}else t&&e.stack.push({async:!0});return r}var M="function"==typeof SuppressedError?SuppressedError:function(e,r,t){var n=Error(t);return n.name="SuppressedError",n.error=e,n.suppressed=r,n};function N(e){function r(r){e.error=e.hasError?new M(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(t,function(e){return r(e),t()})}catch(e){r(e)}}if(e.hasError)throw e.error}()}t.default={__extends:a,__assign:c,__rest:u,__decorate:s,__param:f,__metadata:y,__awaiter:h,__generator:m,__createBinding:v,__exportStar:b,__values:j,__read:w,__spread:g,__spreadArrays:x,__spreadArray:O,__await:P,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:I,__makeTemplateObject:D,__importStar:T,__importDefault:A,__classPrivateFieldGet:R,__classPrivateFieldSet:k,__classPrivateFieldIn:W,__addDisposableResource:C,__disposeResources:N}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["59CNb"],"59CNb","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,n,o,i,a,c){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof u[n]&&u[n],f=s.i||{},l=s.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(r,t){if(!l[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof u[n]&&u[n];if(!t&&i)return i(r,!0);if(s)return s(r,!0);if(p&&"string"==typeof r)return p(r);var a=Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var c=l[r]=new d.Module(r);e[r][0].call(c.exports,f,c,c.exports,u)}return l[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:d(r)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=l,d.parent=s,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return u[n]}}),u[n]=d;for(var _=0;_i?t=(n=c)*i:n=(t=a)/i,f.width=t,f.height=n;var u=(a-t)/2,s=(c-n)/2;Object.assign(f.style,{padding:"".concat(s,"px ").concat(u,"px")})}}(),v()}),r.on("destroy",function(){cancelAnimationFrame(d)}),f;function v(){return b.apply(this,arguments)}function b(){return(b=(0,i._)(function(){var t,n;return(0,c._)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,4,,5]),"undefined"==typeof createImageBitmap)return[3,2];return[4,createImageBitmap(l)];case 1:return t=o.sent(),p.drawImage(t,0,0,f.width,f.height),t.close(),[3,3];case 2:p.drawImage(l,0,0,f.width,f.height),o.label=3;case 3:return e&&e(p,l),r.emit("artplayerProxyCanvas:draw",p,l),[3,5];case 4:return n=o.sent(),r.emit("artplayerProxyCanvas:error",n),[3,5];case 5:return[2]}})})).apply(this,arguments)}function j(){return w.apply(this,arguments)}function w(){return(w=(0,i._)(function(){return(0,c._)(this,function(e){switch(e.label){case 0:return[4,v()];case 1:return e.sent(),d=requestAnimationFrame(j),[2]}})})).apply(this,arguments)}}}"undefined"!=typeof window&&(window.artplayerProxyCanvas=u)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r,t,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){t(e);return}c.done?r(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var r=this,t=arguments;return new Promise(function(n,o){var a=e.apply(r,t);function c(e){i(a,n,o,c,u,"next",e)}function u(e){i(a,n,o,c,u,"throw",e)}c(void 0)})}}o.defineInteropFlag(t),o.export(t,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t,n){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],iwLF0:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return s});var i=e("./_array_without_holes.js"),a=e("./_iterable_to_array.js"),c=e("./_non_iterable_spread.js"),u=e("./_unsupported_iterable_to_array.js");function s(e){return(0,i._)(e)||(0,a._)(e)||(0,u._)(e)||(0,c._)()}},{"./_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(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return a});var i=e("./_array_like_to_array.js");function a(e){if(Array.isArray(e))return(0,i._)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);tr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function f(e,r,t,n){var o,a=arguments.length,c=a<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,r,t,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(r,t,c):o(r,t))||c);return a>3&&c&&Object.defineProperty(r,t,c),c}function l(e,r){return function(t,n){r(t,n,e)}}function p(e,r,t,n,o,a){function c(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,s=n.kind,f="getter"===s?"get":"setter"===s?"set":"value",l=!r&&e?n.static?e:e.prototype:null,p=r||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,_=t.length-1;_>=0;_--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(c(e||null))};var m=(0,t[_])("accessor"===s?{get:p.get,set:p.set}:p[f],y);if("accessor"===s){if(void 0===m)continue;if(null===m||(void 0===m?"undefined":(0,i._)(m))!=="object")throw TypeError("Object expected");(u=c(m.get))&&(p.get=u),(u=c(m.set))&&(p.set=u),(u=c(m.init))&&o.unshift(u)}else(u=c(m))&&("field"===s?o.unshift(u):p[f]=u)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],r=0;r1||c(e,r)})},r&&(n[e]=r(n[e])))}function c(e,r){try{var t;(t=o[e](r)).value instanceof S?Promise.resolve(t.value.v).then(u,s):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function u(e){c("next",e)}function s(e){c("throw",e)}function f(e,r){e(r),i.shift(),i.length&&c(i[0][0],i[0][1])}}function E(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:S(e[n](r)),done:!1}:o?o(r):r}:o}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=w(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){var i,a,c;i=n,a=o,c=(r=e[t](r)).done,Promise.resolve(r.value).then(function(e){i({value:e,done:c})},a)})}}}function F(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var A=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r},T=function(e){return(T=Object.getOwnPropertyNames||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)};function R(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t=T(e),n=0;na);var n=t("@webav/av-cliper");function a(t={}){return e=>{let r,s;let{option:a,constructor:o}=e,{createElement:h,def:l}=o.utils,u=h("canvas"),d=u.getContext("2d"),f=null,p=null,c=null,m=null,g=0,y={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:a.muted,volume:a.volume,autoplay:a.autoplay};function _(){c&&(clearInterval(c),c=null),p&&(p.stop(),p=null)}function b(){if(s){let t=y.muted?0:y.volume;s.gain.setValueAtTime(t,r.currentTime)}}async function w(){r||(s=(r=new AudioContext).createGain()).connect(r.destination);let t=1e6*y.currentTime,n=0,a=!0,o=performance.now();async function h(){if(!y.playing)return;let h=performance.now(),l=h-o;o=h,null!==m?(t=1e6*m,m=null,a=!0):t+=1e3*l*y.playbackRate,y.currentTime=t/1e6;let{state:u,video:c,audio:g}=await f.tick(Math.round(t));if(e.emit("video:timeupdate",{type:"timeupdate"}),"done"===u){_(),y.ended=!0,y.playing=!1,y.paused=!0,e.emit("video:ended",{type:"ended"});return}if(c&&"success"===u&&(d.clearRect(0,0,y.videoWidth,y.videoHeight),d.drawImage(c,0,0,y.videoWidth,y.videoHeight),c.close()),a)a=!1;else if(g?.[0]?.length){let t=r.createBuffer(2,g[0].length,48e3);t.copyToChannel(g[0],0),t.copyToChannel(g[1],1),(p=r.createBufferSource()).buffer=t,p.connect(s),p.playbackRate.setValueAtTime(y.playbackRate,r.currentTime),n=Math.max(r.currentTime,n),p.start(n),n+=t.duration/y.playbackRate}}_(),b(),y.playing=!0,y.paused=!1,c=setInterval(h,1e3/60)}async function v(t){let{video:e}=await f.tick(1e6*t);e&&(d.clearRect(0,0,u.width,u.height),d.drawImage(e,0,0,u.width,u.height),e.close())}function S(){let t=e.template?.$player;if(!t||a.autoSize)return;let r=u.videoWidth/u.videoHeight,s=t.clientWidth,n=t.clientHeight,o=0,h=0;s/n>r?o=(s-n*r)/2:h=(n-s/r)/2,Object.assign(u.style,{padding:`${h}px ${o}px`})}async function E(){if(!await (0,n.Combinator).isSupported())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");_(),Object.assign(y,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:a.muted,volume:a.volume,autoplay:a.autoplay}),f&&(f.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"}));try{await Promise.resolve(),y.readyState=1,e.emit("video:loadstart",{type:"loadstart"});let r=await fetch(a.url);if(!r.body)throw Error("No response body");f=new n.MP4Clip(r.body,t)}catch(t){throw y.readyState=0,e.emit("video:error",t),t}let r=await f.ready;Object.assign(y,{readyState:4,duration:Math.round(r.duration/1e6),videoWidth:r.width,videoHeight:r.height}),u.width=y.videoWidth,u.height=y.videoHeight,await v(.1),S(),e.emit("video:loadedmetadata",{type:"loadedmetadata"}),e.emit("video:durationchange",{type:"durationchange"}),e.emit("video:loadeddata",{type:"loadeddata"}),e.emit("video:canplay",{type:"canplay"}),e.emit("video:canplaythrough",{type:"canplaythrough"})}return l(u,"duration",{get:()=>y.duration}),l(u,"videoWidth",{get:()=>y.videoWidth}),l(u,"videoHeight",{get:()=>y.videoHeight}),l(u,"volume",{get:()=>y.volume,set:t=>{y.volume=Math.max(0,Math.min(1,t)),b(),e.emit("video:volumechange",{type:"volumechange"})}}),l(u,"currentTime",{get:()=>y.currentTime,set:t=>{if(y.readyState<4)return;let r=Math.max(0,Math.min(t,y.duration)),s=performance.now();s-g>16&&(g=s,m=r,y.currentTime=r,y.playing||v(r),e.emit("video:timeupdate",{type:"timeupdate"}))}}),l(u,"autoplay",{get:()=>y.autoplay,set:t=>{y.autoplay=t,t&&y.readyState>=4&&u.play()}}),l(u,"src",{get:()=>a.url,set:t=>{a.url=t,E().then(()=>{a.autoplay&&u.play()})}}),l(u,"playbackRate",{get:()=>y.playbackRate,set:t=>{y.playbackRate=Math.max(.25,Math.min(2,t)),p&&p.playbackRate.setValueAtTime(y.playbackRate,r.currentTime),e.emit("video:ratechange",{type:"ratechange"})}}),l(u,"playing",{get:()=>y.playing}),l(u,"paused",{get:()=>y.paused}),l(u,"ended",{get:()=>y.ended}),l(u,"readyState",{get:()=>y.readyState}),l(u,"muted",{get:()=>y.muted,set:t=>{y.muted=t,b(),e.emit("video:volumechange",{type:"volumechange"})}}),l(u,"buffered",{get:()=>({start:()=>0,end:()=>y.buffered,length:1})}),l(u,"play",{value:async()=>!(y.readyState<4)&&(await w(),e.emit("video:play",{type:"play"}),e.emit("video:playing",{type:"playing"}),!0)}),l(u,"pause",{value:()=>{_(),y.playing=!1,y.paused=!0,e.emit("video:pause",{type:"pause"})}}),e.on("destroy",()=>{_(),f&&f.destroy()}),e.on("resize",S),u}}"undefined"!=typeof window&&(window.artplayerProxyWebAV=a)},{"@webav/av-cliper":"b01Rz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],b01Rz:[function(t,e,r){var s,n,a,o,h,l,u,d,f,p,c,m,g,y,_,b,w,v,S,E,U,x,T,A,C,I,B,k,F,R,P,z,L,D,M,O,N,G,Y,W,V,H,X,j,Z,$,K,q,Q,J,tt,te,ti,tr,ts,tn,ta,to,th,tl,tu,td,tf,tp,tc,tm,tg,ty,t_,tb,tw,tv,tS,tE,tU,tx,tT,tA,tC,tI,tB,tk,tF,tR,tP,tz,tL,tD,tM,tO,tN,tG,tY,tW,tV,tH,tX,tj,tZ,t$,tK,tq,tQ,tJ,t0,t1,t2,t3,t6,t8,t4,t5,t9,t7,et,ee,ei,er,es,en,ea,eo,eh,el,eu,ed=t("@parcel/transformer-js/src/esmodule-helpers.js");ed.defineInteropFlag(r),ed.export(r,"AudioClip",()=>iX),ed.export(r,"Combinator",()=>rB),ed.export(r,"DEFAULT_AUDIO_CONF",()=>iC),ed.export(r,"EmbedSubtitlesClip",()=>iQ),ed.export(r,"EventTool",()=>i0),ed.export(r,"ImgClip",()=>iV),ed.export(r,"Log",()=>e5),ed.export(r,"MP4Clip",()=>iz),ed.export(r,"MediaStreamClip",()=>iK),ed.export(r,"OffscreenSprite",()=>rT),ed.export(r,"Rect",()=>rE),ed.export(r,"VisibleSprite",()=>rA),ed.export(r,"adjustAudioDataVolume",()=>iy),ed.export(r,"audioResample",()=>iw),ed.export(r,"autoReadStream",()=>iE),ed.export(r,"concatAudioClip",()=>ij),ed.export(r,"concatFloat32Array",()=>ip),ed.export(r,"concatPCMFragments",()=>ic),ed.export(r,"createChromakey",()=>rv),ed.export(r,"createEl",()=>eE),ed.export(r,"createHLSLoader",()=>rm),ed.export(r,"decodeImg",()=>i_),ed.export(r,"extractPCM4AudioBuffer",()=>ig),ed.export(r,"extractPCM4AudioData",()=>im),ed.export(r,"fastConcatMP4",()=>rt),ed.export(r,"file2stream",()=>i9),ed.export(r,"fixFMP4Duration",()=>ri),ed.export(r,"mixinMP4AndAudio",()=>rr),ed.export(r,"mixinPCM",()=>ib),ed.export(r,"recodemux",()=>i4),ed.export(r,"renderTxt2Img",()=>eU),ed.export(r,"renderTxt2ImgBitmap",()=>ex),ed.export(r,"ringSliceFloat32Array",()=>iS),ed.export(r,"workerTimer",()=>is);var ef=arguments[3],ep=t("718a311db185ef08").Buffer,ec=Object.defineProperty,em=t=>{throw TypeError(t)},eg=(t,e,r)=>e in t?ec(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ey=(t,e,r)=>eg(t,"symbol"!=typeof e?e+"":e,r),e_=(t,e,r)=>e.has(t)||em("Cannot "+r),eb=(t,e,r)=>(e_(t,e,"read from private field"),r?r.call(t):e.get(t)),ew=(t,e,r)=>e.has(t)?em("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ev=(t,e,r,s)=>(e_(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r),eS=(t,e,r)=>(e_(t,e,"access private method"),r);function eE(t){return document.createElement(t)}function eU(t,e){let r=eE("pre");r.style.cssText=`margin: 0; ${e}; visibility: hidden; position: fixed;`,r.textContent=t,document.body.appendChild(r);let{width:s,height:n}=r.getBoundingClientRect();r.remove(),r.style.visibility="visible";let a=new Image;a.width=s,a.height=n;let o=`
${r.outerHTML}
`.replace(/\t/g,"").replace(/#/g,"%23");return a.src=`data:image/svg+xml;charset=utf-8,${o}`,a}async function ex(t,e){let r=eU(t,e);await new Promise(t=>{r.onload=t});let s=new OffscreenCanvas(r.width,r.height),n=s.getContext("2d");return null==n||n.drawImage(r,0,0,r.width,r.height),await createImageBitmap(s)}var eT=t=>{throw TypeError(t)},eA=(t,e,r)=>e.has(t)||eT("Cannot "+r),eC=(t,e,r)=>(eA(t,e,"read from private field"),r?r.call(t):e.get(t)),eI=(t,e,r)=>e.has(t)?eT("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),eB=(t,e,r,s)=>(eA(t,e,"write to private field"),e.set(t,r),r);let ek="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHUobil7aWYobj09PSIvIilyZXR1cm57cGFyZW50Om51bGwsbmFtZToiIn07Y29uc3QgZT1uLnNwbGl0KCIvIikuZmlsdGVyKGk9PmkubGVuZ3RoPjApO2lmKGUubGVuZ3RoPT09MCl0aHJvdyBFcnJvcigiSW52YWxpZCBwYXRoIik7Y29uc3QgYT1lW2UubGVuZ3RoLTFdLHI9Ii8iK2Uuc2xpY2UoMCwtMSkuam9pbigiLyIpO3JldHVybntuYW1lOmEscGFyZW50OnJ9fWFzeW5jIGZ1bmN0aW9uIHcobixlKXtjb25zdHtwYXJlbnQ6YSxuYW1lOnJ9PXUobik7aWYoYT09bnVsbClyZXR1cm4gYXdhaXQgbmF2aWdhdG9yLnN0b3JhZ2UuZ2V0RGlyZWN0b3J5KCk7Y29uc3QgaT1hLnNwbGl0KCIvIikuZmlsdGVyKHQ9PnQubGVuZ3RoPjApO3RyeXtsZXQgdD1hd2FpdCBuYXZpZ2F0b3Iuc3RvcmFnZS5nZXREaXJlY3RvcnkoKTtmb3IoY29uc3QgcyBvZiBpKXQ9YXdhaXQgdC5nZXREaXJlY3RvcnlIYW5kbGUocyx7Y3JlYXRlOmUuY3JlYXRlfSk7aWYoZS5pc0ZpbGUpcmV0dXJuIGF3YWl0IHQuZ2V0RmlsZUhhbmRsZShyLHtjcmVhdGU6ZS5jcmVhdGV9KX1jYXRjaCh0KXtpZih0Lm5hbWU9PT0iTm90Rm91bmRFcnJvciIpcmV0dXJuIG51bGw7dGhyb3cgdH19Y29uc3QgZj17fTtzZWxmLm9ubWVzc2FnZT1hc3luYyBuPT57dmFyIGk7Y29uc3R7ZXZ0VHlwZTplLGFyZ3M6YX09bi5kYXRhO2xldCByPWZbYS5maWxlSWRdO3RyeXtsZXQgdDtjb25zdCBzPVtdO2lmKGU9PT0icmVnaXN0ZXIiKXtjb25zdCBsPWF3YWl0IHcoYS5maWxlUGF0aCx7Y3JlYXRlOiEwLGlzRmlsZTohMH0pO2lmKGw9PW51bGwpdGhyb3cgRXJyb3IoYG5vdCBmb3VuZCBmaWxlOiAke2EuZmlsZUlkfWApO3I9YXdhaXQgbC5jcmVhdGVTeW5jQWNjZXNzSGFuZGxlKHttb2RlOmEubW9kZX0pLGZbYS5maWxlSWRdPXJ9ZWxzZSBpZihlPT09ImNsb3NlIilhd2FpdCByLmNsb3NlKCksZGVsZXRlIGZbYS5maWxlSWRdO2Vsc2UgaWYoZT09PSJ0cnVuY2F0ZSIpYXdhaXQgci50cnVuY2F0ZShhLm5ld1NpemUpO2Vsc2UgaWYoZT09PSJ3cml0ZSIpe2NvbnN0e2RhdGE6bCxvcHRzOm99PW4uZGF0YS5hcmdzO3Q9YXdhaXQgci53cml0ZShsLG8pfWVsc2UgaWYoZT09PSJyZWFkIil7Y29uc3R7b2Zmc2V0Omwsc2l6ZTpvfT1uLmRhdGEuYXJncyxnPW5ldyBVaW50OEFycmF5KG8pLGQ9YXdhaXQgci5yZWFkKGcse2F0Omx9KSxjPWcuYnVmZmVyO3Q9ZD09PW8/YzooKGk9Yy50cmFuc2Zlcik9PW51bGw/dm9pZCAwOmkuY2FsbChjLGQpKT8/Yy5zbGljZSgwLGQpLHMucHVzaCh0KX1lbHNlIGU9PT0iZ2V0U2l6ZSI/dD1hd2FpdCByLmdldFNpemUoKTplPT09ImZsdXNoIiYmYXdhaXQgci5mbHVzaCgpO3NlbGYucG9zdE1lc3NhZ2Uoe2V2dFR5cGU6ImNhbGxiYWNrIixjYklkOm4uZGF0YS5jYklkLHJldHVyblZhbDp0fSxzKX1jYXRjaCh0KXtjb25zdCBzPXQ7c2VsZi5wb3N0TWVzc2FnZSh7ZXZ0VHlwZToidGhyb3dFcnJvciIsY2JJZDpuLmRhdGEuY2JJZCxlcnJNc2c6cy5uYW1lKyI6ICIrcy5tZXNzYWdlK2AKYCtKU09OLnN0cmluZ2lmeShuLmRhdGEpfSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPW9wZnMtd29ya2VyLUY0UldscWNfLmpzLm1hcAo=",eF="u">typeof self&&self.Blob&&new Blob([Uint8Array.from(atob(ek),t=>t.charCodeAt(0))],{type:"text/javascript;charset=utf-8"});function eR(t){let e;try{if(!(e=eF&&(self.URL||self.webkitURL).createObjectURL(eF)))throw"";let r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;base64,"+ek,{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}async function eP(t,e,r){let s=function(){if(ez.length<3){let t=function(){let t=new eR,e=0,r={};return t.onmessage=({data:t})=>{var e,s;"callback"===t.evtType?null==(e=r[t.cbId])||e.resolve(t.returnVal):"throwError"===t.evtType&&(null==(s=r[t.cbId])||s.reject(Error(t.errMsg))),delete r[t.cbId]},async function(s,n,a=[]){e+=1;let o=new Promise((t,s)=>{r[e]={resolve:t,reject:s}});return t.postMessage({cbId:e,evtType:s,args:n},a),o}}();return ez.push(t),t}{let t=ez[eL];return eL=(eL+1)%ez.length,t}}();return await s("register",{fileId:t,filePath:e,mode:r}),{read:async(e,r)=>await s("read",{fileId:t,offset:e,size:r}),write:async(e,r)=>await s("write",{fileId:t,data:e,opts:r},[ArrayBuffer.isView(e)?e.buffer:e]),close:async()=>await s("close",{fileId:t}),truncate:async e=>await s("truncate",{fileId:t,newSize:e}),getSize:async()=>await s("getSize",{fileId:t}),flush:async()=>await s("flush",{fileId:t})}}let ez=[],eL=0;function eD(t){if("/"===t)return{parent:null,name:""};let e=t.split("/").filter(t=>t.length>0);if(0===e.length)throw Error("Invalid path");return{name:e[e.length-1],parent:"/"+e.slice(0,-1).join("/")}}async function eM(t,e){let{parent:r,name:s}=eD(t);if(null==r)return await navigator.storage.getDirectory();let n=r.split("/").filter(t=>t.length>0);try{let t=await navigator.storage.getDirectory();for(let r of n)t=await t.getDirectoryHandle(r,{create:e.create});return e.isFile?await t.getFileHandle(s,{create:e.create}):await t.getDirectoryHandle(s,{create:e.create})}catch(t){if("NotFoundError"===t.name)return null;throw t}}async function eO(t){let{parent:e,name:r}=eD(t);if(null==e){let t=await navigator.storage.getDirectory();for await(let e of t.keys())await t.removeEntry(e,{recursive:!0});return}let s=await eM(e,{create:!1,isFile:!1});null!=s&&await s.removeEntry(r,{recursive:!0})}function eN(t,e){return`${t}/${e}`.replace("//","/")}function eG(t){return new eY(t)}class eY{constructor(t){eI(this,g),eI(this,y),eI(this,_),eB(this,g,t);let{parent:e,name:r}=eD(t);eB(this,y,r),eB(this,_,e)}get kind(){return"dir"}get name(){return eC(this,y)}get path(){return eC(this,g)}get parent(){return null==eC(this,_)?null:eG(eC(this,_))}async create(){return await eM(eC(this,g),{create:!0,isFile:!1}),eG(eC(this,g))}async exists(){return await eM(eC(this,g),{create:!1,isFile:!1}) instanceof FileSystemDirectoryHandle}async remove(){for(let t of(await this.children()))try{await t.remove()}catch(t){console.warn(t)}try{await eO(eC(this,g))}catch(t){console.warn(t)}}async children(){let t=await eM(eC(this,g),{create:!1,isFile:!1});if(null==t)return[];let e=[];for await(let r of t.values())e.push(("file"===r.kind?eV:eG)(eN(eC(this,g),r.name)));return e}async copyTo(t){if(!await this.exists())throw Error(`dir ${this.path} not exists`);let e=await t.exists()?eG(eN(t.path,this.name)):t;return await e.create(),await Promise.all((await this.children()).map(t=>t.copyTo(e))),e}async moveTo(t){let e=await this.copyTo(t);return await this.remove(),e}}g=/* @__PURE__ */new WeakMap,y=/* @__PURE__ */new WeakMap,_=/* @__PURE__ */new WeakMap;let eW=/* @__PURE__ */new Map;function eV(t,e="rw"){if("rw"===e){let r=eW.get(t)??new e$(t,e);return eW.set(t,r),r}return new e$(t,e)}async function eH(t,e,r={overwrite:!0}){if(e instanceof e$){await eH(t,await e.stream(),r);return}let s=await (t instanceof e$?t:eV(t,"rw")).createWriter();try{if(r.overwrite&&await s.truncate(0),e instanceof ReadableStream){let t=e.getReader();for(;;){let{done:e,value:r}=await t.read();if(e)break;await s.write(r)}}else await s.write(e)}catch(t){throw t}finally{await s.close()}}let eX=0,ej=()=>++eX,eZ=class t{constructor(t,e){eI(this,b),eI(this,w),eI(this,v),eI(this,S),eI(this,E),eI(this,U,0),eI(this,x,/* @__PURE__ */(()=>{let t=null;return()=>(eB(this,U,eC(this,U)+1),t??(t=new Promise(async(e,r)=>{try{let r=await eP(eC(this,E),eC(this,b),eC(this,S));e([r,async()=>{eB(this,U,eC(this,U)-1),eC(this,U)>0||(t=null,await r.close())}])}catch(t){r(t)}})))})()),eI(this,T,!1),eB(this,E,ej()),eB(this,b,t),eB(this,S,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[e]);let{parent:r,name:s}=eD(t);eB(this,v,s),eB(this,w,r)}get kind(){return"file"}get path(){return eC(this,b)}get name(){return eC(this,v)}get parent(){return null==eC(this,w)?null:eG(eC(this,w))}async createWriter(){if("read-only"===eC(this,S))throw Error("file is read-only");if(eC(this,T))throw Error("Other writer have not been closed");eB(this,T,!0);let t=new TextEncoder,[e,r]=await eC(this,x).call(this),s=await e.getSize(),n=!1;return{write:async(r,a={})=>{if(n)throw Error("Writer is closed");let o="string"==typeof r?t.encode(r):r,h=a.at??s;return s=h+o.byteLength,await e.write(o,{at:h})},truncate:async t=>{if(n)throw Error("Writer is closed");await e.truncate(t),s>t&&(s=t)},flush:async()=>{if(n)throw Error("Writer is closed");await e.flush()},close:async()=>{if(n)throw Error("Writer is closed");n=!0,eB(this,T,!1),await r()}}}async createReader(){let[t,e]=await eC(this,x).call(this),r=!1,s=0;return{read:async(e,n={})=>{if(r)throw Error("Reader is closed");let a=n.at??s,o=await t.read(a,e);return s=a+o.byteLength,o},getSize:async()=>{if(r)throw Error("Reader is closed");return await t.getSize()},close:async()=>{r||(r=!0,await e())}}}async text(){return new TextDecoder().decode(await this.arrayBuffer())}async arrayBuffer(){let t=await eM(eC(this,b),{create:!1,isFile:!0});return null==t?new ArrayBuffer(0):(await t.getFile()).arrayBuffer()}async stream(){let t=await this.getOriginFile();return null==t?new ReadableStream({pull:t=>{t.close()}}):t.stream()}async getOriginFile(){var t;return null==(t=await eM(eC(this,b),{create:!1,isFile:!0}))?void 0:t.getFile()}async getSize(){let t=await eM(eC(this,b),{create:!1,isFile:!0});return null==t?0:(await t.getFile()).size}async exists(){return await eM(eC(this,b),{create:!1,isFile:!0}) instanceof FileSystemFileHandle}async remove(){if(eC(this,U))throw Error("exists unclosed reader/writer");await eO(eC(this,b))}async copyTo(e){if(!await this.exists())throw Error(`file ${this.path} not exists`);if(e instanceof t)return eV(e.path)===this?this:(await eH(e.path,this),eV(e.path));if(e instanceof eY)return await this.copyTo(eV(eN(e.path,this.name)));throw Error("Illegal target type")}async moveTo(t){let e=await this.copyTo(t);return await this.remove(),e}};b=/* @__PURE__ */new WeakMap,w=/* @__PURE__ */new WeakMap,v=/* @__PURE__ */new WeakMap,S=/* @__PURE__ */new WeakMap,E=/* @__PURE__ */new WeakMap,U=/* @__PURE__ */new WeakMap,x=/* @__PURE__ */new WeakMap,T=/* @__PURE__ */new WeakMap;let e$=eZ,eK="/.opfs-tools-temp-dir";async function eq(t){try{if("file"===t.kind){if(!await t.exists())return!0;let e=await t.createWriter();await e.truncate(0),await e.close(),await t.remove()}else await t.remove();return!0}catch(t){return console.warn(t),!1}}let eQ=[],eJ=!1;async function e0(){if(null==globalThis.localStorage)return;let t="OPFS_TOOLS_EXPIRES_TMP_FILES";eJ||(eJ=!0,globalThis.addEventListener("unload",()=>{0!==eQ.length&&localStorage.setItem(t,`${localStorage.getItem(t)??""},${eQ.join(",")}`)}));let e=localStorage.getItem(t)??"";for(let t of e.split(","))0!==t.length&&await eq(eV(`${eK}/${t}`))&&(e=e.replace(t,""));localStorage.setItem(t,e.replace(/,{2,}/g,","))}function e1(){let t=`${Math.random().toString().slice(2)}-${Date.now()}`;return eQ.push(t),eV(`${eK}/${t}`)}!async function(){var t;!0===globalThis.__opfs_tools_tmpfile_init__||(globalThis.__opfs_tools_tmpfile_init__=!0,null==globalThis.FileSystemDirectoryHandle||null==globalThis.FileSystemFileHandle||(null==(t=globalThis.navigator)?void 0:t.storage.getDirectory)==null||(setInterval(async()=>{for(let t of(await eG(eK).children())){let e=/^\d+-(\d+)$/.exec(t.name);(null==e||Date.now()-Number(e[1])>2592e5)&&await eq(t)}},6e4),await e0()))}();let e2=1,e3=e1(),e6=null,e8=["debug","info","warn","error"].reduce((t,e,r)=>Object.assign(t,{[e]:(...t)=>{e2<=r&&(console[e](...t),null==e6||e6.write(`[${e}][${function(){let t=/* @__PURE__ */new Date;return`${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}.${t.getMilliseconds()}`}()}] ${t.map(t=>t instanceof Error?String(t):"object"==typeof t?JSON.stringify(t,(t,e)=>e instanceof Error?String(e):e):String(t)).join(" ")} `))}}),{}),e4=/* @__PURE__ */new Map,e5={setLogLevel:t=>{e2=e4.get(t)??1},...e8,create:t=>Object.fromEntries(Object.entries(e8).map(([e,r])=>[e,(...e)=>r(t,...e)])),dump:async()=>(await e7,await (null==e6?void 0:e6.flush()),await e3.text())};async function e9(){try{e6=await e3.createWriter(),e5.info(navigator.userAgent),e5.info("date: "+/* @__PURE__ */new Date().toLocaleDateString())}catch(t){if(!(t instanceof Error))throw t;if(t.message.includes("createSyncAccessHandle is not a function"))console.warn(t);else throw t}}e4.set(e5.debug,0),e4.set(e5.info,1),e4.set(e5.warn,2),e4.set(e5.error,3);let e7=null==globalThis.navigator?null:e9(),it=()=>{let t;self.onmessage=e=>{"start"===e.data.event&&(self.clearInterval(t),t=self.setInterval(()=>{self.postMessage({})},16.6)),"stop"===e.data.event&&self.clearInterval(t)}},ie=/* @__PURE__ */new Map,ii=1,ir=null;null!=globalThis.Worker&&((ir=(()=>{let t=new Blob([`(${it.toString()})()`]);return new Worker(URL.createObjectURL(t))})()).onmessage=()=>{for(let[t,e]of(ii+=1,ie))if(ii%t==0)for(let t of e)t()});let is=(t,e)=>{let r=Math.round(e/16.6),s=ie.get(r)??/* @__PURE__ */new Set;return s.add(t),ie.set(r,s),1===ie.size&&1===s.size&&(null==ir||ir.postMessage({event:"start"})),()=>{s.delete(t),0===s.size&&ie.delete(r),0===ie.size&&(ii=0,null==ir||ir.postMessage({event:"stop"}))}};class ia{constructor(t,e,r){var s;this.length_=t,this.scaleFactor_=(t-1)/e,this.interpolate=this.cubic,"point"===r.method?this.interpolate=this.point:"linear"===r.method?this.interpolate=this.linear:"sinc"===r.method&&(this.interpolate=this.sinc),this.tangentFactor_=1-Math.max(0,Math.min(1,r.tension||0)),this.sincFilterSize_=r.sincFilterSize||1,this.kernel_=(s=r.sincWindow||io,function(t){return(0===t?1:Math.sin(Math.PI*t)/(Math.PI*t))*s(t)})}point(t,e){return this.getClippedInput_(Math.round(this.scaleFactor_*t),e)}linear(t,e){let r=Math.floor(t=this.scaleFactor_*t);return(1-(t-=r))*this.getClippedInput_(r,e)+t*this.getClippedInput_(r+1,e)}cubic(t,e){let r=Math.floor(t=this.scaleFactor_*t),s=[this.getTangent_(r,e),this.getTangent_(r+1,e)],n=[this.getClippedInput_(r,e),this.getClippedInput_(r+1,e)],a=(t-=r)*t,o=t*a;return(2*o-3*a+1)*n[0]+(o-2*a+t)*s[0]+(-2*o+3*a)*n[1]+(o-a)*s[1]}sinc(t,e){let r=Math.floor(t=this.scaleFactor_*t),s=r-this.sincFilterSize_+1,n=r+this.sincFilterSize_,a=0;for(let r=s;r<=n;r++)a+=this.kernel_(t-r)*this.getClippedInput_(r,e);return a}getTangent_(t,e){return this.tangentFactor_*(this.getClippedInput_(t+1,e)-this.getClippedInput_(t-1,e))/2}getClippedInput_(t,e){return 0<=t&&tt.length).reduce((t,e)=>t+e)),r=0;for(let s of t)e.set(s,r),r+=s.length;return e}function ic(t){let e=[];for(let r=0;rnew Float32Array(r));for(let n=0;nt.getChannelData(r))}function iy(t,e){let r=new Float32Array(ip(im(t))).map(t=>t*e),s=new AudioData({sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels,timestamp:t.timestamp,format:t.format,numberOfFrames:t.numberOfFrames,data:r});return t.close(),s}async function i_(t,e){var r;let s=new ImageDecoder({type:e,data:t});await Promise.all([s.completed,s.tracks.ready]);let n=(null==(r=s.tracks.selectedTrack)?void 0:r.frameCount)??1,a=[];for(let t=0;t{var e;return(null==(e=t[0])?void 0:e.length)??0})),n=new Float32Array(2*s);for(let a=0;anew Float32Array(0));if(0===s)return n;let a=Math.max(...t.map(t=>t.length));if(0===a)return n;if(null==globalThis.OfflineAudioContext)return t.map(t=>new Float32Array(function(t,e,r,s={}){let n=(r-e)/e+1,a=new Float64Array(t.length*n);s.method=s.method||"cubic";let o=new ia(t.length,a.length,{method:s.method,tension:s.tension||0,sincFilterSize:s.sincFilterSize||6,sincWindow:s.sincWindow||void 0});if(void 0===s.LPF&&(s.LPF=ih[s.method]),s.LPF){s.LPFType=s.LPFType||"IIR";let n=iu[s.LPFType];r>e?function(t,e,r,s){for(let n=0,a=e.length;n=0;t--)e[t]=s.filter(e[t])}(t,a,o,new n(s.LPFOrder||il[s.LPFType],r,e/2)):function(t,e,r,s){for(let e=0,r=t.length;e=0;e--)t[e]=s.filter(t[e]);id(t,e,r)}(t,a,o,new n(s.LPFOrder||il[s.LPFType],e,r/2))}else id(t,a,o);return a}(t,e,r.rate,{method:"sinc",LPF:!1})));let o=new globalThis.OfflineAudioContext(r.chanCount,a*r.rate/e,r.rate),h=o.createBufferSource(),l=o.createBuffer(s,a,e);return t.forEach((t,e)=>l.copyToChannel(t,e)),h.buffer=l,h.connect(o.destination),h.start(),ig(await o.startRendering())}function iv(t){return new Promise(e=>{let r=is(()=>{r(),e()},t)})}function iS(t,e,r){let s=r-e,n=new Float32Array(s),a=0;for(;a{r=!0}}var iU="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof ef?ef:"u">typeof self?self:{};function ix(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var iT={};(s=/* @__PURE__ */new Date,n=4,a={setLogLevel:function(t){t==this.debug?n=1:t==this.info?n=2:t==this.warn?n=3:(this.error,n=4)},debug:function(t,e){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},log:function(t,e){this.debug(t.msg)},info:function(t,e){2>=n&&console.info("["+a.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},warn:function(t,e){3>=n&&console.warn("["+a.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},error:function(t,e){4>=n&&console.error("["+a.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)}}).getDurationString=function(t,e){function r(t,e){for(var r=(""+t).split(".");r[0].length0))return"(empty)";for(var r="",s=0;s0&&(r+=","),r+="["+a.getDurationString(t.start(s))+","+a.getDurationString(t.end(s))+"]";return r},iT.Log=a,(o=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0}).prototype.getPosition=function(){return this.position},o.prototype.getEndPosition=function(){return this.buffer.byteLength},o.prototype.getLength=function(){return this.buffer.byteLength},o.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},o.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},o.prototype.readAnyInt=function(t,e){var r=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:r=e?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=e?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16|this.dataview.getUint8(this.position+1)<<8|this.dataview.getUint8(this.position+2);break;case 4:r=e?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32|this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,r}throw"Not enough bytes in buffer"},o.prototype.readUint8=function(){return this.readAnyInt(1,!1)},o.prototype.readUint16=function(){return this.readAnyInt(2,!1)},o.prototype.readUint24=function(){return this.readAnyInt(3,!1)},o.prototype.readUint32=function(){return this.readAnyInt(4,!1)},o.prototype.readUint64=function(){return this.readAnyInt(8,!1)},o.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",r=0;rthis._byteLength&&(this._byteLength=e);return}for(r<1&&(r=1);e>r;)r*=2;var s=new ArrayBuffer(r),n=new Uint8Array(this._buffer);new Uint8Array(s,0,n.length).set(n),this.buffer=s,this._byteLength=e}},h.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},h.BIG_ENDIAN=!1,h.LITTLE_ENDIAN=!0,h.prototype._byteLength=0,Object.defineProperty(h.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(h.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(h.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(h.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),h.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},h.prototype.isEof=function(){return this.position>=this._byteLength},h.prototype.mapUint8Array=function(t){this._realloc(1*t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},h.prototype.readInt32Array=function(t,e){var r=new Int32Array(t=t??this.byteLength-this.position/4);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readInt16Array=function(t,e){var r=new Int16Array(t=t??this.byteLength-this.position/2);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readInt8Array=function(t){var e=new Int8Array(t=t??this.byteLength-this.position);return h.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},h.prototype.readUint32Array=function(t,e){var r=new Uint32Array(t=t??this.byteLength-this.position/4);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readUint16Array=function(t,e){var r=new Uint16Array(t=t??this.byteLength-this.position/2);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readUint8Array=function(t){var e=new Uint8Array(t=t??this.byteLength-this.position);return h.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},h.prototype.readFloat64Array=function(t,e){var r=new Float64Array(t=t??this.byteLength-this.position/8);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readFloat32Array=function(t,e){var r=new Float32Array(t=t??this.byteLength-this.position/4);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,t??this.endianness);return this.position+=4,e},h.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,t??this.endianness);return this.position+=2,e},h.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},h.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,t??this.endianness);return this.position+=4,e},h.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,t??this.endianness);return this.position+=2,e},h.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},h.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,t??this.endianness);return this.position+=4,e},h.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,t??this.endianness);return this.position+=8,e},h.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,h.memcpy=function(t,e,r,s,n){var a=new Uint8Array(t,e,n),o=new Uint8Array(r,s,n);a.set(o)},h.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},h.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},h.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;rn;s--,n++){var a=e[n];e[n]=e[s],e[s]=a}return t},h.prototype.failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=[],r=0;r>16),this.writeUint8((65280&t)>>8),this.writeUint8(255&t)},h.prototype.adjustUint32=function(t,e){var r=this.position;this.seek(t),this.writeUint32(e),this.seek(r)},h.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=4*t,r},h.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=2*t,r},h.prototype.mapInt8Array=function(t){this._realloc(1*t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},h.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=4*t,r},h.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=2*t,r},h.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=8*t,r},h.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=4*t,r},(l=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)}).prototype=new h(new ArrayBuffer,0,h.BIG_ENDIAN),l.prototype.initialized=function(){var t;return this.bufferIndex>-1||(this.buffers.length>0?0===(t=this.buffers[0]).fileStart?(this.buffer=t,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(t,e){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r.buffer},l.prototype.reduceBuffer=function(t,e,r){var s;return(s=new Uint8Array(r)).set(new Uint8Array(t,e,r)),s.buffer.fileStart=t.fileStart+e,s.buffer.usedBytes=0,s.buffer},l.prototype.insertBuffer=function(t){for(var e=!0,r=0;rs.byteLength){this.buffers.splice(r,1),r--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring")}else t.fileStart+t.byteLength<=s.fileStart||(t=this.reduceBuffer(t,0,s.fileStart-t.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(r,0,t),0===r&&(this.buffer=t);e=!1;break}if(t.fileStart0)t=this.reduceBuffer(t,n,o);else{e=!1;break}}}e&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),0===r&&(this.buffer=t))},l.prototype.logBufferLevel=function(t){var e,r,s,n,o,h=[],l="";for(s=0,n=0,e=0;e0&&(l+=o.end-1+"]"),(t?a.info:a.debug)("MultiBufferStream",0===this.buffers.length?"No more buffer in memory":""+this.buffers.length+" stored buffer(s) ("+s+"/"+n+" bytes), continuous ranges: "+l)},l.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0},l.prototype.findPosition=function(t,e,r){var s,n=null,o=-1;for(s=!0===t?0:this.bufferIndex;s=e?(a.debug("MultiBufferStream","Found position in existing buffer #"+o),o):-1},l.prototype.findEndContiguousBuf=function(t){var e,r,s,n=void 0!==t?t:this.bufferIndex;if(r=this.buffers[n],this.buffers.length>n+1)for(e=n+1;e>3;return 31===s&&r.data.length>=2&&(s=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),s},r.DecoderConfigDescriptor=function(t){r.Descriptor.call(this,4,t)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)},r.DecoderSpecificInfo=function(t){r.Descriptor.call(this,5,t)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(t){r.Descriptor.call(this,6,t)},r.SLConfigDescriptor.prototype=new r.Descriptor,this},iT.MPEG4DescriptorParser=u,(d={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){d.FullBox.prototype=new d.Box,d.ContainerBox.prototype=new d.Box,d.SampleEntry.prototype=new d.Box,d.TrackGroupTypeBox.prototype=new d.FullBox,d.BASIC_BOXES.forEach(function(t){d.createBoxCtor(t)}),d.FULL_BOXES.forEach(function(t){d.createFullBoxCtor(t)}),d.CONTAINER_BOXES.forEach(function(t){d.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,r){this.type=t,this.size=e,this.uuid=r},FullBox:function(t,e,r){d.Box.call(this,t,e,r),this.flags=0,this.version=0},ContainerBox:function(t,e,r){d.Box.call(this,t,e,r),this.boxes=[]},SampleEntry:function(t,e,r,s){d.ContainerBox.call(this,t,e),this.hdr_size=r,this.start=s},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){d.FullBox.call(this,t,e)},createBoxCtor:function(t,e){d.boxCodes.push(t),d[t+"Box"]=function(e){d.Box.call(this,t,e)},d[t+"Box"].prototype=new d.Box,e&&(d[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){d[t+"Box"]=function(e){d.FullBox.call(this,t,e)},d[t+"Box"].prototype=new d.FullBox,d[t+"Box"].prototype.parse=function(t){this.parseFullHeader(t),e&&e.call(this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,r=0;rr?(a.error("BoxParser","Box of type '"+f+"' has a size "+u+" greater than its container size "+r),{code:d.ERR_NOT_ENOUGH_DATA,type:f,size:u,hdr_size:l,start:h}):0!==u&&h+u>t.getEndPosition()?(t.seek(h),a.info("BoxParser","Not enough data in stream to parse the entire '"+f+"' box"),{code:d.ERR_NOT_ENOUGH_DATA,type:f,size:u,hdr_size:l,start:h}):e?{code:d.OK,type:f,size:u,hdr_size:l,start:h}:(d[f+"Box"]?s=new d[f+"Box"](u):"uuid"!==f?(a.warn("BoxParser","Unknown box type: '"+f+"'"),(s=new d.Box(f,u)).has_unparsed_data=!0):d.UUIDBoxes[o]?s=new d.UUIDBoxes[o](u):(a.warn("BoxParser","Unknown uuid type: '"+o+"'"),(s=new d.Box(f,u)).uuid=o,s.has_unparsed_data=!0),s.hdr_size=l,s.start=h,s.write===d.Box.prototype.write&&"mdat"!==s.type&&(a.info("BoxParser","'"+p+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(t)),s.parse(t),(n=t.getPosition()-(s.start+s.size))<0?(a.warn("BoxParser","Parsing of box '"+p+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),t.seek(s.start+s.size)):n>0&&(a.error("BoxParser","Parsing of box '"+p+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),0!==s.size&&t.seek(s.start+s.size)),{code:d.OK,box:s,size:s.size})},d.Box.prototype.parse=function(t){"mdat"!=this.type?this.data=t.readUint8Array(this.size-this.hdr_size):0===this.size?t.seek(t.getEndPosition()):t.seek(this.start+this.size)},d.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size},d.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size},d.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4},d.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},d.ContainerBox.prototype.parse=function(t){for(var e,r;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},d.SAMPLE_ENTRY_TYPE_VISUAL="Visual",d.SAMPLE_ENTRY_TYPE_AUDIO="Audio",d.SAMPLE_ENTRY_TYPE_HINT="Hint",d.SAMPLE_ENTRY_TYPE_METADATA="Metadata",d.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",d.SAMPLE_ENTRY_TYPE_SYSTEM="System",d.SAMPLE_ENTRY_TYPE_TEXT="Text",d.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8},d.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},d.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size},d.SampleEntry.prototype.parseFooter=function(t){d.ContainerBox.prototype.parse.call(this,t)},d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_HINT),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_METADATA),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SUBTITLE),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SYSTEM),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,this.parseFooter(t)}),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT,"enct"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_METADATA,"encm"),d.createBoxCtor("a1lx",function(t){var e=((1&(1&t.readUint8()))+1)*16;this.layer_size=[];for(var r=0;r<3;r++)16==e?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()}),d.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()}),d.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}),d.createBoxCtor("av1C",function(t){var e=t.readUint8();if(this.version=127&e,1!==this.version){a.error("av1C version "+this.version+" not supported");return}if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=31&e,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=3&e,e=t.readUint8(),this.reserved_1=e>>5&7,0!==this.reserved_1){a.error("av1C reserved_1 parsing problem");return}if(this.initial_presentation_delay_present=e>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&e;else if(this.reserved_2=15&e,0!==this.reserved_2){a.error("av1C reserved_2 parsing problem");return}var r=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(r)}),d.createBoxCtor("avcC",function(t){var e,r;for(this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=3&t.readUint8(),this.nb_SPS_nalus=31&t.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],e=0;e0&&(this.ext=t.readUint8Array(r))}),d.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}),d.createFullBoxCtor("ccst",function(t){var e=t.readUint8();this.all_ref_pics_intra=(128&e)==128,this.intra_pred_used=(64&e)==64,this.max_ref_per_pic=(63&e)>>2,t.readUint24()}),d.createBoxCtor("cdef",function(t){var e;for(this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],e=0;e=32768&&this.component_type_urls.push(t.readCString())}}),d.createFullBoxCtor("co64",function(t){var e,r;if(e=t.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else"rICC"===this.colour_type?this.ICC_profile=t.readUint8Array(this.size-4):"prof"===this.colour_type&&(this.ICC_profile=t.readUint8Array(this.size-4))}),d.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()}),d.createFullBoxCtor("cslg",function(t){0===this.version&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())}),d.createFullBoxCtor("ctts",function(t){var e,r;if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=e>>1&31,this.bsmod=(1&e)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|s>>5&7}),d.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=7&e,this.ind_subs=[];for(var r=0;r>6,s.bsid=n>>1&31,s.bsmod=(1&n)<<4|a>>4&15,s.acmod=a>>1&7,s.lfeon=1&a,s.num_dep_sub=o>>1&15,s.num_dep_sub>0&&(s.chan_loc=(1&o)<<8|t.readUint8())}}),d.createFullBoxCtor("dfLa",function(t){var e=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(t);;){var s=t.readUint8(),n=Math.min(127&s,r.length-1);if(n?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),e.push(r[n]),128&s)break}this.numMetadataBlocks=e.length+" ("+e.join(", ")+")"}),d.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()}),d.createBoxCtor("dmax",function(t){this.time=t.readUint32()}),d.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()}),d.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;etypeof u){var r=new u;this.esd=r.parseOneDescriptor(new h(e.buffer,0,h.BIG_ENDIAN))}}),d.createBoxCtor("fiel",function(t){this.fieldCount=t.readUint8(),this.fieldOrdering=t.readUint8()}),d.createBoxCtor("frma",function(t){this.data_format=t.readString(4)}),d.createBoxCtor("ftyp",function(t){var e=this.size-this.hdr_size;this.major_brand=t.readString(4),this.minor_version=t.readUint32(),e-=8,this.compatible_brands=[];for(var r=0;e>=4;)this.compatible_brands[r]=t.readString(4),e-=4,r++}),d.createFullBoxCtor("hdlr",function(t){0===this.version&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))}),d.createBoxCtor("hvcC",function(t){this.configurationVersion=t.readUint8(),n=t.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),this.chroma_format_idc=3&t.readUint8(),this.bit_depth_luma_minus8=7&t.readUint8(),this.bit_depth_chroma_minus8=7&t.readUint8(),this.avgFrameRate=t.readUint16(),n=t.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var e,r,s,n,a=t.readUint8();for(e=0;e>7,o.nalu_type=63&n;var h=t.readUint16();for(r=0;r>4&15,this.length_size=15&e,e=t.readUint8(),this.base_offset_size=e>>4&15,1===this.version||2===this.version?this.index_size=15&e:this.index_size=0,this.items=[];var e,r=0;if(this.version<2)r=t.readUint16();else if(2===this.version)r=t.readUint32();else throw"version of iloc box not supported";for(var s=0;s>7,this.axis=1&e}),d.createFullBoxCtor("infe",function(t){if((0===this.version||1===this.version)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),1===this.version){this.extension_type=t.readString(4),a.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(2===this.version?this.item_ID=t.readUint16():3===this.version&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),"mime"===this.item_type?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):"uri "===this.item_type&&(this.item_uri_type=t.readCString()))}),d.createFullBoxCtor("ipma",function(t){var e,r;for(entry_count=t.readUint32(),this.associations=[],e=0;e>7==1,1&this.flags?o.property_index=(127&a)<<8|t.readUint8():o.property_index=127&a}}}),d.createFullBoxCtor("iref",function(t){var e,r;for(this.references=[];t.getPosition()>7,s.assignment_type=127&n,s.assignment_type){case 0:s.grouping_type=t.readString(4);break;case 1:s.grouping_type=t.readString(4),s.grouping_type_parameter=t.readUint32();break;case 2:case 3:break;case 4:s.sub_track_id=t.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}}),d.createBoxCtor("lsel",function(t){this.layer_id=t.readUint16()}),d.createBoxCtor("maxr",function(t){this.period=t.readUint32(),this.bytes=t.readUint32()}),d.createBoxCtor("mdcv",function(t){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=t.readUint16(),this.display_primaries[0].y=t.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=t.readUint16(),this.display_primaries[1].y=t.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=t.readUint16(),this.display_primaries[2].y=t.readUint16(),this.white_point={},this.white_point.x=t.readUint16(),this.white_point.y=t.readUint16(),this.max_display_mastering_luminance=t.readUint32(),this.min_display_mastering_luminance=t.readUint32()}),d.createFullBoxCtor("mdhd",function(t){1==this.version?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.parseLanguage(t),t.readUint16()}),d.createFullBoxCtor("mehd",function(t){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=t.readUint64():this.fragment_duration=t.readUint32()}),d.createFullBoxCtor("meta",function(t){this.boxes=[],d.ContainerBox.prototype.parse.call(this,t)}),d.createFullBoxCtor("mfhd",function(t){this.sequence_number=t.readUint32()}),d.createFullBoxCtor("mfro",function(t){this._size=t.readUint32()}),d.createFullBoxCtor("mvhd",function(t){1==this.version?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.rate=t.readUint32(),this.volume=t.readUint16()>>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}),d.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()}),d.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()}),d.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var r=0;r0){var e=t.readUint32();this.kid=[];for(var r=0;r0&&(this.data=t.readUint8Array(s))}),d.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),d.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}),d.createFullBoxCtor("saio",function(t){1&this.flags&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var r=t.readUint8(),s=0;s>7,this.num_leading_samples=127&e}),d.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=15&e,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=d.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}),d.createSampleGroupCtor("stsa",function(t){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=63&e}),d.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7}),d.createSampleGroupCtor("tsas",function(t){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("tscl",function(t){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("vipr",function(t){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),1===this.version?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),r=0;r>6,this.sample_depends_on[s]=e>>4&3,this.sample_is_depended_on[s]=e>>2&3,this.sample_has_redundancy[s]=3&e}),d.createFullBoxCtor("senc"),d.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e,r=t.readUint32(),s=0;s>31&1,s.referenced_size=2147483647&n,s.subsegment_duration=t.readUint32(),n=t.readUint32(),s.starts_with_SAP=n>>31&1,s.SAP_type=n>>28&7,s.SAP_delta_time=268435455&n}}),d.SingleItemTypeReferenceBox=function(t,e,r,s){d.Box.call(this,t,e),this.hdr_size=r,this.start=s},d.SingleItemTypeReferenceBox.prototype=new d.Box,d.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[e+1]=15&s}else if(8===this.field_size)for(e=0;e0)for(r=0;r>4&15,this.default_skip_byte_block=15&e}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=d.parseHex16(t),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}),d.createFullBoxCtor("tfdt",function(t){1==this.version?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}),d.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}),d.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=3&e,this.entries=[];for(var r=t.readUint32(),s=0;s>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}),d.createBoxCtor("tmax",function(t){this.time=t.readUint32()}),d.createBoxCtor("tmin",function(t){this.time=t.readUint32()}),d.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()}),d.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()}),d.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()}),d.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()},d.createTrackGroupCtor("msrc"),d.TrackReferenceTypeBox=function(t,e,r,s){d.Box.call(this,t,e),this.hdr_size=r,this.start=s},d.TrackReferenceTypeBox.prototype=new d.Box,d.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)},d.trefBox.prototype.parse=function(t){for(var e,r;t.getPosition()e&&this.flags&d.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&d.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=t.readUint8(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}),d.createFullBoxCtor("url ",function(t){1!==this.flags&&(this.location=t.readCString())}),d.createFullBoxCtor("urn ",function(t){this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}),d.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),d.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=d.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}),d.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),d.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=d.parseHex16(t)}),d.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=1&e,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8()):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=1&e),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}),d.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)}),d.createFullBoxCtor("vvcC",function(t){var e,r,s={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){this.held_bits=t.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(t){this.held_bits=t.readUint16(),this.num_held_bits=16},extract_bits:function(t){var e=this.held_bits>>this.num_held_bits-t&(1<1){for(s.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=s.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)s.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<"u"||null===e?e=2:e;r.length>=1;e+=d.decimalToHex(s,0)+".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var n=!1,a="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||n)&&(a="."+d.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+a,n=!0);e+=a}return e},d.vvc1SampleEntry.prototype.getCodec=d.vvi1SampleEntry.prototype.getCodec=function(){var t,e=d.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){e+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?e+=".H":e+=".L",e+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var s,n,a=[];for(n=0|this.vvcC.ptl_frame_only_constraint<<7|this.vvcC.ptl_multilayer_enabled<<6,t=0;t>2&63,a.push(n),n&&(s=t),n=this.vvcC.general_constraint_info[t]>>2&3;if(void 0===s)r=".CA";else{r=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",h=0,l=0;for(t=0;t<=s;++t)for(h=h<<8|a[t],l+=8;l>=5;)r+=o[h>>l-5&31],l-=5,h&=(1<4294967296&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>4294967296?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),"uuid"===this.type&&t.writeUint8Array(this.uuid),this.size>4294967296&&t.writeUint64(this.size)},d.FullBox.prototype.writeHeader=function(t){this.size+=4,d.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)},d.Box.prototype.write=function(t){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))},d.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+14294967295?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(t),1===this.version?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)},d.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&d.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&d.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&d.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&d.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&d.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)},d.tkhdBox.prototype.write=function(t){this.version=0,this.size=80,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)},d.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)},d.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&d.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&d.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&d.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&d.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&d.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&d.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&d.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&d.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)){if(t[r]instanceof d.Box||e[r]instanceof d.Box||typeof t[r]>"u"||typeof e[r]>"u"||"function"==typeof t[r]||"function"==typeof e[r]||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||d.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;if(t[r]!==e[r])return!1}return!0},d.boxEqual=function(t,e){if(!d.boxEqualFields(t,e))return!1;for(var r=0;r1)for(e=1;etypeof DOMParser&&(r.document=new DOMParser().parseFromString(r.documentString,"application/xml")),r},(p=function(){}).prototype.parseSample=function(t){return new o(t.data.buffer).readString(t.data.length)},p.prototype.parseConfig=function(t){var e=new o(t.buffer);return e.readUint32(),e.readCString()},iT.XMLSubtitlein4Parser=f,iT.Textin4Parser=p,(c=function(t){this.stream=t||new l,this.boxes=[],this.mdats=[],this.moofs=[],this.isProgressive=!1,this.moovStartFound=!1,this.onMoovStart=null,this.moovStartSent=!1,this.onReady=null,this.readySent=!1,this.onSegment=null,this.onSamples=null,this.onError=null,this.sampleListBuilt=!1,this.fragmentedTracks=[],this.extractedTracks=[],this.isFragmentationInitialized=!1,this.sampleProcessingStarted=!1,this.nextMoofNumber=0,this.itemListBuilt=!1,this.onSidx=null,this.sidxSent=!1}).prototype.setSegmentOptions=function(t,e,r){var s=this.getTrackById(t);if(s){var n={};this.fragmentedTracks.push(n),n.id=t,n.user=e,n.trak=s,s.nextSample=0,n.segmentStream=null,n.nb_samples=1e3,n.rapAlignement=!0,r&&(r.nbSamples&&(n.nb_samples=r.nbSamples),r.rapAlignement&&(n.rapAlignement=r.rapAlignement))}},c.prototype.unsetSegmentOptions=function(t){for(var e=-1,r=0;r-1&&this.fragmentedTracks.splice(e,1)},c.prototype.setExtractionOptions=function(t,e,r){var s=this.getTrackById(t);if(s){var n={};this.extractedTracks.push(n),n.id=t,n.user=e,n.trak=s,s.nextSample=0,n.nb_samples=1e3,n.samples=[],r&&r.nbSamples&&(n.nb_samples=r.nbSamples)}},c.prototype.unsetExtractionOptions=function(t){for(var e=-1,r=0;r-1&&this.extractedTracks.splice(e,1)},c.prototype.parse=function(){var t,e,r;if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else if(this.saveParsePosition&&this.saveParsePosition(),(e=d.parseOneBox(this.stream,!1)).code===d.ERR_NOT_ENOUGH_DATA){if(!this.processIncompleteBox)return;if(this.processIncompleteBox(e))continue;return}else{switch(t="uuid"!==(r=e.box).type?r.type:r.uuid,this.boxes.push(r),t){case"mdat":this.mdats.push(r);break;case"moof":this.moofs.push(r);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[t]&&a.warn("ISOFile","Duplicate Box of type: "+t+", overriding previous occurrence"),this[t]=r}this.updateUsedBytes&&this.updateUsedBytes(r,e)}},c.prototype.checkBuffer=function(t){if(null==t)throw"Buffer must be defined and non empty";if(void 0===t.fileStart)throw"Buffer must have a fileStart property";return 0===t.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},c.prototype.appendBuffer=function(t,e){var r;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},c.prototype.getInfo=function(){var t,e,r,s,n,a,o={},h=/* @__PURE__ */new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(h+1e3*this.moov.mvhd.creation_time),o.modified=new Date(h+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],t=0;t0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',t=0;t=r.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,r.nextSample-s.nb_samples)+","+(r.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,r.nextSample,t||r.nextSample>=r.samples.length),s.segmentStream=null,s!==this.fragmentedTracks[e]))break}}if(null!==this.onSamples)for(e=0;e=r.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+o.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(o.id,o.user,o.samples),o.samples=[],o!==this.extractedTracks[e]))break}}}},c.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null},c.prototype.getBoxes=function(t,e){var r=[];return c._sweep.call(this,t,r,e),r},c._sweep=function(t,e,r){for(var s in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&r)return;c._sweep.call(this.boxes[s],t,e,r)}},c.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);if(e)return e.samples},c.prototype.getTrackSample=function(t,e){var r=this.getTrackById(t);return this.getSample(r,e)},c.prototype.releaseUsedSamples=function(t,e){var r=0,s=this.getTrackById(t);s.lastValidSample||(s.lastValidSample=0);for(var n=s.lastValidSample;nt*n.timescale){u=s-1;break}e&&n.is_sync&&(l=s)}for(e&&(u=l),t=r.samples[u].cts,r.nextSample=u;r.samples[u].alreadyRead===r.samples[u].size&&r.samples[u+1];)u++;return h=r.samples[u].offset+r.samples[u].alreadyRead,a.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+a.getDurationString(t,o)+" and offset: "+h),{offset:h,time:t/o}},c.prototype.getTrackDuration=function(t){var e;return t.samples?((e=t.samples[t.samples.length-1]).cts+e.duration)/e.timescale:1/0},c.prototype.seek=function(t,e){var r,s,n,o=this.moov,h={offset:1/0,time:1/0};if(this.moov){for(n=0;nthis.getTrackDuration(r))&&((s=this.seekTrack(t,e,r)).offset-1){h=l;break}switch(h){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",e.width).set("height",e.height).set("horizresolution",4718592).set("vertresolution",4718592).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var p=new d.avcCBox;p.parse(new o(e.avcDecoderConfigRecord)),a.addBox(p)}else if(e.hevcDecoderConfigRecord){var c=new d.hvcCBox;c.parse(new o(e.hevcDecoderConfigRecord)),a.addBox(c)}break;case"Audio":n.add("smhd").set("balance",e.balance||0),a.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":n.add("sthd"),"stpp"===e.type&&a.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break;default:n.add("nmhd")}e.description&&a.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(t){a.addBox(t)}),n.add("dinf").add("dref").addEntry(new d["url Box"]().set("flags",1));var m=n.add("stbl");return m.add("stsd").addEntry(a),m.add("stts").set("sample_counts",[]).set("sample_deltas",[]),m.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),m.add("stco").set("chunk_offsets",[]),m.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(r),e.id}},d.Box.prototype.computeSize=function(t){var e=t||new h;e.endianness=h.BIG_ENDIAN,this.write(e)},c.prototype.addSample=function(t,e,r){var s=r||{},n={},a=this.getTrackById(t);if(null!==a){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=s.sample_description_index?s.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=e,n.size=e.byteLength,n.alreadyRead=n.size,n.duration=s.duration||1,n.cts=s.cts||0,n.dts=s.dts||0,n.is_sync=s.is_sync||!1,n.is_leading=s.is_leading||0,n.depends_on=s.depends_on||0,n.is_depended_on=s.is_depended_on||0,n.has_redundancy=s.has_redundancy||0,n.degradation_priority=s.degradation_priority||0,n.offset=0,n.subsamples=s.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,void 0===a.first_dts&&(a.first_dts=s.dts),this.processSamples();var o=this.createSingleSampleMoof(n);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),n}},c.prototype.createSingleSampleMoof=function(t){var e=0;e=t.is_sync?33554432:65536;var r=new d.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var s=r.add("traf"),n=this.getTrackById(t.track_id);return s.add("tfhd").set("track_id",t.track_id).set("flags",d.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),s.add("tfdt").set("baseMediaDecodeTime",t.dts-(n.first_dts||0)),s.add("trun").set("flags",d.TRUN_FLAGS_DATA_OFFSET|d.TRUN_FLAGS_DURATION|d.TRUN_FLAGS_SIZE|d.TRUN_FLAGS_FLAGS|d.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),r},c.prototype.lastMoofIndex=0,c.prototype.samplesDataSize=0,c.prototype.resetTables=function(){var t,e,r,s,n,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,t=0;t=2&&(l=n[o].grouping_type+"/0",(h=new u(n[o].grouping_type,0)).is_fragment=!0,e.sample_groups_info[l]||(e.sample_groups_info[l]=h))}else for(o=0;o=2&&(l=s[o].grouping_type+"/0",h=new u(s[o].grouping_type,0),t.sample_groups_info[l]||(t.sample_groups_info[l]=h))},c.setSampleGroupProperties=function(t,e,r,s){var n,a,o;for(n in e.sample_groups=[],s)e.sample_groups[n]={},e.sample_groups[n].grouping_type=s[n].grouping_type,e.sample_groups[n].grouping_type_parameter=s[n].grouping_type_parameter,r>=s[n].last_sample_in_run&&(s[n].last_sample_in_run<0&&(s[n].last_sample_in_run=0),s[n].entry_index++,s[n].entry_index<=s[n].sbgp.entries.length-1&&(s[n].last_sample_in_run+=s[n].sbgp.entries[s[n].entry_index].sample_count)),s[n].entry_index<=s[n].sbgp.entries.length-1?e.sample_groups[n].group_description_index=s[n].sbgp.entries[s[n].entry_index].group_description_index:e.sample_groups[n].group_description_index=-1,0!==e.sample_groups[n].group_description_index&&(o=s[n].fragment_description?s[n].fragment_description:s[n].description,e.sample_groups[n].group_description_index>0?(a=e.sample_groups[n].group_description_index>65535?(e.sample_groups[n].group_description_index>>16)-1:e.sample_groups[n].group_description_index-1,o&&a>=0&&(e.sample_groups[n].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[n].description=o.entries[o.default_group_description_index-1]))},c.process_sdtp=function(t,e,r){e&&(t?(e.is_leading=t.is_leading[r],e.depends_on=t.sample_depends_on[r],e.is_depended_on=t.sample_is_depended_on[r],e.has_redundancy=t.sample_has_redundancy[r]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},c.prototype.buildSampleLists=function(){var t,e;for(t=0;t"u")){for(e=0;ew&&(v++,w<0&&(w=0),w+=a.sample_counts[v]),e>0?(t.samples[e-1].duration=a.sample_deltas[v],t.samples_duration+=t.samples[e-1].duration,A.dts=t.samples[e-1].dts+t.samples[e-1].duration):A.dts=0,o?(e>=S&&(E++,S<0&&(S=0),S+=o.sample_counts[E]),A.cts=t.samples[e].dts+o.sample_offsets[E]):A.cts=A.dts,h?(e==h.sample_numbers[U]-1?(A.is_sync=!0,U++):(A.is_sync=!1,A.degradation_priority=0),u&&u.entries[x].sample_delta+T==e+1&&(A.subsamples=u.entries[x].subsamples,T+=u.entries[x].sample_delta,x++)):A.is_sync=!0,c.process_sdtp(t.mdia.minf.stbl.sdtp,A,A.number),p?A.degradation_priority=p.priority[e]:A.degradation_priority=0,u&&u.entries[x].sample_delta+T==e&&(A.subsamples=u.entries[x].subsamples,T+=u.entries[x].sample_delta),(d.length>0||f.length>0)&&c.setSampleGroupProperties(t,A,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},c.prototype.updateSampleLists=function(){var t,e,r,s,n,a,o,h,l,u,f,p,m,g;if(void 0!==this.moov){for(;this.lastMoofIndex0&&c.initSampleGroups(f,u,u.sbgps,f.mdia.minf.stbl.sgpds,u.sgpds),e=0;e0?m.dts=f.samples[f.samples.length-2].dts+f.samples[f.samples.length-2].duration:(u.tfdt?m.dts=u.tfdt.baseMediaDecodeTime:m.dts=0,f.first_traf_merged=!0),m.cts=m.dts,y.flags&d.TRUN_FLAGS_CTS_OFFSET&&(m.cts=m.dts+y.sample_composition_time_offset[r]),g=o,y.flags&d.TRUN_FLAGS_FLAGS?g=y.sample_flags[r]:0===r&&y.flags&d.TRUN_FLAGS_FIRST_FLAG&&(g=y.first_sample_flags),m.is_sync=!(g>>16&1),m.is_leading=g>>26&3,m.depends_on=g>>24&3,m.is_depended_on=g>>22&3,m.has_redundancy=g>>20&3,m.degradation_priority=65535&g;var _=!!(u.tfhd.flags&d.TFHD_FLAG_BASE_DATA_OFFSET),b=!!(u.tfhd.flags&d.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),w=!!(y.flags&d.TRUN_FLAGS_DATA_OFFSET),v=0;v=_?u.tfhd.base_data_offset:b||0===e?l.start:h,0===e&&0===r?w?m.offset=v+y.data_offset:m.offset=v:m.offset=h,h=m.offset+m.size,(u.sbgps.length>0||u.sgpds.length>0||f.mdia.minf.stbl.sbgps.length>0||f.mdia.minf.stbl.sgpds.length>0)&&c.setSampleGroupProperties(f,m,m.number_in_traf,u.sample_groups_info)}}if(u.subs){f.has_fragment_subsamples=!0;var S=u.first_sample_index;for(e=0;e-1))return null;var o=(r=this.stream.buffers[n]).byteLength-(s.offset+s.alreadyRead-r.fileStart);if(s.size-s.alreadyRead<=o)return a.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-r.fileStart)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),h.memcpy(s.data.buffer,s.alreadyRead,r,s.offset+s.alreadyRead-r.fileStart,s.size-s.alreadyRead),r.usedBytes+=s.size-s.alreadyRead,this.stream.logBufferLevel(),s.alreadyRead=s.size,s;if(0===o)return null;a.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-r.fileStart)+" read size: "+o+" full size: "+s.size+")"),h.memcpy(s.data.buffer,s.alreadyRead,r,s.offset+s.alreadyRead-r.fileStart,o),s.alreadyRead+=o,r.usedBytes+=o,this.stream.logBufferLevel()}},c.prototype.releaseSample=function(t,e){var r=t.samples[e];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},c.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},c.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},c.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=n.ipro.protections[n.iinf.item_infos[t].protection_index-1]),n.iinf.item_infos[t].item_type?r.type=n.iinf.item_infos[t].item_type:r.type="mime",r.content_type=n.iinf.item_infos[t].content_type,r.content_encoding=n.iinf.item_infos[t].content_encoding;if(n.iloc)for(t=0;t0&&f.property_index-1-1))return null;var l=(e=this.stream.buffers[o]).byteLength-(n.offset+n.alreadyRead-e.fileStart);if(!(n.length-n.alreadyRead<=l))return a.debug("ISOFile","Getting item #"+t+" extent #"+s+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+r.size+")"),h.memcpy(r.data.buffer,r.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,l),n.alreadyRead+=l,r.alreadyRead+=l,e.usedBytes+=l,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+t+" extent #"+s+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+r.size+")"),h.memcpy(r.data.buffer,r.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,n.length-n.alreadyRead),e.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return r.alreadyRead===r.size?r:null},c.prototype.releaseItem=function(t){var e=this.items[t];if(!e.data)return 0;this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var r=0;r0?this.moov.traks[t].samples[0].duration:0),e.push(s)}return e},d.Box.prototype.printHeader=function(t){this.size+=8,this.size>4294967296&&(this.size+=8),"uuid"===this.type&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)},d.FullBox.prototype.printHeader=function(t){this.size+=4,d.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)},d.Box.prototype.print=function(t){this.printHeader(t)},d.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)},d.tkhdBox.prototype.print=function(t){d.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)},(m={}).createFile=function(t,e){var r=new c(e);return r.discardMdatData=!(void 0===t||t),r},iT.createFile=m.createFile;let iA=/* @__PURE__ */ix(iT),iC={sampleRate:48e3,channelCount:2,codec:"mp4a.40.2"};function iI(t,e){let r=e.videoTracks[0],s={};if(null!=r){let n=function(t){for(let e of t.mdia.minf.stbl.stsd.entries){let t=e.avcC??e.hvcC??e.vpcC;if(null!=t){let e=new iA.DataStream(void 0,0,iA.DataStream.BIG_ENDIAN);return t.write(e),new Uint8Array(e.buffer.slice(8))}}throw Error("avcC, hvcC or VPX not found")}(t.getTrackById(r.id)).buffer,{descKey:a,type:o}=r.codec.startsWith("avc1")?{descKey:"avcDecoderConfigRecord",type:"avc1"}:r.codec.startsWith("hvc1")?{descKey:"hevcDecoderConfigRecord",type:"hvc1"}:{descKey:"",type:""};""!==a&&(s.videoTrackConf={timescale:r.timescale,duration:r.duration,width:r.video.width,height:r.video.height,brands:e.brands,type:o,[a]:n}),s.videoDecoderConf={codec:r.codec,codedHeight:r.video.height,codedWidth:r.video.width,description:n}}let n=e.audioTracks[0];if(null!=n){let e=iB(t);s.audioTrackConf={timescale:n.timescale,samplerate:n.audio.sample_rate,channel_count:n.audio.channel_count,hdlr:"soun",type:n.codec.startsWith("mp4a")?"mp4a":n.codec,description:iB(t)},s.audioDecoderConf={codec:n.codec.startsWith("mp4a")?iC.codec:n.codec,numberOfChannels:n.audio.channel_count,sampleRate:n.audio.sample_rate,...null==e?{}:function(t){var e;let r=null==(e=t.esd.descs[0])?void 0:e.descs[0];if(null==r)return{};let[s,n]=r.data;return{sampleRate:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][((7&s)<<1)+(n>>7)],numberOfChannels:(127&n)>>3}}(e)}}return s}function iB(t,e="mp4a"){var r;let s=null==(r=t.moov)?void 0:r.traks.map(t=>t.mdia.minf.stbl.stsd.entries).flat().find(({type:t})=>t===e);return null==s?void 0:s.esds}class ik{constructor(){ey(this,"readable"),ey(this,"writable"),ew(this,A,0);let t=iA.createFile(),e=!1;this.readable=new ReadableStream({start:e=>{t.onReady=r=>{var s,n;let a=null==(s=r.videoTracks[0])?void 0:s.id;null!=a&&t.setExtractionOptions(a,"video",{nbSamples:100});let o=null==(n=r.audioTracks[0])?void 0:n.id;null!=o&&t.setExtractionOptions(o,"audio",{nbSamples:100}),e.enqueue({chunkType:"ready",data:{info:r,file:t}}),t.start()};let r={};t.onSamples=(s,n,a)=>{e.enqueue({chunkType:"samples",data:{id:s,type:n,samples:a.map(t=>({...t}))}}),r[s]=(r[s]??0)+a.length,t.releaseUsedSamples(s,r[s])},t.onFlush=()=>{e.close()}},cancel:()=>{t.stop(),e=!0}},{highWaterMark:50}),this.writable=new WritableStream({write:async r=>{if(e){this.writable.abort();return}let s=r.buffer;s.fileStart=eb(this,A),ev(this,A,eb(this,A)+s.byteLength),t.appendBuffer(s)},close:()=>{var e;t.flush(),t.stop(),null==(e=t.onFlush)||e.call(t)}})}}A=new WeakMap;let iF=0;function iR(t){return"file"===t.kind&&t.createReader instanceof Function}let iP=class t{constructor(t,e={audio:!0}){if(ew(this,C,e5.create(`MP4Clip id:${iF++},`)),ey(this,"ready"),ew(this,I,!1),ew(this,B,{duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0}),ew(this,k),ew(this,F,1),ew(this,R,[]),ew(this,P,[]),ew(this,z,null),ew(this,L,null),ew(this,D,{video:null,audio:null}),ew(this,M,{audio:!0}),ey(this,"tickInterceptor",async(t,e)=>e),ew(this,O,new AbortController),!(t instanceof ReadableStream)&&!iR(t)&&!Array.isArray(t.videoSamples))throw Error("Illegal argument");ev(this,M,{...e}),ev(this,F,"object"==typeof e.audio&&"volume"in e.audio?e.audio.volume:1);let r=async t=>(await eH(eb(this,k),t),await eb(this,k).stream());ev(this,k,iR(t)?t:"localFile"in t?t.localFile:e1()),this.ready=(t instanceof ReadableStream?r(t).then(t=>iL(t,eb(this,M))):iR(t)?t.stream().then(t=>iL(t,eb(this,M))):Promise.resolve(t)).then(async({videoSamples:t,audioSamples:e,decoderConf:r})=>{var s,n,a;ev(this,R,t),ev(this,P,e),ev(this,D,r);let{videoFrameFinder:o,audioFrameFinder:h}=(s={video:null==r.video?null:{...r.video,hardwareAcceleration:eb(this,M).__unsafe_hardwareAcceleration__},audio:r.audio},n=await eb(this,k).createReader(),{audioFrameFinder:null==(a=!1!==eb(this,M).audio?eb(this,F):null)||null==s.audio||0===e.length?null:new iM(n,e,s.audio,{volume:a,targetSampleRate:iC.sampleRate}),videoFrameFinder:null==s.video||0===t.length?null:new iD(n,t,s.video)});return ev(this,z,o),ev(this,L,h),ev(this,B,function(t,e,r){let s={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};null!=t.video&&e.length>0&&(s.width=t.video.codedWidth??0,s.height=t.video.codedHeight??0),null!=t.audio&&r.length>0&&(s.audioSampleRate=iC.sampleRate,s.audioChanCount=iC.channelCount);let n=0,a=0;if(e.length>0)for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r.deleted){n=r.cts+r.duration;break}}if(r.length>0){let t=r.at(-1);a=t.cts+t.duration}return s.duration=Math.max(n,a),s}(r,t,e)),eb(this,C).info("MP4Clip meta:",eb(this,B)),{...eb(this,B)}})}get meta(){return{...eb(this,B)}}async tick(t){var e,r;if(t>=eb(this,B).duration)return await this.tickInterceptor(t,{audio:[],state:"done"});let[s,n]=await Promise.all([(null==(e=eb(this,L))?void 0:e.find(t))??[],null==(r=eb(this,z))?void 0:r.find(t)]);return null==n?await this.tickInterceptor(t,{audio:s,state:"success"}):await this.tickInterceptor(t,{video:n,audio:s,state:"success"})}async thumbnails(t=100,e){eb(this,O).abort(),ev(this,O,new AbortController);let r=eb(this,O).signal;await this.ready;let s="generate thumbnails aborted";if(r.aborted)throw Error(s);let{width:n,height:a}=eb(this,B),o=function(t,e,r){let s=new OffscreenCanvas(t,e),n=s.getContext("2d");return async a=>(n.drawImage(a,0,0,t,e),a.close(),await s.convertToBlob(r))}(t,Math.round(t/n*a),{quality:.1,type:"image/png"});return new Promise(async(t,n)=>{let a=[],h=eb(this,D).video;if(null==h||0===eb(this,R).length){l();return}async function l(){r.aborted||t(await Promise.all(a.map(async t=>({ts:t.ts,img:await t.img}))))}function u(t){a.push({ts:t.timestamp,img:o(t)})}r.addEventListener("abort",()=>{n(Error(s))});let{start:d=0,end:f=eb(this,B).duration,step:p}=e??{};if(p){let t=d,e=new iD(await eb(this,k).createReader(),eb(this,R),{...h,hardwareAcceleration:eb(this,M).__unsafe_hardwareAcceleration__});for(;t<=f&&!r.aborted;){let r=await e.find(t);r&&u(r),t+=p}e.destroy(),l()}else await iY(eb(this,R),eb(this,k),h,r,{start:d,end:f},(t,e)=>{u(t),e&&l()})})}async split(e){if(await this.ready,e<=0||e>=eb(this,B).duration)throw Error('"time" out of bounds');let[r,s]=function(t,e){if(0===t.length)return[];let r=0,s=0,n=-1;for(let a=0;a({...t}));for(let t=r;t({...t,cts:t.cts-e}));for(let t of h){if(t.cts>=0)break;t.deleted=!0,t.cts=-1}return[o,h]}(eb(this,R),e),[n,a]=function(t,e){if(0===t.length)return[];let r=-1;for(let s=0;st[s].cts)){r=s;break}if(-1===r)throw Error("Not found audio sample by time");return[t.slice(0,r),t.slice(r).map(t=>({...t,cts:t.cts-e}))]}(eb(this,P),e),o=new t({localFile:eb(this,k),videoSamples:r??[],audioSamples:n??[],decoderConf:eb(this,D)},eb(this,M)),h=new t({localFile:eb(this,k),videoSamples:s??[],audioSamples:a??[],decoderConf:eb(this,D)},eb(this,M));return await Promise.all([o.ready,h.ready]),[o,h]}async clone(){await this.ready;let e=new t({localFile:eb(this,k),videoSamples:[...eb(this,R)],audioSamples:[...eb(this,P)],decoderConf:eb(this,D)},eb(this,M));return await e.ready,e.tickInterceptor=this.tickInterceptor,e}async splitTrack(){await this.ready;let e=[];if(eb(this,R).length>0){let r=new t({localFile:eb(this,k),videoSamples:[...eb(this,R)],audioSamples:[],decoderConf:{video:eb(this,D).video,audio:null}},eb(this,M));await r.ready,r.tickInterceptor=this.tickInterceptor,e.push(r)}if(eb(this,P).length>0){let r=new t({localFile:eb(this,k),videoSamples:[],audioSamples:[...eb(this,P)],decoderConf:{audio:eb(this,D).audio,video:null}},eb(this,M));await r.ready,r.tickInterceptor=this.tickInterceptor,e.push(r)}return e}destroy(){var t,e;eb(this,I)||(eb(this,C).info("MP4Clip destroy"),ev(this,I,!0),null==(t=eb(this,z))||t.destroy(),null==(e=eb(this,L))||e.destroy())}};C=new WeakMap,I=new WeakMap,B=new WeakMap,k=new WeakMap,F=new WeakMap,R=new WeakMap,P=new WeakMap,z=new WeakMap,L=new WeakMap,D=new WeakMap,M=new WeakMap,O=new WeakMap;let iz=iP;async function iL(t,e={}){let r;let s={video:null,audio:null},n=[],a=[];return new Promise(async(h,l)=>{let u=-1,d=-1,f=iE(t.pipeThrough(new ik),{onChunk:async({chunkType:t,data:h})=>{if("ready"===t){r=h.info;let{videoDecoderConf:t,audioDecoderConf:e}=iI(h.file,h.info);s.video=t??null,s.audio=e??null,null==t&&null==e&&(f(),l(Error("MP4Clip must contain at least one video or audio track"))),e5.info("mp4BoxFile moov ready",{...h.info,tracks:null,videoTracks:null,audioTracks:null},s)}else if("samples"===t){if("video"===h.type)for(let t of(-1===u&&(u=h.samples[0].dts),h.samples))n.push(o(t,u,"video"));else if("audio"===h.type&&e.audio)for(let t of(-1===d&&(d=h.samples[0].dts),h.samples))a.push(o(t,d,"audio"))}},onDone:()=>{let t=n.at(-1)??a.at(-1);if(null==r){l(Error("MP4Clip stream is done, but not emit ready"));return}if(null==t){l(Error("MP4Clip stream not contain any sample"));return}let e=n[0];null!=e&&e.cts<2e5&&(e.duration+=e.cts,e.cts=0),e5.info("mp4 stream parsed"),h({videoSamples:n,audioSamples:a,decoderConf:s})}})});function o(t,e=0,r){return{...t,is_idr:"video"===r&&t.is_sync&&function(t){let e=new DataView(t.buffer),r=0;for(;r((null==eb(this,N)||t<=eb(this,G)||t-eb(this,G)>3e6)&&eb(this,Q).call(this,t),eb(this,Y).abort=!0,ev(this,G,t),ev(this,Y,{abort:!1,st:performance.now()}),await eb(this,$).call(this,t,eb(this,N),eb(this,Y)))),ew(this,W,0),ew(this,V,!1),ew(this,H,0),ew(this,X,[]),ew(this,j,0),ew(this,Z,0),ew(this,$,async(t,e,r)=>{if(null==e||"closed"===e.state||r.abort)return null;if(eb(this,X).length>0){let s=eb(this,X)[0];return ts.timestamp+(s.duration??0)?(s.close(),await eb(this,$).call(this,t,e,r)):(eb(this,X).length<10&&eb(this,q).call(this,e).catch(e=>{throw eb(this,Q).call(this,t),e}),s))}if(eb(this,K)||eb(this,j)0){if(performance.now()-r.st>3e3)throw Error(`MP4Clip.tick video timeout, ${JSON.stringify(eb(this,J).call(this))}`);await iv(15)}else{if(eb(this,H)>=this.samples.length)return null;try{await eb(this,q).call(this,e)}catch(e){throw eb(this,Q).call(this,t),e}}return await eb(this,$).call(this,t,e,r)}),ew(this,K,!1),ew(this,q,async t=>{var e,r;if(eb(this,K))return;ev(this,K,!0);let s=eb(this,H)+1,n=!1;for(;s{if(eb(this,V))throw t;ev(this,V,!0),e5.warn("Downgrade to software decode"),eb(this,Q).call(this)}}),ev(this,Z,eb(this,Z)+e.length)}}ev(this,H,s),ev(this,K,!1)}),ew(this,Q,t=>{var e,r;if(ev(this,K,!1),eb(this,X).forEach(t=>t.close()),ev(this,X,[]),null==t||0===t)ev(this,H,0);else{let e=0;for(let r=0;r{if(ev(this,j,eb(this,j)+1),-1===t.timestamp){t.close();return}let e=t;null==t.duration&&(e=new VideoFrame(t,{duration:eb(this,W)}),t.close()),eb(this,X).push(e)},error:t=>{e5.error(`MP4Clip VideoDecoder err: ${t.message}`)}})),eb(this,N).configure({...this.conf,...eb(this,V)?{hardwareAcceleration:"prefer-software"}:{}})}),ew(this,J,()=>{var t,e;return{time:eb(this,G),decState:null==(t=eb(this,N))?void 0:t.state,decQSize:null==(e=eb(this,N))?void 0:e.decodeQueueSize,decCusorIdx:eb(this,H),sampleLen:this.samples.length,inputCnt:eb(this,Z),outputCnt:eb(this,j),cacheFrameLen:eb(this,X).length,softDeocde:eb(this,V)}}),ey(this,"destroy",()=>{var t,e;(null==(t=eb(this,N))?void 0:t.state)!=="closed"&&(null==(e=eb(this,N))||e.close()),ev(this,N,null),eb(this,Y).abort=!0,eb(this,X).forEach(t=>t.close()),ev(this,X,[]),this.localFileReader.close()}),this.localFileReader=t,this.samples=e,this.conf=r}}N=new WeakMap,G=new WeakMap,Y=new WeakMap,W=new WeakMap,V=new WeakMap,H=new WeakMap,X=new WeakMap,j=new WeakMap,Z=new WeakMap,$=new WeakMap,K=new WeakMap,q=new WeakMap,Q=new WeakMap,J=new WeakMap;class iM{constructor(t,e,r,s){ew(this,tt,1),ew(this,te),ew(this,ti,null),ew(this,tr,{abort:!1,st:performance.now()}),ey(this,"find",async t=>{if(null==eb(this,ti)||t<=eb(this,ts)||t-eb(this,ts)>1e5){eb(this,tl).call(this),ev(this,ts,t);for(let e=0;e{if(null==e||r.abort||"closed"===e.state)return[];let s=Math.ceil(t*(eb(this,te)/1e6));if(0===s)return[];let n=eb(this,ta).frameCnt-s;if(n>0)return ne){let h=e-s;r[0].set(a.subarray(0,h),s),r[1].set(o.subarray(0,h),s),t.data[n][0]=a.subarray(h,a.length),t.data[n][1]=o.subarray(h,o.length);break}r[0].set(a,s),r[1].set(o,s),s+=a.length,n++}return t.data=t.data.slice(n),t.frameCnt-=e,r}(eb(this,ta),s);if(e.decodeQueueSize>10){if(performance.now()-r.st>3e3)throw r.abort=!0,Error(`MP4Clip.tick audio timeout, ${JSON.stringify(eb(this,tu).call(this))}`);await iv(15)}else{if(eb(this,tn)>=this.samples.length-1)return[];eb(this,th).call(this,e)}return eb(this,to).call(this,t,e,r)}),ew(this,th,t=>{if(t.decodeQueueSize>100)return;let e=[],r=eb(this,tn);for(;r=10))break}ev(this,tn,r),t.decode(e.map(t=>new EncodedAudioChunk({type:"key",timestamp:t.cts,duration:t.duration,data:t.data})))}),ew(this,tl,()=>{var t;ev(this,ts,0),ev(this,tn,0),ev(this,ta,{frameCnt:0,data:[]}),null==(t=eb(this,ti))||t.close(),ev(this,ti,function(t,e,r){let s=t=>{if(0!==t.length){if(1!==e.volume)for(let r of t)for(let t=0;t{let r=n;n+=1,t().then(t=>{e[r]=t,s()}).catch(t=>{e[r]=t,s()})}}(s),a=e.resampleRate!==t.sampleRate,o=new AudioDecoder({output:t=>{let r=im(t);a?n(()=>iw(r,t.sampleRate,{rate:e.resampleRate,chanCount:t.numberOfChannels})):s(r),t.close()},error:t=>{e5.error(`MP4Clip AudioDecoder err: ${t.message}`)}});return o.configure(t),{decode(t){for(let e of t)o.decode(e)},close(){"closed"!==o.state&&o.close()},get state(){return o.state},get decodeQueueSize(){return o.decodeQueueSize}}}(this.conf,{resampleRate:iC.sampleRate,volume:eb(this,tt)},t=>{eb(this,ta).data.push(t),eb(this,ta).frameCnt+=t[0].length}))}),ew(this,tu,()=>{var t,e;return{time:eb(this,ts),decState:null==(t=eb(this,ti))?void 0:t.state,decQSize:null==(e=eb(this,ti))?void 0:e.decodeQueueSize,decCusorIdx:eb(this,tn),sampleLen:this.samples.length,pcmLen:eb(this,ta).frameCnt}}),ey(this,"destroy",()=>{ev(this,ti,null),eb(this,tr).abort=!0,ev(this,ta,{frameCnt:0,data:[]}),this.localFileReader.close()}),this.localFileReader=t,this.samples=e,this.conf=r,ev(this,tt,s.volume),ev(this,te,s.targetSampleRate)}}async function iO(t,e){let r=t[0],s=t.at(-1);if(null==s)return[];let n=s.offset+s.size-r.offset;if(n<3e7){let s=new Uint8Array(await e.read(n,{at:r.offset}));return t.map(t=>{let e=t.offset-r.offset,n=s.subarray(e,e+t.size);return t.is_idr&&(n=iG(n)),new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:n})})}return await Promise.all(t.map(async t=>{let r=await e.read(t.size,{at:t.offset});return t.is_idr&&(r=iG(new Uint8Array(r))),new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:r})}))}function iN(t,e,r){let s=0;if("configured"===t.state){for(;s{if(!(t instanceof Error))throw t;if(t.message.includes("Decoding error")&&null!=r.onDecodingError){r.onDecodingError(t);return}if(!t.message.includes("Aborted due to close"))throw t})}}function iG(t){let e=new DataView(t.buffer);return(31&e.getUint8(4))==6?t.subarray(e.getUint32(0)+4):t}async function iY(t,e,r,s,n,a){let o=await e.createReader(),h=0,l=new VideoDecoder({output:t=>{let e=(h+=1)===u.length;a(t,e),e&&o.close()},error:e5.error});s.addEventListener("abort",()=>{o.close(),l.close()});let u=await iO(t.filter(t=>!t.deleted&&t.is_sync&&t.cts>=n.start&&t.cts<=n.end),o);0===u.length||s.aborted||(l.configure(r),iN(l,u,{}))}tt=new WeakMap,te=new WeakMap,ti=new WeakMap,tr=new WeakMap,ts=new WeakMap,tn=new WeakMap,ta=new WeakMap,to=new WeakMap,th=new WeakMap,tl=new WeakMap,tu=new WeakMap;let iW=class t{constructor(t){ew(this,tc),ey(this,"ready"),ew(this,td,{duration:0,width:0,height:0}),ew(this,tf,null),ew(this,tp,[]);let e=t=>(ev(this,tf,t),eb(this,td).width=t.width,eb(this,td).height=t.height,eb(this,td).duration=1/0,{...eb(this,td)});if(t instanceof ReadableStream)this.ready=new Response(t).blob().then(t=>createImageBitmap(t)).then(e);else if(t instanceof ImageBitmap)this.ready=Promise.resolve(e(t));else if(Array.isArray(t)&&t.every(t=>t instanceof VideoFrame)){ev(this,tp,t);let e=eb(this,tp)[0];if(null==e)throw Error("The frame count must be greater than 0");ev(this,td,{width:e.displayWidth,height:e.displayHeight,duration:eb(this,tp).reduce((t,e)=>t+(e.duration??0),0)}),this.ready=Promise.resolve({...eb(this,td),duration:1/0})}else if("type"in t)this.ready=eS(this,tc,tm).call(this,t.stream,t.type).then(()=>({width:eb(this,td).width,height:eb(this,td).height,duration:1/0}));else throw Error("Illegal arguments")}get meta(){return{...eb(this,td)}}async tick(t){if(null!=eb(this,tf))return{video:await createImageBitmap(eb(this,tf)),state:"success"};let e=t%eb(this,td).duration;return{video:(eb(this,tp).find(t=>e>=t.timestamp&&e<=t.timestamp+(t.duration??0))??eb(this,tp)[0]).clone(),state:"success"}}async split(e){if(await this.ready,null!=eb(this,tf))return[new t(await createImageBitmap(eb(this,tf))),new t(await createImageBitmap(eb(this,tf)))];let r=-1;for(let t=0;teb(this,tp)[t].timestamp)){r=t;break}if(-1===r)throw Error("Not found frame by time");let s=eb(this,tp).slice(0,r).map(t=>new VideoFrame(t)),n=eb(this,tp).slice(r).map(t=>new VideoFrame(t,{timestamp:t.timestamp-e}));return[new t(s),new t(n)]}async clone(){return await this.ready,new t(null==eb(this,tf)?eb(this,tp).map(t=>t.clone()):await createImageBitmap(eb(this,tf)))}destroy(){var t;e5.info("ImgClip destroy"),null==(t=eb(this,tf))||t.close(),eb(this,tp).forEach(t=>t.close())}};td=new WeakMap,tf=new WeakMap,tp=new WeakMap,tc=new WeakSet,tm=async function(t,e){ev(this,tp,await i_(t,e));let r=eb(this,tp)[0];if(null==r)throw Error("No frame available in gif");ev(this,td,{duration:eb(this,tp).reduce((t,e)=>t+(e.duration??0),0),width:r.codedWidth,height:r.codedHeight}),e5.info("ImgClip ready:",eb(this,td))};let iV=iW,iH=class t{constructor(t,e={}){ew(this,tw),ey(this,"ready"),ew(this,tg,{duration:0,width:0,height:0}),ew(this,ty,new Float32Array),ew(this,t_,new Float32Array),ew(this,tb),ew(this,tS,0),ew(this,tE,0),ev(this,tb,{loop:!1,volume:1,...e}),this.ready=eS(this,tw,tv).call(this,t).then(()=>({width:0,height:0,duration:e.loop?1/0:eb(this,tg).duration}))}get meta(){return{...eb(this,tg),sampleRate:iC.sampleRate,chanCount:2}}getPCMData(){return[eb(this,ty),eb(this,t_)]}async tick(t){if(!eb(this,tb).loop&&t>=eb(this,tg).duration)return{audio:[],state:"done"};let e=t-eb(this,tS);if(t3e6)return ev(this,tS,t),ev(this,tE,Math.ceil(eb(this,tS)/1e6*iC.sampleRate)),{audio:[new Float32Array(0),new Float32Array(0)],state:"success"};ev(this,tS,t);let r=Math.ceil(e/1e6*iC.sampleRate),s=eb(this,tE)+r,n=eb(this,tb).loop?[iS(eb(this,ty),eb(this,tE),s),iS(eb(this,t_),eb(this,tE),s)]:[eb(this,ty).slice(eb(this,tE),s),eb(this,t_).slice(eb(this,tE),s)];return ev(this,tE,s),{audio:n,state:"success"}}async split(e){await this.ready;let r=Math.ceil(e/1e6*iC.sampleRate);return[new t(this.getPCMData().map(t=>t.slice(0,r)),eb(this,tb)),new t(this.getPCMData().map(t=>t.slice(r)),eb(this,tb))]}async clone(){await this.ready;let e=new t(this.getPCMData(),eb(this,tb));return await e.ready,e}destroy(){ev(this,ty,new Float32Array(0)),ev(this,t_,new Float32Array(0)),e5.info("---- audioclip destroy ----")}};tg=new WeakMap,ty=new WeakMap,t_=new WeakMap,tb=new WeakMap,tw=new WeakSet,tv=async function(t){null==iH.ctx&&(iH.ctx=new AudioContext({sampleRate:iC.sampleRate}));let e=performance.now(),r=t instanceof ReadableStream?await iZ(t,iH.ctx):t;e5.info("Audio clip decoded complete:",performance.now()-e);let s=eb(this,tb).volume;if(1!==s)for(let t of r)for(let e=0;e{}),ey(this,"audioTrack"),ew(this,tT,null),ew(this,tA),ev(this,tA,t);let e=t.getVideoTracks()[0];if(null!=e){var r;let{width:t,height:s}=e.getSettings();e.contentHint="motion",eb(this,tU).width=t??0,eb(this,tU).height=s??0,ev(this,tT,new OffscreenCanvas(t??0,s??0)),ev(this,tx,(r=eb(this,tT).getContext("2d"),iE(new MediaStreamTrackProcessor({track:e}).readable,{onChunk:async t=>{r.drawImage(t,0,0),t.close()},onDone:async()=>{}})))}this.audioTrack=t.getAudioTracks()[0]??null,eb(this,tU).duration=1/0,this.ready=Promise.resolve(this.meta)}get meta(){return{...eb(this,tU)}}async tick(){return{video:null==eb(this,tT)?null:await createImageBitmap(eb(this,tT)),audio:[],state:"success"}}async split(){return[await this.clone(),await this.clone()]}async clone(){return new t(eb(this,tA).clone())}destroy(){eb(this,tA).getTracks().forEach(t=>t.stop()),eb(this,tx).call(this)}};tU=new WeakMap,tx=new WeakMap,tT=new WeakMap,tA=new WeakMap,ey(i$,"ctx",null);let iK=i$,iq=class t{constructor(t,e){var r;if(ew(this,tL),ey(this,"ready"),ew(this,tC,[]),ew(this,tI,{width:0,height:0,duration:0}),ew(this,tB,{color:"#FFF",textBgColor:null,type:"srt",fontSize:30,letterSpacing:null,bottomOffset:30,fontFamily:"Noto Sans SC",strokeStyle:"#000",lineWidth:null,lineCap:null,lineJoin:null,textShadow:{offsetX:2,offsetY:2,blur:4,color:"#000"},videoWidth:1280,videoHeight:720}),ew(this,tk),ew(this,tF),ew(this,tR,null),ew(this,tP,0),ew(this,tz,0),ev(this,tC,Array.isArray(t)?t:t.split(/\r|\n/).map(t=>t.trim()).filter(t=>t.length>0).map(t=>({lineStr:t,match:t.match(/(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/)})).filter(({lineStr:t},e,r)=>{var s;return!(/^\d+$/.test(t)&&(null==(s=r[e+1])?void 0:s.match)!=null)}).reduce((t,{lineStr:e,match:r})=>{if(null==r){let r=t.at(-1);if(null==r)return t;r.text+=0===r.text.length?e:` ${e}`}else t.push({start:iJ(r[1]),end:iJ(r[2]),text:""});return t},[]).map(({start:t,end:e,text:r})=>({start:1e6*t,end:1e6*e,text:r}))),0===eb(this,tC).length)throw Error("No subtitles content");ev(this,tB,Object.assign(eb(this,tB),e)),ev(this,tz,null==e.textBgColor?0:(e.fontSize??50)*.2);let{fontSize:s,fontFamily:n,videoWidth:a,videoHeight:o,letterSpacing:h}=eb(this,tB);ev(this,tP,s+2*eb(this,tz)),ev(this,tk,new OffscreenCanvas(a,o)),ev(this,tF,eb(this,tk).getContext("2d")),eb(this,tF).font=`${s}px ${n}`,eb(this,tF).textAlign="center",eb(this,tF).textBaseline="top",eb(this,tF).letterSpacing=h??"0px",ev(this,tI,{width:a,height:o,duration:(null==(r=eb(this,tC).at(-1))?void 0:r.end)??0}),this.ready=Promise.resolve(this.meta)}get meta(){return{...eb(this,tI)}}async tick(t){var e,r;if(null!=eb(this,tR)&&t>=eb(this,tR).timestamp&&t<=eb(this,tR).timestamp+(eb(this,tR).duration??0))return{video:eb(this,tR).clone(),state:"success"};let s=0;for(;sn.end)return{state:"done"};if(teb(this,tC)[t].start)){r=t;break}if(-1===r)throw Error("Not found subtitle by time");let s=eb(this,tC).slice(0,r).map(t=>({...t})),n=s.at(-1),a=null;null!=n&&n.end>e&&(a={start:0,end:n.end-e,text:n.text},n.end=e);let o=eb(this,tC).slice(r).map(t=>({...t,start:t.start-e,end:t.end-e}));return null!=a&&o.unshift(a),[new t(s,eb(this,tB)),new t(o,eb(this,tB))]}async clone(){return new t(eb(this,tC).slice(0),eb(this,tB))}destroy(){var t;null==(t=eb(this,tR))||t.close()}};tC=new WeakMap,tI=new WeakMap,tB=new WeakMap,tk=new WeakMap,tF=new WeakMap,tR=new WeakMap,tP=new WeakMap,tz=new WeakMap,tL=new WeakSet,tD=function(t){let e=t.split(` `).reverse().map(t=>t.trim()),{width:r,height:s}=eb(this,tk),{color:n,fontSize:a,textBgColor:o,textShadow:h,strokeStyle:l,lineWidth:u,lineCap:d,lineJoin:f,bottomOffset:p}=eb(this,tB),c=eb(this,tF);c.clearRect(0,0,r,s),c.globalAlpha=.6;let m=p;for(let t of e){let e=c.measureText(t),p=r/2;null!=o&&(c.shadowOffsetX=0,c.shadowOffsetY=0,c.shadowBlur=0,c.fillStyle=o,c.globalAlpha=.5,c.fillRect(p-e.actualBoundingBoxLeft-eb(this,tz),s-m-eb(this,tP),e.width+2*eb(this,tz),eb(this,tP))),c.shadowColor=h.color,c.shadowOffsetX=h.offsetX,c.shadowOffsetY=h.offsetY,c.shadowBlur=h.blur,c.globalAlpha=1,null!=l&&(c.lineWidth=u??a/6,null!=d&&(c.lineCap=d),null!=f&&(c.lineJoin=f),c.strokeStyle=l,c.strokeText(t,p,s-m-eb(this,tP)+eb(this,tz))),c.fillStyle=n,c.fillText(t,p,s-m-eb(this,tP)+eb(this,tz)),m+=eb(this,tP)+.2*a}};let iQ=iq;function iJ(t){let e=t.match(/(\d{2}):(\d{2}):(\d{2}),(\d{3})/);if(null==e)throw Error(`time format error: ${t}`);let r=Number(e[1]);return 3600*r+60*Number(e[2])+Number(e[3])+Number(e[4])/1e3}class i0{constructor(){ew(this,tM,/* @__PURE__ */new Map),ey(this,"on",(t,e)=>{let r=eb(this,tM).get(t)??/* @__PURE__ */new Set;return r.add(e),eb(this,tM).has(t)||eb(this,tM).set(t,r),()=>{r.delete(e),0===r.size&&eb(this,tM).delete(t)}}),ey(this,"once",(t,e)=>{let r=this.on(t,(...t)=>{r(),e(...t)});return r}),ey(this,"emit",(t,...e)=>{let r=eb(this,tM).get(t);null!=r&&r.forEach(t=>t(...e))})}static forwardEvent(t,e,r){let s=r.map(r=>{let[s,n]=Array.isArray(r)?r:[r,r];return t.on(s,(...t)=>{e.emit(n,...t)})});return()=>{s.forEach(t=>t())}}destroy(){eb(this,tM).clear()}}tM=new WeakMap;let i1=(t,e)=>{let r=new Uint8Array(8);new DataView(r.buffer).setUint32(0,e);for(let e=0;e<4;e++)r[4+e]=t.charCodeAt(e);return r},i2=()=>{let t=new TextEncoder,e=t.encode("mdta"),r=t.encode("mp4 handler"),s=32+r.byteLength+1,n=new Uint8Array(s),a=new DataView(n.buffer);return n.set(i1("hdlr",s),0),a.setUint32(8,0),n.set(e,16),n.set(r,32),n},i3=t=>{let e=new TextEncoder,r=e.encode("mdta"),s=t.map(t=>{let s=e.encode(t),n=8+s.byteLength,a=new Uint8Array(n);return new DataView(a.buffer).setUint32(0,n),a.set(r,4),a.set(s,4+r.byteLength),a}),n=16+s.reduce((t,e)=>t+e.byteLength,0),a=new Uint8Array(n),o=new DataView(a.buffer);a.set(i1("keys",n),0),o.setUint32(8,0),o.setUint32(12,t.length);let h=16;for(let t of s)a.set(t,h),h+=t.byteLength;return a},i6=t=>{let e=new TextEncoder,r=e.encode("data"),s=Object.entries(t).map(([t,s],n)=>{let a=e.encode(s),o=24+a.byteLength,h=new Uint8Array(o),l=new DataView(h.buffer);return l.setUint32(0,o),l.setUint32(4,n+1),l.setUint32(8,16+a.byteLength),h.set(r,12),l.setUint32(16,1),h.set(a,24),h}),n=8+s.reduce((t,e)=>t+e.byteLength,0),a=new Uint8Array(n);a.set(i1("ilst",n),0);let o=8;for(let t of s)a.set(t,o),o+=t.byteLength;return a},i8=t=>{let e=i2(),r=i3(Object.keys(t)),s=i6(t),n=new Uint8Array(e.length+r.length+s.length);return n.set(e,0),n.set(r,e.length),n.set(s,e.length+r.length),n};function i4(t){e5.info("recodemux opts:",t);let e=iA.createFile(),r=new i0,s=(t,e)=>{let r=t.add("udta").add("meta");r.data=i8(e),r.size=r.data.byteLength},n=!1,a=()=>{null==e.moov||n||(n=!0,null!=t.metaDataTags&&s(e.moov,t.metaDataTags),null!=t.duration&&(e.moov.mvhd.duration=t.duration))};r.once("VideoReady",a),r.once("AudioReady",a);let o=null!=t.video?function(t,e,r){let s={timescale:1e6,width:t.width,height:t.height,brands:["isom","iso2","avc1","mp42","mp41"],avcDecoderConfigRecord:null,name:"Track created with WebAV"},n=-1,a=!1;r.once("AudioReady",()=>{a=!0});let o={encoder0:[],encoder1:[]},h=(t,a,h)=>{var l;if(-1===n&&null!=h){let t=null==(l=h.decoderConfig)?void 0:l.description;(function(t){let e=new Uint8Array(t);e[2].toString(2).slice(-2).includes("1")&&(e[2]=0)})(t),s.avcDecoderConfigRecord=t,n=e.addTrack(s),r.emit("VideoReady"),e5.info("VideoEncoder, video track ready, trackId:",n)}o[t].push(i7(a))},l="encoder1",u=0;function d(){if(!a)return;let t="encoder1"===l?"encoder0":"encoder1",r=o[l],s=o[t];if(0===r.length&&0===s.length)return;let h=r[0];if(null!=h&&h.cts-u<1e4){let t=function(t){let r=-1,s=0;for(;s0&&a.is_sync)break;e.addSample(n,a.data,a),r=a.cts+a.duration}return t.splice(0,s),r}(r);t>u&&(u=t)}let f=s[0];null!=f&&f.cts-u<1e4&&(l=t,d())}let f=is(d,15),p=i5(t,(t,e)=>h("encoder0",t,e)),c=i5(t,(t,e)=>h("encoder1",t,e)),m=0;return{get encodeQueueSize(){return p.encodeQueueSize+c.encodeQueueSize},encode:(t,e)=>{e.keyFrame&&(m+=1),(m%2==0?p:c).encode(t,e)},flush:async()=>{await Promise.all(["configured"===p.state?await p.flush():null,"configured"===c.state?await c.flush():null]),f(),d()},close:()=>{"configured"===p.state&&p.close(),"configured"===c.state&&c.close()}}}(t.video,e,r):null,h=null!=t.audio?function(t,e,r){let s={timescale:1e6,samplerate:t.sampleRate,channel_count:t.channelCount,hdlr:"soun",type:"aac"===t.codec?"mp4a":"Opus",name:"Track created with WebAV"},n=-1,a=[],o=!1;r.once("VideoReady",()=>{o=!0,a.forEach(t=>{let r=i7(t);e.addSample(n,r.data,r)}),a=[]});let h=new AudioEncoder({error:e5.error,output:(t,h)=>{var l;if(-1===n){let t=null==(l=h.decoderConfig)?void 0:l.description;n=e.addTrack({...s,description:null==t?void 0:function(t){let e=t.byteLength,r=new Uint8Array([0,0,0,0,3,23+e,0,2,0,4,18+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5,e,...new Uint8Array(t instanceof ArrayBuffer?t:t.buffer),6,1,2]),s=new iA.BoxParser.esdsBox(r.byteLength);return s.hdr_size=0,s.parse(new iA.DataStream(r,0,iA.DataStream.BIG_ENDIAN)),s}(t)}),r.emit("AudioReady"),e5.info("AudioEncoder, audio track ready, trackId:",n)}if(o){let r=i7(t);e.addSample(n,r.data,r)}else a.push(t)}});return h.configure({codec:"aac"===t.codec?iC.codec:"opus",sampleRate:t.sampleRate,numberOfChannels:t.channelCount,bitrate:128e3}),h}(t.audio,e,r):null;return null==t.video&&r.emit("VideoReady"),null==t.audio&&r.emit("AudioReady"),{encodeVideo:(t,e)=>{null==o||o.encode(t,e),t.close()},encodeAudio:t=>{null!=h&&(h.encode(t),t.close())},getEncodeQueueSize:()=>(null==o?void 0:o.encodeQueueSize)??(null==h?void 0:h.encodeQueueSize)??0,flush:async()=>{await Promise.all([null==o?void 0:o.flush(),(null==h?void 0:h.state)==="configured"?h.flush():null])},close:()=>{r.destroy(),null==o||o.close(),(null==h?void 0:h.state)==="configured"&&h.close()},mp4file:e}}function i5(t,e){let r=new VideoEncoder({error:e5.error,output:e});return r.configure({codec:t.codec,framerate:t.expectFPS,hardwareAcceleration:t.__unsafe_hardwareAcceleration__,bitrate:t.bitrate,width:t.width,height:t.height,alpha:"discard",avc:{format:"avc"}}),r}function i9(t,e,r){let s=0,n=0,a=t.boxes,o=!1,h=()=>{var e;if(!o){if(null==a.find(t=>"moof"===t.type))return null;o=!0}if(n>=a.length)return null;let r=new iA.DataStream;r.endianness=iA.DataStream.BIG_ENDIAN;let s=n;try{for(;s{let t=h();null==t||u||r.enqueue(t)},e),d=e=>{if(clearInterval(s),t.flush(),null!=e){r.error(e);return}let n=h();null==n||u||r.enqueue(n),u||r.close()},l&&d()},cancel(){u=!0,clearInterval(s),null==r||r()}}),stop:t=>{l||(l=!0,null==d||d(t))}}}function i7(t){let e=new ArrayBuffer(t.byteLength);t.copyTo(e);let r=t.timestamp;return{duration:t.duration??0,dts:r,cts:r,is_sync:"key"===t.type,data:e}}async function rt(t){let e=iA.createFile(),r=function(t){let e=0,r=t.boxes,s=[],n=0;async function a(){let a=c(r,e);e=r.length,s.forEach(({track:e,id:r})=>{let s=e.samples.at(-1);null!=s&&(n=Math.max(n,s.cts+s.duration)),t.releaseUsedSamples(r,e.samples.length),e.samples=[]}),t.mdats=[],t.moofs=[],null!=a&&await (null==d?void 0:d.write(a))}let o=[];function h(){if(o.length>0)return!0;let n=r.findIndex(t=>"moov"===t.type);if(-1===n)return!1;if(o=r.slice(0,n+1),e=n+1,0===s.length)for(let e=1;;e+=1){let r=t.getTrackById(e);if(null==r)break;s.push({track:r,id:e})}return!0}let l=0,u=e1(),d=null,f=(async()=>{d=await u.createWriter(),l=self.setInterval(()=>{h()&&a()},100)})(),p=!1;return async()=>{if(p)throw Error("File exported");if(p=!0,await f,clearInterval(l),!h()||null==d)return null;t.flush(),await a(),await (null==d?void 0:d.close());let e=o.find(t=>"moov"===t.type);if(null==e)return null;e.mvhd.duration=n;let r=e1(),s=c(o,0);return await eH(r,s),await eH(r,u,{overwrite:!1}),await r.stream()};function c(t,e){if(e>=t.length)return null;let r=new iA.DataStream;r.endianness=iA.DataStream.BIG_ENDIAN;for(let s=e;s{iE(d.pipeThrough(new ik),{onDone:t,onChunk:async({chunkType:t,data:d})=>{if("ready"===t){let{videoTrackConf:t,audioTrackConf:s}=iI(d.file,d.info);0===r&&null!=t&&(r=e.addTrack(t)),0===a&&null!=s&&(a=e.addTrack(s))}else if("samples"===t){let{type:t,samples:f}=d,p="video"===t?r:a,c="video"===t?s:o,m="video"===t?n:h;f.forEach(t=>{e.addSample(p,t.data,{duration:t.duration,dts:t.dts+c,cts:t.cts+m,is_sync:t.is_sync})});let g=f.at(-1);if(null==g)return;"video"===t?l=g:"audio"===t&&(u=g)}}})}),null!=l&&(s+=l.dts,n+=l.cts),null!=u&&(o+=u.dts,h+=u.cts)}async function ri(t){return await rt([t])}function rr(t,e){e5.info("mixinMP4AndAudio, opts:",{volume:e.volume,loop:e.loop});let r=iA.createFile(),{stream:s,stop:n}=i9(r,500),a=null,o=null,h=[],l=0,u=0,d=0,f=!0,p=48e3;function c(t){let r=h.map(r=>e.loop?iS(r,d,d+t):r.slice(d,d+t));if(d+=t,1!==e.volume)for(let t of r)for(let r=0;r{await (null==o?void 0:o.stop()),null==a||a.close(),n()},onChunk:async({chunkType:t,data:s})=>{if("ready"===t){let{videoTrackConf:t,audioTrackConf:n,audioDecoderConf:d}=iI(s.file,s.info);0===l&&null!=t&&(l=r.addTrack(t));let c=n??{timescale:1e6,samplerate:p,channel_count:iC.channelCount,hdlr:"soun",name:"SoundHandler",type:"mp4a"};0===u&&(u=r.addTrack(c),p=(null==n?void 0:n.samplerate)??p,f=null!=n);let m=new AudioContext({sampleRate:p});h=ig(await m.decodeAudioData(await new Response(e.stream).arrayBuffer())),null!=d&&(a=function(t){let e=[],r=new AudioDecoder({output:t=>{e.push(t)},error:e5.error});return r.configure(t),{decode:async t=>{t.forEach(t=>{r.decode(new EncodedAudioChunk({type:t.is_sync?"key":"delta",timestamp:1e6*t.cts/t.timescale,duration:1e6*t.duration/t.timescale,data:t.data}))}),await r.flush();let s=e;return e=[],s},close:()=>{r.close()}}}(d)),o=function(t,e){let r=new AudioEncoder({output:t=>{e(i7(t))},error:e5.error});r.configure({codec:t.codec,sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels});let s=null;function n(e,r){return new AudioData({timestamp:r,numberOfChannels:t.numberOfChannels,numberOfFrames:e.length/t.numberOfChannels,sampleRate:t.sampleRate,format:"f32-planar",data:e})}return{encode:async(t,e)=>{null!=s&&r.encode(n(s.data,s.ts)),s={data:t,ts:e}},stop:async()=>{null!=s&&(function(t,e,r){let s=t.length-1,n=Math.min(r/2,s);for(let r=0;rr.addSample(u,t.data,t))}else if("samples"===t){let{id:t,type:e,samples:n}=s;if("video"===e){n.forEach(e=>r.addSample(t,e.data,e)),f||await m(n);return}"audio"===e&&await g(n)}}}),s}var rs=/* @__PURE__ */function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var r=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(r,1),r>-1},e.trigger=function(t){var e=this.listeners[t];if(e){if(2==arguments.length)for(var r=e.length,s=0;stypeof window?tO=window:"u">typeof iU?tO=iU:"u">typeof self?tO=self:tO={};let ra=/* @__PURE__ */ix(tO);/*! @name m3u8-parser @version 7.1.0 @license Apache-2.0 */class ro extends rs{constructor(){super(),this.buffer=""}push(t){let e;for(this.buffer+=t,e=this.buffer.indexOf(` `);e>-1;e=this.buffer.indexOf(` `))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)}}let rh=function(t){let e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),r={};return e[1]&&(r.length=parseInt(e[1],10)),e[2]&&(r.offset=parseInt(e[2],10)),r},rl=function(t){let e={};if(!t)return e;let r=t.split(RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),s=r.length,n;for(;s--;)""!==r[s]&&((n=/([^=]*)=(.*)/.exec(r[s]).slice(1))[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),e[n[0]]=n[1]);return e};class ru extends rs{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(t){let e,r;if(0!==(t=t.trim()).length){if("#"!==t[0]){this.trigger("data",{type:"uri",uri:t});return}this.tagMappers.reduce((e,r)=>{let s=r(t);return s===t?e:e.concat([s])},[t]).forEach(t=>{for(let e=0;et),this.customParsers.push(n=>{if(t.exec(n))return this.trigger("data",{type:"custom",data:r(n),customType:e,segment:s}),!0})}addTagMapper({expression:t,map:e}){this.tagMappers.push(r=>t.test(r)?e(r):r)}}let rd=t=>t.toLowerCase().replace(/-(\w)/g,t=>t[1].toUpperCase()),rf=function(t){let e={};return Object.keys(t).forEach(function(r){e[rd(r)]=t[r]}),e},rp=function(t){let{serverControl:e,targetDuration:r,partTargetDuration:s}=t;if(!e)return;let n="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",h=r&&3*r,l=s&&2*s;r&&!e.hasOwnProperty(a)&&(e[a]=h,this.trigger("info",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${h}).`})),h&&e[a]{!r.uri&&(r.parts||r.preloadHints)&&(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||"number"!=typeof l||(r.timeline=l),this.manifest.preloadSegment=r)}),this.parseStream.on("data",function(p){let c,m;({tag(){(({version(){p.version&&(this.manifest.version=p.version)},"allow-cache"(){this.manifest.allowCache=p.allowed,"allowed"in p||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){let t={};"length"in p&&(r.byterange=t,t.length=p.length,"offset"in p||(p.offset=u)),"offset"in p&&(r.byterange=t,t.offset=p.offset),u=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),p.title&&(r.title=p.title),p.duration>0&&(r.duration=p.duration),0===p.duration&&(r.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=e},key(){if(!p.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if("NONE"===p.attributes.METHOD){n=null;return}if(!p.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if("com.apple.streamingkeydelivery"===p.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:p.attributes};return}if("com.microsoft.playready"===p.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:p.attributes.URI};return}if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===p.attributes.KEYFORMAT){if(-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(p.attributes.METHOD)){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if("SAMPLE-AES-CENC"===p.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==p.attributes.URI.substring(0,23)){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(p.attributes.KEYID&&"0x"===p.attributes.KEYID.substring(0,2))){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:p.attributes.KEYFORMAT,keyId:p.attributes.KEYID.substring(2)},pssh:function(t){for(var e=ra.atob?ra.atob(t):ep.from(t,"base64").toString("binary"),r=new Uint8Array(e.length),s=0;stypeof p.attributes.IV&&(n.iv=p.attributes.IV)},"media-sequence"(){if(!isFinite(p.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+p.number});return}this.manifest.mediaSequence=p.number},"discontinuity-sequence"(){if(!isFinite(p.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+p.number});return}this.manifest.discontinuitySequence=p.number,l=p.number},"playlist-type"(){if(!/VOD|EVENT/.test(p.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+p.playlist});return}this.manifest.playlistType=p.playlistType},map(){s={},p.uri&&(s.uri=p.uri),p.byterange&&(s.byterange=p.byterange),n&&(s.key=n)},"stream-inf"(){if(this.manifest.playlists=e,this.manifest.mediaGroups=this.manifest.mediaGroups||h,!p.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}r.attributes||(r.attributes={}),rn(r.attributes,p.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(p.attributes&&p.attributes.TYPE&&p.attributes["GROUP-ID"]&&p.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}let t=this.manifest.mediaGroups[p.attributes.TYPE];t[p.attributes["GROUP-ID"]]=t[p.attributes["GROUP-ID"]]||{},c=t[p.attributes["GROUP-ID"]],(m={default:/yes/i.test(p.attributes.DEFAULT)}).default?m.autoselect=!0:m.autoselect=/yes/i.test(p.attributes.AUTOSELECT),p.attributes.LANGUAGE&&(m.language=p.attributes.LANGUAGE),p.attributes.URI&&(m.uri=p.attributes.URI),p.attributes["INSTREAM-ID"]&&(m.instreamId=p.attributes["INSTREAM-ID"]),p.attributes.CHARACTERISTICS&&(m.characteristics=p.attributes.CHARACTERISTICS),p.attributes.FORCED&&(m.forced=/yes/i.test(p.attributes.FORCED)),c[p.attributes.NAME]=m},discontinuity(){l+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(e.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=p.dateTimeString,this.manifest.dateTimeObject=p.dateTimeObject),r.dateTimeString=p.dateTimeString,r.dateTimeObject=p.dateTimeObject;let{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(p.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((t,e)=>(e.programDateTime=t-1e3*e.duration,e.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(p.duration)||p.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+p.duration});return}this.manifest.targetDuration=p.duration,rp.call(this,this.manifest)},start(){if(!p.attributes||isNaN(p.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:p.attributes["TIME-OFFSET"],precise:p.attributes.PRECISE}},"cue-out"(){r.cueOut=p.data},"cue-out-cont"(){r.cueOutCont=p.data},"cue-in"(){r.cueIn=p.data},skip(){this.manifest.skip=rf(p.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",p.attributes,["SKIPPED-SEGMENTS"])},part(){a=!0;let t=this.manifest.segments.length,e=rf(p.attributes);r.parts=r.parts||[],r.parts.push(e),e.byterange&&(e.byterange.hasOwnProperty("offset")||(e.byterange.offset=d),d=e.byterange.offset+e.byterange.length);let s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,p.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((t,e)=>{t.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${e} lacks required attribute(s): LAST-PART`})})},"server-control"(){let t=this.manifest.serverControl=rf(p.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),rp.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){let t=this.manifest.segments.length,e=rf(p.attributes),s=e.type&&"PART"===e.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(e),e.byterange&&(e.byterange.hasOwnProperty("offset")||(e.byterange.offset=s?d:0,s&&(d=e.byterange.offset+e.byterange.length)));let n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,p.attributes,["TYPE","URI"]),e.type)for(let s=0;st.id===e.id);this.manifest.dateRanges[t]=rn(this.manifest.dateRanges[t],e),f[e.id]=rn(f[e.id],e),this.manifest.dateRanges.pop()}else f[e.id]=e},"independent-segments"(){this.manifest.independentSegments=!0},"content-steering"(){this.manifest.contentSteering=rf(p.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",p.attributes,["SERVER-URI"])}})[p.tagType]||o).call(t)},uri(){r.uri=p.uri,e.push(r),!this.manifest.targetDuration||"duration"in r||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=l,s&&(r.map=s),d=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){p.segment?(r.custom=r.custom||{},r.custom[p.customType]=p.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[p.customType]=p.data)}})[p.type].call(t)})}warnOnMissingAttributes_(t,e,r){let s=[];r.forEach(function(t){e.hasOwnProperty(t)||s.push(t)}),s.length&&this.trigger("warn",{message:`${t} lacks required attribute(s): ${s.join(", ")}`})}push(t){this.lineStream.push(t)}end(){this.lineStream.push(` `),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(t){this.parseStream.addParser(t)}addTagMapper(t){this.parseStream.addTagMapper(t)}}async function rm(t,e=10){let r=new rc;r.push(await (await fetch(t)).text()),r.end();let s=r.manifest.segments.reduce((t,e)=>(t[e.map.uri]=t[e.map.uri]??[],t[e.map.uri].push(e),t),{}),n=new URL(t,location.href),a={};async function o(t,r,s){async function o(t){return(await fetch(t)).arrayBuffer()}let h=function(e){let n=0,a=0,o=[];async function h(){if(na[t]=o(t))}}async function h(t){let e=await a[t];return delete a[t],e}return{load(t=0,e=1/0){let r={},a=0,l=0;for(let[n,o]of Object.entries(s)){let s=0,h=[],u=-1,d=-1;for(let r=0;rt/1e6&&(u=r,a=(s-n.duration)*1e6),u>-1&&-1===d&&s>=e/1e6){d=r+1,l=1e6*s;break}}e>=1e6*s&&(d=o.length,l=1e6*s),d>u&&(h=h.concat(o.slice(u,d))),h.length>0&&(r[n]={actualStartTime:a,actualEndTime:l,segments:h})}return 0===Object.keys(r).length?null:Object.entries(r).map(([t,{actualStartTime:e,actualEndTime:r,segments:s}])=>{let a=0,l=new i0;return{actualStartTime:e,actualEndTime:r,on:l.on,stream:new ReadableStream({start:async e=>{o(s,e,l),e.enqueue(new Uint8Array(await (await fetch(new URL(t,n).href)).arrayBuffer()))},pull:async t=>{let e=new URL(s[a].uri,n).href;t.enqueue(new Uint8Array(await h(e))),(a+=1)>=s.length&&(t.close(),l.destroy())}})}})}}}let rg=`#version 300 es layout (location = 0) in vec4 a_position; layout (location = 1) in vec2 a_texCoord; out vec2 v_texCoord; void main () { gl_Position = a_position; v_texCoord = a_texCoord; } `,ry=`#version 300 es precision mediump float; out vec4 FragColor; in vec2 v_texCoord; uniform sampler2D frameTexture; uniform vec3 keyColor; // \u{8272}\u{5EA6}\u{7684}\u{76F8}\u{4F3C}\u{5EA6}\u{8BA1}\u{7B97} uniform float similarity; // \u{900F}\u{660E}\u{5EA6}\u{7684}\u{5E73}\u{6ED1}\u{5EA6}\u{8BA1}\u{7B97} uniform float smoothness; // \u{964D}\u{4F4E}\u{7EFF}\u{5E55}\u{9971}\u{548C}\u{5EA6}\u{FF0C}\u{63D0}\u{9AD8}\u{62A0}\u{56FE}\u{51C6}\u{786E}\u{5EA6} uniform float spill; vec2 RGBtoUV(vec3 rgb) { return vec2( rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5, rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5 ); } void main() { // \u{83B7}\u{53D6}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{7684}rgba\u{503C} vec4 rgba = texture(frameTexture, v_texCoord); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{4E0E}\u{7EFF}\u{5E55}\u{50CF}\u{7D20}\u{7684}\u{8272}\u{5EA6}\u{5DEE}\u{503C} vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{4E0E}\u{7EFF}\u{5E55}\u{50CF}\u{7D20}\u{7684}\u{8272}\u{5EA6}\u{8DDD}\u{79BB}\u{FF08}\u{5411}\u{91CF}\u{957F}\u{5EA6}\u{FF09}, \u{8D8A}\u{76F8}\u{50CF}\u{5219}\u{8272}\u{5EA6}\u{8DDD}\u{79BB}\u{8D8A}\u{5C0F} float chromaDist = sqrt(dot(chromaVec, chromaVec)); // \u{8BBE}\u{7F6E}\u{4E86}\u{4E00}\u{4E2A}\u{76F8}\u{4F3C}\u{5EA6}\u{9608}\u{503C}\u{FF0C}baseMask\u{4E3A}\u{8D1F}\u{FF0C}\u{5219}\u{8868}\u{660E}\u{662F}\u{7EFF}\u{5E55}\u{FF0C}\u{4E3A}\u{6B63}\u{5219}\u{8868}\u{660E}\u{4E0D}\u{662F}\u{7EFF}\u{5E55} float baseMask = chromaDist - similarity; // \u{5982}\u{679C}baseMask\u{4E3A}\u{8D1F}\u{6570}\u{FF0C}fullMask\u{7B49}\u{4E8E}0\u{FF1B}baseMask\u{4E3A}\u{6B63}\u{6570}\u{FF0C}\u{8D8A}\u{5927}\u{FF0C}\u{5219}\u{900F}\u{660E}\u{5EA6}\u{8D8A}\u{4F4E} float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5); rgba.a = fullMask; // \u{8BBE}\u{7F6E}\u{900F}\u{660E}\u{5EA6} // \u{5982}\u{679C}baseMask\u{4E3A}\u{8D1F}\u{6570}\u{FF0C}spillVal\u{7B49}\u{4E8E}0\u{FF1B}baseMask\u{4E3A}\u{6574}\u{6570}\u{FF0C}\u{8D8A}\u{5C0F}\u{FF0C}\u{9971}\u{548C}\u{5EA6}\u{8D8A}\u{4F4E} float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5); float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{7684}\u{7070}\u{5EA6}\u{503C} rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal); FragColor = rgba; } `,r_=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1],rb=[0,1,0,0,1,0,1,0,1,1,0,1];function rw(t,e,r){let s=t.createShader(e);if(t.shaderSource(s,r),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS)){let e=t.getShaderInfoLog(s);throw t.deleteShader(s),Error(e??"An error occurred compiling the shaders")}return s}let rv=t=>{let e=null,r=null,s=t.keyColor,n=null;return async a=>{var o,h;if((null==e||null==r||null==n)&&(null==s&&(s=function(t){let e=new OffscreenCanvas(1,1).getContext("2d");e.drawImage(t,0,0);let{data:[r,s,n]}=e.getImageData(0,0,1,1);return[r,s,n]}(a)),{cvs:e,gl:r}=function(t){let e="document"in globalThis?globalThis.document.createElement("canvas"):new OffscreenCanvas(t.width,t.height);e.width=t.width,e.height=t.height;let r=e.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0});if(null==r)throw Error("Cant create gl context");let s=function(t,e,r){let s=rw(t,t.VERTEX_SHADER,e),n=rw(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,s),t.attachShader(a,n),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw Error(t.getProgramInfoLog(a)??"Unable to initialize the shader program");return a}(r,rg,ry);r.useProgram(s),r.uniform3fv(r.getUniformLocation(s,"keyColor"),t.keyColor.map(t=>t/255)),r.uniform1f(r.getUniformLocation(s,"similarity"),t.similarity),r.uniform1f(r.getUniformLocation(s,"smoothness"),t.smoothness),r.uniform1f(r.getUniformLocation(s,"spill"),t.spill);let n=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,n),r.bufferData(r.ARRAY_BUFFER,new Float32Array(r_),r.STATIC_DRAW);let a=r.getAttribLocation(s,"a_position");r.vertexAttribPointer(a,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(a);let o=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,new Float32Array(rb),r.STATIC_DRAW);let h=r.getAttribLocation(s,"a_texCoord");return r.vertexAttribPointer(h,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(h),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1),{cvs:e,gl:r}}({...a instanceof VideoFrame?{width:a.codedWidth,height:a.codedHeight}:{width:a.width,height:a.height},keyColor:s,...t}),n=function(t){let e=t.createTexture();if(null==e)throw Error("Create WebGL texture error");t.bindTexture(t.TEXTURE_2D,e);let r=t.RGBA,s=t.RGBA,n=t.UNSIGNED_BYTE,a=new Uint8Array([0,0,255,255]);return t.texImage2D(t.TEXTURE_2D,0,r,1,1,0,s,n,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}(r)),o=r,h=n,o.bindTexture(o.TEXTURE_2D,h),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,o.RGBA,o.UNSIGNED_BYTE,a),o.drawArrays(o.TRIANGLES,0,6),null!=globalThis.VideoFrame&&a instanceof globalThis.VideoFrame){let t=new VideoFrame(e,{alpha:"keep",timestamp:a.timestamp,duration:a.duration??void 0});return a.close(),t}return createImageBitmap(e,{imageOrientation:a instanceof ImageBitmap?"flipY":"none"})}},rS=class t{constructor(t,e,r,s,n){ew(this,tX),ew(this,tN,new i0),ey(this,"on",eb(this,tN).on),ew(this,tG,0),ew(this,tY,0),ew(this,tW,0),ew(this,tV,0),ew(this,tH,0),ey(this,"master",null),ey(this,"fixedAspectRatio",!1),this.x=t??0,this.y=e??0,this.w=r??0,this.h=s??0,this.master=n??null}get x(){return eb(this,tG)}set x(t){eS(this,tX,tj).call(this,"x",t)}get y(){return eb(this,tY)}set y(t){eS(this,tX,tj).call(this,"y",t)}get w(){return eb(this,tW)}set w(t){eS(this,tX,tj).call(this,"w",t)}get h(){return eb(this,tV)}set h(t){eS(this,tX,tj).call(this,"h",t)}get angle(){return eb(this,tH)}set angle(t){eS(this,tX,tj).call(this,"angle",t)}get center(){let{x:t,y:e,w:r,h:s}=this;return{x:t+r/2,y:e+s/2}}get ctrls(){let{w:e,h:r}=this,s=t.CTRL_SIZE,n=s/2,a=e/2,o=r/2,h=1.5*s,l=h/2;return{...this.fixedAspectRatio?{}:{t:new t(-n,-o-n,s,s,this),b:new t(-n,o-n,s,s,this),l:new t(-a-n,-n,s,s,this),r:new t(a-n,-n,s,s,this)},lt:new t(-a-n,-o-n,s,s,this),lb:new t(-a-n,o-n,s,s,this),rt:new t(a-n,-o-n,s,s,this),rb:new t(a-n,o-n,s,s,this),rotate:new t(-l,-o-2*s-l,h,h,this)}}clone(){let{x:e,y:r,w:s,h:n,master:a}=this,o=new t(e,r,s,n,a);return o.angle=this.angle,o.fixedAspectRatio=this.fixedAspectRatio,o}checkHit(t,e){let{angle:r,center:s,x:n,y:a,w:o,h:h,master:l}=this,u=(null==l?void 0:l.center)??s,d=(null==l?void 0:l.angle)??r;null==l&&(n-=u.x,a-=u.y);let f=t-u.x,p=e-u.y,c=f,m=p;return 0!==d&&(c=f*Math.cos(d)+p*Math.sin(d),m=p*Math.cos(d)-f*Math.sin(d)),!(cn+o||ma+h)}};tN=new WeakMap,tG=new WeakMap,tY=new WeakMap,tW=new WeakMap,tV=new WeakMap,tH=new WeakMap,tX=new WeakSet,tj=function(t,e){let r=this[t]!==e;switch(t){case"x":ev(this,tG,e);break;case"y":ev(this,tY,e);break;case"w":ev(this,tW,e);break;case"h":ev(this,tV,e);break;case"angle":ev(this,tH,e)}r&&eb(this,tN).emit("propsChange",{[t]:e})},ey(rS,"CTRL_SIZE",16),ey(rS,"CTRL_KEYS",["t","b","l","r","lt","lb","rt","rb","rotate"]);let rE=rS;class rU{constructor(){ey(this,"rect",new rE),ey(this,"time",{offset:0,duration:0}),ey(this,"visible",!0),ew(this,tZ,new i0),ey(this,"on",eb(this,tZ).on),ew(this,t$,0),ey(this,"opacity",1),ey(this,"flip",null),ew(this,tK,null),ew(this,tq,null),ey(this,"ready",Promise.resolve()),this.rect.on("propsChange",t=>{eb(this,tZ).emit("propsChange",{rect:t})})}get zIndex(){return eb(this,t$)}set zIndex(t){let e=eb(this,t$)!==t;ev(this,t$,t),e&&eb(this,tZ).emit("propsChange",{zIndex:t})}_render(t){let{rect:{center:e,angle:r}}=this;t.setTransform("horizontal"===this.flip?-1:1,0,0,"vertical"===this.flip?-1:1,e.x,e.y),t.rotate((null==this.flip?1:-1)*r),t.globalAlpha=this.opacity}setAnimation(t,e){ev(this,tK,Object.entries(t).map(([t,e])=>{let r={from:0,to:100}[t]??Number(t.slice(0,-1));if(isNaN(r)||r>100||r<0)throw Error("keyFrame must between 0~100");return[r/100,e]})),ev(this,tq,Object.assign({},eb(this,tq),{duration:1e6*e.duration,delay:(e.delay??0)*1e6,iterCount:e.iterCount??1/0}))}animate(t){if(null==eb(this,tK)||null==eb(this,tq)||t=r.iterCount)return{};let s=t%r.duration,n=t===r.duration?1:s/r.duration,a=e.findIndex(t=>t[0]>=n);if(-1===a)return{};let o=e[a-1],h=e[a],l=h[1];if(null==o)return l;let u=o[1],d={},f=(n-o[0])/(h[0]-o[0]);for(let t in l)null!=u[t]&&(d[t]=(l[t]-u[t])*f+u[t]);return d}(t,eb(this,tK),eb(this,tq));for(let t in e)switch(t){case"opacity":this.opacity=e[t];break;case"x":case"y":case"w":case"h":case"angle":this.rect[t]=e[t]}}copyStateTo(t){ev(t,tK,eb(this,tK)),ev(t,tq,eb(this,tq)),t.visible=this.visible,t.zIndex=this.zIndex,t.opacity=this.opacity,t.flip=this.flip,t.rect=this.rect.clone(),t.time={...this.time}}destroy(){eb(this,tZ).destroy()}}tZ=new WeakMap,t$=new WeakMap,tK=new WeakMap,tq=new WeakMap;let rx=class t extends rU{constructor(t){super(),ew(this,tQ),ew(this,tJ,null),ew(this,t0,!1),ev(this,tQ,t),this.ready=t.ready.then(({width:t,height:e,duration:r})=>{this.rect.w=0===this.rect.w?t:this.rect.w,this.rect.h=0===this.rect.h?e:this.rect.h,this.time.duration=0===this.time.duration?r:this.time.duration})}async offscreenRender(t,e){var r;this.animate(e),super._render(t);let{w:s,h:n}=this.rect,{video:a,audio:o,state:h}=await eb(this,tQ).tick(e);if("done"===h)return{audio:o??[],done:!0};let l=a??eb(this,tJ);return null!=l&&t.drawImage(l,-s/2,-n/2,s,n),null!=a&&(null==(r=eb(this,tJ))||r.close(),ev(this,tJ,a)),{audio:o??[],done:!1}}async clone(){let e=new t(await eb(this,tQ).clone());return await e.ready,this.copyStateTo(e),e}destroy(){var t;eb(this,t0)||(ev(this,t0,!0),e5.info("OffscreenSprite destroy"),super.destroy(),null==(t=eb(this,tJ))||t.close(),ev(this,tJ,null),eb(this,tQ).destroy())}};tQ=new WeakMap,tJ=new WeakMap,t0=new WeakMap;let rT=rx;class rA extends rU{constructor(t){super(),ew(this,t8),ew(this,t1),ew(this,t2,null),ew(this,t3,[]),ew(this,t6,!1),ew(this,t5,-1),ew(this,t9,!1),ev(this,t1,t),this.ready=t.ready.then(({width:t,height:e,duration:r})=>{this.rect.w=0===this.rect.w?t:this.rect.w,this.rect.h=0===this.rect.h?e:this.rect.h,this.time.duration=0===this.time.duration?r:this.time.duration})}getClip(){return eb(this,t1)}preFrame(t){eS(this,t8,t4).call(this,t)}render(t,e){this.animate(e),super._render(t);let{w:r,h:s}=this.rect;eb(this,t5)!==e&&eS(this,t8,t4).call(this,e),ev(this,t5,e);let n=eb(this,t3);ev(this,t3,[]);let a=eb(this,t2);return null!=a&&t.drawImage(a,-r/2,-s/2,r,s),{audio:n}}destroy(){var t;eb(this,t9)||(ev(this,t9,!0),e5.info("VisibleSprite destroy"),super.destroy(),null==(t=eb(this,t2))||t.close(),ev(this,t2,null),eb(this,t1).destroy())}}t1=new WeakMap,t2=new WeakMap,t3=new WeakMap,t6=new WeakMap,t8=new WeakSet,t4=function(t){eb(this,t6)||(ev(this,t6,!0),eb(this,t1).tick(t).then(({video:t,audio:e})=>{var r;null!=t&&(null==(r=eb(this,t2))||r.close(),ev(this,t2,t??null)),ev(this,t3,e??[])}).finally(()=>{ev(this,t6,!1)}))},t5=new WeakMap,t9=new WeakMap;let rC=0;async function rI(t){t()>50&&(await iv(15),await rI(t))}class rB{constructor(t={}){ew(this,eh),ew(this,t7,e5.create(`id:${rC++},`)),ew(this,et,!1),ew(this,ee,[]),ew(this,ei),ew(this,er),ew(this,es,null),ew(this,en),ew(this,ea),ew(this,eo,new i0),ey(this,"on",eb(this,eo).on);let{width:e=0,height:r=0}=t;ev(this,ei,new OffscreenCanvas(e,r));let s=eb(this,ei).getContext("2d",{alpha:!1});if(null==s)throw Error("Can not create 2d offscreen context");ev(this,er,s),ev(this,en,Object.assign({bgColor:"#000",width:0,height:0,videoCodec:"avc1.42E032",audio:!0,bitrate:5e6,metaDataTags:null},t)),ev(this,ea,e*r>0)}static async isSupported(t={videoCodec:"avc1.42E032"}){return null!=self.OffscreenCanvas&&null!=self.VideoEncoder&&null!=self.VideoDecoder&&null!=self.VideoFrame&&null!=self.AudioEncoder&&null!=self.AudioDecoder&&null!=self.AudioData&&((await self.VideoEncoder.isConfigSupported({codec:t.videoCodec,width:1280,height:720})).supported??!1)&&(await self.AudioEncoder.isConfigSupported({codec:iC.codec,sampleRate:iC.sampleRate,numberOfChannels:iC.channelCount})).supported}async addSprite(t,e={}){eb(this,t7).info("Combinator add sprite",t);let r=await t.clone();eb(this,t7).info("Combinator add sprite ready",t),eb(this,ee).push(Object.assign(r,{main:e.main??!1,expired:!1})),eb(this,ee).sort((t,e)=>t.zIndex-e.zIndex)}output(){if(0===eb(this,ee).length)throw Error("No sprite added");let t=eb(this,ee).find(t=>t.main),e=null!=t?t.time.offset+t.time.duration:Math.max(...eb(this,ee).map(t=>t.time.offset+t.time.duration));if(e===1/0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of ImgClip, AudioCli");-1===e&&eb(this,t7).warn("Unable to determine the end time, process value don't update"),eb(this,t7).info(`start combinate video, maxTime:${e}`);let r=eS(this,eh,el).call(this,e),s=performance.now(),n=eS(this,eh,eu).call(this,r,e,{onProgress:t=>{eb(this,t7).debug("OutputProgress:",t),eb(this,eo).emit("OutputProgress",t)},onEnded:async()=>{await r.flush(),eb(this,t7).info("===== output ended =====, cost:",performance.now()-s),eb(this,eo).emit("OutputProgress",1),this.destroy()},onError:t=>{eb(this,eo).emit("error",t),o(t),this.destroy()}});ev(this,es,()=>{n(),r.close(),o()});let{stream:a,stop:o}=i9(r.mp4file,500,this.destroy);return a}destroy(){var t;eb(this,et)||(ev(this,et,!0),null==(t=eb(this,es))||t.call(this),eb(this,eo).destroy())}}t7=new WeakMap,et=new WeakMap,ee=new WeakMap,ei=new WeakMap,er=new WeakMap,es=new WeakMap,en=new WeakMap,ea=new WeakMap,eo=new WeakMap,eh=new WeakSet,el=function(t){let{width:e,height:r,videoCodec:s,bitrate:n,audio:a,metaDataTags:o}=eb(this,en);return i4({video:eb(this,ea)?{width:e,height:r,expectFPS:30,codec:s,bitrate:n,__unsafe_hardwareAcceleration__:eb(this,en).__unsafe_hardwareAcceleration__}:null,audio:!1===a?null:{codec:"aac",sampleRate:iC.sampleRate,channelCount:iC.channelCount},duration:t,metaDataTags:o})},eu=function(t,e,{onProgress:r,onEnded:s,onError:n}){let a=0,o=!1,h=null;(async()=>{let r=0,{width:n,height:l}=eb(this,ei),d=eb(this,er),f=0;for(;;){if(null!=h)return;if(o||-1!==e&&f>e||0===eb(this,ee).length){u(),await s();return}a=f/e,d.fillStyle=eb(this,en).bgColor,d.fillRect(0,0,n,l);let p=[];for(let t of eb(this,ee)){if(o)break;if(f0&&f>t.time.offset+t.time.duration||r){if(t.main){u(),await s();return}t.destroy(),t.expired=!0}}if(o)return;if(!1!==eb(this,en).audio){if(p.flat().every(t=>0===t.length))t.encodeAudio(function(t,e,r){let s=Math.floor(33e3*r/1e6);return new AudioData({timestamp:t,numberOfChannels:iC.channelCount,numberOfFrames:s,sampleRate:r,format:"f32-planar",data:new Float32Array(2*s)})}(f,0,iC.sampleRate));else{let e=ib(p);t.encodeAudio(new AudioData({timestamp:f,numberOfChannels:iC.channelCount,numberOfFrames:e.length/iC.channelCount,sampleRate:iC.sampleRate,format:"f32-planar",data:e}))}}if(eb(this,ea)){let e=new VideoFrame(eb(this,ei),{duration:33e3,timestamp:f});t.encodeVideo(e,{keyFrame:r%150==0}),d.resetTransform(),d.clearRect(0,0,n,l),r+=1}f+=33e3,await rI(t.getEncodeQueueSize)}})().catch(t=>{h=t,eb(this,t7).error(t),u(),n(t)});let l=setInterval(()=>{r(a)},500),u=()=>{o||(o=!0,clearInterval(l),eb(this,ee).forEach(t=>t.destroy()))};return u}},{"718a311db185ef08":"juSMc","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],juSMc:[function(t,e,r){var s=t("9c62938f1dccc73c"),n=t("aceacb6a4531a9d2"),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return d(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!h.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|m(t,e),s=o(r),n=s.write(t,e);return n!==r&&(s=s.slice(0,n)),s}(t,e);if(ArrayBuffer.isView(t))return function(t){if(B(t,Uint8Array)){var e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(B(t,SharedArrayBuffer)||t&&B(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var s=t.valueOf&&t.valueOf();if(null!=s&&s!==t)return h.from(s,e,r);var n=function(t){if(h.isBuffer(t)){var e,r=0|c(t.length),s=o(r);return 0===s.length||t.copy(s,0,0,r),s}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?o(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return u(t),o(t<0?0:0|c(t))}function f(t){for(var e=t.length<0?0:0|c(t.length),r=o(e),s=0;s=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function m(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return A(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return C(t).length;default:if(n)return s?-1:A(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n,a,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var s=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>s)&&(r=s);for(var n="",a=e;a2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(a=r=+r)!=a&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return -1;r=t.length-1}else if(r<0){if(!n)return -1;r=0}if("string"==typeof e&&(e=h.from(e,s)),h.isBuffer(e))return 0===e.length?-1:b(t,e,r,s,n);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,s,n);throw TypeError("val must be string, number or Buffer")}function b(t,e,r,s,n){var a,o=1,h=t.length,l=e.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(t.length<2||e.length<2)return -1;o=2,h/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){var d=-1;for(a=r;ah&&(r=h-l),a=r;a>=0;a--){for(var f=!0,p=0;p239?4:u>223?3:u>191?2:1;if(n+f<=r)switch(f){case 1:u<128&&(d=u);break;case 2:(192&(a=t[n+1]))==128&&(l=(31&u)<<6|63&a)>127&&(d=l);break;case 3:a=t[n+1],o=t[n+2],(192&a)==128&&(192&o)==128&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:a=t[n+1],o=t[n+2],h=t[n+3],(192&a)==128&&(192&o)==128&&(192&h)==128&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&h)>65535&&l<1114112&&(d=l)}null===d?(d=65533,f=1):d>65535&&(d-=65536,s.push(d>>>10&1023|55296),d=56320|1023&d),s.push(d),n+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",s=0;sr)throw RangeError("Trying to access beyond buffer length")}function S(t,e,r,s,n,a){if(!h.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw RangeError("Index out of range")}function E(t,e,r,s,n,a){if(r+s>t.length||r<0)throw RangeError("Index out of range")}function U(t,e,r,s,a){return e=+e,r>>>=0,a||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),n.write(t,e,r,s,23,4),r+4}function x(t,e,r,s,a){return e=+e,r>>>=0,a||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),n.write(t,e,r,s,52,8),r+8}r.Buffer=h,r.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},r.INSPECT_MAX_BYTES=50,r.kMaxLength=2147483647,h.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,r){return(u(t),t<=0)?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},h.allocUnsafe=function(t){return d(t)},h.allocUnsafeSlow=function(t){return d(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(B(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),B(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,s=e.length,n=0,a=Math.min(r,s);ns.length?h.from(a).copy(s,n):Uint8Array.prototype.set.call(s,a,n);else if(h.isBuffer(a))a.copy(s,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=a.length}return s},h.byteLength=m,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;ee&&(t+=" ... "),""},a&&(h.prototype[a]=h.prototype.inspect),h.prototype.compare=function(t,e,r,s,n){if(B(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),e<0||r>t.length||s<0||n>this.length)throw RangeError("out of range index");if(s>=n&&e>=r)return 0;if(s>=n)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,s>>>=0,n>>>=0,this===t)return 0;for(var a=n-s,o=r-e,l=Math.min(a,o),u=this.slice(s,n),d=t.slice(e,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===s&&(s="utf8")):(s=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,a,o,h,l,u,d,f,p=this.length-e;if((void 0===r||r>p)&&(r=p),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");s||(s="utf8");for(var c=!1;;)switch(s){case"hex":return function(t,e,r,s){r=Number(r)||0;var n=t.length-r;s?(s=Number(s))>n&&(s=n):s=n;var a=e.length;s>a/2&&(s=a/2);for(var o=0;o>8,n.push(r%256),n.push(s);return n}(t,this.length-d),this,d,f);default:if(c)throw TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),c=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},h.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||v(t,e,this.length);for(var s=this[t],n=1,a=0;++a>>=0,e>>>=0,r||v(t,e,this.length);for(var s=this[t+--e],n=1;e>0&&(n*=256);)s+=this[t+--e]*n;return s},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||v(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var s=this[t],n=1,a=0;++a=(n*=128)&&(s-=Math.pow(2,8*e)),s},h.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var s=e,n=1,a=this[t+--s];s>0&&(n*=256);)a+=this[t+--s]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*e)),a},h.prototype.readInt8=function(t,e){return(t>>>=0,e||v(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||v(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){t>>>=0,e||v(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return t>>>=0,e||v(t,4,this.length),n.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||v(t,4,this.length),n.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||v(t,8,this.length),n.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||v(t,8,this.length),n.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,r,s){if(t=+t,e>>>=0,r>>>=0,!s){var n=Math.pow(2,8*r)-1;S(this,t,e,r,n,0)}var a=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!s){var n=Math.pow(2,8*r)-1;S(this,t,e,r,n,0)}var a=r-1,o=1;for(this[e+a]=255&t;--a>=0&&(o*=256);)this[e+a]=t/o&255;return e+r},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeIntLE=function(t,e,r,s){if(t=+t,e>>>=0,!s){var n=Math.pow(2,8*r-1);S(this,t,e,r,n-1,-n)}var a=0,o=1,h=0;for(this[e]=255&t;++a>0)-h&255;return e+r},h.prototype.writeIntBE=function(t,e,r,s){if(t=+t,e>>>=0,!s){var n=Math.pow(2,8*r-1);S(this,t,e,r,n-1,-n)}var a=r-1,o=1,h=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===h&&0!==this[e+a+1]&&(h=1),this[e+a]=(t/o>>0)-h&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return x(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return x(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,s){if(!h.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),s||0===s||(s=this.length),e>=t.length&&(e=t.length),e||(e=0),s>0&&s=this.length)throw RangeError("Index out of range");if(s<0)throw RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(n=e;n55295&&r<57344){if(!n){if(r>56319||o+1===s){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function C(t){return s.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function I(t,e,r,s){for(var n=0;n=e.length)&&!(n>=t.length);++n)e[n+r]=t[n];return n}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var k=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var s=16*r,n=0;n<16;++n)e[s+n]=t[r]+t[n];return e}()},{"9c62938f1dccc73c":"iaOvk",aceacb6a4531a9d2:"9RC4J"}],iaOvk:[function(t,e,r){r.byteLength=function(t){var e=u(t),r=e[0],s=e[1];return(r+s)*3/4-s},r.toByteArray=function(t){var e,r,s=u(t),o=s[0],h=s[1],l=new a((o+h)*3/4-h),d=0,f=h>0?o-4:o;for(r=0;r>16&255,l[d++]=e>>8&255,l[d++]=255&e;return 2===h&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[d++]=255&e),1===h&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[d++]=e>>8&255,l[d++]=255&e),l},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,a=[],o=0,h=r-n;o>18&63]+s[n>>12&63]+s[n>>6&63]+s[63&n]);return a.join("")}(t,o,o+16383>h?h:o+16383));return 1===n?a.push(s[(e=t[r-1])>>2]+s[e<<4&63]+"=="):2===n&&a.push(s[(e=(t[r-2]<<8)+t[r-1])>>10]+s[e>>4&63]+s[e<<2&63]+"="),a.join("")};for(var s=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,l=o.length;h0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var s=r===e?0:4-r%4;return[r,s]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],"9RC4J":[function(t,e,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh*/r.read=function(t,e,r,s,n){var a,o,h=8*n-s-1,l=(1<>1,d=-7,f=r?n-1:0,p=r?-1:1,c=t[e+f];for(f+=p,a=c&(1<<-d)-1,c>>=-d,d+=h;d>0;a=256*a+t[e+f],f+=p,d-=8);for(o=a&(1<<-d)-1,a>>=-d,d+=s;d>0;o=256*o+t[e+f],f+=p,d-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(c?-1:1);o+=Math.pow(2,s),a-=u}return(c?-1:1)*o*Math.pow(2,a-s)},r.write=function(t,e,r,s,n,a){var o,h,l,u=8*a-n-1,d=(1<>1,p=23===n?5960464477539062e-23:0,c=s?0:a-1,m=s?1:-1,g=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(h=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?e+=p/l:e+=p*Math.pow(2,1-f),e*l>=2&&(o++,l/=2),o+f>=d?(h=0,o=d):o+f>=1?(h=(e*l-1)*Math.pow(2,n),o+=f):(h=e*Math.pow(2,f-1)*Math.pow(2,n),o=0));n>=8;t[r+c]=255&h,c+=m,h/=256,n-=8);for(o=o<0;t[r+c]=255&o,c+=m,o/=256,u-=8);t[r+c-m]|=128*g}},{}],"9pCYc":[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}]},["jc2x7"],"jc2x7","parcelRequire4dc0"); \ No newline at end of file +!function(t,e,r,s,a,n,o,l){var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof h[s]&&h[s],u=d.i||{},p=d.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(e,r){if(!p[e]){if(!t[e]){if(a[e])return a[e];var n="function"==typeof h[s]&&h[s];if(!r&&n)return n(e,!0);if(d)return d(e,!0);if(c&&"string"==typeof e)return c(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}u.resolve=function(r){var s=t[e][1][r];return null!=s?s:r},u.cache={};var l=p[e]=new f.Module(e);t[e][0].call(l.exports,u,l,l.exports,h)}return p[e].exports;function u(t){var e=u.resolve(t);return!1===e?{}:f(e)}}f.isParcelRequire=!0,f.Module=function(t){this.id=t,this.bundle=f,this.require=c,this.exports={}},f.modules=t,f.cache=p,f.parent=d,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=u,f.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return h[s]}}),h[s]=f;for(var m=0;mo);var n=t("@webav/av-cliper");function o(t={}){return e=>{let r,s,{option:a,constructor:o}=e,{createElement:l,def:h}=o.utils,d=l("canvas"),u=d.getContext("2d"),p=null,c=null,f=null,m=null,_=0,g={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:a.muted,volume:a.volume,autoplay:a.autoplay};function y(){f&&(clearInterval(f),f=null),c&&(c.stop(),c=null)}function w(){if(s){let t=g.muted?0:g.volume;s.gain.setValueAtTime(t,r.currentTime)}}async function b(){r||(s=(r=new AudioContext).createGain()).connect(r.destination);let t=1e6*g.currentTime,a=0,n=!0,o=performance.now();async function l(){if(!g.playing)return;let l=performance.now(),h=l-o;o=l,null!==m?(t=1e6*m,m=null,n=!0):t+=1e3*h*g.playbackRate,g.currentTime=t/1e6;let{state:d,video:f,audio:_}=await p.tick(Math.round(t));if(e.emit("video:timeupdate",{type:"timeupdate"}),"done"===d){y(),g.ended=!0,g.playing=!1,g.paused=!0,e.emit("video:ended",{type:"ended"});return}if(f&&"success"===d&&(u.clearRect(0,0,g.videoWidth,g.videoHeight),u.drawImage(f,0,0,g.videoWidth,g.videoHeight),f.close()),n)n=!1;else if(_?.[0]?.length){let t=r.createBuffer(2,_[0].length,48e3);t.copyToChannel(_[0],0),t.copyToChannel(_[1],1),(c=r.createBufferSource()).buffer=t,c.connect(s),c.playbackRate.setValueAtTime(g.playbackRate,r.currentTime),a=Math.max(r.currentTime,a),c.start(a),a+=t.duration/g.playbackRate}}y(),w(),g.playing=!0,g.paused=!1,f=setInterval(l,1e3/60)}async function v(t){let{video:e}=await p.tick(1e6*t);e&&(u.clearRect(0,0,d.width,d.height),u.drawImage(e,0,0,d.width,d.height),e.close())}function S(){let t=e.template?.$player;if(!t||a.autoSize)return;let r=d.videoWidth/d.videoHeight,s=t.clientWidth,n=t.clientHeight,o=0,l=0;s/n>r?o=(s-n*r)/2:l=(n-s/r)/2,Object.assign(d.style,{padding:`${l}px ${o}px`})}async function x(){if(!await n.Combinator.isSupported())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");y(),Object.assign(g,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:a.muted,volume:a.volume,autoplay:a.autoplay}),p&&(p.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"}));try{await Promise.resolve(),g.readyState=1,e.emit("video:loadstart",{type:"loadstart"});let r=await fetch(a.url);if(!r.body)throw Error("No response body");p=new(0,n.MP4Clip)(r.body,t)}catch(t){throw g.readyState=0,e.emit("video:error",t),t}let r=await p.ready;Object.assign(g,{readyState:4,duration:Math.round(r.duration/1e6),videoWidth:r.width,videoHeight:r.height}),d.width=g.videoWidth,d.height=g.videoHeight,await v(.1),S(),e.emit("video:loadedmetadata",{type:"loadedmetadata"}),e.emit("video:durationchange",{type:"durationchange"}),e.emit("video:loadeddata",{type:"loadeddata"}),e.emit("video:canplay",{type:"canplay"}),e.emit("video:canplaythrough",{type:"canplaythrough"})}return h(d,"duration",{get:()=>g.duration}),h(d,"videoWidth",{get:()=>g.videoWidth}),h(d,"videoHeight",{get:()=>g.videoHeight}),h(d,"volume",{get:()=>g.volume,set:t=>{g.volume=Math.max(0,Math.min(1,t)),w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(d,"currentTime",{get:()=>g.currentTime,set:t=>{if(g.readyState<4)return;let r=Math.max(0,Math.min(t,g.duration)),s=performance.now();s-_>16&&(_=s,m=r,g.currentTime=r,g.playing||v(r),e.emit("video:timeupdate",{type:"timeupdate"}))}}),h(d,"autoplay",{get:()=>g.autoplay,set:t=>{g.autoplay=t,t&&g.readyState>=4&&d.play()}}),h(d,"src",{get:()=>a.url,set:t=>{a.url=t,x().then(()=>{a.autoplay&&d.play()})}}),h(d,"playbackRate",{get:()=>g.playbackRate,set:t=>{g.playbackRate=Math.max(.25,Math.min(2,t)),c&&c.playbackRate.setValueAtTime(g.playbackRate,r.currentTime),e.emit("video:ratechange",{type:"ratechange"})}}),h(d,"playing",{get:()=>g.playing}),h(d,"paused",{get:()=>g.paused}),h(d,"ended",{get:()=>g.ended}),h(d,"readyState",{get:()=>g.readyState}),h(d,"muted",{get:()=>g.muted,set:t=>{g.muted=t,w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(d,"buffered",{get:()=>({start:()=>0,end:()=>g.buffered,length:1})}),h(d,"play",{value:async()=>!(g.readyState<4)&&(await b(),e.emit("video:play",{type:"play"}),e.emit("video:playing",{type:"playing"}),!0)}),h(d,"pause",{value:()=>{y(),g.playing=!1,g.paused=!0,e.emit("video:pause",{type:"pause"})}}),e.on("destroy",()=>{y(),p&&p.destroy()}),e.on("resize",S),d}}"undefined"!=typeof window&&(window.artplayerProxyWebAV=o)},{"@webav/av-cliper":"4w9ns","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4w9ns":[function(t,e,r,s){var a,n,o,l,h,d,u,p,c,f,m,_,g,y,w,b,v,S,x,U,E,A,C,T,k,B,F,I,z,P,L,R,D,M,O,N,G,W,Y,H,V,j,Z,X,K,$,J,Q,q,tt,te,ti,tr,ts,ta,tn,to,tl,th,td,tu,tp,tc,tf,tm,t_,tg,ty,tw,tb,tv,tS,tx,tU,tE,tA,tC,tT,tk,tB,tF,tI,tz,tP,tL,tR,tD,tM,tO,tN,tG,tW,tY,tH,tV,tj,tZ,tX,tK,t$,tJ,tQ,tq,t0,t1,t2,t3,t6=t("@parcel/transformer-js/src/esmodule-helpers.js");t6.defineInteropFlag(r),t6.export(r,"AudioClip",()=>eO),t6.export(r,"Combinator",()=>ii),t6.export(r,"EmbedSubtitlesClip",()=>eH),t6.export(r,"ImgClip",()=>eD),t6.export(r,"Log",()=>t5.Log),t6.export(r,"MP4Clip",()=>eA),t6.export(r,"MediaStreamClip",()=>eW),t6.export(r,"OffscreenSprite",()=>e5),t6.export(r,"Rect",()=>e6),t6.export(r,"VisibleSprite",()=>e9),t6.export(r,"createChromakey",()=>e2),t6.export(r,"fastConcatMP4",()=>eZ),t6.export(r,"fixFMP4Duration",()=>eK),t6.export(r,"mixinMP4AndAudio",()=>e$),t6.export(r,"renderTxt2ImgBitmap",()=>eh);var t8=t("@webav/mp4box.js"),t4=t6.interopDefault(t8),t5=t("@webav/internal-utils"),t7=t("wave-resampler"),t9=t("opfs-tools"),et=Object.defineProperty,ee=t=>{throw TypeError(t)},ei=(t,e,r)=>e in t?et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,er=(t,e,r)=>ei(t,"symbol"!=typeof e?e+"":e,r),es=(t,e,r)=>e.has(t)||ee("Cannot "+r),ea=(t,e,r)=>(es(t,e,"read from private field"),r?r.call(t):e.get(t)),en=(t,e,r)=>e.has(t)?ee("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),eo=(t,e,r,s)=>(es(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r),el=(t,e,r)=>(es(t,e,"access private method"),r);async function eh(t,e){let r=function(t,e){let r=document.createElement("pre");r.style.cssText=`margin: 0; ${e}; visibility: hidden; position: fixed;`,r.textContent=t,document.body.appendChild(r);let{width:s,height:a}=r.getBoundingClientRect();r.remove(),r.style.visibility="visible";let n=new Image;n.width=s,n.height=a;let o=`
${r.outerHTML}
`.replace(/\t/g,"").replace(/#/g,"%23");return n.src=`data:image/svg+xml;charset=utf-8,${o}`,n}(t,e);await new Promise(t=>{r.onload=t});let s=new OffscreenCanvas(r.width,r.height),a=s.getContext("2d");return null==a||a.drawImage(r,0,0,r.width,r.height),await createImageBitmap(s)}function ed(t){let e=new Float32Array(t.map(t=>t.length).reduce((t,e)=>t+e)),r=0;for(let s of t)e.set(s,r),r+=s.length;return e}function eu(t){if("f32-planar"===t.format){let e=[];for(let r=0;rnew Float32Array(r));for(let a=0;anew Float32Array(r));for(let a=0;at.getChannelData(r))}async function ec(t,e){var r;let s=new ImageDecoder({type:e,data:t});await Promise.all([s.completed,s.tracks.ready]);let a=(null==(r=s.tracks.selectedTrack)?void 0:r.frameCount)??1,n=[];for(let t=0;t{var e;return(null==(e=t[0])?void 0:e.length)??0})),a=new Float32Array(2*s);for(let n=0;nnew Float32Array(0));if(0===s)return a;let n=Math.max(...t.map(t=>t.length));if(0===n)return a;if(null==globalThis.OfflineAudioContext)return t.map(t=>new Float32Array(t7.resample(t,e,r.rate,{method:"sinc",LPF:!1})));let o=new globalThis.OfflineAudioContext(r.chanCount,n*r.rate/e,r.rate),l=o.createBufferSource(),h=o.createBuffer(s,n,e);return t.forEach((t,e)=>h.copyToChannel(t,e)),l.buffer=h,l.connect(o.destination),l.start(),ep(await o.startRendering())}function e_(t){return new Promise(e=>{let r=(0,t5.workerTimer)(()=>{r(),e()},t)})}function eg(t,e,r){let s=r-e,a=new Float32Array(s),n=0;for(;n>7)],numberOfChannels:(127&a)>>3}}(e)}}return s}function ev(t,e="mp4a"){var r;let s=null==(r=t.moov)?void 0:r.traks.map(t=>t.mdia.minf.stbl.stsd.entries).flat().find(({type:t})=>t===e);return null==s?void 0:s.esds}async function eS(t,e,r){let s=t4.default.createFile(!1);async function a(){let e=0;for(;;){let r=await t.read(0x1e00000,{at:e});if(0===r.byteLength)break;r.fileStart=e;let a=s.appendBuffer(r);if(null==a)break;e=a}s.stop()}s.onReady=t=>{var r,a;e({mp4boxFile:s,info:t});let n=null==(r=t.videoTracks[0])?void 0:r.id;null!=n&&s.setExtractionOptions(n,"video",{nbSamples:100});let o=null==(a=t.audioTracks[0])?void 0:a.id;null!=o&&s.setExtractionOptions(o,"audio",{nbSamples:100}),s.start()},s.onSamples=r,await a()}let ex=0;function eU(t){return"file"===t.kind&&t.createReader instanceof Function}let eE=class t{constructor(t,e={}){if(en(this,a,ex++),en(this,n,t5.Log.create(`MP4Clip id:${ea(this,a)},`)),er(this,"ready"),en(this,o,!1),en(this,l,{duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0}),en(this,h),en(this,d,[]),en(this,u,1),en(this,p,[]),en(this,c,[]),en(this,f,null),en(this,m,null),en(this,_,{video:null,audio:null}),en(this,g,{audio:!0}),er(this,"tickInterceptor",async(t,e)=>e),en(this,y,new AbortController),!(t instanceof ReadableStream)&&!eU(t)&&!Array.isArray(t.videoSamples))throw Error("Illegal argument");eo(this,g,{audio:!0,...e}),eo(this,u,"object"==typeof e.audio&&"volume"in e.audio?e.audio.volume:1);let r=async t=>(await (0,t9.write)(ea(this,h),t),ea(this,h));eo(this,h,eU(t)?t:"localFile"in t?t.localFile:(0,t9.tmpfile)()),this.ready=(t instanceof ReadableStream?r(t).then(t=>eC(t,ea(this,g))):eU(t)?eC(t,ea(this,g)):Promise.resolve(t)).then(async({videoSamples:t,audioSamples:e,decoderConf:r,headerBoxPos:s})=>{var a,o,y,w,b;eo(this,p,t),eo(this,c,e),eo(this,_,r),eo(this,d,s);let{videoFrameFinder:v,audioFrameFinder:S}=(a={video:null==r.video?null:{...r.video,hardwareAcceleration:ea(this,g).__unsafe_hardwareAcceleration__},audio:r.audio},o=await ea(this,h).createReader(),y=t,w=e,{audioFrameFinder:0===(b=!1!==ea(this,g).audio?ea(this,u):0)||null==a.audio||0===w.length?null:new ek(o,w,a.audio,{volume:b,targetSampleRate:ew.sampleRate}),videoFrameFinder:null==a.video||0===y.length?null:new eT(o,y,a.video)});return eo(this,f,v),eo(this,m,S),eo(this,l,function(t,e,r){let s={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};null!=t.video&&e.length>0&&(s.width=t.video.codedWidth??0,s.height=t.video.codedHeight??0),null!=t.audio&&r.length>0&&(s.audioSampleRate=ew.sampleRate,s.audioChanCount=ew.channelCount);let a=0,n=0;if(e.length>0)for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r.deleted){a=r.cts+r.duration;break}}if(r.length>0){let t=r.at(-1);n=t.cts+t.duration}return s.duration=Math.max(a,n),s}(r,t,e)),ea(this,n).info("MP4Clip meta:",ea(this,l)),{...ea(this,l)}})}get meta(){return{...ea(this,l)}}async getFileHeaderBinData(){await this.ready;let t=await ea(this,h).getOriginFile();if(null==t)throw Error("MP4Clip localFile is not origin file");return await new Blob(ea(this,d).map(({start:e,size:r})=>t.slice(e,e+r))).arrayBuffer()}async tick(t){var e,r,s;if(t>=ea(this,l).duration)return await this.tickInterceptor(t,{audio:await (null==(e=ea(this,m))?void 0:e.find(t))??[],state:"done"});let[a,n]=await Promise.all([(null==(r=ea(this,m))?void 0:r.find(t))??[],null==(s=ea(this,f))?void 0:s.find(t)]);return null==n?await this.tickInterceptor(t,{audio:a,state:"success"}):await this.tickInterceptor(t,{video:n,audio:a,state:"success"})}async thumbnails(t=100,e){ea(this,y).abort(),eo(this,y,new AbortController);let r=ea(this,y).signal;await this.ready;let s="generate thumbnails aborted";if(r.aborted)throw Error(s);let{width:a,height:n}=ea(this,l),o=function(t,e,r){let s=new OffscreenCanvas(t,e),a=s.getContext("2d");return async n=>(a.drawImage(n,0,0,t,e),n.close(),await s.convertToBlob(r))}(t,Math.round(t/a*n),{quality:.1,type:"image/png"});return new Promise(async(t,a)=>{let n=[],d=ea(this,_).video;if(null==d||0===ea(this,p).length)return void u();async function u(){r.aborted||t(await Promise.all(n.map(async t=>({ts:t.ts,img:await t.img}))))}function c(t){n.push({ts:t.timestamp,img:o(t)})}r.addEventListener("abort",()=>{a(Error(s))});let{start:f=0,end:m=ea(this,l).duration,step:y}=e??{};if(y){let t=f,e=new eT(await ea(this,h).createReader(),ea(this,p),{...d,hardwareAcceleration:ea(this,g).__unsafe_hardwareAcceleration__});for(;t<=m&&!r.aborted;){let r=await e.find(t);r&&c(r),t+=y}e.destroy(),u()}else await ez(ea(this,p),ea(this,h),d,r,{start:f,end:m},(t,e)=>{null!=t&&c(t),e&&u()})})}async split(e){if(await this.ready,e<=0||e>=ea(this,l).duration)throw Error('"time" out of bounds');let[r,s]=function(t,e){if(0===t.length)return[];let r=0,s=0,a=-1;for(let n=0;n({...t}));for(let t=r;t({...t,cts:t.cts-e}));for(let t of l)t.cts<0&&(t.deleted=!0,t.cts=-1);return eP(l),[o,l]}(ea(this,p),e),[a,n]=function(t,e){if(0===t.length)return[];let r=-1;for(let s=0;st[s].cts)){r=s;break}if(-1===r)throw Error("Not found audio sample by time");return[t.slice(0,r).map(t=>({...t})),t.slice(r).map(t=>({...t,cts:t.cts-e}))]}(ea(this,c),e),o=new t({localFile:ea(this,h),videoSamples:r??[],audioSamples:a??[],decoderConf:ea(this,_),headerBoxPos:ea(this,d)},ea(this,g)),u=new t({localFile:ea(this,h),videoSamples:s??[],audioSamples:n??[],decoderConf:ea(this,_),headerBoxPos:ea(this,d)},ea(this,g));return await Promise.all([o.ready,u.ready]),[o,u]}async clone(){await this.ready;let e=new t({localFile:ea(this,h),videoSamples:[...ea(this,p)],audioSamples:[...ea(this,c)],decoderConf:ea(this,_),headerBoxPos:ea(this,d)},ea(this,g));return await e.ready,e.tickInterceptor=this.tickInterceptor,e}async splitTrack(){await this.ready;let e=[];if(ea(this,p).length>0){let r=new t({localFile:ea(this,h),videoSamples:[...ea(this,p)],audioSamples:[],decoderConf:{video:ea(this,_).video,audio:null},headerBoxPos:ea(this,d)},ea(this,g));await r.ready,r.tickInterceptor=this.tickInterceptor,e.push(r)}if(ea(this,c).length>0){let r=new t({localFile:ea(this,h),videoSamples:[],audioSamples:[...ea(this,c)],decoderConf:{audio:ea(this,_).audio,video:null},headerBoxPos:ea(this,d)},ea(this,g));await r.ready,r.tickInterceptor=this.tickInterceptor,e.push(r)}return e}destroy(){var t,e;ea(this,o)||(ea(this,n).info("MP4Clip destroy"),eo(this,o,!0),null==(t=ea(this,f))||t.destroy(),null==(e=ea(this,m))||e.destroy())}};a=new WeakMap,n=new WeakMap,o=new WeakMap,l=new WeakMap,h=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakMap,_=new WeakMap,g=new WeakMap,y=new WeakMap;let eA=eE;async function eC(t,e={}){let r=null,s={video:null,audio:null},a=[],n=[],o=[],l=-1,h=-1,d=await t.createReader();await eS(d,t=>{r=t.info;let e=t.mp4boxFile.ftyp;o.push({start:e.start,size:e.size});let a=t.mp4boxFile.moov;o.push({start:a.start,size:a.size});let{videoDecoderConf:n,audioDecoderConf:l}=eb(t.mp4boxFile,t.info);s.video=n??null,s.audio=l??null,null==n&&null==l&&t5.Log.error("MP4Clip no video and audio track"),t5.Log.info("mp4BoxFile moov ready",{...t.info,tracks:null,videoTracks:null,audioTracks:null},s)},(t,r,s)=>{if("video"===r)for(let t of(-1===l&&(l=s[0].dts),s))a.push(p(t,l,"video"));else if("audio"===r&&e.audio)for(let t of(-1===h&&(h=s[0].dts),s))n.push(p(t,h,"audio"))}),await d.close();let u=a.at(-1)??n.at(-1);if(null==r)throw Error("MP4Clip stream is done, but not emit ready");if(null==u)throw Error("MP4Clip stream not contain any sample");return eP(a),t5.Log.info("mp4 stream parsed"),{videoSamples:a,audioSamples:n,decoderConf:s,headerBoxPos:o};function p(t,e=0,r){let s="video"===r&&t.is_sync?function(t,e){if("avc1"!==e&&"hvc1"!==e)return 0;let r=new DataView(t.buffer),s=0;for(;s>1&63;if(19===t||20===t)return s}s+=r.getUint32(s)+4}return -1}(t.data,t.description.type):-1,a=t.offset,n=t.size;return s>=0&&(a+=s,n-=s),{...t,is_idr:s>=0,offset:a,size:n,cts:(t.cts-e)/t.timescale*1e6,dts:(t.dts-e)/t.timescale*1e6,duration:t.duration/t.timescale*1e6,timescale:1e6,data:"video"===r?null:t.data}}}class eT{constructor(t,e,r){en(this,w,null),en(this,b,0),en(this,v,{abort:!1,st:performance.now()}),er(this,"find",async t=>{(null==ea(this,w)||"closed"===ea(this,w).state||t<=ea(this,b)||t-ea(this,b)>3e6)&&ea(this,z).call(this,t),ea(this,v).abort=!0,eo(this,b,t),eo(this,v,{abort:!1,st:performance.now()});let e=await ea(this,B).call(this,t,ea(this,w),ea(this,v));return eo(this,T,0),e}),en(this,S,0),en(this,x,!1),en(this,U,0),en(this,E,[]),en(this,A,0),en(this,C,0),en(this,T,0),en(this,k,!1),en(this,B,async(t,e,r)=>{if(null==e||"closed"===e.state||r.abort)return null;if(ea(this,E).length>0){let s=ea(this,E)[0];return ts.timestamp+(s.duration??0)?(s.close(),await ea(this,B).call(this,t,e,r)):(!ea(this,k)&&ea(this,E).length<10&&ea(this,I).call(this,e).catch(e=>{throw eo(this,k,!0),ea(this,z).call(this,t),e}),s))}if(ea(this,F)||ea(this,A)0){if(performance.now()-r.st>6e3)throw Error(`MP4Clip.tick video timeout, ${JSON.stringify(ea(this,P).call(this))}`);eo(this,T,ea(this,T)+1),await e_(15)}else{if(ea(this,U)>=this.samples.length)return null;try{await ea(this,I).call(this,e)}catch(e){throw ea(this,z).call(this,t),e}}return await ea(this,B).call(this,t,e,r)}),en(this,F,!1),en(this,I,async t=>{var e,r;if(ea(this,F)||t.decodeQueueSize>600)return;let s=ea(this,U)+1;if(s>this.samples.length)return;eo(this,F,!0);let a=!1;for(;s1e3){let t=a[0],e=a.at(-1),r=e.offset+e.size-t.offset;t5.Log.warn(`Read video samples time cost: ${Math.round(n)}ms, file chunk size: ${r}`)}if("closed"===t.state)return;eo(this,S,(null==(r=s[0])?void 0:r.duration)??0),eI(t,s,{onDecodingError:t=>{if(ea(this,x))throw t;0===ea(this,A)&&(eo(this,x,!0),t5.Log.warn("Downgrade to software decode"),ea(this,z).call(this))}}),eo(this,C,ea(this,C)+s.length)}}eo(this,U,s),eo(this,F,!1)}),en(this,z,t=>{var e,r;if(eo(this,F,!1),ea(this,E).forEach(t=>t.close()),eo(this,E,[]),null==t||0===t)eo(this,U,0);else{let e=0;for(let r=0;r{if(eo(this,A,ea(this,A)+1),-1===t.timestamp)return void t.close();let e=t;null==t.duration&&(e=new VideoFrame(t,{duration:ea(this,S)}),t.close()),ea(this,E).push(e)},error:t=>{if(t.message.includes("Codec reclaimed due to inactivity")){eo(this,w,null),t5.Log.warn(t.message);return}let e=`VideoFinder VideoDecoder err: ${t.message}, config: ${JSON.stringify(s)}, state: ${JSON.stringify(ea(this,P).call(this))}`;throw t5.Log.error(e),Error(e)}})),ea(this,w).configure(s)}),en(this,P,()=>{var t,e;return{time:ea(this,b),decState:null==(t=ea(this,w))?void 0:t.state,decQSize:null==(e=ea(this,w))?void 0:e.decodeQueueSize,decCusorIdx:ea(this,U),sampleLen:this.samples.length,inputCnt:ea(this,C),outputCnt:ea(this,A),cacheFrameLen:ea(this,E).length,softDeocde:ea(this,x),clipIdCnt:ex,sleepCnt:ea(this,T),memInfo:eL()}}),er(this,"destroy",()=>{var t,e;(null==(t=ea(this,w))?void 0:t.state)!=="closed"&&(null==(e=ea(this,w))||e.close()),eo(this,w,null),ea(this,v).abort=!0,ea(this,E).forEach(t=>t.close()),eo(this,E,[]),this.localFileReader.close()}),this.localFileReader=t,this.samples=e,this.conf=r}}w=new WeakMap,b=new WeakMap,v=new WeakMap,S=new WeakMap,x=new WeakMap,U=new WeakMap,E=new WeakMap,A=new WeakMap,C=new WeakMap,T=new WeakMap,k=new WeakMap,B=new WeakMap,F=new WeakMap,I=new WeakMap,z=new WeakMap,P=new WeakMap;class ek{constructor(t,e,r,s){en(this,L,1),en(this,R),en(this,D,null),en(this,M,{abort:!1,st:performance.now()}),er(this,"find",async t=>{let e=t<=ea(this,O)||t-ea(this,O)>1e5;(null==ea(this,D)||"closed"===ea(this,D).state||e)&&ea(this,V).call(this),e&&(eo(this,O,t),eo(this,N,function(t,e){for(let r=0;r=s.cts&&tt)break}return 0}(t,this.samples))),ea(this,M).abort=!0;let r=t-ea(this,O);eo(this,O,t),eo(this,M,{abort:!1,st:performance.now()});let s=await ea(this,Y).call(this,Math.ceil(r*(ea(this,R)/1e6)),ea(this,D),ea(this,M));return eo(this,W,0),s}),en(this,O,0),en(this,N,0),en(this,G,{frameCnt:0,data:[]}),en(this,W,0),en(this,Y,async(t,e=null,r)=>{if(null==e||r.abort||"closed"===e.state||0===t)return[];let s=ea(this,G).frameCnt-t;if(s>0)return s3e3)throw r.abort=!0,Error(`MP4Clip.tick audio timeout, ${JSON.stringify(ea(this,j).call(this))}`);eo(this,W,ea(this,W)+1),await e_(15)}else{if(ea(this,N)>=this.samples.length-1)return eB(ea(this,G),ea(this,G).frameCnt);ea(this,H).call(this,e)}return ea(this,Y).call(this,t,e,r)}),en(this,H,t=>{if(t.decodeQueueSize>10)return;let e=[],r=ea(this,N);for(;r=10))break}eo(this,N,r),t.decode(e.map(t=>new EncodedAudioChunk({type:"key",timestamp:t.cts,duration:t.duration,data:t.data})))}),en(this,V,()=>{var t;eo(this,O,0),eo(this,N,0),eo(this,G,{frameCnt:0,data:[]}),null==(t=ea(this,D))||t.close(),eo(this,D,function(t,e,r){let s=0,a=0,n=t=>{if(a+=1,0!==t.length){if(1!==e.volume)for(let r of t)for(let t=0;t{let r=a;a+=1,t().then(t=>{e[r]=t,s()}).catch(t=>{e[r]=t,s()})}}(n),l=e.resampleRate!==t.sampleRate,h=new AudioDecoder({output:t=>{let r=eu(t);l?o(()=>em(r,t.sampleRate,{rate:e.resampleRate,chanCount:t.numberOfChannels})):n(r),t.close()},error:t=>{t.message.includes("Codec reclaimed due to inactivity")||d("MP4Clip AudioDecoder err",t)}});function d(t,e){let r=`${t}: ${e.message}, state: ${JSON.stringify({qSize:h.decodeQueueSize,state:h.state,inputCnt:s,outputCnt:a})}`;throw t5.Log.error(r),Error(r)}return h.configure(t),{decode(t){s+=t.length;try{for(let e of t)h.decode(e)}catch(t){d("decode audio chunk error",t)}},close(){"closed"!==h.state&&h.close()},get decoding(){return s>a&&h.decodeQueueSize>0},get state(){return h.state},get decodeQueueSize(){return h.decodeQueueSize}}}(this.conf,{resampleRate:ew.sampleRate,volume:ea(this,L)},t=>{ea(this,G).data.push(t),ea(this,G).frameCnt+=t[0].length}))}),en(this,j,()=>{var t,e;return{time:ea(this,O),decState:null==(t=ea(this,D))?void 0:t.state,decQSize:null==(e=ea(this,D))?void 0:e.decodeQueueSize,decCusorIdx:ea(this,N),sampleLen:this.samples.length,pcmLen:ea(this,G).frameCnt,clipIdCnt:ex,sleepCnt:ea(this,W),memInfo:eL()}}),er(this,"destroy",()=>{eo(this,D,null),ea(this,M).abort=!0,eo(this,G,{frameCnt:0,data:[]}),this.localFileReader.close()}),this.localFileReader=t,this.samples=e,this.conf=r,eo(this,L,s.volume),eo(this,R,s.targetSampleRate)}}function eB(t,e){let r=[new Float32Array(e),new Float32Array(e)],s=0,a=0;for(;ae){let l=e-s;r[0].set(n.subarray(0,l),s),r[1].set(o.subarray(0,l),s),t.data[a][0]=n.subarray(l,n.length),t.data[a][1]=o.subarray(l,o.length);break}r[0].set(n,s),r[1].set(o,s),s+=n.length,a++}return t.data=t.data.slice(a),t.frameCnt-=e,r}async function eF(t,e){let r=t[0],s=t.at(-1);if(null==s)return[];let a=s.offset+s.size-r.offset;if(a<3e7){let s=new Uint8Array(await e.read(a,{at:r.offset}));return t.map(t=>{let e=t.offset-r.offset;return new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:s.subarray(e,e+t.size)})})}return await Promise.all(t.map(async t=>new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:await e.read(t.size,{at:t.offset})})))}function eI(t,e,r){let s=0;if("configured"===t.state){for(;s{if(!(t instanceof Error))throw t;if(t.message.includes("Decoding error")&&null!=r.onDecodingError)return void r.onDecodingError(t);if(!t.message.includes("Aborted due to close"))throw t})}}async function ez(t,e,r,s,a,n){let o=await e.createReader(),l=await eF(t.filter(t=>!t.deleted&&t.is_sync&&t.cts>=a.start&&t.cts<=a.end),o);if(0===l.length||s.aborted)return;let h=0;function d(t=!1){let e={...r,...t?{hardwareAcceleration:"prefer-software"}:{}},a=new VideoDecoder({output:t=>{let e=(h+=1)===l.length;n(t,e),e&&(o.close(),"closed"!==a.state&&a.close())},error:t=>{let r=`thumbnails decoder error: ${t.message}, config: ${JSON.stringify(e)}, state: ${JSON.stringify({qSize:a.decodeQueueSize,state:a.state,outputCnt:h,inputCnt:l.length})}`;throw t5.Log.error(r),Error(r)}});return s.addEventListener("abort",()=>{o.close(),"closed"!==a.state&&a.close()}),a.configure(e),a}eI(d(),l,{onDecodingError:t=>{t5.Log.warn("thumbnailsByKeyFrame",t),0===h?eI(d(!0),l,{onDecodingError:t=>{o.close(),t5.Log.error("thumbnailsByKeyFrame retry soft deocde",t)}}):(n(null,!0),o.close())}})}function eP(t){let e=0,r=null;for(let s of t)if(!s.deleted){if(s.is_sync&&(e+=1),e>=2)break;(null==r||s.ctse);let e=t=>(eo(this,X,t),ea(this,Z).width=t.width,ea(this,Z).height=t.height,ea(this,Z).duration=1/0,{...ea(this,Z)});if(t instanceof ReadableStream)this.ready=new Response(t).blob().then(t=>createImageBitmap(t)).then(e);else if(t instanceof ImageBitmap)this.ready=Promise.resolve(e(t));else if(Array.isArray(t)&&t.every(t=>t instanceof VideoFrame)){eo(this,K,t);let e=ea(this,K)[0];if(null==e)throw Error("The frame count must be greater than 0");eo(this,Z,{width:e.displayWidth,height:e.displayHeight,duration:ea(this,K).reduce((t,e)=>t+(e.duration??0),0)}),this.ready=Promise.resolve({...ea(this,Z),duration:1/0})}else if("type"in t)this.ready=el(this,$,J).call(this,t.stream,t.type).then(()=>({width:ea(this,Z).width,height:ea(this,Z).height,duration:1/0}));else throw Error("Illegal arguments")}get meta(){return{...ea(this,Z)}}async tick(t){if(null!=ea(this,X))return await this.tickInterceptor(t,{video:await createImageBitmap(ea(this,X)),state:"success"});let e=t%ea(this,Z).duration;return await this.tickInterceptor(t,{video:(ea(this,K).find(t=>e>=t.timestamp&&e<=t.timestamp+(t.duration??0))??ea(this,K)[0]).clone(),state:"success"})}async split(e){if(await this.ready,null!=ea(this,X))return[new t(await createImageBitmap(ea(this,X))),new t(await createImageBitmap(ea(this,X)))];let r=-1;for(let t=0;tea(this,K)[t].timestamp)){r=t;break}if(-1===r)throw Error("Not found frame by time");let s=ea(this,K).slice(0,r).map(t=>new VideoFrame(t)),a=ea(this,K).slice(r).map(t=>new VideoFrame(t,{timestamp:t.timestamp-e}));return[new t(s),new t(a)]}async clone(){return await this.ready,new t(null==ea(this,X)?ea(this,K).map(t=>t.clone()):await createImageBitmap(ea(this,X)))}destroy(){var t;t5.Log.info("ImgClip destroy"),null==(t=ea(this,X))||t.close(),ea(this,K).forEach(t=>t.close())}};Z=new WeakMap,X=new WeakMap,K=new WeakMap,$=new WeakSet,J=async function(t,e){eo(this,K,await ec(t,e));let r=ea(this,K)[0];if(null==r)throw Error("No frame available in gif");eo(this,Z,{duration:ea(this,K).reduce((t,e)=>t+(e.duration??0),0),width:r.codedWidth,height:r.codedHeight}),t5.Log.info("ImgClip ready:",ea(this,Z))};let eD=eR,eM=class t{constructor(t,e={}){en(this,ti),er(this,"ready"),en(this,Q,{duration:0,width:0,height:0}),en(this,q,new Float32Array),en(this,tt,new Float32Array),en(this,te),er(this,"tickInterceptor",async(t,e)=>e),en(this,ts,0),en(this,ta,0),eo(this,te,{loop:!1,volume:1,...e}),this.ready=el(this,ti,tr).call(this,t).then(()=>({width:0,height:0,duration:e.loop?1/0:ea(this,Q).duration}))}get meta(){return{...ea(this,Q),sampleRate:ew.sampleRate,chanCount:2}}getPCMData(){return[ea(this,q),ea(this,tt)]}async tick(t){if(!ea(this,te).loop&&t>=ea(this,Q).duration)return await this.tickInterceptor(t,{audio:[],state:"done"});let e=t-ea(this,ts);if(t3e6)return eo(this,ts,t),eo(this,ta,Math.ceil(ea(this,ts)/1e6*ew.sampleRate)),await this.tickInterceptor(t,{audio:[new Float32Array(0),new Float32Array(0)],state:"success"});eo(this,ts,t);let r=Math.ceil(e/1e6*ew.sampleRate),s=ea(this,ta)+r,a=ea(this,te).loop?[eg(ea(this,q),ea(this,ta),s),eg(ea(this,tt),ea(this,ta),s)]:[ea(this,q).slice(ea(this,ta),s),ea(this,tt).slice(ea(this,ta),s)];return eo(this,ta,s),await this.tickInterceptor(t,{audio:a,state:"success"})}async split(e){await this.ready;let r=Math.ceil(e/1e6*ew.sampleRate);return[new t(this.getPCMData().map(t=>t.slice(0,r)),ea(this,te)),new t(this.getPCMData().map(t=>t.slice(r)),ea(this,te))]}async clone(){await this.ready;let e=new t(this.getPCMData(),ea(this,te));return await e.ready,e}destroy(){eo(this,q,new Float32Array(0)),eo(this,tt,new Float32Array(0)),t5.Log.info("---- audioclip destroy ----")}};Q=new WeakMap,q=new WeakMap,tt=new WeakMap,te=new WeakMap,ti=new WeakSet,tr=async function(t){null==eM.ctx&&(eM.ctx=new AudioContext({sampleRate:ew.sampleRate}));let e=performance.now(),r=t instanceof ReadableStream?await eN(t,eM.ctx):t;t5.Log.info("Audio clip decoded complete:",performance.now()-e);let s=ea(this,te).volume;if(1!==s)for(let t of r)for(let e=0;e{}),er(this,"audioTrack"),en(this,tl,null),en(this,th),eo(this,th,t),this.audioTrack=t.getAudioTracks()[0]??null,ea(this,tn).duration=1/0;let e=t.getVideoTracks()[0];null!=e?(e.contentHint="motion",this.ready=new Promise(t=>{var r,s;let a,n;eo(this,to,(r=e,s=e=>{ea(this,tn).width=e.width,ea(this,tn).height=e.height,eo(this,tl,e),t(this.meta)},a=!1,(0,t5.autoReadStream)(new MediaStreamTrackProcessor({track:r}).readable,{onChunk:async t=>{if(!a){let{displayHeight:e,displayWidth:r}=t,o=new OffscreenCanvas(r??0,e??0);n=o.getContext("2d"),s(o),a=!0}n.drawImage(t,0,0),t.close()},onDone:async()=>{}})))})):this.ready=Promise.resolve(this.meta)}get meta(){return{...ea(this,tn)}}async tick(){return{video:null==ea(this,tl)?null:await createImageBitmap(ea(this,tl)),audio:[],state:"success"}}async split(){return[await this.clone(),await this.clone()]}async clone(){return new t(ea(this,th).clone())}destroy(){ea(this,th).getTracks().forEach(t=>t.stop()),ea(this,to).call(this)}};tn=new WeakMap,to=new WeakMap,tl=new WeakMap,th=new WeakMap,er(eG,"ctx",null);let eW=eG,eY=class t{constructor(t,e){var r;if(en(this,ty),er(this,"ready"),en(this,td,[]),en(this,tu,{width:0,height:0,duration:0}),en(this,tp,{color:"#FFF",textBgColor:null,type:"srt",fontSize:30,letterSpacing:null,bottomOffset:30,fontFamily:"Noto Sans SC",strokeStyle:"#000",lineWidth:null,lineCap:null,lineJoin:null,textShadow:{offsetX:2,offsetY:2,blur:4,color:"#000"},videoWidth:1280,videoHeight:720}),en(this,tc),en(this,tf),en(this,tm,null),en(this,t_,0),en(this,tg,0),eo(this,td,Array.isArray(t)?t:t.split(/\r|\n/).map(t=>t.trim()).filter(t=>t.length>0).map(t=>({lineStr:t,match:t.match(/(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/)})).filter(({lineStr:t},e,r)=>{var s;return!(/^\d+$/.test(t)&&(null==(s=r[e+1])?void 0:s.match)!=null)}).reduce((t,{lineStr:e,match:r})=>{if(null==r){let r=t.at(-1);if(null==r)return t;r.text+=0===r.text.length?e:` ${e}`}else t.push({start:eV(r[1]),end:eV(r[2]),text:""});return t},[]).map(({start:t,end:e,text:r})=>({start:1e6*t,end:1e6*e,text:r}))),0===ea(this,td).length)throw Error("No subtitles content");eo(this,tp,Object.assign(ea(this,tp),e)),eo(this,tg,null==e.textBgColor?0:(e.fontSize??50)*.2);let{fontSize:s,fontFamily:a,videoWidth:n,videoHeight:o,letterSpacing:l}=ea(this,tp);eo(this,t_,s+2*ea(this,tg)),eo(this,tc,new OffscreenCanvas(n,o)),eo(this,tf,ea(this,tc).getContext("2d")),ea(this,tf).font=`${s}px ${a}`,ea(this,tf).textAlign="center",ea(this,tf).textBaseline="top",ea(this,tf).letterSpacing=l??"0px",eo(this,tu,{width:n,height:o,duration:(null==(r=ea(this,td).at(-1))?void 0:r.end)??0}),this.ready=Promise.resolve(this.meta)}get meta(){return{...ea(this,tu)}}async tick(t){var e,r;if(null!=ea(this,tm)&&t>=ea(this,tm).timestamp&&t<=ea(this,tm).timestamp+(ea(this,tm).duration??0))return{video:ea(this,tm).clone(),state:"success"};let s=0;for(;sa.end)return{state:"done"};if(tea(this,td)[t].start)){r=t;break}if(-1===r)throw Error("Not found subtitle by time");let s=ea(this,td).slice(0,r).map(t=>({...t})),a=s.at(-1),n=null;null!=a&&a.end>e&&(n={start:0,end:a.end-e,text:a.text},a.end=e);let o=ea(this,td).slice(r).map(t=>({...t,start:t.start-e,end:t.end-e}));return null!=n&&o.unshift(n),[new t(s,ea(this,tp)),new t(o,ea(this,tp))]}async clone(){return new t(ea(this,td).slice(0),ea(this,tp))}destroy(){var t;null==(t=ea(this,tm))||t.close()}};td=new WeakMap,tu=new WeakMap,tp=new WeakMap,tc=new WeakMap,tf=new WeakMap,tm=new WeakMap,t_=new WeakMap,tg=new WeakMap,ty=new WeakSet,tw=function(t){let e=t.split(` `).reverse().map(t=>t.trim()),{width:r,height:s}=ea(this,tc),{color:a,fontSize:n,textBgColor:o,textShadow:l,strokeStyle:h,lineWidth:d,lineCap:u,lineJoin:p,bottomOffset:c}=ea(this,tp),f=ea(this,tf);f.clearRect(0,0,r,s),f.globalAlpha=.6;let m=c;for(let t of e){let e=f.measureText(t),c=r/2;null!=o&&(f.shadowOffsetX=0,f.shadowOffsetY=0,f.shadowBlur=0,f.fillStyle=o,f.globalAlpha=.5,f.fillRect(c-e.actualBoundingBoxLeft-ea(this,tg),s-m-ea(this,t_),e.width+2*ea(this,tg),ea(this,t_))),f.shadowColor=l.color,f.shadowOffsetX=l.offsetX,f.shadowOffsetY=l.offsetY,f.shadowBlur=l.blur,f.globalAlpha=1,null!=h&&(f.lineWidth=d??n/6,null!=u&&(f.lineCap=u),null!=p&&(f.lineJoin=p),f.strokeStyle=h,f.strokeText(t,c,s-m-ea(this,t_)+ea(this,tg))),f.fillStyle=a,f.fillText(t,c,s-m-ea(this,t_)+ea(this,tg)),m+=ea(this,t_)+.2*n}};let eH=eY;function eV(t){let e=t.match(/(\d{2}):(\d{2}):(\d{2}),(\d{3})/);if(null==e)throw Error(`time format error: ${t}`);let r=Number(e[1]),s=Number(e[2]);return 3600*r+60*s+Number(e[3])+Number(e[4])/1e3}class ej{constructor(){er(this,"readable"),er(this,"writable"),en(this,tb,0);let t=t4.default.createFile(),e=!1;this.readable=new ReadableStream({start:e=>{t.onReady=r=>{var s,a;let n=null==(s=r.videoTracks[0])?void 0:s.id;null!=n&&t.setExtractionOptions(n,"video",{nbSamples:100});let o=null==(a=r.audioTracks[0])?void 0:a.id;null!=o&&t.setExtractionOptions(o,"audio",{nbSamples:100}),e.enqueue({chunkType:"ready",data:{info:r,file:t}}),t.start()};let r={};t.onSamples=(s,a,n)=>{e.enqueue({chunkType:"samples",data:{id:s,type:a,samples:n.map(t=>({...t}))}}),r[s]=(r[s]??0)+n.length,t.releaseUsedSamples(s,r[s])},t.onFlush=()=>{e.close()}},cancel:()=>{t.stop(),e=!0}},{highWaterMark:50}),this.writable=new WritableStream({write:async r=>{if(e)return void this.writable.abort();let s=r.buffer;s.fileStart=ea(this,tb),eo(this,tb,ea(this,tb)+s.byteLength),t.appendBuffer(s)},close:()=>{var e;t.flush(),t.stop(),null==(e=t.onFlush)||e.call(t)}})}}async function eZ(t){let e=t4.default.createFile(),r=function(t){let e=0,r=t.boxes,s=[],a=0;async function n(){let n=f(r,e);e=r.length,s.forEach(({track:e,id:r})=>{let s=e.samples.at(-1);null!=s&&(a=Math.max(a,s.cts+s.duration)),t.releaseUsedSamples(r,e.samples.length),e.samples=[]}),t.mdats=[],t.moofs=[],null!=n&&await (null==u?void 0:u.write(n))}let o=[];function l(){if(o.length>0)return!0;let a=r.findIndex(t=>"moov"===t.type);if(-1===a)return!1;if(o=r.slice(0,a+1),e=a+1,0===s.length)for(let e=1;;e+=1){let r=t.getTrackById(e);if(null==r)break;s.push({track:r,id:e})}return!0}let h=0,d=(0,t9.tmpfile)(),u=null,p=(async()=>{u=await d.createWriter(),h=self.setInterval(()=>{l()&&n()},100)})(),c=!1;return async()=>{if(c)throw Error("File exported");if(c=!0,await p,clearInterval(h),!l()||null==u)return null;t.flush(),await n(),await (null==u?void 0:u.close());let e=o.find(t=>"moov"===t.type);if(null==e)return null;e.mvhd.duration=a;let r=(0,t9.tmpfile)(),s=f(o,0);return await (0,t9.write)(r,s),await (0,t9.write)(r,d,{overwrite:!1}),await r.stream()};function f(t,e){if(e>=t.length)return null;let r=new t4.default.DataStream;r.endianness=t4.default.DataStream.BIG_ENDIAN;for(let s=e;s{(0,t5.autoReadStream)(u.pipeThrough(new ej),{onDone:t,onChunk:async({chunkType:t,data:u})=>{if("ready"===t){let{videoTrackConf:t,audioTrackConf:s}=eb(u.file,u.info);0===r&&null!=t&&(r=e.addTrack(t)),0===n&&null!=s&&(n=e.addTrack(s))}else if("samples"===t){let{type:t,samples:p}=u,c="video"===t?r:n,f="video"===t?s:o,m="video"===t?a:l;p.forEach(t=>{e.addSample(c,t.data,{duration:t.duration,dts:t.dts+f,cts:t.cts+m,is_sync:t.is_sync})});let _=p.at(-1);if(null==_)return;"video"===t?h=_:"audio"===t&&(d=_)}}})}),null!=h&&(s+=h.dts,a+=h.cts),null!=d&&(o+=d.dts,l+=d.cts)}async function eK(t){return await eZ([t])}function e$(t,e){t5.Log.info("mixinMP4AndAudio, opts:",{volume:e.volume,loop:e.loop});let r=t4.default.createFile(),{stream:s,stop:a}=(0,t5.file2stream)(r,500),n=null,o=null,l=[],h=0,d=0,u=0,p=!0,c=ew.sampleRate;function f(t){let r=l.map(r=>e.loop?eg(r,u,u+t):r.slice(u,u+t));if(u+=t,1!==e.volume)for(let t of r)for(let r=0;r{await (null==o?void 0:o.stop()),null==n||n.close(),a()},onChunk:async({chunkType:t,data:s})=>{if("ready"===t){let{videoTrackConf:t,audioTrackConf:a,audioDecoderConf:u}=eb(s.file,s.info);0===h&&null!=t&&(h=r.addTrack(t));let f=a??{timescale:1e6,samplerate:c,channel_count:ew.channelCount,hdlr:"soun",name:"SoundHandler",type:"mp4a"};0===d&&(d=r.addTrack(f),c=(null==a?void 0:a.samplerate)??c,p=null!=a);let m=new AudioContext({sampleRate:c});l=ep(await m.decodeAudioData(await new Response(e.stream).arrayBuffer())),null!=u&&(n=function(t){let e=[],r=new AudioDecoder({output:t=>{e.push(t)},error:t5.Log.error});return r.configure(t),{decode:async t=>{t.forEach(t=>{r.decode(new EncodedAudioChunk({type:t.is_sync?"key":"delta",timestamp:1e6*t.cts/t.timescale,duration:1e6*t.duration/t.timescale,data:t.data}))}),await r.flush();let s=e;return e=[],s},close:()=>{r.close()}}}(u)),o=function(t,e){let r={codec:t.codec,sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels},s=new AudioEncoder({output:t=>{e(function(t){let e=new ArrayBuffer(t.byteLength);t.copyTo(e);let r=t.timestamp;return{duration:t.duration??0,dts:r,cts:r,is_sync:"key"===t.type,data:e}}(t))},error:t=>{t5.Log.error("AudioEncoder error:",t,", config:",r)}});s.configure(r);let a=null;function n(e,r){return new AudioData({timestamp:r,numberOfChannels:t.numberOfChannels,numberOfFrames:e.length/t.numberOfChannels,sampleRate:t.sampleRate,format:"f32-planar",data:e})}return{encode:async(t,e)=>{null!=a&&s.encode(n(a.data,a.ts)),a={data:t,ts:e}},stop:async()=>{null!=a&&(function(t,e,r){let s=t.length-1,a=Math.min(r/2,s);for(let r=0;rr.addSample(d,t.data,t))}else if("samples"===t){let{id:t,type:e,samples:a}=s;if("video"===e){a.forEach(e=>r.addSample(t,e.data,e)),p||await m(a);return}"audio"===e&&await _(a)}}}),s}tb=new WeakMap;let eJ=`#version 300 es layout (location = 0) in vec4 a_position; layout (location = 1) in vec2 a_texCoord; out vec2 v_texCoord; void main () { gl_Position = a_position; v_texCoord = a_texCoord; } `,eQ=`#version 300 es precision mediump float; out vec4 FragColor; in vec2 v_texCoord; uniform sampler2D frameTexture; uniform vec3 keyColor; // \u{8272}\u{5EA6}\u{7684}\u{76F8}\u{4F3C}\u{5EA6}\u{8BA1}\u{7B97} uniform float similarity; // \u{900F}\u{660E}\u{5EA6}\u{7684}\u{5E73}\u{6ED1}\u{5EA6}\u{8BA1}\u{7B97} uniform float smoothness; // \u{964D}\u{4F4E}\u{7EFF}\u{5E55}\u{9971}\u{548C}\u{5EA6}\u{FF0C}\u{63D0}\u{9AD8}\u{62A0}\u{56FE}\u{51C6}\u{786E}\u{5EA6} uniform float spill; vec2 RGBtoUV(vec3 rgb) { return vec2( rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5, rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5 ); } void main() { // \u{83B7}\u{53D6}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{7684}rgba\u{503C} vec4 rgba = texture(frameTexture, v_texCoord); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{4E0E}\u{7EFF}\u{5E55}\u{50CF}\u{7D20}\u{7684}\u{8272}\u{5EA6}\u{5DEE}\u{503C} vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{4E0E}\u{7EFF}\u{5E55}\u{50CF}\u{7D20}\u{7684}\u{8272}\u{5EA6}\u{8DDD}\u{79BB}\u{FF08}\u{5411}\u{91CF}\u{957F}\u{5EA6}\u{FF09}, \u{8D8A}\u{76F8}\u{50CF}\u{5219}\u{8272}\u{5EA6}\u{8DDD}\u{79BB}\u{8D8A}\u{5C0F} float chromaDist = sqrt(dot(chromaVec, chromaVec)); // \u{8BBE}\u{7F6E}\u{4E86}\u{4E00}\u{4E2A}\u{76F8}\u{4F3C}\u{5EA6}\u{9608}\u{503C}\u{FF0C}baseMask\u{4E3A}\u{8D1F}\u{FF0C}\u{5219}\u{8868}\u{660E}\u{662F}\u{7EFF}\u{5E55}\u{FF0C}\u{4E3A}\u{6B63}\u{5219}\u{8868}\u{660E}\u{4E0D}\u{662F}\u{7EFF}\u{5E55} float baseMask = chromaDist - similarity; // \u{5982}\u{679C}baseMask\u{4E3A}\u{8D1F}\u{6570}\u{FF0C}fullMask\u{7B49}\u{4E8E}0\u{FF1B}baseMask\u{4E3A}\u{6B63}\u{6570}\u{FF0C}\u{8D8A}\u{5927}\u{FF0C}\u{5219}\u{900F}\u{660E}\u{5EA6}\u{8D8A}\u{4F4E} float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5); rgba.a = fullMask; // \u{8BBE}\u{7F6E}\u{900F}\u{660E}\u{5EA6} // \u{5982}\u{679C}baseMask\u{4E3A}\u{8D1F}\u{6570}\u{FF0C}spillVal\u{7B49}\u{4E8E}0\u{FF1B}baseMask\u{4E3A}\u{6574}\u{6570}\u{FF0C}\u{8D8A}\u{5C0F}\u{FF0C}\u{9971}\u{548C}\u{5EA6}\u{8D8A}\u{4F4E} float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5); float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{7684}\u{7070}\u{5EA6}\u{503C} rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal); FragColor = rgba; } `,eq=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1],e0=[0,1,0,0,1,0,1,0,1,1,0,1];function e1(t,e,r){let s=t.createShader(e);if(t.shaderSource(s,r),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS)){let e=t.getShaderInfoLog(s);throw t.deleteShader(s),Error(e??"An error occurred compiling the shaders")}return s}let e2=t=>{let e=null,r=null,s=t.keyColor,a=null;return async n=>{var o,l;if((null==e||null==r||null==a)&&(null==s&&(s=function(t){let e=new OffscreenCanvas(1,1).getContext("2d");e.drawImage(t,0,0);let{data:[r,s,a]}=e.getImageData(0,0,1,1);return[r,s,a]}(n)),{cvs:e,gl:r}=function(t){let e="document"in globalThis?globalThis.document.createElement("canvas"):new OffscreenCanvas(t.width,t.height);e.width=t.width,e.height=t.height;let r=e.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0});if(null==r)throw Error("Cant create gl context");let s=function(t,e,r){let s=e1(t,t.VERTEX_SHADER,e),a=e1(t,t.FRAGMENT_SHADER,r),n=t.createProgram();if(t.attachShader(n,s),t.attachShader(n,a),t.linkProgram(n),!t.getProgramParameter(n,t.LINK_STATUS))throw Error(t.getProgramInfoLog(n)??"Unable to initialize the shader program");return n}(r,eJ,eQ);r.useProgram(s),r.uniform3fv(r.getUniformLocation(s,"keyColor"),t.keyColor.map(t=>t/255)),r.uniform1f(r.getUniformLocation(s,"similarity"),t.similarity),r.uniform1f(r.getUniformLocation(s,"smoothness"),t.smoothness),r.uniform1f(r.getUniformLocation(s,"spill"),t.spill);let a=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,a),r.bufferData(r.ARRAY_BUFFER,new Float32Array(eq),r.STATIC_DRAW);let n=r.getAttribLocation(s,"a_position");r.vertexAttribPointer(n,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(n);let o=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e0),r.STATIC_DRAW);let l=r.getAttribLocation(s,"a_texCoord");return r.vertexAttribPointer(l,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(l),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1),{cvs:e,gl:r}}({...n instanceof VideoFrame?{width:n.codedWidth,height:n.codedHeight}:{width:n.width,height:n.height},keyColor:s,...t}),a=function(t){let e=t.createTexture();if(null==e)throw Error("Create WebGL texture error");t.bindTexture(t.TEXTURE_2D,e);let r=t.RGBA,s=t.RGBA,a=t.UNSIGNED_BYTE,n=new Uint8Array([0,0,255,255]);return t.texImage2D(t.TEXTURE_2D,0,r,1,1,0,s,a,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}(r)),o=r,l=a,o.bindTexture(o.TEXTURE_2D,l),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,o.RGBA,o.UNSIGNED_BYTE,n),o.drawArrays(o.TRIANGLES,0,6),null!=globalThis.VideoFrame&&n instanceof globalThis.VideoFrame){let t=new VideoFrame(e,{alpha:"keep",timestamp:n.timestamp,duration:n.duration??void 0});return n.close(),t}return createImageBitmap(e,{imageOrientation:n instanceof ImageBitmap?"flipY":"none"})}},e3=class t{constructor(t,e,r,s,a){en(this,tC),en(this,tv,new(0,t5.EventTool)),er(this,"on",ea(this,tv).on),en(this,tS,0),en(this,tx,0),en(this,tU,0),en(this,tE,0),en(this,tA,0),en(this,tk,null),er(this,"fixedAspectRatio",!1),er(this,"fixedScaleCenter",!1),this.x=t??0,this.y=e??0,this.w=r??0,this.h=s??0,eo(this,tk,a??null)}get x(){return ea(this,tS)}set x(t){el(this,tC,tT).call(this,"x",t)}get y(){return ea(this,tx)}set y(t){el(this,tC,tT).call(this,"y",t)}get w(){return ea(this,tU)}set w(t){el(this,tC,tT).call(this,"w",t)}get h(){return ea(this,tE)}set h(t){el(this,tC,tT).call(this,"h",t)}get angle(){return ea(this,tA)}set angle(t){el(this,tC,tT).call(this,"angle",t)}get center(){let{x:t,y:e,w:r,h:s}=this;return{x:t+r/2,y:e+s/2}}clone(){let{x:e,y:r,w:s,h:a}=this,n=new t(e,r,s,a,ea(this,tk));return n.angle=this.angle,n.fixedAspectRatio=this.fixedAspectRatio,n.fixedScaleCenter=this.fixedScaleCenter,n}checkHit(t,e){var r,s;let{angle:a,center:n,x:o,y:l,w:h,h:d}=this,u=(null==(r=ea(this,tk))?void 0:r.center)??n,p=(null==(s=ea(this,tk))?void 0:s.angle)??a;null==ea(this,tk)&&(o-=u.x,l-=u.y);let c=t-u.x,f=e-u.y,m=c,_=f;return 0!==p&&(m=c*Math.cos(p)+f*Math.sin(p),_=f*Math.cos(p)-c*Math.sin(p)),!(mo+h||_l+d)}};tv=new WeakMap,tS=new WeakMap,tx=new WeakMap,tU=new WeakMap,tE=new WeakMap,tA=new WeakMap,tC=new WeakSet,tT=function(t,e){let r=this[t]!==e;switch(t){case"x":eo(this,tS,e);break;case"y":eo(this,tx,e);break;case"w":eo(this,tU,e);break;case"h":eo(this,tE,e);break;case"angle":eo(this,tA,e)}r&&ea(this,tv).emit("propsChange",{[t]:e})},tk=new WeakMap;let e6=e3;class e8{constructor(){er(this,"rect",new e6),en(this,tB,{offset:0,duration:0,playbackRate:1}),en(this,tF,new(0,t5.EventTool)),er(this,"on",ea(this,tF).on),en(this,tI,0),er(this,"opacity",1),er(this,"flip",null),en(this,tz,null),en(this,tP,null),er(this,"ready",Promise.resolve()),this.rect.on("propsChange",t=>{ea(this,tF).emit("propsChange",{rect:t})})}get time(){return ea(this,tB)}set time(t){Object.assign(ea(this,tB),t)}get zIndex(){return ea(this,tI)}set zIndex(t){let e=ea(this,tI)!==t;eo(this,tI,t),e&&ea(this,tF).emit("propsChange",{zIndex:t})}_render(t){let{rect:{center:e,angle:r}}=this;t.setTransform("horizontal"===this.flip?-1:1,0,0,"vertical"===this.flip?-1:1,e.x,e.y),t.rotate((null==this.flip?1:-1)*r),t.globalAlpha=this.opacity}setAnimation(t,e){eo(this,tz,Object.entries(t).map(([t,e])=>{let r={from:0,to:100}[t]??Number(t.slice(0,-1));if(isNaN(r)||r>100||r<0)throw Error("keyFrame must between 0~100");return[r/100,e]})),eo(this,tP,Object.assign({},ea(this,tP),{duration:e.duration,delay:e.delay??0,iterCount:e.iterCount??1/0}))}animate(t){if(null==ea(this,tz)||null==ea(this,tP)||t=r.iterCount)return{};let a=s%r.duration,n=s===r.duration?1:a/r.duration,o=e.findIndex(t=>t[0]>=n);if(-1===o)return{};let l=e[o-1],h=e[o],d=h[1];if(null==l)return d;let u=l[1],p={},c=(n-l[0])/(h[0]-l[0]);for(let t in d)null!=u[t]&&(p[t]=(d[t]-u[t])*c+u[t]);return p}(t,ea(this,tz),ea(this,tP));for(let t in e)switch(t){case"opacity":this.opacity=e[t];break;case"x":case"y":case"w":case"h":case"angle":this.rect[t]=e[t]}}copyStateTo(t){eo(t,tz,ea(this,tz)),eo(t,tP,ea(this,tP)),t.zIndex=this.zIndex,t.opacity=this.opacity,t.flip=this.flip,t.rect=this.rect.clone(),t.time={...this.time}}destroy(){ea(this,tF).destroy()}}tB=new WeakMap,tF=new WeakMap,tI=new WeakMap,tz=new WeakMap,tP=new WeakMap;let e4=class t extends e8{constructor(t){super(),en(this,tL),en(this,tR,null),en(this,tD,!1),eo(this,tL,t),this.ready=t.ready.then(({width:t,height:e,duration:r})=>{this.rect.w=0===this.rect.w?t:this.rect.w,this.rect.h=0===this.rect.h?e:this.rect.h,this.time.duration=0===this.time.duration?r:this.time.duration})}async offscreenRender(t,e){var r;let s=e*this.time.playbackRate;this.animate(s),super._render(t);let{w:a,h:n}=this.rect,{video:o,audio:l,state:h}=await ea(this,tL).tick(s),d=l??[];if(null!=l&&1!==this.time.playbackRate&&(d=l.map(t=>ey(t,this.time.playbackRate))),"done"===h)return{audio:d,done:!0};let u=o??ea(this,tR);return null!=u&&t.drawImage(u,-a/2,-n/2,a,n),null!=o&&(null==(r=ea(this,tR))||r.close(),eo(this,tR,o)),{audio:d,done:!1}}async clone(){let e=new t(await ea(this,tL).clone());return await e.ready,this.copyStateTo(e),e}destroy(){var t;ea(this,tD)||(eo(this,tD,!0),t5.Log.info("OffscreenSprite destroy"),super.destroy(),null==(t=ea(this,tR))||t.close(),eo(this,tR,null),ea(this,tL).destroy())}};tL=new WeakMap,tR=new WeakMap,tD=new WeakMap;let e5=e4,e7=class t extends e8{constructor(t){super(),en(this,tW),en(this,tM),er(this,"visible",!0),en(this,tO,null),en(this,tN,[]),en(this,tG,!1),en(this,tH,-1),en(this,tV,!1),eo(this,tM,t),this.ready=t.ready.then(({width:t,height:e,duration:r})=>{this.rect.w=0===this.rect.w?t:this.rect.w,this.rect.h=0===this.rect.h?e:this.rect.h,this.time.duration=0===this.time.duration?r:this.time.duration})}getClip(){return ea(this,tM)}preFrame(t){el(this,tW,tY).call(this,t)}render(t,e){this.animate(e),super._render(t);let{w:r,h:s}=this.rect;ea(this,tH)!==e&&el(this,tW,tY).call(this,e),eo(this,tH,e);let a=ea(this,tN);eo(this,tN,[]);let n=ea(this,tO);return null!=n&&t.drawImage(n,-r/2,-s/2,r,s),{audio:a}}copyStateTo(e){super.copyStateTo(e),e instanceof t&&(e.visible=this.visible)}destroy(){var t;ea(this,tV)||(eo(this,tV,!0),t5.Log.info("VisibleSprite destroy"),super.destroy(),null==(t=ea(this,tO))||t.close(),eo(this,tO,null),ea(this,tM).destroy())}};tM=new WeakMap,tO=new WeakMap,tN=new WeakMap,tG=new WeakMap,tW=new WeakSet,tY=function(t){ea(this,tG)||(eo(this,tG,!0),ea(this,tM).tick(t*this.time.playbackRate).then(({video:t,audio:e})=>{var r;null!=t&&(null==(r=ea(this,tO))||r.close(),eo(this,tO,t??null)),eo(this,tN,e??[]),null!=e&&1!==this.time.playbackRate&&eo(this,tN,e.map(t=>ey(t,this.time.playbackRate)))}).finally(()=>{eo(this,tG,!1)}))},tH=new WeakMap,tV=new WeakMap;let e9=e7,it=0;async function ie(t){t()>50&&(await e_(15),await ie(t))}class ii{constructor(t={}){en(this,t1),en(this,tj,t5.Log.create(`id:${it++},`)),en(this,tZ,!1),en(this,tX,[]),en(this,tK),en(this,t$),en(this,tJ,null),en(this,tQ),en(this,tq),en(this,t0,new(0,t5.EventTool)),er(this,"on",ea(this,t0).on);let{width:e=0,height:r=0}=t;eo(this,tK,new OffscreenCanvas(e,r));let s=ea(this,tK).getContext("2d",{alpha:!1});if(null==s)throw Error("Can not create 2d offscreen context");eo(this,t$,s),eo(this,tQ,Object.assign({bgColor:"#000",width:0,height:0,videoCodec:"avc1.42E032",audio:!0,bitrate:5e6,fps:30,metaDataTags:null},t)),eo(this,tq,e*r>0)}static async isSupported(t={}){return(null!=self.OffscreenCanvas&&null!=self.VideoEncoder&&null!=self.VideoDecoder&&null!=self.VideoFrame&&null!=self.AudioEncoder&&null!=self.AudioDecoder&&null!=self.AudioData&&((await self.VideoEncoder.isConfigSupported({codec:t.videoCodec??"avc1.42E032",width:t.width??1920,height:t.height??1080,bitrate:t.bitrate??7e6})).supported??!1)&&(await self.AudioEncoder.isConfigSupported({codec:ew.codec,sampleRate:ew.sampleRate,numberOfChannels:ew.channelCount})).supported)??!1}async addSprite(t,e={}){var r,s;let a={rect:(r=["x","y","w","h"],s=t.rect,r.reduce((t,e)=>(t[e]=s[e],t),{})),time:{...t.time},zIndex:t.zIndex};ea(this,tj).info("Combinator add sprite",a);let n=await t.clone();ea(this,tj).info("Combinator add sprite ready"),ea(this,tX).push(Object.assign(n,{main:e.main??!1,expired:!1})),ea(this,tX).sort((t,e)=>t.zIndex-e.zIndex)}output(){if(0===ea(this,tX).length)throw Error("No sprite added");let t=ea(this,tX).find(t=>t.main),e=null!=t?t.time.offset+t.time.duration:Math.max(...ea(this,tX).map(t=>t.time.offset+t.time.duration));if(e===1/0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of ImgClip, AudioCli");-1===e&&ea(this,tj).warn("Unable to determine the end time, process value don't update"),ea(this,tj).info(`start combinate video, maxTime:${e}`);let r=el(this,t1,t2).call(this,e),s=performance.now(),a=el(this,t1,t3).call(this,r,e,{onProgress:t=>{ea(this,tj).debug("OutputProgress:",t),ea(this,t0).emit("OutputProgress",t)},onEnded:async()=>{await r.flush(),ea(this,tj).info("===== output ended =====, cost:",performance.now()-s),ea(this,t0).emit("OutputProgress",1),this.destroy()},onError:t=>{ea(this,t0).emit("error",t),o(t),this.destroy()}});eo(this,tJ,()=>{a(),r.close(),o()});let{stream:n,stop:o}=(0,t5.file2stream)(r.mp4file,500,this.destroy);return n}destroy(){var t;ea(this,tZ)||(eo(this,tZ,!0),null==(t=ea(this,tJ))||t.call(this),ea(this,t0).destroy())}}tj=new WeakMap,tZ=new WeakMap,tX=new WeakMap,tK=new WeakMap,t$=new WeakMap,tJ=new WeakMap,tQ=new WeakMap,tq=new WeakMap,t0=new WeakMap,t1=new WeakSet,t2=function(t){let{fps:e,width:r,height:s,videoCodec:a,bitrate:n,audio:o,metaDataTags:l}=ea(this,tQ);return(0,t5.recodemux)({video:ea(this,tq)?{width:r,height:s,expectFPS:e,codec:a,bitrate:n,__unsafe_hardwareAcceleration__:ea(this,tQ).__unsafe_hardwareAcceleration__}:null,audio:!1===o?null:{codec:"aac",sampleRate:ew.sampleRate,channelCount:ew.channelCount},duration:t,metaDataTags:l})},t3=function(t,e,{onProgress:r,onEnded:s,onError:a}){let n=0,o={aborted:!1},l=null;(async()=>{let{fps:r,bgColor:a,audio:h}=ea(this,tQ),u=Math.round(1e6/r),p=ea(this,t$),c=function(t){let{ctx:e,bgColor:r,sprites:s,aborter:a}=t,{width:n,height:o}=e.canvas;return async t=>{e.fillStyle=r,e.fillRect(0,0,n,o);let l=[],h=!1;for(let r of s){if(a.aborted)break;if(t0&&t>r.time.offset+r.time.duration||n)&&(r.main&&(h=!0),r.destroy(),r.expired=!0)}return{audios:l,mainSprDone:h}}}({ctx:p,bgColor:a,sprites:ea(this,tX),aborter:o}),f=function(t){let{ctx:e,cvs:r,outputAudio:s,remux:a,hasVideoTrack:n,timeSlice:o}=t,{width:l,height:h}=r,d=0,u=Math.floor(3*t.fps),p=function(t){let e=1024*ew.channelCount,r=new Float32Array(3*e),s=0,a=0,n=t/ew.sampleRate*1e6,o=new Float32Array(e),l=l=>{let h=0,d=Math.floor(s/e),u=[];for(let s=0;sn;)u.push(new AudioData({timestamp:a,numberOfChannels:ew.channelCount,numberOfFrames:t,sampleRate:ew.sampleRate,format:"f32",data:o})),a+=n;return u};return(t,e)=>{var a,n;let o=Math.max(...e.map(t=>{var e;return(null==(e=t[0])?void 0:e.length)??0}));for(let t=0;t{if(!1!==s)for(let e of p(t,c))a.encodeAudio(e);if(n){let s=new VideoFrame(r,{duration:o,timestamp:t});a.encodeVideo(s,{keyFrame:d%u==0}),e.resetTransform(),e.clearRect(0,0,l,h),d+=1}}}({remux:t,ctx:p,cvs:ea(this,tK),outputAudio:h,hasVideoTrack:ea(this,tq),timeSlice:u,fps:r}),m=0;for(;;){if(null!=l)return;if(o.aborted||-1!==e&&m>e||0===ea(this,tX).length){d(),await s();return}n=m/e;let{audios:r,mainSprDone:a}=await c(m);if(a){d(),await s();return}if(o.aborted)return;f(m,r),m+=u,await ie(t.getEncodeQueueSize)}})().catch(t=>{l=t,ea(this,tj).error(t),d(),a(t)});let h=setInterval(()=>{r(n)},500),d=()=>{o.aborted||(o.aborted=!0,clearInterval(h),ea(this,tX).forEach(t=>t.destroy()))};return d}},{"@webav/mp4box.js":"cxovW","@webav/internal-utils":"8Z4GK","wave-resampler":"rkdE4","opfs-tools":"hZ6Bc","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cxovW:[function(t,e,r,s){var a,n,o=(a=new Date,n=4,{setLogLevel:function(t){t==this.debug?n=1:t==this.info?n=2:t==this.warn?n=3:(this.error,n=4)},debug:function(t,e){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+o.getDurationString(new Date-a,1e3)+"]","["+t+"]",e)},log:function(t,e){this.debug(t.msg)},info:function(t,e){2>=n&&console.info("["+o.getDurationString(new Date-a,1e3)+"]","["+t+"]",e)},warn:function(t,e){3>=n&&console.warn("["+o.getDurationString(new Date-a,1e3)+"]","["+t+"]",e)},error:function(t,e){4>=n&&console.error("["+o.getDurationString(new Date-a,1e3)+"]","["+t+"]",e)}});o.getDurationString=function(t,e){function r(t,e){for(var r=(""+t).split(".");r[0].length0))return"(empty)";for(var r="",s=0;s0&&(r+=","),r+="["+o.getDurationString(t.start(s))+","+o.getDurationString(t.end(s))+"]";return r},r.Log=o;var l=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0};l.prototype.getPosition=function(){return this.position},l.prototype.getEndPosition=function(){return this.buffer.byteLength},l.prototype.getLength=function(){return this.buffer.byteLength},l.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},l.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},l.prototype.readAnyInt=function(t,e){var r=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:r=e?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=e?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16|this.dataview.getUint8(this.position+1)<<8|this.dataview.getUint8(this.position+2);break;case 4:r=e?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32|this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,r}throw"Not enough bytes in buffer"},l.prototype.readUint8=function(){return this.readAnyInt(1,!1)},l.prototype.readUint16=function(){return this.readAnyInt(2,!1)},l.prototype.readUint24=function(){return this.readAnyInt(3,!1)},l.prototype.readUint32=function(){return this.readAnyInt(4,!1)},l.prototype.readUint64=function(){return this.readAnyInt(8,!1)},l.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",r=0;rthis._byteLength&&(this._byteLength=e);return}for(r<1&&(r=1);e>r;)r*=2;var s=new ArrayBuffer(r),a=new Uint8Array(this._buffer);new Uint8Array(s,0,a.length).set(a),this.buffer=s,this._byteLength=e}},h.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},h.BIG_ENDIAN=!1,h.LITTLE_ENDIAN=!0,h.prototype._byteLength=0,Object.defineProperty(h.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(h.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(h.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(h.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),h.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},h.prototype.isEof=function(){return this.position>=this._byteLength},h.prototype.mapUint8Array=function(t){this._realloc(+t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=+t,e},h.prototype.readInt32Array=function(t,e){var r=new Int32Array(t=null==t?this.byteLength-this.position/4:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readInt16Array=function(t,e){var r=new Int16Array(t=null==t?this.byteLength-this.position/2:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readInt8Array=function(t){var e=new Int8Array(t=null==t?this.byteLength-this.position:t);return h.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},h.prototype.readUint32Array=function(t,e){var r=new Uint32Array(t=null==t?this.byteLength-this.position/4:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readUint16Array=function(t,e){var r=new Uint16Array(t=null==t?this.byteLength-this.position/2:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readUint8Array=function(t){var e=new Uint8Array(t=null==t?this.byteLength-this.position:t);return h.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},h.prototype.readFloat64Array=function(t,e){var r=new Float64Array(t=null==t?this.byteLength-this.position/8:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readFloat32Array=function(t,e){var r=new Float32Array(t=null==t?this.byteLength-this.position/4:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null==t?this.endianness:t);return this.position+=4,e},h.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null==t?this.endianness:t);return this.position+=2,e},h.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},h.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null==t?this.endianness:t);return this.position+=4,e},h.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null==t?this.endianness:t);return this.position+=2,e},h.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},h.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null==t?this.endianness:t);return this.position+=4,e},h.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null==t?this.endianness:t);return this.position+=8,e},h.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,h.memcpy=function(t,e,r,s,a){var n=new Uint8Array(t,e,a),o=new Uint8Array(r,s,a);n.set(o)},h.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},h.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},h.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;ra;s--,a++){var n=e[a];e[a]=e[s],e[s]=n}return t},h.prototype.failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=[],r=0;r>16),this.writeUint8((65280&t)>>8),this.writeUint8(255&t)},h.prototype.adjustUint32=function(t,e){var r=this.position;this.seek(t),this.writeUint32(e),this.seek(r)},h.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},h.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},h.prototype.mapInt8Array=function(t){this._realloc(+t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=+t,e},h.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},h.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},h.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=8*t,r},h.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r};var d=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)};d.prototype=new h(new ArrayBuffer,0,h.BIG_ENDIAN),d.prototype.initialized=function(){var t;return!!(this.bufferIndex>-1)||(this.buffers.length>0?0===(t=this.buffers[0]).fileStart?(this.buffer=t,this.bufferIndex=0,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(t,e){o.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r.buffer},d.prototype.reduceBuffer=function(t,e,r){var s;return(s=new Uint8Array(r)).set(new Uint8Array(t,e,r)),s.buffer.fileStart=t.fileStart+e,s.buffer.usedBytes=0,s.buffer},d.prototype.insertBuffer=function(t){for(var e=!0,r=0;rs.byteLength){this.buffers.splice(r,1),r--;continue}else o.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring");else t.fileStart+t.byteLength<=s.fileStart||(t=this.reduceBuffer(t,0,s.fileStart-t.fileStart)),o.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(r,0,t),0===r&&(this.buffer=t);e=!1;break}if(t.fileStart0)t=this.reduceBuffer(t,a,n);else{e=!1;break}}}e&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),0===r&&(this.buffer=t))},d.prototype.logBufferLevel=function(t){var e,r,s,a,n,l=[],h="";for(e=0,s=0,a=0;e0&&(h+=n.end-1+"]"),(t?o.info:o.debug)("MultiBufferStream",0===this.buffers.length?"No more buffer in memory":""+this.buffers.length+" stored buffer(s) ("+s+"/"+a+" bytes), continuous ranges: "+h)},d.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0},d.prototype.findPosition=function(t,e,r){var s,a=null,n=-1;for(s=!0===t?0:this.bufferIndex;s=e?(o.debug("MultiBufferStream","Found position in existing buffer #"+n),n):-1},d.prototype.findEndContiguousBuf=function(t){var e,r,s,a=void 0!==t?t:this.bufferIndex;if(r=this.buffers[a],this.buffers.length>a+1)for(e=a+1;e>3;return 31===s&&r.data.length>=2&&(s=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),s},r.DecoderConfigDescriptor=function(t){r.Descriptor.call(this,4,t)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.upStream=(this.streamType>>1&1)!=0,this.streamType=this.streamType>>>2,this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)},r.DecoderSpecificInfo=function(t){r.Descriptor.call(this,5,t)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(t){r.Descriptor.call(this,6,t)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};r.MPEG4DescriptorParser=u;var p={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){p.FullBox.prototype=new p.Box,p.ContainerBox.prototype=new p.Box,p.SampleEntry.prototype=new p.Box,p.TrackGroupTypeBox.prototype=new p.FullBox,p.BASIC_BOXES.forEach(function(t){p.createBoxCtor(t)}),p.FULL_BOXES.forEach(function(t){p.createFullBoxCtor(t)}),p.CONTAINER_BOXES.forEach(function(t){p.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,r){this.type=t,this.size=e,this.uuid=r},FullBox:function(t,e,r){p.Box.call(this,t,e,r),this.flags=0,this.version=0},ContainerBox:function(t,e,r){p.Box.call(this,t,e,r),this.boxes=[]},SampleEntry:function(t,e,r,s){p.ContainerBox.call(this,t,e),this.hdr_size=r,this.start=s},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){p.FullBox.call(this,t,e)},createBoxCtor:function(t,e){p.boxCodes.push(t),p[t+"Box"]=function(e){p.Box.call(this,t,e)},p[t+"Box"].prototype=new p.Box,e&&(p[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){p[t+"Box"]=function(e){p.FullBox.call(this,t,e)},p[t+"Box"].prototype=new p.FullBox,p[t+"Box"].prototype.parse=function(t){this.parseFullHeader(t),e&&e.call(this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,r=0;rr?(o.error("BoxParser","Box of type '"+u+"' has a size "+d+" greater than its container size "+r),{code:p.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:h,start:l}):0!==d&&l+d>t.getEndPosition()?(t.seek(l),o.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:p.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:h,start:l}):e?{code:p.OK,type:u,size:d,hdr_size:h,start:l}:(p[u+"Box"]?s=new p[u+"Box"](d):"uuid"!==u?(o.warn("BoxParser","Unknown box type: '"+u+"'"),(s=new p.Box(u,d)).has_unparsed_data=!0):p.UUIDBoxes[n]?s=new p.UUIDBoxes[n](d):(o.warn("BoxParser","Unknown uuid type: '"+n+"'"),(s=new p.Box(u,d)).uuid=n,s.has_unparsed_data=!0),s.hdr_size=h,s.start=l,s.write===p.Box.prototype.write&&"mdat"!==s.type&&(o.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(t)),s.parse(t),(a=t.getPosition()-(s.start+s.size))<0?(o.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-a+" bytes), seeking forward"),t.seek(s.start+s.size)):a>0&&(o.error("BoxParser","Parsing of box '"+c+"' read "+a+" more bytes than the indicated box data size, seeking backwards"),0!==s.size&&t.seek(s.start+s.size)),{code:p.OK,box:s,size:s.size})},p.Box.prototype.parse=function(t){"mdat"!=this.type?this.data=t.readUint8Array(this.size-this.hdr_size):0===this.size?t.seek(t.getEndPosition()):t.seek(this.start+this.size)},p.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size},p.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size},p.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4},p.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},p.ContainerBox.prototype.parse=function(t){for(;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},p.SAMPLE_ENTRY_TYPE_VISUAL="Visual",p.SAMPLE_ENTRY_TYPE_AUDIO="Audio",p.SAMPLE_ENTRY_TYPE_HINT="Hint",p.SAMPLE_ENTRY_TYPE_METADATA="Metadata",p.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",p.SAMPLE_ENTRY_TYPE_SYSTEM="System",p.SAMPLE_ENTRY_TYPE_TEXT="Text",p.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8},p.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},p.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size},p.SampleEntry.prototype.parseFooter=function(t){p.ContainerBox.prototype.parse.call(this,t)},p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_HINT),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_METADATA),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_SUBTITLE),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_SYSTEM),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_TEXT),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,this.parseFooter(t)}),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"fLaC"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_TEXT,"enct"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_METADATA,"encm"),p.createBoxCtor("a1lx",function(t){var e=((1&(1&t.readUint8()))+1)*16;this.layer_size=[];for(var r=0;r<3;r++)16==e?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()}),p.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()}),p.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}),p.createBoxCtor("av1C",function(t){var e=t.readUint8();if(e>>7&!1)return void o.error("av1C marker problem");if(this.version=127&e,1!==this.version)return void o.error("av1C version "+this.version+" not supported");if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=31&e,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=3&e,e=t.readUint8(),this.reserved_1=e>>5&7,0!==this.reserved_1)return void o.error("av1C reserved_1 parsing problem");if(this.initial_presentation_delay_present=e>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&e;else if(this.reserved_2=15&e,0!==this.reserved_2)return void o.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(r)}),p.createBoxCtor("avcC",function(t){var e,r;for(e=0,this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=3&t.readUint8(),this.nb_SPS_nalus=31&t.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[];e0&&(this.ext=t.readUint8Array(r))}),p.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}),p.createFullBoxCtor("ccst",function(t){var e=t.readUint8();this.all_ref_pics_intra=(128&e)==128,this.intra_pred_used=(64&e)==64,this.max_ref_per_pic=(63&e)>>2,t.readUint24()}),p.createBoxCtor("cdef",function(t){var e;for(e=0,this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[];e=32768&&this.component_type_urls.push(t.readCString())}}),p.createFullBoxCtor("co64",function(t){var e,r;if(e=t.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else"rICC"===this.colour_type?this.ICC_profile=t.readUint8Array(this.size-4):"prof"===this.colour_type&&(this.ICC_profile=t.readUint8Array(this.size-4))}),p.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()}),p.createFullBoxCtor("cslg",function(t){0===this.version&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())}),p.createFullBoxCtor("ctts",function(t){if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=e>>1&31,this.bsmod=(1&e)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|s>>5&7}),p.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=7&e,this.ind_subs=[];for(var r=0;r>6,s.bsid=a>>1&31,s.bsmod=(1&a)<<4|n>>4&15,s.acmod=n>>1&7,s.lfeon=1&n,s.num_dep_sub=o>>1&15,s.num_dep_sub>0&&(s.chan_loc=(1&o)<<8|t.readUint8())}}),p.createFullBoxCtor("dfLa",function(t){for(var e=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];;){var s=t.readUint8(),a=Math.min(127&s,r.length-1);if(a?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),e.push(r[a]),128&s)break}this.numMetadataBlocks=e.length+" ("+e.join(", ")+")"}),p.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()}),p.createBoxCtor("dmax",function(t){this.time=t.readUint32()}),p.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()}),p.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;e=4;)this.compatible_brands[r]=t.readString(4),e-=4,r++}),p.createFullBoxCtor("hdlr",function(t){0===this.version&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))}),p.createBoxCtor("hvcC",function(t){this.configurationVersion=t.readUint8(),a=t.readUint8(),this.general_profile_space=a>>6,this.general_tier_flag=(32&a)>>5,this.general_profile_idc=31&a,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),this.chroma_format_idc=3&t.readUint8(),this.bit_depth_luma_minus8=7&t.readUint8(),this.bit_depth_chroma_minus8=7&t.readUint8(),this.avgFrameRate=t.readUint16(),a=t.readUint8(),this.constantFrameRate=a>>6,this.numTemporalLayers=(13&a)>>3,this.temporalIdNested=(4&a)>>2,this.lengthSizeMinusOne=3&a,this.nalu_arrays=[];var e,r,s,a,n=t.readUint8();for(e=0;e>7,o.nalu_type=63&a;var l=t.readUint16();for(r=0;r>4&15,this.length_size=15&e,e=t.readUint8(),this.base_offset_size=e>>4&15,1===this.version||2===this.version?this.index_size=15&e:this.index_size=0,this.items=[];var e,r=0;if(this.version<2)r=t.readUint16();else if(2===this.version)r=t.readUint32();else throw"version of iloc box not supported";for(var s=0;s>7,this.axis=1&e}),p.createFullBoxCtor("infe",function(t){if((0===this.version||1===this.version)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),1===this.version){this.extension_type=t.readString(4),o.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(2===this.version?this.item_ID=t.readUint16():3===this.version&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),"mime"===this.item_type?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):"uri "===this.item_type&&(this.item_uri_type=t.readCString()))}),p.createFullBoxCtor("ipma",function(t){var e,r;for(e=0,entry_count=t.readUint32(),this.associations=[];e>7==1,1&this.flags?o.property_index=(127&n)<<8|t.readUint8():o.property_index=127&n}}}),p.createFullBoxCtor("iref",function(t){var e,r;for(this.references=[];t.getPosition()>7,s.assignment_type=127&a,s.assignment_type){case 0:s.grouping_type=t.readString(4);break;case 1:s.grouping_type=t.readString(4),s.grouping_type_parameter=t.readUint32();break;case 2:case 3:break;case 4:s.sub_track_id=t.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}}),p.createBoxCtor("lhvC",function(t){this.configurationVersion=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),s=t.readUint8(),this.numTemporalLayers=(13&s)>>3,this.temporalIdNested=(4&s)>>2,this.lengthSizeMinusOne=3&s,this.nalu_arrays=[];var e,r,s,a=t.readUint8();for(e=0;e>7,n.nalu_type=63&s;var o=t.readUint16();for(r=0;r>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}),p.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()}),p.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()}),p.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var r=0;r0){var e=t.readUint32();this.kid=[];for(var r=0;r0&&(this.data=t.readUint8Array(s))}),p.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),p.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),p.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),p.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),p.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}),p.createFullBoxCtor("saio",function(t){1&this.flags&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var r=t.readUint8(),s=0;s>7,this.num_leading_samples=127&e}),p.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)o.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=15&e,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=p.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}),p.createSampleGroupCtor("stsa",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),p.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=63&e}),p.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7}),p.createSampleGroupCtor("tsas",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),p.createSampleGroupCtor("tscl",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),p.createSampleGroupCtor("vipr",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),p.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),1===this.version?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),r=0;r>6,this.sample_depends_on[s]=e>>4&3,this.sample_is_depended_on[s]=e>>2&3,this.sample_has_redundancy[s]=3&e}),p.createFullBoxCtor("senc"),p.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),o.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e,r=t.readUint32(),s=0;s>31&1,s.referenced_size=0x7fffffff&a,s.subsegment_duration=t.readUint32(),s.starts_with_SAP=(a=t.readUint32())>>31&1,s.SAP_type=a>>28&7,s.SAP_delta_time=0xfffffff&a}}),p.SingleItemTypeReferenceBox=function(t,e,r,s){p.Box.call(this,t,e),this.hdr_size=r,this.start=s},p.SingleItemTypeReferenceBox.prototype=new p.Box,p.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[e+1]=15&s}else if(8===this.field_size)for(e=0;e0)for(r=0;r>4&15,this.default_skip_byte_block=15&e}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=p.parseHex16(t),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}),p.createFullBoxCtor("tfdt",function(t){1==this.version?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}),p.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}),p.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=3&e,this.entries=[];for(var r=t.readUint32(),s=0;s>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}),p.createBoxCtor("tmax",function(t){this.time=t.readUint32()}),p.createBoxCtor("tmin",function(t){this.time=t.readUint32()}),p.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()}),p.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()}),p.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()}),p.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()},p.createTrackGroupCtor("msrc"),p.TrackReferenceTypeBox=function(t,e,r,s){p.Box.call(this,t,e),this.hdr_size=r,this.start=s},p.TrackReferenceTypeBox.prototype=new p.Box,p.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)},p.trefBox.prototype.parse=function(t){for(var e,r;t.getPosition()e&&this.flags&p.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&p.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=t.readUint32(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}}),p.createFullBoxCtor("url ",function(t){1!==this.flags&&(this.location=t.readCString())}),p.createFullBoxCtor("urn ",function(t){this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}),p.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),p.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=p.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}),p.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),p.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=p.parseHex16(t)}),p.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=1&e,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8()):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=1&e),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}),p.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)}),p.createFullBoxCtor("vvcC",function(t){var e,r,s={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){this.held_bits=t.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(t){this.held_bits=t.readUint16(),this.num_held_bits=16},extract_bits:function(t){var e=this.held_bits>>this.num_held_bits-t&(1<1){for(s.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=s.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)s.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;e+=p.decimalToHex(s,0),e+=".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var a=!1,n="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||a)&&(n="."+p.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+n,a=!0);e+=n}return e},p.vvc1SampleEntry.prototype.getCodec=p.vvi1SampleEntry.prototype.getCodec=function(){var t=p.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var e="";if(this.vvcC.general_constraint_info){var r,s,a,n=[];for(s=0,r=this.vvcC.ptl_frame_only_constraint<<7|this.vvcC.ptl_multilayer_enabled<<6;s>2&63,n.push(r),r&&(a=s),r=this.vvcC.general_constraint_info[s]>>2&3;if(void 0===a)e=".CA";else{e=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l=0,h=0;for(s=0;s<=a;++s)for(l=l<<8|n[s],h+=8;h>=5;)e+=o[l>>h-5&31],h-=5,l&=(1<0x100000000&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>0x100000000?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),"uuid"===this.type&&t.writeUint8Array(this.uuid),this.size>0x100000000&&t.writeUint64(this.size)},p.FullBox.prototype.writeHeader=function(t){this.size+=4,p.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)},p.Box.prototype.write=function(t){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))},p.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+10xffffffff),this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(t),1===this.version?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)},p.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&p.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&p.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&p.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&p.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&p.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&p.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&p.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&p.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&p.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&p.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)},p.tkhdBox.prototype.write=function(t){this.version=0,this.size=80,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)},p.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)},p.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&p.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&p.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&p.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&p.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&p.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&p.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&p.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&p.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)continue;else if(t[r]instanceof p.Box||e[r]instanceof p.Box)continue;else if(void 0===t[r]||void 0===e[r])continue;else if("function"==typeof t[r]||"function"==typeof e[r])continue;else if(t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1)continue;else if("data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r)continue;else if(p.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;else if(t[r]!==e[r])return!1;return!0},p.boxEqual=function(t,e){if(!p.boxEqualFields(t,e))return!1;for(var r=0;r=e?t:Array(e-t.length+1).join(r)+t}function a(t){var e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),a=Math.floor(t-3600*e-60*r),n=Math.floor((t-3600*e-60*r-a)*1e3);return""+s(e,2)+":"+s(r,2)+":"+s(a,2)+"."+s(n,3)}for(var n=this.parseSample(r),o="",l=0;l1)for(e=1;e-1&&this.fragmentedTracks.splice(e,1)},y.prototype.setExtractionOptions=function(t,e,r){var s=this.getTrackById(t);if(s){var a={};this.extractedTracks.push(a),a.id=t,a.user=e,a.trak=s,s.nextSample=0,a.nb_samples=1e3,a.samples=[],r&&r.nbSamples&&(a.nb_samples=r.nbSamples)}},y.prototype.unsetExtractionOptions=function(t){for(var e=-1,r=0;r-1&&this.extractedTracks.splice(e,1)},y.prototype.parse=function(){var t,e,r;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat())if(this.processIncompleteMdat())continue;else return;else{if(this.saveParsePosition&&this.saveParsePosition(),(t=p.parseOneBox(this.stream,!1)).code===p.ERR_NOT_ENOUGH_DATA)if(!this.processIncompleteBox)return;else if(this.processIncompleteBox(t))continue;else return;switch(r="uuid"!==(e=t.box).type?e.type:e.uuid,this.boxes.push(e),r){case"mdat":this.mdats.push(e);break;case"moof":this.moofs.push(e);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&o.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=e}this.updateUsedBytes&&this.updateUsedBytes(e,t)}},y.prototype.checkBuffer=function(t){if(null==t)throw"Buffer must be defined and non empty";if(void 0===t.fileStart)throw"Buffer must have a fileStart property";return 0===t.byteLength?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},y.prototype.appendBuffer=function(t,e){var r;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(o.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},y.prototype.getInfo=function(){var t,e,r,s,a,n,o={},l=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(l+1e3*this.moov.mvhd.creation_time),o.modified=new Date(l+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],t=0;t0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',t=0;t=r.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,r.nextSample-s.nb_samples)+","+(r.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,r.nextSample,t||r.nextSample>=r.samples.length),s.segmentStream=null,s!==this.fragmentedTracks[e]))break}}if(null!==this.onSamples)for(e=0;e=r.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+n.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(n.id,n.user,n.samples),n.samples=[],n!==this.extractedTracks[e]))break}}}},y.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null},y.prototype.getBoxes=function(t,e){var r=[];return y._sweep.call(this,t,r,e),r},y._sweep=function(t,e,r){for(var s in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&r)return;y._sweep.call(this.boxes[s],t,e,r)}},y.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);return e?e.samples:void 0},y.prototype.getTrackSample=function(t,e){var r=this.getTrackById(t);return this.getSample(r,e)},y.prototype.releaseUsedSamples=function(t,e){var r=0,s=this.getTrackById(t);s.lastValidSample||(s.lastValidSample=0);for(var a=s.lastValidSample;at*a.timescale){d=s-1;break}e&&a.is_sync&&(h=s)}for(e&&(d=h),t=r.samples[d].cts,r.nextSample=d;r.samples[d].alreadyRead===r.samples[d].size&&r.samples[d+1];)d++;return l=r.samples[d].offset+r.samples[d].alreadyRead,o.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+o.getDurationString(t,n)+" and offset: "+l),{offset:l,time:t/n}},y.prototype.getTrackDuration=function(t){var e;return t.samples?((e=t.samples[t.samples.length-1]).cts+e.duration)/e.timescale:1/0},y.prototype.seek=function(t,e){var r,s,a,n=this.moov,l={offset:1/0,time:1/0};if(this.moov){for(a=0;athis.getTrackDuration(r))&&((s=this.seekTrack(t,e,r)).offset-1){o=h;break}switch(o){case"Visual":if(a.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),n.set("width",e.width).set("height",e.height).set("horizresolution",4718592).set("vertresolution",4718592).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var c=new p.avcCBox;c.parse(new l(e.avcDecoderConfigRecord)),n.addBox(c)}else if(e.hevcDecoderConfigRecord){var f=new p.hvcCBox;f.parse(new l(e.hevcDecoderConfigRecord)),n.addBox(f)}break;case"Audio":a.add("smhd").set("balance",e.balance||0),n.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":a.add("hmhd");break;case"Subtitle":a.add("sthd"),"stpp"===e.type&&n.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break;default:a.add("nmhd")}e.description&&n.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(t){n.addBox(t)}),a.add("dinf").add("dref").addEntry(new p["url Box"]().set("flags",1));var m=a.add("stbl");return m.add("stsd").addEntry(n),m.add("stts").set("sample_counts",[]).set("sample_deltas",[]),m.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),m.add("stco").set("chunk_offsets",[]),m.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(r),e.id}},p.Box.prototype.computeSize=function(t){var e=t||new h;e.endianness=h.BIG_ENDIAN,this.write(e)},y.prototype.addSample=function(t,e,r){var s=r||{},a={},n=this.getTrackById(t);if(null!==n){a.number=n.samples.length,a.track_id=n.tkhd.track_id,a.timescale=n.mdia.mdhd.timescale,a.description_index=s.sample_description_index?s.sample_description_index-1:0,a.description=n.mdia.minf.stbl.stsd.entries[a.description_index],a.data=e,a.size=e.byteLength,a.alreadyRead=a.size,a.duration=s.duration||1,a.cts=s.cts||0,a.dts=s.dts||0,a.is_sync=s.is_sync||!1,a.is_leading=s.is_leading||0,a.depends_on=s.depends_on||0,a.is_depended_on=s.is_depended_on||0,a.has_redundancy=s.has_redundancy||0,a.degradation_priority=s.degradation_priority||0,a.offset=0,a.subsamples=s.subsamples,n.samples.push(a),n.samples_size+=a.size,n.samples_duration+=a.duration,void 0===n.first_dts&&(n.first_dts=s.dts),this.processSamples();var o=this.createSingleSampleMoof(a);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),a}},y.prototype.createSingleSampleMoof=function(t){var e=0;e=t.is_sync?0x2000000:65536;var r=new p.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var s=r.add("traf"),a=this.getTrackById(t.track_id);return s.add("tfhd").set("track_id",t.track_id).set("flags",p.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),s.add("tfdt").set("baseMediaDecodeTime",t.dts-(a.first_dts||0)),s.add("trun").set("flags",p.TRUN_FLAGS_DATA_OFFSET|p.TRUN_FLAGS_DURATION|p.TRUN_FLAGS_SIZE|p.TRUN_FLAGS_FLAGS|p.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),r},y.prototype.lastMoofIndex=0,y.prototype.samplesDataSize=0,y.prototype.resetTables=function(){for(t=0,this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0;t=2&&(h=a[o].grouping_type+"/0",(l=new d(a[o].grouping_type,0)).is_fragment=!0,e.sample_groups_info[h]||(e.sample_groups_info[h]=l))}else for(o=0;o=2&&(h=s[o].grouping_type+"/0",l=new d(s[o].grouping_type,0),t.sample_groups_info[h]||(t.sample_groups_info[h]=l))},y.setSampleGroupProperties=function(t,e,r,s){var a,n,o;for(a in e.sample_groups=[],s)e.sample_groups[a]={},e.sample_groups[a].grouping_type=s[a].grouping_type,e.sample_groups[a].grouping_type_parameter=s[a].grouping_type_parameter,r>=s[a].last_sample_in_run&&(s[a].last_sample_in_run<0&&(s[a].last_sample_in_run=0),s[a].entry_index++,s[a].entry_index<=s[a].sbgp.entries.length-1&&(s[a].last_sample_in_run+=s[a].sbgp.entries[s[a].entry_index].sample_count)),s[a].entry_index<=s[a].sbgp.entries.length-1?e.sample_groups[a].group_description_index=s[a].sbgp.entries[s[a].entry_index].group_description_index:e.sample_groups[a].group_description_index=-1,0!==e.sample_groups[a].group_description_index&&(o=s[a].fragment_description?s[a].fragment_description:s[a].description,e.sample_groups[a].group_description_index>0?(n=e.sample_groups[a].group_description_index>65535?(e.sample_groups[a].group_description_index>>16)-1:e.sample_groups[a].group_description_index-1,o&&n>=0&&(e.sample_groups[a].description=o.entries[n])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[a].description=o.entries[o.default_group_description_index-1]))},y.process_sdtp=function(t,e,r){e&&(t?(e.is_leading=t.is_leading[r],e.depends_on=t.sample_depends_on[r],e.is_depended_on=t.sample_is_depended_on[r],e.has_redundancy=t.sample_has_redundancy[r]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},y.prototype.buildSampleLists=function(){var t,e;for(t=0;tb&&(v++,b<0&&(b=0),b+=n.sample_counts[v]),e>0?(t.samples[e-1].duration=n.sample_deltas[v],t.samples_duration+=t.samples[e-1].duration,C.dts=t.samples[e-1].dts+t.samples[e-1].duration):C.dts=0,o?(e>=S&&(x++,S<0&&(S=0),S+=o.sample_counts[x]),C.cts=t.samples[e].dts+o.sample_offsets[x]):C.cts=C.dts,l?(e==l.sample_numbers[U]-1?(C.is_sync=!0,U++):(C.is_sync=!1,C.degradation_priority=0),d&&d.entries[E].sample_delta+A==e+1&&(C.subsamples=d.entries[E].subsamples,A+=d.entries[E].sample_delta,E++)):C.is_sync=!0,y.process_sdtp(t.mdia.minf.stbl.sdtp,C,C.number),c?C.degradation_priority=c.priority[e]:C.degradation_priority=0,d&&d.entries[E].sample_delta+A==e&&(C.subsamples=d.entries[E].subsamples,A+=d.entries[E].sample_delta),(u.length>0||p.length>0)&&y.setSampleGroupProperties(t,C,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},y.prototype.updateSampleLists=function(){if(void 0!==this.moov){for(;this.lastMoofIndex0&&y.initSampleGroups(u,d,d.sbgps,u.mdia.minf.stbl.sgpds,d.sgpds),e=0;e0?f.dts=u.samples[u.samples.length-2].dts+u.samples[u.samples.length-2].duration:(d.tfdt?f.dts=d.tfdt.baseMediaDecodeTime:f.dts=0,u.first_traf_merged=!0),f.cts=f.dts,_.flags&p.TRUN_FLAGS_CTS_OFFSET&&(f.cts=f.dts+_.sample_composition_time_offset[r]),m=o,_.flags&p.TRUN_FLAGS_FLAGS?m=_.sample_flags[r]:0===r&&_.flags&p.TRUN_FLAGS_FIRST_FLAG&&(m=_.first_sample_flags),f.is_sync=!(m>>16&1),f.is_leading=m>>26&3,f.depends_on=m>>24&3,f.is_depended_on=m>>22&3,f.has_redundancy=m>>20&3,f.degradation_priority=65535&m;var g=!!(d.tfhd.flags&p.TFHD_FLAG_BASE_DATA_OFFSET),w=!!(d.tfhd.flags&p.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(_.flags&p.TRUN_FLAGS_DATA_OFFSET),v=0;v=g?d.tfhd.base_data_offset:w||0===e?h.start:l,0===e&&0===r?b?f.offset=v+_.data_offset:f.offset=v:f.offset=l,l=f.offset+f.size,(d.sbgps.length>0||d.sgpds.length>0||u.mdia.minf.stbl.sbgps.length>0||u.mdia.minf.stbl.sgpds.length>0)&&y.setSampleGroupProperties(u,f,f.number_in_traf,d.sample_groups_info)}}if(d.subs){u.has_fragment_subsamples=!0;var S=d.first_sample_index;for(e=0;e-1))return null;var n=(r=this.stream.buffers[a]).byteLength-(s.offset+s.alreadyRead-r.fileStart);if(s.size-s.alreadyRead<=n)return o.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-r.fileStart)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),h.memcpy(s.data.buffer,s.alreadyRead,r,s.offset+s.alreadyRead-r.fileStart,s.size-s.alreadyRead),r.usedBytes+=s.size-s.alreadyRead,this.stream.logBufferLevel(),s.alreadyRead=s.size,s;if(0===n)return null;o.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-r.fileStart)+" read size: "+n+" full size: "+s.size+")"),h.memcpy(s.data.buffer,s.alreadyRead,r,s.offset+s.alreadyRead-r.fileStart,n),s.alreadyRead+=n,r.usedBytes+=n,this.stream.logBufferLevel()}},y.prototype.releaseSample=function(t,e){var r=t.samples[e];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},y.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},y.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},y.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=n.ipro.protections[n.iinf.item_infos[t].protection_index-1]),n.iinf.item_infos[t].item_type?r.type=n.iinf.item_infos[t].item_type:r.type="mime",r.content_type=n.iinf.item_infos[t].content_type,r.content_encoding=n.iinf.item_infos[t].content_encoding;if(n.grpl)for(t=0;t0&&c.property_index-1-1))return null;var l=(e=this.stream.buffers[n]).byteLength-(a.offset+a.alreadyRead-e.fileStart);if(!(a.length-a.alreadyRead<=l))return o.debug("ISOFile","Getting item #"+t+" extent #"+s+" partial data (alreadyRead: "+a.alreadyRead+" offset: "+(a.offset+a.alreadyRead-e.fileStart)+" read size: "+l+" full extent size: "+a.length+" full item size: "+r.size+")"),h.memcpy(r.data.buffer,r.alreadyRead,e,a.offset+a.alreadyRead-e.fileStart,l),a.alreadyRead+=l,r.alreadyRead+=l,e.usedBytes+=l,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+t+" extent #"+s+" data (alreadyRead: "+a.alreadyRead+" offset: "+(a.offset+a.alreadyRead-e.fileStart)+" read size: "+(a.length-a.alreadyRead)+" full extent size: "+a.length+" full item size: "+r.size+")"),h.memcpy(r.data.buffer,r.alreadyRead,e,a.offset+a.alreadyRead-e.fileStart,a.length-a.alreadyRead),e.usedBytes+=a.length-a.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=a.length-a.alreadyRead,a.alreadyRead=a.length}}return r.alreadyRead===r.size?r:null},y.prototype.releaseItem=function(t){var e=this.items[t];if(!e.data)return 0;this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var r=0;r0?this.moov.traks[t].samples[0].duration:0),e.push(s)}return e},p.Box.prototype.printHeader=function(t){this.size+=8,this.size>0x100000000&&(this.size+=8),"uuid"===this.type&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)},p.FullBox.prototype.printHeader=function(t){this.size+=4,p.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)},p.Box.prototype.print=function(t){this.printHeader(t)},p.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)},p.tkhdBox.prototype.print=function(t){p.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)};var w={};w.createFile=function(t,e){var r=new y(e);return r.discardMdatData=!(void 0===t||t),r},r.createFile=w.createFile},{}],"8Z4GK":[function(t,e,r,s){var a,n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"EventTool",()=>_),n.export(r,"Log",()=>z),n.export(r,"autoReadStream",()=>S),n.export(r,"file2stream",()=>x),n.export(r,"recodemux",()=>P),n.export(r,"workerTimer",()=>v);var o=t("@webav/mp4box.js"),l=n.interopDefault(o),h=Object.defineProperty,d=t=>{throw TypeError(t)},u=(t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,p=(t,e,r)=>u(t,"symbol"!=typeof e?e+"":e,r),c=(t,e,r)=>e.has(t)||d("Cannot "+r),f=(t,e,r)=>(c(t,e,"read from private field"),r?r.call(t):e.get(t)),m=(t,e,r)=>e.has(t)?d("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);class _{constructor(){m(this,a,new Map),p(this,"on",(t,e)=>{let r=f(this,a).get(t)??new Set;return r.add(e),f(this,a).has(t)||f(this,a).set(t,r),()=>{r.delete(e),0===r.size&&f(this,a).delete(t)}}),p(this,"once",(t,e)=>{let r=this.on(t,(...t)=>{r(),e(...t)});return r}),p(this,"emit",(t,...e)=>{let r=f(this,a).get(t);null!=r&&r.forEach(t=>t(...e))})}static forwardEvent(t,e,r){let s=r.map(r=>{let[s,a]=Array.isArray(r)?r:[r,r];return t.on(s,(...t)=>{e.emit(a,...t)})});return()=>{s.forEach(t=>t())}}destroy(){f(this,a).clear()}}a=new WeakMap;let g=()=>{let t;self.onmessage=e=>{"start"===e.data.event&&(self.clearInterval(t),t=self.setInterval(()=>{self.postMessage({})},16.6)),"stop"===e.data.event&&self.clearInterval(t)}},y=new Map,w=1,b=null;null!=globalThis.Worker&&((b=(()=>{let t=new Blob([`(${g.toString()})()`]);return new Worker(URL.createObjectURL(t))})()).onmessage=()=>{for(let[t,e]of(w+=1,y))if(w%t==0)for(let t of e)t()});let v=(t,e)=>{let r=Math.round(e/16.6),s=y.get(r)??new Set;return s.add(t),y.set(r,s),1===y.size&&1===s.size&&(null==b||b.postMessage({event:"start"})),()=>{s.delete(t),0===s.size&&y.delete(r),0===y.size&&(w=0,null==b||b.postMessage({event:"stop"}))}};function S(t,e){let r=!1;return(async function(){let s=t.getReader();for(;!r;){let{value:t,done:r}=await s.read();if(r)return void e.onDone();await e.onChunk(t)}s.releaseLock(),await t.cancel()})().catch(console.error),()=>{r=!0}}function x(t,e,r){let s=0,a=0,n=t.boxes,o=!1,h=()=>{var e;if(!o)if(null==n.find(t=>"moof"===t.type))return null;else o=!0;if(a>=n.length)return null;let r=new l.default.DataStream;r.endianness=l.default.DataStream.BIG_ENDIAN;let s=a;try{for(;s{let t=h();null==t||u||r.enqueue(t)},e),p=e=>{if(clearInterval(s),t.flush(),null!=e)return void r.error(e);let a=h();null==a||u||r.enqueue(a),u||r.close()},d&&p()},cancel(){u=!0,clearInterval(s),null==r||r()}}),stop:t=>{d||(d=!0,null==p||p(t))}}}let U=(t,e)=>{let r=new Uint8Array(8);new DataView(r.buffer).setUint32(0,e);for(let e=0;e<4;e++)r[4+e]=t.charCodeAt(e);return r},E=()=>{let t=new TextEncoder,e=t.encode("mdta"),r=t.encode("mp4 handler"),s=32+r.byteLength+1,a=new Uint8Array(s),n=new DataView(a.buffer);return a.set(U("hdlr",s),0),n.setUint32(8,0),a.set(e,16),a.set(r,32),a},A=t=>{let e=new TextEncoder,r=e.encode("mdta"),s=t.map(t=>{let s=e.encode(t),a=8+s.byteLength,n=new Uint8Array(a);return new DataView(n.buffer).setUint32(0,a),n.set(r,4),n.set(s,4+r.byteLength),n}),a=16+s.reduce((t,e)=>t+e.byteLength,0),n=new Uint8Array(a),o=new DataView(n.buffer);n.set(U("keys",a),0),o.setUint32(8,0),o.setUint32(12,t.length);let l=16;for(let t of s)n.set(t,l),l+=t.byteLength;return n},C=t=>{let e=new TextEncoder,r=e.encode("data"),s=Object.entries(t).map(([t,s],a)=>{let n=e.encode(s),o=24+n.byteLength,l=new Uint8Array(o),h=new DataView(l.buffer);return h.setUint32(0,o),h.setUint32(4,a+1),h.setUint32(8,16+n.byteLength),l.set(r,12),h.setUint32(16,1),l.set(n,24),l}),a=8+s.reduce((t,e)=>t+e.byteLength,0),n=new Uint8Array(a);n.set(U("ilst",a),0);let o=8;for(let t of s)n.set(t,o),o+=t.byteLength;return n},T=t=>{let e=E(),r=A(Object.keys(t)),s=C(t),a=new Uint8Array(e.length+r.length+s.length);return a.set(e,0),a.set(r,e.length),a.set(s,e.length+r.length),a},k=1,B=[],F=["debug","info","warn","error"].reduce((t,e,r)=>Object.assign(t,{[e]:(...t)=>{k<=r&&(console[e](...t),B.push({lvName:e,timeStr:function(){let t=new Date;return`${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}.${t.getMilliseconds()}`}(),args:t}))}}),{}),I=new Map,z={setLogLevel:t=>{k=I.get(t)??1},...F,create:t=>Object.fromEntries(Object.entries(F).map(([e,r])=>[e,(...e)=>r(t,...e)])),dump:async()=>B.reduce((t,{lvName:e,timeStr:r,args:s})=>t+`[${e}][${r}] ${s.map(t=>t instanceof Error?String(t):"object"==typeof t?JSON.stringify(t,(t,e)=>e instanceof Error?String(e):e):String(t)).join(" ")} `,"")};function P(t){z.info("recodemux opts:",t);let e=l.default.createFile(),r=new _,s=(t,e)=>{let r=t.add("udta").add("meta");r.data=T(e),r.size=r.data.byteLength},a=!1,n=()=>{null==e.moov||a||(a=!0,null!=t.metaDataTags&&s(e.moov,t.metaDataTags),null!=t.duration&&(e.moov.mvhd.duration=t.duration))};r.once("VideoReady",n),r.once("AudioReady",n);let o=null!=t.video?function(t,e,r){let s={timescale:1e6,width:t.width,height:t.height,brands:["isom","iso2","avc1","mp42","mp41"],avcDecoderConfigRecord:null,name:"Track created with WebAV"},a=-1,n=!1;r.once("AudioReady",()=>{n=!0});let o={encoder0:[],encoder1:[]},l=(t,n,l)=>{var h;if(-1===a&&null!=l){let t=null==(h=l.decoderConfig)?void 0:h.description;(function(t){let e=new Uint8Array(t);e[2].toString(2).slice(-2).includes("1")&&(e[2]=0)})(t),s.avcDecoderConfigRecord=t,a=e.addTrack(s),r.emit("VideoReady"),z.info("VideoEncoder, video track ready, trackId:",a)}o[t].push(R(n))},h="encoder1",d=0,u=Math.floor(1e3/t.expectFPS*1e3);function p(){if(!n)return;let t="encoder1"===h?"encoder0":"encoder1",e=o[h],r=o[t];if(0===e.length&&0===r.length)return;let s=e[0];if(null!=s&&(!s.is_sync||s.cts-dd&&(d=t)}let a=r[0];if(null!=a&&a.is_sync&&a.cts-dd&&(d=t)}else{h=t,p();return}}function c(t){let r=-1,s=0;for(;s0&&n.is_sync)break;e.addSample(a,n.data,n),r=n.cts+n.duration}return t.splice(0,s),r}let f=v(p,15),m=L(t,(t,e)=>l("encoder0",t,e)),_=L(t,(t,e)=>l("encoder1",t,e)),g=0;return{get encodeQueueSize(){return m.encodeQueueSize+_.encodeQueueSize},encode:(t,e)=>{try{e.keyFrame&&(g+=1),(g%2==0?m:_).encode(t,e)}catch(s){let r=`encode video frame error: ${s.message}, state: ${JSON.stringify({ts:t.timestamp,keyFrame:e.keyFrame,duration:t.duration,gopId:g})}`;throw z.error(r),Error(r)}},flush:async()=>{await Promise.all(["configured"===m.state?await m.flush():null,"configured"===_.state?await _.flush():null]),f(),p()},close:()=>{"configured"===m.state&&m.close(),"configured"===_.state&&_.close()}}}(t.video,e,r):null,h=null!=t.audio?function(t,e,r){let s={timescale:1e6,samplerate:t.sampleRate,channel_count:t.channelCount,hdlr:"soun",type:"aac"===t.codec?"mp4a":"Opus",name:"Track created with WebAV"},a=-1,n=[],o=!1;r.once("VideoReady",()=>{o=!0,n.forEach(t=>{let r=R(t);e.addSample(a,r.data,r)}),n=[]});let h={codec:"aac"===t.codec?"mp4a.40.2":"opus",sampleRate:t.sampleRate,numberOfChannels:t.channelCount,bitrate:128e3},d=new AudioEncoder({error:t=>{let e=`AudioEncoder error: ${t.message}, config: ${JSON.stringify(h)}, state: ${JSON.stringify({qSize:d.encodeQueueSize,state:d.state})}`;throw z.error(e),Error(e)},output:(t,h)=>{var d;if(-1===a){let t=null==(d=h.decoderConfig)?void 0:d.description;a=e.addTrack({...s,description:null==t?void 0:function(t){let e=t.byteLength,r=new Uint8Array([0,0,0,0,3,23+e,0,2,0,4,18+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5,e,...new Uint8Array(t instanceof ArrayBuffer?t:t.buffer),6,1,2]),s=new l.default.BoxParser.esdsBox(r.byteLength);return s.hdr_size=0,s.parse(new l.default.DataStream(r,0,l.default.DataStream.BIG_ENDIAN)),s}(t)}),r.emit("AudioReady"),z.info("AudioEncoder, audio track ready, trackId:",a)}if(o){let r=R(t);e.addSample(a,r.data,r)}else n.push(t)}});return d.configure(h),d}(t.audio,e,r):null;return null==t.video&&r.emit("VideoReady"),null==t.audio&&r.emit("AudioReady"),{encodeVideo:(t,e)=>{null==o||o.encode(t,e),t.close()},encodeAudio:t=>{if(null!=h)try{h.encode(t),t.close()}catch(e){let t=`encode audio chunk error: ${e.message}, state: ${JSON.stringify({qSize:h.encodeQueueSize,state:h.state})}`;throw z.error(t),Error(t)}},getEncodeQueueSize:()=>(null==o?void 0:o.encodeQueueSize)??(null==h?void 0:h.encodeQueueSize)??0,flush:async()=>{await Promise.all([null==o?void 0:o.flush(),(null==h?void 0:h.state)==="configured"?h.flush():null])},close:()=>{r.destroy(),null==o||o.close(),(null==h?void 0:h.state)==="configured"&&h.close()},mp4file:e}}function L(t,e){let r={codec:t.codec,framerate:t.expectFPS,hardwareAcceleration:t.__unsafe_hardwareAcceleration__,bitrate:t.bitrate,width:t.width,height:t.height,alpha:"discard",avc:{format:"avc"}},s=new VideoEncoder({error:t=>{let e=`VideoEncoder error: ${t.message}, config: ${JSON.stringify(r)}, state: ${JSON.stringify({qSize:s.encodeQueueSize,state:s.state})}`;throw z.error(e),Error(e)},output:e});return s.configure(r),s}function R(t){let e=new ArrayBuffer(t.byteLength);t.copyTo(e);let r=t.timestamp;return{duration:t.duration??0,dts:r,cts:r,is_sync:"key"===t.type,data:e}}I.set(z.debug,0),I.set(z.info,1),I.set(z.warn,2),I.set(z.error,3),async function(){await Promise.resolve(),null!=globalThis.navigator&&null!=globalThis.document&&(z.info(`@webav version: 1.1.0, date: ${new Date().toLocaleDateString()}`),z.info(globalThis.navigator.userAgent),document.addEventListener("visibilitychange",()=>{z.info(`visibilitychange: ${document.visibilityState}`)}),"PressureObserver"in globalThis&&new PressureObserver(t=>{z.info(`cpu state change: ${JSON.stringify(t.map(t=>t.state))}`)}).observe("cpu"))}()},{"@webav/mp4box.js":"cxovW","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(t,e,r,s){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}],rkdE4:[function(t,e,r,s){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"resample",()=>p);var n=t("./lib/interpolator"),o=t("./lib/fir-lpf"),l=t("./lib/butterworth-lpf");let h={point:!1,linear:!1,cubic:!0,sinc:!0},d={IIR:16,FIR:71},u={IIR:l.ButterworthLPF,FIR:o.FIRLPF};function p(t,e,r,s={}){let a=(r-e)/e+1,o=new Float64Array(t.length*a);s.method=s.method||"cubic";let l=new(0,n.Interpolator)(t.length,o.length,{method:s.method,tension:s.tension||0,sincFilterSize:s.sincFilterSize||6,sincWindow:s.sincWindow||void 0});if(void 0===s.LPF&&(s.LPF=h[s.method]),s.LPF){s.LPFType=s.LPFType||"IIR";let a=u[s.LPFType];r>e?function(t,e,r,s){for(let a=0,n=e.length;a=0;t--)e[t]=s.filter(e[t])}(t,o,l,new a(s.LPFOrder||d[s.LPFType],r,e/2)):function(t,e,r,s){for(let e=0,r=t.length;e=0;e--)t[e]=s.filter(t[e]);c(t,e,r)}(t,o,l,new a(s.LPFOrder||d[s.LPFType],e,r/2))}else c(t,o,l);return o}function c(t,e,r){for(let s=0,a=e.length;sn);class n{constructor(t,e,r){var s;this.length_=t,this.scaleFactor_=(t-1)/e,this.interpolate=this.cubic,"point"===r.method?this.interpolate=this.point:"linear"===r.method?this.interpolate=this.linear:"sinc"===r.method&&(this.interpolate=this.sinc),this.tangentFactor_=1-Math.max(0,Math.min(1,r.tension||0)),this.sincFilterSize_=r.sincFilterSize||1,this.kernel_=(s=r.sincWindow||o,function(t){var e;return(0===(e=t)?1:Math.sin(Math.PI*e)/(Math.PI*e))*s(t)})}point(t,e){return this.getClippedInput_(Math.round(this.scaleFactor_*t),e)}linear(t,e){let r=Math.floor(t=this.scaleFactor_*t);return(1-(t-=r))*this.getClippedInput_(r,e)+t*this.getClippedInput_(r+1,e)}cubic(t,e){let r=Math.floor(t=this.scaleFactor_*t),s=[this.getTangent_(r,e),this.getTangent_(r+1,e)],a=[this.getClippedInput_(r,e),this.getClippedInput_(r+1,e)],n=(t-=r)*t,o=t*n;return(2*o-3*n+1)*a[0]+(o-2*n+t)*s[0]+(-2*o+3*n)*a[1]+(o-n)*s[1]}sinc(t,e){let r=Math.floor(t=this.scaleFactor_*t),s=r-this.sincFilterSize_+1,a=r+this.sincFilterSize_,n=0;for(let r=s;r<=a;r++)n+=this.kernel_(t-r)*this.getClippedInput_(r,e);return n}getTangent_(t,e){return this.tangentFactor_*(this.getClippedInput_(t+1,e)-this.getClippedInput_(t-1,e))/2}getClippedInput_(t,e){return 0<=t&&tn);class n{constructor(t,e,r){let s=2*Math.PI*r/e,a=0;this.filters=[];for(let e=0;e<=t;e++)e-t/2==0?this.filters[e]=s:(this.filters[e]=Math.sin(s*(e-t/2))/(e-t/2),this.filters[e]*=.54-.46*Math.cos(2*Math.PI*e/t)),a+=this.filters[e];for(let e=0;e<=t;e++)this.filters[e]/=a;this.z=this.initZ_()}filter(t){this.z.buf[this.z.pointer]=t;let e=0;for(let t=0,r=this.z.buf.length;tn);class n{constructor(t,e,r){let s=[];for(let a=0;aI),_.export(r,"file",()=>R),_.export(r,"rollfile",()=>X),_.export(r,"tmpfile",()=>Z),_.export(r,"write",()=>D);var g=t=>{throw TypeError(t)},y=(t,e,r)=>e.has(t)||g("Cannot "+r),w=(t,e,r)=>(y(t,e,"read from private field"),r?r.call(t):e.get(t)),b=(t,e,r)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),v=(t,e,r,s)=>(y(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r);let S="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHUobil7aWYobj09PSIvIilyZXR1cm57cGFyZW50Om51bGwsbmFtZToiIn07Y29uc3QgZT1uLnNwbGl0KCIvIikuZmlsdGVyKGk9PmkubGVuZ3RoPjApO2lmKGUubGVuZ3RoPT09MCl0aHJvdyBFcnJvcigiSW52YWxpZCBwYXRoIik7Y29uc3QgYT1lW2UubGVuZ3RoLTFdLHI9Ii8iK2Uuc2xpY2UoMCwtMSkuam9pbigiLyIpO3JldHVybntuYW1lOmEscGFyZW50OnJ9fWFzeW5jIGZ1bmN0aW9uIHcobixlKXtjb25zdHtwYXJlbnQ6YSxuYW1lOnJ9PXUobik7aWYoYT09bnVsbClyZXR1cm4gYXdhaXQgbmF2aWdhdG9yLnN0b3JhZ2UuZ2V0RGlyZWN0b3J5KCk7Y29uc3QgaT1hLnNwbGl0KCIvIikuZmlsdGVyKHQ9PnQubGVuZ3RoPjApO3RyeXtsZXQgdD1hd2FpdCBuYXZpZ2F0b3Iuc3RvcmFnZS5nZXREaXJlY3RvcnkoKTtmb3IoY29uc3QgcyBvZiBpKXQ9YXdhaXQgdC5nZXREaXJlY3RvcnlIYW5kbGUocyx7Y3JlYXRlOmUuY3JlYXRlfSk7aWYoZS5pc0ZpbGUpcmV0dXJuIGF3YWl0IHQuZ2V0RmlsZUhhbmRsZShyLHtjcmVhdGU6ZS5jcmVhdGV9KX1jYXRjaCh0KXtpZih0Lm5hbWU9PT0iTm90Rm91bmRFcnJvciIpcmV0dXJuIG51bGw7dGhyb3cgdH19Y29uc3QgZj17fTtzZWxmLm9ubWVzc2FnZT1hc3luYyBuPT57dmFyIGk7Y29uc3R7ZXZ0VHlwZTplLGFyZ3M6YX09bi5kYXRhO2xldCByPWZbYS5maWxlSWRdO3RyeXtsZXQgdDtjb25zdCBzPVtdO2lmKGU9PT0icmVnaXN0ZXIiKXtjb25zdCBsPWF3YWl0IHcoYS5maWxlUGF0aCx7Y3JlYXRlOiEwLGlzRmlsZTohMH0pO2lmKGw9PW51bGwpdGhyb3cgRXJyb3IoYG5vdCBmb3VuZCBmaWxlOiAke2EuZmlsZUlkfWApO3I9YXdhaXQgbC5jcmVhdGVTeW5jQWNjZXNzSGFuZGxlKHttb2RlOmEubW9kZX0pLGZbYS5maWxlSWRdPXJ9ZWxzZSBpZihlPT09ImNsb3NlIilhd2FpdCByLmNsb3NlKCksZGVsZXRlIGZbYS5maWxlSWRdO2Vsc2UgaWYoZT09PSJ0cnVuY2F0ZSIpYXdhaXQgci50cnVuY2F0ZShhLm5ld1NpemUpO2Vsc2UgaWYoZT09PSJ3cml0ZSIpe2NvbnN0e2RhdGE6bCxvcHRzOm99PW4uZGF0YS5hcmdzO3Q9YXdhaXQgci53cml0ZShsLG8pfWVsc2UgaWYoZT09PSJyZWFkIil7Y29uc3R7b2Zmc2V0Omwsc2l6ZTpvfT1uLmRhdGEuYXJncyxnPW5ldyBVaW50OEFycmF5KG8pLGQ9YXdhaXQgci5yZWFkKGcse2F0Omx9KSxjPWcuYnVmZmVyO3Q9ZD09PW8/YzooKGk9Yy50cmFuc2Zlcik9PW51bGw/dm9pZCAwOmkuY2FsbChjLGQpKT8/Yy5zbGljZSgwLGQpLHMucHVzaCh0KX1lbHNlIGU9PT0iZ2V0U2l6ZSI/dD1hd2FpdCByLmdldFNpemUoKTplPT09ImZsdXNoIiYmYXdhaXQgci5mbHVzaCgpO3NlbGYucG9zdE1lc3NhZ2Uoe2V2dFR5cGU6ImNhbGxiYWNrIixjYklkOm4uZGF0YS5jYklkLHJldHVyblZhbDp0fSxzKX1jYXRjaCh0KXtjb25zdCBzPXQ7c2VsZi5wb3N0TWVzc2FnZSh7ZXZ0VHlwZToidGhyb3dFcnJvciIsY2JJZDpuLmRhdGEuY2JJZCxlcnJNc2c6cy5uYW1lKyI6ICIrcy5tZXNzYWdlK2AKYCtKU09OLnN0cmluZ2lmeShuLmRhdGEpfSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPW9wZnMtd29ya2VyLUY0UldscWNfLmpzLm1hcAo=",x="u">typeof self&&self.Blob&&new Blob([Uint8Array.from(atob(S),t=>t.charCodeAt(0))],{type:"text/javascript;charset=utf-8"});function U(t){let e;try{if(!(e=x&&(self.URL||self.webkitURL).createObjectURL(x)))throw"";let r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;base64,"+S,{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}async function E(t,e,r){let s=function(){if(A.length<3){let t=function(){let t=new U,e=0,r={};return t.onmessage=({data:t})=>{var e,s;"callback"===t.evtType?null==(e=r[t.cbId])||e.resolve(t.returnVal):"throwError"===t.evtType&&(null==(s=r[t.cbId])||s.reject(Error(t.errMsg))),delete r[t.cbId]},async function(s,a,n=[]){e+=1;let o=new Promise((t,s)=>{r[e]={resolve:t,reject:s}});return t.postMessage({cbId:e,evtType:s,args:a},n),o}}();return A.push(t),t}{let t=A[C];return C=(C+1)%A.length,t}}();return await s("register",{fileId:t,filePath:e,mode:r}),{read:async(e,r)=>await s("read",{fileId:t,offset:e,size:r}),write:async(e,r)=>await s("write",{fileId:t,data:e,opts:r},[ArrayBuffer.isView(e)?e.buffer:e]),close:async()=>await s("close",{fileId:t}),truncate:async e=>await s("truncate",{fileId:t,newSize:e}),getSize:async()=>await s("getSize",{fileId:t}),flush:async()=>await s("flush",{fileId:t})}}let A=[],C=0;function T(t){if("/"===t)return{parent:null,name:""};let e=t.split("/").filter(t=>t.length>0);if(0===e.length)throw Error("Invalid path");return{name:e[e.length-1],parent:"/"+e.slice(0,-1).join("/")}}async function k(t,e){let{parent:r,name:s}=T(t);if(null==r)return await navigator.storage.getDirectory();let a=r.split("/").filter(t=>t.length>0);try{let t=await navigator.storage.getDirectory();for(let r of a)t=await t.getDirectoryHandle(r,{create:e.create});return e.isFile?await t.getFileHandle(s,{create:e.create}):await t.getDirectoryHandle(s,{create:e.create})}catch(t){if("NotFoundError"===t.name)return null;throw t}}async function B(t){let{parent:e,name:r}=T(t);if(null==e){let t=await navigator.storage.getDirectory();for await(let e of t.keys())await t.removeEntry(e,{recursive:!0});return}let s=await k(e,{create:!1,isFile:!1});if(null!=s)try{await s.removeEntry(r,{recursive:!0})}catch(t){if("NotFoundError"===t.name)return;throw t}}function F(t,e){return`${t}/${e}`.replace("//","/")}function I(t){return new P(t)}let z=class t{constructor(t){b(this,a),b(this,n),b(this,o),v(this,a,t);let{parent:e,name:r}=T(t);v(this,n,r),v(this,o,e)}get kind(){return"dir"}get name(){return w(this,n)}get path(){return w(this,a)}get parent(){return null==w(this,o)?null:I(w(this,o))}async create(){return await k(w(this,a),{create:!0,isFile:!1}),I(w(this,a))}async exists(){return await k(w(this,a),{create:!1,isFile:!1}) instanceof FileSystemDirectoryHandle}async remove(){for(let t of(await this.children()))try{await t.remove()}catch(t){console.warn(t)}try{await B(w(this,a))}catch(t){console.warn(t)}}async children(){let t=await k(w(this,a),{create:!1,isFile:!1});if(null==t)return[];let e=[];for await(let r of t.values())e.push(("file"===r.kind?R:I)(F(w(this,a),r.name)));return e}async copyTo(e){if(!await this.exists())throw Error(`dir ${this.path} not exists`);if(e instanceof t){let t=await e.exists()?I(F(e.path,this.name)):e;return await t.create(),await Promise.all((await this.children()).map(e=>e.copyTo(t))),t}if(e instanceof FileSystemDirectoryHandle)return await Promise.all((await this.children()).map(async t=>{"file"===t.kind?await t.copyTo(await e.getFileHandle(t.name,{create:!0})):await t.copyTo(await e.getDirectoryHandle(t.name,{create:!0}))})),null;throw Error("Illegal target type")}async moveTo(t){let e=await this.copyTo(t);return await this.remove(),e}};a=new WeakMap,n=new WeakMap,o=new WeakMap;let P=z,L=new Map;function R(t,e="rw"){if("rw"===e){let r=L.get(t)??new G(t,e);return L.set(t,r),r}return new G(t,e)}async function D(t,e,r={overwrite:!0}){if(e instanceof G)return void await D(t,await e.stream(),r);let s=await (t instanceof G?t:R(t,"rw")).createWriter();try{if(r.overwrite&&await s.truncate(0),e instanceof ReadableStream){let t=e.getReader();for(;;){let{done:e,value:r}=await t.read();if(e)break;await s.write(r)}}else await s.write(e)}catch(t){throw t}finally{await s.close()}}let M=0,O=()=>++M,N=class t{constructor(t,e){let r;b(this,l),b(this,h),b(this,d),b(this,u),b(this,p),b(this,c,0),b(this,f,(r=null,()=>(v(this,c,w(this,c)+1),r??(r=new Promise(async(t,e)=>{try{let e=await E(w(this,p),w(this,l),w(this,u));t([e,async()=>{v(this,c,w(this,c)-1),w(this,c)>0||(r=null,await e.close())}])}catch(t){e(t)}}))))),b(this,m,!1),v(this,p,O()),v(this,l,t),v(this,u,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[e]);let{parent:s,name:a}=T(t);if(null==s)throw Error("Invalid path");v(this,d,a),v(this,h,s)}get kind(){return"file"}get path(){return w(this,l)}get name(){return w(this,d)}get parent(){return null==w(this,h)?null:I(w(this,h))}async createWriter(){if("read-only"===w(this,u))throw Error("file is read-only");if(w(this,m))throw Error("Other writer have not been closed");v(this,m,!0);let t=new TextEncoder,[e,r]=await w(this,f).call(this),s=await e.getSize(),a=!1;return{write:async(r,n={})=>{if(a)throw Error("Writer is closed");let o="string"==typeof r?t.encode(r):r,l=n.at??s;return s=l+o.byteLength,await e.write(o,{at:l})},truncate:async t=>{if(a)throw Error("Writer is closed");await e.truncate(t),s>t&&(s=t)},flush:async()=>{if(a)throw Error("Writer is closed");await e.flush()},close:async()=>{if(a)throw Error("Writer is closed");a=!0,v(this,m,!1),await r()}}}async createReader(){let[t,e]=await w(this,f).call(this),r=!1,s=0;return{read:async(e,a={})=>{if(r)throw Error("Reader is closed");let n=a.at??s,o=await t.read(n,e);return s=n+o.byteLength,o},getSize:async()=>{if(r)throw Error("Reader is closed");return await t.getSize()},close:async()=>{r||(r=!0,await e())}}}async text(){return new TextDecoder().decode(await this.arrayBuffer())}async arrayBuffer(){let t=await k(w(this,l),{create:!1,isFile:!0});return null==t?new ArrayBuffer(0):(await t.getFile()).arrayBuffer()}async stream(){let t=await this.getOriginFile();return null==t?new ReadableStream({pull:t=>{t.close()}}):t.stream()}async getOriginFile(){var t;return null==(t=await k(w(this,l),{create:!1,isFile:!0}))?void 0:t.getFile()}async getSize(){let t=await k(w(this,l),{create:!1,isFile:!0});return null==t?0:(await t.getFile()).size}async exists(){return await k(w(this,l),{create:!1,isFile:!0}) instanceof FileSystemFileHandle}async remove(){if(w(this,c))throw Error("exists unclosed reader/writer");await B(w(this,l))}async copyTo(e){if(e instanceof t)return e.path===this.path?this:(await D(e.path,this),R(e.path));if(e instanceof P){if(!await this.exists())throw Error(`file ${this.path} not exists`);return await this.copyTo(R(F(e.path,this.name)))}if(e instanceof FileSystemFileHandle)return await (await this.stream()).pipeTo(await e.createWritable()),null;throw Error("Illegal target type")}async moveTo(t){let e=await this.copyTo(t);return await this.remove(),e}};l=new WeakMap,h=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakMap;let G=N,W="/.opfs-tools-temp-dir";async function Y(t){try{if("file"===t.kind){if(!await t.exists())return!0;let e=await t.createWriter();await e.truncate(0),await e.close(),await t.remove()}else await t.remove();return!0}catch(t){return console.warn(t),!1}}let H=[],V=!1;async function j(){if(null==globalThis.localStorage)return;let t="OPFS_TOOLS_EXPIRES_TMP_FILES";V||(V=!0,globalThis.addEventListener("unload",()=>{0!==H.length&&localStorage.setItem(t,`${localStorage.getItem(t)??""},${H.join(",")}`)}));let e=localStorage.getItem(t)??"";for(let t of e.split(","))0!==t.length&&await Y(R(`${W}/${t}`))&&(e=e.replace(t,""));localStorage.setItem(t,e.replace(/,{2,}/g,","))}function Z(){let t=`${Math.random().toString().slice(2)}-${Date.now()}`;return H.push(t),R(`${W}/${t}`)}function X(t,e){let r=R(t),s=0,a=r.createWriter(),n=r.createReader(),o=async t=>{let e=await (await n).read(s,{at:Math.round(.3*s)});s=await t.write(e,{at:0}),await t.truncate(s)};return{append:async t=>{let r=await a;(s+=await r.write(t))>=e&&await o(r)},text:r.text.bind(r),remove:async()=>{await (await n).close(),await (await a).close(),await r.remove()},getSize:async()=>s}}!async function(){var t;!0!==globalThis.__opfs_tools_tmpfile_init__&&(globalThis.__opfs_tools_tmpfile_init__=!0,null!=globalThis.FileSystemDirectoryHandle&&null!=globalThis.FileSystemFileHandle&&(null==(t=globalThis.navigator)?void 0:t.storage.getDirectory)!=null&&(setInterval(async()=>{for(let t of(await I(W).children())){let e=/^\d+-(\d+)$/.exec(t.name);(null==e||Date.now()-Number(e[1])>2592e5)&&await Y(t)}},6e4),await j()))}()},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["jc2x7"],"jc2x7","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-proxy-webav.legacy.js b/docs/compiled/artplayer-proxy-webav.legacy.js index 3f8253023..7dd376a86 100644 --- a/docs/compiled/artplayer-proxy-webav.legacy.js +++ b/docs/compiled/artplayer-proxy-webav.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(t,e,r,n,s){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[n]&&a[n],u=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(e,r){if(!u[e]){if(!t[e]){var s="function"==typeof a[n]&&a[n];if(!r&&s)return s(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var h=Error("Cannot find module '"+e+"'");throw h.code="MODULE_NOT_FOUND",h}d.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},d.cache={};var f=u[e]=new c.Module(e);t[e][0].call(f.exports,d,f,f.exports,this)}return u[e].exports;function d(t){var e=d.resolve(t);return!1===e?{}:c(e)}}c.isParcelRequire=!0,c.Module=function(t){this.id=t,this.bundle=c,this.exports={}},c.modules=t,c.cache=u,c.parent=o,c.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[n]}}),a[n]=c;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var r,n,u=e.option,l=e.constructor.utils,c=l.createElement,h=l.def,f=c("canvas"),d=f.getContext("2d"),p=null,m=null,_=null,y=null,g=0,v={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:u.muted,volume:u.volume,autoplay:u.autoplay};function b(){_&&(clearInterval(_),_=null),m&&(m.stop(),m=null)}function w(){if(n){var t=v.muted?0:v.volume;n.gain.setValueAtTime(t,r.currentTime)}}function S(){return(S=(0,s._)(function(){var t,o,u,l;function c(){return h.apply(this,arguments)}function h(){return(h=(0,s._)(function(){var s,c,h,f,_,g,w,S;return(0,a._)(this,function(a){switch(a.label){case 0:if(!v.playing)return[2];return h=(c=performance.now())-l,l=c,null!==y?(t=1e6*y,y=null,u=!0):t+=1e3*h*v.playbackRate,v.currentTime=t/1e6,[4,p.tick(Math.round(t))];case 1:if(_=(f=a.sent()).state,g=f.video,w=f.audio,e.emit("video:timeupdate",{type:"timeupdate"}),"done"===_)return b(),v.ended=!0,v.playing=!1,v.paused=!0,e.emit("video:ended",{type:"ended"}),[2];return g&&"success"===_&&(d.clearRect(0,0,v.videoWidth,v.videoHeight),d.drawImage(g,0,0,v.videoWidth,v.videoHeight),g.close()),u?u=!1:(null==w?void 0:null===(s=w[0])||void 0===s?void 0:s.length)&&((S=r.createBuffer(2,w[0].length,48e3)).copyToChannel(w[0],0),S.copyToChannel(w[1],1),(m=r.createBufferSource()).buffer=S,m.connect(n),m.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),o=Math.max(r.currentTime,o),m.start(o),o+=S.duration/v.playbackRate),[2]}})})).apply(this,arguments)}return(0,a._)(this,function(e){return r||(n=(r=new AudioContext).createGain()).connect(r.destination),t=1e6*v.currentTime,o=0,u=!0,l=performance.now(),b(),w(),v.playing=!0,v.paused=!1,_=setInterval(c,1e3/60),[2]})})).apply(this,arguments)}function x(t){return E.apply(this,arguments)}function E(){return(E=(0,s._)(function(t){var e;return(0,a._)(this,function(r){switch(r.label){case 0:return[4,p.tick(1e6*t)];case 1:return(e=r.sent().video)&&(d.clearRect(0,0,f.width,f.height),d.drawImage(e,0,0,f.width,f.height),e.close()),[2]}})})).apply(this,arguments)}function U(){var t,r=null===(t=e.template)||void 0===t?void 0:t.$player;if(r&&!u.autoSize){var n=f.videoWidth/f.videoHeight,s=r.clientWidth,a=r.clientHeight,o=0,l=0;s/a>n?o=(s-a*n)/2:l=(a-s/n)/2,Object.assign(f.style,{padding:"".concat(l,"px ").concat(o,"px")})}}function T(){return(T=(0,s._)(function(){var r,n,s;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,(0,o.Combinator).isSupported()];case 1:if(!a.sent())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");b(),Object.assign(v,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:u.muted,volume:u.volume,autoplay:u.autoplay}),p&&(p.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"})),a.label=2;case 2:return a.trys.push([2,5,,6]),[4,Promise.resolve()];case 3:return a.sent(),v.readyState=1,e.emit("video:loadstart",{type:"loadstart"}),[4,fetch(u.url)];case 4:if(!(r=a.sent()).body)throw Error("No response body");return p=new o.MP4Clip(r.body,t),[3,6];case 5:throw n=a.sent(),v.readyState=0,e.emit("video:error",n),n;case 6:return[4,p.ready];case 7:return Object.assign(v,{readyState:4,duration:Math.round((s=a.sent()).duration/1e6),videoWidth:s.width,videoHeight:s.height}),f.width=v.videoWidth,f.height=v.videoHeight,[4,x(.1)];case 8:return a.sent(),U(),e.emit("video:loadedmetadata",{type:"loadedmetadata"}),e.emit("video:durationchange",{type:"durationchange"}),e.emit("video:loadeddata",{type:"loadeddata"}),e.emit("video:canplay",{type:"canplay"}),e.emit("video:canplaythrough",{type:"canplaythrough"}),[2]}})})).apply(this,arguments)}return h(f,"duration",{get:function(){return v.duration}}),h(f,"videoWidth",{get:function(){return v.videoWidth}}),h(f,"videoHeight",{get:function(){return v.videoHeight}}),h(f,"volume",{get:function(){return v.volume},set:function(t){v.volume=Math.max(0,Math.min(1,t)),w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(f,"currentTime",{get:function(){return v.currentTime},set:function(t){if(!(v.readyState<4)){var r=Math.max(0,Math.min(t,v.duration)),n=performance.now();n-g>16&&(g=n,y=r,v.currentTime=r,v.playing||x(r),e.emit("video:timeupdate",{type:"timeupdate"}))}}}),h(f,"autoplay",{get:function(){return v.autoplay},set:function(t){v.autoplay=t,t&&v.readyState>=4&&f.play()}}),h(f,"src",{get:function(){return u.url},set:function(t){u.url=t,(function(){return T.apply(this,arguments)})().then(function(){u.autoplay&&f.play()})}}),h(f,"playbackRate",{get:function(){return v.playbackRate},set:function(t){v.playbackRate=Math.max(.25,Math.min(2,t)),m&&m.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),e.emit("video:ratechange",{type:"ratechange"})}}),h(f,"playing",{get:function(){return v.playing}}),h(f,"paused",{get:function(){return v.paused}}),h(f,"ended",{get:function(){return v.ended}}),h(f,"readyState",{get:function(){return v.readyState}}),h(f,"muted",{get:function(){return v.muted},set:function(t){v.muted=t,w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(f,"buffered",{get:function(){return{start:function(){return 0},end:function(){return v.buffered},length:1}}}),h(f,"play",{value:/*#__PURE__*/(0,s._)(function(){return(0,a._)(this,function(t){switch(t.label){case 0:if(v.readyState<4)return[2,!1];return[4,function(){return S.apply(this,arguments)}()];case 1:return t.sent(),e.emit("video:play",{type:"play"}),e.emit("video:playing",{type:"playing"}),[2,!0]}})})}),h(f,"pause",{value:function(){b(),v.playing=!1,v.paused=!0,e.emit("video:pause",{type:"pause"})}}),e.on("destroy",function(){b(),p&&p.destroy()}),e.on("resize",U),f}}"undefined"!=typeof window&&(window.artplayerProxyWebAV=u)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@webav/av-cliper":"4iON5","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t,e,r,n,s,a,o){try{var u=t[a](o),l=u.value}catch(t){r(t);return}u.done?e(l):Promise.resolve(l).then(n,s)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var o=t.apply(e,r);function u(t){s(o,n,a,u,l,"next",t)}function l(t){s(o,n,a,u,l,"throw",t)}u(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return s.__generator});var s=t("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return o}),n.export(r,"__assign",function(){return u}),n.export(r,"__rest",function(){return l}),n.export(r,"__decorate",function(){return c}),n.export(r,"__param",function(){return h}),n.export(r,"__esDecorate",function(){return f}),n.export(r,"__runInitializers",function(){return d}),n.export(r,"__propKey",function(){return p}),n.export(r,"__setFunctionName",function(){return m}),n.export(r,"__metadata",function(){return _}),n.export(r,"__awaiter",function(){return y}),n.export(r,"__generator",function(){return g}),n.export(r,"__createBinding",function(){return v}),n.export(r,"__exportStar",function(){return b}),n.export(r,"__values",function(){return w}),n.export(r,"__read",function(){return S}),n.export(r,"__spread",function(){return x}),n.export(r,"__spreadArrays",function(){return E}),n.export(r,"__spreadArray",function(){return U}),n.export(r,"__await",function(){return T}),n.export(r,"__asyncGenerator",function(){return A}),n.export(r,"__asyncDelegator",function(){return I}),n.export(r,"__asyncValues",function(){return k}),n.export(r,"__makeTemplateObject",function(){return C}),n.export(r,"__importStar",function(){return P}),n.export(r,"__importDefault",function(){return R}),n.export(r,"__classPrivateFieldGet",function(){return F}),n.export(r,"__classPrivateFieldSet",function(){return D}),n.export(r,"__classPrivateFieldIn",function(){return z}),n.export(r,"__addDisposableResource",function(){return L}),n.export(r,"__disposeResources",function(){return M});var s=t("@swc/helpers/_/_type_of"),a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(t);se.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function c(t,e,r,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(o=(a<3?s(o):a>3?s(e,r,o):s(e,r))||o);return a>3&&o&&Object.defineProperty(e,r,o),o}function h(t,e){return function(r,n){e(r,n,t)}}function f(t,e,r,n,s,a){function o(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var u,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",h=!e&&t?n.static?t:t.prototype:null,f=e||(h?Object.getOwnPropertyDescriptor(h,n.name):{}),d=!1,p=r.length-1;p>=0;p--){var m={};for(var _ in n)m[_]="access"===_?{}:n[_];for(var _ in n.access)m.access[_]=n.access[_];m.addInitializer=function(t){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(o(t||null))};var y=(0,r[p])("accessor"===l?{get:f.get,set:f.set}:f[c],m);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(u=o(y.get))&&(f.get=u),(u=o(y.set))&&(f.set=u),(u=o(y.init))&&s.unshift(u)}else(u=o(y))&&("field"===l?s.unshift(u):f[c]=u)}h&&Object.defineProperty(h,n.name,f),d=!0}function d(t,e,r){for(var n=arguments.length>2,s=0;s0&&s[s.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!s||u[1]>s[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 S(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,s,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){s={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(s)throw s.error}}return o}function x(){for(var t=[],e=0;e1||u(t,e)})},e&&(n[t]=e(n[t])))}function u(t,e){try{var r;(r=s[t](e)).value instanceof T?Promise.resolve(r.value.v).then(l,c):h(a[0][2],r)}catch(t){h(a[0][3],t)}}function l(t){u("next",t)}function c(t){u("throw",t)}function h(t,e){t(e),a.shift(),a.length&&u(a[0][0],a[0][1])}}function I(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,s){e[n]=t[n]?function(e){return(r=!r)?{value:T(t[n](e)),done:!1}:s?s(e):e}:s}}function k(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=w(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,s){!function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)}(n,s,(e=t[r](e)).done,e.value)})}}}function C(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var B=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function P(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 B(e,t),e}function R(t){return t&&t.__esModule?t:{default:t}}function F(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 D(t,e,r,n,s){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!s)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,r):s?s.value=r:e.set(t,r),r}function z(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 L(t,e,r){if(null!=e){var n,s;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],r&&(s=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var O="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var n=Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function M(t){function e(e){t.error=t.hasError?new O(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 s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(r,function(t){return e(t),r()})}catch(t){e(t)}}if(t.hasError)throw t.error}()}r.default={__extends:o,__assign:u,__rest:l,__decorate:c,__param:h,__metadata:_,__awaiter:y,__generator:g,__createBinding:v,__exportStar:b,__values:w,__read:S,__spread:x,__spreadArrays:E,__spreadArray:U,__await:T,__asyncGenerator:A,__asyncDelegator:I,__asyncValues:k,__makeTemplateObject:C,__importStar:P,__importDefault:R,__classPrivateFieldGet:F,__classPrivateFieldSet:D,__classPrivateFieldIn:z,__addDisposableResource:L,__disposeResources:M}},{"@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 s(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"4iON5":[function(t,e,r){var n,s,a,o,u,l,c,h,f,d,p,m,_,y,g,v,b,w,S,x,E,U,T,A,I,k,C,B,P,R,F,D,z,L,O,M,N,j,G,Y,W,V,H,X,Z,K,q,Q,J,$,tt,te,tr,ti,tn,ts,ta,to,tu,tl,tc,th,tf,td,tp,tm,t_,ty,tg,tv,tb,tw,tS,tx,tE,tU,tT,tA,tI,tk,tC,tB,tP,tR,tF,tD,tz,tL,tO,tM,tN,tj,tG,tY,tW,tV,tH,tX,tZ,tK,tq,tQ,tJ,t$,t0,t1,t2,t3,t4,t6,t8,t5,t9,t7,et,ee,er,ei,en,es,ea,eo,eu,el,ec,eh,ef,ed,ep=t("@parcel/transformer-js/src/esmodule-helpers.js");ep.defineInteropFlag(r),ep.export(r,"AudioClip",function(){return ih}),ep.export(r,"Combinator",function(){return i9}),ep.export(r,"DEFAULT_AUDIO_CONF",function(){return r$}),ep.export(r,"EmbedSubtitlesClip",function(){return iv}),ep.export(r,"EventTool",function(){return iw}),ep.export(r,"ImgClip",function(){return il}),ep.export(r,"Log",function(){return rw}),ep.export(r,"MP4Clip",function(){return r8}),ep.export(r,"MediaStreamClip",function(){return iy}),ep.export(r,"OffscreenSprite",function(){return i3}),ep.export(r,"Rect",function(){return i0}),ep.export(r,"VisibleSprite",function(){return i4}),ep.export(r,"adjustAudioDataVolume",function(){return rN}),ep.export(r,"audioResample",function(){return rW}),ep.export(r,"autoReadStream",function(){return rZ}),ep.export(r,"concatAudioClip",function(){return id}),ep.export(r,"concatFloat32Array",function(){return rz}),ep.export(r,"concatPCMFragments",function(){return rL}),ep.export(r,"createChromakey",function(){return iJ}),ep.export(r,"createEl",function(){return eY}),ep.export(r,"createHLSLoader",function(){return iX}),ep.export(r,"decodeImg",function(){return rj}),ep.export(r,"extractPCM4AudioBuffer",function(){return rM}),ep.export(r,"extractPCM4AudioData",function(){return rO}),ep.export(r,"fastConcatMP4",function(){return iB}),ep.export(r,"file2stream",function(){return ik}),ep.export(r,"fixFMP4Duration",function(){return iF}),ep.export(r,"mixinMP4AndAudio",function(){return iz}),ep.export(r,"mixinPCM",function(){return rY}),ep.export(r,"recodemux",function(){return iA}),ep.export(r,"renderTxt2Img",function(){return eW}),ep.export(r,"renderTxt2ImgBitmap",function(){return eV}),ep.export(r,"ringSliceFloat32Array",function(){return rX}),ep.export(r,"workerTimer",function(){return rA});var em=t("@swc/helpers/_/_assert_this_initialized"),e_=t("@swc/helpers/_/_async_iterator"),ey=t("@swc/helpers/_/_async_to_generator"),eg=t("@swc/helpers/_/_class_call_check"),ev=t("@swc/helpers/_/_create_class"),eb=t("@swc/helpers/_/_define_property"),ew=t("@swc/helpers/_/_get"),eS=t("@swc/helpers/_/_get_prototype_of"),ex=t("@swc/helpers/_/_inherits"),eE=t("@swc/helpers/_/_object_spread"),eU=t("@swc/helpers/_/_object_spread_props"),eT=t("@swc/helpers/_/_possible_constructor_return"),eA=t("@swc/helpers/_/_sliced_to_array"),eI=t("@swc/helpers/_/_to_consumable_array"),ek=t("@swc/helpers/_/_type_of"),eC=t("@swc/helpers/_/_create_super"),eB=t("@swc/helpers/_/_ts_generator"),eP=t("@swc/helpers/_/_ts_values"),eR=arguments[3],eF=t("718a311db185ef08").Buffer,eD=Object.defineProperty,ez=function(t){throw TypeError(t)},eL=function(t,e,r){var n;return(n=(void 0===e?"undefined":(0,ek._)(e))!="symbol"?e+"":e)in t?eD(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r},eO=function(t,e,r){return e.has(t)||ez("Cannot "+r)},eM=function(t,e,r){return eO(t,e,"read from private field"),r?r.call(t):e.get(t)},eN=function(t,e,r){return e.has(t)?ez("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r)},ej=function(t,e,r,n){return eO(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r},eG=function(t,e,r){return eO(t,e,"access private method"),r};function eY(t){return document.createElement(t)}function eW(t,e){var r=eY("pre");r.style.cssText="margin: 0; ".concat(e,"; visibility: hidden; position: fixed;"),r.textContent=t,document.body.appendChild(r);var n=r.getBoundingClientRect(),s=n.width,a=n.height;r.remove(),r.style.visibility="visible";var o=new Image;o.width=s,o.height=a;var u='\n\n\n
').concat(r.outerHTML,"
\n
\n
\n ").replace(/\t/g,"").replace(/#/g,"%23");return o.src="data:image/svg+xml;charset=utf-8,".concat(u),o}function eV(t,e){return eH.apply(this,arguments)}function eH(){return(eH=(0,ey._)(function(t,e){var r,n,s;return(0,eB._)(this,function(a){switch(a.label){case 0:return r=eW(t,e),[4,new Promise(function(t){r.onload=t})];case 1:return a.sent(),null==(s=(n=new OffscreenCanvas(r.width,r.height)).getContext("2d"))||s.drawImage(r,0,0,r.width,r.height),[4,createImageBitmap(n)];case 2:return[2,a.sent()]}})})).apply(this,arguments)}var eX=function(t){throw TypeError(t)},eZ=function(t,e,r){return e.has(t)||eX("Cannot "+r)},eK=function(t,e,r){return eZ(t,e,"read from private field"),r?r.call(t):e.get(t)},eq=function(t,e,r){return e.has(t)?eX("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r)},eQ=function(t,e,r,n){return eZ(t,e,"write to private field"),e.set(t,r),r},eJ="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHUobil7aWYobj09PSIvIilyZXR1cm57cGFyZW50Om51bGwsbmFtZToiIn07Y29uc3QgZT1uLnNwbGl0KCIvIikuZmlsdGVyKGk9PmkubGVuZ3RoPjApO2lmKGUubGVuZ3RoPT09MCl0aHJvdyBFcnJvcigiSW52YWxpZCBwYXRoIik7Y29uc3QgYT1lW2UubGVuZ3RoLTFdLHI9Ii8iK2Uuc2xpY2UoMCwtMSkuam9pbigiLyIpO3JldHVybntuYW1lOmEscGFyZW50OnJ9fWFzeW5jIGZ1bmN0aW9uIHcobixlKXtjb25zdHtwYXJlbnQ6YSxuYW1lOnJ9PXUobik7aWYoYT09bnVsbClyZXR1cm4gYXdhaXQgbmF2aWdhdG9yLnN0b3JhZ2UuZ2V0RGlyZWN0b3J5KCk7Y29uc3QgaT1hLnNwbGl0KCIvIikuZmlsdGVyKHQ9PnQubGVuZ3RoPjApO3RyeXtsZXQgdD1hd2FpdCBuYXZpZ2F0b3Iuc3RvcmFnZS5nZXREaXJlY3RvcnkoKTtmb3IoY29uc3QgcyBvZiBpKXQ9YXdhaXQgdC5nZXREaXJlY3RvcnlIYW5kbGUocyx7Y3JlYXRlOmUuY3JlYXRlfSk7aWYoZS5pc0ZpbGUpcmV0dXJuIGF3YWl0IHQuZ2V0RmlsZUhhbmRsZShyLHtjcmVhdGU6ZS5jcmVhdGV9KX1jYXRjaCh0KXtpZih0Lm5hbWU9PT0iTm90Rm91bmRFcnJvciIpcmV0dXJuIG51bGw7dGhyb3cgdH19Y29uc3QgZj17fTtzZWxmLm9ubWVzc2FnZT1hc3luYyBuPT57dmFyIGk7Y29uc3R7ZXZ0VHlwZTplLGFyZ3M6YX09bi5kYXRhO2xldCByPWZbYS5maWxlSWRdO3RyeXtsZXQgdDtjb25zdCBzPVtdO2lmKGU9PT0icmVnaXN0ZXIiKXtjb25zdCBsPWF3YWl0IHcoYS5maWxlUGF0aCx7Y3JlYXRlOiEwLGlzRmlsZTohMH0pO2lmKGw9PW51bGwpdGhyb3cgRXJyb3IoYG5vdCBmb3VuZCBmaWxlOiAke2EuZmlsZUlkfWApO3I9YXdhaXQgbC5jcmVhdGVTeW5jQWNjZXNzSGFuZGxlKHttb2RlOmEubW9kZX0pLGZbYS5maWxlSWRdPXJ9ZWxzZSBpZihlPT09ImNsb3NlIilhd2FpdCByLmNsb3NlKCksZGVsZXRlIGZbYS5maWxlSWRdO2Vsc2UgaWYoZT09PSJ0cnVuY2F0ZSIpYXdhaXQgci50cnVuY2F0ZShhLm5ld1NpemUpO2Vsc2UgaWYoZT09PSJ3cml0ZSIpe2NvbnN0e2RhdGE6bCxvcHRzOm99PW4uZGF0YS5hcmdzO3Q9YXdhaXQgci53cml0ZShsLG8pfWVsc2UgaWYoZT09PSJyZWFkIil7Y29uc3R7b2Zmc2V0Omwsc2l6ZTpvfT1uLmRhdGEuYXJncyxnPW5ldyBVaW50OEFycmF5KG8pLGQ9YXdhaXQgci5yZWFkKGcse2F0Omx9KSxjPWcuYnVmZmVyO3Q9ZD09PW8/YzooKGk9Yy50cmFuc2Zlcik9PW51bGw/dm9pZCAwOmkuY2FsbChjLGQpKT8/Yy5zbGljZSgwLGQpLHMucHVzaCh0KX1lbHNlIGU9PT0iZ2V0U2l6ZSI/dD1hd2FpdCByLmdldFNpemUoKTplPT09ImZsdXNoIiYmYXdhaXQgci5mbHVzaCgpO3NlbGYucG9zdE1lc3NhZ2Uoe2V2dFR5cGU6ImNhbGxiYWNrIixjYklkOm4uZGF0YS5jYklkLHJldHVyblZhbDp0fSxzKX1jYXRjaCh0KXtjb25zdCBzPXQ7c2VsZi5wb3N0TWVzc2FnZSh7ZXZ0VHlwZToidGhyb3dFcnJvciIsY2JJZDpuLmRhdGEuY2JJZCxlcnJNc2c6cy5uYW1lKyI6ICIrcy5tZXNzYWdlK2AKYCtKU09OLnN0cmluZ2lmeShuLmRhdGEpfSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPW9wZnMtd29ya2VyLUY0UldscWNfLmpzLm1hcAo=",e$=("undefined"==typeof self?"undefined":(0,ek._)(self))<"u"&&self.Blob&&new Blob([Uint8Array.from(atob(eJ),function(t){return t.charCodeAt(0)})],{type:"text/javascript;charset=utf-8"});function e0(t){var e;try{if(!(e=e$&&(self.URL||self.webkitURL).createObjectURL(e$)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch(e){return new Worker("data:text/javascript;base64,"+eJ,{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function e1(){return(e1=(0,ey._)(function(t,e,r){var n;return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,(n=function(){if(e2.length<3){var t,e,r,n,s=(e=new e0,r=0,n={},e.onmessage=function(t){var e,r,s=t.data;"callback"===s.evtType?null==(e=n[s.cbId])||e.resolve(s.returnVal):"throwError"===s.evtType&&(null==(r=n[s.cbId])||r.reject(Error(s.errMsg))),delete n[s.cbId]},t=(0,ey._)(function(t,s){var a,o,u=arguments;return(0,eB._)(this,function(l){return a=u.length>2&&void 0!==u[2]?u[2]:[],r+=1,o=new Promise(function(t,e){n[r]={resolve:t,reject:e}}),[2,(e.postMessage({cbId:r,evtType:t,args:s},a),o)]})}),function(e,r){return t.apply(this,arguments)});return e2.push(s),s}var a=e2[e3];return e3=(e3+1)%e2.length,a}())("register",{fileId:t,filePath:e,mode:r})];case 1:var a,o,u;return[2,(s.sent(),{read:(a=(0,ey._)(function(e,r){return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,n("read",{fileId:t,offset:e,size:r})];case 1:return[2,s.sent()]}})}),function(t,e){return a.apply(this,arguments)}),write:(o=(0,ey._)(function(e,r){return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,n("write",{fileId:t,data:e,opts:r},[ArrayBuffer.isView(e)?e.buffer:e])];case 1:return[2,s.sent()]}})}),function(t,e){return o.apply(this,arguments)}),close:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,n("close",{fileId:t})];case 1:return[2,e.sent()]}})}),truncate:(u=(0,ey._)(function(e){return(0,eB._)(this,function(r){switch(r.label){case 0:return[4,n("truncate",{fileId:t,newSize:e})];case 1:return[2,r.sent()]}})}),function(t){return u.apply(this,arguments)}),getSize:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,n("getSize",{fileId:t})];case 1:return[2,e.sent()]}})}),flush:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,n("flush",{fileId:t})];case 1:return[2,e.sent()]}})})})]}})})).apply(this,arguments)}var e2=[],e3=0;function e4(t){if("/"===t)return{parent:null,name:""};var e=t.split("/").filter(function(t){return t.length>0});if(0===e.length)throw Error("Invalid path");return{name:e[e.length-1],parent:"/"+e.slice(0,-1).join("/")}}function e6(t,e){return e8.apply(this,arguments)}function e8(){return(e8=(0,ey._)(function(t,e){var r,n,s,a,o,u,l,c,h,f,d,p,m,_;return(0,eB._)(this,function(y){switch(y.label){case 0:if(n=(r=e4(t)).parent,s=r.name,null!=n)return[3,2];return[4,navigator.storage.getDirectory()];case 1:return[2,y.sent()];case 2:a=n.split("/").filter(function(t){return t.length>0}),y.label=3;case 3:return y.trys.push([3,17,,18]),[4,navigator.storage.getDirectory()];case 4:o=y.sent(),u=!0,l=!1,c=void 0,y.label=5;case 5:y.trys.push([5,10,11,12]),h=a[Symbol.iterator](),y.label=6;case 6:if(u=(f=h.next()).done)return[3,9];return d=f.value,[4,o.getDirectoryHandle(d,{create:e.create})];case 7:o=y.sent(),y.label=8;case 8:return u=!0,[3,6];case 9:return[3,12];case 10:return p=y.sent(),l=!0,c=p,[3,12];case 11:try{u||null==h.return||h.return()}finally{if(l)throw c}return[7];case 12:if(!e.isFile)return[3,14];return[4,o.getFileHandle(s,{create:e.create})];case 13:return m=y.sent(),[3,16];case 14:return[4,o.getDirectoryHandle(s,{create:e.create})];case 15:m=y.sent(),y.label=16;case 16:return[2,m];case 17:if("NotFoundError"===(_=y.sent()).name)return[2,null];throw _;case 18:return[2]}})})).apply(this,arguments)}function e5(t){return e9.apply(this,arguments)}function e9(){return(e9=(0,ey._)(function(t){var e,r,n,s,a,o,u,l,c,h,f,d;return(0,eB._)(this,function(p){switch(p.label){case 0:if(r=(e=e4(t)).parent,n=e.name,null!=r)return[3,15];return[4,navigator.storage.getDirectory()];case 1:s=p.sent(),a=!1,o=!1,p.label=2;case 2:p.trys.push([2,8,9,14]),l=(0,e_._)(s.keys()),p.label=3;case 3:return[4,l.next()];case 4:if(!(a=!(c=p.sent()).done))return[3,7];return h=c.value,[4,s.removeEntry(h,{recursive:!0})];case 5:p.sent(),p.label=6;case 6:return a=!1,[3,3];case 7:return[3,14];case 8:return f=p.sent(),o=!0,u=f,[3,14];case 9:if(p.trys.push([9,,12,13]),!(a&&null!=l.return))return[3,11];return[4,l.return()];case 10:p.sent(),p.label=11;case 11:return[3,13];case 12:if(o)throw u;return[7];case 13:return[7];case 14:return[2];case 15:return[4,e6(r,{create:!1,isFile:!1})];case 16:if(!(null!=(d=p.sent())))return[3,18];return[4,d.removeEntry(n,{recursive:!0})];case 17:p.sent(),p.label=18;case 18:return[2]}})})).apply(this,arguments)}function e7(t,e){return"".concat(t,"/").concat(e).replace("//","/")}function rt(t){return new re(t)}var re=/*#__PURE__*/function(){function t(e){(0,eg._)(this,t),eq(this,v),eq(this,b),eq(this,w),eQ(this,v,e);var r=e4(e),n=r.parent,s=r.name;eQ(this,b,s),eQ(this,w,n)}return(0,ev._)(t,[{key:"kind",get:function(){return"dir"}},{key:"name",get:function(){return eK(this,b)}},{key:"path",get:function(){return eK(this,v)}},{key:"parent",get:function(){return null==eK(this,w)?null:rt(eK(this,w))}},{key:"create",value:function(){var t=this;return(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,e6(eK(t,v),{create:!0,isFile:!1})];case 1:return[2,(e.sent(),rt(eK(t,v)))]}})})()}},{key:"exists",value:function(){var t=this;return(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,e6(eK(t,v),{create:!1,isFile:!1})];case 1:return[2,e.sent() instanceof FileSystemDirectoryHandle]}})})()}},{key:"remove",value:function(){var t=this;return(0,ey._)(function(){var e,r,n,s,a,o,u;return(0,eB._)(this,function(l){switch(l.label){case 0:e=!0,r=!1,n=void 0,l.label=1;case 1:return l.trys.push([1,9,10,11]),[4,t.children()];case 2:s=l.sent()[Symbol.iterator](),l.label=3;case 3:if(e=(a=s.next()).done)return[3,8];o=a.value,l.label=4;case 4:return l.trys.push([4,6,,7]),[4,o.remove()];case 5:return l.sent(),[3,7];case 6:return console.warn(l.sent()),[3,7];case 7:return e=!0,[3,3];case 8:return[3,11];case 9:return u=l.sent(),r=!0,n=u,[3,11];case 10:try{e||null==s.return||s.return()}finally{if(r)throw n}return[7];case 11:return l.trys.push([11,13,,14]),[4,e5(eK(t,v))];case 12:return l.sent(),[3,14];case 13:return console.warn(l.sent()),[3,14];case 14:return[2]}})})()}},{key:"children",value:function(){var t=this;return(0,ey._)(function(){var e,r,n,s,a,o,u,l,c;return(0,eB._)(this,function(h){switch(h.label){case 0:return[4,e6(eK(t,v),{create:!1,isFile:!1})];case 1:if(null==(e=h.sent()))return[2,[]];r=[],n=!1,s=!1,h.label=2;case 2:h.trys.push([2,7,8,13]),o=(0,e_._)(e.values()),h.label=3;case 3:return[4,o.next()];case 4:if(!(n=!(u=h.sent()).done))return[3,6];l=u.value,r.push(("file"===l.kind?ri:rt)(e7(eK(t,v),l.name))),h.label=5;case 5:return n=!1,[3,3];case 6:return[3,13];case 7:return c=h.sent(),s=!0,a=c,[3,13];case 8:if(h.trys.push([8,,11,12]),!(n&&null!=o.return))return[3,10];return[4,o.return()];case 9:h.sent(),h.label=10;case 10:return[3,12];case 11:if(s)throw a;return[7];case 12:return[7];case 13:return[2,r]}})})()}},{key:"copyTo",value:function(t){var e=this;return(0,ey._)(function(){var r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,e.exists()];case 1:if(!s.sent())throw Error("dir ".concat(e.path," not exists"));return[4,t.exists()];case 2:return[4,(r=s.sent()?rt(e7(t.path,e.name)):t).create()];case 3:return s.sent(),n=Promise.all,[4,e.children()];case 4:return[4,n.apply(Promise,[s.sent().map(function(t){return t.copyTo(r)})])];case 5:return[2,(s.sent(),r)]}})})()}},{key:"moveTo",value:function(t){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.copyTo(t)];case 1:return r=n.sent(),[4,e.remove()];case 2:return[2,(n.sent(),r)]}})})()}}]),t}();v=/* @__PURE__ */new WeakMap,b=/* @__PURE__ */new WeakMap,w=/* @__PURE__ */new WeakMap;var rr=/* @__PURE__ */new Map;function ri(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rw";if("rw"===e){var r,n=null!==(r=rr.get(t))&&void 0!==r?r:new ru(t,e);return rr.set(t,n),n}return new ru(t,e)}function rn(t,e){return rs.apply(this,arguments)}function rs(){return(rs=(0,ey._)(function(t,e){var r,n,s,a,o,u,l,c=arguments;return(0,eB._)(this,function(h){switch(h.label){case 0:if(r=c.length>2&&void 0!==c[2]?c[2]:{overwrite:!0},!(e instanceof ru))return[3,3];return n=[t],[4,e.stream()];case 1:return[4,rn.apply(void 0,n.concat([h.sent(),r]))];case 2:return h.sent(),[2];case 3:return[4,(t instanceof ru?t:ri(t,"rw")).createWriter()];case 4:s=h.sent(),h.label=5;case 5:if(h.trys.push([5,16,17,19]),!r.overwrite)return[3,7];return[4,s.truncate(0)];case 6:h.sent(),h.label=7;case 7:if(!(e instanceof ReadableStream))return[3,13];a=e.getReader(),h.label=8;case 8:return[4,a.read()];case 9:if(u=(o=h.sent()).done,l=o.value,u)return[3,12];return[4,s.write(l)];case 10:h.sent(),h.label=11;case 11:return[3,8];case 12:return[3,15];case 13:return[4,s.write(e)];case 14:h.sent(),h.label=15;case 15:return[3,19];case 16:throw h.sent();case 17:return[4,s.close()];case 18:return h.sent(),[7];case 19:return[2]}})})).apply(this,arguments)}var ra=0,ro=/*#__PURE__*/function(){function t(e,r){var n,s=this;(0,eg._)(this,t),eq(this,S),eq(this,x),eq(this,E),eq(this,U),eq(this,T),eq(this,A,0),eq(this,I,(n=null,function(){var t;return eQ(s,A,eK(s,A)+1),null!=n?n:n=new Promise((t=(0,ey._)(function(t,e){var r;return(0,eB._)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,function(t,e,r){return e1.apply(this,arguments)}(eK(s,T),eK(s,S),eK(s,U))];case 1:return t([r=a.sent(),/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:if(eQ(s,A,eK(s,A)-1),eK(s,A)>0)return[3,2];return n=null,[4,r.close()];case 1:t.sent(),t.label=2;case 2:return[2]}})})]),[3,3];case 2:return e(a.sent()),[3,3];case 3:return[2]}})}),function(e,r){return t.apply(this,arguments)}))})),eq(this,k,!1),eQ(this,T,++ra),eQ(this,S,e),eQ(this,U,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[r]);var a=e4(e),o=a.parent,u=a.name;eQ(this,E,u),eQ(this,x,o)}return(0,ev._)(t,[{key:"kind",get:function(){return"file"}},{key:"path",get:function(){return eK(this,S)}},{key:"name",get:function(){return eK(this,E)}},{key:"parent",get:function(){return null==eK(this,x)?null:rt(eK(this,x))}},{key:"createWriter",value:function(){var t=this;return(0,ey._)(function(){var e,r,n,s,a,o;return(0,eB._)(this,function(u){switch(u.label){case 0:if("read-only"===eK(t,U))throw Error("file is read-only");if(eK(t,k))throw Error("Other writer have not been closed");return eQ(t,k,!0),e=new TextEncoder,[4,eK(t,I).call(t)];case 1:return n=(r=(0,eA._).apply(void 0,[u.sent(),2]))[0],s=r[1],[4,n.getSize()];case 2:var l,c;return a=u.sent(),o=!1,[2,{write:(l=(0,ey._)(function(t){var r,s,u,l,c=arguments;return(0,eB._)(this,function(h){switch(h.label){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:{},o)throw Error("Writer is closed");return u="string"==typeof t?e.encode(t):t,a=(l=null!==(s=r.at)&&void 0!==s?s:a)+u.byteLength,[4,n.write(u,{at:l})];case 1:return[2,h.sent()]}})}),function(t){return l.apply(this,arguments)}),truncate:(c=(0,ey._)(function(t){return(0,eB._)(this,function(e){switch(e.label){case 0:if(o)throw Error("Writer is closed");return[4,n.truncate(t)];case 1:return e.sent(),a>t&&(a=t),[2]}})}),function(t){return c.apply(this,arguments)}),flush:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:if(o)throw Error("Writer is closed");return[4,n.flush()];case 1:return t.sent(),[2]}})}),close:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:if(o)throw Error("Writer is closed");return o=!0,eQ(t,k,!1),[4,s()];case 1:return e.sent(),[2]}})})}]}})})()}},{key:"createReader",value:function(){var t=this;return(0,ey._)(function(){var e,r,n,s,a;return(0,eB._)(this,function(o){switch(o.label){case 0:return[4,eK(t,I).call(t)];case 1:var u;return r=(e=(0,eA._).apply(void 0,[o.sent(),2]))[0],n=e[1],s=!1,a=0,[2,{read:(u=(0,ey._)(function(t){var e,n,o,u,l=arguments;return(0,eB._)(this,function(c){switch(c.label){case 0:if(e=l.length>1&&void 0!==l[1]?l[1]:{},s)throw Error("Reader is closed");return o=null!==(n=e.at)&&void 0!==n?n:a,[4,r.read(o,t)];case 1:return u=c.sent(),[2,(a=o+u.byteLength,u)]}})}),function(t){return u.apply(this,arguments)}),getSize:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:if(s)throw Error("Reader is closed");return[4,r.getSize()];case 1:return[2,t.sent()]}})}),close:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:if(s)return[3,2];return s=!0,[4,n()];case 1:t.sent(),t.label=2;case 2:return[2]}})})}]}})})()}},{key:"text",value:function(){var t=this;return(0,ey._)(function(){var e,r;return(0,eB._)(this,function(n){switch(n.label){case 0:return r=(e=new TextDecoder).decode,[4,t.arrayBuffer()];case 1:return[2,r.apply(e,[n.sent()])]}})})()}},{key:"arrayBuffer",value:function(){var t=this;return(0,ey._)(function(){var e,r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e6(eK(t,S),{create:!1,isFile:!0})];case 1:if(null!=(e=n.sent()))return[3,2];return r=new ArrayBuffer(0),[3,4];case 2:return[4,e.getFile()];case 3:r=n.sent().arrayBuffer(),n.label=4;case 4:return[2,r]}})})()}},{key:"stream",value:function(){var t=this;return(0,ey._)(function(){var e;return(0,eB._)(this,function(r){switch(r.label){case 0:return[4,t.getOriginFile()];case 1:return[2,null==(e=r.sent())?new ReadableStream({pull:function(t){t.close()}}):e.stream()]}})})()}},{key:"getOriginFile",value:function(){var t=this;return(0,ey._)(function(){var e;return(0,eB._)(this,function(r){switch(r.label){case 0:return[4,e6(eK(t,S),{create:!1,isFile:!0})];case 1:return[2,null==(e=r.sent())?void 0:e.getFile()]}})})()}},{key:"getSize",value:function(){var t=this;return(0,ey._)(function(){var e,r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e6(eK(t,S),{create:!1,isFile:!0})];case 1:if(null!=(e=n.sent()))return[3,2];return r=0,[3,4];case 2:return[4,e.getFile()];case 3:r=n.sent().size,n.label=4;case 4:return[2,r]}})})()}},{key:"exists",value:function(){var t=this;return(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,e6(eK(t,S),{create:!1,isFile:!0})];case 1:return[2,e.sent() instanceof FileSystemFileHandle]}})})()}},{key:"remove",value:function(){var t=this;return(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:if(eK(t,A))throw Error("exists unclosed reader/writer");return[4,e5(eK(t,S))];case 1:return e.sent(),[2]}})})()}},{key:"copyTo",value:function(e){var r=this;return(0,ey._)(function(){var n;return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,r.exists()];case 1:if(!s.sent())throw Error("file ".concat(r.path," not exists"));if(!(e instanceof t))return[3,5];if(ri(e.path)!==r)return[3,2];return n=r,[3,4];case 2:return[4,rn(e.path,r)];case 3:s.sent(),n=ri(e.path),s.label=4;case 4:return[2,n];case 5:if(!(e instanceof re))return[3,7];return[4,r.copyTo(ri(e7(e.path,r.name)))];case 6:return[2,s.sent()];case 7:throw Error("Illegal target type")}})})()}},{key:"moveTo",value:function(t){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.copyTo(t)];case 1:return r=n.sent(),[4,e.remove()];case 2:return[2,(n.sent(),r)]}})})()}}]),t}();S=/* @__PURE__ */new WeakMap,x=/* @__PURE__ */new WeakMap,E=/* @__PURE__ */new WeakMap,U=/* @__PURE__ */new WeakMap,T=/* @__PURE__ */new WeakMap,A=/* @__PURE__ */new WeakMap,I=/* @__PURE__ */new WeakMap,k=/* @__PURE__ */new WeakMap;var ru=ro,rl="/.opfs-tools-temp-dir";function rc(t){return rh.apply(this,arguments)}function rh(){return(rh=(0,ey._)(function(t){var e;return(0,eB._)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,9,,10]),"file"!==t.kind)return[3,6];return[4,t.exists()];case 1:if(!r.sent())return[2,!0];return[4,t.createWriter()];case 2:return[4,(e=r.sent()).truncate(0)];case 3:return r.sent(),[4,e.close()];case 4:return r.sent(),[4,t.remove()];case 5:return r.sent(),[3,8];case 6:return[4,t.remove()];case 7:r.sent(),r.label=8;case 8:return[2,!0];case 9:return[2,(console.warn(r.sent()),!1)];case 10:return[2]}})})).apply(this,arguments)}var rf=[],rd=!1;function rp(){return(rp=(0,ey._)(function(){var t,e,r,n,s,a,o,u,l,c,h;return(0,eB._)(this,function(f){switch(f.label){case 0:if(null==globalThis.localStorage)return[2];t="OPFS_TOOLS_EXPIRES_TMP_FILES",rd||(rd=!0,globalThis.addEventListener("unload",function(){var e;0!==rf.length&&localStorage.setItem(t,"".concat(null!==(e=localStorage.getItem(t))&&void 0!==e?e:"",",").concat(rf.join(",")))})),r=null!==(e=localStorage.getItem(t))&&void 0!==e?e:"",n=!0,s=!1,a=void 0,f.label=1;case 1:f.trys.push([1,7,8,9]),o=r.split(",")[Symbol.iterator](),f.label=2;case 2:if(n=(u=o.next()).done)return[3,6];if(!(c=0!==(l=u.value).length))return[3,4];return[4,rc(ri("".concat(rl,"/").concat(l)))];case 3:c=f.sent(),f.label=4;case 4:c&&(r=r.replace(l,"")),f.label=5;case 5:return n=!0,[3,2];case 6:return[3,9];case 7:return h=f.sent(),s=!0,a=h,[3,9];case 8:try{n||null==o.return||o.return()}finally{if(s)throw a}return[7];case 9:return localStorage.setItem(t,r.replace(/,{2,}/g,",")),[2]}})})).apply(this,arguments)}function rm(){var t="".concat(Math.random().toString().slice(2),"-").concat(Date.now());return rf.push(t),ri("".concat(rl,"/").concat(t))}(0,ey._)(function(){var t,e;return(0,eB._)(this,function(e){switch(e.label){case 0:if(!(!0!==globalThis.__opfs_tools_tmpfile_init__))return[3,3];if(globalThis.__opfs_tools_tmpfile_init__=!0,null==globalThis.FileSystemDirectoryHandle||null==globalThis.FileSystemFileHandle||(null==(t=globalThis.navigator)?void 0:t.storage.getDirectory)==null)return[3,2];return setInterval(/*#__PURE__*/(0,ey._)(function(){var t,e,r,n,s,a,o,u;return(0,eB._)(this,function(l){switch(l.label){case 0:t=!0,e=!1,r=void 0,l.label=1;case 1:return l.trys.push([1,8,9,10]),[4,rt(rl).children()];case 2:n=l.sent()[Symbol.iterator](),l.label=3;case 3:if(t=(s=n.next()).done)return[3,7];if(a=s.value,!(null==(o=/^\d+-(\d+)$/.exec(a.name))||Date.now()-Number(o[1])>2592e5))return[3,5];return[4,rc(a)];case 4:l.sent(),l.label=5;case 5:l.label=6;case 6:return t=!0,[3,3];case 7:return[3,10];case 8:return u=l.sent(),e=!0,r=u,[3,10];case 9:try{t||null==n.return||n.return()}finally{if(e)throw r}return[7];case 10:return[2]}})}),6e4),[4,function(){return rp.apply(this,arguments)}()];case 1:e.sent(),e.label=2;case 2:e.label=3;case 3:return[2]}})})();var r_=1,ry=rm(),rg=null,rv=["debug","info","warn","error"].reduce(function(t,e,r){return Object.assign(t,(0,eb._)({},e,function(){for(var t,n,s=arguments.length,a=Array(s),o=0;o3&&void 0!==arguments[3]?arguments[3]:{},s=(r-e)/e+1,a=new Float64Array(t.length*s);n.method=n.method||"cubic";var o=new rI(t.length,a.length,{method:n.method,tension:n.tension||0,sincFilterSize:n.sincFilterSize||6,sincWindow:n.sincWindow||void 0});if(void 0===n.LPF&&(n.LPF=rP[n.method]),n.LPF){n.LPFType=n.LPFType||"IIR";var u=rF[n.LPFType];r>e?function(t,e,r,n){for(var s=0,a=e.length;s=0;o--)e[o]=n.filter(e[o])}(t,a,o,new u(n.LPFOrder||rR[n.LPFType],r,e/2)):function(t,e,r,n){for(var s=0,a=t.length;s=0;o--)t[o]=n.filter(t[o]);rD(t,e,r)}(t,a,o,new u(n.LPFOrder||rR[n.LPFType],e,r/2))}else rD(t,a,o);return a}(t,e,r.rate,{method:"sinc",LPF:!1}))})];return l=(u=new globalThis.OfflineAudioContext(r.chanCount,o*r.rate/e,r.rate)).createBufferSource(),c=u.createBuffer(s,o,e),t.forEach(function(t,e){return c.copyToChannel(t,e)}),l.buffer=c,l.connect(u.destination),l.start(),[4,u.startRendering()];case 1:return[2,rM.apply(void 0,[h.sent()])]}})})).apply(this,arguments)}function rH(t){return new Promise(function(e){var r=rA(function(){r(),e()},t)})}function rX(t,e,r){for(var n=r-e,s=new Float32Array(n),a=0;a=a&&console.debug("["+o.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},log:function(t,e){this.debug(t.msg)},info:function(t,e){2>=a&&console.info("["+o.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},warn:function(t,e){3>=a&&console.warn("["+o.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},error:function(t,e){4>=a&&console.error("["+o.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)}}).getDurationString=function(t,e){function r(t,e){for(var r=(""+t).split(".");r[0].length0))return"(empty)";for(var r="",n=0;n0&&(r+=","),r+="["+o.getDurationString(t.start(n))+","+o.getDurationString(t.end(n))+"]";return r},rQ.Log=o,(u=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0}).prototype.getPosition=function(){return this.position},u.prototype.getEndPosition=function(){return this.buffer.byteLength},u.prototype.getLength=function(){return this.buffer.byteLength},u.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},u.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},u.prototype.readAnyInt=function(t,e){var r=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:r=e?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=e?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16|this.dataview.getUint8(this.position+1)<<8|this.dataview.getUint8(this.position+2);break;case 4:r=e?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32|this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,r}throw"Not enough bytes in buffer"},u.prototype.readUint8=function(){return this.readAnyInt(1,!1)},u.prototype.readUint16=function(){return this.readAnyInt(2,!1)},u.prototype.readUint24=function(){return this.readAnyInt(3,!1)},u.prototype.readUint32=function(){return this.readAnyInt(4,!1)},u.prototype.readUint64=function(){return this.readAnyInt(8,!1)},u.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",r=0;rthis._byteLength&&(this._byteLength=e);return}for(r<1&&(r=1);e>r;)r*=2;var n=new ArrayBuffer(r),s=new Uint8Array(this._buffer);new Uint8Array(n,0,s.length).set(s),this.buffer=n,this._byteLength=e}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),l.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(t){this._realloc(1*t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},l.prototype.readInt32Array=function(t,e){var r=new Int32Array(t=null!=t?t:this.byteLength-this.position/4);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readInt16Array=function(t,e){var r=new Int16Array(t=null!=t?t:this.byteLength-this.position/2);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readInt8Array=function(t){var e=new Int8Array(t=null!=t?t:this.byteLength-this.position);return l.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},l.prototype.readUint32Array=function(t,e){var r=new Uint32Array(t=null!=t?t:this.byteLength-this.position/4);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readUint16Array=function(t,e){var r=new Uint16Array(t=null!=t?t:this.byteLength-this.position/2);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readUint8Array=function(t){var e=new Uint8Array(t=null!=t?t:this.byteLength-this.position);return l.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},l.prototype.readFloat64Array=function(t,e){var r=new Float64Array(t=null!=t?t:this.byteLength-this.position/8);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readFloat32Array=function(t,e){var r=new Float32Array(t=null!=t?t:this.byteLength-this.position/4);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null!=t?t:this.endianness);return this.position+=4,e},l.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null!=t?t:this.endianness);return this.position+=2,e},l.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},l.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null!=t?t:this.endianness);return this.position+=4,e},l.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null!=t?t:this.endianness);return this.position+=2,e},l.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},l.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null!=t?t:this.endianness);return this.position+=4,e},l.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null!=t?t:this.endianness);return this.position+=8,e},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(t,e,r,n,s){var a=new Uint8Array(t,e,s),o=new Uint8Array(r,n,s);a.set(o)},l.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},l.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},l.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;rs;n--,s++){var a=e[s];e[s]=e[n],e[n]=a}return t},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=[],r=0;r>16),this.writeUint8((65280&t)>>8),this.writeUint8(255&t)},l.prototype.adjustUint32=function(t,e){var r=this.position;this.seek(t),this.writeUint32(e),this.seek(r)},l.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=4*t,r},l.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=2*t,r},l.prototype.mapInt8Array=function(t){this._realloc(1*t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},l.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=4*t,r},l.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=2*t,r},l.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=8*t,r},l.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=4*t,r},(c=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)}).prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN),c.prototype.initialized=function(){var t;return this.bufferIndex>-1||(this.buffers.length>0?0===(t=this.buffers[0]).fileStart?(this.buffer=t,this.bufferIndex=0,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(t,e){o.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r.buffer},c.prototype.reduceBuffer=function(t,e,r){var n;return(n=new Uint8Array(r)).set(new Uint8Array(t,e,r)),n.buffer.fileStart=t.fileStart+e,n.buffer.usedBytes=0,n.buffer},c.prototype.insertBuffer=function(t){for(var e=!0,r=0;rn.byteLength){this.buffers.splice(r,1),r--;continue}o.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring")}else t.fileStart+t.byteLength<=n.fileStart||(t=this.reduceBuffer(t,0,n.fileStart-t.fileStart)),o.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(r,0,t),0===r&&(this.buffer=t);e=!1;break}if(t.fileStart0)t=this.reduceBuffer(t,s,a);else{e=!1;break}}}e&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),0===r&&(this.buffer=t))},c.prototype.logBufferLevel=function(t){var e,r,n,s,a,u=[],l="";for(n=0,s=0,e=0;e0&&(l+=a.end-1+"]"),(t?o.info:o.debug)("MultiBufferStream",0===this.buffers.length?"No more buffer in memory":""+this.buffers.length+" stored buffer(s) ("+n+"/"+s+" bytes), continuous ranges: "+l)},c.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0},c.prototype.findPosition=function(t,e,r){var n,s=null,a=-1;for(n=!0===t?0:this.bufferIndex;n=e?(o.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1},c.prototype.findEndContiguousBuf=function(t){var e,r,n,s=void 0!==t?t:this.bufferIndex;if(r=this.buffers[s],this.buffers.length>s+1)for(e=s+1;e>3;return 31===n&&r.data.length>=2&&(n=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),n},r.DecoderConfigDescriptor=function(t){r.Descriptor.call(this,4,t)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)},r.DecoderSpecificInfo=function(t){r.Descriptor.call(this,5,t)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(t){r.Descriptor.call(this,6,t)},r.SLConfigDescriptor.prototype=new r.Descriptor,this},rQ.MPEG4DescriptorParser=h,(f={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){f.FullBox.prototype=new f.Box,f.ContainerBox.prototype=new f.Box,f.SampleEntry.prototype=new f.Box,f.TrackGroupTypeBox.prototype=new f.FullBox,f.BASIC_BOXES.forEach(function(t){f.createBoxCtor(t)}),f.FULL_BOXES.forEach(function(t){f.createFullBoxCtor(t)}),f.CONTAINER_BOXES.forEach(function(t){f.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,r){this.type=t,this.size=e,this.uuid=r},FullBox:function(t,e,r){f.Box.call(this,t,e,r),this.flags=0,this.version=0},ContainerBox:function(t,e,r){f.Box.call(this,t,e,r),this.boxes=[]},SampleEntry:function(t,e,r,n){f.ContainerBox.call(this,t,e),this.hdr_size=r,this.start=n},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){f.FullBox.call(this,t,e)},createBoxCtor:function(t,e){f.boxCodes.push(t),f[t+"Box"]=function(e){f.Box.call(this,t,e)},f[t+"Box"].prototype=new f.Box,e&&(f[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){f[t+"Box"]=function(e){f.FullBox.call(this,t,e)},f[t+"Box"].prototype=new f.FullBox,f[t+"Box"].prototype.parse=function(t){this.parseFullHeader(t),e&&e.call(this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,r=0;rr?(o.error("BoxParser","Box of type '"+h+"' has a size "+c+" greater than its container size "+r),{code:f.ERR_NOT_ENOUGH_DATA,type:h,size:c,hdr_size:l,start:u}):0!==c&&u+c>t.getEndPosition()?(t.seek(u),o.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:f.ERR_NOT_ENOUGH_DATA,type:h,size:c,hdr_size:l,start:u}):e?{code:f.OK,type:h,size:c,hdr_size:l,start:u}:(f[h+"Box"]?n=new f[h+"Box"](c):"uuid"!==h?(o.warn("BoxParser","Unknown box type: '"+h+"'"),(n=new f.Box(h,c)).has_unparsed_data=!0):f.UUIDBoxes[a]?n=new f.UUIDBoxes[a](c):(o.warn("BoxParser","Unknown uuid type: '"+a+"'"),(n=new f.Box(h,c)).uuid=a,n.has_unparsed_data=!0),n.hdr_size=l,n.start=u,n.write===f.Box.prototype.write&&"mdat"!==n.type&&(o.info("BoxParser","'"+d+"' box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(t)),n.parse(t),(s=t.getPosition()-(n.start+n.size))<0?(o.warn("BoxParser","Parsing of box '"+d+"' did not read the entire indicated box data size (missing "+-s+" bytes), seeking forward"),t.seek(n.start+n.size)):s>0&&(o.error("BoxParser","Parsing of box '"+d+"' read "+s+" more bytes than the indicated box data size, seeking backwards"),0!==n.size&&t.seek(n.start+n.size)),{code:f.OK,box:n,size:n.size})},f.Box.prototype.parse=function(t){"mdat"!=this.type?this.data=t.readUint8Array(this.size-this.hdr_size):0===this.size?t.seek(t.getEndPosition()):t.seek(this.start+this.size)},f.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size},f.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size},f.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4},f.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},f.ContainerBox.prototype.parse=function(t){for(var e,r;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},f.SAMPLE_ENTRY_TYPE_VISUAL="Visual",f.SAMPLE_ENTRY_TYPE_AUDIO="Audio",f.SAMPLE_ENTRY_TYPE_HINT="Hint",f.SAMPLE_ENTRY_TYPE_METADATA="Metadata",f.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",f.SAMPLE_ENTRY_TYPE_SYSTEM="System",f.SAMPLE_ENTRY_TYPE_TEXT="Text",f.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8},f.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},f.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size},f.SampleEntry.prototype.parseFooter=function(t){f.ContainerBox.prototype.parse.call(this,t)},f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_HINT),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_METADATA),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SUBTITLE),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,this.parseFooter(t)}),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT,"enct"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_METADATA,"encm"),f.createBoxCtor("a1lx",function(t){var e=((1&(1&t.readUint8()))+1)*16;this.layer_size=[];for(var r=0;r<3;r++)16==e?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()}),f.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()}),f.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}),f.createBoxCtor("av1C",function(t){var e=t.readUint8();if(this.version=127&e,1!==this.version){o.error("av1C version "+this.version+" not supported");return}if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=31&e,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=3&e,e=t.readUint8(),this.reserved_1=e>>5&7,0!==this.reserved_1){o.error("av1C reserved_1 parsing problem");return}if(this.initial_presentation_delay_present=e>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&e;else if(this.reserved_2=15&e,0!==this.reserved_2){o.error("av1C reserved_2 parsing problem");return}var r=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(r)}),f.createBoxCtor("avcC",function(t){var e,r;for(this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=3&t.readUint8(),this.nb_SPS_nalus=31&t.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],e=0;e0&&(this.ext=t.readUint8Array(r))}),f.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}),f.createFullBoxCtor("ccst",function(t){var e=t.readUint8();this.all_ref_pics_intra=(128&e)==128,this.intra_pred_used=(64&e)==64,this.max_ref_per_pic=(63&e)>>2,t.readUint24()}),f.createBoxCtor("cdef",function(t){var e;for(this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],e=0;e=32768&&this.component_type_urls.push(t.readCString())}}),f.createFullBoxCtor("co64",function(t){var e,r;if(e=t.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else"rICC"===this.colour_type?this.ICC_profile=t.readUint8Array(this.size-4):"prof"===this.colour_type&&(this.ICC_profile=t.readUint8Array(this.size-4))}),f.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()}),f.createFullBoxCtor("cslg",function(t){0===this.version&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())}),f.createFullBoxCtor("ctts",function(t){var e,r;if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=e>>1&31,this.bsmod=(1&e)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|n>>5&7}),f.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=7&e,this.ind_subs=[];for(var r=0;r>6,n.bsid=s>>1&31,n.bsmod=(1&s)<<4|a>>4&15,n.acmod=a>>1&7,n.lfeon=1&a,n.num_dep_sub=o>>1&15,n.num_dep_sub>0&&(n.chan_loc=(1&o)<<8|t.readUint8())}}),f.createFullBoxCtor("dfLa",function(t){var e=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(t);;){var n=t.readUint8(),s=Math.min(127&n,r.length-1);if(s?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),e.push(r[s]),128&n)break}this.numMetadataBlocks=e.length+" ("+e.join(", ")+")"}),f.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()}),f.createBoxCtor("dmax",function(t){this.time=t.readUint32()}),f.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()}),f.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;e=4;)this.compatible_brands[r]=t.readString(4),e-=4,r++}),f.createFullBoxCtor("hdlr",function(t){0===this.version&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))}),f.createBoxCtor("hvcC",function(t){this.configurationVersion=t.readUint8(),s=t.readUint8(),this.general_profile_space=s>>6,this.general_tier_flag=(32&s)>>5,this.general_profile_idc=31&s,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),this.chroma_format_idc=3&t.readUint8(),this.bit_depth_luma_minus8=7&t.readUint8(),this.bit_depth_chroma_minus8=7&t.readUint8(),this.avgFrameRate=t.readUint16(),s=t.readUint8(),this.constantFrameRate=s>>6,this.numTemporalLayers=(13&s)>>3,this.temporalIdNested=(4&s)>>2,this.lengthSizeMinusOne=3&s,this.nalu_arrays=[];var e,r,n,s,a=t.readUint8();for(e=0;e>7,o.nalu_type=63&s;var u=t.readUint16();for(r=0;r>4&15,this.length_size=15&e,e=t.readUint8(),this.base_offset_size=e>>4&15,1===this.version||2===this.version?this.index_size=15&e:this.index_size=0,this.items=[];var e,r=0;if(this.version<2)r=t.readUint16();else if(2===this.version)r=t.readUint32();else throw"version of iloc box not supported";for(var n=0;n>7,this.axis=1&e}),f.createFullBoxCtor("infe",function(t){if((0===this.version||1===this.version)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),1===this.version){this.extension_type=t.readString(4),o.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(2===this.version?this.item_ID=t.readUint16():3===this.version&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),"mime"===this.item_type?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):"uri "===this.item_type&&(this.item_uri_type=t.readCString()))}),f.createFullBoxCtor("ipma",function(t){var e,r;for(entry_count=t.readUint32(),this.associations=[],e=0;e>7==1,1&this.flags?o.property_index=(127&a)<<8|t.readUint8():o.property_index=127&a}}}),f.createFullBoxCtor("iref",function(t){var e,r;for(this.references=[];t.getPosition()>7,n.assignment_type=127&s,n.assignment_type){case 0:n.grouping_type=t.readString(4);break;case 1:n.grouping_type=t.readString(4),n.grouping_type_parameter=t.readUint32();break;case 2:case 3:break;case 4:n.sub_track_id=t.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}}),f.createBoxCtor("lsel",function(t){this.layer_id=t.readUint16()}),f.createBoxCtor("maxr",function(t){this.period=t.readUint32(),this.bytes=t.readUint32()}),f.createBoxCtor("mdcv",function(t){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=t.readUint16(),this.display_primaries[0].y=t.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=t.readUint16(),this.display_primaries[1].y=t.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=t.readUint16(),this.display_primaries[2].y=t.readUint16(),this.white_point={},this.white_point.x=t.readUint16(),this.white_point.y=t.readUint16(),this.max_display_mastering_luminance=t.readUint32(),this.min_display_mastering_luminance=t.readUint32()}),f.createFullBoxCtor("mdhd",function(t){1==this.version?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.parseLanguage(t),t.readUint16()}),f.createFullBoxCtor("mehd",function(t){1&this.flags&&(o.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=t.readUint64():this.fragment_duration=t.readUint32()}),f.createFullBoxCtor("meta",function(t){this.boxes=[],f.ContainerBox.prototype.parse.call(this,t)}),f.createFullBoxCtor("mfhd",function(t){this.sequence_number=t.readUint32()}),f.createFullBoxCtor("mfro",function(t){this._size=t.readUint32()}),f.createFullBoxCtor("mvhd",function(t){1==this.version?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.rate=t.readUint32(),this.volume=t.readUint16()>>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}),f.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()}),f.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()}),f.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var r=0;r0){var e=t.readUint32();this.kid=[];for(var r=0;r0&&(this.data=t.readUint8Array(n))}),f.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),f.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),f.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),f.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),f.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}),f.createFullBoxCtor("saio",function(t){1&this.flags&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var r=t.readUint8(),n=0;n>7,this.num_leading_samples=127&e}),f.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)o.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=15&e,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=f.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}),f.createSampleGroupCtor("stsa",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),f.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=63&e}),f.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7}),f.createSampleGroupCtor("tsas",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),f.createSampleGroupCtor("tscl",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),f.createSampleGroupCtor("vipr",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),f.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),1===this.version?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),r=0;r>6,this.sample_depends_on[n]=e>>4&3,this.sample_is_depended_on[n]=e>>2&3,this.sample_has_redundancy[n]=3&e}),f.createFullBoxCtor("senc"),f.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),o.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e,r=t.readUint32(),n=0;n>31&1,n.referenced_size=2147483647&s,n.subsegment_duration=t.readUint32(),s=t.readUint32(),n.starts_with_SAP=s>>31&1,n.SAP_type=s>>28&7,n.SAP_delta_time=268435455&s}}),f.SingleItemTypeReferenceBox=function(t,e,r,n){f.Box.call(this,t,e),this.hdr_size=r,this.start=n},f.SingleItemTypeReferenceBox.prototype=new f.Box,f.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[e+1]=15&n}else if(8===this.field_size)for(e=0;e0)for(r=0;r>4&15,this.default_skip_byte_block=15&e}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=f.parseHex16(t),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}),f.createFullBoxCtor("tfdt",function(t){1==this.version?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}),f.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}),f.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=3&e,this.entries=[];for(var r=t.readUint32(),n=0;n>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}),f.createBoxCtor("tmax",function(t){this.time=t.readUint32()}),f.createBoxCtor("tmin",function(t){this.time=t.readUint32()}),f.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()}),f.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()}),f.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()}),f.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()},f.createTrackGroupCtor("msrc"),f.TrackReferenceTypeBox=function(t,e,r,n){f.Box.call(this,t,e),this.hdr_size=r,this.start=n},f.TrackReferenceTypeBox.prototype=new f.Box,f.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)},f.trefBox.prototype.parse=function(t){for(var e,r;t.getPosition()e&&this.flags&f.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&f.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=t.readUint8(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}),f.createFullBoxCtor("url ",function(t){1!==this.flags&&(this.location=t.readCString())}),f.createFullBoxCtor("urn ",function(t){this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}),f.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),f.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=f.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}),f.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),f.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=f.parseHex16(t)}),f.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=1&e,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8()):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=1&e),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}),f.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)}),f.createFullBoxCtor("vvcC",function(t){var e,r,n={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){this.held_bits=t.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(t){this.held_bits=t.readUint16(),this.num_held_bits=16},extract_bits:function(t){var e=this.held_bits>>this.num_held_bits-t&(1<1){for(n.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=n.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)n.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<"u"||null===e?e=2:e;r.length>=1;e+=f.decimalToHex(n,0)+".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var s=!1,a="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||s)&&(a="."+f.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+a,s=!0);e+=a}return e},f.vvc1SampleEntry.prototype.getCodec=f.vvi1SampleEntry.prototype.getCodec=function(){var t,e=f.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){e+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?e+=".H":e+=".L",e+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var n,s,a=[];for(s=0|this.vvcC.ptl_frame_only_constraint<<7|this.vvcC.ptl_multilayer_enabled<<6,t=0;t>2&63,a.push(s),s&&(n=t),s=this.vvcC.general_constraint_info[t]>>2&3;if(void 0===n)r=".CA";else{r=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",u=0,l=0;for(t=0;t<=n;++t)for(u=u<<8|a[t],l+=8;l>=5;)r+=o[u>>l-5&31],l-=5,u&=(1<4294967296&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>4294967296?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),"uuid"===this.type&&t.writeUint8Array(this.uuid),this.size>4294967296&&t.writeUint64(this.size)},f.FullBox.prototype.writeHeader=function(t){this.size+=4,f.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)},f.Box.prototype.write=function(t){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))},f.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+14294967295?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(t),1===this.version?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)},f.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&f.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&f.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&f.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&f.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&f.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)},f.tkhdBox.prototype.write=function(t){this.version=0,this.size=80,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)},f.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)},f.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&f.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&f.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&f.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&f.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&f.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&f.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&f.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&f.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)){if(t[r]instanceof f.Box||e[r]instanceof f.Box||(0,ek._)(t[r])>"u"||(0,ek._)(e[r])>"u"||"function"==typeof t[r]||"function"==typeof e[r]||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||f.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;if(t[r]!==e[r])return!1}return!0},f.boxEqual=function(t,e){if(!f.boxEqualFields(t,e))return!1;for(var r=0;r1)for(e=1;e-1&&this.fragmentedTracks.splice(e,1)},m.prototype.setExtractionOptions=function(t,e,r){var n=this.getTrackById(t);if(n){var s={};this.extractedTracks.push(s),s.id=t,s.user=e,s.trak=n,n.nextSample=0,s.nb_samples=1e3,s.samples=[],r&&r.nbSamples&&(s.nb_samples=r.nbSamples)}},m.prototype.unsetExtractionOptions=function(t){for(var e=-1,r=0;r-1&&this.extractedTracks.splice(e,1)},m.prototype.parse=function(){var t,e,r;if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else if(this.saveParsePosition&&this.saveParsePosition(),(e=f.parseOneBox(this.stream,!1)).code===f.ERR_NOT_ENOUGH_DATA){if(!this.processIncompleteBox)return;if(this.processIncompleteBox(e))continue;return}else{switch(t="uuid"!==(r=e.box).type?r.type:r.uuid,this.boxes.push(r),t){case"mdat":this.mdats.push(r);break;case"moof":this.moofs.push(r);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[t]&&o.warn("ISOFile","Duplicate Box of type: "+t+", overriding previous occurrence"),this[t]=r}this.updateUsedBytes&&this.updateUsedBytes(r,e)}},m.prototype.checkBuffer=function(t){if(null==t)throw"Buffer must be defined and non empty";if(void 0===t.fileStart)throw"Buffer must have a fileStart property";return 0===t.byteLength?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},m.prototype.appendBuffer=function(t,e){var r;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(o.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},m.prototype.getInfo=function(){var t,e,r,n,s,a,o={},u=/* @__PURE__ */new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(u+1e3*this.moov.mvhd.creation_time),o.modified=new Date(u+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],t=0;t0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',t=0;t=r.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+n.id+" for samples ["+Math.max(0,r.nextSample-n.nb_samples)+","+(r.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(n.id,n.user,n.segmentStream.buffer,r.nextSample,t||r.nextSample>=r.samples.length),n.segmentStream=null,n!==this.fragmentedTracks[e]))break}}if(null!==this.onSamples)for(e=0;e=r.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[e]))break}}}},m.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null},m.prototype.getBoxes=function(t,e){var r=[];return m._sweep.call(this,t,r,e),r},m._sweep=function(t,e,r){for(var n in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&r)return;m._sweep.call(this.boxes[n],t,e,r)}},m.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);if(e)return e.samples},m.prototype.getTrackSample=function(t,e){var r=this.getTrackById(t);return this.getSample(r,e)},m.prototype.releaseUsedSamples=function(t,e){var r=0,n=this.getTrackById(t);n.lastValidSample||(n.lastValidSample=0);for(var s=n.lastValidSample;st*s.timescale){c=n-1;break}e&&s.is_sync&&(l=n)}for(e&&(c=l),t=r.samples[c].cts,r.nextSample=c;r.samples[c].alreadyRead===r.samples[c].size&&r.samples[c+1];)c++;return u=r.samples[c].offset+r.samples[c].alreadyRead,o.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+o.getDurationString(t,a)+" and offset: "+u),{offset:u,time:t/a}},m.prototype.getTrackDuration=function(t){var e;return t.samples?((e=t.samples[t.samples.length-1]).cts+e.duration)/e.timescale:1/0},m.prototype.seek=function(t,e){var r,n,s,a=this.moov,u={offset:1/0,time:1/0};if(this.moov){for(s=0;sthis.getTrackDuration(r))&&((n=this.seekTrack(t,e,r)).offset-1){o=l;break}switch(o){case"Visual":if(s.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",e.width).set("height",e.height).set("horizresolution",4718592).set("vertresolution",4718592).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var d=new f.avcCBox;d.parse(new u(e.avcDecoderConfigRecord)),a.addBox(d)}else if(e.hevcDecoderConfigRecord){var p=new f.hvcCBox;p.parse(new u(e.hevcDecoderConfigRecord)),a.addBox(p)}break;case"Audio":s.add("smhd").set("balance",e.balance||0),a.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":s.add("hmhd");break;case"Subtitle":s.add("sthd"),"stpp"===e.type&&a.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break;default:s.add("nmhd")}e.description&&a.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(t){a.addBox(t)}),s.add("dinf").add("dref").addEntry(new f["url Box"]().set("flags",1));var m=s.add("stbl");return m.add("stsd").addEntry(a),m.add("stts").set("sample_counts",[]).set("sample_deltas",[]),m.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),m.add("stco").set("chunk_offsets",[]),m.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(r),e.id}},f.Box.prototype.computeSize=function(t){var e=t||new l;e.endianness=l.BIG_ENDIAN,this.write(e)},m.prototype.addSample=function(t,e,r){var n=r||{},s={},a=this.getTrackById(t);if(null!==a){s.number=a.samples.length,s.track_id=a.tkhd.track_id,s.timescale=a.mdia.mdhd.timescale,s.description_index=n.sample_description_index?n.sample_description_index-1:0,s.description=a.mdia.minf.stbl.stsd.entries[s.description_index],s.data=e,s.size=e.byteLength,s.alreadyRead=s.size,s.duration=n.duration||1,s.cts=n.cts||0,s.dts=n.dts||0,s.is_sync=n.is_sync||!1,s.is_leading=n.is_leading||0,s.depends_on=n.depends_on||0,s.is_depended_on=n.is_depended_on||0,s.has_redundancy=n.has_redundancy||0,s.degradation_priority=n.degradation_priority||0,s.offset=0,s.subsamples=n.subsamples,a.samples.push(s),a.samples_size+=s.size,a.samples_duration+=s.duration,void 0===a.first_dts&&(a.first_dts=n.dts),this.processSamples();var o=this.createSingleSampleMoof(s);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),s}},m.prototype.createSingleSampleMoof=function(t){var e=0;e=t.is_sync?33554432:65536;var r=new f.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var n=r.add("traf"),s=this.getTrackById(t.track_id);return n.add("tfhd").set("track_id",t.track_id).set("flags",f.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),n.add("tfdt").set("baseMediaDecodeTime",t.dts-(s.first_dts||0)),n.add("trun").set("flags",f.TRUN_FLAGS_DATA_OFFSET|f.TRUN_FLAGS_DURATION|f.TRUN_FLAGS_SIZE|f.TRUN_FLAGS_FLAGS|f.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),r},m.prototype.lastMoofIndex=0,m.prototype.samplesDataSize=0,m.prototype.resetTables=function(){var t,e,r,n,s,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,t=0;t=2&&(l=s[o].grouping_type+"/0",(u=new c(s[o].grouping_type,0)).is_fragment=!0,e.sample_groups_info[l]||(e.sample_groups_info[l]=u))}else for(o=0;o=2&&(l=n[o].grouping_type+"/0",u=new c(n[o].grouping_type,0),t.sample_groups_info[l]||(t.sample_groups_info[l]=u))},m.setSampleGroupProperties=function(t,e,r,n){var s,a,o;for(s in e.sample_groups=[],n)e.sample_groups[s]={},e.sample_groups[s].grouping_type=n[s].grouping_type,e.sample_groups[s].grouping_type_parameter=n[s].grouping_type_parameter,r>=n[s].last_sample_in_run&&(n[s].last_sample_in_run<0&&(n[s].last_sample_in_run=0),n[s].entry_index++,n[s].entry_index<=n[s].sbgp.entries.length-1&&(n[s].last_sample_in_run+=n[s].sbgp.entries[n[s].entry_index].sample_count)),n[s].entry_index<=n[s].sbgp.entries.length-1?e.sample_groups[s].group_description_index=n[s].sbgp.entries[n[s].entry_index].group_description_index:e.sample_groups[s].group_description_index=-1,0!==e.sample_groups[s].group_description_index&&(o=n[s].fragment_description?n[s].fragment_description:n[s].description,e.sample_groups[s].group_description_index>0?(a=e.sample_groups[s].group_description_index>65535?(e.sample_groups[s].group_description_index>>16)-1:e.sample_groups[s].group_description_index-1,o&&a>=0&&(e.sample_groups[s].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[s].description=o.entries[o.default_group_description_index-1]))},m.process_sdtp=function(t,e,r){e&&(t?(e.is_leading=t.is_leading[r],e.depends_on=t.sample_depends_on[r],e.is_depended_on=t.sample_is_depended_on[r],e.has_redundancy=t.sample_has_redundancy[r]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},m.prototype.buildSampleLists=function(){var t,e;for(t=0;t"u")){for(e=0;eb&&(w++,b<0&&(b=0),b+=a.sample_counts[w]),e>0?(t.samples[e-1].duration=a.sample_deltas[w],t.samples_duration+=t.samples[e-1].duration,A.dts=t.samples[e-1].dts+t.samples[e-1].duration):A.dts=0,o?(e>=S&&(x++,S<0&&(S=0),S+=o.sample_counts[x]),A.cts=t.samples[e].dts+o.sample_offsets[x]):A.cts=A.dts,u?(e==u.sample_numbers[E]-1?(A.is_sync=!0,E++):(A.is_sync=!1,A.degradation_priority=0),c&&c.entries[U].sample_delta+T==e+1&&(A.subsamples=c.entries[U].subsamples,T+=c.entries[U].sample_delta,U++)):A.is_sync=!0,m.process_sdtp(t.mdia.minf.stbl.sdtp,A,A.number),d?A.degradation_priority=d.priority[e]:A.degradation_priority=0,c&&c.entries[U].sample_delta+T==e&&(A.subsamples=c.entries[U].subsamples,T+=c.entries[U].sample_delta),(h.length>0||f.length>0)&&m.setSampleGroupProperties(t,A,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},m.prototype.updateSampleLists=function(){var t,e,r,n,s,a,o,u,l,c,h,d,p,_;if(void 0!==this.moov){for(;this.lastMoofIndex0&&m.initSampleGroups(h,c,c.sbgps,h.mdia.minf.stbl.sgpds,c.sgpds),e=0;e0?p.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(c.tfdt?p.dts=c.tfdt.baseMediaDecodeTime:p.dts=0,h.first_traf_merged=!0),p.cts=p.dts,y.flags&f.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+y.sample_composition_time_offset[r]),_=o,y.flags&f.TRUN_FLAGS_FLAGS?_=y.sample_flags[r]:0===r&&y.flags&f.TRUN_FLAGS_FIRST_FLAG&&(_=y.first_sample_flags),p.is_sync=!(_>>16&1),p.is_leading=_>>26&3,p.depends_on=_>>24&3,p.is_depended_on=_>>22&3,p.has_redundancy=_>>20&3,p.degradation_priority=65535&_;var g=!!(c.tfhd.flags&f.TFHD_FLAG_BASE_DATA_OFFSET),v=!!(c.tfhd.flags&f.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(y.flags&f.TRUN_FLAGS_DATA_OFFSET),w=0;w=g?c.tfhd.base_data_offset:v||0===e?l.start:u,0===e&&0===r?b?p.offset=w+y.data_offset:p.offset=w:p.offset=u,u=p.offset+p.size,(c.sbgps.length>0||c.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&m.setSampleGroupProperties(h,p,p.number_in_traf,c.sample_groups_info)}}if(c.subs){h.has_fragment_subsamples=!0;var S=c.first_sample_index;for(e=0;e-1))return null;var a=(r=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-r.fileStart);if(n.size-n.alreadyRead<=a)return o.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+(n.size-n.alreadyRead)+" full size: "+n.size+")"),l.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,n.size-n.alreadyRead),r.usedBytes+=n.size-n.alreadyRead,this.stream.logBufferLevel(),n.alreadyRead=n.size,n;if(0===a)return null;o.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+a+" full size: "+n.size+")"),l.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,a),n.alreadyRead+=a,r.usedBytes+=a,this.stream.logBufferLevel()}},m.prototype.releaseSample=function(t,e){var r=t.samples[e];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},m.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},m.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},m.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=s.ipro.protections[s.iinf.item_infos[t].protection_index-1]),s.iinf.item_infos[t].item_type?r.type=s.iinf.item_infos[t].item_type:r.type="mime",r.content_type=s.iinf.item_infos[t].content_type,r.content_encoding=s.iinf.item_infos[t].content_encoding;if(s.iloc)for(t=0;t0&&f.property_index-1-1))return null;var u=(e=this.stream.buffers[a]).byteLength-(s.offset+s.alreadyRead-e.fileStart);if(!(s.length-s.alreadyRead<=u))return o.debug("ISOFile","Getting item #"+t+" extent #"+n+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-e.fileStart)+" read size: "+u+" full extent size: "+s.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,e,s.offset+s.alreadyRead-e.fileStart,u),s.alreadyRead+=u,r.alreadyRead+=u,e.usedBytes+=u,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+t+" extent #"+n+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-e.fileStart)+" read size: "+(s.length-s.alreadyRead)+" full extent size: "+s.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,e,s.offset+s.alreadyRead-e.fileStart,s.length-s.alreadyRead),e.usedBytes+=s.length-s.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=s.length-s.alreadyRead,s.alreadyRead=s.length}}return r.alreadyRead===r.size?r:null},m.prototype.releaseItem=function(t){var e=this.items[t];if(!e.data)return 0;this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var r=0;r0?this.moov.traks[t].samples[0].duration:0),e.push(n)}return e},f.Box.prototype.printHeader=function(t){this.size+=8,this.size>4294967296&&(this.size+=8),"uuid"===this.type&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)},f.FullBox.prototype.printHeader=function(t){this.size+=4,f.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)},f.Box.prototype.print=function(t){this.printHeader(t)},f.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)},f.tkhdBox.prototype.print=function(t){f.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)},(_={}).createFile=function(t,e){var r=new m(e);return r.discardMdatData=!(void 0===t||t),r},rQ.createFile=_.createFile;var rJ=/* @__PURE__ */rq(rQ),r$={sampleRate:48e3,channelCount:2,codec:"mp4a.40.2"};function r0(t,e){var r=e.videoTracks[0],n={};if(null!=r){var s=function(t){var e=!0,r=!1,n=void 0;try{for(var s,a=t.mdia.minf.stbl.stsd.entries[Symbol.iterator]();!(e=(s=a.next()).done);e=!0){var o,u,l=s.value,c=null!==(u=null!==(o=l.avcC)&&void 0!==o?o:l.hvcC)&&void 0!==u?u:l.vpcC;if(null!=c){var h=new rJ.DataStream(void 0,0,rJ.DataStream.BIG_ENDIAN);return c.write(h),new Uint8Array(h.buffer.slice(8))}}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}throw Error("avcC, hvcC or VPX not found")}(t.getTrackById(r.id)).buffer,a=r.codec.startsWith("avc1")?{descKey:"avcDecoderConfigRecord",type:"avc1"}:r.codec.startsWith("hvc1")?{descKey:"hevcDecoderConfigRecord",type:"hvc1"}:{descKey:"",type:""},o=a.descKey,u=a.type;""!==o&&(n.videoTrackConf=(0,eb._)({timescale:r.timescale,duration:r.duration,width:r.video.width,height:r.video.height,brands:e.brands,type:u},o,s)),n.videoDecoderConf={codec:r.codec,codedHeight:r.video.height,codedWidth:r.video.width,description:s}}var l=e.audioTracks[0];if(null!=l){var c=r1(t);n.audioTrackConf={timescale:l.timescale,samplerate:l.audio.sample_rate,channel_count:l.audio.channel_count,hdlr:"soun",type:l.codec.startsWith("mp4a")?"mp4a":l.codec,description:r1(t)},n.audioDecoderConf=(0,eE._)({codec:l.codec.startsWith("mp4a")?r$.codec:l.codec,numberOfChannels:l.audio.channel_count,sampleRate:l.audio.sample_rate},null==c?{}:function(t){var e,r=null==(e=t.esd.descs[0])?void 0:e.descs[0];if(null==r)return{};var n=(0,eA._)(r.data,2),s=n[0],a=n[1];return{sampleRate:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][((7&s)<<1)+(a>>7)],numberOfChannels:(127&a)>>3}}(c))}return n}function r1(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mp4a",n=null==(e=t.moov)?void 0:e.traks.map(function(t){return t.mdia.minf.stbl.stsd.entries}).flat().find(function(t){return t.type===r});return null==n?void 0:n.esds}var r2=function t(){(0,eg._)(this,t),eL(this,"readable"),eL(this,"writable"),eN(this,C,0);var e,r=rJ.createFile(),n=!1,s=this;this.readable=new ReadableStream({start:function(t){r.onReady=function(e){var n,s,a=null==(n=e.videoTracks[0])?void 0:n.id;null!=a&&r.setExtractionOptions(a,"video",{nbSamples:100});var o=null==(s=e.audioTracks[0])?void 0:s.id;null!=o&&r.setExtractionOptions(o,"audio",{nbSamples:100}),t.enqueue({chunkType:"ready",data:{info:e,file:r}}),r.start()};var e={};r.onSamples=function(n,s,a){var o;t.enqueue({chunkType:"samples",data:{id:n,type:s,samples:a.map(function(t){return(0,eE._)({},t)})}}),e[n]=(null!==(o=e[n])&&void 0!==o?o:0)+a.length,r.releaseUsedSamples(n,e[n])},r.onFlush=function(){t.close()}},cancel:function(){r.stop(),n=!0}},{highWaterMark:50}),this.writable=new WritableStream({write:(e=(0,ey._)(function(t){var e;return(0,eB._)(this,function(a){return n?s.writable.abort():((e=t.buffer).fileStart=eM(s,C),ej(s,C,eM(s,C)+e.byteLength),r.appendBuffer(e)),[2]})}),function(t){return e.apply(this,arguments)}),close:function(){var t;r.flush(),r.stop(),null==(t=r.onFlush)||t.call(r)}})};C=new WeakMap;var r3=0;function r4(t){return"file"===t.kind&&t.createReader instanceof Function}var r6=/*#__PURE__*/function(){function t(e){var r,n,s,a=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{audio:!0};if((0,eg._)(this,t),eN(this,B,rw.create("MP4Clip id:".concat(r3++,","))),eL(this,"ready"),eN(this,P,!1),eN(this,R,{duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0}),eN(this,F),eN(this,D,1),eN(this,z,[]),eN(this,L,[]),eN(this,O,null),eN(this,M,null),eN(this,N,{video:null,audio:null}),eN(this,j,{audio:!0}),eL(this,"tickInterceptor",(r=(0,ey._)(function(t,e){return(0,eB._)(this,function(t){return[2,e]})}),function(t,e){return r.apply(this,arguments)})),eN(this,G,new AbortController),!(e instanceof ReadableStream)&&!r4(e)&&!Array.isArray(e.videoSamples))throw Error("Illegal argument");ej(this,j,(0,eE._)({},o)),ej(this,D,"object"==typeof o.audio&&"volume"in o.audio?o.audio.volume:1);var u=this,l=(n=(0,ey._)(function(t){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,rn(eM(u,F),t)];case 1:return e.sent(),[4,eM(u,F).stream()];case 2:return[2,e.sent()]}})}),function(t){return n.apply(this,arguments)}),c=this;ej(this,F,r4(e)?e:"localFile"in e?e.localFile:rm()),this.ready=(e instanceof ReadableStream?l(e).then(function(t){return r9(t,eM(a,j))}):r4(e)?e.stream().then(function(t){return r9(t,eM(a,j))}):Promise.resolve(e)).then((s=(0,ey._)(function(t){var e,r,n,s,a,o,u;return(0,eB._)(this,function(l){switch(l.label){case 0:return e=t.videoSamples,r=t.audioSamples,n=t.decoderConf,ej(c,z,e),ej(c,L,r),ej(c,N,n),u=[{video:null==n.video?null:(0,eU._)((0,eE._)({},n.video),{hardwareAcceleration:eM(c,j).__unsafe_hardwareAcceleration__}),audio:n.audio}],[4,eM(c,F).createReader()];case 1:return a=(s=r5.apply(void 0,u.concat([l.sent(),e,r,!1!==eM(c,j).audio?eM(c,D):null]))).videoFrameFinder,o=s.audioFrameFinder,[2,(ej(c,O,a),ej(c,M,o),ej(c,R,function(t,e,r){var n,s,a={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};null!=t.video&&e.length>0&&(a.width=null!==(n=t.video.codedWidth)&&void 0!==n?n:0,a.height=null!==(s=t.video.codedHeight)&&void 0!==s?s:0),null!=t.audio&&r.length>0&&(a.audioSampleRate=r$.sampleRate,a.audioChanCount=r$.channelCount);var o=0,u=0;if(e.length>0)for(var l=e.length-1;l>=0;l--){var c=e[l];if(!c.deleted){o=c.cts+c.duration;break}}if(r.length>0){var h=r.at(-1);u=h.cts+h.duration}return a.duration=Math.max(o,u),a}(n,e,r)),eM(c,B).info("MP4Clip meta:",eM(c,R)),(0,eE._)({},eM(c,R)))]}})}),function(t){return s.apply(this,arguments)}))}return(0,ev._)(t,[{key:"meta",get:function(){return(0,eE._)({},eM(this,R))}},{key:"tick",value:function(t){var e=this;return(0,ey._)(function(){var r,n,s,a,o,u,l;return(0,eB._)(this,function(c){switch(c.label){case 0:if(!(t>=eM(e,R).duration))return[3,2];return[4,e.tickInterceptor(t,{audio:[],state:"done"})];case 1:return[2,c.sent()];case 2:return[4,Promise.all([null!==(s=null==(r=eM(e,M))?void 0:r.find(t))&&void 0!==s?s:[],null==(n=eM(e,O))?void 0:n.find(t)])];case 3:if(o=(a=(0,eA._).apply(void 0,[c.sent(),2]))[0],null!=(u=a[1]))return[3,5];return[4,e.tickInterceptor(t,{audio:o,state:"success"})];case 4:return l=c.sent(),[3,7];case 5:return[4,e.tickInterceptor(t,{video:u,audio:o,state:"success"})];case 6:l=c.sent(),c.label=7;case 7:return[2,l]}})})()}},{key:"thumbnails",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,e=arguments.length>1?arguments[1]:void 0,r=this;return(0,ey._)(function(){var n,s,a,o;return(0,eB._)(this,function(u){switch(u.label){case 0:return eM(r,G).abort(),ej(r,G,new AbortController),n=eM(r,G).signal,[4,r.ready];case 1:var l,c,h,f,d,p;if(u.sent(),s="generate thumbnails aborted",n.aborted)throw Error(s);return c=Math.round(t/(a=eM(r,R)).width*a.height),h={quality:.1,type:"image/png"},p=(d=new OffscreenCanvas(t,c)).getContext("2d"),f=(0,ey._)(function(e){return(0,eB._)(this,function(r){switch(r.label){case 0:return p.drawImage(e,0,0,t,c),e.close(),[4,d.convertToBlob(h)];case 1:return[2,r.sent()]}})}),o=function(t){return f.apply(this,arguments)},[2,new Promise((l=(0,ey._)(function(t,a){var u,l,c,h,f,d,p,m,_,y,g,v;function b(){return w.apply(this,arguments)}function w(){return(w=(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:var r;if(n.aborted)return[3,2];return[4,Promise.all(u.map((r=(0,ey._)(function(t){var e;return(0,eB._)(this,function(r){switch(r.label){case 0:return e={ts:t.ts},[4,t.img];case 1:return[2,(e.img=r.sent(),e)]}})}),function(t){return r.apply(this,arguments)})))];case 1:t.apply(void 0,[e.sent()]),e.label=2;case 2:return[2]}})})).apply(this,arguments)}function S(t){u.push({ts:t.timestamp,img:o(t)})}return(0,eB._)(this,function(t){switch(t.label){case 0:if(u=[],null==(l=eM(r,N).video)||0===eM(r,z).length)return b(),[2];if(n.addEventListener("abort",function(){a(Error(s))}),f=void 0===(h=(c=null!=e?e:{}).start)?0:h,p=void 0===(d=c.end)?eM(r,R).duration:d,!(m=c.step))return[3,6];return _=f,g=it.bind,[4,eM(r,F).createReader()];case 1:y=new(g.apply(it,[void 0,t.sent(),eM(r,z),(0,eU._)((0,eE._)({},l),{hardwareAcceleration:eM(r,j).__unsafe_hardwareAcceleration__})])),t.label=2;case 2:if(!(_<=p&&!n.aborted))return[3,5];return[4,y.find(_)];case 3:(v=t.sent())&&S(v),_+=m,t.label=4;case 4:return[3,2];case 5:return y.destroy(),b(),[3,8];case 6:return[4,function(t,e,r,n,s,a){return io.apply(this,arguments)}(eM(r,z),eM(r,F),l,n,{start:f,end:p},function(t,e){S(t),e&&b()})];case 7:t.sent(),t.label=8;case 8:return[2]}})}),function(t,e){return l.apply(this,arguments)}))]}})})()}},{key:"split",value:function(e){var r=this;return(0,ey._)(function(){var n,s,a,o,u,l,c,h;return(0,eB._)(this,function(f){switch(f.label){case 0:return[4,r.ready];case 1:if(f.sent(),e<=0||e>=eM(r,R).duration)throw Error('"time" out of bounds');return s=(n=(0,eA._)(function(t,e){if(0===t.length)return[];for(var r=0,n=0,s=-1,a=0;a=0)break;g.deleted=!0,g.cts=-1}}catch(t){p=!0,m=t}finally{try{d||null==y.return||y.return()}finally{if(p)throw m}}return[l,f]}(eM(r,z),e),2))[0],a=n[1],u=(o=(0,eA._)(function(t,e){if(0===t.length)return[];for(var r=-1,n=0;nt[n].cts)){r=n;break}if(-1===r)throw Error("Not found audio sample by time");return[t.slice(0,r),t.slice(r).map(function(t){return(0,eU._)((0,eE._)({},t),{cts:t.cts-e})})]}(eM(r,L),e),2))[0],l=o[1],c=new t({localFile:eM(r,F),videoSamples:null!=s?s:[],audioSamples:null!=u?u:[],decoderConf:eM(r,N)},eM(r,j)),h=new t({localFile:eM(r,F),videoSamples:null!=a?a:[],audioSamples:null!=l?l:[],decoderConf:eM(r,N)},eM(r,j)),[4,Promise.all([c.ready,h.ready])];case 2:return[2,(f.sent(),[c,h])]}})})()}},{key:"clone",value:function(){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:return n.sent(),[4,(r=new t({localFile:eM(e,F),videoSamples:(0,eI._)(eM(e,z)),audioSamples:(0,eI._)(eM(e,L)),decoderConf:eM(e,N)},eM(e,j))).ready];case 2:return[2,(n.sent(),r.tickInterceptor=e.tickInterceptor,r)]}})})()}},{key:"splitTrack",value:function(){var e=this;return(0,ey._)(function(){var r,n,s;return(0,eB._)(this,function(a){switch(a.label){case 0:return[4,e.ready];case 1:if(a.sent(),r=[],!(eM(e,z).length>0))return[3,3];return[4,(n=new t({localFile:eM(e,F),videoSamples:(0,eI._)(eM(e,z)),audioSamples:[],decoderConf:{video:eM(e,N).video,audio:null}},eM(e,j))).ready];case 2:a.sent(),n.tickInterceptor=e.tickInterceptor,r.push(n),a.label=3;case 3:if(!(eM(e,L).length>0))return[3,5];return[4,(s=new t({localFile:eM(e,F),videoSamples:[],audioSamples:(0,eI._)(eM(e,L)),decoderConf:{audio:eM(e,N).audio,video:null}},eM(e,j))).ready];case 4:a.sent(),s.tickInterceptor=e.tickInterceptor,r.push(s),a.label=5;case 5:return[2,r]}})})()}},{key:"destroy",value:function(){var t,e;eM(this,P)||(eM(this,B).info("MP4Clip destroy"),ej(this,P,!0),null==(t=eM(this,O))||t.destroy(),null==(e=eM(this,M))||e.destroy())}}]),t}();B=new WeakMap,P=new WeakMap,R=new WeakMap,F=new WeakMap,D=new WeakMap,z=new WeakMap,L=new WeakMap,O=new WeakMap,M=new WeakMap,N=new WeakMap,j=new WeakMap,G=new WeakMap;var r8=r6;function r5(t,e,r,n,s){return{audioFrameFinder:null==s||null==t.audio||0===n.length?null:new ie(e,n,t.audio,{volume:s,targetSampleRate:r$.sampleRate}),videoFrameFinder:null==t.video||0===r.length?null:new it(e,r,t.video)}}function r9(t){return r7.apply(this,arguments)}function r7(){return(r7=(0,ey._)(function(t){var e,r,n,s,a,o=arguments;function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;return(0,eU._)((0,eE._)({},t),{is_idr:"video"===r&&t.is_sync&&function(t){for(var e=new DataView(t.buffer),r=0;r1&&void 0!==o[1]?o[1]:{},n={video:null,audio:null},s=[],a=[],[2,new Promise((c=(0,ey._)(function(o,l){var c,h,f;return(0,eB._)(this,function(d){var p;return c=-1,h=-1,f=rZ(t.pipeThrough(new r2),{onChunk:(p=(0,ey._)(function(t){var o,d,p,m,_,y,g,v,b,w,S,x,E,U,T,A,I;return(0,eB._)(this,function(k){if(o=t.chunkType,d=t.data,"ready"===o)r=d.info,m=(p=r0(d.file,d.info)).videoDecoderConf,_=p.audioDecoderConf,n.video=null!=m?m:null,n.audio=null!=_?_:null,null==m&&null==_&&(f(),l(Error("MP4Clip must contain at least one video or audio track"))),rw.info("mp4BoxFile moov ready",(0,eU._)((0,eE._)({},d.info),{tracks:null,videoTracks:null,audioTracks:null}),n);else if("samples"===o){if("video"===d.type){-1===c&&(c=d.samples[0].dts),y=!0,g=!1,v=void 0;try{for(b=d.samples[Symbol.iterator]();!(y=(w=b.next()).done);y=!0)S=w.value,s.push(u(S,c,"video"))}catch(t){g=!0,v=t}finally{try{y||null==b.return||b.return()}finally{if(g)throw v}}}else if("audio"===d.type&&e.audio){-1===h&&(h=d.samples[0].dts),x=!0,E=!1,U=void 0;try{for(T=d.samples[Symbol.iterator]();!(x=(A=T.next()).done);x=!0)I=A.value,a.push(u(I,h,"audio"))}catch(t){E=!0,U=t}finally{try{x||null==T.return||T.return()}finally{if(E)throw U}}}}return[2]})}),function(t){return p.apply(this,arguments)}),onDone:function(){var t,e=null!==(t=s.at(-1))&&void 0!==t?t:a.at(-1);if(null==r){l(Error("MP4Clip stream is done, but not emit ready"));return}if(null==e){l(Error("MP4Clip stream not contain any sample"));return}var u=s[0];null!=u&&u.cts<2e5&&(u.duration+=u.cts,u.cts=0),rw.info("mp4 stream parsed"),o({videoSamples:s,audioSamples:a,decoderConf:n})}}),[2]})}),function(t,e){return c.apply(this,arguments)}))]})})).apply(this,arguments)}var it=function t(e,r,n){var s,a,o,u=this;(0,eg._)(this,t),eN(this,Y,null),eN(this,W,0),eN(this,V,{abort:!1,st:performance.now()});var l=this;eL(this,"find",(s=(0,ey._)(function(t){return(0,eB._)(this,function(e){switch(e.label){case 0:return(null==eM(l,Y)||t<=eM(l,W)||t-eM(l,W)>3e6)&&eM(l,te).call(l,t),eM(l,V).abort=!0,ej(l,W,t),ej(l,V,{abort:!1,st:performance.now()}),[4,eM(l,J).call(l,t,eM(l,Y),eM(l,V))];case 1:return[2,e.sent()]}})}),function(t){return s.apply(this,arguments)})),eN(this,H,0),eN(this,X,!1),eN(this,Z,0),eN(this,K,[]),eN(this,q,0),eN(this,Q,0);var c=this;eN(this,J,(a=(0,ey._)(function(t,e,r){var n,s,a,o,u;return(0,eB._)(this,function(l){switch(l.label){case 0:if(null==e||"closed"===e.state||r.abort)return[2,null];if(!(eM(c,K).length>0))return[3,6];if(!(t<(n=eM(c,K)[0]).timestamp))return[3,1];return a=null,[3,5];case 1:if(eM(c,K).shift(),!(t>n.timestamp+(null!==(s=n.duration)&&void 0!==s?s:0)))return[3,3];return n.close(),[4,eM(c,J).call(c,t,e,r)];case 2:return o=l.sent(),[3,4];case 3:eM(c,K).length<10&&eM(c,tt).call(c,e).catch(function(e){throw eM(c,te).call(c,t),e}),o=n,l.label=4;case 4:a=o,l.label=5;case 5:return[2,a];case 6:if(!(eM(c,$)||eM(c,q)0))return[3,8];if(performance.now()-r.st>3e3)throw Error("MP4Clip.tick video timeout, ".concat(JSON.stringify(eM(c,tr).call(c))));return[4,rH(15)];case 7:return l.sent(),[3,12];case 8:if(eM(c,Z)>=c.samples.length)return[2,null];l.label=9;case 9:return l.trys.push([9,11,,12]),[4,eM(c,tt).call(c,e)];case 10:return l.sent(),[3,12];case 11:throw u=l.sent(),eM(c,te).call(c,t),u;case 12:return[4,eM(c,J).call(c,t,e,r)];case 13:return[2,l.sent()]}})}),function(t,e,r){return a.apply(this,arguments)})),eN(this,$,!1);var h=this;eN(this,tt,(o=(0,ey._)(function(t){var e,r,n,s,a,o,u,l;return(0,eB._)(this,function(c){switch(c.label){case 0:if(eM(h,$))return[2];for(ej(h,$,!0),n=eM(h,Z)+1,s=!1;n1e5){for(eM(l,tf).call(l),ej(l,to,t),e=0;e1&&void 0!==a[1]?a[1]:null,r=a.length>2?a[2]:void 0,null==e||r.abort||"closed"===e.state||0===(n=Math.ceil(t*(eM(c,tn)/1e6))))return[2,[]];if((s=eM(c,tl).frameCnt-n)>0)return[2,(se){var l=e-n;r[0].set(o.subarray(0,l),n),r[1].set(u.subarray(0,l),n),t.data[s][0]=o.subarray(l,o.length),t.data[s][1]=u.subarray(l,u.length);break}r[0].set(o,n),r[1].set(u,n),n+=o.length,s++}return t.data=t.data.slice(s),t.frameCnt-=e,r}(eM(c,tl),n))];if(!(e.decodeQueueSize>10))return[3,2];if(performance.now()-r.st>3e3)throw r.abort=!0,Error("MP4Clip.tick audio timeout, ".concat(JSON.stringify(eM(c,td).call(c))));return[4,rH(15)];case 1:return o.sent(),[3,3];case 2:if(eM(c,tu)>=c.samples.length-1)return[2,[]];eM(c,th).call(c,e),o.label=3;case 3:return[2,eM(c,tc).call(c,t,e,r)]}})}),function(t){return o.apply(this,arguments)})),eN(this,th,function(t){if(!(t.decodeQueueSize>100)){for(var e=[],r=eM(u,tu);r=10))break}ej(u,tu,r),t.decode(e.map(function(t){return new EncodedAudioChunk({type:"key",timestamp:t.cts,duration:t.duration,data:t.data})}))}}),eN(this,tf,function(){var t,e,r,n,s,a,o,l;ej(u,to,0),ej(u,tu,0),ej(u,tl,{frameCnt:0,data:[]}),null==(t=eM(u,ts))||t.close(),ej(u,ts,(e=u.conf,r={resampleRate:r$.sampleRate,volume:eM(u,ti)},n=function(t){eM(u,tl).data.push(t),eM(u,tl).frameCnt+=t[0].length},a=function(t){var e=[],r=0;function n(){var s=e[r];null!=s&&(t(s),r+=1,n())}var s=0;return function(t){var r=s;s+=1,t().then(function(t){e[r]=t,n()}).catch(function(t){e[r]=t,n()})}}(s=function(t){if(0!==t.length){var e=!0,s=!1,a=void 0;if(1!==r.volume)try{for(var o,u=t[Symbol.iterator]();!(e=(o=u.next()).done);e=!0)for(var l=o.value,c=0;c=s.start&&t.cts<=s.end}),o)];case 2:return 0===(c=h.sent()).length||n.aborted||(l.configure(r),is(l,c,{})),[2]}})})).apply(this,arguments)}ti=new WeakMap,tn=new WeakMap,ts=new WeakMap,ta=new WeakMap,to=new WeakMap,tu=new WeakMap,tl=new WeakMap,tc=new WeakMap,th=new WeakMap,tf=new WeakMap,td=new WeakMap;var iu=/*#__PURE__*/function(){function t(e){var r=this;(0,eg._)(this,t),eN(this,ty),eL(this,"ready"),eN(this,tp,{duration:0,width:0,height:0}),eN(this,tm,null),eN(this,t_,[]);var n=function(t){return ej(r,tm,t),eM(r,tp).width=t.width,eM(r,tp).height=t.height,eM(r,tp).duration=1/0,(0,eE._)({},eM(r,tp))};if(e instanceof ReadableStream)this.ready=new Response(e).blob().then(function(t){return createImageBitmap(t)}).then(n);else if(e instanceof ImageBitmap)this.ready=Promise.resolve(n(e));else if(Array.isArray(e)&&e.every(function(t){return t instanceof VideoFrame})){ej(this,t_,e);var s=eM(this,t_)[0];if(null==s)throw Error("The frame count must be greater than 0");ej(this,tp,{width:s.displayWidth,height:s.displayHeight,duration:eM(this,t_).reduce(function(t,e){var r;return t+(null!==(r=e.duration)&&void 0!==r?r:0)},0)}),this.ready=Promise.resolve((0,eU._)((0,eE._)({},eM(this,tp)),{duration:1/0}))}else if("type"in e)this.ready=eG(this,ty,tg).call(this,e.stream,e.type).then(function(){return{width:eM(r,tp).width,height:eM(r,tp).height,duration:1/0}});else throw Error("Illegal arguments")}return(0,ev._)(t,[{key:"meta",get:function(){return(0,eE._)({},eM(this,tp))}},{key:"tick",value:function(t){var e=this;return(0,ey._)(function(){var r,n,s;return(0,eB._)(this,function(a){switch(a.label){case 0:if(!(null!=eM(e,tm)))return[3,2];return r={},[4,createImageBitmap(eM(e,tm))];case 1:return[2,(r.video=a.sent(),r.state="success",r)];case 2:return n=t%eM(e,tp).duration,[2,{video:(null!==(s=eM(e,t_).find(function(t){var e;return n>=t.timestamp&&n<=t.timestamp+(null!==(e=t.duration)&&void 0!==e?e:0)}))&&void 0!==s?s:eM(e,t_)[0]).clone(),state:"success"}]}})})()}},{key:"split",value:function(e){var r=this;return(0,ey._)(function(){var n,s,a,o,u,l,c;return(0,eB._)(this,function(h){switch(h.label){case 0:return[4,r.ready];case 1:if(h.sent(),null==eM(r,tm))return[3,4];return n=t.bind,[4,createImageBitmap(eM(r,tm))];case 2:return s=[new(n.apply(t,[void 0,h.sent()]))],a=t.bind,[4,createImageBitmap(eM(r,tm))];case 3:return[2,s.concat([new(a.apply(t,[void 0,h.sent()]))])];case 4:for(u=0,o=-1;ueM(r,t_)[u].timestamp)){o=u;break}if(-1===o)throw Error("Not found frame by time");return l=eM(r,t_).slice(0,o).map(function(t){return new VideoFrame(t)}),c=eM(r,t_).slice(o).map(function(t){return new VideoFrame(t,{timestamp:t.timestamp-e})}),[2,[new t(l),new t(c)]]}})})()}},{key:"clone",value:function(){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:if(n.sent(),null!=eM(e,tm))return[3,2];return r=eM(e,t_).map(function(t){return t.clone()}),[3,4];case 2:return[4,createImageBitmap(eM(e,tm))];case 3:r=n.sent(),n.label=4;case 4:return[2,new t(r)]}})})()}},{key:"destroy",value:function(){var t;rw.info("ImgClip destroy"),null==(t=eM(this,tm))||t.close(),eM(this,t_).forEach(function(t){return t.close()})}}]),t}();tp=new WeakMap,tm=new WeakMap,t_=new WeakMap,ty=new WeakSet,y=(0,ey._)(function(t,e){var r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:return r=[this,t_],[4,rj(t,e)];case 1:if(ej.apply(void 0,r.concat([s.sent()])),null==(n=eM(this,t_)[0]))throw Error("No frame available in gif");return ej(this,tp,{duration:eM(this,t_).reduce(function(t,e){var r;return t+(null!==(r=e.duration)&&void 0!==r?r:0)},0),width:n.codedWidth,height:n.codedHeight}),rw.info("ImgClip ready:",eM(this,tp)),[2]}})}),tg=function(t,e){return y.apply(this,arguments)};var il=iu,ic=/*#__PURE__*/function(){function t(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,eg._)(this,t),eN(this,tx),eL(this,"ready"),eN(this,tv,{duration:0,width:0,height:0}),eN(this,tb,new Float32Array),eN(this,tw,new Float32Array),eN(this,tS),eN(this,tU,0),eN(this,tT,0),ej(this,tS,(0,eE._)({loop:!1,volume:1},n)),this.ready=eG(this,tx,tE).call(this,e).then(function(){return{width:0,height:0,duration:n.loop?1/0:eM(r,tv).duration}})}return(0,ev._)(t,[{key:"meta",get:function(){return(0,eU._)((0,eE._)({},eM(this,tv)),{sampleRate:r$.sampleRate,chanCount:2})}},{key:"getPCMData",value:function(){return[eM(this,tb),eM(this,tw)]}},{key:"tick",value:function(t){var e=this;return(0,ey._)(function(){var r,n,s,a;return(0,eB._)(this,function(o){return!eM(e,tS).loop&&t>=eM(e,tv).duration?[2,{audio:[],state:"done"}]:(r=t-eM(e,tU),t3e6)?[2,(ej(e,tU,t),ej(e,tT,Math.ceil(eM(e,tU)/1e6*r$.sampleRate)),{audio:[new Float32Array(0),new Float32Array(0)],state:"success"})]:(ej(e,tU,t),n=Math.ceil(r/1e6*r$.sampleRate),s=eM(e,tT)+n,a=eM(e,tS).loop?[rX(eM(e,tb),eM(e,tT),s),rX(eM(e,tw),eM(e,tT),s)]:[eM(e,tb).slice(eM(e,tT),s),eM(e,tw).slice(eM(e,tT),s)],[2,(ej(e,tT,s),{audio:a,state:"success"})])})})()}},{key:"split",value:function(e){var r=this;return(0,ey._)(function(){var n;return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,r.ready];case 1:return s.sent(),n=Math.ceil(e/1e6*r$.sampleRate),[2,[new t(r.getPCMData().map(function(t){return t.slice(0,n)}),eM(r,tS)),new t(r.getPCMData().map(function(t){return t.slice(n)}),eM(r,tS))]]}})})()}},{key:"clone",value:function(){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:return n.sent(),[4,(r=new t(e.getPCMData(),eM(e,tS))).ready];case 2:return[2,(n.sent(),r)]}})})()}},{key:"destroy",value:function(){ej(this,tb,new Float32Array(0)),ej(this,tw,new Float32Array(0)),rw.info("---- audioclip destroy ----")}}]),t}();tv=new WeakMap,tb=new WeakMap,tw=new WeakMap,tS=new WeakMap,tx=new WeakSet,g=(0,ey._)(function(t){var e,r,n,s,a,o,u,l,c,h,f,d;return(0,eB._)(this,function(p){switch(p.label){case 0:if(null==ic.ctx&&(ic.ctx=new AudioContext({sampleRate:r$.sampleRate})),e=performance.now(),!(t instanceof ReadableStream))return[3,2];return[4,function(t,e){return im.apply(this,arguments)}(t,ic.ctx)];case 1:return n=p.sent(),[3,3];case 2:n=t,p.label=3;case 3:if(r=n,rw.info("Audio clip decoded complete:",performance.now()-e),s=eM(this,tS).volume,a=!0,o=!1,u=void 0,1!==s)try{for(l=r[Symbol.iterator]();!(a=(c=l.next()).done);a=!0)for(f=0,h=c.value;f0}).map(function(t){return{lineStr:t,match:t.match(/(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/)}}).filter(function(t,e,r){var n,s=t.lineStr;return!(/^\d+$/.test(s)&&(null==(n=r[e+1])?void 0:n.match)!=null)}).reduce(function(t,e){var r=e.lineStr,n=e.match;if(null==n){var s=t.at(-1);if(null==s)return t;s.text+=0===s.text.length?r:"\n".concat(r)}else t.push({start:ib(n[1]),end:ib(n[2]),text:""});return t},[]).map(function(t){return{start:1e6*t.start,end:1e6*t.end,text:t.text}})),0===eM(this,tB).length)throw Error("No subtitles content");ej(this,tR,Object.assign(eM(this,tR),r)),ej(this,tO,null==r.textBgColor?0:(null!==(s=r.fontSize)&&void 0!==s?s:50)*.2);var n,s,a,o=eM(this,tR),u=o.fontSize,l=o.fontFamily,c=o.videoWidth,h=o.videoHeight,f=o.letterSpacing;ej(this,tL,u+2*eM(this,tO)),ej(this,tF,new OffscreenCanvas(c,h)),ej(this,tD,eM(this,tF).getContext("2d")),eM(this,tD).font="".concat(u,"px ").concat(l),eM(this,tD).textAlign="center",eM(this,tD).textBaseline="top",eM(this,tD).letterSpacing=null!=f?f:"0px",ej(this,tP,{width:c,height:h,duration:null!==(a=null==(n=eM(this,tB).at(-1))?void 0:n.end)&&void 0!==a?a:0}),this.ready=Promise.resolve(this.meta)}return(0,ev._)(t,[{key:"meta",get:function(){return(0,eE._)({},eM(this,tP))}},{key:"tick",value:function(t){var e=this;return(0,ey._)(function(){var r,n,s,a,o,u,l,c;return(0,eB._)(this,function(h){if(null!=eM(e,tz)&&t>=eM(e,tz).timestamp&&t<=eM(e,tz).timestamp+(null!==(s=eM(e,tz).duration)&&void 0!==s?s:0))return[2,{video:eM(e,tz).clone(),state:"success"}];for(a=0;a(u=null!==(o=eM(e,tB)[a])&&void 0!==o?o:eM(e,tB).at(-1)).end?[2,{state:"done"}]:teM(r,tB)[s].start)){n=s;break}if(-1===n)throw Error("Not found subtitle by time");return o=(a=eM(r,tB).slice(0,n).map(function(t){return(0,eE._)({},t)})).at(-1),u=null,null!=o&&o.end>e&&(u={start:0,end:o.end-e,text:o.text},o.end=e),l=eM(r,tB).slice(n).map(function(t){return(0,eU._)((0,eE._)({},t),{start:t.start-e,end:t.end-e})}),[2,(null!=u&&l.unshift(u),[new t(a,eM(r,tR)),new t(l,eM(r,tR))])]}})})()}},{key:"clone",value:function(){var e=this;return(0,ey._)(function(){return(0,eB._)(this,function(r){return[2,new t(eM(e,tB).slice(0),eM(e,tR))]})})()}},{key:"destroy",value:function(){var t;null==(t=eM(this,tz))||t.close()}}]),t}();tB=new WeakMap,tP=new WeakMap,tR=new WeakMap,tF=new WeakMap,tD=new WeakMap,tz=new WeakMap,tL=new WeakMap,tO=new WeakMap,tM=new WeakSet,tN=function(t){var e=t.split("\n").reverse().map(function(t){return t.trim()}),r=eM(this,tF),n=r.width,s=r.height,a=eM(this,tR),o=a.color,u=a.fontSize,l=a.textBgColor,c=a.textShadow,h=a.strokeStyle,f=a.lineWidth,d=a.lineCap,p=a.lineJoin,m=a.bottomOffset,_=eM(this,tD);_.clearRect(0,0,n,s),_.globalAlpha=.6;var y=m,g=!0,v=!1,b=void 0;try{for(var w,S=e[Symbol.iterator]();!(g=(w=S.next()).done);g=!0){var x=w.value,E=_.measureText(x),U=n/2;null!=l&&(_.shadowOffsetX=0,_.shadowOffsetY=0,_.shadowBlur=0,_.fillStyle=l,_.globalAlpha=.5,_.fillRect(U-E.actualBoundingBoxLeft-eM(this,tO),s-y-eM(this,tL),E.width+2*eM(this,tO),eM(this,tL))),_.shadowColor=c.color,_.shadowOffsetX=c.offsetX,_.shadowOffsetY=c.offsetY,_.shadowBlur=c.blur,_.globalAlpha=1,null!=h&&(_.lineWidth=null!=f?f:u/6,null!=d&&(_.lineCap=d),null!=p&&(_.lineJoin=p),_.strokeStyle=h,_.strokeText(x,U,s-y-eM(this,tL)+eM(this,tO))),_.fillStyle=o,_.fillText(x,U,s-y-eM(this,tL)+eM(this,tO)),y+=eM(this,tL)+.2*u}}catch(t){v=!0,b=t}finally{try{g||null==S.return||S.return()}finally{if(v)throw b}}};var iv=ig;function ib(t){var e=t.match(/(\d{2}):(\d{2}):(\d{2}),(\d{3})/);if(null==e)throw Error("time format error: ".concat(t));return 3600*Number(e[1])+60*Number(e[2])+Number(e[3])+Number(e[4])/1e3}var iw=/*#__PURE__*/function(){function t(){var e=this,r=this;(0,eg._)(this,t),eN(this,tj,/* @__PURE__ */new Map),eL(this,"on",function(t,r){var n,s=null!==(n=eM(e,tj).get(t))&&void 0!==n?n:/* @__PURE__ */new Set;return s.add(r),eM(e,tj).has(t)||eM(e,tj).set(t,s),function(){s.delete(r),0===s.size&&eM(e,tj).delete(t)}}),eL(this,"once",function(t,r){var n=e.on(t,function(){for(var t=arguments.length,e=Array(t),s=0;s1?e-1:0),s=1;s0&&a.is_sync)break;e.addSample(s,a.data,a),r=a.cts+a.duration}return t.splice(0,n),r}(r);f>c&&(c=f)}var d=n[0];null!=d&&d.cts-c<1e4&&(l=t,h())}}}var f=rA(h,15),d=iI(t,function(t,e){return u("encoder0",t,e)}),p=iI(t,function(t,e){return u("encoder1",t,e)}),m=0;return{get encodeQueueSize(){return d.encodeQueueSize+p.encodeQueueSize},encode:function(t,e){e.keyFrame&&(m+=1),(m%2==0?d:p).encode(t,e)},flush:/*#__PURE__*/(0,ey._)(function(){var t,e,r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:if(t=Promise.all,"configured"!==d.state)return[3,2];return[4,d.flush()];case 1:return e=s.sent(),[3,3];case 2:e=null,s.label=3;case 3:if(r=[e],"configured"!==p.state)return[3,5];return[4,p.flush()];case 4:return n=s.sent(),[3,6];case 5:n=null,s.label=6;case 6:return[4,t.apply(Promise,[r.concat([n])])];case 7:return s.sent(),f(),h(),[2]}})}),close:function(){"configured"===d.state&&d.close(),"configured"===p.state&&p.close()}}}(t.video,e,r):null,u=null!=t.audio?function(t,e,r){var n={timescale:1e6,samplerate:t.sampleRate,channel_count:t.channelCount,hdlr:"soun",type:"aac"===t.codec?"mp4a":"Opus",name:"Track created with WebAV"},s=-1,a=[],o=!1;r.once("VideoReady",function(){o=!0,a.forEach(function(t){var r=iC(t);e.addSample(s,r.data,r)}),a=[]});var u=new AudioEncoder({error:rw.error,output:function(t,u){var l;if(-1===s){var c,h,f,d=null==(l=u.decoderConfig)?void 0:l.description;s=e.addTrack((0,eU._)((0,eE._)({},n),{description:null==d?void 0:(h=new Uint8Array([0,0,0,0,3,23+(c=d.byteLength),0,2,0,4,18+c,64,21,0,0,0,0,0,0,0,0,0,0,0,5,c].concat((0,eI._)(new Uint8Array(d instanceof ArrayBuffer?d:d.buffer)),[6,1,2])),(f=new rJ.BoxParser.esdsBox(h.byteLength)).hdr_size=0,f.parse(new rJ.DataStream(h,0,rJ.DataStream.BIG_ENDIAN)),f)})),r.emit("AudioReady"),rw.info("AudioEncoder, audio track ready, trackId:",s)}if(o){var p=iC(t);e.addSample(s,p.data,p)}else a.push(t)}});return u.configure({codec:"aac"===t.codec?r$.codec:"opus",sampleRate:t.sampleRate,numberOfChannels:t.channelCount,bitrate:128e3}),u}(t.audio,e,r):null;return null==t.video&&r.emit("VideoReady"),null==t.audio&&r.emit("AudioReady"),{encodeVideo:function(t,e){null==o||o.encode(t,e),t.close()},encodeAudio:function(t){null!=u&&(u.encode(t),t.close())},getEncodeQueueSize:function(){var t,e;return null!==(e=null!==(t=null==o?void 0:o.encodeQueueSize)&&void 0!==t?t:null==u?void 0:u.encodeQueueSize)&&void 0!==e?e:0},flush:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:return[4,Promise.all([null==o?void 0:o.flush(),(null==u?void 0:u.state)==="configured"?u.flush():null])];case 1:return t.sent(),[2]}})}),close:function(){r.destroy(),null==o||o.close(),(null==u?void 0:u.state)==="configured"&&u.close()},mp4file:e}}function iI(t,e){var r=new VideoEncoder({error:rw.error,output:e});return r.configure({codec:t.codec,framerate:t.expectFPS,hardwareAcceleration:t.__unsafe_hardwareAcceleration__,bitrate:t.bitrate,width:t.width,height:t.height,alpha:"discard",avc:{format:"avc"}}),r}function ik(t,e,r){var n=0,s=0,a=t.boxes,o=!1,u=function(){if(!o){if(null==a.find(function(t){return"moof"===t.type}))return null;o=!0}if(s>=a.length)return null;var e=new rJ.DataStream;e.endianness=rJ.DataStream.BIG_ENDIAN;var r=s;try{for(;r0)return!0;var s=r.findIndex(function(t){return"moov"===t.type});if(-1===s)return!1;if(u=r.slice(0,s+1),e=s+1,0===n.length)for(var a=1;;a+=1){var o=t.getTrackById(a);if(null==o)break;n.push({track:o,id:a})}return!0}var c=0,h=rm(),f=null,d=(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:return[4,h.createWriter()];case 1:return f=t.sent(),c=self.setInterval(function(){l()&&a()},100),[2]}})})(),p=!1;return/*#__PURE__*/(0,ey._)(function(){var e,r,n;return(0,eB._)(this,function(o){switch(o.label){case 0:if(p)throw Error("File exported");return p=!0,[4,d];case 1:if(o.sent(),clearInterval(c),!l()||null==f)return[2,null];return t.flush(),[4,a()];case 2:return o.sent(),[4,null==f?void 0:f.close()];case 3:if(o.sent(),null==(e=u.find(function(t){return"moov"===t.type})))return[2,null];return e.mvhd.duration=s,r=rm(),n=m(u,0),[4,rn(r,n)];case 4:return o.sent(),[4,rn(r,h,{overwrite:!1})];case 5:return o.sent(),[4,r.stream()];case 6:return[2,o.sent()]}})});function m(t,e){if(e>=t.length)return null;var r=new rJ.DataStream;r.endianness=rJ.DataStream.BIG_ENDIAN;for(var n=e;n-1},e.trigger=function(t){var e=this.listeners[t];if(e){if(2==arguments.length)for(var r=e.length,n=0;n-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)}}]),r}(iL),ij=function(t){var e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),r={};return e[1]&&(r.length=parseInt(e[1],10)),e[2]&&(r.offset=parseInt(e[2],10)),r},iG=function(t){var e={};if(!t)return e;for(var r,n=t.split(RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),s=n.length;s--;)""!==n[s]&&((r=/([^=]*)=(.*)/.exec(n[s]).slice(1))[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),e[r[0]]=r[1]);return e},iY=/*#__PURE__*/function(t){(0,ex._)(r,t);var e=(0,eC._)(r);function r(){var t;return(0,eg._)(this,r),(t=e.call(this)).customParsers=[],t.tagMappers=[],(0,eT._)(t)}return(0,ev._)(r,[{key:"push",value:function(t){var e,r,n=this;if(0!==(t=t.trim()).length){if("#"!==t[0]){this.trigger("data",{type:"uri",uri:t});return}this.tagMappers.reduce(function(e,r){var n=r(t);return n===t?e:e.concat([n])},[t]).forEach(function(t){for(var s=0;s0&&(u.duration=t.duration),0===t.duration&&(u.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(!t.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if("NONE"===t.attributes.METHOD){s=null;return}if(!t.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if("com.apple.streamingkeydelivery"===t.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:t.attributes};return}if("com.microsoft.playready"===t.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:t.attributes.URI};return}if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT){if(-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2))){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:function(t){for(var e=iM.atob?iM.atob(t):eF.from(t,"base64").toString("binary"),r=new Uint8Array(e.length),n=0;n(0,ek._)(t.attributes.IV)&&(s.iv=t.attributes.IV)},"media-sequence":function(){if(!isFinite(t.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number});return}this.manifest.mediaSequence=t.number},"discontinuity-sequence":function(){if(!isFinite(t.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number});return}this.manifest.discontinuitySequence=t.number,f=t.number},"playlist-type":function(){if(!/VOD|EVENT/.test(t.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist});return}this.manifest.playlistType=t.playlistType},map:function(){n={},t.uri&&(n.uri=t.uri),t.byterange&&(n.byterange=t.byterange),s&&(n.key=s)},"stream-inf":function(){if(this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||h,!t.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}u.attributes||(u.attributes={}),iO(u.attributes,t.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var n=this.manifest.mediaGroups[t.attributes.TYPE];n[t.attributes["GROUP-ID"]]=n[t.attributes["GROUP-ID"]]||{},e=n[t.attributes["GROUP-ID"]],(r={default:/yes/i.test(t.attributes.DEFAULT)}).default?r.autoselect=!0:r.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(r.language=t.attributes.LANGUAGE),t.attributes.URI&&(r.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(r.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(r.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(r.forced=/yes/i.test(t.attributes.FORCED)),e[t.attributes.NAME]=r},discontinuity:function(){f+=1,u.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){(0,ek._)(this.manifest.dateTimeString)>"u"&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),u.dateTimeString=t.dateTimeString,u.dateTimeObject=t.dateTimeObject;var e=this.lastProgramDateTime;this.lastProgramDateTime=new Date(t.dateTimeString).getTime(),null===e&&this.manifest.segments.reduceRight(function(t,e){return e.programDateTime=t-1e3*e.duration,e.programDateTime},this.lastProgramDateTime)},targetduration:function(){if(!isFinite(t.duration)||t.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration});return}this.manifest.targetDuration=t.duration,iV.call(this,this.manifest)},start:function(){if(!t.attributes||isNaN(t.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}},"cue-out":function(){u.cueOut=t.data},"cue-out-cont":function(){u.cueOutCont=t.data},"cue-in":function(){u.cueIn=t.data},skip:function(){this.manifest.skip=iW(t.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",t.attributes,["SKIPPED-SEGMENTS"])},part:function(){var e=this;l=!0;var r=this.manifest.segments.length,n=iW(t.attributes);u.parts=u.parts||[],u.parts.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=p),p=n.byterange.offset+n.byterange.length);var s=u.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #".concat(s," for segment #").concat(r),t.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(t,r){t.hasOwnProperty("lastPart")||e.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #".concat(r," lacks required attribute(s): LAST-PART")})})},"server-control":function(){var e=this.manifest.serverControl=iW(t.attributes);e.hasOwnProperty("canBlockReload")||(e.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),iV.call(this,this.manifest),e.canSkipDateranges&&!e.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var e=this.manifest.segments.length,r=iW(t.attributes),n=r.type&&"PART"===r.type;u.preloadHints=u.preloadHints||[],u.preloadHints.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=n?p:0,n&&(p=r.byterange.offset+r.byterange.length)));var s=u.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #".concat(s," for segment #").concat(e),t.attributes,["TYPE","URI"]),r.type)for(var a=0;a1&&void 0!==u[1]?u[1]:10,n=(r=new iH).push,[4,fetch(t)];case 1:return[4,h.sent().text()];case 2:return n.apply(r,[h.sent()]),r.end(),s=r.manifest.segments.reduce(function(t,e){var r;return t[e.map.uri]=null!==(r=t[e.map.uri])&&void 0!==r?r:[],t[e.map.uri].push(e),t},{}),a=new URL(t,location.href),o={},[2,{load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r={},n=0,o=0,u=!0,h=!1,f=void 0;try{for(var d,p=Object.entries(s)[Symbol.iterator]();!(u=(d=p.next()).done);u=!0){for(var m=(0,eA._)(d.value,2),_=m[0],y=m[1],g=0,v=[],b=-1,w=-1,S=0;St/1e6&&(b=S,n=(g-x.duration)*1e6),b>-1&&-1===w&&g>=e/1e6){w=S+1,o=1e6*g;break}}e>=1e6*g&&(w=y.length,o=1e6*g),w>b&&(v=v.concat(y.slice(b,w))),v.length>0&&(r[_]={actualStartTime:n,actualEndTime:o,segments:v})}}catch(t){h=!0,f=t}finally{try{u||null==p.return||p.return()}finally{if(h)throw f}}return 0===Object.keys(r).length?null:Object.entries(r).map(function(t){var e,r,n=(0,eA._)(t,2),s=n[0],o=n[1],u=o.actualStartTime,h=o.actualEndTime,f=o.segments,d=0,p=new iw;return{actualStartTime:u,actualEndTime:h,on:p.on,stream:new ReadableStream({start:(e=(0,ey._)(function(t){var e,r;return(0,eB._)(this,function(n){switch(n.label){case 0:return function(t,e,r){l.apply(this,arguments)}(f,t,p),e=t.enqueue,r=Uint8Array.bind,[4,fetch(new URL(s,a).href)];case 1:return[4,n.sent().arrayBuffer()];case 2:return e.apply(t,[new(r.apply(Uint8Array,[void 0,n.sent()]))]),[2]}})}),function(t){return e.apply(this,arguments)}),pull:(r=(0,ey._)(function(t){var e,r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:return e=new URL(f[d].uri,a).href,r=t.enqueue,n=Uint8Array.bind,[4,function(t){return c.apply(this,arguments)}(e)];case 1:return r.apply(t,[new(n.apply(Uint8Array,[void 0,s.sent()]))]),(d+=1)>=f.length&&(t.close(),p.destroy()),[2]}})}),function(t){return r.apply(this,arguments)})})}})}}]}})})).apply(this,arguments)}var iK=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1],iq=[0,1,0,0,1,0,1,0,1,1,0,1];function iQ(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS)){var s=t.getShaderInfoLog(n);throw t.deleteShader(n),Error(null!=s?s:"An error occurred compiling the shaders")}return n}var iJ=function(t){var e,r=null,n=null,s=t.keyColor,a=null;return e=(0,ey._)(function(e){var o,u,l;return(0,eB._)(this,function(c){var h,f,d,p,m;return((null==r||null==n||null==a)&&(null==s&&((h=new OffscreenCanvas(1,1).getContext("2d")).drawImage(e,0,0),f=h.getImageData(0,0,1,1),s=[(d=(0,eA._)(f.data,3))[0],d[1],d[2]]),r=(o=function(t){var e="document"in globalThis?globalThis.document.createElement("canvas"):new OffscreenCanvas(t.width,t.height);e.width=t.width,e.height=t.height;var r=e.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0});if(null==r)throw Error("Cant create gl context");var n=function(t,e,r){var n,s=iQ(t,t.VERTEX_SHADER,e),a=iQ(t,t.FRAGMENT_SHADER,r),o=t.createProgram();if(t.attachShader(o,s),t.attachShader(o,a),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))throw Error(null!==(n=t.getProgramInfoLog(o))&&void 0!==n?n:"Unable to initialize the shader program");return o}(r,"#version 300 es\n layout (location = 0) in vec4 a_position;\n layout (location = 1) in vec2 a_texCoord;\n out vec2 v_texCoord;\n void main () {\n gl_Position = a_position;\n v_texCoord = a_texCoord;\n }\n","#version 300 es\nprecision mediump float;\nout vec4 FragColor;\nin vec2 v_texCoord;\n\nuniform sampler2D frameTexture;\nuniform vec3 keyColor;\n\n// 色度的相似度计算\nuniform float similarity;\n// 透明度的平滑度计算\nuniform float smoothness;\n// 降低绿幕饱和度,提高抠图准确度\nuniform float spill;\n\nvec2 RGBtoUV(vec3 rgb) {\n return vec2(\n rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5,\n rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5\n );\n}\n\nvoid main() {\n // 获取当前像素的rgba值\n vec4 rgba = texture(frameTexture, v_texCoord);\n // 计算当前像素与绿幕像素的色度差值\n vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor);\n // 计算当前像素与绿幕像素的色度距离(向量长度), 越相像则色度距离越小\n float chromaDist = sqrt(dot(chromaVec, chromaVec));\n // 设置了一个相似度阈值,baseMask为负,则表明是绿幕,为正则表明不是绿幕\n float baseMask = chromaDist - similarity;\n // 如果baseMask为负数,fullMask等于0;baseMask为正数,越大,则透明度越低\n float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5);\n rgba.a = fullMask; // 设置透明度\n // 如果baseMask为负数,spillVal等于0;baseMask为整数,越小,饱和度越低\n float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5);\n float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.); // 计算当前像素的灰度值\n rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal);\n FragColor = rgba;\n}\n");r.useProgram(n),r.uniform3fv(r.getUniformLocation(n,"keyColor"),t.keyColor.map(function(t){return t/255})),r.uniform1f(r.getUniformLocation(n,"similarity"),t.similarity),r.uniform1f(r.getUniformLocation(n,"smoothness"),t.smoothness),r.uniform1f(r.getUniformLocation(n,"spill"),t.spill);var s=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,s),r.bufferData(r.ARRAY_BUFFER,new Float32Array(iK),r.STATIC_DRAW);var a=r.getAttribLocation(n,"a_position");r.vertexAttribPointer(a,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(a);var o=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,new Float32Array(iq),r.STATIC_DRAW);var u=r.getAttribLocation(n,"a_texCoord");return r.vertexAttribPointer(u,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(u),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1),{cvs:e,gl:r}}((0,eE._)((0,eU._)((0,eE._)({},e instanceof VideoFrame?{width:e.codedWidth,height:e.codedHeight}:{width:e.width,height:e.height}),{keyColor:s}),t))).cvs,a=function(t){var e=t.createTexture();if(null==e)throw Error("Create WebGL texture error");t.bindTexture(t.TEXTURE_2D,e);var r=t.RGBA,n=t.RGBA,s=t.UNSIGNED_BYTE,a=new Uint8Array([0,0,255,255]);return t.texImage2D(t.TEXTURE_2D,0,r,1,1,0,n,s,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}(n=o.gl)),p=n,m=a,p.bindTexture(p.TEXTURE_2D,m),p.texImage2D(p.TEXTURE_2D,0,p.RGBA,p.RGBA,p.UNSIGNED_BYTE,e),p.drawArrays(p.TRIANGLES,0,6),null!=globalThis.VideoFrame&&e instanceof globalThis.VideoFrame)?(l=new VideoFrame(r,{alpha:"keep",timestamp:e.timestamp,duration:null!==(u=e.duration)&&void 0!==u?u:void 0}),[2,(e.close(),l)]):[2,createImageBitmap(r,{imageOrientation:e instanceof ImageBitmap?"flipY":"none"})]})}),function(t){return e.apply(this,arguments)}},i$=/*#__PURE__*/function(){function t(e,r,n,s,a){(0,eg._)(this,t),eN(this,tK),eN(this,tY,new iw),eL(this,"on",eM(this,tY).on),eN(this,tW,0),eN(this,tV,0),eN(this,tH,0),eN(this,tX,0),eN(this,tZ,0),eL(this,"master",null),eL(this,"fixedAspectRatio",!1),this.x=null!=e?e:0,this.y=null!=r?r:0,this.w=null!=n?n:0,this.h=null!=s?s:0,this.master=null!=a?a:null}return(0,ev._)(t,[{key:"x",get:function(){return eM(this,tW)},set:function(t){eG(this,tK,tq).call(this,"x",t)}},{key:"y",get:function(){return eM(this,tV)},set:function(t){eG(this,tK,tq).call(this,"y",t)}},{key:"w",get:function(){return eM(this,tH)},set:function(t){eG(this,tK,tq).call(this,"w",t)}},{key:"h",get:function(){return eM(this,tX)},set:function(t){eG(this,tK,tq).call(this,"h",t)}},{key:"angle",get:function(){return eM(this,tZ)},set:function(t){eG(this,tK,tq).call(this,"angle",t)}},{key:"center",get:function(){var t=this.x,e=this.y;return{x:t+this.w/2,y:e+this.h/2}}},{key:"ctrls",get:function(){var e=this.w,r=this.h,n=t.CTRL_SIZE,s=n/2,a=e/2,o=r/2,u=1.5*n,l=u/2;return(0,eU._)((0,eE._)({},this.fixedAspectRatio?{}:{t:new t(-s,-o-s,n,n,this),b:new t(-s,o-s,n,n,this),l:new t(-a-s,-s,n,n,this),r:new t(a-s,-s,n,n,this)}),{lt:new t(-a-s,-o-s,n,n,this),lb:new t(-a-s,o-s,n,n,this),rt:new t(a-s,-o-s,n,n,this),rb:new t(a-s,o-s,n,n,this),rotate:new t(-l,-o-2*n-l,u,u,this)})}},{key:"clone",value:function(){var e=new t(this.x,this.y,this.w,this.h,this.master);return e.angle=this.angle,e.fixedAspectRatio=this.fixedAspectRatio,e}},{key:"checkHit",value:function(t,e){var r,n,s=this.angle,a=this.center,o=this.x,u=this.y,l=this.w,c=this.h,h=this.master,f=null!==(r=null==h?void 0:h.center)&&void 0!==r?r:a,d=null!==(n=null==h?void 0:h.angle)&&void 0!==n?n:s;null==h&&(o-=f.x,u-=f.y);var p=t-f.x,m=e-f.y,_=p,y=m;return 0!==d&&(_=p*Math.cos(d)+m*Math.sin(d),y=m*Math.cos(d)-p*Math.sin(d)),!(_o+l||yu+c)}}]),t}();tY=new WeakMap,tW=new WeakMap,tV=new WeakMap,tH=new WeakMap,tX=new WeakMap,tZ=new WeakMap,tK=new WeakSet,tq=function(t,e){var r=this[t]!==e;switch(t){case"x":ej(this,tW,e);break;case"y":ej(this,tV,e);break;case"w":ej(this,tH,e);break;case"h":ej(this,tX,e);break;case"angle":ej(this,tZ,e)}r&&eM(this,tY).emit("propsChange",(0,eb._)({},t,e))},eL(i$,"CTRL_SIZE",16),eL(i$,"CTRL_KEYS",["t","b","l","r","lt","lb","rt","rb","rotate"]);var i0=i$,i1=/*#__PURE__*/function(){function t(){var e=this;(0,eg._)(this,t),eL(this,"rect",new i0),eL(this,"time",{offset:0,duration:0}),eL(this,"visible",!0),eN(this,tQ,new iw),eL(this,"on",eM(this,tQ).on),eN(this,tJ,0),eL(this,"opacity",1),eL(this,"flip",null),eN(this,t$,null),eN(this,t0,null),eL(this,"ready",Promise.resolve()),this.rect.on("propsChange",function(t){eM(e,tQ).emit("propsChange",{rect:t})})}return(0,ev._)(t,[{key:"zIndex",get:function(){return eM(this,tJ)},set:function(t){var e=eM(this,tJ)!==t;ej(this,tJ,t),e&&eM(this,tQ).emit("propsChange",{zIndex:t})}},{key:"_render",value:function(t){var e=this.rect,r=e.center,n=e.angle;t.setTransform("horizontal"===this.flip?-1:1,0,0,"vertical"===this.flip?-1:1,r.x,r.y),t.rotate((null==this.flip?1:-1)*n),t.globalAlpha=this.opacity}},{key:"setAnimation",value:function(t,e){var r,n;ej(this,t$,Object.entries(t).map(function(t){var e,r=(0,eA._)(t,2),n=r[0],s=r[1],a=null!==(e=({from:0,to:100})[n])&&void 0!==e?e:Number(n.slice(0,-1));if(isNaN(a)||a>100||a<0)throw Error("keyFrame must between 0~100");return[a/100,s]})),ej(this,t0,Object.assign({},eM(this,t0),{duration:1e6*e.duration,delay:(null!==(r=e.delay)&&void 0!==r?r:0)*1e6,iterCount:null!==(n=e.iterCount)&&void 0!==n?n:1/0}))}},{key:"animate",value:function(t){if(null!=eM(this,t$)&&null!=eM(this,t0)&&!(t=r.iterCount)return{};var n=t%r.duration,s=t===r.duration?1:n/r.duration,a=e.findIndex(function(t){return t[0]>=s});if(-1===a)return{};var o=e[a-1],u=e[a],l=u[1];if(null==o)return l;var c=o[1],h={},f=(s-o[0])/(u[0]-o[0]);for(var d in l)null!=c[d]&&(h[d]=(l[d]-c[d])*f+c[d]);return h}(t,eM(this,t$),eM(this,t0));for(var r in e)switch(r){case"opacity":this.opacity=e[r];break;case"x":case"y":case"w":case"h":case"angle":this.rect[r]=e[r]}}}},{key:"copyStateTo",value:function(t){ej(t,t$,eM(this,t$)),ej(t,t0,eM(this,t0)),t.visible=this.visible,t.zIndex=this.zIndex,t.opacity=this.opacity,t.flip=this.flip,t.rect=this.rect.clone(),t.time=(0,eE._)({},this.time)}},{key:"destroy",value:function(){eM(this,tQ).destroy()}}]),t}();tQ=new WeakMap,tJ=new WeakMap,t$=new WeakMap,t0=new WeakMap;var i2=/*#__PURE__*/function(t){(0,ex._)(r,t);var e=(0,eC._)(r);function r(t){var n;return(0,eg._)(this,r),n=e.call(this),eN((0,em._)(n),t1),eN((0,em._)(n),t2,null),eN((0,em._)(n),t3,!1),ej((0,em._)(n),t1,t),n.ready=t.ready.then(function(t){var e=t.width,r=t.height,s=t.duration;n.rect.w=0===n.rect.w?e:n.rect.w,n.rect.h=0===n.rect.h?r:n.rect.h,n.time.duration=0===n.time.duration?s:n.time.duration}),n}return(0,ev._)(r,[{key:"offscreenRender",value:function(t,e){var n=this,s=this;return(0,ey._)(function(){var a,o,u,l,c,h,f,d;return(0,eB._)(this,function(p){switch(p.label){case 0:return s.animate(e),(0,ew._)((0,eS._)(r.prototype),"_render",n).call(s,t),u=(o=s.rect).w,l=o.h,[4,eM(s,t1).tick(e)];case 1:if(h=(c=p.sent()).video,f=c.audio,"done"===c.state)return[2,{audio:null!=f?f:[],done:!0}];return[2,(null!=(d=null!=h?h:eM(s,t2))&&t.drawImage(d,-u/2,-l/2,u,l),null!=h&&(null==(a=eM(s,t2))||a.close(),ej(s,t2,h)),{audio:null!=f?f:[],done:!1})]}})})()}},{key:"clone",value:function(){var t=this;return(0,ey._)(function(){var e,n;return(0,eB._)(this,function(s){switch(s.label){case 0:return n=r.bind,[4,eM(t,t1).clone()];case 1:return[4,(e=new(n.apply(r,[void 0,s.sent()]))).ready];case 2:return[2,(s.sent(),t.copyStateTo(e),e)]}})})()}},{key:"destroy",value:function(){var t;eM(this,t3)||(ej(this,t3,!0),rw.info("OffscreenSprite destroy"),(0,ew._)((0,eS._)(r.prototype),"destroy",this).call(this),null==(t=eM(this,t2))||t.close(),ej(this,t2,null),eM(this,t1).destroy())}}]),r}(i1);t1=new WeakMap,t2=new WeakMap,t3=new WeakMap;var i3=i2,i4=/*#__PURE__*/function(t){(0,ex._)(r,t);var e=(0,eC._)(r);function r(t){var n;return(0,eg._)(this,r),n=e.call(this),eN((0,em._)(n),t9),eN((0,em._)(n),t4),eN((0,em._)(n),t6,null),eN((0,em._)(n),t8,[]),eN((0,em._)(n),t5,!1),eN((0,em._)(n),et,-1),eN((0,em._)(n),ee,!1),ej((0,em._)(n),t4,t),n.ready=t.ready.then(function(t){var e=t.width,r=t.height,s=t.duration;n.rect.w=0===n.rect.w?e:n.rect.w,n.rect.h=0===n.rect.h?r:n.rect.h,n.time.duration=0===n.time.duration?s:n.time.duration}),n}return(0,ev._)(r,[{key:"getClip",value:function(){return eM(this,t4)}},{key:"preFrame",value:function(t){eG(this,t9,t7).call(this,t)}},{key:"render",value:function(t,e){this.animate(e),(0,ew._)((0,eS._)(r.prototype),"_render",this).call(this,t);var n=this.rect,s=n.w,a=n.h;eM(this,et)!==e&&eG(this,t9,t7).call(this,e),ej(this,et,e);var o=eM(this,t8);ej(this,t8,[]);var u=eM(this,t6);return null!=u&&t.drawImage(u,-s/2,-a/2,s,a),{audio:o}}},{key:"destroy",value:function(){var t;eM(this,ee)||(ej(this,ee,!0),rw.info("VisibleSprite destroy"),(0,ew._)((0,eS._)(r.prototype),"destroy",this).call(this),null==(t=eM(this,t6))||t.close(),ej(this,t6,null),eM(this,t4).destroy())}}]),r}(i1);t4=new WeakMap,t6=new WeakMap,t8=new WeakMap,t5=new WeakMap,t9=new WeakSet,t7=function(t){var e=this;eM(this,t5)||(ej(this,t5,!0),eM(this,t4).tick(t).then(function(t){var r,n=t.video,s=t.audio;null!=n&&(null==(r=eM(e,t6))||r.close(),ej(e,t6,null!=n?n:null)),ej(e,t8,null!=s?s:[])}).finally(function(){ej(e,t5,!1)}))},et=new WeakMap,ee=new WeakMap;var i6=0;function i8(t){return i5.apply(this,arguments)}function i5(){return(i5=(0,ey._)(function(t){return(0,eB._)(this,function(e){switch(e.label){case 0:if(!(t()>50))return[3,3];return[4,rH(15)];case 1:return e.sent(),[4,i8(t)];case 2:e.sent(),e.label=3;case 3:return[2]}})})).apply(this,arguments)}var i9=/*#__PURE__*/function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,eg._)(this,t),eN(this,eh),eN(this,er,rw.create("id:".concat(i6++,","))),eN(this,ei,!1),eN(this,en,[]),eN(this,es),eN(this,ea),eN(this,eo,null),eN(this,eu),eN(this,el),eN(this,ec,new iw),eL(this,"on",eM(this,ec).on);var r=e.width,n=void 0===r?0:r,s=e.height,a=void 0===s?0:s;ej(this,es,new OffscreenCanvas(n,a));var o=eM(this,es).getContext("2d",{alpha:!1});if(null==o)throw Error("Can not create 2d offscreen context");ej(this,ea,o),ej(this,eu,Object.assign({bgColor:"#000",width:0,height:0,videoCodec:"avc1.42E032",audio:!0,bitrate:5e6,metaDataTags:null},e)),ej(this,el,n*a>0)}return(0,ev._)(t,[{key:"addSprite",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,ey._)(function(){var n,s;return(0,eB._)(this,function(a){switch(a.label){case 0:return eM(r,er).info("Combinator add sprite",t),[4,t.clone()];case 1:return n=a.sent(),eM(r,er).info("Combinator add sprite ready",t),eM(r,en).push(Object.assign(n,{main:null!==(s=e.main)&&void 0!==s&&s,expired:!1})),eM(r,en).sort(function(t,e){return t.zIndex-e.zIndex}),[2]}})})()}},{key:"output",value:function(){var t,e=this;if(0===eM(this,en).length)throw Error("No sprite added");var r=eM(this,en).find(function(t){return t.main}),n=null!=r?r.time.offset+r.time.duration:(t=Math).max.apply(t,(0,eI._)(eM(this,en).map(function(t){return t.time.offset+t.time.duration})));if(n===1/0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of ImgClip, AudioCli");-1===n&&eM(this,er).warn("Unable to determine the end time, process value don't update"),eM(this,er).info("start combinate video, maxTime:".concat(n));var s=eG(this,eh,ef).call(this,n),a=performance.now(),o=this,u=eG(this,eh,ed).call(this,s,n,{onProgress:function(t){eM(e,er).debug("OutputProgress:",t),eM(e,ec).emit("OutputProgress",t)},onEnded:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:return[4,s.flush()];case 1:return t.sent(),eM(o,er).info("===== output ended =====, cost:",performance.now()-a),eM(o,ec).emit("OutputProgress",1),o.destroy(),[2]}})}),onError:function(t){eM(e,ec).emit("error",t),h(t),e.destroy()}});ej(this,eo,function(){u(),s.close(),h()});var l=ik(s.mp4file,500,this.destroy),c=l.stream,h=l.stop;return c}},{key:"destroy",value:function(){var t;eM(this,ei)||(ej(this,ei,!0),null==(t=eM(this,eo))||t.call(this),eM(this,ec).destroy())}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{videoCodec:"avc1.42E032"};return(0,ey._)(function(){var e,r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:if(!(n=null!=self.OffscreenCanvas&&null!=self.VideoEncoder&&null!=self.VideoDecoder&&null!=self.VideoFrame&&null!=self.AudioEncoder&&null!=self.AudioDecoder&&null!=self.AudioData))return[3,2];return[4,self.VideoEncoder.isConfigSupported({codec:t.videoCodec,width:1280,height:720})];case 1:n=null!==(e=s.sent().supported)&&void 0!==e&&e,s.label=2;case 2:if(!(r=n))return[3,4];return[4,self.AudioEncoder.isConfigSupported({codec:r$.codec,sampleRate:r$.sampleRate,numberOfChannels:r$.channelCount})];case 3:r=s.sent().supported,s.label=4;case 4:return[2,r]}})})()}}]),t}();er=new WeakMap,ei=new WeakMap,en=new WeakMap,es=new WeakMap,ea=new WeakMap,eo=new WeakMap,eu=new WeakMap,el=new WeakMap,ec=new WeakMap,eh=new WeakSet,ef=function(t){var e=eM(this,eu),r=e.width,n=e.height,s=e.videoCodec,a=e.bitrate,o=e.audio,u=e.metaDataTags;return iA({video:eM(this,el)?{width:r,height:n,expectFPS:30,codec:s,bitrate:a,__unsafe_hardwareAcceleration__:eM(this,eu).__unsafe_hardwareAcceleration__}:null,audio:!1===o?null:{codec:"aac",sampleRate:r$.sampleRate,channelCount:r$.channelCount},duration:t,metaDataTags:u})},ed=function(t,e,r){var n=this,s=r.onProgress,a=r.onEnded,o=r.onError,u=0,l=!1,c=null,h=this;(0,ey._)(function(){var r,n,s,o,f,p,m,_;return(0,eB._)(this,function(y){switch(y.label){case 0:r=function(){var r,s,_,y,g,v,b,w,S,x,E,U,T;return(0,eB._)(this,function(A){switch(A.label){case 0:if(null!=c)return[2,{v:void 0}];if(!(l||-1!==e&&m>e||0===eM(h,en).length))return[3,2];return d(),[4,a()];case 1:return A.sent(),[2,{v:void 0}];case 2:u=m/e,p.fillStyle=eM(h,eu).bgColor,p.fillRect(0,0,o,f),r=[],s=!0,_=!1,y=void 0,A.label=3;case 3:A.trys.push([3,10,11,12]),g=eM(h,en)[Symbol.iterator](),A.label=4;case 4:if((s=(v=g.next()).done)||(b=v.value,l))return[3,9];if(m0)||!(m>b.time.offset+b.time.duration))&&!x)return[3,8];if(!b.main)return[3,7];return d(),[4,a()];case 6:return A.sent(),[2,{v:void 0}];case 7:b.destroy(),b.expired=!0,A.label=8;case 8:return s=!0,[3,4];case 9:return[3,12];case 10:return E=A.sent(),_=!0,y=E,[3,12];case 11:try{s||null==g.return||g.return()}finally{if(_)throw y}return[7];case 12:var I,k,C;if(l)return[2,{v:void 0}];return!1!==eM(h,eu).audio&&(r.flat().every(function(t){return 0===t.length})?t.encodeAudio((I=m,C=Math.floor(33e3*(k=r$.sampleRate)/1e6),new AudioData({timestamp:I,numberOfChannels:r$.channelCount,numberOfFrames:C,sampleRate:k,format:"f32-planar",data:new Float32Array(2*C)}))):(U=rY(r),t.encodeAudio(new AudioData({timestamp:m,numberOfChannels:r$.channelCount,numberOfFrames:U.length/r$.channelCount,sampleRate:r$.sampleRate,format:"f32-planar",data:U})))),eM(h,el)&&(T=new VideoFrame(eM(h,es),{duration:33e3,timestamp:m}),t.encodeVideo(T,{keyFrame:n%150==0}),p.resetTransform(),p.clearRect(0,0,o,f),n+=1),m+=33e3,[4,i8(t.getEncodeQueueSize)];case 13:return A.sent(),[2]}})},n=0,o=(s=eM(h,es)).width,f=s.height,p=eM(h,ea),m=0,y.label=1;case 1:return[5,(0,eP._)(r())];case 2:if(_=y.sent(),"object"===(0,ek._)(_))return[2,_.v];y.label=3;case 3:return[3,1];case 4:return[2]}})})().catch(function(t){c=t,eM(n,er).error(t),d(),o(t)});var f=setInterval(function(){s(u)},500),d=function(){l||(l=!0,clearInterval(f),eM(n,en).forEach(function(t){return t.destroy()}))};return d}},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_async_iterator":"kdyGG","@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_define_property":"3NGsL","@swc/helpers/_/_get":"hMhPd","@swc/helpers/_/_get_prototype_of":"dAKgy","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_possible_constructor_return":"iVdhB","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_create_super":"86fte","@swc/helpers/_/_ts_generator":"6Xyd0","@swc/helpers/_/_ts_values":"1Y0br","718a311db185ef08":"gp9kd","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kdyGG:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t){var e,r,n,s=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);s--;){if(r&&null!=(e=t[r]))return e.call(t);if(n&&null!=(e=t[n]))return new a(e.call(t));r="@@asyncIterator",n="@@iterator"}throw TypeError("Object is not async iterable")}function a(t){function e(t){if(Object(t)!==t)return Promise.reject(TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then(function(t){return{value:t,done:e}})}return(a=function(t){this.s=t,this.n=t.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var r=this.s.return;return void 0===r?Promise.resolve({value:t,done:!0}):e(r.apply(this.s,arguments))},throw:function(t){var r=this.s.return;return void 0===r?Promise.reject(t):e(r.apply(this.s,arguments))}},new a(t)}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9iJMm":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=Array(e);r* @license MIT */var n=t("@swc/helpers/_/_type_of"),s=t("9c62938f1dccc73c"),a=t("aceacb6a4531a9d2"),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function u(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return f(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!l.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|_(t,e),n=u(r),s=n.write(t,e);return s!==r&&(n=n.slice(0,s)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(B(t,Uint8Array)){var e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,n._)(t)));if(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(B(t,SharedArrayBuffer)||t&&B(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var s=t.valueOf&&t.valueOf();if(null!=s&&s!==t)return l.from(s,e,r);var a=function(t){if(l.isBuffer(t)){var e,r=0|m(t.length),n=u(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?u(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,n._)(t)))}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return h(t),u(t<0?0:0|m(t))}function d(t){for(var e=t.length<0?0:0|m(t.length),r=u(e),n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function _(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":(0,n._)(t)));var r=t.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===r)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(t).length;default:if(a)return s?-1:I(t).length;e=(""+e).toLowerCase(),a=!0}}function y(t,e,r){var n,a,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var s="",a=e;a2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(a=r=+r)!=a&&(r=s?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(s)return -1;r=t.length-1}else if(r<0){if(!s)return -1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,s);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?s?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,s);throw TypeError("val must be string, number or Buffer")}function b(t,e,r,n,s){var a,o=1,u=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;o=2,u/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(s){var h=-1;for(a=r;au&&(r=u-l),a=r;a>=0;a--){for(var f=!0,d=0;d239?4:c>223?3:c>191?2:1;if(s+f<=r)switch(f){case 1:c<128&&(h=c);break;case 2:(192&(a=t[s+1]))==128&&(l=(31&c)<<6|63&a)>127&&(h=l);break;case 3:a=t[s+1],o=t[s+2],(192&a)==128&&(192&o)==128&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:a=t[s+1],o=t[s+2],u=t[s+3],(192&a)==128&&(192&o)==128&&(192&u)==128&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&u)>65535&&l<1114112&&(h=l)}null===h?(h=65533,f=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),s+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function x(t,e,r,n,s,a){if(!l.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>s||et.length)throw RangeError("Index out of range")}function E(t,e,r,n,s,a){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function U(t,e,r,n,s){return e=+e,r>>>=0,s||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),a.write(t,e,r,n,23,4),r+4}function T(t,e,r,n,s){return e=+e,r>>>=0,s||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),a.write(t,e,r,n,52,8),r+8}r.Buffer=l,r.SlowBuffer=function(t){return+t!=t&&(t=0),l.alloc(+t)},r.INSPECT_MAX_BYTES=50,r.kMaxLength=2147483647,l.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,r){return(h(t),t<=0)?u(t):void 0!==e?"string"==typeof r?u(t).fill(e,r):u(t).fill(e):u(t)},l.allocUnsafe=function(t){return f(t)},l.allocUnsafeSlow=function(t){return f(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(B(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),B(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,s=0,a=Math.min(r,n);sn.length?l.from(a).copy(n,s):Uint8Array.prototype.set.call(n,a,s);else if(l.isBuffer(a))a.copy(n,s);else throw TypeError('"list" argument must be an Array of Buffers');s+=a.length}return n},l.byteLength=_,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;ee&&(t+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,r,s,a){if(B(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":(0,n._)(t)));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===s&&(s=0),void 0===a&&(a=this.length),e<0||r>t.length||s<0||a>this.length)throw RangeError("out of range index");if(s>=a&&e>=r)return 0;if(s>=a)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,s>>>=0,a>>>=0,this===t)return 0;for(var o=a-s,u=r-e,c=Math.min(o,u),h=this.slice(s,a),f=t.slice(e,r),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s,a,o,u,l,c,h,f,d=this.length-e;if((void 0===r||r>d)&&(r=d),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var s=t.length-r;n?(n=Number(n))>s&&(n=s):n=s;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,s.push(r%256),s.push(n);return s}(t,this.length-h),this,h,f);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t],s=1,a=0;++a>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t+--e],s=1;e>0&&(s*=256);)n+=this[t+--e]*s;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||S(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t],s=1,a=0;++a=(s*=128)&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=e,s=1,a=this[t+--n];n>0&&(s*=256);)a+=this[t+--n]*s;return a>=(s*=128)&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return(t>>>=0,e||S(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||S(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||S(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return t>>>=0,e||S(t,4,this.length),a.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||S(t,4,this.length),a.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||S(t,8,this.length),a.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||S(t,8,this.length),a.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var s=Math.pow(2,8*r)-1;x(this,t,e,r,s,0)}var a=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){var s=Math.pow(2,8*r)-1;x(this,t,e,r,s,0)}var a=r-1,o=1;for(this[e+a]=255&t;--a>=0&&(o*=256);)this[e+a]=t/o&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var s=Math.pow(2,8*r-1);x(this,t,e,r,s-1,-s)}var a=0,o=1,u=0;for(this[e]=255&t;++a>0)-u&255;return e+r},l.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var s=Math.pow(2,8*r-1);x(this,t,e,r,s-1,-s)}var a=r-1,o=1,u=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===u&&0!==this[e+a+1]&&(u=1),this[e+a]=(t/o>>0)-u&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return T(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return T(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&r<57344){if(!s){if(r>56319||o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}s=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),s=r;continue}r=(s-55296<<10|r-56320)+65536}else s&&(e-=3)>-1&&a.push(239,191,189);if(s=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function k(t){return s.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(A,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function C(t,e,r,n){for(var s=0;s=e.length)&&!(s>=t.length);++s)e[s+r]=t[s];return s}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var P=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,s=0;s<16;++s)e[n+s]=t[r]+t[s];return e}()},{"@swc/helpers/_/_type_of":"felZi","9c62938f1dccc73c":"8CZvr",aceacb6a4531a9d2:"kxjGq"}],"8CZvr":[function(t,e,r){r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return(r+n)*3/4-n},r.toByteArray=function(t){var e,r,n=c(t),o=n[0],u=n[1],l=new a((o+u)*3/4-u),h=0,f=u>0?o-4:o;for(r=0;r>16&255,l[h++]=e>>8&255,l[h++]=255&e;return 2===u&&(e=s[t.charCodeAt(r)]<<2|s[t.charCodeAt(r+1)]>>4,l[h++]=255&e),1===u&&(e=s[t.charCodeAt(r)]<<10|s[t.charCodeAt(r+1)]<<4|s[t.charCodeAt(r+2)]>>2,l[h++]=e>>8&255,l[h++]=255&e),l},r.fromByteArray=function(t){for(var e,r=t.length,s=r%3,a=[],o=0,u=r-s;o>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return a.join("")}(t,o,o+16383>u?u:o+16383));return 1===s?a.push(n[(e=t[r-1])>>2]+n[e<<4&63]+"=="):2===s&&a.push(n[(e=(t[r-2]<<8)+t[r-1])>>10]+n[e>>4&63]+n[e<<2&63]+"="),a.join("")};for(var n=[],s=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,l=o.length;u0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],kxjGq:[function(t,e,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh*/r.read=function(t,e,r,n,s){var a,o,u=8*s-n-1,l=(1<>1,h=-7,f=r?s-1:0,d=r?-1:1,p=t[e+f];for(f+=d,a=p&(1<<-h)-1,p>>=-h,h+=u;h>0;a=256*a+t[e+f],f+=d,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+t[e+f],f+=d,h-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,s,a){var o,u,l,c=8*a-s-1,h=(1<>1,d=23===s?5960464477539062e-23:0,p=n?0:a-1,m=n?1:-1,_=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(u=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?e+=d/l:e+=d*Math.pow(2,1-f),e*l>=2&&(o++,l/=2),o+f>=h?(u=0,o=h):o+f>=1?(u=(e*l-1)*Math.pow(2,s),o+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,s),o=0));s>=8;t[r+p]=255&u,p+=m,u/=256,s-=8);for(o=o<0;t[r+p]=255&o,p+=m,o/=256,c-=8);t[r+p-m]|=128*_}},{}]},["c4SNP"],"c4SNP","parcelRequire4dc0"); \ No newline at end of file +!function(t,e,r,n,s,a,o,l){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof u[n]&&u[n],h=c.i||{},f=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(e,r){if(!f[e]){if(!t[e]){if(s[e])return s[e];var a="function"==typeof u[n]&&u[n];if(!r&&a)return a(e,!0);if(c)return c(e,!0);if(d&&"string"==typeof e)return d(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}h.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},h.cache={};var l=f[e]=new p.Module(e);t[e][0].call(l.exports,h,l,l.exports,u)}return f[e].exports;function h(t){var e=h.resolve(t);return!1===e?{}:p(e)}}p.isParcelRequire=!0,p.Module=function(t){this.id=t,this.bundle=p,this.require=d,this.exports={}},p.modules=t,p.cache=f,p.parent=c,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=h,p.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return u[n]}}),u[n]=p;for(var _=0;_0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var r,n,s=e.option,u=e.constructor.utils,c=u.createElement,h=u.def,f=c("canvas"),d=f.getContext("2d"),p=null,_=null,m=null,y=null,g=0,v={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:s.muted,volume:s.volume,autoplay:s.autoplay};function b(){m&&(clearInterval(m),m=null),_&&(_.stop(),_=null)}function w(){if(n){var t=v.muted?0:v.volume;n.gain.setValueAtTime(t,r.currentTime)}}function S(){return(S=(0,a._)(function(){var t,s,l,u;function c(){return h.apply(this,arguments)}function h(){return(h=(0,a._)(function(){var a,c,h,f,m,g,w,S;return(0,o._)(this,function(o){switch(o.label){case 0:if(!v.playing)return[2];return h=(c=performance.now())-u,u=c,null!==y?(t=1e6*y,y=null,l=!0):t+=1e3*h*v.playbackRate,v.currentTime=t/1e6,[4,p.tick(Math.round(t))];case 1:if(m=(f=o.sent()).state,g=f.video,w=f.audio,e.emit("video:timeupdate",{type:"timeupdate"}),"done"===m)return b(),v.ended=!0,v.playing=!1,v.paused=!0,e.emit("video:ended",{type:"ended"}),[2];return g&&"success"===m&&(d.clearRect(0,0,v.videoWidth,v.videoHeight),d.drawImage(g,0,0,v.videoWidth,v.videoHeight),g.close()),l?l=!1:(null==w||null==(a=w[0])?void 0:a.length)&&((S=r.createBuffer(2,w[0].length,48e3)).copyToChannel(w[0],0),S.copyToChannel(w[1],1),(_=r.createBufferSource()).buffer=S,_.connect(n),_.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),s=Math.max(r.currentTime,s),_.start(s),s+=S.duration/v.playbackRate),[2]}})})).apply(this,arguments)}return(0,o._)(this,function(e){return r||(n=(r=new AudioContext).createGain()).connect(r.destination),t=1e6*v.currentTime,s=0,l=!0,u=performance.now(),b(),w(),v.playing=!0,v.paused=!1,m=setInterval(c,1e3/60),[2]})})).apply(this,arguments)}function x(t){return U.apply(this,arguments)}function U(){return(U=(0,a._)(function(t){var e;return(0,o._)(this,function(r){switch(r.label){case 0:return[4,p.tick(1e6*t)];case 1:return(e=r.sent().video)&&(d.clearRect(0,0,f.width,f.height),d.drawImage(e,0,0,f.width,f.height),e.close()),[2]}})})).apply(this,arguments)}function E(){var t,r=null==(t=e.template)?void 0:t.$player;if(r&&!s.autoSize){var n=f.videoWidth/f.videoHeight,a=r.clientWidth,o=r.clientHeight,l=0,u=0;a/o>n?l=(a-o*n)/2:u=(o-a/n)/2,Object.assign(f.style,{padding:"".concat(u,"px ").concat(l,"px")})}}function k(){return(k=(0,a._)(function(){var r,n,a;return(0,o._)(this,function(o){switch(o.label){case 0:return[4,l.Combinator.isSupported()];case 1:if(!o.sent())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");b(),Object.assign(v,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:s.muted,volume:s.volume,autoplay:s.autoplay}),p&&(p.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"})),o.label=2;case 2:return o.trys.push([2,5,,6]),[4,Promise.resolve()];case 3:return o.sent(),v.readyState=1,e.emit("video:loadstart",{type:"loadstart"}),[4,fetch(s.url)];case 4:if(!(r=o.sent()).body)throw Error("No response body");return p=new(0,l.MP4Clip)(r.body,t),[3,6];case 5:throw n=o.sent(),v.readyState=0,e.emit("video:error",n),n;case 6:return[4,p.ready];case 7:return Object.assign(v,{readyState:4,duration:Math.round((a=o.sent()).duration/1e6),videoWidth:a.width,videoHeight:a.height}),f.width=v.videoWidth,f.height=v.videoHeight,[4,x(.1)];case 8:return o.sent(),E(),e.emit("video:loadedmetadata",{type:"loadedmetadata"}),e.emit("video:durationchange",{type:"durationchange"}),e.emit("video:loadeddata",{type:"loadeddata"}),e.emit("video:canplay",{type:"canplay"}),e.emit("video:canplaythrough",{type:"canplaythrough"}),[2]}})})).apply(this,arguments)}return h(f,"duration",{get:function(){return v.duration}}),h(f,"videoWidth",{get:function(){return v.videoWidth}}),h(f,"videoHeight",{get:function(){return v.videoHeight}}),h(f,"volume",{get:function(){return v.volume},set:function(t){v.volume=Math.max(0,Math.min(1,t)),w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(f,"currentTime",{get:function(){return v.currentTime},set:function(t){if(!(v.readyState<4)){var r=Math.max(0,Math.min(t,v.duration)),n=performance.now();n-g>16&&(g=n,y=r,v.currentTime=r,v.playing||x(r),e.emit("video:timeupdate",{type:"timeupdate"}))}}}),h(f,"autoplay",{get:function(){return v.autoplay},set:function(t){v.autoplay=t,t&&v.readyState>=4&&f.play()}}),h(f,"src",{get:function(){return s.url},set:function(t){s.url=t,(function(){return k.apply(this,arguments)})().then(function(){s.autoplay&&f.play()})}}),h(f,"playbackRate",{get:function(){return v.playbackRate},set:function(t){v.playbackRate=Math.max(.25,Math.min(2,t)),_&&_.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),e.emit("video:ratechange",{type:"ratechange"})}}),h(f,"playing",{get:function(){return v.playing}}),h(f,"paused",{get:function(){return v.paused}}),h(f,"ended",{get:function(){return v.ended}}),h(f,"readyState",{get:function(){return v.readyState}}),h(f,"muted",{get:function(){return v.muted},set:function(t){v.muted=t,w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(f,"buffered",{get:function(){return{start:function(){return 0},end:function(){return v.buffered},length:1}}}),h(f,"play",{value:(0,a._)(function(){return(0,o._)(this,function(t){switch(t.label){case 0:if(v.readyState<4)return[2,!1];return[4,function(){return S.apply(this,arguments)}()];case 1:return t.sent(),e.emit("video:play",{type:"play"}),e.emit("video:playing",{type:"playing"}),[2,!0]}})})}),h(f,"pause",{value:function(){b(),v.playing=!1,v.paused=!0,e.emit("video:pause",{type:"pause"})}}),e.on("destroy",function(){b(),p&&p.destroy()}),e.on("resize",E),f}}"undefined"!=typeof window&&(window.artplayerProxyWebAV=u)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@webav/av-cliper":"zMdV7","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e,r,n,s,a,o){try{var l=t[a](o),u=l.value}catch(t){r(t);return}l.done?e(u):Promise.resolve(u).then(n,s)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var o=t.apply(e,r);function l(t){a(o,n,s,l,u,"next",t)}function u(t){a(o,n,s,l,u,"throw",t)}l(void 0)})}}s.defineInteropFlag(r),s.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(t,e,r,n){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"_",function(){return a.__generator});var a=t("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"__extends",function(){return l}),s.export(r,"__assign",function(){return u}),s.export(r,"__rest",function(){return c}),s.export(r,"__decorate",function(){return h}),s.export(r,"__param",function(){return f}),s.export(r,"__esDecorate",function(){return d}),s.export(r,"__runInitializers",function(){return p}),s.export(r,"__propKey",function(){return _}),s.export(r,"__setFunctionName",function(){return m}),s.export(r,"__metadata",function(){return y}),s.export(r,"__awaiter",function(){return g}),s.export(r,"__generator",function(){return v}),s.export(r,"__createBinding",function(){return b}),s.export(r,"__exportStar",function(){return w}),s.export(r,"__values",function(){return S}),s.export(r,"__read",function(){return x}),s.export(r,"__spread",function(){return U}),s.export(r,"__spreadArrays",function(){return E}),s.export(r,"__spreadArray",function(){return k}),s.export(r,"__await",function(){return A}),s.export(r,"__asyncGenerator",function(){return T}),s.export(r,"__asyncDelegator",function(){return C}),s.export(r,"__asyncValues",function(){return I}),s.export(r,"__makeTemplateObject",function(){return B}),s.export(r,"__importStar",function(){return P}),s.export(r,"__importDefault",function(){return L}),s.export(r,"__classPrivateFieldGet",function(){return R}),s.export(r,"__classPrivateFieldSet",function(){return D}),s.export(r,"__classPrivateFieldIn",function(){return M}),s.export(r,"__addDisposableResource",function(){return O}),s.export(r,"__disposeResources",function(){return N}),s.export(r,"__rewriteRelativeImportExtension",function(){return G});var a=t("@swc/helpers/_/_type_of"),o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(t);se.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function h(t,e,r,n){var s,o=arguments.length,l=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if(("undefined"==typeof Reflect?"undefined":(0,a._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(l=(o<3?s(l):o>3?s(e,r,l):s(e,r))||l);return o>3&&l&&Object.defineProperty(e,r,l),l}function f(t,e){return function(r,n){e(r,n,t)}}function d(t,e,r,n,s,o){function l(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var u,c=n.kind,h="getter"===c?"get":"setter"===c?"set":"value",f=!e&&t?n.static?t:t.prototype:null,d=e||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,_=r.length-1;_>=0;_--){var m={};for(var y in n)m[y]="access"===y?{}:n[y];for(var y in n.access)m.access[y]=n.access[y];m.addInitializer=function(t){if(p)throw TypeError("Cannot add initializers after decoration has completed");o.push(l(t||null))};var g=(0,r[_])("accessor"===c?{get:d.get,set:d.set}:d[h],m);if("accessor"===c){if(void 0===g)continue;if(null===g||(void 0===g?"undefined":(0,a._)(g))!=="object")throw TypeError("Object expected");(u=l(g.get))&&(d.get=u),(u=l(g.set))&&(d.set=u),(u=l(g.init))&&s.unshift(u)}else(u=l(g))&&("field"===c?s.unshift(u):d[h]=u)}f&&Object.defineProperty(f,n.name,d),p=!0}function p(t,e,r){for(var n=arguments.length>2,s=0;s0&&s[s.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!s||c[1]>s[0]&&c[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 x(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,s,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){s={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(s)throw s.error}}return o}function U(){for(var t=[],e=0;e1||l(t,e)})},e&&(n[t]=e(n[t])))}function l(t,e){try{var r;(r=s[t](e)).value instanceof A?Promise.resolve(r.value.v).then(u,c):h(a[0][2],r)}catch(t){h(a[0][3],t)}}function u(t){l("next",t)}function c(t){l("throw",t)}function h(t,e){t(e),a.shift(),a.length&&l(a[0][0],a[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,s){e[n]=t[n]?function(e){return(r=!r)?{value:A(t[n](e)),done:!1}:s?s(e):e}:s}}function I(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=S(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,s){var a,o,l;a=n,o=s,l=(e=t[r](e)).done,Promise.resolve(e.value).then(function(t){a({value:t,done:l})},o)})}}}function B(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var F=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},z=function(t){return(z=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e})(t)};function P(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=z(t),n=0;n\n\n
').concat(o.outerHTML,"
\n
\n\n ").replace(/\t/g,"").replace(/#/g,"%23"),h.src="data:image/svg+xml;charset=utf-8,".concat(f),r=h,[4,new Promise(function(t){r.onload=t})];case 1:return a.sent(),null==(s=(n=new OffscreenCanvas(r.width,r.height)).getContext("2d"))||s.drawImage(r,0,0,r.width,r.height),[4,createImageBitmap(n)];case 2:return[2,a.sent()]}})})).apply(this,arguments)}function eA(t){var e=new Float32Array(t.map(function(t){return t.length}).reduce(function(t,e){return t+e})),r=0,n=!0,s=!1,a=void 0;try{for(var o,l=t[Symbol.iterator]();!(n=(o=l.next()).done);n=!0){var u=o.value;e.set(u,r),r+=u.length}}catch(t){s=!0,a=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw a}}return e}function eT(t){if("f32-planar"===t.format){for(var e=[],r=0;r>7)],numberOfChannels:(127&a)>>3}}(c))}return n}function eM(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mp4a",n=null==(e=t.moov)?void 0:e.traks.map(function(t){return t.mdia.minf.stbl.stsd.entries}).flat().find(function(t){return t.type===r});return null==n?void 0:n.esds}function eO(){return(eO=(0,t5._)(function(t,e,r){var n;function s(){return(s=(0,t5._)(function(){var e,r,s,a;return(0,ec._)(this,function(o){switch(o.label){case 0:e=0,r=0x1e00000,o.label=1;case 1:return[4,t.read(r,{at:e})];case 2:if(0===(s=o.sent()).byteLength||(s.fileStart=e,null==(a=n.appendBuffer(s))))return[3,4];e=a,o.label=3;case 3:return[3,1];case 4:return n.stop(),[2]}})})).apply(this,arguments)}return(0,ec._)(this,function(t){switch(t.label){case 0:return(n=ed.default.createFile(!1)).onReady=function(t){e({mp4boxFile:n,info:t});var r,s,a=null==(r=t.videoTracks[0])?void 0:r.id;null!=a&&n.setExtractionOptions(a,"video",{nbSamples:100});var o=null==(s=t.audioTracks[0])?void 0:s.id;null!=o&&n.setExtractionOptions(o,"audio",{nbSamples:100}),n.start()},n.onSamples=r,[4,function(){return s.apply(this,arguments)}()];case 1:return t.sent(),[2]}})})).apply(this,arguments)}var ej=0;function eN(t){return"file"===t.kind&&t.createReader instanceof Function}var eG=function(){"use strict";function t(e){var r,n,s,a=this,w=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,t9._)(this,t);var S=this;if(eS(this,o,ej++),eS(this,l,ep.Log.create("MP4Clip id:".concat(ew(this,o),","))),ev(this,"ready"),eS(this,u,!1),eS(this,c,{duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0}),eS(this,h),eS(this,f,[]),eS(this,d,1),eS(this,p,[]),eS(this,_,[]),eS(this,m,null),eS(this,y,null),eS(this,g,{video:null,audio:null}),eS(this,v,{audio:!0}),ev(this,"tickInterceptor",(r=(0,t5._)(function(t,e){return(0,ec._)(this,function(t){return[2,e]})}),function(t,e){return r.apply(this,arguments)})),eS(this,b,new AbortController),!(e instanceof ReadableStream)&&!eN(e)&&!Array.isArray(e.videoSamples))throw Error("Illegal argument");ex(this,v,(0,es._)({audio:!0},w)),ex(this,d,"object"==(0,eu._)(w.audio)&&"volume"in w.audio?w.audio.volume:1);var x=(n=(0,t5._)(function(t){return(0,ec._)(this,function(e){switch(e.label){case 0:return[4,(0,em.write)(ew(S,h),t)];case 1:return[2,(e.sent(),ew(S,h))]}})}),function(t){return n.apply(this,arguments)});ex(this,h,eN(e)?e:"localFile"in e?e.localFile:(0,em.tmpfile)()),this.ready=(e instanceof ReadableStream?x(e).then(function(t){return eH(t,ew(a,v))}):eN(e)?eH(e,ew(this,v)):Promise.resolve(e)).then((s=(0,t5._)(function(t){var e,r,n,s,a,o,u,b;return(0,ec._)(this,function(w){switch(w.label){case 0:return e=t.videoSamples,r=t.audioSamples,n=t.decoderConf,s=t.headerBoxPos,ex(S,p,e),ex(S,_,r),ex(S,g,n),ex(S,f,s),b=[{video:null==n.video?null:(0,ea._)((0,es._)({},n.video),{hardwareAcceleration:ew(S,v).__unsafe_hardwareAcceleration__}),audio:n.audio}],[4,ew(S,h).createReader()];case 1:return o=(a=eY.apply(void 0,b.concat([w.sent(),e,r,!1!==ew(S,v).audio?ew(S,d):0]))).videoFrameFinder,u=a.audioFrameFinder,[2,(ex(S,m,o),ex(S,y,u),ex(S,c,function(t,e,r){var n,s,a={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};null!=t.video&&e.length>0&&(a.width=null!=(n=t.video.codedWidth)?n:0,a.height=null!=(s=t.video.codedHeight)?s:0),null!=t.audio&&r.length>0&&(a.audioSampleRate=eR.sampleRate,a.audioChanCount=eR.channelCount);var o=0,l=0;if(e.length>0)for(var u=e.length-1;u>=0;u--){var c=e[u];if(!c.deleted){o=c.cts+c.duration;break}}if(r.length>0){var h=r.at(-1);l=h.cts+h.duration}return a.duration=Math.max(o,l),a}(n,e,r)),ew(S,l).info("MP4Clip meta:",ew(S,c)),(0,es._)({},ew(S,c)))]}})}),function(t){return s.apply(this,arguments)}))}return(0,et._)(t,[{key:"meta",get:function(){return(0,es._)({},ew(this,c))}},{key:"getFileHeaderBinData",value:function(){var t=this;return(0,t5._)(function(){var e;return(0,ec._)(this,function(r){switch(r.label){case 0:return[4,t.ready];case 1:return r.sent(),[4,ew(t,h).getOriginFile()];case 2:if(null==(e=r.sent()))throw Error("MP4Clip localFile is not origin file");return[4,new Blob(ew(t,f).map(function(t){var r=t.start,n=t.size;return e.slice(r,r+n)})).arrayBuffer()];case 3:return[2,r.sent()]}})})()}},{key:"tick",value:function(t){var e=this;return(0,t5._)(function(){var r,n,s,a,o,l,u,h,f,d,p,_;return(0,ec._)(this,function(g){switch(g.label){case 0:if(!(t>=ew(e,c).duration))return[3,3];return o=e.tickInterceptor,l=[t],u={},[4,null==(r=ew(e,y))?void 0:r.find(t)];case 1:return[4,o.apply(e,l.concat([(u.audio=null!=(a=g.sent())?a:[],u.state="done",u)]))];case 2:return[2,g.sent()];case 3:return[4,Promise.all([null!=(h=null==(n=ew(e,y))?void 0:n.find(t))?h:[],null==(s=ew(e,m))?void 0:s.find(t)])];case 4:if(d=(f=eo._.apply(void 0,[g.sent(),2]))[0],null!=(p=f[1]))return[3,6];return[4,e.tickInterceptor(t,{audio:d,state:"success"})];case 5:return _=g.sent(),[3,8];case 6:return[4,e.tickInterceptor(t,{video:p,audio:d,state:"success"})];case 7:_=g.sent(),g.label=8;case 8:return[2,_]}})})()}},{key:"thumbnails",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,e=arguments.length>1?arguments[1]:void 0,r=this;return(0,t5._)(function(){var n,s,a,o,l;return(0,ec._)(this,function(u){switch(u.label){case 0:return ew(r,b).abort(),ex(r,b,new AbortController),n=ew(r,b).signal,[4,r.ready];case 1:var f,d,_,m,y,w,S;if(u.sent(),s="generate thumbnails aborted",n.aborted)throw Error(s);return o=(a=ew(r,c)).width,d=t,_=Math.round(t/o*a.height),m={quality:.1,type:"image/png"},S=(w=new OffscreenCanvas(d,_)).getContext("2d"),y=(0,t5._)(function(t){return(0,ec._)(this,function(e){switch(e.label){case 0:return S.drawImage(t,0,0,d,_),t.close(),[4,w.convertToBlob(m)];case 1:return[2,e.sent()]}})}),l=function(t){return y.apply(this,arguments)},[2,new Promise((f=(0,t5._)(function(t,a){var o,u,f,d,_,m,y,b,w,S,x,U;function E(){return k.apply(this,arguments)}function k(){return(k=(0,t5._)(function(){var e;return(0,ec._)(this,function(e){switch(e.label){case 0:var r;if(n.aborted)return[3,2];return[4,Promise.all(o.map((r=(0,t5._)(function(t){var e;return(0,ec._)(this,function(r){switch(r.label){case 0:return e={ts:t.ts},[4,t.img];case 1:return[2,(e.img=r.sent(),e)]}})}),function(t){return r.apply(this,arguments)})))];case 1:t.apply(void 0,[e.sent()]),e.label=2;case 2:return[2]}})})).apply(this,arguments)}function A(t){o.push({ts:t.timestamp,img:l(t)})}return(0,ec._)(this,function(t){switch(t.label){case 0:if(o=[],null==(u=ew(r,g).video)||0===ew(r,p).length)return E(),[2];if(n.addEventListener("abort",function(){a(Error(s))}),_=void 0===(d=(f=null!=e?e:{}).start)?0:d,y=void 0===(m=f.end)?ew(r,c).duration:m,!(b=f.step))return[3,6];return w=_,x=eZ.bind,[4,ew(r,h).createReader()];case 1:S=new(x.apply(eZ,[void 0,t.sent(),ew(r,p),(0,ea._)((0,es._)({},u),{hardwareAcceleration:ew(r,v).__unsafe_hardwareAcceleration__})])),t.label=2;case 2:if(!(w<=y&&!n.aborted))return[3,5];return[4,S.find(w)];case 3:(U=t.sent())&&A(U),w+=b,t.label=4;case 4:return[3,2];case 5:return S.destroy(),E(),[3,8];case 6:return[4,function(t,e,r,n,s,a){return e$.apply(this,arguments)}(ew(r,p),ew(r,h),u,n,{start:_,end:y},function(t,e){null!=t&&A(t),e&&E()})];case 7:t.sent(),t.label=8;case 8:return[2]}})}),function(t,e){return f.apply(this,arguments)}))]}})})()}},{key:"split",value:function(e){var r=this;return(0,t5._)(function(){var n,s,a,o,l,u,d,m;return(0,ec._)(this,function(y){switch(y.label){case 0:return[4,r.ready];case 1:if(y.sent(),e<=0||e>=ew(r,c).duration)throw Error('"time" out of bounds');return s=(n=(0,eo._)(function(t,e){if(0===t.length)return[];for(var r=0,n=0,s=-1,a=0;at[n].cts)){r=n;break}if(-1===r)throw Error("Not found audio sample by time");return[t.slice(0,r).map(function(t){return(0,es._)({},t)}),t.slice(r).map(function(t){return(0,ea._)((0,es._)({},t),{cts:t.cts-e})})]}(ew(r,_),e),2))[0],u=o[1],d=new t({localFile:ew(r,h),videoSamples:null!=s?s:[],audioSamples:null!=l?l:[],decoderConf:ew(r,g),headerBoxPos:ew(r,f)},ew(r,v)),m=new t({localFile:ew(r,h),videoSamples:null!=a?a:[],audioSamples:null!=u?u:[],decoderConf:ew(r,g),headerBoxPos:ew(r,f)},ew(r,v)),[4,Promise.all([d.ready,m.ready])];case 2:return[2,(y.sent(),[d,m])]}})})()}},{key:"clone",value:function(){var e=this;return(0,t5._)(function(){var r;return(0,ec._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:return n.sent(),[4,(r=new t({localFile:ew(e,h),videoSamples:(0,el._)(ew(e,p)),audioSamples:(0,el._)(ew(e,_)),decoderConf:ew(e,g),headerBoxPos:ew(e,f)},ew(e,v))).ready];case 2:return[2,(n.sent(),r.tickInterceptor=e.tickInterceptor,r)]}})})()}},{key:"splitTrack",value:function(){var e=this;return(0,t5._)(function(){var r,n,s;return(0,ec._)(this,function(a){switch(a.label){case 0:return[4,e.ready];case 1:if(a.sent(),r=[],!(ew(e,p).length>0))return[3,3];return[4,(n=new t({localFile:ew(e,h),videoSamples:(0,el._)(ew(e,p)),audioSamples:[],decoderConf:{video:ew(e,g).video,audio:null},headerBoxPos:ew(e,f)},ew(e,v))).ready];case 2:a.sent(),n.tickInterceptor=e.tickInterceptor,r.push(n),a.label=3;case 3:if(!(ew(e,_).length>0))return[3,5];return[4,(s=new t({localFile:ew(e,h),videoSamples:[],audioSamples:(0,el._)(ew(e,_)),decoderConf:{audio:ew(e,g).audio,video:null},headerBoxPos:ew(e,f)},ew(e,v))).ready];case 4:a.sent(),s.tickInterceptor=e.tickInterceptor,r.push(s),a.label=5;case 5:return[2,r]}})})()}},{key:"destroy",value:function(){var t,e;ew(this,u)||(ew(this,l).info("MP4Clip destroy"),ex(this,u,!0),null==(t=ew(this,m))||t.destroy(),null==(e=ew(this,y))||e.destroy())}}]),t}();o=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,_=new WeakMap,m=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,b=new WeakMap;var eW=eG;function eY(t,e,r,n,s){return{audioFrameFinder:0===s||null==t.audio||0===n.length?null:new eX(e,n,t.audio,{volume:s,targetSampleRate:eR.sampleRate}),videoFrameFinder:null==t.video||0===r.length?null:new eZ(e,r,t.video)}}function eH(t){return eV.apply(this,arguments)}function eV(){return(eV=(0,t5._)(function(t){var e,r,n,s,a,o,l,u,c,h,f,d=arguments;function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n="video"===r&&t.is_sync?function(t,e){if("avc1"!==e&&"hvc1"!==e)return 0;for(var r=new DataView(t.buffer),n=0;n>1&63;if(19===s||20===s)return n}n+=r.getUint32(n)+4}return -1}(t.data,t.description.type):-1,s=t.offset,a=t.size;return n>=0&&(s+=n,a-=n),(0,ea._)((0,es._)({},t),{is_idr:n>=0,offset:s,size:a,cts:(t.cts-e)/t.timescale*1e6,dts:(t.dts-e)/t.timescale*1e6,duration:t.duration/t.timescale*1e6,timescale:1e6,data:"video"===r?null:t.data})}return(0,ec._)(this,function(_){switch(_.label){case 0:return e=d.length>1&&void 0!==d[1]?d[1]:{},r=null,n={video:null,audio:null},s=[],a=[],o=[],l=-1,u=-1,[4,t.createReader()];case 1:return[4,function(t,e,r){return eO.apply(this,arguments)}(c=_.sent(),function(t){r=t.info;var e=t.mp4boxFile.ftyp;o.push({start:e.start,size:e.size});var s=t.mp4boxFile.moov;o.push({start:s.start,size:s.size});var a=eD(t.mp4boxFile,t.info),l=a.videoDecoderConf,u=a.audioDecoderConf;n.video=null!=l?l:null,n.audio=null!=u?u:null,null==l&&null==u&&ep.Log.error("MP4Clip no video and audio track"),ep.Log.info("mp4BoxFile moov ready",(0,ea._)((0,es._)({},t.info),{tracks:null,videoTracks:null,audioTracks:null}),n)},function(t,r,n){if("video"===r){-1===l&&(l=n[0].dts);var o=!0,c=!1,h=void 0;try{for(var f,d=n[Symbol.iterator]();!(o=(f=d.next()).done);o=!0){var _=f.value;s.push(p(_,l,"video"))}}catch(t){c=!0,h=t}finally{try{o||null==d.return||d.return()}finally{if(c)throw h}}}else if("audio"===r&&e.audio){-1===u&&(u=n[0].dts);var m=!0,y=!1,g=void 0;try{for(var v,b=n[Symbol.iterator]();!(m=(v=b.next()).done);m=!0){var w=v.value;a.push(p(w,u,"audio"))}}catch(t){y=!0,g=t}finally{try{m||null==b.return||b.return()}finally{if(y)throw g}}}})];case 2:return _.sent(),[4,c.close()];case 3:if(_.sent(),f=null!=(h=s.at(-1))?h:a.at(-1),null==r)throw Error("MP4Clip stream is done, but not emit ready");if(null==f)throw Error("MP4Clip stream not contain any sample");return[2,(e0(s),ep.Log.info("mp4 stream parsed"),{videoSamples:s,audioSamples:a,decoderConf:n,headerBoxPos:o})]}})})).apply(this,arguments)}var eZ=function t(e,r,n){"use strict";var s,a,o,l=this;(0,t9._)(this,t);var u=this;eS(this,w,null),eS(this,S,0),eS(this,x,{abort:!1,st:performance.now()}),ev(this,"find",(s=(0,t5._)(function(t){var e;return(0,ec._)(this,function(r){switch(r.label){case 0:return(null==ew(u,w)||"closed"===ew(u,w).state||t<=ew(u,S)||t-ew(u,S)>3e6)&&ew(u,L).call(u,t),ew(u,x).abort=!0,ex(u,S,t),ex(u,x,{abort:!1,st:performance.now()}),[4,ew(u,F).call(u,t,ew(u,w),ew(u,x))];case 1:return e=r.sent(),[2,(ex(u,I,0),e)]}})}),function(t){return s.apply(this,arguments)})),eS(this,U,0),eS(this,E,!1),eS(this,k,0),eS(this,A,[]),eS(this,T,0),eS(this,C,0),eS(this,I,0),eS(this,B,!1),eS(this,F,(a=(0,t5._)(function(t,e,r){var n,s,a,o,l;return(0,ec._)(this,function(c){switch(c.label){case 0:if(null==e||"closed"===e.state||r.abort)return[2,null];if(!(ew(u,A).length>0))return[3,6];if(!(t<(n=ew(u,A)[0]).timestamp))return[3,1];return a=null,[3,5];case 1:if(ew(u,A).shift(),!(t>n.timestamp+(null!=(s=n.duration)?s:0)))return[3,3];return n.close(),[4,ew(u,F).call(u,t,e,r)];case 2:return o=c.sent(),[3,4];case 3:!ew(u,B)&&ew(u,A).length<10&&ew(u,P).call(u,e).catch(function(e){throw ex(u,B,!0),ew(u,L).call(u,t),e}),o=n,c.label=4;case 4:a=o,c.label=5;case 5:return[2,a];case 6:if(!(ew(u,z)||ew(u,T)0))return[3,8];if(performance.now()-r.st>6e3)throw Error("MP4Clip.tick video timeout, ".concat(JSON.stringify(ew(u,R).call(u))));return ex(u,I,ew(u,I)+1),[4,ez(15)];case 7:return c.sent(),[3,12];case 8:if(ew(u,k)>=u.samples.length)return[2,null];c.label=9;case 9:return c.trys.push([9,11,,12]),[4,ew(u,P).call(u,e)];case 10:return c.sent(),[3,12];case 11:throw l=c.sent(),ew(u,L).call(u,t),l;case 12:return[4,ew(u,F).call(u,t,e,r)];case 13:return[2,c.sent()]}})}),function(t,e,r){return a.apply(this,arguments)})),eS(this,z,!1),eS(this,P,(o=(0,t5._)(function(t){var e,r,n,s,a,o,l,c,h,f,d,p,_;return(0,ec._)(this,function(m){switch(m.label){case 0:if(ew(u,z)||t.decodeQueueSize>600||(n=ew(u,k)+1)>u.samples.length)return[2];for(ex(u,z,!0),s=!1;n1e3&&(f=o[0],p=(d=o.at(-1)).offset+d.size-f.offset,ep.Log.warn("Read video samples time cost: ".concat(Math.round(h),"ms, file chunk size: ").concat(p))),"closed"===t.state)return[2];ex(u,U,null!=(_=null==(r=c[0])?void 0:r.duration)?_:0),eq(t,c,{onDecodingError:function(t){if(ew(u,E))throw t;0===ew(u,T)&&(ex(u,E,!0),ep.Log.warn("Downgrade to software decode"),ew(u,L).call(u))}}),ex(u,C,ew(u,C)+c.length),m.label=3;case 3:return ex(u,k,n),ex(u,z,!1),[2]}})}),function(t){return o.apply(this,arguments)})),eS(this,L,function(t){if(ex(l,z,!1),ew(l,A).forEach(function(t){return t.close()}),ex(l,A,[]),null==t||0===t)ex(l,k,0);else for(var e,r,n=0,s=0;s1e5,(null==ew(u,O)||"closed"===ew(u,O).state||e)&&ew(u,Z).call(u),e&&(ex(u,N,t),ex(u,G,function(t,e){for(var r=0;r=n.cts&&tt)break}return 0}(t,u.samples))),ew(u,j).abort=!0,r=t-ew(u,N),ex(u,N,t),ex(u,j,{abort:!1,st:performance.now()}),[4,ew(u,H).call(u,Math.ceil(r*(ew(u,M)/1e6)),ew(u,O),ew(u,j))];case 1:return n=s.sent(),[2,(ex(u,Y,0),n)]}})}),function(t){return a.apply(this,arguments)})),eS(this,N,0),eS(this,G,0),eS(this,W,{frameCnt:0,data:[]}),eS(this,Y,0),eS(this,H,(o=(0,t5._)(function(t){var e,r,n,s=arguments;return(0,ec._)(this,function(a){switch(a.label){case 0:if(e=s.length>1&&void 0!==s[1]?s[1]:null,r=s.length>2?s[2]:void 0,null==e||r.abort||"closed"===e.state||0===t)return[2,[]];if((n=ew(u,W).frameCnt-t)>0)return[2,(n3e3)throw r.abort=!0,Error("MP4Clip.tick audio timeout, ".concat(JSON.stringify(ew(u,X).call(u))));return ex(u,Y,ew(u,Y)+1),[4,ez(15)];case 1:return a.sent(),[3,3];case 2:if(ew(u,G)>=u.samples.length-1)return[2,eK(ew(u,W),ew(u,W).frameCnt)];ew(u,V).call(u,e),a.label=3;case 3:return[2,ew(u,H).call(u,t,e,r)]}})}),function(t){return o.apply(this,arguments)})),eS(this,V,function(t){if(!(t.decodeQueueSize>10)){for(var e=[],r=ew(l,G);r=10))break}ex(l,G,r),t.decode(e.map(function(t){return new EncodedAudioChunk({type:"key",timestamp:t.cts,duration:t.duration,data:t.data})}))}}),eS(this,Z,function(){var t;ex(l,N,0),ex(l,G,0),ex(l,W,{frameCnt:0,data:[]}),null==(t=ew(l,O))||t.close(),ex(l,O,function(t,e,r){var n=0,s=0,a=function(t){if(s+=1,0!==t.length){var n=!0,a=!1,o=void 0;if(1!==e.volume)try{for(var l,u=t[Symbol.iterator]();!(n=(l=u.next()).done);n=!0)for(var c=l.value,h=0;hs&&u.decodeQueueSize>0},get state(){return u.state},get decodeQueueSize(){return u.decodeQueueSize}}}(l.conf,{resampleRate:eR.sampleRate,volume:ew(l,D)},function(t){ew(l,W).data.push(t),ew(l,W).frameCnt+=t[0].length}))}),eS(this,X,function(){var t,e;return{time:ew(l,N),decState:null==(t=ew(l,O))?void 0:t.state,decQSize:null==(e=ew(l,O))?void 0:e.decodeQueueSize,decCusorIdx:ew(l,G),sampleLen:l.samples.length,pcmLen:ew(l,W).frameCnt,clipIdCnt:ej,sleepCnt:ew(l,Y),memInfo:e1()}}),ev(this,"destroy",function(){ex(l,O,null),ew(l,j).abort=!0,ex(l,W,{frameCnt:0,data:[]}),l.localFileReader.close()}),this.localFileReader=e,this.samples=r,this.conf=n,ex(this,D,s.volume),ex(this,M,s.targetSampleRate)};function eK(t,e){for(var r=[new Float32Array(e),new Float32Array(e)],n=0,s=0;se){var u=e-n;r[0].set(o.subarray(0,u),n),r[1].set(l.subarray(0,u),n),t.data[s][0]=o.subarray(u,o.length),t.data[s][1]=l.subarray(u,l.length);break}r[0].set(o,n),r[1].set(l,n),n+=o.length,s++}return t.data=t.data.slice(s),t.frameCnt-=e,r}function eJ(t,e){return eQ.apply(this,arguments)}function eQ(){return(eQ=(0,t5._)(function(t,e){var r,n,s,a,o;return(0,ec._)(this,function(l){switch(l.label){case 0:if(r=t[0],null==(n=t.at(-1)))return[2,[]];if(!((s=n.offset+n.size-r.offset)<3e7))return[3,2];return o=Uint8Array.bind,[4,e.read(s,{at:r.offset})];case 1:return a=new(o.apply(Uint8Array,[void 0,l.sent()])),[2,t.map(function(t){var e=t.offset-r.offset;return new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:a.subarray(e,e+t.size)})})];case 2:var u;return[4,Promise.all(t.map((u=(0,t5._)(function(t){var r,n;return(0,ec._)(this,function(s){switch(s.label){case 0:return r=EncodedVideoChunk.bind,n={type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration},[4,e.read(t.size,{at:t.offset})];case 1:return[2,new(r.apply(EncodedVideoChunk,[void 0,(n.data=s.sent(),n)]))]}})}),function(t){return u.apply(this,arguments)})))];case 3:return[2,l.sent()]}})})).apply(this,arguments)}function eq(t,e,r){var n=0;if("configured"===t.state){for(;n0&&void 0!==arguments[0]&&arguments[0],e=(0,es._)({},r,t?{hardwareAcceleration:"prefer-software"}:{}),s=new VideoDecoder({output:function(t){var e=(u+=1)===l.length;a(t,e),e&&(o.close(),"closed"!==s.state&&s.close())},error:function(t){var r="thumbnails decoder error: ".concat(t.message,", config: ").concat(JSON.stringify(e),", state: ").concat(JSON.stringify({qSize:s.decodeQueueSize,state:s.state,outputCnt:u,inputCnt:l.length}));throw ep.Log.error(r),Error(r)}});return n.addEventListener("abort",function(){o.close(),"closed"!==s.state&&s.close()}),s.configure(e),s}return(0,ec._)(this,function(r){switch(r.label){case 0:return[4,e.createReader()];case 1:return o=r.sent(),[4,eJ(t.filter(function(t){return!t.deleted&&t.is_sync&&t.cts>=s.start&&t.cts<=s.end}),o)];case 2:if(0===(l=r.sent()).length||n.aborted)return[2];return u=0,eq(c(),l,{onDecodingError:function(t){ep.Log.warn("thumbnailsByKeyFrame",t),0===u?eq(c(!0),l,{onDecodingError:function(t){o.close(),ep.Log.error("thumbnailsByKeyFrame retry soft deocde",t)}}):(a(null,!0),o.close())}}),[2]}})})).apply(this,arguments)}function e0(t){var e=0,r=null,n=!0,s=!1,a=void 0;try{for(var o,l=t[Symbol.iterator]();!(n=(o=l.next()).done);n=!0){var u=o.value;if(!u.deleted){if(u.is_sync&&(e+=1),e>=2)break;(null==r||u.cts=t.timestamp&&a<=t.timestamp+(null!=(e=t.duration)?e:0)}))?o:ew(e,Q)[0]).clone(),state:"success"})]}})})()}},{key:"split",value:function(e){var r=this;return(0,t5._)(function(){var n,s,a,o,l,u,c;return(0,ec._)(this,function(h){switch(h.label){case 0:return[4,r.ready];case 1:if(h.sent(),null==ew(r,J))return[3,4];return n=t.bind,[4,createImageBitmap(ew(r,J))];case 2:return s=[new(n.apply(t,[void 0,h.sent()]))],a=t.bind,[4,createImageBitmap(ew(r,J))];case 3:return[2,s.concat([new(a.apply(t,[void 0,h.sent()]))])];case 4:for(l=0,o=-1;lew(r,Q)[l].timestamp)){o=l;break}if(-1===o)throw Error("Not found frame by time");return u=ew(r,Q).slice(0,o).map(function(t){return new VideoFrame(t)}),c=ew(r,Q).slice(o).map(function(t){return new VideoFrame(t,{timestamp:t.timestamp-e})}),[2,[new t(u),new t(c)]]}})})()}},{key:"clone",value:function(){var e=this;return(0,t5._)(function(){var r;return(0,ec._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:if(n.sent(),null!=ew(e,J))return[3,2];return r=ew(e,Q).map(function(t){return t.clone()}),[3,4];case 2:return[4,createImageBitmap(ew(e,J))];case 3:r=n.sent(),n.label=4;case 4:return[2,new t(r)]}})})()}},{key:"destroy",value:function(){var t;ep.Log.info("ImgClip destroy"),null==(t=ew(this,J))||t.close(),ew(this,Q).forEach(function(t){return t.close()})}}]),t}();K=new WeakMap,J=new WeakMap,Q=new WeakMap,q=new WeakSet,s=(0,t5._)(function(t,e){var r,n;return(0,ec._)(this,function(s){switch(s.label){case 0:return r=[this,Q],[4,function(t,e){return eI.apply(this,arguments)}(t,e)];case 1:if(ex.apply(void 0,r.concat([s.sent()])),null==(n=ew(this,Q)[0]))throw Error("No frame available in gif");return ex(this,K,{duration:ew(this,Q).reduce(function(t,e){var r;return t+(null!=(r=e.duration)?r:0)},0),width:n.codedWidth,height:n.codedHeight}),ep.Log.info("ImgClip ready:",ew(this,K)),[2]}})}),$=function(t,e){return s.apply(this,arguments)};var e3=e2,e4=function(){"use strict";function t(e){var r,n=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,t9._)(this,t),eS(this,tn),ev(this,"ready"),eS(this,tt,{duration:0,width:0,height:0}),eS(this,te,new Float32Array),eS(this,tr,new Float32Array),eS(this,ti),ev(this,"tickInterceptor",(r=(0,t5._)(function(t,e){return(0,ec._)(this,function(t){return[2,e]})}),function(t,e){return r.apply(this,arguments)})),eS(this,ta,0),eS(this,to,0),ex(this,ti,(0,es._)({loop:!1,volume:1},s)),this.ready=eU(this,tn,ts).call(this,e).then(function(){return{width:0,height:0,duration:s.loop?1/0:ew(n,tt).duration}})}return(0,et._)(t,[{key:"meta",get:function(){return(0,ea._)((0,es._)({},ew(this,tt)),{sampleRate:eR.sampleRate,chanCount:2})}},{key:"getPCMData",value:function(){return[ew(this,te),ew(this,tr)]}},{key:"tick",value:function(t){var e=this;return(0,t5._)(function(){var r,n,s,a;return(0,ec._)(this,function(o){switch(o.label){case 0:if(!(!ew(e,ti).loop&&t>=ew(e,tt).duration))return[3,2];return[4,e.tickInterceptor(t,{audio:[],state:"done"})];case 1:case 3:case 5:return[2,o.sent()];case 2:if(r=t-ew(e,ta),!(t3e6))return[3,4];return ex(e,ta,t),ex(e,to,Math.ceil(ew(e,ta)/1e6*eR.sampleRate)),[4,e.tickInterceptor(t,{audio:[new Float32Array(0),new Float32Array(0)],state:"success"})];case 4:return ex(e,ta,t),n=Math.ceil(r/1e6*eR.sampleRate),s=ew(e,to)+n,a=ew(e,ti).loop?[eP(ew(e,te),ew(e,to),s),eP(ew(e,tr),ew(e,to),s)]:[ew(e,te).slice(ew(e,to),s),ew(e,tr).slice(ew(e,to),s)],ex(e,to,s),[4,e.tickInterceptor(t,{audio:a,state:"success"})]}})})()}},{key:"split",value:function(e){var r=this;return(0,t5._)(function(){var n;return(0,ec._)(this,function(s){switch(s.label){case 0:return[4,r.ready];case 1:return s.sent(),n=Math.ceil(e/1e6*eR.sampleRate),[2,[new t(r.getPCMData().map(function(t){return t.slice(0,n)}),ew(r,ti)),new t(r.getPCMData().map(function(t){return t.slice(n)}),ew(r,ti))]]}})})()}},{key:"clone",value:function(){var e=this;return(0,t5._)(function(){var r;return(0,ec._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:return n.sent(),[4,(r=new t(e.getPCMData(),ew(e,ti))).ready];case 2:return[2,(n.sent(),r)]}})})()}},{key:"destroy",value:function(){ex(this,te,new Float32Array(0)),ex(this,tr,new Float32Array(0)),ep.Log.info("---- audioclip destroy ----")}}]),t}();tt=new WeakMap,te=new WeakMap,tr=new WeakMap,ti=new WeakMap,tn=new WeakSet,a=(0,t5._)(function(t){var e,r,n,s,a,o,l,u,c,h,f,d;return(0,ec._)(this,function(p){switch(p.label){case 0:if(null==e4.ctx&&(e4.ctx=new AudioContext({sampleRate:eR.sampleRate})),e=performance.now(),!(t instanceof ReadableStream))return[3,2];return[4,function(t,e){return e8.apply(this,arguments)}(t,e4.ctx)];case 1:return n=p.sent(),[3,3];case 2:n=t,p.label=3;case 3:if(r=n,ep.Log.info("Audio clip decoded complete:",performance.now()-e),s=ew(this,ti).volume,a=!0,o=!1,l=void 0,1!==s)try{for(u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0)for(f=0,h=c.value;f0}).map(function(t){return{lineStr:t,match:t.match(/(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/)}}).filter(function(t,e,r){var n,s=t.lineStr;return!(/^\d+$/.test(s)&&(null==(n=r[e+1])?void 0:n.match)!=null)}).reduce(function(t,e){var r=e.lineStr,n=e.match;if(null==n){var s=t.at(-1);if(null==s)return t;s.text+=0===s.text.length?r:"\n".concat(r)}else t.push({start:re(n[1]),end:re(n[2]),text:""});return t},[]).map(function(t){return{start:1e6*t.start,end:1e6*t.end,text:t.text}})),0===ew(this,tf).length)throw Error("No subtitles content");ex(this,tp,Object.assign(ew(this,tp),r)),ex(this,tv,null==r.textBgColor?0:(null!=(s=r.fontSize)?s:50)*.2);var n,s,a,o=ew(this,tp),l=o.fontSize,u=o.fontFamily,c=o.videoWidth,h=o.videoHeight,f=o.letterSpacing;ex(this,tg,l+2*ew(this,tv)),ex(this,t_,new OffscreenCanvas(c,h)),ex(this,tm,ew(this,t_).getContext("2d")),ew(this,tm).font="".concat(l,"px ").concat(u),ew(this,tm).textAlign="center",ew(this,tm).textBaseline="top",ew(this,tm).letterSpacing=null!=f?f:"0px",ex(this,td,{width:c,height:h,duration:null!=(a=null==(n=ew(this,tf).at(-1))?void 0:n.end)?a:0}),this.ready=Promise.resolve(this.meta)}return(0,et._)(t,[{key:"meta",get:function(){return(0,es._)({},ew(this,td))}},{key:"tick",value:function(t){var e=this;return(0,t5._)(function(){var r,n,s,a,o,l,u,c;return(0,ec._)(this,function(h){if(null!=ew(e,ty)&&t>=ew(e,ty).timestamp&&t<=ew(e,ty).timestamp+(null!=(s=ew(e,ty).duration)?s:0))return[2,{video:ew(e,ty).clone(),state:"success"}];for(a=0;a(l=null!=(o=ew(e,tf)[a])?o:ew(e,tf).at(-1)).end?[2,{state:"done"}]:tew(r,tf)[s].start)){n=s;break}if(-1===n)throw Error("Not found subtitle by time");return o=(a=ew(r,tf).slice(0,n).map(function(t){return(0,es._)({},t)})).at(-1),l=null,null!=o&&o.end>e&&(l={start:0,end:o.end-e,text:o.text},o.end=e),u=ew(r,tf).slice(n).map(function(t){return(0,ea._)((0,es._)({},t),{start:t.start-e,end:t.end-e})}),[2,(null!=l&&u.unshift(l),[new t(a,ew(r,tp)),new t(u,ew(r,tp))])]}})})()}},{key:"clone",value:function(){var e=this;return(0,t5._)(function(){return(0,ec._)(this,function(r){return[2,new t(ew(e,tf).slice(0),ew(e,tp))]})})()}},{key:"destroy",value:function(){var t;null==(t=ew(this,ty))||t.close()}}]),t}();tf=new WeakMap,td=new WeakMap,tp=new WeakMap,t_=new WeakMap,tm=new WeakMap,ty=new WeakMap,tg=new WeakMap,tv=new WeakMap,tb=new WeakSet,tw=function(t){var e=t.split("\n").reverse().map(function(t){return t.trim()}),r=ew(this,t_),n=r.width,s=r.height,a=ew(this,tp),o=a.color,l=a.fontSize,u=a.textBgColor,c=a.textShadow,h=a.strokeStyle,f=a.lineWidth,d=a.lineCap,p=a.lineJoin,_=a.bottomOffset,m=ew(this,tm);m.clearRect(0,0,n,s),m.globalAlpha=.6;var y=_,g=!0,v=!1,b=void 0;try{for(var w,S=e[Symbol.iterator]();!(g=(w=S.next()).done);g=!0){var x=w.value,U=m.measureText(x),E=n/2;null!=u&&(m.shadowOffsetX=0,m.shadowOffsetY=0,m.shadowBlur=0,m.fillStyle=u,m.globalAlpha=.5,m.fillRect(E-U.actualBoundingBoxLeft-ew(this,tv),s-y-ew(this,tg),U.width+2*ew(this,tv),ew(this,tg))),m.shadowColor=c.color,m.shadowOffsetX=c.offsetX,m.shadowOffsetY=c.offsetY,m.shadowBlur=c.blur,m.globalAlpha=1,null!=h&&(m.lineWidth=null!=f?f:l/6,null!=d&&(m.lineCap=d),null!=p&&(m.lineJoin=p),m.strokeStyle=h,m.strokeText(x,E,s-y-ew(this,tg)+ew(this,tv))),m.fillStyle=o,m.fillText(x,E,s-y-ew(this,tg)+ew(this,tv)),y+=ew(this,tg)+.2*l}}catch(t){v=!0,b=t}finally{try{g||null==S.return||S.return()}finally{if(v)throw b}}};var rt=e9;function re(t){var e=t.match(/(\d{2}):(\d{2}):(\d{2}),(\d{3})/);if(null==e)throw Error("time format error: ".concat(t));return 3600*Number(e[1])+60*Number(e[2])+Number(e[3])+Number(e[4])/1e3}var rr=function t(){"use strict";(0,t9._)(this,t);var e,r=this;ev(this,"readable"),ev(this,"writable"),eS(this,tS,0);var n=ed.default.createFile(),s=!1;this.readable=new ReadableStream({start:function(t){n.onReady=function(e){var r,s,a=null==(r=e.videoTracks[0])?void 0:r.id;null!=a&&n.setExtractionOptions(a,"video",{nbSamples:100});var o=null==(s=e.audioTracks[0])?void 0:s.id;null!=o&&n.setExtractionOptions(o,"audio",{nbSamples:100}),t.enqueue({chunkType:"ready",data:{info:e,file:n}}),n.start()};var e={};n.onSamples=function(r,s,a){var o;t.enqueue({chunkType:"samples",data:{id:r,type:s,samples:a.map(function(t){return(0,es._)({},t)})}}),e[r]=(null!=(o=e[r])?o:0)+a.length,n.releaseUsedSamples(r,e[r])},n.onFlush=function(){t.close()}},cancel:function(){n.stop(),s=!0}},{highWaterMark:50}),this.writable=new WritableStream({write:(e=(0,t5._)(function(t){var e;return(0,ec._)(this,function(a){return s?r.writable.abort():((e=t.buffer).fileStart=ew(r,tS),ex(r,tS,ew(r,tS)+e.byteLength),n.appendBuffer(e)),[2]})}),function(t){return e.apply(this,arguments)}),close:function(){var t;n.flush(),n.stop(),null==(t=n.onFlush)||t.call(n)}})};function ri(t){return rn.apply(this,arguments)}function rn(){return(rn=(0,t5._)(function(t){var e,r,n;return(0,ec._)(this,function(s){switch(s.label){case 0:return r=function(t){var e=0,r=t.boxes,n=[],s=0;function a(){return o.apply(this,arguments)}function o(){return(o=(0,t5._)(function(){var a,o;return(0,ec._)(this,function(o){switch(o.label){case 0:if(a=_(r,e),e=r.length,n.forEach(function(e){var r=e.track,n=e.id,a=r.samples.at(-1);null!=a&&(s=Math.max(s,a.cts+a.duration)),t.releaseUsedSamples(n,r.samples.length),r.samples=[]}),t.mdats=[],t.moofs=[],null==a)return[3,2];return[4,null==f?void 0:f.write(a)];case 1:o.sent(),o.label=2;case 2:return[2]}})})).apply(this,arguments)}var l=[];function u(){if(l.length>0)return!0;var s=r.findIndex(function(t){return"moov"===t.type});if(-1===s)return!1;if(l=r.slice(0,s+1),e=s+1,0===n.length)for(var a=1;;a+=1){var o=t.getTrackById(a);if(null==o)break;n.push({track:o,id:a})}return!0}var c=0,h=(0,em.tmpfile)(),f=null,d=(0,t5._)(function(){return(0,ec._)(this,function(t){switch(t.label){case 0:return[4,h.createWriter()];case 1:return f=t.sent(),c=self.setInterval(function(){u()&&a()},100),[2]}})})(),p=!1;return(0,t5._)(function(){var e,r,n;return(0,ec._)(this,function(o){switch(o.label){case 0:if(p)throw Error("File exported");return p=!0,[4,d];case 1:if(o.sent(),clearInterval(c),!u()||null==f)return[2,null];return t.flush(),[4,a()];case 2:return o.sent(),[4,null==f?void 0:f.close()];case 3:if(o.sent(),null==(e=l.find(function(t){return"moov"===t.type})))return[2,null];return e.mvhd.duration=s,r=(0,em.tmpfile)(),n=_(l,0),[4,(0,em.write)(r,n)];case 4:return o.sent(),[4,(0,em.write)(r,h,{overwrite:!1})];case 5:return o.sent(),[4,r.stream()];case 6:return[2,o.sent()]}})});function _(t,e){if(e>=t.length)return null;var r=new ed.default.DataStream;r.endianness=ed.default.DataStream.BIG_ENDIAN;for(var n=e;nu+h||gc+f)}}]),t}();tx=new WeakMap,tU=new WeakMap,tE=new WeakMap,tk=new WeakMap,tA=new WeakMap,tT=new WeakMap,tC=new WeakSet,tI=function(t,e){var r=this[t]!==e;switch(t){case"x":ex(this,tU,e);break;case"y":ex(this,tE,e);break;case"w":ex(this,tk,e);break;case"h":ex(this,tA,e);break;case"angle":ex(this,tT,e)}r&&ew(this,tx).emit("propsChange",(0,ee._)({},t,e))},tB=new WeakMap;var rp=rd,r_=function(){"use strict";function t(){var e=this;(0,t9._)(this,t),ev(this,"rect",new rp),eS(this,tF,{offset:0,duration:0,playbackRate:1}),eS(this,tz,new(0,ep.EventTool)),ev(this,"on",ew(this,tz).on),eS(this,tP,0),ev(this,"opacity",1),ev(this,"flip",null),eS(this,tL,null),eS(this,tR,null),ev(this,"ready",Promise.resolve()),this.rect.on("propsChange",function(t){ew(e,tz).emit("propsChange",{rect:t})})}return(0,et._)(t,[{key:"time",get:function(){return ew(this,tF)},set:function(t){Object.assign(ew(this,tF),t)}},{key:"zIndex",get:function(){return ew(this,tP)},set:function(t){var e=ew(this,tP)!==t;ex(this,tP,t),e&&ew(this,tz).emit("propsChange",{zIndex:t})}},{key:"_render",value:function(t){var e=this.rect,r=e.center,n=e.angle;t.setTransform("horizontal"===this.flip?-1:1,0,0,"vertical"===this.flip?-1:1,r.x,r.y),t.rotate((null==this.flip?1:-1)*n),t.globalAlpha=this.opacity}},{key:"setAnimation",value:function(t,e){var r,n;ex(this,tL,Object.entries(t).map(function(t){var e,r=(0,eo._)(t,2),n=r[0],s=r[1],a=null!=(e=({from:0,to:100})[n])?e:Number(n.slice(0,-1));if(isNaN(a)||a>100||a<0)throw Error("keyFrame must between 0~100");return[a/100,s]})),ex(this,tR,Object.assign({},ew(this,tR),{duration:e.duration,delay:null!=(r=e.delay)?r:0,iterCount:null!=(n=e.iterCount)?n:1/0}))}},{key:"animate",value:function(t){if(null!=ew(this,tL)&&null!=ew(this,tR)&&!(t=r.iterCount)return{};var s=n%r.duration,a=n===r.duration?1:s/r.duration,o=e.findIndex(function(t){return t[0]>=a});if(-1===o)return{};var l=e[o-1],u=e[o],c=u[1];if(null==l)return c;var h=l[1],f={},d=(a-l[0])/(u[0]-l[0]);for(var p in c)null!=h[p]&&(f[p]=(c[p]-h[p])*d+h[p]);return f}(t,ew(this,tL),ew(this,tR));for(var r in e)switch(r){case"opacity":this.opacity=e[r];break;case"x":case"y":case"w":case"h":case"angle":this.rect[r]=e[r]}}}},{key:"copyStateTo",value:function(t){ex(t,tL,ew(this,tL)),ex(t,tR,ew(this,tR)),t.zIndex=this.zIndex,t.opacity=this.opacity,t.flip=this.flip,t.rect=this.rect.clone(),t.time=(0,es._)({},this.time)}},{key:"destroy",value:function(){ew(this,tz).destroy()}}]),t}();tF=new WeakMap,tz=new WeakMap,tP=new WeakMap,tL=new WeakMap,tR=new WeakMap;var rm=function(t){"use strict";function e(t){var r;return(0,t9._)(this,e),eS(r=(0,t7._)(this,e),tD),eS(r,tM,null),eS(r,tO,!1),ex(r,tD,t),r.ready=t.ready.then(function(t){var e=t.width,n=t.height,s=t.duration;r.rect.w=0===r.rect.w?e:r.rect.w,r.rect.h=0===r.rect.h?n:r.rect.h,r.time.duration=0===r.time.duration?s:r.time.duration}),r}return(0,en._)(e,t),(0,et._)(e,[{key:"offscreenRender",value:function(t,r){var n=this,s=this;return(0,t5._)(function(){var a,o,l,u,c,h,f,d,p,_,m;return(0,ec._)(this,function(y){switch(y.label){case 0:return o=r*s.time.playbackRate,s.animate(o),(0,er._)((0,ei._)(e.prototype),"_render",n).call(s,t),u=(l=s.rect).w,c=l.h,[4,ew(s,tD).tick(o)];case 1:if(f=(h=y.sent()).video,d=h.audio,p=h.state,_=null!=d?d:[],null!=d&&1!==s.time.playbackRate&&(_=d.map(function(t){return eL(t,s.time.playbackRate)})),"done"===p)return[2,{audio:_,done:!0}];return[2,(null!=(m=null!=f?f:ew(s,tM))&&t.drawImage(m,-u/2,-c/2,u,c),null!=f&&(null==(a=ew(s,tM))||a.close(),ex(s,tM,f)),{audio:_,done:!1})]}})})()}},{key:"clone",value:function(){var t=this;return(0,t5._)(function(){var r,n;return(0,ec._)(this,function(s){switch(s.label){case 0:return n=e.bind,[4,ew(t,tD).clone()];case 1:return[4,(r=new(n.apply(e,[void 0,s.sent()]))).ready];case 2:return[2,(s.sent(),t.copyStateTo(r),r)]}})})()}},{key:"destroy",value:function(){var t;ew(this,tO)||(ex(this,tO,!0),ep.Log.info("OffscreenSprite destroy"),(0,er._)((0,ei._)(e.prototype),"destroy",this).call(this),null==(t=ew(this,tM))||t.close(),ex(this,tM,null),ew(this,tD).destroy())}}]),e}(r_);tD=new WeakMap,tM=new WeakMap,tO=new WeakMap;var ry=rm,rg=function(t){"use strict";function e(t){var r;return(0,t9._)(this,e),eS(r=(0,t7._)(this,e),tY),eS(r,tj),ev(r,"visible",!0),eS(r,tN,null),eS(r,tG,[]),eS(r,tW,!1),eS(r,tV,-1),eS(r,tZ,!1),ex(r,tj,t),r.ready=t.ready.then(function(t){var e=t.width,n=t.height,s=t.duration;r.rect.w=0===r.rect.w?e:r.rect.w,r.rect.h=0===r.rect.h?n:r.rect.h,r.time.duration=0===r.time.duration?s:r.time.duration}),r}return(0,en._)(e,t),(0,et._)(e,[{key:"getClip",value:function(){return ew(this,tj)}},{key:"preFrame",value:function(t){eU(this,tY,tH).call(this,t)}},{key:"render",value:function(t,r){this.animate(r),(0,er._)((0,ei._)(e.prototype),"_render",this).call(this,t);var n=this.rect,s=n.w,a=n.h;ew(this,tV)!==r&&eU(this,tY,tH).call(this,r),ex(this,tV,r);var o=ew(this,tG);ex(this,tG,[]);var l=ew(this,tN);return null!=l&&t.drawImage(l,-s/2,-a/2,s,a),{audio:o}}},{key:"copyStateTo",value:function(t){(0,er._)((0,ei._)(e.prototype),"copyStateTo",this).call(this,t),t instanceof e&&(t.visible=this.visible)}},{key:"destroy",value:function(){var t;ew(this,tZ)||(ex(this,tZ,!0),ep.Log.info("VisibleSprite destroy"),(0,er._)((0,ei._)(e.prototype),"destroy",this).call(this),null==(t=ew(this,tN))||t.close(),ex(this,tN,null),ew(this,tj).destroy())}}]),e}(r_);tj=new WeakMap,tN=new WeakMap,tG=new WeakMap,tW=new WeakMap,tY=new WeakSet,tH=function(t){var e=this;ew(this,tW)||(ex(this,tW,!0),ew(this,tj).tick(t*this.time.playbackRate).then(function(t){var r,n=t.video,s=t.audio;null!=n&&(null==(r=ew(e,tN))||r.close(),ex(e,tN,null!=n?n:null)),ex(e,tG,null!=s?s:[]),null!=s&&1!==e.time.playbackRate&&ex(e,tG,s.map(function(t){return eL(t,e.time.playbackRate)}))}).finally(function(){ex(e,tW,!1)}))},tV=new WeakMap,tZ=new WeakMap;var rv=rg,rb=0;function rw(t){return rS.apply(this,arguments)}function rS(){return(rS=(0,t5._)(function(t){var e;return(0,ec._)(this,function(e){switch(e.label){case 0:if(!(t()>50))return[3,3];return[4,ez(15)];case 1:return e.sent(),[4,rw(t)];case 2:e.sent(),e.label=3;case 3:return[2]}})})).apply(this,arguments)}var rx=function(){"use strict";function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,t9._)(this,t),eS(this,t3),eS(this,tX,ep.Log.create("id:".concat(rb++,","))),eS(this,tK,!1),eS(this,tJ,[]),eS(this,tQ),eS(this,tq),eS(this,t$,null),eS(this,t0),eS(this,t1),eS(this,t2,new(0,ep.EventTool)),ev(this,"on",ew(this,t2).on);var r=e.width,n=void 0===r?0:r,s=e.height,a=void 0===s?0:s;ex(this,tQ,new OffscreenCanvas(n,a));var o=ew(this,tQ).getContext("2d",{alpha:!1});if(null==o)throw Error("Can not create 2d offscreen context");ex(this,tq,o),ex(this,t0,Object.assign({bgColor:"#000",width:0,height:0,videoCodec:"avc1.42E032",audio:!0,bitrate:5e6,fps:30,metaDataTags:null},e)),ex(this,t1,n*a>0)}return(0,et._)(t,[{key:"addSprite",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,t5._)(function(){var n,s,a;return(0,ec._)(this,function(o){switch(o.label){case 0:var l,u;return n={rect:(l=["x","y","w","h"],u=t.rect,l.reduce(function(t,e){return t[e]=u[e],t},{})),time:(0,es._)({},t.time),zIndex:t.zIndex},ew(r,tX).info("Combinator add sprite",n),[4,t.clone()];case 1:return s=o.sent(),ew(r,tX).info("Combinator add sprite ready"),ew(r,tJ).push(Object.assign(s,{main:null!=(a=e.main)&&a,expired:!1})),ew(r,tJ).sort(function(t,e){return t.zIndex-e.zIndex}),[2]}})})()}},{key:"output",value:function(){var t,e=this;if(0===ew(this,tJ).length)throw Error("No sprite added");var r=ew(this,tJ).find(function(t){return t.main}),n=null!=r?r.time.offset+r.time.duration:(t=Math).max.apply(t,(0,el._)(ew(this,tJ).map(function(t){return t.time.offset+t.time.duration})));if(n===1/0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of ImgClip, AudioCli");-1===n&&ew(this,tX).warn("Unable to determine the end time, process value don't update"),ew(this,tX).info("start combinate video, maxTime:".concat(n));var s=eU(this,t3,t4).call(this,n),a=performance.now(),o=this,l=eU(this,t3,t6).call(this,s,n,{onProgress:function(t){ew(e,tX).debug("OutputProgress:",t),ew(e,t2).emit("OutputProgress",t)},onEnded:(0,t5._)(function(){return(0,ec._)(this,function(t){switch(t.label){case 0:return[4,s.flush()];case 1:return t.sent(),ew(o,tX).info("===== output ended =====, cost:",performance.now()-a),ew(o,t2).emit("OutputProgress",1),o.destroy(),[2]}})}),onError:function(t){ew(e,t2).emit("error",t),h(t),e.destroy()}});ex(this,t$,function(){l(),s.close(),h()});var u=(0,ep.file2stream)(s.mp4file,500,this.destroy),c=u.stream,h=u.stop;return c}},{key:"destroy",value:function(){var t;ew(this,tK)||(ex(this,tK,!0),null==(t=ew(this,t$))||t.call(this),ew(this,t2).destroy())}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,t5._)(function(){var e,r,n,s,a,o,l,u;return(0,ec._)(this,function(c){switch(c.label){case 0:if(!(u=null!=self.OffscreenCanvas&&null!=self.VideoEncoder&&null!=self.VideoDecoder&&null!=self.VideoFrame&&null!=self.AudioEncoder&&null!=self.AudioDecoder&&null!=self.AudioData))return[3,2];return[4,self.VideoEncoder.isConfigSupported({codec:null!=(e=t.videoCodec)?e:"avc1.42E032",width:null!=(r=t.width)?r:1920,height:null!=(n=t.height)?n:1080,bitrate:null!=(s=t.bitrate)?s:7e6})];case 1:u=null!=(a=c.sent().supported)&&a,c.label=2;case 2:if(!(l=u))return[3,4];return[4,self.AudioEncoder.isConfigSupported({codec:eR.codec,sampleRate:eR.sampleRate,numberOfChannels:eR.channelCount})];case 3:l=c.sent().supported,c.label=4;case 4:return[2,null!=(o=l)&&o]}})})()}}]),t}();tX=new WeakMap,tK=new WeakMap,tJ=new WeakMap,tQ=new WeakMap,tq=new WeakMap,t$=new WeakMap,t0=new WeakMap,t1=new WeakMap,t2=new WeakMap,t3=new WeakSet,t4=function(t){var e=ew(this,t0),r=e.fps,n=e.width,s=e.height,a=e.videoCodec,o=e.bitrate,l=e.audio,u=e.metaDataTags;return(0,ep.recodemux)({video:ew(this,t1)?{width:n,height:s,expectFPS:r,codec:a,bitrate:o,__unsafe_hardwareAcceleration__:ew(this,t0).__unsafe_hardwareAcceleration__}:null,audio:!1===l?null:{codec:"aac",sampleRate:eR.sampleRate,channelCount:eR.channelCount},duration:t,metaDataTags:u})},t6=function(t,e,r){var n=this,s=r.onProgress,a=r.onEnded,o=r.onError,l=0,u={aborted:!1},c=null,h=this;(0,t5._)(function(){var r,n,s,o,f,p,_,m,y,g,v;return(0,ec._)(this,function(b){switch(b.label){case 0:var w,S,x,U,E,k,A,T,C,I,B,F,z,P,L,R,D,M,O,j,N,G,W,Y,H,V,Z,X,K;n=(r=ew(h,t0)).fps,s=r.bgColor,o=r.audio,f=Math.round(1e6/n),x=(w={ctx:p=ew(h,tq),bgColor:s,sprites:ew(h,tJ),aborter:u}).ctx,U=w.bgColor,E=w.sprites,k=w.aborter,T=(A=x.canvas).width,C=A.height,S=(0,t5._)(function(t){var e,r,n,s,a,o,l,u,c,h,f,d;return(0,ec._)(this,function(p){switch(p.label){case 0:x.fillStyle=U,x.fillRect(0,0,T,C),e=[],r=!1,n=!0,s=!1,a=void 0,p.label=1;case 1:p.trys.push([1,6,7,8]),o=E[Symbol.iterator](),p.label=2;case 2:if((n=(l=o.next()).done)||(u=l.value,k.aborted))return[3,5];if(t0&&t>u.time.offset+u.time.duration||f)&&(u.main&&(r=!0),u.destroy(),u.expired=!0),p.label=4;case 4:return n=!0,[3,2];case 5:return[3,8];case 6:return d=p.sent(),s=!0,a=d,[3,8];case 7:try{n||null==o.return||o.return()}finally{if(s)throw a}return[7];case 8:return[2,{audios:e,mainSprDone:r}]}})}),_=function(t){return S.apply(this,arguments)},O=(I={remux:t,ctx:p,cvs:ew(h,tQ),outputAudio:o,hasVideoTrack:ew(h,t1),timeSlice:f,fps:n}).ctx,j=I.cvs,N=I.outputAudio,G=I.remux,W=I.hasVideoTrack,Y=I.timeSlice,H=j.width,V=j.height,Z=0,X=Math.floor(3*I.fps),K=(B=1024,z=new Float32Array(3*(F=1024*eR.channelCount)),P=0,L=0,R=B/eR.sampleRate*1e6,D=new Float32Array(F),M=function(t){for(var e=0,r=Math.floor(P/F),n=[],s=0;sR;)n.push(new AudioData({timestamp:L,numberOfChannels:eR.channelCount,numberOfFrames:B,sampleRate:eR.sampleRate,format:"f32",data:D})),L+=R;return n},function(t,e){for(var r=(l=Math).max.apply(l,(0,el._)(e.map(function(t){var e,r;return null!=(r=null==(e=t[0])?void 0:e.length)?r:0}))),n=0;ne||0===ew(h,tJ).length))return[3,3];return d(),[4,a()];case 2:case 5:return b.sent(),[2];case 3:return l=y/e,[4,_(y)];case 4:if(v=(g=b.sent()).audios,!g.mainSprDone)return[3,6];return d(),[4,a()];case 6:if(u.aborted)return[2];return m(y,v),y+=f,[4,rw(t.getEncodeQueueSize)];case 7:b.sent(),b.label=8;case 8:return[3,1];case 9:return[2]}})})().catch(function(t){c=t,ew(n,tX).error(t),d(),o(t)});var f=setInterval(function(){s(l)},500),d=function(){u.aborted||(u.aborted=!0,clearInterval(f),ew(n,tJ).forEach(function(t){return t.destroy()}))};return d}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_define_property":"3NGsL","@swc/helpers/_/_get":"hMhPd","@swc/helpers/_/_get_prototype_of":"dAKgy","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","@swc/helpers/_/_ts_values":"1Y0br","@webav/mp4box.js":"4DT2A","@webav/internal-utils":"iUw0l","wave-resampler":"7uqUv","opfs-tools":"15Czp","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jZCCG:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"_",function(){return u});var a=t("./_get_prototype_of.js"),o=t("./_is_native_reflect_construct.js"),l=t("./_possible_constructor_return.js");function u(t,e,r){return e=(0,a._)(e),(0,l._)(t,(0,o._)()?Reflect.construct(e,r||[],(0,a._)(t).constructor):e.apply(t,r))}},{"./_get_prototype_of.js":"dAKgy","./_is_native_reflect_construct.js":"7fioR","./_possible_constructor_return.js":"iVdhB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dAKgy:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7fioR":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iVdhB:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"_",function(){return l});var a=t("./_assert_this_initialized.js"),o=t("./_type_of.js");function l(t,e){return e&&("object"===(0,o._)(e)||"function"==typeof e)?e:(0,a._)(t)}},{"./_assert_this_initialized.js":"jgeid","./_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9iJMm":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=Array(e);r=a&&console.debug("["+l.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)},log:function(t,e){this.debug(t.msg)},info:function(t,e){2>=a&&console.info("["+l.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)},warn:function(t,e){3>=a&&console.warn("["+l.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)},error:function(t,e){4>=a&&console.error("["+l.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)}});l.getDurationString=function(t,e){function r(t,e){for(var r=(""+t).split(".");r[0].length0))return"(empty)";for(var r="",n=0;n0&&(r+=","),r+="["+l.getDurationString(t.start(n))+","+l.getDurationString(t.end(n))+"]";return r},r.Log=l;var u=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0};u.prototype.getPosition=function(){return this.position},u.prototype.getEndPosition=function(){return this.buffer.byteLength},u.prototype.getLength=function(){return this.buffer.byteLength},u.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},u.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},u.prototype.readAnyInt=function(t,e){var r=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:r=e?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=e?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16|this.dataview.getUint8(this.position+1)<<8|this.dataview.getUint8(this.position+2);break;case 4:r=e?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32|this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,r}throw"Not enough bytes in buffer"},u.prototype.readUint8=function(){return this.readAnyInt(1,!1)},u.prototype.readUint16=function(){return this.readAnyInt(2,!1)},u.prototype.readUint24=function(){return this.readAnyInt(3,!1)},u.prototype.readUint32=function(){return this.readAnyInt(4,!1)},u.prototype.readUint64=function(){return this.readAnyInt(8,!1)},u.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",r=0;rthis._byteLength&&(this._byteLength=e);return}for(r<1&&(r=1);e>r;)r*=2;var n=new ArrayBuffer(r),s=new Uint8Array(this._buffer);new Uint8Array(n,0,s.length).set(s),this.buffer=n,this._byteLength=e}},c.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},c.BIG_ENDIAN=!1,c.LITTLE_ENDIAN=!0,c.prototype._byteLength=0,Object.defineProperty(c.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(c.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(c.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(c.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),c.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},c.prototype.isEof=function(){return this.position>=this._byteLength},c.prototype.mapUint8Array=function(t){this._realloc(+t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=+t,e},c.prototype.readInt32Array=function(t,e){var r=new Int32Array(t=null==t?this.byteLength-this.position/4:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readInt16Array=function(t,e){var r=new Int16Array(t=null==t?this.byteLength-this.position/2:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readInt8Array=function(t){var e=new Int8Array(t=null==t?this.byteLength-this.position:t);return c.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},c.prototype.readUint32Array=function(t,e){var r=new Uint32Array(t=null==t?this.byteLength-this.position/4:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readUint16Array=function(t,e){var r=new Uint16Array(t=null==t?this.byteLength-this.position/2:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readUint8Array=function(t){var e=new Uint8Array(t=null==t?this.byteLength-this.position:t);return c.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},c.prototype.readFloat64Array=function(t,e){var r=new Float64Array(t=null==t?this.byteLength-this.position/8:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readFloat32Array=function(t,e){var r=new Float32Array(t=null==t?this.byteLength-this.position/4:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null==t?this.endianness:t);return this.position+=4,e},c.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null==t?this.endianness:t);return this.position+=2,e},c.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},c.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null==t?this.endianness:t);return this.position+=4,e},c.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null==t?this.endianness:t);return this.position+=2,e},c.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},c.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null==t?this.endianness:t);return this.position+=4,e},c.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null==t?this.endianness:t);return this.position+=8,e},c.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,c.memcpy=function(t,e,r,n,s){var a=new Uint8Array(t,e,s),o=new Uint8Array(r,n,s);a.set(o)},c.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},c.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},c.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;rs;n--,s++){var a=e[s];e[s]=e[n],e[n]=a}return t},c.prototype.failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=[],r=0;r>16),this.writeUint8((65280&t)>>8),this.writeUint8(255&t)},c.prototype.adjustUint32=function(t,e){var r=this.position;this.seek(t),this.writeUint32(e),this.seek(r)},c.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},c.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},c.prototype.mapInt8Array=function(t){this._realloc(+t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=+t,e},c.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},c.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},c.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=8*t,r},c.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r};var h=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)};h.prototype=new c(new ArrayBuffer,0,c.BIG_ENDIAN),h.prototype.initialized=function(){var t;return!!(this.bufferIndex>-1)||(this.buffers.length>0?0===(t=this.buffers[0]).fileStart?(this.buffer=t,this.bufferIndex=0,l.debug("MultiBufferStream","Stream ready for parsing"),!0):(l.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(l.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(t,e){l.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r.buffer},h.prototype.reduceBuffer=function(t,e,r){var n;return(n=new Uint8Array(r)).set(new Uint8Array(t,e,r)),n.buffer.fileStart=t.fileStart+e,n.buffer.usedBytes=0,n.buffer},h.prototype.insertBuffer=function(t){for(var e=!0,r=0;rn.byteLength){this.buffers.splice(r,1),r--;continue}else l.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring");else t.fileStart+t.byteLength<=n.fileStart||(t=this.reduceBuffer(t,0,n.fileStart-t.fileStart)),l.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(r,0,t),0===r&&(this.buffer=t);e=!1;break}if(t.fileStart0)t=this.reduceBuffer(t,s,a);else{e=!1;break}}}e&&(l.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),0===r&&(this.buffer=t))},h.prototype.logBufferLevel=function(t){var e,r,n,s,a,o=[],u="";for(e=0,n=0,s=0;e0&&(u+=a.end-1+"]"),(t?l.info:l.debug)("MultiBufferStream",0===this.buffers.length?"No more buffer in memory":""+this.buffers.length+" stored buffer(s) ("+n+"/"+s+" bytes), continuous ranges: "+u)},h.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0},h.prototype.findPosition=function(t,e,r){var n,s=null,a=-1;for(n=!0===t?0:this.bufferIndex;n=e?(l.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1},h.prototype.findEndContiguousBuf=function(t){var e,r,n,s=void 0!==t?t:this.bufferIndex;if(r=this.buffers[s],this.buffers.length>s+1)for(e=s+1;e>3;return 31===n&&r.data.length>=2&&(n=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),n},r.DecoderConfigDescriptor=function(t){r.Descriptor.call(this,4,t)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.upStream=(this.streamType>>1&1)!=0,this.streamType=this.streamType>>>2,this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)},r.DecoderSpecificInfo=function(t){r.Descriptor.call(this,5,t)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(t){r.Descriptor.call(this,6,t)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};r.MPEG4DescriptorParser=f;var d={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){d.FullBox.prototype=new d.Box,d.ContainerBox.prototype=new d.Box,d.SampleEntry.prototype=new d.Box,d.TrackGroupTypeBox.prototype=new d.FullBox,d.BASIC_BOXES.forEach(function(t){d.createBoxCtor(t)}),d.FULL_BOXES.forEach(function(t){d.createFullBoxCtor(t)}),d.CONTAINER_BOXES.forEach(function(t){d.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,r){this.type=t,this.size=e,this.uuid=r},FullBox:function(t,e,r){d.Box.call(this,t,e,r),this.flags=0,this.version=0},ContainerBox:function(t,e,r){d.Box.call(this,t,e,r),this.boxes=[]},SampleEntry:function(t,e,r,n){d.ContainerBox.call(this,t,e),this.hdr_size=r,this.start=n},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){d.FullBox.call(this,t,e)},createBoxCtor:function(t,e){d.boxCodes.push(t),d[t+"Box"]=function(e){d.Box.call(this,t,e)},d[t+"Box"].prototype=new d.Box,e&&(d[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){d[t+"Box"]=function(e){d.FullBox.call(this,t,e)},d[t+"Box"].prototype=new d.FullBox,d[t+"Box"].prototype.parse=function(t){this.parseFullHeader(t),e&&e.call(this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,r=0;rr?(l.error("BoxParser","Box of type '"+h+"' has a size "+c+" greater than its container size "+r),{code:d.ERR_NOT_ENOUGH_DATA,type:h,size:c,hdr_size:u,start:o}):0!==c&&o+c>t.getEndPosition()?(t.seek(o),l.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:d.ERR_NOT_ENOUGH_DATA,type:h,size:c,hdr_size:u,start:o}):e?{code:d.OK,type:h,size:c,hdr_size:u,start:o}:(d[h+"Box"]?n=new d[h+"Box"](c):"uuid"!==h?(l.warn("BoxParser","Unknown box type: '"+h+"'"),(n=new d.Box(h,c)).has_unparsed_data=!0):d.UUIDBoxes[a]?n=new d.UUIDBoxes[a](c):(l.warn("BoxParser","Unknown uuid type: '"+a+"'"),(n=new d.Box(h,c)).uuid=a,n.has_unparsed_data=!0),n.hdr_size=u,n.start=o,n.write===d.Box.prototype.write&&"mdat"!==n.type&&(l.info("BoxParser","'"+f+"' box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(t)),n.parse(t),(s=t.getPosition()-(n.start+n.size))<0?(l.warn("BoxParser","Parsing of box '"+f+"' did not read the entire indicated box data size (missing "+-s+" bytes), seeking forward"),t.seek(n.start+n.size)):s>0&&(l.error("BoxParser","Parsing of box '"+f+"' read "+s+" more bytes than the indicated box data size, seeking backwards"),0!==n.size&&t.seek(n.start+n.size)),{code:d.OK,box:n,size:n.size})},d.Box.prototype.parse=function(t){"mdat"!=this.type?this.data=t.readUint8Array(this.size-this.hdr_size):0===this.size?t.seek(t.getEndPosition()):t.seek(this.start+this.size)},d.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size},d.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size},d.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4},d.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},d.ContainerBox.prototype.parse=function(t){for(;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},d.SAMPLE_ENTRY_TYPE_VISUAL="Visual",d.SAMPLE_ENTRY_TYPE_AUDIO="Audio",d.SAMPLE_ENTRY_TYPE_HINT="Hint",d.SAMPLE_ENTRY_TYPE_METADATA="Metadata",d.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",d.SAMPLE_ENTRY_TYPE_SYSTEM="System",d.SAMPLE_ENTRY_TYPE_TEXT="Text",d.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8},d.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},d.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size},d.SampleEntry.prototype.parseFooter=function(t){d.ContainerBox.prototype.parse.call(this,t)},d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_HINT),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_METADATA),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SUBTITLE),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SYSTEM),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,this.parseFooter(t)}),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"fLaC"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT,"enct"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_METADATA,"encm"),d.createBoxCtor("a1lx",function(t){var e=((1&(1&t.readUint8()))+1)*16;this.layer_size=[];for(var r=0;r<3;r++)16==e?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()}),d.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()}),d.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}),d.createBoxCtor("av1C",function(t){var e=t.readUint8();if(e>>7&!1)return void l.error("av1C marker problem");if(this.version=127&e,1!==this.version)return void l.error("av1C version "+this.version+" not supported");if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=31&e,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=3&e,e=t.readUint8(),this.reserved_1=e>>5&7,0!==this.reserved_1)return void l.error("av1C reserved_1 parsing problem");if(this.initial_presentation_delay_present=e>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&e;else if(this.reserved_2=15&e,0!==this.reserved_2)return void l.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(r)}),d.createBoxCtor("avcC",function(t){var e,r;for(e=0,this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=3&t.readUint8(),this.nb_SPS_nalus=31&t.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[];e0&&(this.ext=t.readUint8Array(r))}),d.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}),d.createFullBoxCtor("ccst",function(t){var e=t.readUint8();this.all_ref_pics_intra=(128&e)==128,this.intra_pred_used=(64&e)==64,this.max_ref_per_pic=(63&e)>>2,t.readUint24()}),d.createBoxCtor("cdef",function(t){var e;for(e=0,this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[];e=32768&&this.component_type_urls.push(t.readCString())}}),d.createFullBoxCtor("co64",function(t){var e,r;if(e=t.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else"rICC"===this.colour_type?this.ICC_profile=t.readUint8Array(this.size-4):"prof"===this.colour_type&&(this.ICC_profile=t.readUint8Array(this.size-4))}),d.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()}),d.createFullBoxCtor("cslg",function(t){0===this.version&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())}),d.createFullBoxCtor("ctts",function(t){if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=e>>1&31,this.bsmod=(1&e)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|n>>5&7}),d.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=7&e,this.ind_subs=[];for(var r=0;r>6,n.bsid=s>>1&31,n.bsmod=(1&s)<<4|a>>4&15,n.acmod=a>>1&7,n.lfeon=1&a,n.num_dep_sub=o>>1&15,n.num_dep_sub>0&&(n.chan_loc=(1&o)<<8|t.readUint8())}}),d.createFullBoxCtor("dfLa",function(t){for(var e=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];;){var n=t.readUint8(),s=Math.min(127&n,r.length-1);if(s?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),e.push(r[s]),128&n)break}this.numMetadataBlocks=e.length+" ("+e.join(", ")+")"}),d.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()}),d.createBoxCtor("dmax",function(t){this.time=t.readUint32()}),d.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()}),d.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;e=4;)this.compatible_brands[r]=t.readString(4),e-=4,r++}),d.createFullBoxCtor("hdlr",function(t){0===this.version&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))}),d.createBoxCtor("hvcC",function(t){this.configurationVersion=t.readUint8(),s=t.readUint8(),this.general_profile_space=s>>6,this.general_tier_flag=(32&s)>>5,this.general_profile_idc=31&s,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),this.chroma_format_idc=3&t.readUint8(),this.bit_depth_luma_minus8=7&t.readUint8(),this.bit_depth_chroma_minus8=7&t.readUint8(),this.avgFrameRate=t.readUint16(),s=t.readUint8(),this.constantFrameRate=s>>6,this.numTemporalLayers=(13&s)>>3,this.temporalIdNested=(4&s)>>2,this.lengthSizeMinusOne=3&s,this.nalu_arrays=[];var e,r,n,s,a=t.readUint8();for(e=0;e>7,o.nalu_type=63&s;var l=t.readUint16();for(r=0;r>4&15,this.length_size=15&e,e=t.readUint8(),this.base_offset_size=e>>4&15,1===this.version||2===this.version?this.index_size=15&e:this.index_size=0,this.items=[];var e,r=0;if(this.version<2)r=t.readUint16();else if(2===this.version)r=t.readUint32();else throw"version of iloc box not supported";for(var n=0;n>7,this.axis=1&e}),d.createFullBoxCtor("infe",function(t){if((0===this.version||1===this.version)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),1===this.version){this.extension_type=t.readString(4),l.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(2===this.version?this.item_ID=t.readUint16():3===this.version&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),"mime"===this.item_type?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):"uri "===this.item_type&&(this.item_uri_type=t.readCString()))}),d.createFullBoxCtor("ipma",function(t){var e,r;for(e=0,entry_count=t.readUint32(),this.associations=[];e>7==1,1&this.flags?o.property_index=(127&a)<<8|t.readUint8():o.property_index=127&a}}}),d.createFullBoxCtor("iref",function(t){var e,r;for(this.references=[];t.getPosition()>7,n.assignment_type=127&s,n.assignment_type){case 0:n.grouping_type=t.readString(4);break;case 1:n.grouping_type=t.readString(4),n.grouping_type_parameter=t.readUint32();break;case 2:case 3:break;case 4:n.sub_track_id=t.readUint32();break;default:l.warn("BoxParser","Unknown leva assignement type")}}}),d.createBoxCtor("lhvC",function(t){this.configurationVersion=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),n=t.readUint8(),this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var e,r,n,s=t.readUint8();for(e=0;e>7,a.nalu_type=63&n;var o=t.readUint16();for(r=0;r>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}),d.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()}),d.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()}),d.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var r=0;r0){var e=t.readUint32();this.kid=[];for(var r=0;r0&&(this.data=t.readUint8Array(n))}),d.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),d.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}),d.createFullBoxCtor("saio",function(t){1&this.flags&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var r=t.readUint8(),n=0;n>7,this.num_leading_samples=127&e}),d.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)l.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=15&e,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=d.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}),d.createSampleGroupCtor("stsa",function(t){l.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=63&e}),d.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7}),d.createSampleGroupCtor("tsas",function(t){l.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("tscl",function(t){l.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("vipr",function(t){l.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),1===this.version?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),r=0;r>6,this.sample_depends_on[n]=e>>4&3,this.sample_is_depended_on[n]=e>>2&3,this.sample_has_redundancy[n]=3&e}),d.createFullBoxCtor("senc"),d.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),l.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e,r=t.readUint32(),n=0;n>31&1,n.referenced_size=0x7fffffff&s,n.subsegment_duration=t.readUint32(),n.starts_with_SAP=(s=t.readUint32())>>31&1,n.SAP_type=s>>28&7,n.SAP_delta_time=0xfffffff&s}}),d.SingleItemTypeReferenceBox=function(t,e,r,n){d.Box.call(this,t,e),this.hdr_size=r,this.start=n},d.SingleItemTypeReferenceBox.prototype=new d.Box,d.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[e+1]=15&n}else if(8===this.field_size)for(e=0;e0)for(r=0;r>4&15,this.default_skip_byte_block=15&e}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=d.parseHex16(t),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}),d.createFullBoxCtor("tfdt",function(t){1==this.version?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}),d.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}),d.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=3&e,this.entries=[];for(var r=t.readUint32(),n=0;n>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}),d.createBoxCtor("tmax",function(t){this.time=t.readUint32()}),d.createBoxCtor("tmin",function(t){this.time=t.readUint32()}),d.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()}),d.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()}),d.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()}),d.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()},d.createTrackGroupCtor("msrc"),d.TrackReferenceTypeBox=function(t,e,r,n){d.Box.call(this,t,e),this.hdr_size=r,this.start=n},d.TrackReferenceTypeBox.prototype=new d.Box,d.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)},d.trefBox.prototype.parse=function(t){for(var e,r;t.getPosition()e&&this.flags&d.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&d.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=t.readUint32(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}}),d.createFullBoxCtor("url ",function(t){1!==this.flags&&(this.location=t.readCString())}),d.createFullBoxCtor("urn ",function(t){this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}),d.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),d.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=d.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}),d.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),d.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=d.parseHex16(t)}),d.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=1&e,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8()):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=1&e),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}),d.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)}),d.createFullBoxCtor("vvcC",function(t){var e,r,n={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){this.held_bits=t.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(t){this.held_bits=t.readUint16(),this.num_held_bits=16},extract_bits:function(t){var e=this.held_bits>>this.num_held_bits-t&(1<1){for(n.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=n.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)n.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;e+=d.decimalToHex(n,0),e+=".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var s=!1,a="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||s)&&(a="."+d.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+a,s=!0);e+=a}return e},d.vvc1SampleEntry.prototype.getCodec=d.vvi1SampleEntry.prototype.getCodec=function(){var t=d.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var e="";if(this.vvcC.general_constraint_info){var r,n,s,a=[];for(n=0,r=this.vvcC.ptl_frame_only_constraint<<7|this.vvcC.ptl_multilayer_enabled<<6;n>2&63,a.push(r),r&&(s=n),r=this.vvcC.general_constraint_info[n]>>2&3;if(void 0===s)e=".CA";else{e=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l=0,u=0;for(n=0;n<=s;++n)for(l=l<<8|a[n],u+=8;u>=5;)e+=o[l>>u-5&31],u-=5,l&=(1<0x100000000&&(this.size+=8),"uuid"===this.type&&(this.size+=16),l.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>0x100000000?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),"uuid"===this.type&&t.writeUint8Array(this.uuid),this.size>0x100000000&&t.writeUint64(this.size)},d.FullBox.prototype.writeHeader=function(t){this.size+=4,d.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)},d.Box.prototype.write=function(t){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))},d.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+10xffffffff),this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(t),1===this.version?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)},d.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&d.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&d.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&d.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&d.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&d.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)},d.tkhdBox.prototype.write=function(t){this.version=0,this.size=80,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)},d.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)},d.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&d.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&d.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&d.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&d.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&d.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&d.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&d.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&d.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)continue;else if(t[r]instanceof d.Box||e[r]instanceof d.Box)continue;else if(void 0===t[r]||void 0===e[r])continue;else if("function"==typeof t[r]||"function"==typeof e[r])continue;else if(t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1)continue;else if("data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r)continue;else if(d.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;else if(t[r]!==e[r])return!1;return!0},d.boxEqual=function(t,e){if(!d.boxEqualFields(t,e))return!1;for(var r=0;r=e?t:Array(e-t.length+1).join(r)+t}function s(t){var e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),s=Math.floor(t-3600*e-60*r),a=Math.floor((t-3600*e-60*r-s)*1e3);return""+n(e,2)+":"+n(r,2)+":"+n(s,2)+"."+n(a,3)}for(var a=this.parseSample(r),o="",l=0;l1)for(e=1;e-1&&this.fragmentedTracks.splice(e,1)},v.prototype.setExtractionOptions=function(t,e,r){var n=this.getTrackById(t);if(n){var s={};this.extractedTracks.push(s),s.id=t,s.user=e,s.trak=n,n.nextSample=0,s.nb_samples=1e3,s.samples=[],r&&r.nbSamples&&(s.nb_samples=r.nbSamples)}},v.prototype.unsetExtractionOptions=function(t){for(var e=-1,r=0;r-1&&this.extractedTracks.splice(e,1)},v.prototype.parse=function(){var t,e,r;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat())if(this.processIncompleteMdat())continue;else return;else{if(this.saveParsePosition&&this.saveParsePosition(),(t=d.parseOneBox(this.stream,!1)).code===d.ERR_NOT_ENOUGH_DATA)if(!this.processIncompleteBox)return;else if(this.processIncompleteBox(t))continue;else return;switch(r="uuid"!==(e=t.box).type?e.type:e.uuid,this.boxes.push(e),r){case"mdat":this.mdats.push(e);break;case"moof":this.moofs.push(e);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&l.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=e}this.updateUsedBytes&&this.updateUsedBytes(e,t)}},v.prototype.checkBuffer=function(t){if(null==t)throw"Buffer must be defined and non empty";if(void 0===t.fileStart)throw"Buffer must have a fileStart property";return 0===t.byteLength?(l.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(l.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),!!this.stream.initialized()||(l.warn("ISOFile","Not ready to start parsing"),!1))},v.prototype.appendBuffer=function(t,e){var r;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(l.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),l.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},v.prototype.getInfo=function(){var t,e,r,n,s,a,o={},l=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(l+1e3*this.moov.mvhd.creation_time),o.modified=new Date(l+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],t=0;t0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',t=0;t=r.samples.length)&&(l.info("ISOFile","Sending fragmented data on track #"+n.id+" for samples ["+Math.max(0,r.nextSample-n.nb_samples)+","+(r.nextSample-1)+"]"),l.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(n.id,n.user,n.segmentStream.buffer,r.nextSample,t||r.nextSample>=r.samples.length),n.segmentStream=null,n!==this.fragmentedTracks[e]))break}}if(null!==this.onSamples)for(e=0;e=r.samples.length)&&(l.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[e]))break}}}},v.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null},v.prototype.getBoxes=function(t,e){var r=[];return v._sweep.call(this,t,r,e),r},v._sweep=function(t,e,r){for(var n in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&r)return;v._sweep.call(this.boxes[n],t,e,r)}},v.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);return e?e.samples:void 0},v.prototype.getTrackSample=function(t,e){var r=this.getTrackById(t);return this.getSample(r,e)},v.prototype.releaseUsedSamples=function(t,e){var r=0,n=this.getTrackById(t);n.lastValidSample||(n.lastValidSample=0);for(var s=n.lastValidSample;st*s.timescale){c=n-1;break}e&&s.is_sync&&(u=n)}for(e&&(c=u),t=r.samples[c].cts,r.nextSample=c;r.samples[c].alreadyRead===r.samples[c].size&&r.samples[c+1];)c++;return o=r.samples[c].offset+r.samples[c].alreadyRead,l.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+l.getDurationString(t,a)+" and offset: "+o),{offset:o,time:t/a}},v.prototype.getTrackDuration=function(t){var e;return t.samples?((e=t.samples[t.samples.length-1]).cts+e.duration)/e.timescale:1/0},v.prototype.seek=function(t,e){var r,n,s,a=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(s=0;sthis.getTrackDuration(r))&&((n=this.seekTrack(t,e,r)).offset-1){o=l;break}switch(o){case"Visual":if(s.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",e.width).set("height",e.height).set("horizresolution",4718592).set("vertresolution",4718592).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var f=new d.avcCBox;f.parse(new u(e.avcDecoderConfigRecord)),a.addBox(f)}else if(e.hevcDecoderConfigRecord){var p=new d.hvcCBox;p.parse(new u(e.hevcDecoderConfigRecord)),a.addBox(p)}break;case"Audio":s.add("smhd").set("balance",e.balance||0),a.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":s.add("hmhd");break;case"Subtitle":s.add("sthd"),"stpp"===e.type&&a.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break;default:s.add("nmhd")}e.description&&a.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(t){a.addBox(t)}),s.add("dinf").add("dref").addEntry(new d["url Box"]().set("flags",1));var _=s.add("stbl");return _.add("stsd").addEntry(a),_.add("stts").set("sample_counts",[]).set("sample_deltas",[]),_.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),_.add("stco").set("chunk_offsets",[]),_.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(r),e.id}},d.Box.prototype.computeSize=function(t){var e=t||new c;e.endianness=c.BIG_ENDIAN,this.write(e)},v.prototype.addSample=function(t,e,r){var n=r||{},s={},a=this.getTrackById(t);if(null!==a){s.number=a.samples.length,s.track_id=a.tkhd.track_id,s.timescale=a.mdia.mdhd.timescale,s.description_index=n.sample_description_index?n.sample_description_index-1:0,s.description=a.mdia.minf.stbl.stsd.entries[s.description_index],s.data=e,s.size=e.byteLength,s.alreadyRead=s.size,s.duration=n.duration||1,s.cts=n.cts||0,s.dts=n.dts||0,s.is_sync=n.is_sync||!1,s.is_leading=n.is_leading||0,s.depends_on=n.depends_on||0,s.is_depended_on=n.is_depended_on||0,s.has_redundancy=n.has_redundancy||0,s.degradation_priority=n.degradation_priority||0,s.offset=0,s.subsamples=n.subsamples,a.samples.push(s),a.samples_size+=s.size,a.samples_duration+=s.duration,void 0===a.first_dts&&(a.first_dts=n.dts),this.processSamples();var o=this.createSingleSampleMoof(s);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),s}},v.prototype.createSingleSampleMoof=function(t){var e=0;e=t.is_sync?0x2000000:65536;var r=new d.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var n=r.add("traf"),s=this.getTrackById(t.track_id);return n.add("tfhd").set("track_id",t.track_id).set("flags",d.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),n.add("tfdt").set("baseMediaDecodeTime",t.dts-(s.first_dts||0)),n.add("trun").set("flags",d.TRUN_FLAGS_DATA_OFFSET|d.TRUN_FLAGS_DURATION|d.TRUN_FLAGS_SIZE|d.TRUN_FLAGS_FLAGS|d.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),r},v.prototype.lastMoofIndex=0,v.prototype.samplesDataSize=0,v.prototype.resetTables=function(){for(t=0,this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0;t=2&&(u=s[o].grouping_type+"/0",(l=new c(s[o].grouping_type,0)).is_fragment=!0,e.sample_groups_info[u]||(e.sample_groups_info[u]=l))}else for(o=0;o=2&&(u=n[o].grouping_type+"/0",l=new c(n[o].grouping_type,0),t.sample_groups_info[u]||(t.sample_groups_info[u]=l))},v.setSampleGroupProperties=function(t,e,r,n){var s,a,o;for(s in e.sample_groups=[],n)e.sample_groups[s]={},e.sample_groups[s].grouping_type=n[s].grouping_type,e.sample_groups[s].grouping_type_parameter=n[s].grouping_type_parameter,r>=n[s].last_sample_in_run&&(n[s].last_sample_in_run<0&&(n[s].last_sample_in_run=0),n[s].entry_index++,n[s].entry_index<=n[s].sbgp.entries.length-1&&(n[s].last_sample_in_run+=n[s].sbgp.entries[n[s].entry_index].sample_count)),n[s].entry_index<=n[s].sbgp.entries.length-1?e.sample_groups[s].group_description_index=n[s].sbgp.entries[n[s].entry_index].group_description_index:e.sample_groups[s].group_description_index=-1,0!==e.sample_groups[s].group_description_index&&(o=n[s].fragment_description?n[s].fragment_description:n[s].description,e.sample_groups[s].group_description_index>0?(a=e.sample_groups[s].group_description_index>65535?(e.sample_groups[s].group_description_index>>16)-1:e.sample_groups[s].group_description_index-1,o&&a>=0&&(e.sample_groups[s].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[s].description=o.entries[o.default_group_description_index-1]))},v.process_sdtp=function(t,e,r){e&&(t?(e.is_leading=t.is_leading[r],e.depends_on=t.sample_depends_on[r],e.is_depended_on=t.sample_is_depended_on[r],e.has_redundancy=t.sample_has_redundancy[r]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},v.prototype.buildSampleLists=function(){var t,e;for(t=0;tb&&(w++,b<0&&(b=0),b+=a.sample_counts[w]),e>0?(t.samples[e-1].duration=a.sample_deltas[w],t.samples_duration+=t.samples[e-1].duration,A.dts=t.samples[e-1].dts+t.samples[e-1].duration):A.dts=0,o?(e>=S&&(x++,S<0&&(S=0),S+=o.sample_counts[x]),A.cts=t.samples[e].dts+o.sample_offsets[x]):A.cts=A.dts,l?(e==l.sample_numbers[U]-1?(A.is_sync=!0,U++):(A.is_sync=!1,A.degradation_priority=0),c&&c.entries[E].sample_delta+k==e+1&&(A.subsamples=c.entries[E].subsamples,k+=c.entries[E].sample_delta,E++)):A.is_sync=!0,v.process_sdtp(t.mdia.minf.stbl.sdtp,A,A.number),d?A.degradation_priority=d.priority[e]:A.degradation_priority=0,c&&c.entries[E].sample_delta+k==e&&(A.subsamples=c.entries[E].subsamples,k+=c.entries[E].sample_delta),(h.length>0||f.length>0)&&v.setSampleGroupProperties(t,A,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},v.prototype.updateSampleLists=function(){if(void 0!==this.moov){for(;this.lastMoofIndex0&&v.initSampleGroups(h,c,c.sbgps,h.mdia.minf.stbl.sgpds,c.sgpds),e=0;e0?p.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(c.tfdt?p.dts=c.tfdt.baseMediaDecodeTime:p.dts=0,h.first_traf_merged=!0),p.cts=p.dts,m.flags&d.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+m.sample_composition_time_offset[r]),_=o,m.flags&d.TRUN_FLAGS_FLAGS?_=m.sample_flags[r]:0===r&&m.flags&d.TRUN_FLAGS_FIRST_FLAG&&(_=m.first_sample_flags),p.is_sync=!(_>>16&1),p.is_leading=_>>26&3,p.depends_on=_>>24&3,p.is_depended_on=_>>22&3,p.has_redundancy=_>>20&3,p.degradation_priority=65535&_;var y=!!(c.tfhd.flags&d.TFHD_FLAG_BASE_DATA_OFFSET),g=!!(c.tfhd.flags&d.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(m.flags&d.TRUN_FLAGS_DATA_OFFSET),w=0;w=y?c.tfhd.base_data_offset:g||0===e?u.start:l,0===e&&0===r?b?p.offset=w+m.data_offset:p.offset=w:p.offset=l,l=p.offset+p.size,(c.sbgps.length>0||c.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&v.setSampleGroupProperties(h,p,p.number_in_traf,c.sample_groups_info)}}if(c.subs){h.has_fragment_subsamples=!0;var S=c.first_sample_index;for(e=0;e-1))return null;var a=(r=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-r.fileStart);if(n.size-n.alreadyRead<=a)return l.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+(n.size-n.alreadyRead)+" full size: "+n.size+")"),c.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,n.size-n.alreadyRead),r.usedBytes+=n.size-n.alreadyRead,this.stream.logBufferLevel(),n.alreadyRead=n.size,n;if(0===a)return null;l.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+a+" full size: "+n.size+")"),c.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,a),n.alreadyRead+=a,r.usedBytes+=a,this.stream.logBufferLevel()}},v.prototype.releaseSample=function(t,e){var r=t.samples[e];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},v.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},v.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},v.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=a.ipro.protections[a.iinf.item_infos[t].protection_index-1]),a.iinf.item_infos[t].item_type?r.type=a.iinf.item_infos[t].item_type:r.type="mime",r.content_type=a.iinf.item_infos[t].content_type,r.content_encoding=a.iinf.item_infos[t].content_encoding;if(a.grpl)for(t=0;t0&&d.property_index-1-1))return null;var o=(e=this.stream.buffers[a]).byteLength-(s.offset+s.alreadyRead-e.fileStart);if(!(s.length-s.alreadyRead<=o))return l.debug("ISOFile","Getting item #"+t+" extent #"+n+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-e.fileStart)+" read size: "+o+" full extent size: "+s.length+" full item size: "+r.size+")"),c.memcpy(r.data.buffer,r.alreadyRead,e,s.offset+s.alreadyRead-e.fileStart,o),s.alreadyRead+=o,r.alreadyRead+=o,e.usedBytes+=o,this.stream.logBufferLevel(),null;l.debug("ISOFile","Getting item #"+t+" extent #"+n+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-e.fileStart)+" read size: "+(s.length-s.alreadyRead)+" full extent size: "+s.length+" full item size: "+r.size+")"),c.memcpy(r.data.buffer,r.alreadyRead,e,s.offset+s.alreadyRead-e.fileStart,s.length-s.alreadyRead),e.usedBytes+=s.length-s.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=s.length-s.alreadyRead,s.alreadyRead=s.length}}return r.alreadyRead===r.size?r:null},v.prototype.releaseItem=function(t){var e=this.items[t];if(!e.data)return 0;this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var r=0;r0?this.moov.traks[t].samples[0].duration:0),e.push(n)}return e},d.Box.prototype.printHeader=function(t){this.size+=8,this.size>0x100000000&&(this.size+=8),"uuid"===this.type&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)},d.FullBox.prototype.printHeader=function(t){this.size+=4,d.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)},d.Box.prototype.print=function(t){this.printHeader(t)},d.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)},d.tkhdBox.prototype.print=function(t){d.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)};var b={};b.createFile=function(t,e){var r=new v(e);return r.discardMdatData=!(void 0===t||t),r},r.createFile=b.createFile},{"@swc/helpers/_/_type_of":"felZi"}],iUw0l:[function(t,e,r,n){var s,a,o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"EventTool",function(){return U}),o.export(r,"Log",function(){return j}),o.export(r,"autoReadStream",function(){return C}),o.export(r,"file2stream",function(){return I}),o.export(r,"recodemux",function(){return N}),o.export(r,"workerTimer",function(){return T});var l=t("@swc/helpers/_/_async_to_generator"),u=t("@swc/helpers/_/_class_call_check"),c=t("@swc/helpers/_/_create_class"),h=t("@swc/helpers/_/_define_property"),f=t("@swc/helpers/_/_object_spread"),d=t("@swc/helpers/_/_object_spread_props"),p=t("@swc/helpers/_/_sliced_to_array"),_=t("@swc/helpers/_/_to_consumable_array"),m=t("@swc/helpers/_/_type_of"),y=t("@swc/helpers/_/_ts_generator"),g=t("@webav/mp4box.js"),v=o.interopDefault(g),b=Object.defineProperty,w=function(t){throw TypeError(t)},S=function(t,e,r){var n;return n=(void 0===e?"undefined":(0,m._)(e))!="symbol"?e+"":e,n in t?b(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r},x=function(t,e,r){return e.has(t)||w("Cannot read from private field"),r?r.call(t):e.get(t)},U=function(){"use strict";function t(){var e,r,n=this,s=this;(0,u._)(this,t),e=a,r=new Map,e.has(this)?w("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(this):e.set(this,r),S(this,"on",function(t,e){var r,s=null!=(r=x(n,a).get(t))?r:new Set;return s.add(e),x(n,a).has(t)||x(n,a).set(t,s),function(){s.delete(e),0===s.size&&x(n,a).delete(t)}}),S(this,"once",function(t,e){var r=n.on(t,function(){for(var t=arguments.length,n=Array(t),s=0;s1?e-1:0),n=1;n=a.length)return null;var e=new v.default.DataStream;e.endianness=v.default.DataStream.BIG_ENDIAN;var r=s;try{for(;rh&&(h=s)}var l=r[0];if(null!=l&&l.is_sync&&l.cts-hh&&(h=u)}else{c=t,d();return}}}}function p(t){for(var r=-1,n=0;n0&&a.is_sync)break;e.addSample(s,a.data,a),r=a.cts+a.duration}return t.splice(0,n),r}var _=T(d,15),m=G(t,function(t,e){return u("encoder0",t,e)}),g=G(t,function(t,e){return u("encoder1",t,e)}),v=0;return{get encodeQueueSize(){return m.encodeQueueSize+g.encodeQueueSize},encode:function(t,e){try{e.keyFrame&&(v+=1),(v%2==0?m:g).encode(t,e)}catch(n){var r="encode video frame error: ".concat(n.message,", state: ").concat(JSON.stringify({ts:t.timestamp,keyFrame:e.keyFrame,duration:t.duration,gopId:v}));throw j.error(r),Error(r)}},flush:(0,l._)(function(){var t,e,r,n;return(0,y._)(this,function(s){switch(s.label){case 0:if(t=Promise.all,"configured"!==m.state)return[3,2];return[4,m.flush()];case 1:return e=s.sent(),[3,3];case 2:e=null,s.label=3;case 3:if(r=[e],"configured"!==g.state)return[3,5];return[4,g.flush()];case 4:return n=s.sent(),[3,6];case 5:n=null,s.label=6;case 6:return[4,t.apply(Promise,[r.concat([n])])];case 7:return s.sent(),_(),d(),[2]}})}),close:function(){"configured"===m.state&&m.close(),"configured"===g.state&&g.close()}}}(t.video,p,m):null,x=null!=t.audio?(e=t.audio,r=p,n=m,s={timescale:1e6,samplerate:e.sampleRate,channel_count:e.channelCount,hdlr:"soun",type:"aac"===e.codec?"mp4a":"Opus",name:"Track created with WebAV"},a=-1,o=[],u=!1,n.once("VideoReady",function(){u=!0,o.forEach(function(t){var e=W(t);r.addSample(a,e.data,e)}),o=[]}),c={codec:"aac"===e.codec?"mp4a.40.2":"opus",sampleRate:e.sampleRate,numberOfChannels:e.channelCount,bitrate:128e3},(h=new AudioEncoder({error:function(t){var e="AudioEncoder error: ".concat(t.message,", config: ").concat(JSON.stringify(c),", state: ").concat(JSON.stringify({qSize:h.encodeQueueSize,state:h.state}));throw j.error(e),Error(e)},output:function(t,e){var l;if(-1===a){var c,h,p,m,y=null==(l=e.decoderConfig)?void 0:l.description;a=r.addTrack((0,d._)((0,f._)({},s),{description:null==y?void 0:(p=new Uint8Array([0,0,0,0,3,23+(h=(c=y).byteLength),0,2,0,4,18+h,64,21,0,0,0,0,0,0,0,0,0,0,0,5,h].concat((0,_._)(new Uint8Array(c instanceof ArrayBuffer?c:c.buffer)),[6,1,2])),(m=new v.default.BoxParser.esdsBox(p.byteLength)).hdr_size=0,m.parse(new v.default.DataStream(p,0,v.default.DataStream.BIG_ENDIAN)),m)})),n.emit("AudioReady"),j.info("AudioEncoder, audio track ready, trackId:",a)}if(u){var g=W(t);r.addSample(a,g.data,g)}else o.push(t)}})).configure(c),h):null;return null==t.video&&m.emit("VideoReady"),null==t.audio&&m.emit("AudioReady"),{encodeVideo:function(t,e){null==S||S.encode(t,e),t.close()},encodeAudio:function(t){if(null!=x)try{x.encode(t),t.close()}catch(t){var e="encode audio chunk error: ".concat(t.message,", state: ").concat(JSON.stringify({qSize:x.encodeQueueSize,state:x.state}));throw j.error(e),Error(e)}},getEncodeQueueSize:function(){var t,e;return null!=(e=null!=(t=null==S?void 0:S.encodeQueueSize)?t:null==x?void 0:x.encodeQueueSize)?e:0},flush:(0,l._)(function(){return(0,y._)(this,function(t){switch(t.label){case 0:return[4,Promise.all([null==S?void 0:S.flush(),(null==x?void 0:x.state)==="configured"?x.flush():null])];case 1:return t.sent(),[2]}})}),close:function(){m.destroy(),null==S||S.close(),(null==x?void 0:x.state)==="configured"&&x.close()},mp4file:p}}function G(t,e){var r={codec:t.codec,framerate:t.expectFPS,hardwareAcceleration:t.__unsafe_hardwareAcceleration__,bitrate:t.bitrate,width:t.width,height:t.height,alpha:"discard",avc:{format:"avc"}},n=new VideoEncoder({error:function(t){var e="VideoEncoder error: ".concat(t.message,", config: ").concat(JSON.stringify(r),", state: ").concat(JSON.stringify({qSize:n.encodeQueueSize,state:n.state}));throw j.error(e),Error(e)},output:e});return n.configure(r),n}function W(t){var e,r=new ArrayBuffer(t.byteLength);t.copyTo(r);var n=t.timestamp;return{duration:null!=(e=t.duration)?e:0,dts:n,cts:n,is_sync:"key"===t.type,data:r}}O.set(j.debug,0),O.set(j.info,1),O.set(j.warn,2),O.set(j.error,3),(0,l._)(function(){return(0,y._)(this,function(t){switch(t.label){case 0:return[4,Promise.resolve()];case 1:return t.sent(),null!=globalThis.navigator&&null!=globalThis.document&&(j.info("@webav version: 1.1.0, date: ".concat(new Date().toLocaleDateString())),j.info(globalThis.navigator.userAgent),document.addEventListener("visibilitychange",function(){j.info("visibilitychange: ".concat(document.visibilityState))}),"PressureObserver"in globalThis&&new PressureObserver(function(t){j.info("cpu state change: ".concat(JSON.stringify(t.map(function(t){return t.state}))))}).observe("cpu")),[2]}})})()},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_define_property":"3NGsL","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","@webav/mp4box.js":"4DT2A","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7uqUv":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"resample",function(){return f});var a=t("./lib/interpolator"),o=t("./lib/fir-lpf"),l=t("./lib/butterworth-lpf"),u={point:!1,linear:!1,cubic:!0,sinc:!0},c={IIR:16,FIR:71},h={IIR:l.ButterworthLPF,FIR:o.FIRLPF};function f(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=(r-e)/e+1,o=new Float64Array(t.length*s);n.method=n.method||"cubic";var l=new(0,a.Interpolator)(t.length,o.length,{method:n.method,tension:n.tension||0,sincFilterSize:n.sincFilterSize||6,sincWindow:n.sincWindow||void 0});if(void 0===n.LPF&&(n.LPF=u[n.method]),n.LPF){n.LPFType=n.LPFType||"IIR";var f=h[n.LPFType];r>e?function(t,e,r,n){for(var s=0,a=e.length;s=0;o--)e[o]=n.filter(e[o])}(t,o,l,new f(n.LPFOrder||c[n.LPFType],r,e/2)):function(t,e,r,n){for(var s=0,a=t.length;s=0;o--)t[o]=n.filter(t[o]);d(t,e,r)}(t,o,l,new f(n.LPFOrder||c[n.LPFType],e,r/2))}else d(t,o,l);return o}function d(t,e,r){for(var n=0,s=e.length;n2&&void 0!==l[2]?l[2]:[],r+=1,o=new Promise(function(t,e){n[r]={resolve:t,reject:e}}),[2,(e.postMessage({cbId:r,evtType:t,args:s},a),o)]})}),function(e,r){return t.apply(this,arguments)});return z.push(s),s}var a=z[P];return P=(P+1)%z.length,a}())("register",{fileId:t,filePath:e,mode:r})];case 1:var a,o,l;return[2,(s.sent(),{read:(a=(0,g._)(function(e,r){return(0,x._)(this,function(s){switch(s.label){case 0:return[4,n("read",{fileId:t,offset:e,size:r})];case 1:return[2,s.sent()]}})}),function(t,e){return a.apply(this,arguments)}),write:(o=(0,g._)(function(e,r){return(0,x._)(this,function(s){switch(s.label){case 0:return[4,n("write",{fileId:t,data:e,opts:r},[ArrayBuffer.isView(e)?e.buffer:e])];case 1:return[2,s.sent()]}})}),function(t,e){return o.apply(this,arguments)}),close:(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,n("close",{fileId:t})];case 1:return[2,e.sent()]}})}),truncate:(l=(0,g._)(function(e){return(0,x._)(this,function(r){switch(r.label){case 0:return[4,n("truncate",{fileId:t,newSize:e})];case 1:return[2,r.sent()]}})}),function(t){return l.apply(this,arguments)}),getSize:(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,n("getSize",{fileId:t})];case 1:return[2,e.sent()]}})}),flush:(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,n("flush",{fileId:t})];case 1:return[2,e.sent()]}})})})]}})})).apply(this,arguments)}var z=[],P=0;function L(t){if("/"===t)return{parent:null,name:""};var e=t.split("/").filter(function(t){return t.length>0});if(0===e.length)throw Error("Invalid path");return{name:e[e.length-1],parent:"/"+e.slice(0,-1).join("/")}}function R(t,e){return D.apply(this,arguments)}function D(){return(D=(0,g._)(function(t,e){var r,n,s,a,o,l,u,c,h,f,d,p,_,m;return(0,x._)(this,function(y){switch(y.label){case 0:if(n=(r=L(t)).parent,s=r.name,null!=n)return[3,2];return[4,navigator.storage.getDirectory()];case 1:return[2,y.sent()];case 2:a=n.split("/").filter(function(t){return t.length>0}),y.label=3;case 3:return y.trys.push([3,17,,18]),[4,navigator.storage.getDirectory()];case 4:o=y.sent(),l=!0,u=!1,c=void 0,y.label=5;case 5:y.trys.push([5,10,11,12]),h=a[Symbol.iterator](),y.label=6;case 6:if(l=(f=h.next()).done)return[3,9];return d=f.value,[4,o.getDirectoryHandle(d,{create:e.create})];case 7:o=y.sent(),y.label=8;case 8:return l=!0,[3,6];case 9:return[3,12];case 10:return p=y.sent(),u=!0,c=p,[3,12];case 11:try{l||null==h.return||h.return()}finally{if(u)throw c}return[7];case 12:if(!e.isFile)return[3,14];return[4,o.getFileHandle(s,{create:e.create})];case 13:return _=y.sent(),[3,16];case 14:return[4,o.getDirectoryHandle(s,{create:e.create})];case 15:_=y.sent(),y.label=16;case 16:return[2,_];case 17:if("NotFoundError"===(m=y.sent()).name)return[2,null];throw m;case 18:return[2]}})})).apply(this,arguments)}function M(t){return O.apply(this,arguments)}function O(){return(O=(0,g._)(function(t){var e,r,n,s,a,o,l,u,c,h,f,d,p;return(0,x._)(this,function(_){switch(_.label){case 0:if(r=(e=L(t)).parent,n=e.name,null!=r)return[3,15];return[4,navigator.storage.getDirectory()];case 1:s=_.sent(),a=!1,o=!1,_.label=2;case 2:_.trys.push([2,8,9,14]),u=(0,y._)(s.keys()),_.label=3;case 3:return[4,u.next()];case 4:if(!(a=!(c=_.sent()).done))return[3,7];return h=c.value,[4,s.removeEntry(h,{recursive:!0})];case 5:_.sent(),_.label=6;case 6:return a=!1,[3,3];case 7:return[3,14];case 8:return f=_.sent(),o=!0,l=f,[3,14];case 9:if(_.trys.push([9,,12,13]),!(a&&null!=u.return))return[3,11];return[4,u.return()];case 10:_.sent(),_.label=11;case 11:return[3,13];case 12:if(o)throw l;return[7];case 13:return[7];case 14:return[2];case 15:return[4,R(r,{create:!1,isFile:!1})];case 16:if(null==(d=_.sent()))return[3,20];_.label=17;case 17:return _.trys.push([17,19,,20]),[4,d.removeEntry(n,{recursive:!0})];case 18:return _.sent(),[3,20];case 19:if("NotFoundError"===(p=_.sent()).name)return[2];throw p;case 20:return[2]}})})).apply(this,arguments)}function j(t,e){return"".concat(t,"/").concat(e).replace("//","/")}function N(t){return new W(t)}var G=function(){"use strict";function t(e){(0,v._)(this,t),A(this,s),A(this,a),A(this,o),T(this,s,e);var r=L(e),n=r.parent,l=r.name;T(this,a,l),T(this,o,n)}return(0,b._)(t,[{key:"kind",get:function(){return"dir"}},{key:"name",get:function(){return k(this,a)}},{key:"path",get:function(){return k(this,s)}},{key:"parent",get:function(){return null==k(this,o)?null:N(k(this,o))}},{key:"create",value:function(){var t=this;return(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,R(k(t,s),{create:!0,isFile:!1})];case 1:return[2,(e.sent(),N(k(t,s)))]}})})()}},{key:"exists",value:function(){var t=this;return(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,R(k(t,s),{create:!1,isFile:!1})];case 1:return[2,e.sent()instanceof FileSystemDirectoryHandle]}})})()}},{key:"remove",value:function(){var t=this;return(0,g._)(function(){var e,r,n,a,o,l,u;return(0,x._)(this,function(c){switch(c.label){case 0:e=!0,r=!1,n=void 0,c.label=1;case 1:return c.trys.push([1,9,10,11]),[4,t.children()];case 2:a=c.sent()[Symbol.iterator](),c.label=3;case 3:if(e=(o=a.next()).done)return[3,8];l=o.value,c.label=4;case 4:return c.trys.push([4,6,,7]),[4,l.remove()];case 5:return c.sent(),[3,7];case 6:return console.warn(c.sent()),[3,7];case 7:return e=!0,[3,3];case 8:return[3,11];case 9:return u=c.sent(),r=!0,n=u,[3,11];case 10:try{e||null==a.return||a.return()}finally{if(r)throw n}return[7];case 11:return c.trys.push([11,13,,14]),[4,M(k(t,s))];case 12:return c.sent(),[3,14];case 13:return console.warn(c.sent()),[3,14];case 14:return[2]}})})()}},{key:"children",value:function(){var t=this;return(0,g._)(function(){var e,r,n,a,o,l,u,c,h;return(0,x._)(this,function(f){switch(f.label){case 0:return[4,R(k(t,s),{create:!1,isFile:!1})];case 1:if(null==(e=f.sent()))return[2,[]];r=[],n=!1,a=!1,f.label=2;case 2:f.trys.push([2,7,8,13]),l=(0,y._)(e.values()),f.label=3;case 3:return[4,l.next()];case 4:if(!(n=!(u=f.sent()).done))return[3,6];c=u.value,r.push(("file"===c.kind?H:N)(j(k(t,s),c.name))),f.label=5;case 5:return n=!1,[3,3];case 6:return[3,13];case 7:return h=f.sent(),a=!0,o=h,[3,13];case 8:if(f.trys.push([8,,11,12]),!(n&&null!=l.return))return[3,10];return[4,l.return()];case 9:f.sent(),f.label=10;case 10:return[3,12];case 11:if(a)throw o;return[7];case 12:return[7];case 13:return[2,r]}})})()}},{key:"copyTo",value:function(e){var r=this;return(0,g._)(function(){var n,s,a;return(0,x._)(this,function(o){switch(o.label){case 0:return[4,r.exists()];case 1:if(!o.sent())throw Error("dir ".concat(r.path," not exists"));if(!(e instanceof t))return[3,6];return[4,e.exists()];case 2:return[4,(n=o.sent()?N(j(e.path,r.name)):e).create()];case 3:return o.sent(),s=Promise.all,[4,r.children()];case 4:return[4,s.apply(Promise,[o.sent().map(function(t){return t.copyTo(n)})])];case 5:return[2,(o.sent(),n)];case 6:if(!(e instanceof FileSystemDirectoryHandle))return[3,9];return a=Promise.all,[4,r.children()];case 7:var l;return[4,a.apply(Promise,[o.sent().map((l=(0,g._)(function(t){var r,n;return(0,x._)(this,function(s){switch(s.label){case 0:if("file"!==t.kind)return[3,3];return r=t.copyTo,[4,e.getFileHandle(t.name,{create:!0})];case 1:return[4,r.apply(t,[s.sent()])];case 2:return s.sent(),[3,6];case 3:return n=t.copyTo,[4,e.getDirectoryHandle(t.name,{create:!0})];case 4:return[4,n.apply(t,[s.sent()])];case 5:s.sent(),s.label=6;case 6:return[2]}})}),function(t){return l.apply(this,arguments)}))])];case 8:return[2,(o.sent(),null)];case 9:throw Error("Illegal target type")}})})()}},{key:"moveTo",value:function(t){var e=this;return(0,g._)(function(){var r;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,e.copyTo(t)];case 1:return r=n.sent(),[4,e.remove()];case 2:return[2,(n.sent(),r)]}})})()}}]),t}();s=new WeakMap,a=new WeakMap,o=new WeakMap;var W=G,Y=new Map;function H(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rw";if("rw"===e){var r,n=null!=(r=Y.get(t))?r:new J(t,e);return Y.set(t,n),n}return new J(t,e)}function V(t,e){return Z.apply(this,arguments)}function Z(){return(Z=(0,g._)(function(t,e){var r,n,s,a,o,l,u,c,h=arguments;return(0,x._)(this,function(a){switch(a.label){case 0:if(r=h.length>2&&void 0!==h[2]?h[2]:{overwrite:!0},!(e instanceof J))return[3,3];return n=[t],[4,e.stream()];case 1:return[4,V.apply(void 0,n.concat([a.sent(),r]))];case 2:return a.sent(),[2];case 3:return[4,(t instanceof J?t:H(t,"rw")).createWriter()];case 4:s=a.sent(),a.label=5;case 5:if(a.trys.push([5,16,17,19]),!r.overwrite)return[3,7];return[4,s.truncate(0)];case 6:a.sent(),a.label=7;case 7:if(!(e instanceof ReadableStream))return[3,13];o=e.getReader(),a.label=8;case 8:return[4,o.read()];case 9:if(u=(l=a.sent()).done,c=l.value,u)return[3,12];return[4,s.write(c)];case 10:a.sent(),a.label=11;case 11:return[3,8];case 12:return[3,15];case 13:return[4,s.write(e)];case 14:a.sent(),a.label=15;case 15:return[3,19];case 16:throw a.sent();case 17:return[4,s.close()];case 18:return a.sent(),[7];case 19:return[2]}})})).apply(this,arguments)}var X=0,K=function(){"use strict";function t(e,r){var n,s=this;(0,v._)(this,t),A(this,l),A(this,u),A(this,c),A(this,h),A(this,f),A(this,d,0),A(this,p,(n=null,function(){var t;return T(s,d,k(s,d)+1),null!=n?n:n=new Promise((t=(0,g._)(function(t,e){var r;return(0,x._)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,function(t,e,r){return F.apply(this,arguments)}(k(s,f),k(s,l),k(s,h))];case 1:return t([r=a.sent(),(0,g._)(function(){var t;return(0,x._)(this,function(t){switch(t.label){case 0:if(T(s,d,k(s,d)-1),k(s,d)>0)return[3,2];return n=null,[4,r.close()];case 1:t.sent(),t.label=2;case 2:return[2]}})})]),[3,3];case 2:return e(a.sent()),[3,3];case 3:return[2]}})}),function(e,r){return t.apply(this,arguments)}))})),A(this,_,!1),T(this,f,++X),T(this,l,e),T(this,h,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[r]);var a=L(e),o=a.parent,m=a.name;if(null==o)throw Error("Invalid path");T(this,c,m),T(this,u,o)}return(0,b._)(t,[{key:"kind",get:function(){return"file"}},{key:"path",get:function(){return k(this,l)}},{key:"name",get:function(){return k(this,c)}},{key:"parent",get:function(){return null==k(this,u)?null:N(k(this,u))}},{key:"createWriter",value:function(){var t=this;return(0,g._)(function(){var e,r,n,s,a,o;return(0,x._)(this,function(l){switch(l.label){case 0:if("read-only"===k(t,h))throw Error("file is read-only");if(k(t,_))throw Error("Other writer have not been closed");return T(t,_,!0),e=new TextEncoder,[4,k(t,p).call(t)];case 1:return n=(r=w._.apply(void 0,[l.sent(),2]))[0],s=r[1],[4,n.getSize()];case 2:var u,c;return a=l.sent(),o=!1,[2,{write:(u=(0,g._)(function(t){var r,s,l,u,c=arguments;return(0,x._)(this,function(h){switch(h.label){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:{},o)throw Error("Writer is closed");return l="string"==typeof t?e.encode(t):t,a=(u=null!=(s=r.at)?s:a)+l.byteLength,[4,n.write(l,{at:u})];case 1:return[2,h.sent()]}})}),function(t){return u.apply(this,arguments)}),truncate:(c=(0,g._)(function(t){return(0,x._)(this,function(e){switch(e.label){case 0:if(o)throw Error("Writer is closed");return[4,n.truncate(t)];case 1:return e.sent(),a>t&&(a=t),[2]}})}),function(t){return c.apply(this,arguments)}),flush:(0,g._)(function(){return(0,x._)(this,function(t){switch(t.label){case 0:if(o)throw Error("Writer is closed");return[4,n.flush()];case 1:return t.sent(),[2]}})}),close:(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:if(o)throw Error("Writer is closed");return o=!0,T(t,_,!1),[4,s()];case 1:return e.sent(),[2]}})})}]}})})()}},{key:"createReader",value:function(){var t=this;return(0,g._)(function(){var e,r,n,s,a;return(0,x._)(this,function(o){switch(o.label){case 0:return[4,k(t,p).call(t)];case 1:var l;return r=(e=w._.apply(void 0,[o.sent(),2]))[0],n=e[1],s=!1,a=0,[2,{read:(l=(0,g._)(function(t){var e,n,o,l,u=arguments;return(0,x._)(this,function(c){switch(c.label){case 0:if(e=u.length>1&&void 0!==u[1]?u[1]:{},s)throw Error("Reader is closed");return o=null!=(n=e.at)?n:a,[4,r.read(o,t)];case 1:return l=c.sent(),[2,(a=o+l.byteLength,l)]}})}),function(t){return l.apply(this,arguments)}),getSize:(0,g._)(function(){return(0,x._)(this,function(t){switch(t.label){case 0:if(s)throw Error("Reader is closed");return[4,r.getSize()];case 1:return[2,t.sent()]}})}),close:(0,g._)(function(){var t;return(0,x._)(this,function(t){switch(t.label){case 0:if(s)return[3,2];return s=!0,[4,n()];case 1:t.sent(),t.label=2;case 2:return[2]}})})}]}})})()}},{key:"text",value:function(){var t=this;return(0,g._)(function(){var e,r;return(0,x._)(this,function(n){switch(n.label){case 0:return r=(e=new TextDecoder).decode,[4,t.arrayBuffer()];case 1:return[2,r.apply(e,[n.sent()])]}})})()}},{key:"arrayBuffer",value:function(){var t=this;return(0,g._)(function(){var e,r;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,R(k(t,l),{create:!1,isFile:!0})];case 1:if(null!=(e=n.sent()))return[3,2];return r=new ArrayBuffer(0),[3,4];case 2:return[4,e.getFile()];case 3:r=n.sent().arrayBuffer(),n.label=4;case 4:return[2,r]}})})()}},{key:"stream",value:function(){var t=this;return(0,g._)(function(){var e;return(0,x._)(this,function(r){switch(r.label){case 0:return[4,t.getOriginFile()];case 1:return[2,null==(e=r.sent())?new ReadableStream({pull:function(t){t.close()}}):e.stream()]}})})()}},{key:"getOriginFile",value:function(){var t=this;return(0,g._)(function(){var e;return(0,x._)(this,function(r){switch(r.label){case 0:return[4,R(k(t,l),{create:!1,isFile:!0})];case 1:return[2,null==(e=r.sent())?void 0:e.getFile()]}})})()}},{key:"getSize",value:function(){var t=this;return(0,g._)(function(){var e,r;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,R(k(t,l),{create:!1,isFile:!0})];case 1:if(null!=(e=n.sent()))return[3,2];return r=0,[3,4];case 2:return[4,e.getFile()];case 3:r=n.sent().size,n.label=4;case 4:return[2,r]}})})()}},{key:"exists",value:function(){var t=this;return(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,R(k(t,l),{create:!1,isFile:!0})];case 1:return[2,e.sent()instanceof FileSystemFileHandle]}})})()}},{key:"remove",value:function(){var t=this;return(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:if(k(t,d))throw Error("exists unclosed reader/writer");return[4,M(k(t,l))];case 1:return e.sent(),[2]}})})()}},{key:"copyTo",value:function(e){var r=this;return(0,g._)(function(){var n,s,a;return(0,x._)(this,function(o){switch(o.label){case 0:if(!(e instanceof t))return[3,4];if(e.path!==r.path)return[3,1];return n=r,[3,3];case 1:return[4,V(e.path,r)];case 2:o.sent(),n=H(e.path),o.label=3;case 3:return[2,n];case 4:if(!(e instanceof W))return[3,7];return[4,r.exists()];case 5:if(!o.sent())throw Error("file ".concat(r.path," not exists"));return[4,r.copyTo(H(j(e.path,r.name)))];case 6:return[2,o.sent()];case 7:if(!(e instanceof FileSystemFileHandle))return[3,11];return[4,r.stream()];case 8:return a=(s=o.sent()).pipeTo,[4,e.createWritable()];case 9:return[4,a.apply(s,[o.sent()])];case 10:return[2,(o.sent(),null)];case 11:throw Error("Illegal target type")}})})()}},{key:"moveTo",value:function(t){var e=this;return(0,g._)(function(){var r;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,e.copyTo(t)];case 1:return r=n.sent(),[4,e.remove()];case 2:return[2,(n.sent(),r)]}})})()}}]),t}();l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,_=new WeakMap;var J=K,Q="/.opfs-tools-temp-dir";function q(t){return $.apply(this,arguments)}function $(){return($=(0,g._)(function(t){var e;return(0,x._)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,9,,10]),"file"!==t.kind)return[3,6];return[4,t.exists()];case 1:if(!r.sent())return[2,!0];return[4,t.createWriter()];case 2:return[4,(e=r.sent()).truncate(0)];case 3:return r.sent(),[4,e.close()];case 4:return r.sent(),[4,t.remove()];case 5:return r.sent(),[3,8];case 6:return[4,t.remove()];case 7:r.sent(),r.label=8;case 8:return[2,!0];case 9:return[2,(console.warn(r.sent()),!1)];case 10:return[2]}})})).apply(this,arguments)}var tt=[],te=!1;function tr(){return(tr=(0,g._)(function(){var t,e,r,n,s,a,o,l,u,c,h;return(0,x._)(this,function(f){switch(f.label){case 0:if(null==globalThis.localStorage)return[2];t="OPFS_TOOLS_EXPIRES_TMP_FILES",te||(te=!0,globalThis.addEventListener("unload",function(){var e;0!==tt.length&&localStorage.setItem(t,"".concat(null!=(e=localStorage.getItem(t))?e:"",",").concat(tt.join(",")))})),r=null!=(e=localStorage.getItem(t))?e:"",n=!0,s=!1,a=void 0,f.label=1;case 1:f.trys.push([1,7,8,9]),o=r.split(",")[Symbol.iterator](),f.label=2;case 2:if(n=(l=o.next()).done)return[3,6];if(!(c=0!==(u=l.value).length))return[3,4];return[4,q(H("".concat(Q,"/").concat(u)))];case 3:c=f.sent(),f.label=4;case 4:c&&(r=r.replace(u,"")),f.label=5;case 5:return n=!0,[3,2];case 6:return[3,9];case 7:return h=f.sent(),s=!0,a=h,[3,9];case 8:try{n||null==o.return||o.return()}finally{if(s)throw a}return[7];case 9:return localStorage.setItem(t,r.replace(/,{2,}/g,",")),[2]}})})).apply(this,arguments)}function ti(){var t="".concat(Math.random().toString().slice(2),"-").concat(Date.now());return tt.push(t),H("".concat(Q,"/").concat(t))}function tn(t,e){var r,n,s=H(t),a=0,o=s.createWriter(),l=s.createReader(),u=(r=(0,g._)(function(t){var e;return(0,x._)(this,function(r){switch(r.label){case 0:return[4,l];case 1:return[4,r.sent().read(a,{at:Math.round(.3*a)})];case 2:return e=r.sent(),[4,t.write(e,{at:0})];case 3:return a=r.sent(),[4,t.truncate(a)];case 4:return r.sent(),[2]}})}),function(t){return r.apply(this,arguments)});return{append:(n=(0,g._)(function(t){var r,n;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,o];case 1:return[4,(r=n.sent()).write(t)];case 2:if(!((a+=n.sent())>=e))return[3,4];return[4,u(r)];case 3:n.sent(),n.label=4;case 4:return[2]}})}),function(t){return n.apply(this,arguments)}),text:s.text.bind(s),remove:(0,g._)(function(){return(0,x._)(this,function(t){switch(t.label){case 0:return[4,l];case 1:case 3:return[4,t.sent().close()];case 2:return t.sent(),[4,o];case 4:return t.sent(),[4,s.remove()];case 5:return t.sent(),[2]}})}),getSize:(0,g._)(function(){return(0,x._)(this,function(t){return[2,a]})})}}(0,g._)(function(){var t,e,r;return(0,x._)(this,function(e){switch(e.label){case 0:if(!0===globalThis.__opfs_tools_tmpfile_init__)return[3,3];if(globalThis.__opfs_tools_tmpfile_init__=!0,!(r=null!=globalThis.FileSystemDirectoryHandle&&null!=globalThis.FileSystemFileHandle&&(null==(t=globalThis.navigator)?void 0:t.storage.getDirectory)!=null))return[3,2];return setInterval((0,g._)(function(){var t,e,r,n,s,a,o,l,u;return(0,x._)(this,function(l){switch(l.label){case 0:t=!0,e=!1,r=void 0,l.label=1;case 1:return l.trys.push([1,8,9,10]),[4,N(Q).children()];case 2:n=l.sent()[Symbol.iterator](),l.label=3;case 3:if(t=(s=n.next()).done)return[3,7];if(a=s.value,!(null==(o=/^\d+-(\d+)$/.exec(a.name))||Date.now()-Number(o[1])>2592e5))return[3,5];return[4,q(a)];case 4:l.sent(),l.label=5;case 5:l.label=6;case 6:return t=!0,[3,3];case 7:return[3,10];case 8:return u=l.sent(),e=!0,r=u,[3,10];case 9:try{t||null==n.return||n.return()}finally{if(e)throw r}return[7];case 10:return[2]}})}),6e4),[4,function(){return tr.apply(this,arguments)}()];case 1:r=e.sent(),e.label=2;case 2:e.label=3;case 3:return[2]}})})()},{"@swc/helpers/_/_async_iterator":"kdyGG","@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kdyGG:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){var e,r,n,s=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);s--;){if(r&&null!=(e=t[r]))return e.call(t);if(n&&null!=(e=t[n]))return new o(e.call(t));r="@@asyncIterator",n="@@iterator"}throw TypeError("Object is not async iterable")}function o(t){function e(t){if(Object(t)!==t)return Promise.reject(TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then(function(t){return{value:t,done:e}})}return(o=function(t){this.s=t,this.n=t.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var r=this.s.return;return void 0===r?Promise.resolve({value:t,done:!0}):e(r.apply(this.s,arguments))},throw:function(t){var r=this.s.return;return void 0===r?Promise.reject(t):e(r.apply(this.s,arguments))}},new o(t)}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["c4SNP"],"c4SNP","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-tool-thumbnail.js b/docs/compiled/artplayer-tool-thumbnail.js index 697ac1f3d..08c9598b9 100644 --- a/docs/compiled/artplayer-tool-thumbnail.js +++ b/docs/compiled/artplayer-tool-thumbnail.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var d=Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},p.cache={};var u=l[t]=new h.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r[n]}}),r[n]=h;for(var d=0;d{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)}),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){let e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){let t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){let t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);let i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then(()=>this.start());let{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);let r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);let h=r.map((i,n)=>()=>new Promise(r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob(e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()})},this.video.currentTime=i.time}));return this.processing=!0,(0,s.runPromisesInSeries)(h).then(()=>{this.processing=!1,this.emit("done")}).catch(e=>{throw this.processing=!1,this.emit("error",e.message),e})}creatScreenshotDate(){let{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i}))}creatCanvas(){let{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}download(){this.errorHandle(this.file&&this.thumbnailUrl,"Download does not seem to be ready, please create preview first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment...");let e=document.createElement("a"),t=`${(0,s.getFileName)(this.file.name)}.png`;return e.download=t,e.href=this.thumbnailUrl,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.emit("download",t),this}errorHandle(e,t){if(!e)throw this.emit("error",t),Error(t)}destroy(){this.option.fileInput.removeEventListener("change",this.inputChange),this.option.fileInput.removeEventListener("dragover",l.ondragover),this.option.fileInput.removeEventListener("drop",l.ondrop),document.body.removeChild(this.video),this.videoUrl&&URL.revokeObjectURL(this.videoUrl),this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.emit("destroy")}}i.default=l,window.ArtplayerToolThumbnail=l},{"./emitter":"f2NWK","./utils":"kQTVz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f2NWK:[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=class{on(e,t,i){let n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){let n=this;function o(...r){n.off(e,o),t.apply(i,r)}return o._=t,this.on(e,o,i)}emit(e,...t){let i=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;esetTimeout(t,e))}function r(e){return e.reduce((e,t)=>e.then(t),Promise.resolve())}function s(e){let t=e.split(".");return t.pop(),t.join(".")}function l(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}n.defineInteropFlag(i),n.export(i,"sleep",()=>o),n.export(i,"runPromisesInSeries",()=>r),n.export(i,"getFileName",()=>s),n.export(i,"clamp",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["eoujN"],"eoujN","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,i,n,o,r,s,l){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},h="function"==typeof a[n]&&a[n],d=h.i||{},u=h.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,i){if(!u[t]){if(!e[t]){if(o[t])return o[t];var r="function"==typeof a[n]&&a[n];if(!i&&r)return r(t,!0);if(h)return h(t,!0);if(p&&"string"==typeof t)return p(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var l=u[t]=new c.Module(t);e[t][0].call(l.exports,d,l,l.exports,a)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.require=p,this.exports={}},c.modules=e,c.cache=u,c.parent=h,c.distDir=void 0,c.publicUrl=void 0,c.devServer=void 0,c.i=d,c.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(c,"root",{get:function(){return a[n]}}),a[n]=c;for(var f=0;f{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)}),this.option.number=(0,l.clamp)(i,10,1e3),this.option.width=(0,l.clamp)(n,10,1e3),this.option.column=(0,l.clamp)(o,1,1e3),this}static creatVideo(){let e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){let t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){let t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);let i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,l.sleep)(1e3).then(()=>this.start());let{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,l.clamp)(i,0,this.video.duration),this.option.end=(0,l.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);let r=this.creatScreenshotDate(),s=this.creatCanvas(),a=s.getContext("2d");this.emit("canvas",s);let h=r.map((i,n)=>()=>new Promise(r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),s.toBlob(e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()})},this.video.currentTime=i.time}));return this.processing=!0,(0,l.runPromisesInSeries)(h).then(()=>{this.processing=!1,this.emit("done")}).catch(e=>{throw this.processing=!1,this.emit("error",e.message),e})}creatScreenshotDate(){let{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i}))}creatCanvas(){let{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}download(){this.errorHandle(this.file&&this.thumbnailUrl,"Download does not seem to be ready, please create preview first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment...");let e=document.createElement("a"),t=`${(0,l.getFileName)(this.file.name)}.png`;return e.download=t,e.href=this.thumbnailUrl,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.emit("download",t),this}errorHandle(e,t){if(!e)throw this.emit("error",t),Error(t)}destroy(){this.option.fileInput.removeEventListener("change",this.inputChange),this.option.fileInput.removeEventListener("dragover",a.ondragover),this.option.fileInput.removeEventListener("drop",a.ondrop),document.body.removeChild(this.video),this.videoUrl&&URL.revokeObjectURL(this.videoUrl),this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.emit("destroy")}}i.default=a,window.ArtplayerToolThumbnail=a},{"./emitter":"f2NWK","./utils":"kQTVz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f2NWK:[function(e,t,i,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=class{on(e,t,i){let n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){let n=this;function o(...r){n.off(e,o),t.apply(i,r)}return o._=t,this.on(e,o,i)}emit(e,...t){let i=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;esetTimeout(t,e))}function s(e){return e.reduce((e,t)=>e.then(t),Promise.resolve())}function l(e){let t=e.split(".");return t.pop(),t.join(".")}function a(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}o.defineInteropFlag(i),o.export(i,"sleep",()=>r),o.export(i,"runPromisesInSeries",()=>s),o.export(i,"getFileName",()=>l),o.export(i,"clamp",()=>a)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["eoujN"],"eoujN","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer-tool-thumbnail.legacy.js b/docs/compiled/artplayer-tool-thumbnail.legacy.js index 0a31c8b11..4b5f7927f 100644 --- a/docs/compiled/artplayer-tool-thumbnail.legacy.js +++ b/docs/compiled/artplayer-tool-thumbnail.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof i[n]&&i[n],a=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!a[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=a[t]=new c.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return a[t].exports;function p(e){var t=p.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=a,c.parent=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i[n]}}),i[n]=c;for(var u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return(0,i._)(this,r),(e=t.call(this)).processing=!1,e.option={},e.setup(Object.assign({},r.DEFAULTS,n)),e.video=r.creatVideo(),e.duration=0,e.inputChange=e.inputChange.bind((0,o._)(e)),e.ondrop=e.ondrop.bind((0,o._)(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",r.ondragover),e.option.fileInput.addEventListener("drop",r.ondrop),e}return(0,s._)(r,[{key:"ondrop",value:function(e){e.preventDefault();var t=e.dataTransfer.files[0];this.loadVideo(t)}},{key:"setup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=Object.assign({},this.option,t);var r=this.option,n=r.fileInput,o=r.number,i=r.width,s=r.column;if(this.errorHandle(n instanceof Element,"The 'fileInput' is not a Element"),!("INPUT"===n.tagName&&"file"===n.type)){n.style.position="relative";var a=document.createElement("input");a.type="file",a.style.position="absolute",a.style.width="100%",a.style.height="100%",a.style.left="0",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.opacity="0",n.appendChild(a),this.option.fileInput=a}return["number","width","column","begin","end"].forEach(function(t){e.errorHandle("number"==typeof e.option[t],"The '".concat(t,"' is not a number"))}),this.option.number=(0,f.clamp)(o,10,1e3),this.option.width=(0,f.clamp)(i,10,1e3),this.option.column=(0,f.clamp)(s,1,1e3),this}},{key:"inputChange",value:function(e){var t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}},{key:"loadVideo",value:function(e){if(e){var t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,"Playback of this file format is not supported: ".concat(e.type));var r=URL.createObjectURL(e);this.videoUrl=r,this.file=e,this.emit("file",this.file),this.video.src=r,this.emit("video",this.video)}}},{key:"start",value:function(){var e=this;if(!this.video.duration)return(0,f.sleep)(1e3).then(function(){return e.start()});var t=this.option,r=t.width,n=t.number,o=t.begin,i=t.end,s=this.video.videoHeight/this.video.videoWidth*r;this.option.height=s,this.option.begin=(0,f.clamp)(o,0,this.video.duration),this.option.end=(0,f.clamp)(i||this.video.duration,o,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=n/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but got ".concat(this.density));var a=this.creatScreenshotDate(),l=this.creatCanvas(),c=l.getContext("2d");this.emit("canvas",l);var u=a.map(function(t,o){return function(){return new Promise(function(i){e.video.oncanplay=function(){c.drawImage(e.video,t.x,t.y,r,s),l.toBlob(function(t){e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl),e.thumbnailUrl=URL.createObjectURL(t),e.emit("update",e.thumbnailUrl,(o+1)/n),e.video.oncanplay=null,i()})},e.video.currentTime=t.time})}});return this.processing=!0,(0,f.runPromisesInSeries)(u).then(function(){e.processing=!1,e.emit("done")}).catch(function(t){throw e.processing=!1,e.emit("error",t.message),t})}},{key:"creatScreenshotDate",value:function(){for(var e=this.option,t=e.number,r=e.width,n=e.height,o=e.column,i=e.begin,s=this.duration/t,a=[i+s];a.length1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};return(0,s._)(this,t),(e=(0,i._)(this,t)).processing=!1,e.option={},e.setup(Object.assign({},t.DEFAULTS,r)),e.video=t.creatVideo(),e.duration=0,e.inputChange=e.inputChange.bind(e),e.ondrop=e.ondrop.bind(e),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",t.ondragover),e.option.fileInput.addEventListener("drop",t.ondrop),e}return(0,a._)(t,e),(0,l._)(t,[{key:"ondrop",value:function(e){e.preventDefault();var t=e.dataTransfer.files[0];this.loadVideo(t)}},{key:"setup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=Object.assign({},this.option,t);var r=this.option,n=r.fileInput,o=r.number,i=r.width,s=r.column;if(this.errorHandle(n instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==n.tagName||"file"!==n.type){n.style.position="relative";var l=document.createElement("input");l.type="file",l.style.position="absolute",l.style.width="100%",l.style.height="100%",l.style.left="0",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.opacity="0",n.appendChild(l),this.option.fileInput=l}return["number","width","column","begin","end"].forEach(function(t){e.errorHandle("number"==typeof e.option[t],"The '".concat(t,"' is not a number"))}),this.option.number=(0,f.clamp)(o,10,1e3),this.option.width=(0,f.clamp)(i,10,1e3),this.option.column=(0,f.clamp)(s,1,1e3),this}},{key:"inputChange",value:function(e){var t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}},{key:"loadVideo",value:function(e){if(e){var t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,"Playback of this file format is not supported: ".concat(e.type));var r=URL.createObjectURL(e);this.videoUrl=r,this.file=e,this.emit("file",this.file),this.video.src=r,this.emit("video",this.video)}}},{key:"start",value:function(){var e=this;if(!this.video.duration)return(0,f.sleep)(1e3).then(function(){return e.start()});var t=this.option,r=t.width,n=t.number,o=t.begin,i=t.end,s=this.video.videoHeight/this.video.videoWidth*r;this.option.height=s,this.option.begin=(0,f.clamp)(o,0,this.video.duration),this.option.end=(0,f.clamp)(i||this.video.duration,o,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=n/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but got ".concat(this.density));var l=this.creatScreenshotDate(),a=this.creatCanvas(),u=a.getContext("2d");this.emit("canvas",a);var c=l.map(function(t,o){return function(){return new Promise(function(i){e.video.oncanplay=function(){u.drawImage(e.video,t.x,t.y,r,s),a.toBlob(function(t){e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl),e.thumbnailUrl=URL.createObjectURL(t),e.emit("update",e.thumbnailUrl,(o+1)/n),e.video.oncanplay=null,i()})},e.video.currentTime=t.time})}});return this.processing=!0,(0,f.runPromisesInSeries)(c).then(function(){e.processing=!1,e.emit("done")}).catch(function(t){throw e.processing=!1,e.emit("error",t.message),t})}},{key:"creatScreenshotDate",value:function(){for(var e=this.option,t=e.number,r=e.width,n=e.height,o=e.column,i=e.begin,s=this.duration/t,l=[i+s];l.length1?t-1:0),n=1;nt.call(this,this)),G.DEBUG){let e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+G.version),e("Env@"+G.env),e("Build@"+G.build);for(let t=0;te("Event@"+t.type))}X.push(this)}static get instances(){return X}static get version(){return"5.2.3"}static get env(){return"production"}static get build(){return"2025-04-20 09:53:52"}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 g.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:e=>e},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),X.splice(X.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=G,G.STYLE=i.default,G.DEBUG=!1,G.CONTEXTMENU=!0,G.NOTICE_TIME=2e3,G.SETTING_WIDTH=250,G.SETTING_ITEM_WIDTH=200,G.SETTING_ITEM_HEIGHT=35,G.RESIZE_TIME=200,G.SCROLL_TIME=200,G.SCROLL_GAP=50,G.AUTO_PLAYBACK_MAX=10,G.AUTO_PLAYBACK_MIN=5,G.AUTO_PLAYBACK_TIMEOUT=3e3,G.RECONNECT_TIME_MAX=5,G.RECONNECT_SLEEP_TIME=1e3,G.CONTROL_HIDE_TIME=3e3,G.DBCLICK_TIME=300,G.DBCLICK_FULLSCREEN=!0,G.MOBILE_DBCLICK_PLAY=!0,G.MOBILE_CLICK_PLAY=!1,G.AUTO_ORIENTATION_TIME=200,G.INFO_LOOP_TIME=1e3,G.FAST_FORWARD_VALUE=3,G.FAST_FORWARD_TIME=1e3,G.TOUCH_MOVE_RATIO=.5,G.VOLUME_STEP=.1,G.SEEK_STEP=5,G.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],G.ASPECT_RATIO=["default","4:3","16:9"],G.FLIP=["normal","horizontal","vertical"],G.FULLSCREEN_WEB_IN_BODY=!1,G.LOG_VERSION=!0,G.USE_RAF=!1,p.isBrowser&&(window.Artplayer=G,p.setStyleText("artplayer-style",i.default),setTimeout(()=>{G.LOG_VERSION&&console.log(`%c ArtPlayer %c ${G.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"bundle-text:./style/index.less":"0016T","option-validator":"bAWi2","./utils/emitter":"66mFZ","./utils":"71aH7","./scheme":"AKEiO","./config":"lyjeQ","./template":"X13Zf","./i18n":"3jKkj","./player":"a90nx","./control":"8Z0Uf","./contextmenu":"2KYsr","./info":"02ajl","./subtitle":"eSWto","./events":"jo4S1","./hotkey":"6NoFy","./layer":"6G6hZ","./loading":"3dsEe","./notice":"dWGTw","./mask":"5POkG","./icons":"6OeNg","./setting":"3eYNH","./storage":"2aaJe","./plugins":"8MTUM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"0016T":[function(e,t,r){t.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#ffffff40;--art-hover-color:#ffffff40;--art-loaded-color:#ffffff40;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#000000b3;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{zoom:1;text-align:left;user-select:none;box-sizing:border-box;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;direction:ltr;outline:0;width:100%;height:100%;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{vertical-align:top;max-width:100%}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.art-poster{z-index:11;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;width:100%;height:100%;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;width:100%;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;pointer-events:none;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;opacity:0;pointer-events:none;padding:0 var(--art-padding);transition:all var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:flex-end;width:100%;height:100%;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;padding-bottom:var(--art-bottom-gap);position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;width:100%;height:50%;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;background-color:var(--art-hover-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;background-color:var(--art-loaded-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;background-color:var(--art-theme);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;pointer-events:auto;transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);width:100%;height:100%;position:absolute;inset:0 auto 0 0;width:var(--art-highlight-width)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{pointer-events:none;width:100%;height:100%}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 10px);border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{flex:1;justify-content:center;align-items:center;height:100%;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{cursor:pointer;flex:1;justify-content:center;width:100%;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;width:2px;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;background-color:var(--art-theme);width:100%;height:100%;position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;padding:var(--art-padding);pointer-events:none;width:100%;height:auto;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.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{flex-shrink:0;justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;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}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{justify-content:center;align-items:center;min-width:32px;height:24px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{appearance:none;background-color:#fff3;outline:none;width:80px;height:3px}.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:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{text-align:right;width:100px}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;user-select:all;width:250px;overflow:hidden}.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-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;width:320px;height:180px;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.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-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{fill:var(--art-theme);width:15px;height:15px}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-mini-progress-bar .art-bottom,.art-video-player.art-lock .art-bottom{opacity:1;background-image:none;padding:0}.art-video-player.art-mini-progress-bar .art-bottom .art-controls,.art-video-player.art-lock .art-bottom .art-controls,.art-video-player.art-mini-progress-bar .art-bottom .art-progress,.art-video-player.art-lock .art-bottom .art-progress{transform:translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height)/4))}.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,.art-video-player.art-lock .art-bottom .art-progress-indicator{display:none!important}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{justify-content:center;display:flex;position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{flex-shrink:0;justify-content:center;align-items:center;width:100%;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[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:1000001;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}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(e,t,r){var a;a=function(){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 o=e(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(Array.isArray?Array.isArray(r):r instanceof Array)return"array";if(r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(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(r instanceof Date||"function"==typeof r.toDateString&&"function"==typeof r.getDate&&"function"==typeof r.setDate)return"date";if(r instanceof Error||"string"==typeof r.message&&r.constructor&&"number"==typeof r.constructor.stackTraceLimit)return"error";if(r instanceof RegExp||"string"==typeof r.flags&&"boolean"==typeof r.ignoreCase&&"boolean"==typeof r.multiline&&"boolean"==typeof r.global)return"regexp";switch(a(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"==typeof r.throw&&"function"==typeof r.return&&"function"==typeof r.next)return"generator";switch(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(e){return e.constructor?e.constructor.name:null}function o(e,t){var a=2i),a.export(r,"queryAll",()=>n),a.export(r,"addClass",()=>s),a.export(r,"removeClass",()=>l),a.export(r,"hasClass",()=>c),a.export(r,"append",()=>p),a.export(r,"remove",()=>u),a.export(r,"setStyle",()=>d),a.export(r,"setStyles",()=>f),a.export(r,"getStyle",()=>h),a.export(r,"sublings",()=>m),a.export(r,"inverseClass",()=>g),a.export(r,"tooltip",()=>v),a.export(r,"isInViewport",()=>y),a.export(r,"includeFromEvent",()=>b),a.export(r,"replaceElement",()=>x),a.export(r,"createElement",()=>w),a.export(r,"getIcon",()=>j),a.export(r,"setStyleText",()=>k),a.export(r,"supportsFlex",()=>C),a.export(r,"getRect",()=>S),a.export(r,"loadImg",()=>I);var o=e("./compatibility");function i(e,t=document){return t.querySelector(e)}function n(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){for(let r in t)d(e,r,t[r]);return e}function h(e,t,r=!0){let a=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(a):a}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 v(e,t,r="top"){o.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,`hint--${r}`))}function y(e,t=0){let r=e.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,i=r.top-t<=a&&r.top+r.height+t>=0,n=r.left-t<=o+t&&r.left+r.width+t>=0;return i&&n}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function x(e,t){return t.parentNode.replaceChild(e,t),e}function w(e){return document.createElement(e)}function j(e="",t=""){let r=w("i");return s(r,"art-icon"),s(r,`art-icon-${e}`),p(r,t),r}function k(e,t){let r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function C(){let e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function S(e){return e.getBoundingClientRect()}function I(e,t){return new Promise((r,a)=>{let o=new Image;o.onload=function(){if(t&&1!==t){let i=document.createElement("canvas"),n=i.getContext("2d");i.width=o.width*t,i.height=o.height*t,n.drawImage(o,0,0,i.width,i.height),i.toBlob(t=>{let o=URL.createObjectURL(t),i=new Image;i.onload=function(){r(i)},i.onerror=function(){URL.revokeObjectURL(o),a(Error(`Image load failed: ${e}`))},i.src=o})}else r(o)},o.onerror=function(){a(Error(`Image load failed: ${e}`))},o.src=e})}},{"./compatibility":"6ZTr6","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6ZTr6":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"userAgent",()=>o),a.export(r,"isSafari",()=>i),a.export(r,"isWechat",()=>n),a.export(r,"isIE",()=>s),a.export(r,"isAndroid",()=>l),a.export(r,"isIOS",()=>c),a.export(r,"isIOS13",()=>p),a.export(r,"isMobile",()=>u),a.export(r,"isBrowser",()=>d);let o="undefined"!=typeof navigator?navigator.userAgent:"",i=/^((?!chrome|android).)*safari/i.test(o),n=/MicroMessenger/i.test(o),s=/MSIE|Trident/i.test(o),l=/android/i.test(o),c=/iPad|iPhone|iPod/i.test(o)&&!window.MSStream,p=c||o.includes("Macintosh")&&navigator.maxTouchPoints>=1,u=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)||p,d="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hwmZz:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"ArtPlayerError",()=>o),a.export(r,"errorHandle",()=>i);class o extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t||this.constructor),this.name="ArtPlayerError"}}function i(e,t){if(!e)throw new o(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],inzwq:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(e,t,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=r+"00"),2===r.length&&(a=r+"0"),`${t},${a}`}).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"))}function i(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function n(e){let t=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=>{let a=e.match(t);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[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} --> ${e.end}`+"\n"+`${e.text}`:"").filter(e=>e.trim()).join("\n\n")}a.defineInteropFlag(r),a.export(r,"srtToVtt",()=>o),a.export(r,"vttToBlob",()=>i),a.export(r,"assToVtt",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6b7Ip":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){let r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}a.defineInteropFlag(r),a.export(r,"getExt",()=>function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}),a.export(r,"download",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5NSdr":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"def",()=>o),a.export(r,"has",()=>n),a.export(r,"get",()=>s),a.export(r,"mergeDeep",()=>function e(...t){let r=e=>e&&"object"==typeof e&&!Array.isArray(e);return t.reduce((t,a)=>(Object.keys(a).forEach(o=>{let i=t[o],n=a[o];Array.isArray(i)&&Array.isArray(n)?t[o]=i.concat(...n):r(i)&&r(n)?t[o]=e(i,n):t[o]=n}),t),{})});let o=Object.defineProperty,{hasOwnProperty:i}=Object.prototype;function n(e,t){return i.call(e,t)}function s(e,t){return Object.getOwnPropertyDescriptor(e,t)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],epmNy:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e=0){return new Promise(t=>setTimeout(t,e))}function i(e,t){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,e.apply(this,a)),t)}}function n(e,t){let r=!1;return function(...a){r||(e.apply(this,a),r=!0,setTimeout(function(){r=!1},t))}}a.defineInteropFlag(r),a.export(r,"sleep",()=>o),a.export(r,"debounce",()=>i),a.export(r,"throttle",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gapRl:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}function n(e){if(!e)return"00:00";let t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),a=Math.floor(e-3600*t-60*r);return(t>0?[t,r,a]:[r,a]).map(e=>e<10?`0${e}`:String(e)).join(":")}function s(e){return e.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e)}function l(e){let t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp(`(${Object.keys(t).join("|")})`,"g");return e.replace(r,e=>t[e]||e)}a.defineInteropFlag(r),a.export(r,"clamp",()=>o),a.export(r,"capitalize",()=>i),a.export(r,"secondToTime",()=>n),a.export(r,"escape",()=>s),a.export(r,"unescape",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],AKEiO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"ComponentOption",()=>d);var o=e("../utils");let i="array",n="boolean",s="string",l="number",c="object",p="function";function u(e,t,r){return(0,o.errorHandle)(t===s||t===l||e instanceof Element,`${r.join(".")} require '${s}' or 'Element' type`)}let d={html:u,disable:`?${n}`,name:`?${s}`,index:`?${l}`,style:`?${c}`,click:`?${p}`,mounted:`?${p}`,tooltip:`?${s}|${l}`,width:`?${l}`,selector:`?${i}`,onSelect:`?${p}`,switch:`?${n}`,onSwitch:`?${p}`,range:`?${i}`,onRange:`?${p}`,onChange:`?${p}`};r.default={id:s,container:u,url:s,poster:s,type:s,theme:s,lang:s,volume:l,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,gesture:n,fastForward:n,autoPlayback:n,autoOrientation:n,airplay:n,proxy:`?${p}`,plugins:[p],layers:[d],contextmenu:[d],settings:[d],controls:[{...d,position:(e,t,r)=>{let a=["top","left","right"];return(0,o.errorHandle)(a.includes(e),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${n}`,html:s,url:s}],highlight:[{time:l,text:s}],thumbnails:{url:s,number:l,column:l,width:l,height:l,scale:l},subtitle:{url:s,name:s,type:s,style:c,escape:n,encoding:s,onVttLoad:p},moreVideoAttr:c,i18n:c,icons:c,cssVar:c,customType:c}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lyjeQ:[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":"9pCYc"}],X13Zf:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var a=e("./utils");class o{constructor(e){this.art=e;let{option:t,constructor:r}=e;t.container instanceof Element?this.$container=t.container:(this.$container=(0,a.query)(t.container),(0,a.errorHandle)(this.$container,`No container element found by ${t.container}`)),(0,a.errorHandle)((0,a.supportsFlex)(),"The current browser does not support flex layout");let o=this.$container.tagName.toLowerCase();(0,a.errorHandle)("div"===o,`Unsupported container element type, only support 'div' but got '${o}'`),(0,a.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.init()}static get html(){return`
Player version:
5.2.3
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
`}query(e){return(0,a.query)(e,this.$container)}init(){let{option:e}=this.art;if(e.useSSR||(this.$container.innerHTML=o.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),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.$controlsCenter=this.query(".art-controls-center"),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.$contextmenu=this.query(".art-contextmenus"),e.proxy){let t=e.proxy.call(this.art,this.art);(0,a.errorHandle)(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),(0,a.replaceElement)(t,this.$video),t.className="art-video",this.$video=t}e.backdrop&&(0,a.addClass)(this.$player,"art-backdrop"),a.isMobile&&(0,a.addClass)(this.$player,"art-mobile")}destroy(e){this.$video.src="",e?this.$container.innerHTML="":(0,a.addClass)(this.$player,"art-destroy")}}r.default=o},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3jKkj":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("./zh-cn"),n=a.interopDefault(i);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":n.default},this.language={},this.update(e.option.i18n)}init(){let e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=(0,o.mergeDeep)(this.languages,e),this.init()}}},{"../utils":"71aH7","./zh-cn":"5Y91w","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5Y91w":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let a={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","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":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=a,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=a)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],a90nx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./urlMix"),i=a.interopDefault(o),n=e("./attrMix"),s=a.interopDefault(n),l=e("./playMix"),c=a.interopDefault(l),p=e("./pauseMix"),u=a.interopDefault(p),d=e("./toggleMix"),f=a.interopDefault(d),h=e("./seekMix"),m=a.interopDefault(h),g=e("./volumeMix"),v=a.interopDefault(g),y=e("./currentTimeMix"),b=a.interopDefault(y),x=e("./durationMix"),w=a.interopDefault(x),j=e("./switchMix"),k=a.interopDefault(j),C=e("./playbackRateMix"),S=a.interopDefault(C),I=e("./aspectRatioMix"),T=a.interopDefault(I),$=e("./screenshotMix"),E=a.interopDefault($),M=e("./fullscreenMix"),F=a.interopDefault(M),H=e("./fullscreenWebMix"),D=a.interopDefault(H),z=e("./pipMix"),A=a.interopDefault(z),R=e("./loadedMix"),O=a.interopDefault(R),L=e("./playedMix"),Y=a.interopDefault(L),P=e("./playingMix"),V=a.interopDefault(P),q=e("./autoSizeMix"),_=a.interopDefault(q),N=e("./rectMix"),B=a.interopDefault(N),W=e("./flipMix"),U=a.interopDefault(W),K=e("./miniMix"),Z=a.interopDefault(K),X=e("./posterMix"),G=a.interopDefault(X),Q=e("./autoHeightMix"),J=a.interopDefault(Q),ee=e("./cssVarMix"),et=a.interopDefault(ee),er=e("./themeMix"),ea=a.interopDefault(er),eo=e("./typeMix"),ei=a.interopDefault(eo),en=e("./stateMix"),es=a.interopDefault(en),el=e("./subtitleOffsetMix"),ec=a.interopDefault(el),ep=e("./airplayMix"),eu=a.interopDefault(ep),ed=e("./qualityMix"),ef=a.interopDefault(ed),eh=e("./thumbnailsMix"),em=a.interopDefault(eh),eg=e("./optionInit"),ev=a.interopDefault(eg),ey=e("./eventInit"),eb=a.interopDefault(ey);r.default=class{constructor(e){(0,i.default)(e),(0,s.default)(e),(0,c.default)(e),(0,u.default)(e),(0,f.default)(e),(0,m.default)(e),(0,v.default)(e),(0,b.default)(e),(0,w.default)(e),(0,k.default)(e),(0,S.default)(e),(0,T.default)(e),(0,E.default)(e),(0,F.default)(e),(0,D.default)(e),(0,A.default)(e),(0,O.default)(e),(0,Y.default)(e),(0,V.default)(e),(0,_.default)(e),(0,B.default)(e),(0,U.default)(e),(0,Z.default)(e),(0,G.default)(e),(0,J.default)(e),(0,et.default)(e),(0,ea.default)(e),(0,ei.default)(e),(0,es.default)(e),(0,ec.default)(e),(0,eu.default)(e),(0,ef.default)(e),(0,em.default)(e),(0,eb.default)(e),(0,ev.default)(e)}}},{"./urlMix":"kQoac","./attrMix":"deCma","./playMix":"fOJuP","./pauseMix":"fzHAy","./toggleMix":"cBHxQ","./seekMix":"koAPr","./volumeMix":"6eyuR","./currentTimeMix":"faaWv","./durationMix":"5y91K","./switchMix":"iceD8","./playbackRateMix":"keKwh","./aspectRatioMix":"jihET","./screenshotMix":"36kPY","./fullscreenMix":"2GYOJ","./fullscreenWebMix":"5aYAP","./pipMix":"7EnIB","./loadedMix":"3N9mP","./playedMix":"et96R","./playingMix":"9DzzM","./autoSizeMix":"i1LDY","./rectMix":"IqARI","./flipMix":"7E7Vs","./miniMix":"gpugx","./posterMix":"1SuFS","./autoHeightMix":"8x4te","./cssVarMix":"1CaTA","./themeMix":"2FqhO","./typeMix":"1fQQs","./stateMix":"iBOQW","./subtitleOffsetMix":"6vlBV","./airplayMix":"eftqT","./qualityMix":"5SdyX","./thumbnailsMix":"4HcqV","./optionInit":"fCWZK","./eventInit":"f8Lv3","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kQoac:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{option:t,template:{$video:r}}=e;(0,o.def)(e,"url",{get:()=>r.src,async set(a){if(a){let i=e.url,n=t.type||(0,o.getExt)(a),s=t.customType[n];n&&s?(await (0,o.sleep)(),e.loading.show=!0,s.call(e,r,a,e)):(URL.revokeObjectURL(i),r.src=a),i!==e.url&&(e.option.url=a,e.isReady&&i&&e.once("video:canplay",()=>{e.emit("restart",a)}))}else await (0,o.sleep)(),e.loading.show=!0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],deCma:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t}}=e;(0,o.def)(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fOJuP:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,option:a,constructor:{instances:i},template:{$video:n}}=e;(0,o.def)(e,"play",{value:async function(){let o=await n.play();if(r.show=t.get("Play"),e.emit("play"),a.mutex)for(let t=0;ti);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,o.def)(e,"pause",{value(){let o=t.pause();return a.show=r.get("Pause"),e.emit("pause"),o}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cBHxQ:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"toggle",{value:()=>e.playing?e.pause():e.play()})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],koAPr:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{notice:t}=e;(0,o.def)(e,"seek",{set(r){e.currentTime=r,e.duration&&(t.show=`${(0,o.secondToTime)(e.currentTime)} / ${(0,o.secondToTime)(e.duration)}`),e.emit("seek",e.currentTime)}}),(0,o.def)(e,"forward",{set(t){e.seek=e.currentTime+t}}),(0,o.def)(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6eyuR":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a,storage:i}=e;(0,o.def)(e,"volume",{get:()=>t.volume||0,set:e=>{t.volume=(0,o.clamp)(e,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&i.set("volume",t.volume)}}),(0,o.def)(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("muted",r)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],faaWv:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{Number.isNaN(r=parseFloat(r))||(t.currentTime=(0,o.clamp)(r,0,e.duration))}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5y91K":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"duration",{get:()=>{let{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iceD8:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){function t(t,r){return new Promise((a,o)=>{if(t===e.url)return;let{playing:i,aspectRatio:n,playbackRate:s}=e;e.pause(),e.url=t,e.notice.show="",e.once("video:error",o),e.once("video:loadedmetadata",()=>{e.currentTime=r}),e.once("video:canplay",async()=>{e.playbackRate=s,e.aspectRatio=n,i&&await e.play(),e.notice.show="",a()})})}(0,o.def)(e,"switchQuality",{value:r=>t(r,e.currentTime)}),(0,o.def)(e,"switchUrl",{value:e=>t(e,0)}),(0,o.def)(e,"switch",{set:e.switchUrl})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],keKwh:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,o.def)(e,"playbackRate",{get:()=>t.playbackRate,set(o){o?o!==t.playbackRate&&(t.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`):e.playbackRate=1}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jihET:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,template:{$video:a,$player:i}}=e;(0,o.def)(e,"aspectRatio",{get:()=>i.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)(0,o.setStyle)(a,"width",null),(0,o.setStyle)(a,"height",null),(0,o.setStyle)(a,"margin",null),delete i.dataset.aspectRatio;else{let e=n.split(":").map(Number),{clientWidth:t,clientHeight:r}=i,s=e[0]/e[1];t/r>s?((0,o.setStyle)(a,"width",`${s*r}px`),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height",`${t/s}px`),(0,o.setStyle)(a,"margin","auto 0")),i.dataset.aspectRatio=n}r.show=`${t.get("Aspect Ratio")}: ${"default"===n?t.get("Default"):n}`,e.emit("aspectRatio",n)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"36kPY":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{notice:t,template:{$video:r}}=e,a=(0,o.createElement)("canvas");(0,o.def)(e,"getDataURL",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),e(a.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}),(0,o.def)(e,"getBlobUrl",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(t=>{e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}),(0,o.def)(e,"screenshot",{value:async t=>{let a=await e.getDataURL(),i=t||`artplayer_${(0,o.secondToTime)(r.currentTime)}`;return(0,o.download)(a,`${i}.png`),e.emit("screenshot",a),a}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2GYOJ":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>s);var o=e("../libs/screenfull"),i=a.interopDefault(o),n=e("../utils");function s(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e,s=e=>{(0,i.default).on("change",()=>{e.emit("fullscreen",i.default.isFullscreen),i.default.isFullscreen?(e.state="fullscreen",(0,n.addClass)(o,"art-fullscreen")):(0,n.removeClass)(o,"art-fullscreen"),e.emit("resize")}),(0,i.default).on("error",t=>{e.emit("fullscreenError",t)}),(0,n.def)(e,"fullscreen",{get:()=>i.default.isFullscreen,async set(e){e?await (0,i.default).request(o):await (0,i.default).exit()}})},l=e=>{e.proxy(document,"webkitfullscreenchange",()=>{e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,n.def)(e,"fullscreen",{get:()=>document.fullscreenElement===a,set(t){t?(e.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})};e.once("video:loadedmetadata",()=>{i.default.isEnabled?s(e):a.webkitSupportsFullscreen?l(e):(0,n.def)(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),(0,n.def)(e,"fullscreen",(0,n.get)(e,"fullscreen"))})}},{"../libs/screenfull":"8v40z","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8v40z":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let a=[["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"]],o=(()=>{if("undefined"==typeof document)return!1;let e=a[0],t={};for(let r of a)if(r[1]in document){for(let[a,o]of r.entries())t[e[a]]=o;return t}return!1})(),i={change:o.fullscreenchange,error:o.fullscreenerror},n={request:(e=document.documentElement,t)=>new Promise((r,a)=>{let i=()=>{n.off("change",i),r()};n.on("change",i);let s=e[o.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(a)}),exit:()=>new Promise((e,t)=>{if(!n.isFullscreen){e();return}let r=()=>{n.off("change",r),e()};n.on("change",r);let a=document[o.exitFullscreen]();a instanceof Promise&&a.then(r).catch(t)}),toggle:(e,t)=>n.isFullscreen?n.exit():n.request(e,t),onchange(e){n.on("change",e)},onerror(e){n.on("error",e)},on(e,t){let r=i[e];r&&document.addEventListener(r,t,!1)},off(e,t){let r=i[e];r&&document.removeEventListener(r,t,!1)},raw:o};Object.defineProperties(n,{isFullscreen:{get:()=>!!document[o.fullscreenElement]},element:{enumerable:!0,get:()=>document[o.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>!!document[o.fullscreenEnabled]}}),o||(n={isEnabled:!1}),r.default=n},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aYAP":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,template:{$container:r,$player:a}}=e,i="";(0,o.def)(e,"fullscreenWeb",{get:()=>(0,o.hasClass)(a,"art-fullscreen-web"),set(n){n?(i=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),e.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(r,a),i&&(a.style.cssText=i,i=""),(0,o.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7EnIB":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,template:{$video:a}}=e;document.pictureInPictureEnabled?function(e){let{template:{$video:t},proxy:r,notice:a}=e;t.disablePictureInPicture=!1,(0,o.def)(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.state="pip",t.requestPictureInPicture().catch(e=>{throw a.show=e,e})):document.exitPictureInPicture().catch(e=>{throw a.show=e,e})}}),r(t,"enterpictureinpicture",()=>{e.emit("pip",!0)}),r(t,"leavepictureinpicture",()=>{e.emit("pip",!1)})}(e):a.webkitSupportsPresentationMode?function(e){let{$video:t}=e.template;t.webkitSetPresentationMode("inline"),(0,o.def)(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}(e):(0,o.def)(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3N9mP":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"loaded",{get:()=>e.loadedTime/t.duration}),(0,o.def)(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],et96R:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9DzzM":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"playing",{get:()=>"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],i1LDY:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$container:t,$player:r,$video:a}=e.template;(0,o.def)(e,"autoSize",{value(){let{videoWidth:i,videoHeight:n}=a,{width:s,height:l}=(0,o.getRect)(t),c=i/n;s/l>c?((0,o.setStyle)(r,"width",`${l*c/s*100}%`),(0,o.setStyle)(r,"height","100%")):((0,o.setStyle)(r,"width","100%"),(0,o.setStyle)(r,"height",`${s/c/l*100}%`)),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],IqARI:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"rect",{get:()=>(0,o.getRect)(e.template.$player)});let t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[a]})}(0,o.def)(e,"x",{get:()=>e.left+window.pageXOffset}),(0,o.def)(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7E7Vs":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$player:t},i18n:r,notice:a}=e;(0,o.def)(e,"flip",{get:()=>t.dataset.flip||"normal",set(i){i||(i="normal"),"normal"===i?delete t.dataset.flip:t.dataset.flip=i,a.show=`${r.get("Video Flip")}: ${r.get((0,o.capitalize)(i))}`,e.emit("flip",i)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gpugx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{icons:t,proxy:r,storage:a,template:{$player:i,$video:n}}=e,s=!1,l=0,c=0;function p(){let{$mini:t}=e.template;t&&((0,o.removeClass)(i,"art-mini"),(0,o.setStyle)(t,"display","none"),i.prepend(n),e.emit("mini",!1))}function u(t,r){e.playing?((0,o.setStyle)(t,"display","none"),(0,o.setStyle)(r,"display","flex")):((0,o.setStyle)(t,"display","flex"),(0,o.setStyle)(r,"display","none"))}function d(){let{$mini:t}=e.template,r=(0,o.getRect)(t),i=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",i),a.set("left",n),(0,o.setStyle)(t,"top",`${i}px`),(0,o.setStyle)(t,"left",`${n}px`)}(0,o.def)(e,"mini",{get:()=>(0,o.hasClass)(i,"art-mini"),set(f){if(f){e.state="mini",(0,o.addClass)(i,"art-mini");let f=function(){let{$mini:i}=e.template;if(i)return(0,o.append)(i,n),(0,o.setStyle)(i,"display","flex");{let i=(0,o.createElement)("div");(0,o.addClass)(i,"art-mini-popup"),(0,o.append)(document.body,i),e.template.$mini=i,(0,o.append)(i,n);let d=(0,o.append)(i,'
');(0,o.append)(d,t.close),r(d,"click",p);let f=(0,o.append)(i,'
'),h=(0,o.append)(f,t.play),m=(0,o.append)(f,t.pause);return r(h,"click",()=>e.play()),r(m,"click",()=>e.pause()),u(h,m),e.on("video:playing",()=>u(h,m)),e.on("video:pause",()=>u(h,m)),e.on("video:timeupdate",()=>u(h,m)),r(i,"mousedown",e=>{s=0===e.button,l=e.pageX,c=e.pageY}),e.on("document:mousemove",e=>{if(s){(0,o.addClass)(i,"art-mini-droging");let t=e.pageX-l,r=e.pageY-c;(0,o.setStyle)(i,"transform",`translate(${t}px, ${r}px)`)}}),e.on("document:mouseup",()=>{if(s){s=!1,(0,o.removeClass)(i,"art-mini-droging");let e=(0,o.getRect)(i);a.set("left",e.left),a.set("top",e.top),(0,o.setStyle)(i,"left",`${e.left}px`),(0,o.setStyle)(i,"top",`${e.top}px`),(0,o.setStyle)(i,"transform",null)}}),i}}(),h=a.get("top"),m=a.get("left");h&&m?((0,o.setStyle)(f,"top",`${h}px`),(0,o.setStyle)(f,"left",`${m}px`),(0,o.isInViewport)(f)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1SuFS":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$poster:t}}=e;(0,o.def)(e,"poster",{get:()=>{try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set(e){(0,o.setStyle)(t,"backgroundImage",`url(${e})`)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8x4te":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$container:t,$video:r}}=e;(0,o.def)(e,"autoHeight",{value(){let{clientWidth:a}=t,{videoHeight:i,videoWidth:n}=r,s=a/n*i;(0,o.setStyle)(t,"height",s+"px"),e.emit("autoHeight",s)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1CaTA":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$player:t}=e.template;(0,o.def)(e,"cssVar",{value:(e,r)=>r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2FqhO":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"theme",{get:()=>e.cssVar("--art-theme"),set(t){e.cssVar("--art-theme",t)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1fQQs":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"type",{get:()=>e.option.type,set(t){e.option.type=t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iBOQW:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let t=["mini","pip","fullscreen","fullscreenWeb"];(0,o.def)(e,"state",{get:()=>t.find(t=>e[t])||"standard",set(r){for(let a=0;ai);var o=e("../utils");function i(e){let{notice:t,i18n:r,template:a}=e;(0,o.def)(e,"subtitleOffset",{get:()=>a.$track?.offset||0,set(i){let{cues:n}=e.subtitle;if(!a.$track||0===n.length)return;let s=(0,o.clamp)(i,-10,10);a.$track.offset=s;for(let t=0;ti);var o=e("../utils");function i(e){let{i18n:t,notice:r,proxy:a,template:{$video:i}}=e,n=!0;window.WebKitPlaybackTargetAvailabilityEvent&&i.webkitShowPlaybackTargetPicker?a(i,"webkitplaybacktargetavailabilitychanged",e=>{switch(e.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,(0,o.def)(e,"airplay",{value(){n?(i.webkitShowPlaybackTargetPicker(),e.emit("airplay")):r.show=t.get("AirPlay Not Available")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5SdyX":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"quality",{set(t){let{controls:r,notice:a,i18n:o}=e,i=t.find(e=>e.default)||t[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:i?.html||"",selector:t,onSelect:async t=>(await e.switchQuality(t.url),a.show=`${o.get("Switch Video")}: ${t.html}`,t.html)})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4HcqV":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{events:t,option:r,template:{$progress:a,$video:i}}=e,n=null,s=null,l=!1,c=!1,p=!1;t.hover(a,()=>{p=!0},()=>{p=!1}),e.on("setBar",async(t,u,d)=>{let f=e.controls?.thumbnails,{url:h,scale:m}=r.thumbnails;if(!f||!h)return;let g="played"===t&&d&&o.isMobile;if("hover"===t||g){if(l||(l=!0,s=await (0,o.loadImg)(h,m),c=!0),!c||!p)return;let t=a.clientWidth*u;(0,o.setStyle)(f,"display","flex"),t>0&&ta.clientWidth-f/2?(0,o.setStyle)(n,"left",`${a.clientWidth-f}px`):(0,o.setStyle)(n,"left",`${t-f/2}px`)}(t):o.isMobile||(0,o.setStyle)(f,"display","none"),g&&(clearTimeout(n),n=setTimeout(()=>{(0,o.setStyle)(f,"display","none")},500))}}),(0,o.def)(e,"thumbnails",{get:()=>e.option.thumbnails,set(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(n),n=null,s=null,l=!1,c=!1)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fCWZK:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{option:t,storage:r,template:{$video:a,$poster:i}}=e;for(let r in t.moreVideoAttr)e.attr(r,t.moreVideoAttr[r]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,o.clamp)(t.volume,0,1));let n=r.get("volume");for(let r in"number"==typeof n&&(a.volume=(0,o.clamp)(n,0,1)),t.poster&&(0,o.setStyle)(i,"backgroundImage",`url(${t.poster})`),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(r,t.cssVar[r]);e.url=t.url}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f8Lv3:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>s);var o=e("../config"),i=a.interopDefault(o),n=e("../utils");function s(e){let{i18n:t,notice:r,option:a,constructor:o,proxy:s,template:{$player:l,$video:c,$poster:p}}=e,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",()=>{a.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 i=>{u{e.emit("resize"),n.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",()=>{e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",()=>{e.controls.show=!0,e.mask.show=!0}),e.on("video:play",()=>{e.mask.show=!1,(0,n.setStyle)(p,"display","none")}),e.on("video:playing",()=>{e.mask.show=!1}),e.on("video:progress",()=>{e.playing&&(e.loading.show=!1)}),e.on("video:seeked",()=>{e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",()=>{e.loading.show=!0,e.mask.show=!1}),e.on("video:timeupdate",()=>{e.mask.show=!1}),e.on("video:waiting",()=>{e.loading.show=!0,e.mask.show=!1})}},{"../config":"lyjeQ","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8Z0Uf":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils/component"),i=a.interopDefault(o),n=e("./fullscreen"),s=a.interopDefault(n),l=e("./fullscreenWeb"),c=a.interopDefault(l),p=e("./pip"),u=a.interopDefault(p),d=e("./playAndPause"),f=a.interopDefault(d),h=e("./progress"),m=a.interopDefault(h),g=e("./time"),v=a.interopDefault(g),y=e("./volume"),b=a.interopDefault(y),x=e("./setting"),w=a.interopDefault(x),j=e("./screenshot"),k=a.interopDefault(j),C=e("./airplay"),S=a.interopDefault(C),I=e("../utils");class T extends i.default{constructor(e){super(e),this.isHover=!1,this.name="control",this.timer=Date.now();let{constructor:t}=e,{$player:r,$bottom:a}=this.art.template;e.on("mousemove",()=>{I.isMobile||(this.show=!0)}),e.on("click",()=>{I.isMobile?this.toggle():this.show=!0}),e.on("document:mousemove",e=>{this.isHover=(0,I.includeFromEvent)(e,a)}),e.on("video:timeupdate",()=>{!e.setting.show&&!this.isHover&&!e.isInput&&e.playing&&this.show&&Date.now()-this.timer>=t.CONTROL_HIDE_TIME&&(this.show=!1)}),e.on("control",e=>{e?((0,I.removeClass)(r,"art-hide-cursor"),(0,I.addClass)(r,"art-hover"),this.timer=Date.now()):((0,I.addClass)(r,"art-hide-cursor"),(0,I.removeClass)(r,"art-hover"))}),this.init()}init(){let{option:e}=this.art;e.isLive||this.add((0,m.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,f.default)({name:"playAndPause",position:"left",index:10})),this.add((0,b.default)({name:"volume",position:"left",index:20})),e.isLive||this.add((0,v.default)({name:"time",position:"left",index:30})),e.quality.length&&(0,I.sleep)().then(()=>{this.art.quality=e.quality}),e.screenshot&&!I.isMobile&&this.add((0,k.default)({name:"screenshot",position:"right",index:20})),e.setting&&this.add((0,w.default)({name:"setting",position:"right",index:30})),e.pip&&this.add((0,u.default)({name:"pip",position:"right",index:40})),e.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,S.default)({name:"airplay",position:"right",index:50})),e.fullscreenWeb&&this.add((0,c.default)({name:"fullscreenWeb",position:"right",index:60})),e.fullscreen&&this.add((0,s.default)({name:"fullscreen",position:"right",index:70}));for(let t=0;te.selector}),(0,I.def)(r,"$control_item",{get:()=>a}),(0,I.def)(r,"$control_value",{get:()=>o})}let n=a(i,"click",async t=>{let r=t.composedPath()||[],a=e.selector.find(e=>e.$control_item===r.find(t=>e.$control_item===t));this.check(a),e.onSelect&&(o.innerHTML=await e.onSelect.call(this.art,a,a.$control_item,t))});r.push(n)}}r.default=T},{"../utils/component":"18nVI","./fullscreen":"c61Lj","./fullscreenWeb":"03jeB","./pip":"u8l8e","./playAndPause":"ebXtb","./progress":"bgoVP","./time":"ikc2j","./volume":"b8NFx","./setting":"03o9l","./screenshot":"4KCF5","./airplay":"4IS2d","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"18nVI":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./dom"),i=e("./error"),n=e("option-validator"),s=a.interopDefault(n),l=e("../scheme");r.default=class{constructor(e){this.id=0,this.art=e,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return(0,o.hasClass)(this.art.template.$player,`art-${this.name}-show`)}set show(e){let{$player:t}=this.art.template,r=`art-${this.name}-show`;e?(0,o.addClass)(t,r):(0,o.removeClass)(t,r),this.art.emit(this.name,e)}toggle(){this.show=!this.show}add(e){let t="function"==typeof e?e(this.art):e;if(t.html=t.html||"",(0,s.default)(t,l.ComponentOption),!this.$parent||!this.name||t.disable)return;let r=t.name||`${this.name}${this.id}`,a=this.cache.get(r);(0,i.errorHandle)(!a,`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;let n=(0,o.createElement)("div");(0,o.addClass)(n,`art-${this.name}`),(0,o.addClass)(n,`art-${this.name}-${r}`);let c=Array.from(this.$parent.children);n.dataset.index=t.index||this.id;let p=c.find(e=>Number(e.dataset.index)>=Number(n.dataset.index));p?p.insertAdjacentElement("beforebegin",n):(0,o.append)(this.$parent,n),t.html&&(0,o.append)(n,t.html),t.style&&(0,o.setStyles)(n,t.style),t.tooltip&&(0,o.tooltip)(n,t.tooltip);let u=[];if(t.click){let e=this.art.events.proxy(n,"click",e=>{e.preventDefault(),t.click.call(this.art,this,e)});u.push(e)}return t.selector&&["left","right"].includes(t.position)&&this.selector(t,n,u),this[r]=n,this.cache.set(r,{$ref:n,events:u,option:t}),t.mounted&&t.mounted.call(this.art,n),n}remove(e){let t=this.cache.get(e);(0,i.errorHandle)(t,`Can't find [${e}] from the [${this.name}]`),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(let e=0;ei);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.fullscreenOn),s=(0,o.append)(e,a.fullscreenOff);(0,o.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreen=!t.fullscreen}),t.on("fullscreen",t=>{t?((0,o.tooltip)(e,i.get("Exit Fullscreen")),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(e,i.get("Fullscreen")),(0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03jeB":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.fullscreenWebOn),s=(0,o.append)(e,a.fullscreenWebOff);(0,o.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreenWeb=!t.fullscreenWeb}),t.on("fullscreenWeb",t=>{t?((0,o.tooltip)(e,i.get("Exit Web Fullscreen")),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(e,i.get("Web Fullscreen")),(0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],u8l8e:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t;(0,o.append)(e,a.pip),r(e,"click",()=>{t.pip=!t.pip}),t.on("pip",t=>{(0,o.tooltip)(e,i.get(t?"Exit PIP Mode":"PIP Mode"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ebXtb:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.play),s=(0,o.append)(e,a.pause);function l(){(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(s,"display","none")}function c(){(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","flex")}(0,o.tooltip)(n,i.get("Play")),(0,o.tooltip)(s,i.get("Pause")),r(n,"click",()=>{t.play()}),r(s,"click",()=>{t.pause()}),t.playing?c():l(),t.on("video:playing",()=>{c()}),t.on("video:pause",()=>{l()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bgoVP:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"getPosFromEvent",()=>i),a.export(r,"setCurrentTime",()=>n),a.export(r,"default",()=>s);var o=e("../utils");function i(e,t){let{$progress:r}=e.template,{left:a}=(0,o.getRect)(r),i=o.isMobile?t.touches[0].clientX:t.clientX,n=(0,o.clamp)(i-a,0,r.clientWidth),s=n/r.clientWidth*e.duration,l=(0,o.secondToTime)(s),c=(0,o.clamp)(n/r.clientWidth,0,1);return{second:s,time:l,width:n,percentage:c}}function n(e,t){if(e.isRotate){let r=t.touches[0].clientY/e.height,a=r*e.duration;e.emit("setBar","played",r,t),e.seek=a}else{let{second:r,percentage:a}=i(e,t);e.emit("setBar","played",a,t),e.seek=r}}function s(e){return t=>{let{icons:r,option:a,proxy:s}=t;return{...e,html:`
`,mounted:e=>{let l=null,c=!1,p=(0,o.query)(".art-progress-hover",e),u=(0,o.query)(".art-progress-loaded",e),d=(0,o.query)(".art-progress-played",e),f=(0,o.query)(".art-progress-highlight",e),h=(0,o.query)(".art-progress-indicator",e),m=(0,o.query)(".art-progress-tip",e);function g(r,a){let{width:n,time:s}=a||i(t,r);m.innerText=s;let l=m.clientWidth;n<=l/2?(0,o.setStyle)(m,"left",0):n>e.clientWidth-l/2?(0,o.setStyle)(m,"left",`${e.clientWidth-l}px`):(0,o.setStyle)(m,"left",`${n-l/2}px`)}r.indicator?(0,o.append)(h,r.indicator):(0,o.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,a,i){let n="played"===r&&i&&o.isMobile;"loaded"===r&&(0,o.setStyle)(u,"width",`${100*a}%`),"hover"===r&&(0,o.setStyle)(p,"width",`${100*a}%`),"played"===r&&((0,o.setStyle)(d,"width",`${100*a}%`),(0,o.setStyle)(h,"left",`${100*a}%`)),n&&((0,o.setStyle)(m,"display","flex"),g(i,{width:e.clientWidth*a,time:(0,o.secondToTime)(a*t.duration)}),clearTimeout(l),l=setTimeout(()=>{(0,o.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){f.innerText="";for(let e=0;e`;(0,o.append)(f,n)}}),t.on("video:progress",()=>{t.emit("setBar","loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",()=>{t.emit("setBar","played",t.played)}):t.on("video:timeupdate",()=>{t.emit("setBar","played",t.played)}),t.on("video:ended",()=>{t.emit("setBar","played",1)}),t.emit("setBar","loaded",t.loaded||0),o.isMobile||(s(e,"click",e=>{e.target!==h&&n(t,e)}),s(e,"mousemove",r=>{let{percentage:a}=i(t,r);t.emit("setBar","hover",a,r),(0,o.setStyle)(m,"display","flex"),(0,o.includeFromEvent)(r,f)?function(r){let{width:a}=i(t,r),{text:n}=r.target.dataset;m.innerText=n;let s=m.clientWidth;a<=s/2?(0,o.setStyle)(m,"left",0):a>e.clientWidth-s/2?(0,o.setStyle)(m,"left",`${e.clientWidth-s}px`):(0,o.setStyle)(m,"left",`${a-s/2}px`)}(r):g(r)}),s(e,"mouseleave",e=>{(0,o.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),s(e,"mousedown",e=>{c=0===e.button}),t.on("document:mousemove",e=>{if(c){let{second:r,percentage:a}=i(t,e);t.emit("setBar","played",a,e),t.seek=r}}),t.on("document:mouseup",()=>{c&&(c=!1)}))}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ikc2j:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,style:o.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:e=>{function r(){let r=`${(0,o.secondToTime)(t.currentTime)} / ${(0,o.secondToTime)(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();let a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;ei);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a}=t,i=(0,o.append)(e,a.volume),n=(0,o.append)(e,a.volumeClose),s=(0,o.append)(e,'
'),l=(0,o.append)(s,'
'),c=(0,o.append)(l,'
'),p=(0,o.append)(l,'
'),u=(0,o.append)(p,'
'),d=(0,o.append)(u,'
'),f=(0,o.append)(p,'
');function h(e){let{top:t,height:r}=(0,o.getRect)(p);return 1-(e.clientY-t)/r}function m(){if(t.muted||0===t.volume)(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(f,"top","100%"),(0,o.setStyle)(d,"top","100%"),c.innerText=0;else{let e=100*t.volume;(0,o.setStyle)(i,"display","flex"),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(f,"top",`${100-e}%`),(0,o.setStyle)(d,"top",`${100-e}%`),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(i,"click",()=>{t.muted=!0}),r(n,"click",()=>{t.muted=!1}),o.isMobile)(0,o.setStyle)(s,"display","none");else{let e=!1;r(p,"mousedown",r=>{e=0===r.button,t.volume=h(r)}),t.on("document:mousemove",r=>{e&&(t.muted=!1,t.volume=h(r))}),t.on("document:mouseup",()=>{e&&(e=!1)})}}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03o9l":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t;(0,o.append)(e,a.setting),r(e,"click",()=>{t.setting.toggle(),t.setting.resize()}),t.on("setting",t=>{(0,o.tooltip)(e,i.get(t?"Hide Setting":"Show Setting"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4KCF5":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{let{proxy:r,icons:a}=t;(0,o.append)(e,a.screenshot),r(e,"click",()=>{t.screenshot()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IS2d":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("AirPlay"),mounted:e=>{let{proxy:r,icons:a}=t;(0,o.append)(e,a.airplay),r(e,"click",()=>t.airplay())}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2KYsr":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("../utils/component"),n=a.interopDefault(i),s=e("./playbackRate"),l=a.interopDefault(s),c=e("./aspectRatio"),p=a.interopDefault(c),u=e("./flip"),d=a.interopDefault(u),f=e("./info"),h=a.interopDefault(f),m=e("./version"),g=a.interopDefault(m),v=e("./close"),y=a.interopDefault(v);class b extends n.default{constructor(e){super(e),this.name="contextmenu",this.$parent=e.template.$contextmenu,o.isMobile||this.init()}init(){let{option:e,proxy:t,template:{$player:r,$contextmenu:a}}=this.art;e.playbackRate&&this.add((0,l.default)({name:"playbackRate",index:10})),e.aspectRatio&&this.add((0,p.default)({name:"aspectRatio",index:20})),e.flip&&this.add((0,d.default)({name:"flip",index:30})),this.add((0,h.default)({name:"info",index:40})),this.add((0,g.default)({name:"version",index:50})),this.add((0,y.default)({name:"close",index:60}));for(let t=0;t{if(!this.art.constructor.CONTEXTMENU)return;e.preventDefault(),this.show=!0;let t=e.clientX,i=e.clientY,{height:n,width:s,left:l,top:c}=(0,o.getRect)(r),{height:p,width:u}=(0,o.getRect)(a),d=t-l,f=i-c;t+u>l+s&&(d=s-u),i+p>c+n&&(f=n-p),(0,o.setStyles)(a,{top:`${f}px`,left:`${d}px`})}),t(r,"click",e=>{(0,o.includeFromEvent)(e,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}r.default=b},{"../utils":"71aH7","../utils/component":"18nVI","./playbackRate":"69eLi","./aspectRatio":"lUefg","./flip":"kysiM","./info":"gqIgJ","./version":"kRU7C","./close":"jQ8Pm","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"69eLi":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{PLAYBACK_RATE:a}}=t,i=a.map(e=>`${1===e?r.get("Normal"):e.toFixed(1)}`).join("");return{...e,html:`${r.get("Play Speed")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.playbackRate=Number(a),e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="1"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("video:ratechange",()=>{let r=(0,o.queryAll)("span",e).find(e=>Number(e.dataset.value)===t.playbackRate);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lUefg:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{ASPECT_RATIO:a}}=t,i=a.map(e=>`${"default"===e?r.get("Default"):e}`).join("");return{...e,html:`${r.get("Aspect Ratio")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.aspectRatio=a,e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="default"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("aspectRatio",t=>{let r=(0,o.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kysiM:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{FLIP:a}}=t,i=a.map(e=>`${r.get((0,o.capitalize)(e))}`).join("");return{...e,html:`${r.get("Video Flip")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.flip=a.toLowerCase(),e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="normal"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("flip",t=>{let r=(0,o.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gqIgJ:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kRU7C:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return{...e,html:'ArtPlayer 5.2.3'}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jQ8Pm:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"02ajl":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./utils"),i=e("./utils/component"),n=a.interopDefault(i);class s extends n.default{constructor(e){super(e),this.name="info",o.isMobile||this.init()}init(){let{proxy:e,constructor:t,template:{$infoPanel:r,$infoClose:a,$video:i}}=this.art;e(a,"click",()=>{this.show=!1});let n=null,s=(0,o.queryAll)("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function e(){for(let e=0;enull,this.init(e.option.subtitle);let t=!1;e.on("video:timeupdate",()=>{if(!this.url)return;let e=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof e&&e!==t&&(t=e,this.createTrack(e?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(e,t){let{$subtitle:r}=this.art.template;return"object"==typeof e?(0,o.setStyles)(r,e):(0,o.setStyle)(r,e,t)}update(){let{option:{subtitle:e},template:{$subtitle:t}}=this.art;t.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),t.innerHTML=this.activeCues.map((t,r)=>t.text.split(/\r?\n/).filter(e=>e.trim()).map(t=>`
${e.escape?(0,o.escape)(t):t}
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(e,t={}){let{i18n:r,notice:a,option:o}=this.art,i={...o.subtitle,...t,url:e},n=await this.init(i);return t.name&&(a.show=`${r.get("Switch Subtitle")}: ${t.name}`),n}createTrack(e,t){let{template:r,proxy:a,option:i}=this.art,{$video:n,$track:s}=r,l=(0,o.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.label=i.subtitle.name||"Artplayer",l.track.mode="hidden",l.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),s.onload=null,(0,o.remove)(s),(0,o.append)(n,l),r.$track=l,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(e){let{notice:t,template:{$subtitle:r}}=this.art;return this.textTrack?((0,l.default)(e,p.default.subtitle),e.url)?(this.option=e,this.style(e.style),fetch(e.url).then(e=>e.arrayBuffer()).then(t=>{let r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,o.getExt)(e.url)){case"srt":{let t=(0,o.srtToVtt)(r),a=e.onVttLoad(t);return(0,o.vttToBlob)(a)}case"ass":{let t=(0,o.assToVtt)(r),a=e.onVttLoad(t);return(0,o.vttToBlob)(a)}case"vtt":{let t=e.onVttLoad(r);return(0,o.vttToBlob)(t)}default:return e.url}}).then(e=>(r.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.createTrack("metadata",e)),e)).catch(e=>{throw r.innerHTML="",t.show=e,e})):void 0:null}}r.default=u},{"./utils":"71aH7","./utils/component":"18nVI","option-validator":"bAWi2","./scheme":"AKEiO","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jo4S1:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./clickInit"),i=a.interopDefault(o),n=e("./hoverInit"),s=a.interopDefault(n),l=e("./moveInit"),c=a.interopDefault(l),p=e("./resizeInit"),u=a.interopDefault(p),d=e("./gestureInit"),f=a.interopDefault(d),h=e("./viewInit"),m=a.interopDefault(h),g=e("./documentInit"),v=a.interopDefault(g),y=e("./updateInit"),b=a.interopDefault(y),x=e("./restoreInit"),w=a.interopDefault(x);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,i.default)(e,this),(0,s.default)(e,this),(0,c.default)(e,this),(0,u.default)(e,this),(0,f.default)(e,this),(0,m.default)(e,this),(0,v.default)(e,this),(0,b.default)(e,this),(0,w.default)(e,this)}proxy(e,t,r,a={}){if(Array.isArray(t))return t.map(t=>this.proxy(e,t,r,a));e.addEventListener(t,r,a);let o=()=>e.removeEventListener(t,r,a);return this.destroyEvents.push(o),o}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}remove(e){let t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}destroy(){for(let e=0;ei);var o=e("../utils");function i(e,t){let{constructor:r,template:{$player:a,$video:i}}=e;t.proxy(document,["click","contextmenu"],t=>{(0,o.includeFromEvent)(t,a)?(e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit("focus",t)):(e.isInput=!1,e.isFocus=!1,e.emit("blur",t))});let n=[];t.proxy(i,"click",t=>{let a=Date.now();n.push(a);let{MOBILE_CLICK_PLAY:i,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r,p=n.filter(e=>a-e<=s);switch(p.length){case 1:e.emit("click",t),o.isMobile?!e.isLock&&i&&e.toggle():e.toggle(),n=p;break;case 2:e.emit("dblclick",t),o.isMobile?!e.isLock&&l&&e.toggle():c&&(e.fullscreen=!e.fullscreen),n=[];break;default:n=[]}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4jWHi":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{$player:r}=e.template;t.hover(r,t=>{(0,o.addClass)(r,"art-hover"),e.emit("hover",!0,t)},t=>{(0,o.removeClass)(r,"art-hover"),e.emit("hover",!1,t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eqaUm:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){let{$player:r}=e.template;t.proxy(r,"mousemove",t=>{e.emit("mousemove",t)})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eDXPO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{option:r,constructor:a}=e;e.on("resize",()=>{let{aspectRatio:t,notice:a}=e;"standard"===e.state&&r.autoSize&&e.autoSize(),e.aspectRatio=t,a.show=""});let i=(0,o.debounce)(()=>e.emit("resize"),a.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],()=>i()),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",()=>i())}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"95GtS":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>n);var o=e("../utils"),i=e("../control/progress");function n(e,t){if(o.isMobile&&!e.option.isLive){let{$video:r,$progress:a}=e.template,n=null,s=!1,l=0,c=0,p=0,u=t=>{if(1===t.touches.length&&!e.isLock){n===a&&(0,i.setCurrentTime)(e,t),s=!0;let{pageX:r,pageY:o}=t.touches[0];l=r,c=o,p=e.currentTime}},d=t=>{if(1===t.touches.length&&s&&e.duration){let{pageX:a,pageY:i}=t.touches[0],s=function(e,t,r,a){var o=t-a,i=r-e,n=0;if(2>Math.abs(i)&&2>Math.abs(o))return n;var s=180*Math.atan2(o,i)/Math.PI;return s>=-45&&s<45?n=4:s>=45&&s<135?n=1:s>=-135&&s<-45?n=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(n=3),n}(l,c,a,i),u=[3,4].includes(s),d=[1,2].includes(s);if(u&&!e.isRotate||d&&e.isRotate){let s=(0,o.clamp)((a-l)/e.width,-1,1),u=(0,o.clamp)((i-c)/e.height,-1,1),d=e.isRotate?u:s,f=n===r?e.constructor.TOUCH_MOVE_RATIO:1,h=(0,o.clamp)(p+e.duration*d*f,0,e.duration);e.seek=h,e.emit("setBar","played",(0,o.clamp)(h/e.duration,0,1),t),e.notice.show=`${(0,o.secondToTime)(h)} / ${(0,o.secondToTime)(e.duration)}`}}};e.option.gesture&&(t.proxy(r,"touchstart",e=>{n=r,u(e)}),t.proxy(r,"touchmove",d)),t.proxy(a,"touchstart",e=>{n=a,u(e)}),t.proxy(a,"touchmove",d),t.proxy(document,"touchend",()=>{s&&(l=0,c=0,p=0,s=!1,n=null)})}}},{"../utils":"71aH7","../control/progress":"bgoVP","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],InUBx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{option:r,constructor:a,template:{$container:i}}=e,n=(0,o.throttle)(()=>{e.emit("view",(0,o.isInViewport)(i,a.SCROLL_GAP))},a.SCROLL_TIME);t.proxy(window,"scroll",()=>n()),e.on("view",t=>{r.autoMini&&(e.mini=!t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hoLfM:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){t.proxy(document,"mousemove",t=>{e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",t=>{e.emit("document:mouseup",t)})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cl8m3:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(e.constructor.USE_RAF){let t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",()=>{cancelAnimationFrame(t)})}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bK8As:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6NoFy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var a=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.option.hotkey&&!a.isMobile&&this.init()}init(){let{proxy:e,constructor:t}=this.art;this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP}),e(document,"keydown",e=>{if(this.art.isFocus){let t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey){let t=this.keys[e.code];if(t){e.preventDefault();for(let r=0;r{o.innerText="",(0,a.removeClass)(r,"art-notice-show")},t.NOTICE_TIME)):(0,a.removeClass)(r,"art-notice-show")}}},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5POkG":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./utils"),i=e("./utils/component"),n=a.interopDefault(i);class s extends n.default{constructor(e){super(e),this.name="mask";let{template:t,icons:r,events:a}=e,i=(0,o.append)(t.$state,r.state),n=(0,o.append)(t.$state,r.error);(0,o.setStyle)(n,"display","none"),e.on("destroy",()=>{(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(n,"display",null)}),a.proxy(t.$state,"click",()=>e.play())}}r.default=s},{"./utils":"71aH7","./utils/component":"18nVI","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6OeNg":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("bundle-text:./loading.svg"),n=a.interopDefault(i),s=e("bundle-text:./state.svg"),l=a.interopDefault(s),c=e("bundle-text:./check.svg"),p=a.interopDefault(c),u=e("bundle-text:./play.svg"),d=a.interopDefault(u),f=e("bundle-text:./pause.svg"),h=a.interopDefault(f),m=e("bundle-text:./volume.svg"),g=a.interopDefault(m),v=e("bundle-text:./volume-close.svg"),y=a.interopDefault(v),b=e("bundle-text:./screenshot.svg"),x=a.interopDefault(b),w=e("bundle-text:./setting.svg"),j=a.interopDefault(w),k=e("bundle-text:./arrow-left.svg"),C=a.interopDefault(k),S=e("bundle-text:./arrow-right.svg"),I=a.interopDefault(S),T=e("bundle-text:./playback-rate.svg"),$=a.interopDefault(T),E=e("bundle-text:./aspect-ratio.svg"),M=a.interopDefault(E),F=e("bundle-text:./config.svg"),H=a.interopDefault(F),D=e("bundle-text:./pip.svg"),z=a.interopDefault(D),A=e("bundle-text:./lock.svg"),R=a.interopDefault(A),O=e("bundle-text:./unlock.svg"),L=a.interopDefault(O),Y=e("bundle-text:./fullscreen-off.svg"),P=a.interopDefault(Y),V=e("bundle-text:./fullscreen-on.svg"),q=a.interopDefault(V),_=e("bundle-text:./fullscreen-web-off.svg"),N=a.interopDefault(_),B=e("bundle-text:./fullscreen-web-on.svg"),W=a.interopDefault(B),U=e("bundle-text:./switch-on.svg"),K=a.interopDefault(U),Z=e("bundle-text:./switch-off.svg"),X=a.interopDefault(Z),G=e("bundle-text:./flip.svg"),Q=a.interopDefault(G),J=e("bundle-text:./error.svg"),ee=a.interopDefault(J),et=e("bundle-text:./close.svg"),er=a.interopDefault(et),ea=e("bundle-text:./airplay.svg"),eo=a.interopDefault(ea);r.default=class{constructor(e){let t={loading:n.default,state:l.default,play:d.default,pause:h.default,check:p.default,volume:g.default,volumeClose:y.default,screenshot:x.default,setting:j.default,pip:z.default,arrowLeft:C.default,arrowRight:I.default,playbackRate:$.default,aspectRatio:M.default,config:H.default,lock:R.default,flip:Q.default,unlock:L.default,fullscreenOff:P.default,fullscreenOn:q.default,fullscreenWebOff:N.default,fullscreenWebOn:W.default,switchOn:K.default,switchOff:X.default,error:ee.default,close:er.default,airplay:eo.default,...e.option.icons};for(let e in t)(0,o.def)(this,e,{get:()=>(0,o.getIcon)(e,t[e])})}}},{"../utils":"71aH7","bundle-text:./loading.svg":"7tDub","bundle-text:./state.svg":"1ElZc","bundle-text:./check.svg":"lmgoP","bundle-text:./play.svg":"lVWoQ","bundle-text:./pause.svg":"5Mnax","bundle-text:./volume.svg":"w3eIa","bundle-text:./volume-close.svg":"rHjo1","bundle-text:./screenshot.svg":"2KcqM","bundle-text:./setting.svg":"8rQMV","bundle-text:./arrow-left.svg":"kqGBE","bundle-text:./arrow-right.svg":"aFjpC","bundle-text:./playback-rate.svg":"lx7ZM","bundle-text:./aspect-ratio.svg":"2sEjf","bundle-text:./config.svg":"fQTgE","bundle-text:./pip.svg":"2CaxO","bundle-text:./lock.svg":"aCGnW","bundle-text:./unlock.svg":"bTrAV","bundle-text:./fullscreen-off.svg":"bA3p0","bundle-text:./fullscreen-on.svg":"fTuY8","bundle-text:./fullscreen-web-off.svg":"tvKf4","bundle-text:./fullscreen-web-on.svg":"1F1oB","bundle-text:./switch-on.svg":"7qNHs","bundle-text:./switch-off.svg":"28aV8","bundle-text:./flip.svg":"1uXI6","bundle-text:./error.svg":"9f4dh","bundle-text:./close.svg":"4nTtS","bundle-text:./airplay.svg":"cDPXC","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7tDub":[function(e,t,r){t.exports=''},{}],"1ElZc":[function(e,t,r){t.exports=''},{}],lmgoP:[function(e,t,r){t.exports=''},{}],lVWoQ:[function(e,t,r){t.exports=''},{}],"5Mnax":[function(e,t,r){t.exports=''},{}],w3eIa:[function(e,t,r){t.exports=''},{}],rHjo1:[function(e,t,r){t.exports=''},{}],"2KcqM":[function(e,t,r){t.exports=''},{}],"8rQMV":[function(e,t,r){t.exports=''},{}],kqGBE:[function(e,t,r){t.exports=''},{}],aFjpC:[function(e,t,r){t.exports=''},{}],lx7ZM:[function(e,t,r){t.exports=''},{}],"2sEjf":[function(e,t,r){t.exports=''},{}],fQTgE:[function(e,t,r){t.exports=''},{}],"2CaxO":[function(e,t,r){t.exports=''},{}],aCGnW:[function(e,t,r){t.exports=''},{}],bTrAV:[function(e,t,r){t.exports=''},{}],bA3p0:[function(e,t,r){t.exports=''},{}],fTuY8:[function(e,t,r){t.exports=''},{}],tvKf4:[function(e,t,r){t.exports=''},{}],"1F1oB":[function(e,t,r){t.exports=''},{}],"7qNHs":[function(e,t,r){t.exports=''},{}],"28aV8":[function(e,t,r){t.exports=''},{}],"1uXI6":[function(e,t,r){t.exports=''},{}],"9f4dh":[function(e,t,r){t.exports=''},{}],"4nTtS":[function(e,t,r){t.exports=''},{}],cDPXC:[function(e,t,r){t.exports=''},{}],"3eYNH":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./flip"),i=a.interopDefault(o),n=e("./aspectRatio"),s=a.interopDefault(n),l=e("./playbackRate"),c=a.interopDefault(l),p=e("./subtitleOffset"),u=a.interopDefault(p),d=e("../utils/component"),f=a.interopDefault(d),h=e("../utils");class m extends f.default{constructor(e){super(e);let{option:t,controls:r,template:{$setting:a}}=e;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...t.settings],t.setting&&(this.format(),this.render(),e.on("blur",()=>{this.show&&(this.show=!1,this.render())}),e.on("focus",e=>{let t=(0,h.includeFromEvent)(e,r.setting),a=(0,h.includeFromEvent)(e,this.$parent);!this.show||t||a||(this.show=!1,this.render())}),e.on("resize",()=>this.resize()))}get builtin(){let e=[],{option:t}=this.art;return t.playbackRate&&e.push((0,c.default)(this.art)),t.aspectRatio&&e.push((0,s.default)(this.art)),t.flip&&e.push((0,i.default)(this.art)),t.subtitleOffset&&e.push((0,u.default)(this.art)),e}traverse(e,t=this.option){for(let r=0;r{t.default=t===e,t.default&&t.$item&&(0,h.inverseClass)(t.$item,"art-current")},e.$option),this.render(e.$parents)}format(e=this.option,t,r,a=[]){for(let o=0;ot}),(0,h.def)(i,"$parents",{get:()=>r}),(0,h.def)(i,"$option",{get:()=>e});let a=[];(0,h.def)(i,"$events",{get:()=>a}),(0,h.def)(i,"$formatted",{get:()=>!0})}this.format(i.selector||[],i,e,a)}this.option=e}find(e=""){let t=null;return this.traverse(r=>{r.name===e&&(t=r)}),t}resize(){let{controls:e,constructor:{SETTING_WIDTH:t,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(e.setting&&this.show){let i=this.active[0]?.$parent?.width||t,{left:n,width:s}=(0,h.getRect)(e.setting),{left:l,width:c}=(0,h.getRect)(a),p=n-l+s/2-i/2,u=this.active===this.option?this.active.length*r:(this.active.length+1)*r;if((0,h.setStyle)(o,"height",`${u}px`),(0,h.setStyle)(o,"width",`${i}px`),this.art.isRotate||h.isMobile)return;p+i>c?((0,h.setStyle)(o,"left",null),(0,h.setStyle)(o,"right",null)):((0,h.setStyle)(o,"left",`${p}px`),(0,h.setStyle)(o,"right","auto"))}}inactivate(e){for(let t=0;t'),s=(0,h.createElement)("div");(0,h.addClass)(s,"art-setting-item-left-icon"),(0,h.append)(s,a),(0,h.append)(n,s),(0,h.append)(n,e.$parent.html);let l=r(i,"click",()=>this.render(e.$parents));e.$parent.$events.push(l),(0,h.append)(t,i)}creatItem(e,t=!1){if(!this.cache.has(e.$option))return;let r=this.cache.get(e.$option),a=e.$item,o="selector";(0,h.has)(e,"switch")&&(o="switch"),(0,h.has)(e,"range")&&(o="range"),(0,h.has)(e,"onClick")&&(o="button");let{icons:i,proxy:n,constructor:s}=this.art,l=(0,h.createElement)("div");(0,h.addClass)(l,"art-setting-item"),(0,h.setStyle)(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=e.name||"",l.dataset.value=e.value||"";let c=(0,h.append)(l,'
'),p=(0,h.append)(l,'
'),u=(0,h.createElement)("div");switch((0,h.addClass)(u,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":(0,h.append)(u,e.icon||i.config);break;case"selector":e.selector?.length?(0,h.append)(u,e.icon||i.config):(0,h.append)(u,i.check)}(0,h.append)(c,u),(0,h.def)(e,"$icon",{configurable:!0,get:()=>u}),(0,h.def)(e,"icon",{configurable:!0,get:()=>u.innerHTML,set(e){u.innerHTML="",(0,h.append)(u,e)}});let d=(0,h.createElement)("div");(0,h.addClass)(d,"art-setting-item-left-text"),(0,h.append)(d,e.html||""),(0,h.append)(c,d),(0,h.def)(e,"$html",{configurable:!0,get:()=>d}),(0,h.def)(e,"html",{configurable:!0,get:()=>d.innerHTML,set(e){d.innerHTML="",(0,h.append)(d,e)}});let f=(0,h.createElement)("div");switch((0,h.addClass)(f,"art-setting-item-right-tooltip"),(0,h.append)(f,e.tooltip||""),(0,h.append)(p,f),(0,h.def)(e,"$tooltip",{configurable:!0,get:()=>f}),(0,h.def)(e,"tooltip",{configurable:!0,get:()=>f.innerHTML,set(e){f.innerHTML="",(0,h.append)(f,e)}}),o){case"switch":{let t=(0,h.createElement)("div");(0,h.addClass)(t,"art-setting-item-right-icon");let r=(0,h.append)(t,i.switchOn),a=(0,h.append)(t,i.switchOff);(0,h.setStyle)(e.switch?a:r,"display","none"),(0,h.append)(p,t),(0,h.def)(e,"$switch",{configurable:!0,get:()=>t});let o=e.switch;(0,h.def)(e,"switch",{configurable:!0,get:()=>o,set(e){o=e,e?((0,h.setStyle)(a,"display","none"),(0,h.setStyle)(r,"display",null)):((0,h.setStyle)(a,"display",null),(0,h.setStyle)(r,"display","none"))}});break}case"range":{let t=(0,h.createElement)("div");(0,h.addClass)(t,"art-setting-item-right-icon");let r=(0,h.append)(t,'');r.value=e.range[0],r.min=e.range[1],r.max=e.range[2],r.step=e.range[3],(0,h.addClass)(r,"art-setting-range"),(0,h.append)(p,t),(0,h.def)(e,"$range",{configurable:!0,get:()=>r});let a=[...e.range];(0,h.def)(e,"range",{configurable:!0,get:()=>a,set(e){a=[...e],r.value=e[0],r.min=e[1],r.max=e[2],r.step=e[3]}})}break;case"selector":if(e.selector?.length){let e=(0,h.createElement)("div");(0,h.addClass)(e,"art-setting-item-right-icon"),(0,h.append)(e,i.arrowRight),(0,h.append)(p,e)}}switch(o){case"switch":if(e.onSwitch){let t=n(l,"click",async t=>{e.switch=await e.onSwitch.call(this.art,e,l,t)});e.$events.push(t)}break;case"range":if(e.$range){if(e.onRange){let t=n(e.$range,"change",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onRange.call(this.art,e,l,t)});e.$events.push(t)}if(e.onChange){let t=n(e.$range,"input",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onChange.call(this.art,e,l,t)});e.$events.push(t)}}break;case"selector":{let t=n(l,"click",async t=>{e.selector?.length?this.render(e.selector):(this.check(e),e.$parent.onSelect&&(e.$parent.tooltip=await e.$parent.onSelect.call(this.art,e,l,t)))});e.$events.push(t),e.default&&(0,h.addClass)(l,"art-current")}break;case"button":if(e.onClick){let t=n(l,"click",async t=>{e.tooltip=await e.onClick.call(this.art,e,l,t)});e.$events.push(t)}}(0,h.def)(e,"$item",{configurable:!0,get:()=>l}),t?(0,h.replaceElement)(l,a):(0,h.append)(r,l),e.mounted&&setTimeout(()=>e.mounted.call(this.art,e.$item,e),0)}render(e=this.option){if(this.active=e,this.cache.has(e)){let t=this.cache.get(e);(0,h.inverseClass)(t,"art-current")}else{let t=(0,h.createElement)("div");this.cache.set(e,t),(0,h.addClass)(t,"art-setting-panel"),(0,h.append)(this.$parent,t),(0,h.inverseClass)(t,"art-current"),e[0]?.$parent&&this.creatHeader(e[0]);for(let t=0;ti);var o=e("../utils");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:i}}=e;function n(e){return t.get((0,o.capitalize)(e))}function s(){let t=e.setting.find(`flip-${e.flip}`);e.setting.check(t)}return{width:a,name:"flip",html:t.get("Video Flip"),tooltip:n(e.flip),icon:r.flip,selector:i.map(t=>({value:t,name:`flip-${t}`,default:t===e.flip,html:n(t)})),onSelect:t=>(e.flip=t.value,t.html),mounted:()=>{s(),e.on("flip",()=>s())}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"84NBV":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=e;function i(e){return"default"===e?t.get("Default"):e}function n(){let t=e.setting.find(`aspect-ratio-${e.aspectRatio}`);e.setting.check(t)}return{width:a,name:"aspect-ratio",html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:i(e.aspectRatio),selector:o.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.aspectRatio,html:i(t)})),onSelect:t=>(e.aspectRatio=t.value,t.html),mounted:()=>{n(),e.on("aspectRatio",()=>n())}}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aetWt:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=e;function i(e){return 1===e?t.get("Normal"):e.toFixed(1)}function n(){let t=e.setting.find(`playback-rate-${e.playbackRate}`);e.setting.check(t)}return{width:a,name:"playback-rate",html:t.get("Play Speed"),tooltip:i(e.playbackRate),icon:r.playbackRate,selector:o.map(t=>({value:t,name:`playback-rate-${t}`,default:t===e.playbackRate,html:i(t)})),onSelect:t=>(e.playbackRate=t.value,t.html),mounted:()=>{n(),e.on("video:ratechange",()=>n())}}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fIBkO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){let{i18n:t,icons:r,constructor:a}=e;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:t.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:t=>(e.subtitleOffset=t.range[0],t.range[0]+"s"),mounted:(t,r)=>{e.on("subtitleOffset",e=>{r.$range.value=e,r.tooltip=e+"s"})}}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2aaJe":[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{let 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{let r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{let 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":"9pCYc"}],"8MTUM":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("./miniProgressBar"),n=a.interopDefault(i),s=e("./autoOrientation"),l=a.interopDefault(s),c=e("./autoPlayback"),p=a.interopDefault(c),u=e("./fastForward"),d=a.interopDefault(u),f=e("./lock"),h=a.interopDefault(f);r.default=class{constructor(e){this.art=e,this.id=0;let{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(n.default),t.lock&&o.isMobile&&this.add(h.default),t.autoPlayback&&!t.isLive&&this.add(p.default),t.autoOrientation&&o.isMobile&&this.add(l.default),t.fastForward&&o.isMobile&&!t.isLive&&this.add(d.default);for(let e=0;ethis.next(e,t)):this.next(e,t)}next(e,t){let r=t&&t.name||e.name||`plugin${this.id}`;return(0,o.errorHandle)(!(0,o.has)(this,r),`Cannot add a plugin that already has the same name: ${r}`),(0,o.def)(this,r,{value:t}),this}}},{"../utils":"71aH7","./miniProgressBar":"87pSL","./autoOrientation":"ePEg5","./autoPlayback":"cVO99","./fastForward":"hFDwt","./lock":"1hsTH","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"87pSL":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return e.on("control",t=>{t?(0,o.removeClass)(e.template.$player,"art-mini-progress-bar"):(0,o.addClass)(e.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ePEg5:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,template:{$player:r,$video:a}}=e;return e.on("fullscreenWeb",i=>{if(i){let{videoWidth:i,videoHeight:n}=a,{clientWidth:s,clientHeight:l}=document.documentElement;(i>n&&sl)&&setTimeout(()=>{(0,o.setStyle)(r,"width",`${l}px`),(0,o.setStyle)(r,"height",`${s}px`),(0,o.setStyle)(r,"transform-origin","0 0"),(0,o.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,o.addClass)(r,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},t.AUTO_ORIENTATION_TIME)}else(0,o.hasClass)(r,"art-auto-orientation")&&((0,o.removeClass)(r,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",async e=>{if(!screen?.orientation?.lock)return;let t=screen.orientation.type;if(e){let{videoWidth:e,videoHeight:i}=a,{clientWidth:n,clientHeight:s}=document.documentElement;if(e>i&&ns){let e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),(0,o.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,o.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),(0,o.removeClass)(r,"art-auto-orientation-fullscreen"))}),{name:"autoOrientation",get state(){return(0,o.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cVO99:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,icons:r,storage:a,constructor:i,proxy:n,template:{$poster:s}}=e,l=e.layers.add({name:"auto-playback",html:`
`}),c=(0,o.query)(".art-auto-playback-last",l),p=(0,o.query)(".art-auto-playback-jump",l),u=(0,o.query)(".art-auto-playback-close",l);(0,o.append)(u,r.close);let d=null;function f(){let r=(a.get("times")||{})[e.option.id||e.option.url];clearTimeout(d),(0,o.setStyle)(l,"display","none"),r&&r>=i.AUTO_PLAYBACK_MIN&&((0,o.setStyle)(l,"display","flex"),c.innerText=`${t.get("Last Seen")} ${(0,o.secondToTime)(r)}`,p.innerText=t.get("Jump Play"),n(u,"click",()=>{(0,o.setStyle)(l,"display","none")}),n(p,"click",()=>{e.seek=r,e.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")}),e.once("video:timeupdate",()=>{d=setTimeout(()=>{(0,o.setStyle)(l,"display","none")},i.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",()=>{if(e.playing){let t=a.get("times")||{},r=Object.keys(t);r.length>i.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,a.set("times",t)}}),e.on("ready",f),e.on("restart",f),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(e){let t=a.get("times")||{};return delete t[e],a.set("times",t),t}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hFDwt:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,proxy:r,template:{$player:a,$video:i}}=e,n=null,s=!1,l=1,c=()=>{clearTimeout(n),s&&(s=!1,e.playbackRate=l,(0,o.removeClass)(a,"art-fast-forward"))};return r(i,"touchstart",r=>{1===r.touches.length&&e.playing&&!e.isLock&&(n=setTimeout(()=>{s=!0,l=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1hsTH":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{layers:t,icons:r,template:{$player:a}}=e;function i(){return(0,o.hasClass)(a,"art-lock")}function n(){(0,o.addClass)(a,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,o.removeClass)(a,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted(t){let a=(0,o.append)(t,r.lock),i=(0,o.append)(t,r.unlock);(0,o.setStyle)(a,"display","none"),e.on("lock",e=>{e?((0,o.setStyle)(a,"display","inline-flex"),(0,o.setStyle)(i,"display","none")):((0,o.setStyle)(a,"display","none"),(0,o.setStyle)(i,"display","inline-flex"))})},click(){i()?s():n()}}),{name:"lock",get state(){return i()},set state(value){value?n():s()}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["5lTcX"],"5lTcX","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,a,o,i,n,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[a]&&l[a],p=c.i||{},u=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(o[t])return o[t];var i="function"==typeof l[a]&&l[a];if(!r&&i)return i(t,!0);if(c)return c(t,!0);if(d&&"string"==typeof t)return d(t);var n=Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}p.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},p.cache={};var s=u[t]=new f.Module(t);e[t][0].call(s.exports,p,s,s.exports,l)}return u[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=d,this.exports={}},f.modules=e,f.cache=u,f.parent=c,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=p,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return l[a]}}),l[a]=f;for(var h=0;ht.call(this,this)),Z.DEBUG){let e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+Z.version),e("Env@"+Z.env),e("Build@"+Z.build);for(let t=0;te("Event@"+t.type))}Q.push(this)}static get instances(){return Q}static get version(){return"5.2.3"}static get env(){return"production"}static get build(){return"2025-04-20 10:10:54"}static get config(){return m.default}static get utils(){return u}static get scheme(){return f.default}static get Emitter(){return p.default}static get validator(){return l.default}static get kindOf(){return l.default.kindOf}static get html(){return v.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:e=>e},moreVideoAttr:{controls:!1,preload:u.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),Q.splice(Q.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=Z,Z.STYLE=n.default,Z.DEBUG=!1,Z.CONTEXTMENU=!0,Z.NOTICE_TIME=2e3,Z.SETTING_WIDTH=250,Z.SETTING_ITEM_WIDTH=200,Z.SETTING_ITEM_HEIGHT=35,Z.RESIZE_TIME=200,Z.SCROLL_TIME=200,Z.SCROLL_GAP=50,Z.AUTO_PLAYBACK_MAX=10,Z.AUTO_PLAYBACK_MIN=5,Z.AUTO_PLAYBACK_TIMEOUT=3e3,Z.RECONNECT_TIME_MAX=5,Z.RECONNECT_SLEEP_TIME=1e3,Z.CONTROL_HIDE_TIME=3e3,Z.DBCLICK_TIME=300,Z.DBCLICK_FULLSCREEN=!0,Z.MOBILE_DBCLICK_PLAY=!0,Z.MOBILE_CLICK_PLAY=!1,Z.AUTO_ORIENTATION_TIME=200,Z.INFO_LOOP_TIME=1e3,Z.FAST_FORWARD_VALUE=3,Z.FAST_FORWARD_TIME=1e3,Z.TOUCH_MOVE_RATIO=.5,Z.VOLUME_STEP=.1,Z.SEEK_STEP=5,Z.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],Z.ASPECT_RATIO=["default","4:3","16:9"],Z.FLIP=["normal","horizontal","vertical"],Z.FULLSCREEN_WEB_IN_BODY=!1,Z.LOG_VERSION=!0,Z.USE_RAF=!1,u.isBrowser&&(window.Artplayer=Z,u.setStyleText("artplayer-style",n.default),setTimeout(()=>{Z.LOG_VERSION&&console.log(`%c ArtPlayer %c ${Z.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"bundle-text:./style/index.less":"0016T","option-validator":"bAWi2","./utils/emitter":"66mFZ","./utils":"71aH7","./scheme":"AKEiO","./config":"lyjeQ","./template":"X13Zf","./i18n":"3jKkj","./player":"a90nx","./control":"8Z0Uf","./contextmenu":"2KYsr","./info":"02ajl","./subtitle":"eSWto","./events":"jo4S1","./hotkey":"6NoFy","./layer":"6G6hZ","./loading":"3dsEe","./notice":"dWGTw","./mask":"5POkG","./icons":"6OeNg","./setting":"3eYNH","./storage":"2aaJe","./plugins":"8MTUM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"0016T":[function(e,t,r,a){t.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#ffffff40;--art-hover-color:#ffffff40;--art-loaded-color:#ffffff40;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#000000b3;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{zoom:1;text-align:left;user-select:none;box-sizing:border-box;width:100%;height:100%;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;direction:ltr;outline:0;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{vertical-align:top;max-width:100%}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.art-poster{z-index:11;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;width:100%;height:100%;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);width:100%;bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;pointer-events:none;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;opacity:0;pointer-events:none;width:100%;height:100%;padding:0 var(--art-padding);transition:all var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:flex-end;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;padding-bottom:var(--art-bottom-gap);position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{width:100%;height:50%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;background-color:var(--art-hover-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;background-color:var(--art-loaded-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;background-color:var(--art-theme);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;pointer-events:auto;width:100%;height:100%;transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);position:absolute;inset:0 auto 0 0;width:var(--art-highlight-width)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{pointer-events:none;width:100%;height:100%}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 10px);border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{flex:1;justify-content:center;align-items:center;height:100%;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{cursor:pointer;flex:1;justify-content:center;width:100%;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;width:2px;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;background-color:var(--art-theme);width:100%;height:100%;position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;width:100%;height:auto;padding:var(--art-padding);pointer-events:none;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.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{flex-shrink:0;justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;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}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{justify-content:center;align-items:center;min-width:32px;height:24px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{appearance:none;background-color:#fff3;outline:none;width:80px;height:3px}.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:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{text-align:right;width:100px}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;user-select:all;width:250px;overflow:hidden}.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-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;width:320px;height:180px;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.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-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-mini-progress-bar .art-bottom,.art-video-player.art-lock .art-bottom{opacity:1;background-image:none;padding:0}.art-video-player.art-mini-progress-bar .art-bottom .art-controls,.art-video-player.art-lock .art-bottom .art-controls,.art-video-player.art-mini-progress-bar .art-bottom .art-progress,.art-video-player.art-lock .art-bottom .art-progress{transform:translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height)/4))}.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,.art-video-player.art-lock .art-bottom .art-progress-indicator{display:none!important}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{justify-content:center;display:flex;position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{flex-shrink:0;justify-content:center;align-items:center;width:100%;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[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:1000001;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}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(e,t,r,a){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 o=e(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(Array.isArray?Array.isArray(r):r instanceof Array)return"array";if(r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(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(r instanceof Date||"function"==typeof r.toDateString&&"function"==typeof r.getDate&&"function"==typeof r.setDate)return"date";if(r instanceof Error||"string"==typeof r.message&&r.constructor&&"number"==typeof r.constructor.stackTraceLimit)return"error";if(r instanceof RegExp||"string"==typeof r.flags&&"boolean"==typeof r.ignoreCase&&"boolean"==typeof r.multiline&&"boolean"==typeof r.global)return"regexp";switch(a(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"==typeof r.throw&&"function"==typeof r.return&&"function"==typeof r.next)return"generator";switch(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(e){return e.constructor?e.constructor.name:null}function o(e,t){var a=2n),o.export(r,"queryAll",()=>s),o.export(r,"addClass",()=>l),o.export(r,"removeClass",()=>c),o.export(r,"hasClass",()=>p),o.export(r,"append",()=>u),o.export(r,"remove",()=>d),o.export(r,"setStyle",()=>f),o.export(r,"setStyles",()=>h),o.export(r,"getStyle",()=>m),o.export(r,"sublings",()=>g),o.export(r,"inverseClass",()=>v),o.export(r,"tooltip",()=>y),o.export(r,"isInViewport",()=>b),o.export(r,"includeFromEvent",()=>x),o.export(r,"replaceElement",()=>w),o.export(r,"createElement",()=>j),o.export(r,"getIcon",()=>k),o.export(r,"setStyleText",()=>C),o.export(r,"supportsFlex",()=>S),o.export(r,"getRect",()=>I),o.export(r,"loadImg",()=>T);var i=e("./compatibility");function n(e,t=document){return t.querySelector(e)}function s(e,t=document){return Array.from(t.querySelectorAll(e))}function l(e,t){return e.classList.add(t)}function c(e,t){return e.classList.remove(t)}function p(e,t){return e.classList.contains(t)}function u(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function d(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function h(e,t){for(let r in t)f(e,r,t[r]);return e}function m(e,t,r=!0){let a=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(a):a}function g(e){return Array.from(e.parentElement.children).filter(t=>t!==e)}function v(e,t){g(e).forEach(e=>c(e,t)),l(e,t)}function y(e,t,r="top"){i.isMobile||(e.setAttribute("aria-label",t),l(e,"hint--rounded"),l(e,`hint--${r}`))}function b(e,t=0){let r=e.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,i=r.top-t<=a&&r.top+r.height+t>=0,n=r.left-t<=o+t&&r.left+r.width+t>=0;return i&&n}function x(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function w(e,t){return t.parentNode.replaceChild(e,t),e}function j(e){return document.createElement(e)}function k(e="",t=""){let r=j("i");return l(r,"art-icon"),l(r,`art-icon-${e}`),u(r,t),r}function C(e,t){let r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function S(){let e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function I(e){return e.getBoundingClientRect()}function T(e,t){return new Promise((r,a)=>{let o=new Image;o.onload=function(){if(t&&1!==t){let i=document.createElement("canvas"),n=i.getContext("2d");i.width=o.width*t,i.height=o.height*t,n.drawImage(o,0,0,i.width,i.height),i.toBlob(t=>{let o=URL.createObjectURL(t),i=new Image;i.onload=function(){r(i)},i.onerror=function(){URL.revokeObjectURL(o),a(Error(`Image load failed: ${e}`))},i.src=o})}else r(o)},o.onerror=function(){a(Error(`Image load failed: ${e}`))},o.src=e})}},{"./compatibility":"6ZTr6","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6ZTr6":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",()=>i),o.export(r,"isSafari",()=>n),o.export(r,"isWechat",()=>s),o.export(r,"isIE",()=>l),o.export(r,"isAndroid",()=>c),o.export(r,"isIOS",()=>p),o.export(r,"isIOS13",()=>u),o.export(r,"isMobile",()=>d),o.export(r,"isBrowser",()=>f);let i="undefined"!=typeof navigator?navigator.userAgent:"",n=/^((?!chrome|android).)*safari/i.test(i),s=/MicroMessenger/i.test(i),l=/MSIE|Trident/i.test(i),c=/android/i.test(i),p=/iPad|iPhone|iPod/i.test(i)&&!window.MSStream,u=p||i.includes("Macintosh")&&navigator.maxTouchPoints>=1,d=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i)||u,f="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hwmZz:[function(e,t,r,a){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":"9pCYc"}],inzwq:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(e,t,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=r+"00"),2===r.length&&(a=r+"0"),`${t},${a}`}).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"))}function n(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function s(e){let t=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=>{let a=e.match(t);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[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} --> ${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",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6b7Ip":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){let 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",()=>function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}),o.export(r,"download",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5NSdr":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",()=>i),o.export(r,"has",()=>s),o.export(r,"get",()=>l),o.export(r,"mergeDeep",()=>function e(...t){let r=e=>e&&"object"==typeof e&&!Array.isArray(e);return t.reduce((t,a)=>(Object.keys(a).forEach(o=>{let i=t[o],n=a[o];Array.isArray(i)&&Array.isArray(n)?t[o]=i.concat(...n):r(i)&&r(n)?t[o]=e(i,n):t[o]=n}),t),{})});let i=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function s(e,t){return n.call(e,t)}function l(e,t){return Object.getOwnPropertyDescriptor(e,t)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],epmNy:[function(e,t,r,a){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){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,e.apply(this,a)),t)}}function s(e,t){let r=!1;return function(...a){r||(e.apply(this,a),r=!0,setTimeout(function(){r=!1},t))}}o.defineInteropFlag(r),o.export(r,"sleep",()=>i),o.export(r,"debounce",()=>n),o.export(r,"throttle",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gapRl:[function(e,t,r,a){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){return e.charAt(0).toUpperCase()+e.slice(1)}function s(e){if(!e)return"00:00";let t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),a=Math.floor(e-3600*t-60*r);return(t>0?[t,r,a]:[r,a]).map(e=>e<10?`0${e}`:String(e)).join(":")}function l(e){return e.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e)}function c(e){let t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp(`(${Object.keys(t).join("|")})`,"g");return e.replace(r,e=>t[e]||e)}o.defineInteropFlag(r),o.export(r,"clamp",()=>i),o.export(r,"capitalize",()=>n),o.export(r,"secondToTime",()=>s),o.export(r,"escape",()=>l),o.export(r,"unescape",()=>c)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],AKEiO:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",()=>f);var i=e("../utils");let n="array",s="boolean",l="string",c="number",p="object",u="function";function d(e,t,r){return(0,i.errorHandle)(t===l||t===c||e instanceof Element,`${r.join(".")} require '${l}' or 'Element' type`)}let f={html:d,disable:`?${s}`,name:`?${l}`,index:`?${c}`,style:`?${p}`,click:`?${u}`,mounted:`?${u}`,tooltip:`?${l}|${c}`,width:`?${c}`,selector:`?${n}`,onSelect:`?${u}`,switch:`?${s}`,onSwitch:`?${u}`,range:`?${n}`,onRange:`?${u}`,onChange:`?${u}`};r.default={id:l,container:d,url:l,poster:l,type:l,theme:l,lang:l,volume:c,isLive:s,muted:s,autoplay:s,autoSize:s,autoMini:s,loop:s,flip:s,playbackRate:s,aspectRatio:s,screenshot:s,setting:s,hotkey:s,pip:s,mutex:s,backdrop:s,fullscreen:s,fullscreenWeb:s,subtitleOffset:s,miniProgressBar:s,useSSR:s,playsInline:s,lock:s,gesture:s,fastForward:s,autoPlayback:s,autoOrientation:s,airplay:s,proxy:`?${u}`,plugins:[u],layers:[f],contextmenu:[f],settings:[f],controls:[{...f,position:(e,t,r)=>{let a=["top","left","right"];return(0,i.errorHandle)(a.includes(e),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${s}`,html:l,url:l}],highlight:[{time:c,text:l}],thumbnails:{url:l,number:c,column:c,width:c,height:c,scale:c},subtitle:{url:l,name:l,type:l,style:p,escape:s,encoding:l,onVttLoad:u},moreVideoAttr:p,i18n:p,icons:p,cssVar:p,customType:p}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lyjeQ:[function(e,t,r,a){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":"9pCYc"}],X13Zf:[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");class i{constructor(e){this.art=e;let{option:t,constructor:r}=e;t.container instanceof Element?this.$container=t.container:(this.$container=(0,o.query)(t.container),(0,o.errorHandle)(this.$container,`No container element found by ${t.container}`)),(0,o.errorHandle)((0,o.supportsFlex)(),"The current browser does not support flex layout");let a=this.$container.tagName.toLowerCase();(0,o.errorHandle)("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),(0,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.init()}static get html(){return`
Player version:
5.2.3
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
`}query(e){return(0,o.query)(e,this.$container)}init(){let{option:e}=this.art;if(e.useSSR||(this.$container.innerHTML=i.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),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.$controlsCenter=this.query(".art-controls-center"),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.$contextmenu=this.query(".art-contextmenus"),e.proxy){let t=e.proxy.call(this.art,this.art);(0,o.errorHandle)(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),(0,o.replaceElement)(t,this.$video),t.className="art-video",this.$video=t}e.backdrop&&(0,o.addClass)(this.$player,"art-backdrop"),o.isMobile&&(0,o.addClass)(this.$player,"art-mobile")}destroy(e){this.$video.src="",e?this.$container.innerHTML="":(0,o.addClass)(this.$player,"art-destroy")}}r.default=i},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3jKkj":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./zh-cn"),s=o.interopDefault(n);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":s.default},this.language={},this.update(e.option.i18n)}init(){let e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=(0,i.mergeDeep)(this.languages,e),this.init()}}},{"../utils":"71aH7","./zh-cn":"5Y91w","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5Y91w":[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let o={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","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":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],a90nx:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./urlMix"),n=o.interopDefault(i),s=e("./attrMix"),l=o.interopDefault(s),c=e("./playMix"),p=o.interopDefault(c),u=e("./pauseMix"),d=o.interopDefault(u),f=e("./toggleMix"),h=o.interopDefault(f),m=e("./seekMix"),g=o.interopDefault(m),v=e("./volumeMix"),y=o.interopDefault(v),b=e("./currentTimeMix"),x=o.interopDefault(b),w=e("./durationMix"),j=o.interopDefault(w),k=e("./switchMix"),C=o.interopDefault(k),S=e("./playbackRateMix"),I=o.interopDefault(S),T=e("./aspectRatioMix"),$=o.interopDefault(T),E=e("./screenshotMix"),M=o.interopDefault(E),F=e("./fullscreenMix"),D=o.interopDefault(F),H=e("./fullscreenWebMix"),A=o.interopDefault(H),z=e("./pipMix"),R=o.interopDefault(z),O=e("./loadedMix"),Y=o.interopDefault(O),L=e("./playedMix"),P=o.interopDefault(L),V=e("./playingMix"),q=o.interopDefault(V),_=e("./autoSizeMix"),N=o.interopDefault(_),B=e("./rectMix"),W=o.interopDefault(B),U=e("./flipMix"),K=o.interopDefault(U),X=e("./miniMix"),G=o.interopDefault(X),Q=e("./posterMix"),Z=o.interopDefault(Q),J=e("./autoHeightMix"),ee=o.interopDefault(J),et=e("./cssVarMix"),er=o.interopDefault(et),ea=e("./themeMix"),eo=o.interopDefault(ea),ei=e("./typeMix"),en=o.interopDefault(ei),es=e("./stateMix"),el=o.interopDefault(es),ec=e("./subtitleOffsetMix"),ep=o.interopDefault(ec),eu=e("./airplayMix"),ed=o.interopDefault(eu),ef=e("./qualityMix"),eh=o.interopDefault(ef),em=e("./thumbnailsMix"),eg=o.interopDefault(em),ev=e("./optionInit"),ey=o.interopDefault(ev),eb=e("./eventInit"),ex=o.interopDefault(eb);r.default=class{constructor(e){(0,n.default)(e),(0,l.default)(e),(0,p.default)(e),(0,d.default)(e),(0,h.default)(e),(0,g.default)(e),(0,y.default)(e),(0,x.default)(e),(0,j.default)(e),(0,C.default)(e),(0,I.default)(e),(0,$.default)(e),(0,M.default)(e),(0,D.default)(e),(0,A.default)(e),(0,R.default)(e),(0,Y.default)(e),(0,P.default)(e),(0,q.default)(e),(0,N.default)(e),(0,W.default)(e),(0,K.default)(e),(0,G.default)(e),(0,Z.default)(e),(0,ee.default)(e),(0,er.default)(e),(0,eo.default)(e),(0,en.default)(e),(0,el.default)(e),(0,ep.default)(e),(0,ed.default)(e),(0,eh.default)(e),(0,eg.default)(e),(0,ex.default)(e),(0,ey.default)(e)}}},{"./urlMix":"kQoac","./attrMix":"deCma","./playMix":"fOJuP","./pauseMix":"fzHAy","./toggleMix":"cBHxQ","./seekMix":"koAPr","./volumeMix":"6eyuR","./currentTimeMix":"faaWv","./durationMix":"5y91K","./switchMix":"iceD8","./playbackRateMix":"keKwh","./aspectRatioMix":"jihET","./screenshotMix":"36kPY","./fullscreenMix":"2GYOJ","./fullscreenWebMix":"5aYAP","./pipMix":"7EnIB","./loadedMix":"3N9mP","./playedMix":"et96R","./playingMix":"9DzzM","./autoSizeMix":"i1LDY","./rectMix":"IqARI","./flipMix":"7E7Vs","./miniMix":"gpugx","./posterMix":"1SuFS","./autoHeightMix":"8x4te","./cssVarMix":"1CaTA","./themeMix":"2FqhO","./typeMix":"1fQQs","./stateMix":"iBOQW","./subtitleOffsetMix":"6vlBV","./airplayMix":"eftqT","./qualityMix":"5SdyX","./thumbnailsMix":"4HcqV","./optionInit":"fCWZK","./eventInit":"f8Lv3","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kQoac:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{option:t,template:{$video:r}}=e;(0,i.def)(e,"url",{get:()=>r.src,async set(a){if(a){let o=e.url,n=t.type||(0,i.getExt)(a),s=t.customType[n];n&&s?(await (0,i.sleep)(),e.loading.show=!0,s.call(e,r,a,e)):(URL.revokeObjectURL(o),r.src=a),o!==e.url&&(e.option.url=a,e.isReady&&o&&e.once("video:canplay",()=>{e.emit("restart",a)}))}else await (0,i.sleep)(),e.loading.show=!0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],deCma:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t}}=e;(0,i.def)(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fOJuP:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,option:a,constructor:{instances:o},template:{$video:n}}=e;(0,i.def)(e,"play",{value:async function(){let i=await n.play();if(r.show=t.get("Play"),e.emit("play"),a.mutex)for(let t=0;tn);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,i.def)(e,"pause",{value(){let o=t.pause();return a.show=r.get("Pause"),e.emit("pause"),o}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cBHxQ:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"toggle",{value:()=>e.playing?e.pause():e.play()})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],koAPr:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{notice:t}=e;(0,i.def)(e,"seek",{set(r){e.currentTime=r,e.duration&&(t.show=`${(0,i.secondToTime)(e.currentTime)} / ${(0,i.secondToTime)(e.duration)}`),e.emit("seek",e.currentTime)}}),(0,i.def)(e,"forward",{set(t){e.seek=e.currentTime+t}}),(0,i.def)(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6eyuR":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a,storage:o}=e;(0,i.def)(e,"volume",{get:()=>t.volume||0,set:e=>{t.volume=(0,i.clamp)(e,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&o.set("volume",t.volume)}}),(0,i.def)(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("muted",r)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],faaWv:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{Number.isNaN(r=parseFloat(r))||(t.currentTime=(0,i.clamp)(r,0,e.duration))}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5y91K":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"duration",{get:()=>{let{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iceD8:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){function t(t,r){return new Promise((a,o)=>{if(t===e.url)return;let{playing:i,aspectRatio:n,playbackRate:s}=e;e.pause(),e.url=t,e.notice.show="",e.once("video:error",o),e.once("video:loadedmetadata",()=>{e.currentTime=r}),e.once("video:canplay",async()=>{e.playbackRate=s,e.aspectRatio=n,i&&await e.play(),e.notice.show="",a()})})}(0,i.def)(e,"switchQuality",{value:r=>t(r,e.currentTime)}),(0,i.def)(e,"switchUrl",{value:e=>t(e,0)}),(0,i.def)(e,"switch",{set:e.switchUrl})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],keKwh:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,i.def)(e,"playbackRate",{get:()=>t.playbackRate,set(o){o?o!==t.playbackRate&&(t.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`):e.playbackRate=1}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jihET:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e;(0,i.def)(e,"aspectRatio",{get:()=>o.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)(0,i.setStyle)(a,"width",null),(0,i.setStyle)(a,"height",null),(0,i.setStyle)(a,"margin",null),delete o.dataset.aspectRatio;else{let e=n.split(":").map(Number),{clientWidth:t,clientHeight:r}=o,s=e[0]/e[1];t/r>s?((0,i.setStyle)(a,"width",`${s*r}px`),(0,i.setStyle)(a,"height","100%"),(0,i.setStyle)(a,"margin","0 auto")):((0,i.setStyle)(a,"width","100%"),(0,i.setStyle)(a,"height",`${t/s}px`),(0,i.setStyle)(a,"margin","auto 0")),o.dataset.aspectRatio=n}r.show=`${t.get("Aspect Ratio")}: ${"default"===n?t.get("Default"):n}`,e.emit("aspectRatio",n)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"36kPY":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{notice:t,template:{$video:r}}=e,a=(0,i.createElement)("canvas");(0,i.def)(e,"getDataURL",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),e(a.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}),(0,i.def)(e,"getBlobUrl",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(t=>{e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}),(0,i.def)(e,"screenshot",{value:async t=>{let a=await e.getDataURL(),o=t||`artplayer_${(0,i.secondToTime)(r.currentTime)}`;return(0,i.download)(a,`${o}.png`),e.emit("screenshot",a),a}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2GYOJ":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>l);var i=e("../libs/screenfull"),n=o.interopDefault(i),s=e("../utils");function l(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e,i=e=>{n.default.on("change",()=>{e.emit("fullscreen",n.default.isFullscreen),n.default.isFullscreen?(e.state="fullscreen",(0,s.addClass)(o,"art-fullscreen")):(0,s.removeClass)(o,"art-fullscreen"),e.emit("resize")}),n.default.on("error",t=>{e.emit("fullscreenError",t)}),(0,s.def)(e,"fullscreen",{get:()=>n.default.isFullscreen,async set(e){e?await n.default.request(o):await n.default.exit()}})},l=e=>{e.proxy(document,"webkitfullscreenchange",()=>{e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,s.def)(e,"fullscreen",{get:()=>document.fullscreenElement===a,set(t){t?(e.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})};e.once("video:loadedmetadata",()=>{n.default.isEnabled?i(e):a.webkitSupportsFullscreen?l(e):(0,s.def)(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),(0,s.def)(e,"fullscreen",(0,s.get)(e,"fullscreen"))})}},{"../libs/screenfull":"8v40z","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8v40z":[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let o=[["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"]],i=(()=>{if("undefined"==typeof document)return!1;let e=o[0],t={};for(let r of o)if(r[1]in document){for(let[a,o]of r.entries())t[e[a]]=o;return t}return!1})(),n={change:i.fullscreenchange,error:i.fullscreenerror},s={request:(e=document.documentElement,t)=>new Promise((r,a)=>{let o=()=>{s.off("change",o),r()};s.on("change",o);let n=e[i.requestFullscreen](t);n instanceof Promise&&n.then(o).catch(a)}),exit:()=>new Promise((e,t)=>{if(!s.isFullscreen)return void e();let r=()=>{s.off("change",r),e()};s.on("change",r);let a=document[i.exitFullscreen]();a instanceof Promise&&a.then(r).catch(t)}),toggle:(e,t)=>s.isFullscreen?s.exit():s.request(e,t),onchange(e){s.on("change",e)},onerror(e){s.on("error",e)},on(e,t){let r=n[e];r&&document.addEventListener(r,t,!1)},off(e,t){let r=n[e];r&&document.removeEventListener(r,t,!1)},raw:i};Object.defineProperties(s,{isFullscreen:{get:()=>!!document[i.fullscreenElement]},element:{enumerable:!0,get:()=>document[i.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>!!document[i.fullscreenEnabled]}}),i||(s={isEnabled:!1}),r.default=s},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aYAP":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,template:{$container:r,$player:a}}=e,o="";(0,i.def)(e,"fullscreenWeb",{get:()=>(0,i.hasClass)(a,"art-fullscreen-web"),set(n){n?(o=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,i.append)(document.body,a),e.state="fullscreenWeb",(0,i.setStyle)(a,"width","100%"),(0,i.setStyle)(a,"height","100%"),(0,i.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,i.append)(r,a),o&&(a.style.cssText=o,o=""),(0,i.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7EnIB":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,template:{$video:a}}=e;if(document.pictureInPictureEnabled){let{template:{$video:t},proxy:r,notice:a}=e;t.disablePictureInPicture=!1,(0,i.def)(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.state="pip",t.requestPictureInPicture().catch(e=>{throw a.show=e,e})):document.exitPictureInPicture().catch(e=>{throw a.show=e,e})}}),r(t,"enterpictureinpicture",()=>{e.emit("pip",!0)}),r(t,"leavepictureinpicture",()=>{e.emit("pip",!1)})}else if(a.webkitSupportsPresentationMode){let{$video:t}=e.template;t.webkitSetPresentationMode("inline"),(0,i.def)(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}else(0,i.def)(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3N9mP":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"loaded",{get:()=>e.loadedTime/t.duration}),(0,i.def)(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],et96R:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9DzzM":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"playing",{get:()=>"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],i1LDY:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$container:t,$player:r,$video:a}=e.template;(0,i.def)(e,"autoSize",{value(){let{videoWidth:o,videoHeight:n}=a,{width:s,height:l}=(0,i.getRect)(t),c=o/n;s/l>c?((0,i.setStyle)(r,"width",`${l*c/s*100}%`),(0,i.setStyle)(r,"height","100%")):((0,i.setStyle)(r,"width","100%"),(0,i.setStyle)(r,"height",`${s/c/l*100}%`)),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],IqARI:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"rect",{get:()=>(0,i.getRect)(e.template.$player)});let t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[a]})}(0,i.def)(e,"x",{get:()=>e.left+window.pageXOffset}),(0,i.def)(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7E7Vs":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$player:t},i18n:r,notice:a}=e;(0,i.def)(e,"flip",{get:()=>t.dataset.flip||"normal",set(o){o||(o="normal"),"normal"===o?delete t.dataset.flip:t.dataset.flip=o,a.show=`${r.get("Video Flip")}: ${r.get((0,i.capitalize)(o))}`,e.emit("flip",o)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gpugx:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{icons:t,proxy:r,storage:a,template:{$player:o,$video:n}}=e,s=!1,l=0,c=0;function p(){let{$mini:t}=e.template;t&&((0,i.removeClass)(o,"art-mini"),(0,i.setStyle)(t,"display","none"),o.prepend(n),e.emit("mini",!1))}function u(t,r){e.playing?((0,i.setStyle)(t,"display","none"),(0,i.setStyle)(r,"display","flex")):((0,i.setStyle)(t,"display","flex"),(0,i.setStyle)(r,"display","none"))}function d(){let{$mini:t}=e.template,r=(0,i.getRect)(t),o=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",o),a.set("left",n),(0,i.setStyle)(t,"top",`${o}px`),(0,i.setStyle)(t,"left",`${n}px`)}(0,i.def)(e,"mini",{get:()=>(0,i.hasClass)(o,"art-mini"),set(f){if(f){e.state="mini",(0,i.addClass)(o,"art-mini");let f=function(){let{$mini:o}=e.template;if(o)return(0,i.append)(o,n),(0,i.setStyle)(o,"display","flex");{let o=(0,i.createElement)("div");(0,i.addClass)(o,"art-mini-popup"),(0,i.append)(document.body,o),e.template.$mini=o,(0,i.append)(o,n);let d=(0,i.append)(o,'
');(0,i.append)(d,t.close),r(d,"click",p);let f=(0,i.append)(o,'
'),h=(0,i.append)(f,t.play),m=(0,i.append)(f,t.pause);return r(h,"click",()=>e.play()),r(m,"click",()=>e.pause()),u(h,m),e.on("video:playing",()=>u(h,m)),e.on("video:pause",()=>u(h,m)),e.on("video:timeupdate",()=>u(h,m)),r(o,"mousedown",e=>{s=0===e.button,l=e.pageX,c=e.pageY}),e.on("document:mousemove",e=>{if(s){(0,i.addClass)(o,"art-mini-droging");let t=e.pageX-l,r=e.pageY-c;(0,i.setStyle)(o,"transform",`translate(${t}px, ${r}px)`)}}),e.on("document:mouseup",()=>{if(s){s=!1,(0,i.removeClass)(o,"art-mini-droging");let e=(0,i.getRect)(o);a.set("left",e.left),a.set("top",e.top),(0,i.setStyle)(o,"left",`${e.left}px`),(0,i.setStyle)(o,"top",`${e.top}px`),(0,i.setStyle)(o,"transform",null)}}),o}}(),h=a.get("top"),m=a.get("left");h&&m?((0,i.setStyle)(f,"top",`${h}px`),(0,i.setStyle)(f,"left",`${m}px`),(0,i.isInViewport)(f)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1SuFS":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$poster:t}}=e;(0,i.def)(e,"poster",{get:()=>{try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set(e){(0,i.setStyle)(t,"backgroundImage",`url(${e})`)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8x4te":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$container:t,$video:r}}=e;(0,i.def)(e,"autoHeight",{value(){let{clientWidth:a}=t,{videoHeight:o,videoWidth:n}=r,s=a/n*o;(0,i.setStyle)(t,"height",s+"px"),e.emit("autoHeight",s)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1CaTA":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$player:t}=e.template;(0,i.def)(e,"cssVar",{value:(e,r)=>r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2FqhO":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"theme",{get:()=>e.cssVar("--art-theme"),set(t){e.cssVar("--art-theme",t)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1fQQs":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"type",{get:()=>e.option.type,set(t){e.option.type=t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iBOQW:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let t=["mini","pip","fullscreen","fullscreenWeb"];(0,i.def)(e,"state",{get:()=>t.find(t=>e[t])||"standard",set(r){for(let a=0;an);var i=e("../utils");function n(e){let{notice:t,i18n:r,template:a}=e;(0,i.def)(e,"subtitleOffset",{get:()=>a.$track?.offset||0,set(o){let{cues:n}=e.subtitle;if(!a.$track||0===n.length)return;let s=(0,i.clamp)(o,-10,10);a.$track.offset=s;for(let t=0;tn);var i=e("../utils");function n(e){let{i18n:t,notice:r,proxy:a,template:{$video:o}}=e,n=!0;window.WebKitPlaybackTargetAvailabilityEvent&&o.webkitShowPlaybackTargetPicker?a(o,"webkitplaybacktargetavailabilitychanged",e=>{switch(e.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,(0,i.def)(e,"airplay",{value(){n?(o.webkitShowPlaybackTargetPicker(),e.emit("airplay")):r.show=t.get("AirPlay Not Available")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5SdyX":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"quality",{set(t){let{controls:r,notice:a,i18n:o}=e,i=t.find(e=>e.default)||t[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:i?.html||"",selector:t,onSelect:async t=>(await e.switchQuality(t.url),a.show=`${o.get("Switch Video")}: ${t.html}`,t.html)})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4HcqV":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{events:t,option:r,template:{$progress:a,$video:o}}=e,n=null,s=null,l=!1,c=!1,p=!1;t.hover(a,()=>{p=!0},()=>{p=!1}),e.on("setBar",async(t,u,d)=>{let f=e.controls?.thumbnails,{url:h,scale:m}=r.thumbnails;if(!f||!h)return;let g="played"===t&&d&&i.isMobile;if("hover"===t||g){if(l||(l=!0,s=await (0,i.loadImg)(h,m),c=!0),!c||!p)return;let t=a.clientWidth*u;(0,i.setStyle)(f,"display","flex"),t>0&&ta.clientWidth-f/2?(0,i.setStyle)(n,"left",`${a.clientWidth-f}px`):(0,i.setStyle)(n,"left",`${t-f/2}px`)}(t):i.isMobile||(0,i.setStyle)(f,"display","none"),g&&(clearTimeout(n),n=setTimeout(()=>{(0,i.setStyle)(f,"display","none")},500))}}),(0,i.def)(e,"thumbnails",{get:()=>e.option.thumbnails,set(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(n),n=null,s=null,l=!1,c=!1)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fCWZK:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{option:t,storage:r,template:{$video:a,$poster:o}}=e;for(let r in t.moreVideoAttr)e.attr(r,t.moreVideoAttr[r]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,i.clamp)(t.volume,0,1));let n=r.get("volume");for(let r in"number"==typeof n&&(a.volume=(0,i.clamp)(n,0,1)),t.poster&&(0,i.setStyle)(o,"backgroundImage",`url(${t.poster})`),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(r,t.cssVar[r]);e.url=t.url}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f8Lv3:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>l);var i=e("../config"),n=o.interopDefault(i),s=e("../utils");function l(e){let{i18n:t,notice:r,option:a,constructor:o,proxy:i,template:{$player:l,$video:c,$poster:p}}=e,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",()=>{a.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 i=>{u{e.emit("resize"),s.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",()=>{e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",()=>{e.controls.show=!0,e.mask.show=!0}),e.on("video:play",()=>{e.mask.show=!1,(0,s.setStyle)(p,"display","none")}),e.on("video:playing",()=>{e.mask.show=!1}),e.on("video:progress",()=>{e.playing&&(e.loading.show=!1)}),e.on("video:seeked",()=>{e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",()=>{e.loading.show=!0,e.mask.show=!1}),e.on("video:timeupdate",()=>{e.mask.show=!1}),e.on("video:waiting",()=>{e.loading.show=!0,e.mask.show=!1})}},{"../config":"lyjeQ","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8Z0Uf":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils/component"),n=o.interopDefault(i),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),v=e("./time"),y=o.interopDefault(v),b=e("./volume"),x=o.interopDefault(b),w=e("./setting"),j=o.interopDefault(w),k=e("./screenshot"),C=o.interopDefault(k),S=e("./airplay"),I=o.interopDefault(S),T=e("../utils");class $ extends n.default{constructor(e){super(e),this.isHover=!1,this.name="control",this.timer=Date.now();let{constructor:t}=e,{$player:r,$bottom:a}=this.art.template;e.on("mousemove",()=>{T.isMobile||(this.show=!0)}),e.on("click",()=>{T.isMobile?this.toggle():this.show=!0}),e.on("document:mousemove",e=>{this.isHover=(0,T.includeFromEvent)(e,a)}),e.on("video:timeupdate",()=>{!e.setting.show&&!this.isHover&&!e.isInput&&e.playing&&this.show&&Date.now()-this.timer>=t.CONTROL_HIDE_TIME&&(this.show=!1)}),e.on("control",e=>{e?((0,T.removeClass)(r,"art-hide-cursor"),(0,T.addClass)(r,"art-hover"),this.timer=Date.now()):((0,T.addClass)(r,"art-hide-cursor"),(0,T.removeClass)(r,"art-hover"))}),this.init()}init(){let{option:e}=this.art;e.isLive||this.add((0,g.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,h.default)({name:"playAndPause",position:"left",index:10})),this.add((0,x.default)({name:"volume",position:"left",index:20})),e.isLive||this.add((0,y.default)({name:"time",position:"left",index:30})),e.quality.length&&(0,T.sleep)().then(()=>{this.art.quality=e.quality}),e.screenshot&&!T.isMobile&&this.add((0,C.default)({name:"screenshot",position:"right",index:20})),e.setting&&this.add((0,j.default)({name:"setting",position:"right",index:30})),e.pip&&this.add((0,d.default)({name:"pip",position:"right",index:40})),e.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,I.default)({name:"airplay",position:"right",index:50})),e.fullscreenWeb&&this.add((0,p.default)({name:"fullscreenWeb",position:"right",index:60})),e.fullscreen&&this.add((0,l.default)({name:"fullscreen",position:"right",index:70}));for(let t=0;te.selector}),(0,T.def)(r,"$control_item",{get:()=>a}),(0,T.def)(r,"$control_value",{get:()=>o})}let n=a(i,"click",async t=>{let r=t.composedPath()||[],a=e.selector.find(e=>e.$control_item===r.find(t=>e.$control_item===t));this.check(a),e.onSelect&&(o.innerHTML=await e.onSelect.call(this.art,a,a.$control_item,t))});r.push(n)}}r.default=$},{"../utils/component":"18nVI","./fullscreen":"c61Lj","./fullscreenWeb":"03jeB","./pip":"u8l8e","./playAndPause":"ebXtb","./progress":"bgoVP","./time":"ikc2j","./volume":"b8NFx","./setting":"03o9l","./screenshot":"4KCF5","./airplay":"4IS2d","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"18nVI":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./dom"),n=e("./error"),s=e("option-validator"),l=o.interopDefault(s),c=e("../scheme");r.default=class{constructor(e){this.id=0,this.art=e,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return(0,i.hasClass)(this.art.template.$player,`art-${this.name}-show`)}set show(e){let{$player:t}=this.art.template,r=`art-${this.name}-show`;e?(0,i.addClass)(t,r):(0,i.removeClass)(t,r),this.art.emit(this.name,e)}toggle(){this.show=!this.show}add(e){let t="function"==typeof e?e(this.art):e;if(t.html=t.html||"",(0,l.default)(t,c.ComponentOption),!this.$parent||!this.name||t.disable)return;let r=t.name||`${this.name}${this.id}`,a=this.cache.get(r);(0,n.errorHandle)(!a,`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;let o=(0,i.createElement)("div");(0,i.addClass)(o,`art-${this.name}`),(0,i.addClass)(o,`art-${this.name}-${r}`);let s=Array.from(this.$parent.children);o.dataset.index=t.index||this.id;let p=s.find(e=>Number(e.dataset.index)>=Number(o.dataset.index));p?p.insertAdjacentElement("beforebegin",o):(0,i.append)(this.$parent,o),t.html&&(0,i.append)(o,t.html),t.style&&(0,i.setStyles)(o,t.style),t.tooltip&&(0,i.tooltip)(o,t.tooltip);let u=[];if(t.click){let e=this.art.events.proxy(o,"click",e=>{e.preventDefault(),t.click.call(this.art,this,e)});u.push(e)}return t.selector&&["left","right"].includes(t.position)&&this.selector(t,o,u),this[r]=o,this.cache.set(r,{$ref:o,events:u,option:t}),t.mounted&&t.mounted.call(this.art,o),o}remove(e){let t=this.cache.get(e);(0,n.errorHandle)(t,`Can't find [${e}] from the [${this.name}]`),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(let e=0;en);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.fullscreenOn),s=(0,i.append)(e,a.fullscreenOff);(0,i.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreen=!t.fullscreen}),t.on("fullscreen",t=>{t?((0,i.tooltip)(e,o.get("Exit Fullscreen")),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","inline-flex")):((0,i.tooltip)(e,o.get("Fullscreen")),(0,i.setStyle)(n,"display","inline-flex"),(0,i.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03jeB":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.fullscreenWebOn),s=(0,i.append)(e,a.fullscreenWebOff);(0,i.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreenWeb=!t.fullscreenWeb}),t.on("fullscreenWeb",t=>{t?((0,i.tooltip)(e,o.get("Exit Web Fullscreen")),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","inline-flex")):((0,i.tooltip)(e,o.get("Web Fullscreen")),(0,i.setStyle)(n,"display","inline-flex"),(0,i.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],u8l8e:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t;(0,i.append)(e,a.pip),r(e,"click",()=>{t.pip=!t.pip}),t.on("pip",t=>{(0,i.tooltip)(e,o.get(t?"Exit PIP Mode":"PIP Mode"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ebXtb:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.play),s=(0,i.append)(e,a.pause);function l(){(0,i.setStyle)(n,"display","flex"),(0,i.setStyle)(s,"display","none")}function c(){(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","flex")}(0,i.tooltip)(n,o.get("Play")),(0,i.tooltip)(s,o.get("Pause")),r(n,"click",()=>{t.play()}),r(s,"click",()=>{t.pause()}),t.playing?c():l(),t.on("video:playing",()=>{c()}),t.on("video:pause",()=>{l()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bgoVP:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",()=>n),o.export(r,"setCurrentTime",()=>s),o.export(r,"default",()=>l);var i=e("../utils");function n(e,t){let{$progress:r}=e.template,{left:a}=(0,i.getRect)(r),o=i.isMobile?t.touches[0].clientX:t.clientX,n=(0,i.clamp)(o-a,0,r.clientWidth),s=n/r.clientWidth*e.duration,l=(0,i.secondToTime)(s),c=(0,i.clamp)(n/r.clientWidth,0,1);return{second:s,time:l,width:n,percentage:c}}function s(e,t){if(e.isRotate){let r=t.touches[0].clientY/e.height,a=r*e.duration;e.emit("setBar","played",r,t),e.seek=a}else{let{second:r,percentage:a}=n(e,t);e.emit("setBar","played",a,t),e.seek=r}}function l(e){return t=>{let{icons:r,option:a,proxy:o}=t;return{...e,html:`
`,mounted:e=>{let l=null,c=!1,p=(0,i.query)(".art-progress-hover",e),u=(0,i.query)(".art-progress-loaded",e),d=(0,i.query)(".art-progress-played",e),f=(0,i.query)(".art-progress-highlight",e),h=(0,i.query)(".art-progress-indicator",e),m=(0,i.query)(".art-progress-tip",e);function g(r,a){let{width:o,time:s}=a||n(t,r);m.innerText=s;let l=m.clientWidth;o<=l/2?(0,i.setStyle)(m,"left",0):o>e.clientWidth-l/2?(0,i.setStyle)(m,"left",`${e.clientWidth-l}px`):(0,i.setStyle)(m,"left",`${o-l/2}px`)}r.indicator?(0,i.append)(h,r.indicator):(0,i.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,a,o){let n="played"===r&&o&&i.isMobile;"loaded"===r&&(0,i.setStyle)(u,"width",`${100*a}%`),"hover"===r&&(0,i.setStyle)(p,"width",`${100*a}%`),"played"===r&&((0,i.setStyle)(d,"width",`${100*a}%`),(0,i.setStyle)(h,"left",`${100*a}%`)),n&&((0,i.setStyle)(m,"display","flex"),g(o,{width:e.clientWidth*a,time:(0,i.secondToTime)(a*t.duration)}),clearTimeout(l),l=setTimeout(()=>{(0,i.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){f.innerText="";for(let e=0;e`;(0,i.append)(f,n)}}),t.on("video:progress",()=>{t.emit("setBar","loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",()=>{t.emit("setBar","played",t.played)}):t.on("video:timeupdate",()=>{t.emit("setBar","played",t.played)}),t.on("video:ended",()=>{t.emit("setBar","played",1)}),t.emit("setBar","loaded",t.loaded||0),i.isMobile||(o(e,"click",e=>{e.target!==h&&s(t,e)}),o(e,"mousemove",r=>{let{percentage:a}=n(t,r);if(t.emit("setBar","hover",a,r),(0,i.setStyle)(m,"display","flex"),(0,i.includeFromEvent)(r,f)){let{width:a}=n(t,r),{text:o}=r.target.dataset;m.innerText=o;let s=m.clientWidth;a<=s/2?(0,i.setStyle)(m,"left",0):a>e.clientWidth-s/2?(0,i.setStyle)(m,"left",`${e.clientWidth-s}px`):(0,i.setStyle)(m,"left",`${a-s/2}px`)}else g(r)}),o(e,"mouseleave",e=>{(0,i.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),o(e,"mousedown",e=>{c=0===e.button}),t.on("document:mousemove",e=>{if(c){let{second:r,percentage:a}=n(t,e);t.emit("setBar","played",a,e),t.seek=r}}),t.on("document:mouseup",()=>{c&&(c=!1)}))}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ikc2j:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,style:i.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:e=>{function r(){let r=`${(0,i.secondToTime)(t.currentTime)} / ${(0,i.secondToTime)(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();let a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;en);var i=e("../utils");function n(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a}=t,o=(0,i.append)(e,a.volume),n=(0,i.append)(e,a.volumeClose),s=(0,i.append)(e,'
'),l=(0,i.append)(s,'
'),c=(0,i.append)(l,'
'),p=(0,i.append)(l,'
'),u=(0,i.append)(p,'
'),d=(0,i.append)(u,'
'),f=(0,i.append)(p,'
');function h(e){let{top:t,height:r}=(0,i.getRect)(p);return 1-(e.clientY-t)/r}function m(){if(t.muted||0===t.volume)(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(n,"display","flex"),(0,i.setStyle)(f,"top","100%"),(0,i.setStyle)(d,"top","100%"),c.innerText=0;else{let e=100*t.volume;(0,i.setStyle)(o,"display","flex"),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(f,"top",`${100-e}%`),(0,i.setStyle)(d,"top",`${100-e}%`),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(o,"click",()=>{t.muted=!0}),r(n,"click",()=>{t.muted=!1}),i.isMobile)(0,i.setStyle)(s,"display","none");else{let e=!1;r(p,"mousedown",r=>{e=0===r.button,t.volume=h(r)}),t.on("document:mousemove",r=>{e&&(t.muted=!1,t.volume=h(r))}),t.on("document:mouseup",()=>{e&&(e=!1)})}}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03o9l":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t;(0,i.append)(e,a.setting),r(e,"click",()=>{t.setting.toggle(),t.setting.resize()}),t.on("setting",t=>{(0,i.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4KCF5":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{let{proxy:r,icons:a}=t;(0,i.append)(e,a.screenshot),r(e,"click",()=>{t.screenshot()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IS2d":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("AirPlay"),mounted:e=>{let{proxy:r,icons:a}=t;(0,i.append)(e,a.airplay),r(e,"click",()=>t.airplay())}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2KYsr":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),s=o.interopDefault(n),l=e("./playbackRate"),c=o.interopDefault(l),p=e("./aspectRatio"),u=o.interopDefault(p),d=e("./flip"),f=o.interopDefault(d),h=e("./info"),m=o.interopDefault(h),g=e("./version"),v=o.interopDefault(g),y=e("./close"),b=o.interopDefault(y);class x extends s.default{constructor(e){super(e),this.name="contextmenu",this.$parent=e.template.$contextmenu,i.isMobile||this.init()}init(){let{option:e,proxy:t,template:{$player:r,$contextmenu:a}}=this.art;e.playbackRate&&this.add((0,c.default)({name:"playbackRate",index:10})),e.aspectRatio&&this.add((0,u.default)({name:"aspectRatio",index:20})),e.flip&&this.add((0,f.default)({name:"flip",index:30})),this.add((0,m.default)({name:"info",index:40})),this.add((0,v.default)({name:"version",index:50})),this.add((0,b.default)({name:"close",index:60}));for(let t=0;t{if(!this.art.constructor.CONTEXTMENU)return;e.preventDefault(),this.show=!0;let t=e.clientX,o=e.clientY,{height:n,width:s,left:l,top:c}=(0,i.getRect)(r),{height:p,width:u}=(0,i.getRect)(a),d=t-l,f=o-c;t+u>l+s&&(d=s-u),o+p>c+n&&(f=n-p),(0,i.setStyles)(a,{top:`${f}px`,left:`${d}px`})}),t(r,"click",e=>{(0,i.includeFromEvent)(e,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}r.default=x},{"../utils":"71aH7","../utils/component":"18nVI","./playbackRate":"69eLi","./aspectRatio":"lUefg","./flip":"kysiM","./info":"gqIgJ","./version":"kRU7C","./close":"jQ8Pm","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"69eLi":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{PLAYBACK_RATE:a}}=t,o=a.map(e=>`${1===e?r.get("Normal"):e.toFixed(1)}`).join("");return{...e,html:`${r.get("Play Speed")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.playbackRate=Number(a),e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="1"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("video:ratechange",()=>{let r=(0,i.queryAll)("span",e).find(e=>Number(e.dataset.value)===t.playbackRate);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lUefg:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{ASPECT_RATIO:a}}=t,o=a.map(e=>`${"default"===e?r.get("Default"):e}`).join("");return{...e,html:`${r.get("Aspect Ratio")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.aspectRatio=a,e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="default"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("aspectRatio",t=>{let r=(0,i.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kysiM:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{FLIP:a}}=t,o=a.map(e=>`${r.get((0,i.capitalize)(e))}`).join("");return{...e,html:`${r.get("Video Flip")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.flip=a.toLowerCase(),e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="normal"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("flip",t=>{let r=(0,i.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gqIgJ:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kRU7C:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return{...e,html:'ArtPlayer 5.2.3'}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jQ8Pm:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"02ajl":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),s=o.interopDefault(n);class l extends s.default{constructor(e){super(e),this.name="info",i.isMobile||this.init()}init(){let{proxy:e,constructor:t,template:{$infoPanel:r,$infoClose:a,$video:o}}=this.art;e(a,"click",()=>{this.show=!1});let n=null,s=(0,i.queryAll)("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),!function e(){for(let e=0;enull,this.init(e.option.subtitle);let t=!1;e.on("video:timeupdate",()=>{if(!this.url)return;let e=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof e&&e!==t&&(t=e,this.createTrack(e?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(e,t){let{$subtitle:r}=this.art.template;return"object"==typeof e?(0,i.setStyles)(r,e):(0,i.setStyle)(r,e,t)}update(){let{option:{subtitle:e},template:{$subtitle:t}}=this.art;t.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),t.innerHTML=this.activeCues.map((t,r)=>t.text.split(/\r?\n/).filter(e=>e.trim()).map(t=>`
${e.escape?(0,i.escape)(t):t}
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(e,t={}){let{i18n:r,notice:a,option:o}=this.art,i={...o.subtitle,...t,url:e},n=await this.init(i);return t.name&&(a.show=`${r.get("Switch Subtitle")}: ${t.name}`),n}createTrack(e,t){let{template:r,proxy:a,option:o}=this.art,{$video:n,$track:s}=r,l=(0,i.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.label=o.subtitle.name||"Artplayer",l.track.mode="hidden",l.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),s.onload=null,(0,i.remove)(s),(0,i.append)(n,l),r.$track=l,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(e){let{notice:t,template:{$subtitle:r}}=this.art;return this.textTrack?((0,c.default)(e,u.default.subtitle),e.url)?(this.option=e,this.style(e.style),fetch(e.url).then(e=>e.arrayBuffer()).then(t=>{let r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,i.getExt)(e.url)){case"srt":{let t=(0,i.srtToVtt)(r),a=e.onVttLoad(t);return(0,i.vttToBlob)(a)}case"ass":{let t=(0,i.assToVtt)(r),a=e.onVttLoad(t);return(0,i.vttToBlob)(a)}case"vtt":{let t=e.onVttLoad(r);return(0,i.vttToBlob)(t)}default:return e.url}}).then(e=>(r.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.createTrack("metadata",e)),e)).catch(e=>{throw r.innerHTML="",t.show=e,e})):void 0:null}}r.default=d},{"./utils":"71aH7","./utils/component":"18nVI","option-validator":"bAWi2","./scheme":"AKEiO","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jo4S1:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./clickInit"),n=o.interopDefault(i),s=e("./hoverInit"),l=o.interopDefault(s),c=e("./moveInit"),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),v=e("./documentInit"),y=o.interopDefault(v),b=e("./updateInit"),x=o.interopDefault(b),w=e("./restoreInit"),j=o.interopDefault(w);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,n.default)(e,this),(0,l.default)(e,this),(0,p.default)(e,this),(0,d.default)(e,this),(0,h.default)(e,this),(0,g.default)(e,this),(0,y.default)(e,this),(0,x.default)(e,this),(0,j.default)(e,this)}proxy(e,t,r,a={}){if(Array.isArray(t))return t.map(t=>this.proxy(e,t,r,a));e.addEventListener(t,r,a);let o=()=>e.removeEventListener(t,r,a);return this.destroyEvents.push(o),o}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}remove(e){let t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}destroy(){for(let e=0;en);var i=e("../utils");function n(e,t){let{constructor:r,template:{$player:a,$video:o}}=e;t.proxy(document,["click","contextmenu"],t=>{(0,i.includeFromEvent)(t,a)?(e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit("focus",t)):(e.isInput=!1,e.isFocus=!1,e.emit("blur",t))});let n=[];t.proxy(o,"click",t=>{let a=Date.now();n.push(a);let{MOBILE_CLICK_PLAY:o,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r,p=n.filter(e=>a-e<=s);switch(p.length){case 1:e.emit("click",t),i.isMobile?!e.isLock&&o&&e.toggle():e.toggle(),n=p;break;case 2:e.emit("dblclick",t),i.isMobile?!e.isLock&&l&&e.toggle():c&&(e.fullscreen=!e.fullscreen),n=[];break;default:n=[]}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4jWHi":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{$player:r}=e.template;t.hover(r,t=>{(0,i.addClass)(r,"art-hover"),e.emit("hover",!0,t)},t=>{(0,i.removeClass)(r,"art-hover"),e.emit("hover",!1,t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eqaUm:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){let{$player:r}=e.template;t.proxy(r,"mousemove",t=>{e.emit("mousemove",t)})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eDXPO:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{option:r,constructor:a}=e;e.on("resize",()=>{let{aspectRatio:t,notice:a}=e;"standard"===e.state&&r.autoSize&&e.autoSize(),e.aspectRatio=t,a.show=""});let o=(0,i.debounce)(()=>e.emit("resize"),a.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],()=>o()),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",()=>o())}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"95GtS":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>s);var i=e("../utils"),n=e("../control/progress");function s(e,t){if(i.isMobile&&!e.option.isLive){let{$video:r,$progress:a}=e.template,o=null,s=!1,l=0,c=0,p=0,u=t=>{if(1===t.touches.length&&!e.isLock){o===a&&(0,n.setCurrentTime)(e,t),s=!0;let{pageX:r,pageY:i}=t.touches[0];l=r,c=i,p=e.currentTime}},d=t=>{if(1===t.touches.length&&s&&e.duration){let{pageX:a,pageY:n}=t.touches[0],s=function(e,t,r,a){var o=t-a,i=r-e,n=0;if(2>Math.abs(i)&&2>Math.abs(o))return n;var s=180*Math.atan2(o,i)/Math.PI;return s>=-45&&s<45?n=4:s>=45&&s<135?n=1:s>=-135&&s<-45?n=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(n=3),n}(l,c,a,n),u=[3,4].includes(s),d=[1,2].includes(s);if(u&&!e.isRotate||d&&e.isRotate){let s=(0,i.clamp)((a-l)/e.width,-1,1),u=(0,i.clamp)((n-c)/e.height,-1,1),d=e.isRotate?u:s,f=o===r?e.constructor.TOUCH_MOVE_RATIO:1,h=(0,i.clamp)(p+e.duration*d*f,0,e.duration);e.seek=h,e.emit("setBar","played",(0,i.clamp)(h/e.duration,0,1),t),e.notice.show=`${(0,i.secondToTime)(h)} / ${(0,i.secondToTime)(e.duration)}`}}};e.option.gesture&&(t.proxy(r,"touchstart",e=>{o=r,u(e)}),t.proxy(r,"touchmove",d)),t.proxy(a,"touchstart",e=>{o=a,u(e)}),t.proxy(a,"touchmove",d),t.proxy(document,"touchend",()=>{s&&(l=0,c=0,p=0,s=!1,o=null)})}}},{"../utils":"71aH7","../control/progress":"bgoVP","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],InUBx:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{option:r,constructor:a,template:{$container:o}}=e,n=(0,i.throttle)(()=>{e.emit("view",(0,i.isInViewport)(o,a.SCROLL_GAP))},a.SCROLL_TIME);t.proxy(window,"scroll",()=>n()),e.on("view",t=>{r.autoMini&&(e.mini=!t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hoLfM:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){t.proxy(document,"mousemove",t=>{e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",t=>{e.emit("document:mouseup",t)})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cl8m3:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){if(e.constructor.USE_RAF){let t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",()=>{cancelAnimationFrame(t)})}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bK8As:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6NoFy":[function(e,t,r,a){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.option.hotkey&&!o.isMobile&&this.init()}init(){let{proxy:e,constructor:t}=this.art;this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP}),e(document,"keydown",e=>{if(this.art.isFocus){let t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey){let t=this.keys[e.code];if(t){e.preventDefault();for(let r=0;r{a.innerText="",(0,o.removeClass)(r,"art-notice-show")},t.NOTICE_TIME)):(0,o.removeClass)(r,"art-notice-show")}}},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5POkG":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),s=o.interopDefault(n);class l extends s.default{constructor(e){super(e),this.name="mask";let{template:t,icons:r,events:a}=e,o=(0,i.append)(t.$state,r.state),n=(0,i.append)(t.$state,r.error);(0,i.setStyle)(n,"display","none"),e.on("destroy",()=>{(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(n,"display",null)}),a.proxy(t.$state,"click",()=>e.play())}}r.default=l},{"./utils":"71aH7","./utils/component":"18nVI","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6OeNg":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("bundle-text:./loading.svg"),s=o.interopDefault(n),l=e("bundle-text:./state.svg"),c=o.interopDefault(l),p=e("bundle-text:./check.svg"),u=o.interopDefault(p),d=e("bundle-text:./play.svg"),f=o.interopDefault(d),h=e("bundle-text:./pause.svg"),m=o.interopDefault(h),g=e("bundle-text:./volume.svg"),v=o.interopDefault(g),y=e("bundle-text:./volume-close.svg"),b=o.interopDefault(y),x=e("bundle-text:./screenshot.svg"),w=o.interopDefault(x),j=e("bundle-text:./setting.svg"),k=o.interopDefault(j),C=e("bundle-text:./arrow-left.svg"),S=o.interopDefault(C),I=e("bundle-text:./arrow-right.svg"),T=o.interopDefault(I),$=e("bundle-text:./playback-rate.svg"),E=o.interopDefault($),M=e("bundle-text:./aspect-ratio.svg"),F=o.interopDefault(M),D=e("bundle-text:./config.svg"),H=o.interopDefault(D),A=e("bundle-text:./pip.svg"),z=o.interopDefault(A),R=e("bundle-text:./lock.svg"),O=o.interopDefault(R),Y=e("bundle-text:./unlock.svg"),L=o.interopDefault(Y),P=e("bundle-text:./fullscreen-off.svg"),V=o.interopDefault(P),q=e("bundle-text:./fullscreen-on.svg"),_=o.interopDefault(q),N=e("bundle-text:./fullscreen-web-off.svg"),B=o.interopDefault(N),W=e("bundle-text:./fullscreen-web-on.svg"),U=o.interopDefault(W),K=e("bundle-text:./switch-on.svg"),X=o.interopDefault(K),G=e("bundle-text:./switch-off.svg"),Q=o.interopDefault(G),Z=e("bundle-text:./flip.svg"),J=o.interopDefault(Z),ee=e("bundle-text:./error.svg"),et=o.interopDefault(ee),er=e("bundle-text:./close.svg"),ea=o.interopDefault(er),eo=e("bundle-text:./airplay.svg"),ei=o.interopDefault(eo);r.default=class{constructor(e){let t={loading:s.default,state:c.default,play:f.default,pause:m.default,check:u.default,volume:v.default,volumeClose:b.default,screenshot:w.default,setting:k.default,pip:z.default,arrowLeft:S.default,arrowRight:T.default,playbackRate:E.default,aspectRatio:F.default,config:H.default,lock:O.default,flip:J.default,unlock:L.default,fullscreenOff:V.default,fullscreenOn:_.default,fullscreenWebOff:B.default,fullscreenWebOn:U.default,switchOn:X.default,switchOff:Q.default,error:et.default,close:ea.default,airplay:ei.default,...e.option.icons};for(let e in t)(0,i.def)(this,e,{get:()=>(0,i.getIcon)(e,t[e])})}}},{"../utils":"71aH7","bundle-text:./loading.svg":"7tDub","bundle-text:./state.svg":"1ElZc","bundle-text:./check.svg":"lmgoP","bundle-text:./play.svg":"lVWoQ","bundle-text:./pause.svg":"5Mnax","bundle-text:./volume.svg":"w3eIa","bundle-text:./volume-close.svg":"rHjo1","bundle-text:./screenshot.svg":"2KcqM","bundle-text:./setting.svg":"8rQMV","bundle-text:./arrow-left.svg":"kqGBE","bundle-text:./arrow-right.svg":"aFjpC","bundle-text:./playback-rate.svg":"lx7ZM","bundle-text:./aspect-ratio.svg":"2sEjf","bundle-text:./config.svg":"fQTgE","bundle-text:./pip.svg":"2CaxO","bundle-text:./lock.svg":"aCGnW","bundle-text:./unlock.svg":"bTrAV","bundle-text:./fullscreen-off.svg":"bA3p0","bundle-text:./fullscreen-on.svg":"fTuY8","bundle-text:./fullscreen-web-off.svg":"tvKf4","bundle-text:./fullscreen-web-on.svg":"1F1oB","bundle-text:./switch-on.svg":"7qNHs","bundle-text:./switch-off.svg":"28aV8","bundle-text:./flip.svg":"1uXI6","bundle-text:./error.svg":"9f4dh","bundle-text:./close.svg":"4nTtS","bundle-text:./airplay.svg":"cDPXC","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7tDub":[function(e,t,r,a){t.exports=''},{}],"1ElZc":[function(e,t,r,a){t.exports=''},{}],lmgoP:[function(e,t,r,a){t.exports=''},{}],lVWoQ:[function(e,t,r,a){t.exports=''},{}],"5Mnax":[function(e,t,r,a){t.exports=''},{}],w3eIa:[function(e,t,r,a){t.exports=''},{}],rHjo1:[function(e,t,r,a){t.exports=''},{}],"2KcqM":[function(e,t,r,a){t.exports=''},{}],"8rQMV":[function(e,t,r,a){t.exports=''},{}],kqGBE:[function(e,t,r,a){t.exports=''},{}],aFjpC:[function(e,t,r,a){t.exports=''},{}],lx7ZM:[function(e,t,r,a){t.exports=''},{}],"2sEjf":[function(e,t,r,a){t.exports=''},{}],fQTgE:[function(e,t,r,a){t.exports=''},{}],"2CaxO":[function(e,t,r,a){t.exports=''},{}],aCGnW:[function(e,t,r,a){t.exports=''},{}],bTrAV:[function(e,t,r,a){t.exports=''},{}],bA3p0:[function(e,t,r,a){t.exports=''},{}],fTuY8:[function(e,t,r,a){t.exports=''},{}],tvKf4:[function(e,t,r,a){t.exports=''},{}],"1F1oB":[function(e,t,r,a){t.exports=''},{}],"7qNHs":[function(e,t,r,a){t.exports=''},{}],"28aV8":[function(e,t,r,a){t.exports=''},{}],"1uXI6":[function(e,t,r,a){t.exports=''},{}],"9f4dh":[function(e,t,r,a){t.exports=''},{}],"4nTtS":[function(e,t,r,a){t.exports=''},{}],cDPXC:[function(e,t,r,a){t.exports=''},{}],"3eYNH":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./flip"),n=o.interopDefault(i),s=e("./aspectRatio"),l=o.interopDefault(s),c=e("./playbackRate"),p=o.interopDefault(c),u=e("./subtitleOffset"),d=o.interopDefault(u),f=e("../utils/component"),h=o.interopDefault(f),m=e("../utils");class g extends h.default{constructor(e){super(e);let{option:t,controls:r,template:{$setting:a}}=e;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...t.settings],t.setting&&(this.format(),this.render(),e.on("blur",()=>{this.show&&(this.show=!1,this.render())}),e.on("focus",e=>{let t=(0,m.includeFromEvent)(e,r.setting),a=(0,m.includeFromEvent)(e,this.$parent);!this.show||t||a||(this.show=!1,this.render())}),e.on("resize",()=>this.resize()))}get builtin(){let e=[],{option:t}=this.art;return t.playbackRate&&e.push((0,p.default)(this.art)),t.aspectRatio&&e.push((0,l.default)(this.art)),t.flip&&e.push((0,n.default)(this.art)),t.subtitleOffset&&e.push((0,d.default)(this.art)),e}traverse(e,t=this.option){for(let r=0;r{t.default=t===e,t.default&&t.$item&&(0,m.inverseClass)(t.$item,"art-current")},e.$option),this.render(e.$parents)}format(e=this.option,t,r,a=[]){for(let o=0;ot}),(0,m.def)(i,"$parents",{get:()=>r}),(0,m.def)(i,"$option",{get:()=>e});let a=[];(0,m.def)(i,"$events",{get:()=>a}),(0,m.def)(i,"$formatted",{get:()=>!0})}this.format(i.selector||[],i,e,a)}this.option=e}find(e=""){let t=null;return this.traverse(r=>{r.name===e&&(t=r)}),t}resize(){let{controls:e,constructor:{SETTING_WIDTH:t,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(e.setting&&this.show){let i=this.active[0]?.$parent?.width||t,{left:n,width:s}=(0,m.getRect)(e.setting),{left:l,width:c}=(0,m.getRect)(a),p=n-l+s/2-i/2,u=this.active===this.option?this.active.length*r:(this.active.length+1)*r;if((0,m.setStyle)(o,"height",`${u}px`),(0,m.setStyle)(o,"width",`${i}px`),this.art.isRotate||m.isMobile)return;p+i>c?((0,m.setStyle)(o,"left",null),(0,m.setStyle)(o,"right",null)):((0,m.setStyle)(o,"left",`${p}px`),(0,m.setStyle)(o,"right","auto"))}}inactivate(e){for(let t=0;t'),s=(0,m.createElement)("div");(0,m.addClass)(s,"art-setting-item-left-icon"),(0,m.append)(s,a),(0,m.append)(n,s),(0,m.append)(n,e.$parent.html);let l=r(i,"click",()=>this.render(e.$parents));e.$parent.$events.push(l),(0,m.append)(t,i)}creatItem(e,t=!1){if(!this.cache.has(e.$option))return;let r=this.cache.get(e.$option),a=e.$item,o="selector";(0,m.has)(e,"switch")&&(o="switch"),(0,m.has)(e,"range")&&(o="range"),(0,m.has)(e,"onClick")&&(o="button");let{icons:i,proxy:n,constructor:s}=this.art,l=(0,m.createElement)("div");(0,m.addClass)(l,"art-setting-item"),(0,m.setStyle)(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=e.name||"",l.dataset.value=e.value||"";let c=(0,m.append)(l,'
'),p=(0,m.append)(l,'
'),u=(0,m.createElement)("div");switch((0,m.addClass)(u,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":(0,m.append)(u,e.icon||i.config);break;case"selector":e.selector?.length?(0,m.append)(u,e.icon||i.config):(0,m.append)(u,i.check)}(0,m.append)(c,u),(0,m.def)(e,"$icon",{configurable:!0,get:()=>u}),(0,m.def)(e,"icon",{configurable:!0,get:()=>u.innerHTML,set(e){u.innerHTML="",(0,m.append)(u,e)}});let d=(0,m.createElement)("div");(0,m.addClass)(d,"art-setting-item-left-text"),(0,m.append)(d,e.html||""),(0,m.append)(c,d),(0,m.def)(e,"$html",{configurable:!0,get:()=>d}),(0,m.def)(e,"html",{configurable:!0,get:()=>d.innerHTML,set(e){d.innerHTML="",(0,m.append)(d,e)}});let f=(0,m.createElement)("div");switch((0,m.addClass)(f,"art-setting-item-right-tooltip"),(0,m.append)(f,e.tooltip||""),(0,m.append)(p,f),(0,m.def)(e,"$tooltip",{configurable:!0,get:()=>f}),(0,m.def)(e,"tooltip",{configurable:!0,get:()=>f.innerHTML,set(e){f.innerHTML="",(0,m.append)(f,e)}}),o){case"switch":{let t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");let r=(0,m.append)(t,i.switchOn),a=(0,m.append)(t,i.switchOff);(0,m.setStyle)(e.switch?a:r,"display","none"),(0,m.append)(p,t),(0,m.def)(e,"$switch",{configurable:!0,get:()=>t});let o=e.switch;(0,m.def)(e,"switch",{configurable:!0,get:()=>o,set(e){o=e,e?((0,m.setStyle)(a,"display","none"),(0,m.setStyle)(r,"display",null)):((0,m.setStyle)(a,"display",null),(0,m.setStyle)(r,"display","none"))}});break}case"range":{let t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");let r=(0,m.append)(t,'');r.value=e.range[0],r.min=e.range[1],r.max=e.range[2],r.step=e.range[3],(0,m.addClass)(r,"art-setting-range"),(0,m.append)(p,t),(0,m.def)(e,"$range",{configurable:!0,get:()=>r});let a=[...e.range];(0,m.def)(e,"range",{configurable:!0,get:()=>a,set(e){a=[...e],r.value=e[0],r.min=e[1],r.max=e[2],r.step=e[3]}})}break;case"selector":if(e.selector?.length){let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon"),(0,m.append)(e,i.arrowRight),(0,m.append)(p,e)}}switch(o){case"switch":if(e.onSwitch){let t=n(l,"click",async t=>{e.switch=await e.onSwitch.call(this.art,e,l,t)});e.$events.push(t)}break;case"range":if(e.$range){if(e.onRange){let t=n(e.$range,"change",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onRange.call(this.art,e,l,t)});e.$events.push(t)}if(e.onChange){let t=n(e.$range,"input",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onChange.call(this.art,e,l,t)});e.$events.push(t)}}break;case"selector":{let t=n(l,"click",async t=>{e.selector?.length?this.render(e.selector):(this.check(e),e.$parent.onSelect&&(e.$parent.tooltip=await e.$parent.onSelect.call(this.art,e,l,t)))});e.$events.push(t),e.default&&(0,m.addClass)(l,"art-current")}break;case"button":if(e.onClick){let t=n(l,"click",async t=>{e.tooltip=await e.onClick.call(this.art,e,l,t)});e.$events.push(t)}}(0,m.def)(e,"$item",{configurable:!0,get:()=>l}),t?(0,m.replaceElement)(l,a):(0,m.append)(r,l),e.mounted&&setTimeout(()=>e.mounted.call(this.art,e.$item,e),0)}render(e=this.option){if(this.active=e,this.cache.has(e)){let t=this.cache.get(e);(0,m.inverseClass)(t,"art-current")}else{let t=(0,m.createElement)("div");this.cache.set(e,t),(0,m.addClass)(t,"art-setting-panel"),(0,m.append)(this.$parent,t),(0,m.inverseClass)(t,"art-current"),e[0]?.$parent&&this.creatHeader(e[0]);for(let t=0;tn);var i=e("../utils");function n(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:o}}=e;function n(e){return t.get((0,i.capitalize)(e))}function s(){let t=e.setting.find(`flip-${e.flip}`);e.setting.check(t)}return{width:a,name:"flip",html:t.get("Video Flip"),tooltip:n(e.flip),icon:r.flip,selector:o.map(t=>({value:t,name:`flip-${t}`,default:t===e.flip,html:n(t)})),onSelect:t=>(e.flip=t.value,t.html),mounted:()=>{s(),e.on("flip",()=>s())}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"84NBV":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=e;function i(e){return"default"===e?t.get("Default"):e}function n(){let t=e.setting.find(`aspect-ratio-${e.aspectRatio}`);e.setting.check(t)}return{width:a,name:"aspect-ratio",html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:i(e.aspectRatio),selector:o.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.aspectRatio,html:i(t)})),onSelect:t=>(e.aspectRatio=t.value,t.html),mounted:()=>{n(),e.on("aspectRatio",()=>n())}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aetWt:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=e;function i(e){return 1===e?t.get("Normal"):e.toFixed(1)}function n(){let t=e.setting.find(`playback-rate-${e.playbackRate}`);e.setting.check(t)}return{width:a,name:"playback-rate",html:t.get("Play Speed"),tooltip:i(e.playbackRate),icon:r.playbackRate,selector:o.map(t=>({value:t,name:`playback-rate-${t}`,default:t===e.playbackRate,html:i(t)})),onSelect:t=>(e.playbackRate=t.value,t.html),mounted:()=>{n(),e.on("video:ratechange",()=>n())}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fIBkO:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:a}=e;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:t.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:t=>(e.subtitleOffset=t.range[0],t.range[0]+"s"),mounted:(t,r)=>{e.on("subtitleOffset",e=>{r.$range.value=e,r.tooltip=e+"s"})}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2aaJe":[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{let 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{let r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{let 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":"9pCYc"}],"8MTUM":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./miniProgressBar"),s=o.interopDefault(n),l=e("./autoOrientation"),c=o.interopDefault(l),p=e("./autoPlayback"),u=o.interopDefault(p),d=e("./fastForward"),f=o.interopDefault(d),h=e("./lock"),m=o.interopDefault(h);r.default=class{constructor(e){this.art=e,this.id=0;let{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(s.default),t.lock&&i.isMobile&&this.add(m.default),t.autoPlayback&&!t.isLive&&this.add(u.default),t.autoOrientation&&i.isMobile&&this.add(c.default),t.fastForward&&i.isMobile&&!t.isLive&&this.add(f.default);for(let e=0;ethis.next(e,t)):this.next(e,t)}next(e,t){let r=t&&t.name||e.name||`plugin${this.id}`;return(0,i.errorHandle)(!(0,i.has)(this,r),`Cannot add a plugin that already has the same name: ${r}`),(0,i.def)(this,r,{value:t}),this}}},{"../utils":"71aH7","./miniProgressBar":"87pSL","./autoOrientation":"ePEg5","./autoPlayback":"cVO99","./fastForward":"hFDwt","./lock":"1hsTH","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"87pSL":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return e.on("control",t=>{t?(0,i.removeClass)(e.template.$player,"art-mini-progress-bar"):(0,i.addClass)(e.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ePEg5:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,template:{$player:r,$video:a}}=e;return e.on("fullscreenWeb",o=>{if(o){let{videoWidth:o,videoHeight:n}=a,{clientWidth:s,clientHeight:l}=document.documentElement;(o>n&&sl)&&setTimeout(()=>{(0,i.setStyle)(r,"width",`${l}px`),(0,i.setStyle)(r,"height",`${s}px`),(0,i.setStyle)(r,"transform-origin","0 0"),(0,i.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,i.addClass)(r,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},t.AUTO_ORIENTATION_TIME)}else(0,i.hasClass)(r,"art-auto-orientation")&&((0,i.removeClass)(r,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",async e=>{if(!screen?.orientation?.lock)return;let t=screen.orientation.type;if(e){let{videoWidth:e,videoHeight:o}=a,{clientWidth:n,clientHeight:s}=document.documentElement;if(e>o&&ns){let e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),(0,i.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,i.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),(0,i.removeClass)(r,"art-auto-orientation-fullscreen"))}),{name:"autoOrientation",get state(){return(0,i.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cVO99:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,icons:r,storage:a,constructor:o,proxy:n,template:{$poster:s}}=e,l=e.layers.add({name:"auto-playback",html:`
`}),c=(0,i.query)(".art-auto-playback-last",l),p=(0,i.query)(".art-auto-playback-jump",l),u=(0,i.query)(".art-auto-playback-close",l);(0,i.append)(u,r.close);let d=null;function f(){let r=(a.get("times")||{})[e.option.id||e.option.url];clearTimeout(d),(0,i.setStyle)(l,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&((0,i.setStyle)(l,"display","flex"),c.innerText=`${t.get("Last Seen")} ${(0,i.secondToTime)(r)}`,p.innerText=t.get("Jump Play"),n(u,"click",()=>{(0,i.setStyle)(l,"display","none")}),n(p,"click",()=>{e.seek=r,e.play(),(0,i.setStyle)(s,"display","none"),(0,i.setStyle)(l,"display","none")}),e.once("video:timeupdate",()=>{d=setTimeout(()=>{(0,i.setStyle)(l,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",()=>{if(e.playing){let t=a.get("times")||{},r=Object.keys(t);r.length>o.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,a.set("times",t)}}),e.on("ready",f),e.on("restart",f),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(e){let t=a.get("times")||{};return delete t[e],a.set("times",t),t}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hFDwt:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,proxy:r,template:{$player:a,$video:o}}=e,n=null,s=!1,l=1,c=()=>{clearTimeout(n),s&&(s=!1,e.playbackRate=l,(0,i.removeClass)(a,"art-fast-forward"))};return r(o,"touchstart",r=>{1===r.touches.length&&e.playing&&!e.isLock&&(n=setTimeout(()=>{s=!0,l=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,i.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,i.hasClass)(a,"art-fast-forward")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1hsTH":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{layers:t,icons:r,template:{$player:a}}=e;function o(){return(0,i.hasClass)(a,"art-lock")}function n(){(0,i.addClass)(a,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,i.removeClass)(a,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted(t){let a=(0,i.append)(t,r.lock),o=(0,i.append)(t,r.unlock);(0,i.setStyle)(a,"display","none"),e.on("lock",e=>{e?((0,i.setStyle)(a,"display","inline-flex"),(0,i.setStyle)(o,"display","none")):((0,i.setStyle)(a,"display","none"),(0,i.setStyle)(o,"display","inline-flex"))})},click(){o()?s():n()}}),{name:"lock",get state(){return o()},set state(value){value?n():s()}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["5lTcX"],"5lTcX","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/compiled/artplayer.legacy.js b/docs/compiled/artplayer.legacy.js index acfdbfcbe..bca1177af 100644 --- a/docs/compiled/artplayer.legacy.js +++ b/docs/compiled/artplayer.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],s=i.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 a[n]&&a[n];if(!r&&o)return o(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}f.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},f.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,f,p,p.exports,this)}return s[t].exports;function f(e){var t=f.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=i,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[n]}}),a[n]=c;for(var u=0;u").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c<_.default.events.length;c++)i.on("video:"+_.default.events[c],function(e){return l("Event@"+e.type)})}return et.push((0,o._)(i)),i}return(0,i._)(r,[{key:"proxy",get:function(){return this.events.proxy}},{key:"query",get:function(){return this.template.query}},{key:"video",get:function(){return this.template.$video}},{key:"destroy",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.events.destroy(),this.template.destroy(e),et.splice(et.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return et}},{key:"version",get:function(){return"5.2.3"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2025-04-20 09:53:53"}},{key:"config",get:function(){return _.default}},{key:"utils",get:function(){return m}},{key:"scheme",get:function(){return g.default}},{key:"Emitter",get:function(){return h.default}},{key:"validator",get:function(){return f.default}},{key:"kindOf",get:function(){return f.default.kindOf}},{key:"html",get:function(){return w.default.html}},{key:"option",get:function(){var e;return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:function(e){return e}},moreVideoAttr:{controls:!1,preload:m.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:null===(e=navigator)||void 0===e?void 0:e.language.toLowerCase()}}}]),r}(h.default);er.STYLE=u.default,er.DEBUG=!1,er.CONTEXTMENU=!0,er.NOTICE_TIME=2e3,er.SETTING_WIDTH=250,er.SETTING_ITEM_WIDTH=200,er.SETTING_ITEM_HEIGHT=35,er.RESIZE_TIME=200,er.SCROLL_TIME=200,er.SCROLL_GAP=50,er.AUTO_PLAYBACK_MAX=10,er.AUTO_PLAYBACK_MIN=5,er.AUTO_PLAYBACK_TIMEOUT=3e3,er.RECONNECT_TIME_MAX=5,er.RECONNECT_SLEEP_TIME=1e3,er.CONTROL_HIDE_TIME=3e3,er.DBCLICK_TIME=300,er.DBCLICK_FULLSCREEN=!0,er.MOBILE_DBCLICK_PLAY=!0,er.MOBILE_CLICK_PLAY=!1,er.AUTO_ORIENTATION_TIME=200,er.INFO_LOOP_TIME=1e3,er.FAST_FORWARD_VALUE=3,er.FAST_FORWARD_TIME=1e3,er.TOUCH_MOVE_RATIO=.5,er.VOLUME_STEP=.1,er.SEEK_STEP=5,er.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],er.ASPECT_RATIO=["default","4:3","16:9"],er.FLIP=["normal","horizontal","vertical"],er.FULLSCREEN_WEB_IN_BODY=!1,er.LOG_VERSION=!0,er.USE_RAF=!1,m.isBrowser&&(window.Artplayer=er,m.setStyleText("artplayer-style",u.default),setTimeout(function(){er.LOG_VERSION&&console.log("%c ArtPlayer %c ".concat(er.version," %c https://artplayer.org"),"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_create_super":"86fte","bundle-text:./style/index.less":"3eiHP","option-validator":"8OeHO","./utils/emitter":"2V7i9","./utils":"7MU7R","./scheme":"39ygm","./config":"emMME","./template":"gqSBs","./i18n":"7iXtC","./player":"j7piB","./control":"7z0K5","./contextmenu":"5RLZo","./info":"6JYu5","./subtitle":"WYfF6","./events":"47RGg","./hotkey":"gszG1","./layer":"dImgv","./loading":"6vtvO","./notice":"3Z2RQ","./mask":"hUoLo","./icons":"4Bz82","./setting":"hGnnd","./storage":"8dSC3","./plugins":"gv8Rm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9iJMm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){for(var r=0;r1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector(e)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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 u(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function p(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function d(e,t){for(var r in t)f(e,r,t[r]);return e}function h(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(n):n}function m(e){return Array.from(e.parentElement.children).filter(function(t){return t!==e})}function v(e,t){m(e).forEach(function(e){return l(e,t)}),s(e,t)}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top";o.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,"hint--".concat(r)))}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,a=r.top-t<=n&&r.top+r.height+t>=0,i=r.left-t<=o+t&&r.left+r.width+t>=0;return a&&i}function _(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function b(e,t){return t.parentNode.replaceChild(e,t),e}function w(e){return document.createElement(e)}function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=w("i");return s(r,"art-icon"),s(r,"art-icon-".concat(e)),u(r,t),r}function j(e,t){var r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function k(){var e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function M(e){return e.getBoundingClientRect()}function I(e,t){return new Promise(function(r,n){var o=new Image;o.onload=function(){if(t&&1!==t){var a=document.createElement("canvas"),i=a.getContext("2d");a.width=o.width*t,a.height=o.height*t,i.drawImage(o,0,0,a.width,a.height),a.toBlob(function(t){var o=URL.createObjectURL(t),a=new Image;a.onload=function(){r(a)},a.onerror=function(){URL.revokeObjectURL(o),n(Error("Image load failed: ".concat(e)))},a.src=o})}else r(o)},o.onerror=function(){n(Error("Image load failed: ".concat(e)))},o.src=e})}},{"./compatibility":"f9Vc8","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],f9Vc8:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"userAgent",function(){return o}),n.export(r,"isSafari",function(){return a}),n.export(r,"isWechat",function(){return i}),n.export(r,"isIE",function(){return s}),n.export(r,"isAndroid",function(){return l}),n.export(r,"isIOS",function(){return c}),n.export(r,"isIOS13",function(){return u}),n.export(r,"isMobile",function(){return p}),n.export(r,"isBrowser",function(){return f});var o="undefined"!=typeof navigator?navigator.userAgent:"",a=/^((?!chrome|android).)*safari/i.test(o),i=/MicroMessenger/i.test(o),s=/MSIE|Trident/i.test(o),l=/android/i.test(o),c=/iPad|iPhone|iPod/i.test(o)&&!window.MSStream,u=c||o.includes("Macintosh")&&navigator.maxTouchPoints>=1,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)||u,f="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6WanZ":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ArtPlayerError",function(){return c}),n.export(r,"errorHandle",function(){return u});var o=e("@swc/helpers/_/_assert_this_initialized"),a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_wrap_native_super"),l=e("@swc/helpers/_/_create_super"),c=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,l._)(r);function r(e,n){var i;return(0,a._)(this,r),i=t.call(this,e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace((0,o._)(i),n||i.constructor),i.name="ArtPlayerError",i}return r}((0,s._)(Error));function u(e,t){if(!e)throw new c(t);return e}},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_wrap_native_super":"hNYY1","@swc/helpers/_/_create_super":"86fte","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hNYY1:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return l});var o=e("./_construct.js"),a=e("./_get_prototype_of.js"),i=e("./_is_native_function.js"),s=e("./_set_prototype_of.js");function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||!(0,i._)(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,o._)(e,arguments,(0,a._)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,s._)(r,e)})(e)}},{"./_construct.js":"ljlHN","./_get_prototype_of.js":"dAKgy","./_is_native_function.js":"fIKaN","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ljlHN:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return i});var o=e("./_is_native_reflect_construct.js"),a=e("./_set_prototype_of.js");function i(e,t,r){return(i=(0,o._)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,a._)(o,r.prototype),o}).apply(null,arguments)}},{"./_is_native_reflect_construct.js":"7fioR","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fIKaN:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return -1!==Function.toString.call(e).indexOf("[native code]")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cZfjQ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,function(e,t,r){var n=r.slice(0,3);return 1===r.length&&(n=r+"00"),2===r.length&&(n=r+"0"),"".concat(t,",").concat(n)}).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"))}function a(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function i(e){var t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/[:.]/).map(function(e,t,r){if(t===r.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?".".concat(e):":".concat(e)}).join("")}return"WEBVTT\n\n"+e.split(/\r?\n/).map(function(e){var n=e.match(t);return n?{start:r(n[1].trim()),end:r(n[2].trim()),text:n[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(function(e){return e.trim()}).join("\n")}:null}).filter(function(e){return e}).map(function(e,t){return e?t+1+"\n"+"".concat(e.start," --> ").concat(e.end)+"\n"+"".concat(e.text):""}).filter(function(e){return e.trim()}).join("\n\n")}n.defineInteropFlag(r),n.export(r,"srtToVtt",function(){return o}),n.export(r,"vttToBlob",function(){return a}),n.export(r,"assToVtt",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l2mTb:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}n.defineInteropFlag(r),n.export(r,"getExt",function(){return function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}}),n.export(r,"download",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5EnnX":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"def",function(){return a}),n.export(r,"has",function(){return s}),n.export(r,"get",function(){return l}),n.export(r,"mergeDeep",function(){return function e(){for(var t=arguments.length,r=Array(t),n=0;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(function(t){return setTimeout(t,e)})}function a(e,t){var r;return function(){for(var n=this,o=arguments.length,a=Array(o),i=0;i0?[t,r,n]:[r,n]).map(function(e){return e<10?"0".concat(e):String(e)}).join(":")}function s(e){return e.replace(/[&<>'"]/g,function(e){return({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e})}function l(e){var t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp("(".concat(Object.keys(t).join("|"),")"),"g");return e.replace(r,function(e){return t[e]||e})}n.defineInteropFlag(r),n.export(r,"clamp",function(){return o}),n.export(r,"capitalize",function(){return a}),n.export(r,"secondToTime",function(){return i}),n.export(r,"escape",function(){return s}),n.export(r,"unescape",function(){return l})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"39ygm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ComponentOption",function(){return h});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils"),s="array",l="boolean",c="string",u="number",p="object",f="function";function d(e,t,r){return(0,i.errorHandle)(t===c||t===u||e instanceof Element,"".concat(r.join(".")," require '").concat(c,"' or 'Element' type"))}var h={html:d,disable:"?".concat(l),name:"?".concat(c),index:"?".concat(u),style:"?".concat(p),click:"?".concat(f),mounted:"?".concat(f),tooltip:"?".concat(c,"|").concat(u),width:"?".concat(u),selector:"?".concat(s),onSelect:"?".concat(f),switch:"?".concat(l),onSwitch:"?".concat(f),range:"?".concat(s),onRange:"?".concat(f),onChange:"?".concat(f)};r.default={id:c,container:d,url:c,poster:c,type:c,theme:c,lang:c,volume:u,isLive:l,muted:l,autoplay:l,autoSize:l,autoMini:l,loop:l,flip:l,playbackRate:l,aspectRatio:l,screenshot:l,setting:l,hotkey:l,pip:l,mutex:l,backdrop:l,fullscreen:l,fullscreenWeb:l,subtitleOffset:l,miniProgressBar:l,useSSR:l,playsInline:l,lock:l,gesture:l,fastForward:l,autoPlayback:l,autoOrientation:l,airplay:l,proxy:"?".concat(f),plugins:[f],layers:[h],contextmenu:[h],settings:[h],controls:[(0,a._)((0,o._)({},h),{position:function(e,t,r){var n=["top","left","right"];return(0,i.errorHandle)(n.includes(e),"".concat(r.join(".")," only accept ").concat(n.toString()," as parameters"))}})],quality:[{default:"?".concat(l),html:c,url:c}],highlight:[{time:u,text:c}],thumbnails:{url:c,number:u,column:u,width:u,height:u,scale:u},subtitle:{url:c,name:c,type:c,style:p,escape:l,encoding:c,onVttLoad:f},moreVideoAttr:p,i18n:p,icons:p,cssVar:p,customType:p}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return a});var o=e("./_define_property.js");function a(e){for(var t=1;t\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
5.2.3
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\nx\n
\n
\n
\n
[x]
\n
\n
\n\n '}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","./utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7iXtC":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("../utils"),s=e("./zh-cn"),l=n.interopDefault(s),c=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.art=t,this.languages={"zh-cn":l.default},this.language={},this.update(t.option.i18n)}return(0,a._)(e,[{key:"init",value:function(){var e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}},{key:"get",value:function(e){return this.language[e]||e}},{key:"update",value:function(e){this.languages=(0,i.mergeDeep)(this.languages,e),this.init()}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","../utils":"7MU7R","./zh-cn":"5mkZy","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5mkZy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","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":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=n,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],j7piB:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return ew});var o=e("@swc/helpers/_/_class_call_check"),a=e("./urlMix"),i=n.interopDefault(a),s=e("./attrMix"),l=n.interopDefault(s),c=e("./playMix"),u=n.interopDefault(c),p=e("./pauseMix"),f=n.interopDefault(p),d=e("./toggleMix"),h=n.interopDefault(d),m=e("./seekMix"),v=n.interopDefault(m),g=e("./volumeMix"),y=n.interopDefault(g),_=e("./currentTimeMix"),b=n.interopDefault(_),w=e("./durationMix"),x=n.interopDefault(w),j=e("./switchMix"),k=n.interopDefault(j),M=e("./playbackRateMix"),I=n.interopDefault(M),S=e("./aspectRatioMix"),D=n.interopDefault(S),T=e("./screenshotMix"),E=n.interopDefault(T),F=e("./fullscreenMix"),R=n.interopDefault(F),O=e("./fullscreenWebMix"),C=n.interopDefault(O),W=e("./pipMix"),A=n.interopDefault(W),P=e("./loadedMix"),$=n.interopDefault(P),z=e("./playedMix"),L=n.interopDefault(z),H=e("./playingMix"),N=n.interopDefault(H),U=e("./autoSizeMix"),V=n.interopDefault(U),B=e("./rectMix"),q=n.interopDefault(B),Y=e("./flipMix"),J=n.interopDefault(Y),K=e("./miniMix"),X=n.interopDefault(K),G=e("./posterMix"),Z=n.interopDefault(G),Q=e("./autoHeightMix"),ee=n.interopDefault(Q),et=e("./cssVarMix"),er=n.interopDefault(et),en=e("./themeMix"),eo=n.interopDefault(en),ea=e("./typeMix"),ei=n.interopDefault(ea),es=e("./stateMix"),el=n.interopDefault(es),ec=e("./subtitleOffsetMix"),eu=n.interopDefault(ec),ep=e("./airplayMix"),ef=n.interopDefault(ep),ed=e("./qualityMix"),eh=n.interopDefault(ed),em=e("./thumbnailsMix"),ev=n.interopDefault(em),eg=e("./optionInit"),ey=n.interopDefault(eg),e_=e("./eventInit"),eb=n.interopDefault(e_),ew=function e(t){(0,o._)(this,e),(0,i.default)(t),(0,l.default)(t),(0,u.default)(t),(0,f.default)(t),(0,h.default)(t),(0,v.default)(t),(0,y.default)(t),(0,b.default)(t),(0,x.default)(t),(0,k.default)(t),(0,I.default)(t),(0,D.default)(t),(0,E.default)(t),(0,R.default)(t),(0,C.default)(t),(0,A.default)(t),(0,$.default)(t),(0,L.default)(t),(0,N.default)(t),(0,V.default)(t),(0,q.default)(t),(0,J.default)(t),(0,X.default)(t),(0,Z.default)(t),(0,ee.default)(t),(0,er.default)(t),(0,eo.default)(t),(0,ei.default)(t),(0,el.default)(t),(0,eu.default)(t),(0,ef.default)(t),(0,eh.default)(t),(0,ev.default)(t),(0,eb.default)(t),(0,ey.default)(t)}},{"@swc/helpers/_/_class_call_check":"9iJMm","./urlMix":"bnOAX","./attrMix":"YLwHz","./playMix":"ktu66","./pauseMix":"6JstV","./toggleMix":"cotiM","./seekMix":"8DVLx","./volumeMix":"9fjEr","./currentTimeMix":"fniLa","./durationMix":"2WMs4","./switchMix":"5XnRj","./playbackRateMix":"atzXU","./aspectRatioMix":"e67kx","./screenshotMix":"7FJKj","./fullscreenMix":"1hnoY","./fullscreenWebMix":"aLUYJ","./pipMix":"jJ7PZ","./loadedMix":"3RcYf","./playedMix":"hpdzI","./playingMix":"dQpMB","./autoSizeMix":"i3W5n","./rectMix":"eA2QA","./flipMix":"8B7eY","./miniMix":"f1BFf","./posterMix":"3Bs5U","./autoHeightMix":"gRfBQ","./cssVarMix":"6gWkU","./themeMix":"6YX9w","./typeMix":"cBZG8","./stateMix":"bpFKI","./subtitleOffsetMix":"hyhz8","./airplayMix":"5fLM6","./qualityMix":"jj5tM","./thumbnailsMix":"g4G3o","./optionInit":"PZTTa","./eventInit":"cKj2D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bnOAX:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.option,r=e.template.$video;(0,i.def)(e,"url",{get:function(){return r.src},set:function(n){return(0,o._)(function(){var o,s,l;return(0,a._)(this,function(a){switch(a.label){case 0:if(!n)return[3,4];if(o=e.url,s=t.type||(0,i.getExt)(n),l=t.customType[s],!(s&&l))return[3,2];return[4,(0,i.sleep)()];case 1:return a.sent(),e.loading.show=!0,l.call(e,r,n,e),[3,3];case 2:URL.revokeObjectURL(o),r.src=n,a.label=3;case 3:return o!==e.url&&(e.option.url=n,e.isReady&&o&&e.once("video:canplay",function(){e.emit("restart",n)})),[3,6];case 4:return[4,(0,i.sleep)()];case 5:a.sent(),e.loading.show=!0,a.label=6;case 6:return[2]}})})()}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){r(e);return}s.done?t(l):Promise.resolve(l).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,l,"next",e)}function l(e){o(i,n,a,s,l,"throw",e)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator});var o=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return i}),n.export(r,"__assign",function(){return s}),n.export(r,"__rest",function(){return l}),n.export(r,"__decorate",function(){return c}),n.export(r,"__param",function(){return u}),n.export(r,"__esDecorate",function(){return p}),n.export(r,"__runInitializers",function(){return f}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return h}),n.export(r,"__metadata",function(){return m}),n.export(r,"__awaiter",function(){return v}),n.export(r,"__generator",function(){return g}),n.export(r,"__createBinding",function(){return y}),n.export(r,"__exportStar",function(){return _}),n.export(r,"__values",function(){return b}),n.export(r,"__read",function(){return w}),n.export(r,"__spread",function(){return x}),n.export(r,"__spreadArrays",function(){return j}),n.export(r,"__spreadArray",function(){return k}),n.export(r,"__await",function(){return M}),n.export(r,"__asyncGenerator",function(){return I}),n.export(r,"__asyncDelegator",function(){return S}),n.export(r,"__asyncValues",function(){return D}),n.export(r,"__makeTemplateObject",function(){return T}),n.export(r,"__importStar",function(){return F}),n.export(r,"__importDefault",function(){return R}),n.export(r,"__classPrivateFieldGet",function(){return O}),n.export(r,"__classPrivateFieldSet",function(){return C}),n.export(r,"__classPrivateFieldIn",function(){return W}),n.export(r,"__addDisposableResource",function(){return A}),n.export(r,"__disposeResources",function(){return $}),n.export(r,"__rewriteRelativeImportExtension",function(){return z});var o=e("@swc/helpers/_/_type_of"),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function c(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function u(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var v=(0,r[d])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(s=i(v.get))&&(p.get=s),(s=i(v.set))&&(p.set=s),(s=i(v.init))&&o.unshift(s)}else(s=i(v))&&("field"===l?o.unshift(s):p[c]=s)}u&&Object.defineProperty(u,n.name,p),f=!0}function f(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function x(){for(var e=[],t=0;t1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=o[e](t)).value instanceof M?Promise.resolve(r.value.v).then(l,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:M(e[n](t)),done:!1}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var E=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&y(t,e,r);return E(t,e),t}function R(e){return e&&e.__esModule?e:{default:e}}function O(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function C(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function W(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function A(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var P="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function $(e){function t(t){e.error=e.hasError?new P(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(e){return t(e),o()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function z(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,o,a){return r?t?".jsx":".js":!n||o&&a?n+o+"."+a.toLowerCase()+"js":e}):e}r.default={__extends:i,__assign:s,__rest:l,__decorate:c,__param:u,__esDecorate:p,__runInitializers:f,__propKey:d,__setFunctionName:h,__metadata:m,__awaiter:v,__generator:g,__createBinding:y,__exportStar:_,__values:b,__read:w,__spread:x,__spreadArrays:j,__spreadArray:k,__await:M,__asyncGenerator:I,__asyncDelegator:S,__asyncValues:D,__makeTemplateObject:T,__importStar:F,__importDefault:R,__classPrivateFieldGet:O,__classPrivateFieldSet:C,__classPrivateFieldIn:W,__addDisposableResource:A,__disposeResources:$,__rewriteRelativeImportExtension:z}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],YLwHz:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"attr",{value:function(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ktu66:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.i18n,r=e.notice,n=e.option,s=e.constructor.instances,l=e.template.$video;(0,i.def)(e,"play",{value:/*#__PURE__*/(0,o._)(function(){var o,i,c;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,l.play()];case 1:if(o=a.sent(),r.show=t.get("Play"),e.emit("play"),n.mutex)for(i=0;iu?((0,o.setStyle)(a,"width","".concat(u*c,"px")),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","".concat(l/u,"px")),(0,o.setStyle)(a,"margin","auto 0")),i.dataset.aspectRatio=n}r.show="".concat(t.get("Aspect Ratio"),": ").concat("default"===n?t.get("Default"):n),e.emit("aspectRatio",n)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7FJKj":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t,r=e.notice,n=e.template.$video,s=(0,i.createElement)("canvas");(0,i.def)(e,"getDataURL",{value:function(){return new Promise(function(e,t){try{s.width=n.videoWidth,s.height=n.videoHeight,s.getContext("2d").drawImage(n,0,0),e(s.toDataURL("image/png"))}catch(e){r.show=e,t(e)}})}}),(0,i.def)(e,"getBlobUrl",{value:function(){return new Promise(function(e,t){try{s.width=n.videoWidth,s.height=n.videoHeight,s.getContext("2d").drawImage(n,0,0),s.toBlob(function(t){e(URL.createObjectURL(t))})}catch(e){r.show=e,t(e)}})}}),(0,i.def)(e,"screenshot",{value:(t=(0,o._)(function(t){var r,o;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,e.getDataURL()];case 1:return r=a.sent(),o=t||"artplayer_".concat((0,i.secondToTime)(n.currentTime)),(0,i.download)(r,"".concat(o,".png")),e.emit("screenshot",r),[2,r]}})}),function(e){return t.apply(this,arguments)})})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1hnoY":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../libs/screenfull"),s=n.interopDefault(i),l=e("../utils");function c(e){var t=e.i18n,r=e.notice,n=e.template,i=n.$video,c=n.$player,u=function(e){(0,s.default).on("change",function(){e.emit("fullscreen",s.default.isFullscreen),s.default.isFullscreen?(e.state="fullscreen",(0,l.addClass)(c,"art-fullscreen")):(0,l.removeClass)(c,"art-fullscreen"),e.emit("resize")}),(0,s.default).on("error",function(t){e.emit("fullscreenError",t)}),(0,l.def)(e,"fullscreen",{get:function(){return s.default.isFullscreen},set:function(e){return(0,o._)(function(){return(0,a._)(this,function(t){switch(t.label){case 0:if(!e)return[3,2];return[4,(0,s.default).request(c)];case 1:return t.sent(),[3,4];case 2:return[4,(0,s.default).exit()];case 3:t.sent(),t.label=4;case 4:return[2]}})})()}})},p=function(e){e.proxy(document,"webkitfullscreenchange",function(){e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,l.def)(e,"fullscreen",{get:function(){return document.fullscreenElement===i},set:function(t){t?(e.state="fullscreen",i.webkitEnterFullscreen()):i.webkitExitFullscreen()}})};e.once("video:loadedmetadata",function(){s.default.isEnabled?u(e):i.webkitSupportsFullscreen?p(e):(0,l.def)(e,"fullscreen",{get:function(){return!1},set:function(){r.show=t.get("Fullscreen Not Supported")}}),(0,l.def)(e,"fullscreen",(0,l.get)(e,"fullscreen"))})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../libs/screenfull":"cM8lD","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cM8lD:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("@swc/helpers/_/_sliced_to_array"),o=[["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"]],a=function(){if("undefined"==typeof document)return!1;var e=o[0],t={},r=!0,a=!1,i=void 0;try{for(var s,l=o[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c[1]in document){var u=!0,p=!1,f=void 0;try{for(var d,h=c.entries()[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var m=(0,n._)(d.value,2),v=m[0],g=m[1];t[e[v]]=g}}catch(e){p=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw f}}return t}}}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}return!1}(),i={change:a.fullscreenchange,error:a.fullscreenerror},s={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise(function(r,n){var o=function(){s.off("change",o),r()};s.on("change",o);var i=e[a.requestFullscreen](t);i instanceof Promise&&i.then(o).catch(n)})},exit:function(){return new Promise(function(e,t){if(!s.isFullscreen){e();return}var r=function(){s.off("change",r),e()};s.on("change",r);var n=document[a.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)})},toggle:function(e,t){return s.isFullscreen?s.exit():s.request(e,t)},onchange:function(e){s.on("change",e)},onerror:function(e){s.on("error",e)},on:function(e,t){var r=i[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=i[e];r&&document.removeEventListener(r,t,!1)},raw:a};Object.defineProperties(s,{isFullscreen:{get:function(){return!!document[a.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[a.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!document[a.fullscreenEnabled]}}}),a||(s={isEnabled:!1}),r.default=s},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return l});var o=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),i=e("./_non_iterable_rest.js"),s=e("./_unsupported_iterable_to_array.js");function l(e,t){return(0,o._)(e)||(0,a._)(e,t)||(0,s._)(e,t)||(0,i._)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(Array.isArray(e))return e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],loYCM:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw n}}return a}}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],aLUYJ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.constructor,r=e.template,n=r.$container,a=r.$player,i="";(0,o.def)(e,"fullscreenWeb",{get:function(){return(0,o.hasClass)(a,"art-fullscreen-web")},set:function(r){r?(i=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),e.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(n,a),i&&(a.style.cssText=i,i=""),(0,o.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jJ7PZ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t,r,n,a,i=e.i18n,s=e.notice,l=e.template.$video;document.pictureInPictureEnabled?(t=e.template.$video,r=e.proxy,n=e.notice,t.disablePictureInPicture=!1,(0,o.def)(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(r){r?(e.state="pip",t.requestPictureInPicture().catch(function(e){throw n.show=e,e})):document.exitPictureInPicture().catch(function(e){throw n.show=e,e})}}),r(t,"enterpictureinpicture",function(){e.emit("pip",!0)}),r(t,"leavepictureinpicture",function(){e.emit("pip",!1)})):l.webkitSupportsPresentationMode?((a=e.template.$video).webkitSetPresentationMode("inline"),(0,o.def)(e,"pip",{get:function(){return"picture-in-picture"===a.webkitPresentationMode},set:function(t){t?(e.state="pip",a.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(a.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})):(0,o.def)(e,"pip",{get:function(){return!1},set:function(){s.show=i.get("PIP Not Supported")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3RcYf":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"loaded",{get:function(){return e.loadedTime/t.duration}}),(0,o.def)(e,"loadedTime",{get:function(){return t.buffered.length?t.buffered.end(t.buffered.length-1):0}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hpdzI:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){(0,o.def)(e,"played",{get:function(){return e.currentTime/e.duration}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dQpMB:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"playing",{get:function(){return"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],i3W5n:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template,r=t.$container,n=t.$player,a=t.$video;(0,o.def)(e,"autoSize",{value:function(){var t=a.videoWidth,i=a.videoHeight,s=(0,o.getRect)(r),l=s.width,c=s.height,u=t/i;l/c>u?((0,o.setStyle)(n,"width","".concat(c*u/l*100,"%")),(0,o.setStyle)(n,"height","100%")):((0,o.setStyle)(n,"width","100%"),(0,o.setStyle)(n,"height","".concat(l/u/c*100,"%"))),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eA2QA:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){(0,o.def)(e,"rect",{get:function(){return(0,o.getRect)(e.template.$player)}});for(var t=["bottom","height","left","right","top","width"],r=0;r');(0,o.append)(d,t.close),r(d,"click",p);var h=(0,o.append)(i,'
'),m=(0,o.append)(h,t.play),v=(0,o.append)(h,t.pause);return r(m,"click",function(){return e.play()}),r(v,"click",function(){return e.pause()}),f(m,v),e.on("video:playing",function(){return f(m,v)}),e.on("video:pause",function(){return f(m,v)}),e.on("video:timeupdate",function(){return f(m,v)}),r(i,"mousedown",function(e){l=0===e.button,c=e.pageX,u=e.pageY}),e.on("document:mousemove",function(e){if(l){(0,o.addClass)(i,"art-mini-droging");var t=e.pageX-c,r=e.pageY-u;(0,o.setStyle)(i,"transform","translate(".concat(t,"px, ").concat(r,"px)"))}}),e.on("document:mouseup",function(){if(l){l=!1,(0,o.removeClass)(i,"art-mini-droging");var e=(0,o.getRect)(i);n.set("left",e.left),n.set("top",e.top),(0,o.setStyle)(i,"left","".concat(e.left,"px")),(0,o.setStyle)(i,"top","".concat(e.top,"px")),(0,o.setStyle)(i,"transform",null)}}),i}(),m=n.get("top"),v=n.get("left");m&&v?((0,o.setStyle)(h,"top","".concat(m,"px")),(0,o.setStyle)(h,"left","".concat(v,"px")),(0,o.isInViewport)(h)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3Bs5U":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$poster;(0,o.def)(e,"poster",{get:function(){try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set:function(e){(0,o.setStyle)(t,"backgroundImage","url(".concat(e,")"))}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gRfBQ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template,r=t.$container,n=t.$video;(0,o.def)(e,"autoHeight",{value:function(){var t=r.clientWidth,a=n.videoHeight,i=t/n.videoWidth*a;(0,o.setStyle)(r,"height",i+"px"),e.emit("autoHeight",i)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6gWkU":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$player;(0,o.def)(e,"cssVar",{value:function(e,r){return r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6YX9w":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){(0,o.def)(e,"theme",{get:function(){return e.cssVar("--art-theme")},set:function(t){e.cssVar("--art-theme",t)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cBZG8:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){(0,o.def)(e,"type",{get:function(){return e.option.type},set:function(t){e.option.type=t}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bpFKI:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=["mini","pip","fullscreen","fullscreenWeb"];(0,o.def)(e,"state",{get:function(){return t.find(function(t){return e[t]})||"standard"},set:function(r){for(var n=0;n0&&bl.clientWidth-m/2?(0,i.setStyle)(o,"left","".concat(l.clientWidth-m,"px")):(0,i.setStyle)(o,"left","".concat(t-m/2,"px"))}}(b):i.isMobile||(0,i.setStyle)(m,"display","none"),_&&(clearTimeout(u),u=setTimeout(function(){(0,i.setStyle)(m,"display","none")},500)),a.label=3;case 3:return[2]}})}),function(e,r,n){return t.apply(this,arguments)})),(0,i.def)(e,"thumbnails",{get:function(){return e.option.thumbnails},set:function(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(u),u=null,p=null,f=!1,d=!1)}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],PZTTa:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.option,r=e.storage,n=e.template,a=n.$video,i=n.$poster;for(var s in t.moreVideoAttr)e.attr(s,t.moreVideoAttr[s]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,o.clamp)(t.volume,0,1));var l=r.get("volume");for(var c in"number"==typeof l&&(a.volume=(0,o.clamp)(l,0,1)),t.poster&&(0,o.setStyle)(i,"backgroundImage","url(".concat(t.poster,")")),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(c,t.cssVar[c]);e.url=t.url}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cKj2D:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../config"),s=n.interopDefault(i),l=e("../utils");function c(e){for(var t,r=e.i18n,n=e.notice,i=e.option,c=e.constructor,u=e.proxy,p=e.template,f=p.$player,d=p.$video,h=p.$poster,m=0,v=0;v=o.CONTROL_HIDE_TIME&&(n.show=!1)}),e.on("control",function(e){e?((0,C.removeClass)(s,"art-hide-cursor"),(0,C.addClass)(s,"art-hover"),n.timer=Date.now()):((0,C.addClass)(s,"art-hide-cursor"),(0,C.removeClass)(s,"art-hover"))}),n.init(),n}return(0,i._)(r,[{key:"init",value:function(){var e=this,t=this.art.option;t.isLive||this.add((0,j.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,w.default)({name:"playAndPause",position:"left",index:10})),this.add((0,S.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,M.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,C.sleep)().then(function(){e.art.quality=t.quality}),t.screenshot&&!C.isMobile&&this.add((0,F.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,T.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,_.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,O.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,g.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,m.default)({name:"fullscreen",position:"right",index:70}));for(var r=0;r=Number(a.dataset.index)});p?p.insertAdjacentElement("beforebegin",a):(0,i.append)(this.$parent,a),r.html&&(0,i.append)(a,r.html),r.style&&(0,i.setStyles)(a,r.style),r.tooltip&&(0,i.tooltip)(a,r.tooltip);var f=[];if(r.click){var d=this.art.events.proxy(a,"click",function(e){e.preventDefault(),r.click.call(t.art,t,e)});f.push(d)}return r.selector&&["left","right"].includes(r.position)&&this.selector(r,a,f),this[n]=a,this.cache.set(n,{$ref:a,events:f,option:r}),r.mounted&&r.mounted.call(this.art,a),a}}},{key:"remove",value:function(e){var t=this.cache.get(e);(0,s.errorHandle)(t,"Can't find [".concat(e,"] from the [").concat(this.name,"]")),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(var r=0;r\n
\n
\n
\n
\n
\n
\n\n ',mounted:function(e){var o=null,a=!1,u=(0,i.query)(".art-progress-hover",e),p=(0,i.query)(".art-progress-loaded",e),f=(0,i.query)(".art-progress-played",e),d=(0,i.query)(".art-progress-highlight",e),h=(0,i.query)(".art-progress-indicator",e),m=(0,i.query)(".art-progress-tip",e);function v(r,n){var o=n||s(t,r),a=o.width,l=o.time;m.innerText=l;var c=m.clientWidth;a<=c/2?(0,i.setStyle)(m,"left",0):a>e.clientWidth-c/2?(0,i.setStyle)(m,"left","".concat(e.clientWidth-c,"px")):(0,i.setStyle)(m,"left","".concat(a-c/2,"px"))}r.indicator?(0,i.append)(h,r.indicator):(0,i.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,n,a){var s="played"===r&&a&&i.isMobile;"loaded"===r&&(0,i.setStyle)(p,"width","".concat(100*n,"%")),"hover"===r&&(0,i.setStyle)(u,"width","".concat(100*n,"%")),"played"===r&&((0,i.setStyle)(f,"width","".concat(100*n,"%")),(0,i.setStyle)(h,"left","".concat(100*n,"%"))),s&&((0,i.setStyle)(m,"display","flex"),v(a,{width:e.clientWidth*n,time:(0,i.secondToTime)(n*t.duration)}),clearTimeout(o),o=setTimeout(function(){(0,i.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){d.innerText="";for(var e=0;e');(0,i.append)(d,a)}}),t.on("video:progress",function(){t.emit("setBar","loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",function(){t.emit("setBar","played",t.played)}):t.on("video:timeupdate",function(){t.emit("setBar","played",t.played)}),t.on("video:ended",function(){t.emit("setBar","played",1)}),t.emit("setBar","loaded",t.loaded||0),i.isMobile||(c(e,"click",function(e){e.target!==h&&l(t,e)}),c(e,"mousemove",function(r){var n,o,a,l=s(t,r).percentage;(t.emit("setBar","hover",l,r),(0,i.setStyle)(m,"display","flex"),(0,i.includeFromEvent)(r,d))?(n=s(t,r).width,o=r.target.dataset.text,m.innerText=o,n<=(a=m.clientWidth)/2?(0,i.setStyle)(m,"left",0):n>e.clientWidth-a/2?(0,i.setStyle)(m,"left","".concat(e.clientWidth-a,"px")):(0,i.setStyle)(m,"left","".concat(n-a/2,"px"))):v(r)}),c(e,"mouseleave",function(e){(0,i.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),c(e,"mousedown",function(e){a=0===e.button}),t.on("document:mousemove",function(e){if(a){var r=s(t,e),n=r.second,o=r.percentage;t.emit("setBar","played",o,e),t.seek=n}}),t.on("document:mouseup",function(){a&&(a=!1)}))}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l3dNa:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{style:i.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:function(e){function r(){var r="".concat((0,i.secondToTime)(t.currentTime)," / ").concat((0,i.secondToTime)(t.duration));r!==e.innerText&&(e.innerText=r)}r();for(var n=["video:loadedmetadata","video:timeupdate","video:progress"],o=0;o'),l=(0,i.append)(s,'
'),c=(0,i.append)(l,'
'),u=(0,i.append)(l,'
'),p=(0,i.append)(u,'
'),f=(0,i.append)(p,'
'),d=(0,i.append)(u,'
');function h(e){var t=(0,i.getRect)(u),r=t.top,n=t.height;return 1-(e.clientY-r)/n}function m(){if(t.muted||0===t.volume)(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(a,"display","flex"),(0,i.setStyle)(d,"top","100%"),(0,i.setStyle)(f,"top","100%"),c.innerText=0;else{var e=100*t.volume;(0,i.setStyle)(o,"display","flex"),(0,i.setStyle)(a,"display","none"),(0,i.setStyle)(d,"top","".concat(100-e,"%")),(0,i.setStyle)(f,"top","".concat(100-e,"%")),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(o,"click",function(){t.muted=!0}),r(a,"click",function(){t.muted=!1}),i.isMobile)(0,i.setStyle)(s,"display","none");else{var v=!1;r(u,"mousedown",function(e){v=0===e.button,t.volume=h(e)}),t.on("document:mousemove",function(e){v&&(t.muted=!1,t.volume=h(e))}),t.on("document:mouseup",function(){v&&(v=!1)})}}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2XGYu":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("Show Setting"),mounted:function(e){var r=t.proxy,n=t.icons,o=t.i18n;(0,i.append)(e,n.setting),r(e,"click",function(){t.setting.toggle(),t.setting.resize()}),t.on("setting",function(t){(0,i.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],idjoR:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("Screenshot"),mounted:function(e){var r=t.proxy,n=t.icons;(0,i.append)(e,n.screenshot),r(e,"click",function(){t.screenshot()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],huCXW:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("AirPlay"),mounted:function(e){var r=t.proxy,n=t.icons;(0,i.append)(e,n.airplay),r(e,"click",function(){return t.airplay()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5RLZo":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return j});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_create_super"),l=e("../utils"),c=e("../utils/component"),u=n.interopDefault(c),p=e("./playbackRate"),f=n.interopDefault(p),d=e("./aspectRatio"),h=n.interopDefault(d),m=e("./flip"),v=n.interopDefault(m),g=e("./info"),y=n.interopDefault(g),_=e("./version"),b=n.interopDefault(_),w=e("./close"),x=n.interopDefault(w),j=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,s._)(r);function r(e){var n;return(0,o._)(this,r),(n=t.call(this,e)).name="contextmenu",n.$parent=e.template.$contextmenu,l.isMobile||n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.option,n=t.proxy,o=t.template,a=o.$player,i=o.$contextmenu;r.playbackRate&&this.add((0,f.default)({name:"playbackRate",index:10})),r.aspectRatio&&this.add((0,h.default)({name:"aspectRatio",index:20})),r.flip&&this.add((0,v.default)({name:"flip",index:30})),this.add((0,y.default)({name:"info",index:40})),this.add((0,b.default)({name:"version",index:50})),this.add((0,x.default)({name:"close",index:60}));for(var s=0;su+c&&(m=c-h),n+d>p+s&&(v=s-d),(0,l.setStyles)(i,{top:"".concat(v,"px"),left:"".concat(m,"px")})}}),n(a,"click",function(t){(0,l.includeFromEvent)(t,i)||(e.show=!1)}),this.art.on("blur",function(){e.show=!1})}}]),r}(u.default)},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_create_super":"86fte","../utils":"7MU7R","../utils/component":"2dsXg","./playbackRate":"7w1iV","./aspectRatio":"cJDR0","./flip":"cpqHQ","./info":"FMfqg","./version":"a9IHg","./close":"9PxVB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7w1iV":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.PLAYBACK_RATE.map(function(e){return'').concat(1===e?r.get("Normal"):e.toFixed(1),"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Play Speed"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.playbackRate=Number(n),e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="1"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("video:ratechange",function(){var r=(0,i.queryAll)("span",e).find(function(e){return Number(e.dataset.value)===t.playbackRate});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cJDR0:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.ASPECT_RATIO.map(function(e){return'').concat("default"===e?r.get("Default"):e,"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Aspect Ratio"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.aspectRatio=n,e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="default"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("aspectRatio",function(t){var r=(0,i.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cpqHQ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.FLIP.map(function(e){return'').concat(r.get((0,i.capitalize)(e)),"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Video Flip"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.flip=n.toLowerCase(),e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="normal"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("flip",function(t){var r=(0,i.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],FMfqg:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return function(t){return(0,a._)((0,o._)({},e),{html:t.i18n.get("Video Info"),click:function(e){t.info.show=!0,e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],a9IHg:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return(0,a._)((0,o._)({},e),{html:'ArtPlayer 5.2.3'})}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9PxVB":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return function(t){return(0,a._)((0,o._)({},e),{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6JYu5":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_create_super"),l=e("./utils"),c=e("./utils/component"),u=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,s._)(r);function r(e){var n;return(0,o._)(this,r),(n=t.call(this,e)).name="info",l.isMobile||n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor,o=t.template,a=o.$infoPanel,i=o.$infoClose,s=o.$video;r(i,"click",function(){e.show=!1});var c=null,u=(0,l.queryAll)("[data-video]",a)||[];this.art.on("destroy",function(){return clearTimeout(c)}),function e(){for(var t=0;t\n ').concat(t.escape?(0,f.escape)(e):e,"\n")}).join("")}).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}},{key:"switch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,o._)(function(){var n,o,a,i,s,u;return(0,p._)(this,function(p){switch(p.label){case 0:return o=(n=r.art).i18n,a=n.notice,i=n.option,s=(0,c._)((0,l._)({},i.subtitle,t),{url:e}),[4,r.init(s)];case 1:return u=p.sent(),t.name&&(a.show="".concat(o.get("Switch Subtitle"),": ").concat(t.name)),[2,u]}})})()}},{key:"createTrack",value:function(e,t){var r=this,n=this.art,o=n.template,a=n.proxy,i=n.option,s=o.$video,l=o.$track,c=(0,f.createElement)("track");c.default=!0,c.kind=e,c.src=t,c.label=i.subtitle.name||"Artplayer",c.track.mode="hidden",c.onload=function(){r.art.emit("subtitleLoad",r.cues,r.option)},this.art.events.remove(this.destroyEvent),l.onload=null,(0,f.remove)(l),(0,f.append)(s,c),o.$track=c,this.destroyEvent=a(this.textTrack,"cuechange",function(){return r.update()})}},{key:"init",value:function(e){var t=this;return(0,o._)(function(){var r,n,o;return(0,p._)(this,function(a){return(n=(r=t.art).notice,o=r.template.$subtitle,t.textTrack)?((0,v.default)(e,y.default.subtitle),e.url)?(t.option=e,t.style(e.style),[2,fetch(e.url).then(function(e){return e.arrayBuffer()}).then(function(t){var r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,f.getExt)(e.url)){case"srt":var n=(0,f.srtToVtt)(r),o=e.onVttLoad(n);return(0,f.vttToBlob)(o);case"ass":var a=(0,f.assToVtt)(r),i=e.onVttLoad(a);return(0,f.vttToBlob)(i);case"vtt":var s=e.onVttLoad(r);return(0,f.vttToBlob)(s);default:return e.url}}).then(function(e){return o.innerHTML="",t.url===e||(URL.revokeObjectURL(t.url),t.createTrack("metadata",e)),e}).catch(function(e){throw o.innerHTML="",n.show=e,e})]):[2]:[2,null]})})()}}]),r}(h.default)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_create_super":"86fte","@swc/helpers/_/_ts_generator":"6Xyd0","./utils":"7MU7R","./utils/component":"2dsXg","option-validator":"8OeHO","./scheme":"39ygm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"47RGg":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return k});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("./clickInit"),s=n.interopDefault(i),l=e("./hoverInit"),c=n.interopDefault(l),u=e("./moveInit"),p=n.interopDefault(u),f=e("./resizeInit"),d=n.interopDefault(f),h=e("./gestureInit"),m=n.interopDefault(h),v=e("./viewInit"),g=n.interopDefault(v),y=e("./documentInit"),_=n.interopDefault(y),b=e("./updateInit"),w=n.interopDefault(b),x=e("./restoreInit"),j=n.interopDefault(x),k=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,s.default)(t,this),(0,c.default)(t,this),(0,p.default)(t,this),(0,d.default)(t,this),(0,m.default)(t,this),(0,g.default)(t,this),(0,_.default)(t,this),(0,w.default)(t,this),(0,j.default)(t,this)}return(0,a._)(e,[{key:"proxy",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Array.isArray(t))return t.map(function(t){return n.proxy(e,t,r,o)});e.addEventListener(t,r,o);var a=function(){return e.removeEventListener(t,r,o)};return this.destroyEvents.push(a),a}},{key:"hover",value:function(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}},{key:"remove",value:function(e){var t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}},{key:"destroy",value:function(){for(var e=0;eMath.abs(a)&&2>Math.abs(o))return i;var s=180*Math.atan2(o,a)/Math.PI;return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}(c,u,a,i),d=[3,4].includes(f),h=[1,2].includes(f);if(d&&!e.isRotate||h&&e.isRotate){var m=(0,o.clamp)((a-c)/e.width,-1,1),v=(0,o.clamp)((i-u)/e.height,-1,1),g=e.isRotate?v:m,y=s===n?e.constructor.TOUCH_MOVE_RATIO:1,_=(0,o.clamp)(p+e.duration*g*y,0,e.duration);e.seek=_,e.emit("setBar","played",(0,o.clamp)(_/e.duration,0,1),t),e.notice.show="".concat((0,o.secondToTime)(_)," / ").concat((0,o.secondToTime)(e.duration))}}};e.option.gesture&&(t.proxy(n,"touchstart",function(e){s=n,f(e)}),t.proxy(n,"touchmove",d)),t.proxy(i,"touchstart",function(e){s=i,f(e)}),t.proxy(i,"touchmove",d),t.proxy(document,"touchend",function(){l&&(c=0,u=0,p=0,l=!1,s=null)})}}},{"../utils":"7MU7R","../control/progress":"fVfii","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jT4ny:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e,t){var r=e.option,n=e.constructor,a=e.template.$container,i=(0,o.throttle)(function(){e.emit("view",(0,o.isInViewport)(a,n.SCROLL_GAP))},n.SCROLL_TIME);t.proxy(window,"scroll",function(){return i()}),e.on("view",function(t){r.autoMini&&(e.mini=!t)})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],qu07O:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){t.proxy(document,"mousemove",function(t){e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",function(t){e.emit("document:mouseup",t)})}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9LDSG":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(e.constructor.USE_RAF){var t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",function(){cancelAnimationFrame(t)})}}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1G60N":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gszG1:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("./utils"),s=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.art=t,this.keys={},t.option.hotkey&&!i.isMobile&&this.init()}return(0,a._)(e,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor;this.add("Escape",function(){e.art.fullscreenWeb&&(e.art.fullscreenWeb=!1)}),this.add("Space",function(){e.art.toggle()}),this.add("ArrowLeft",function(){e.art.backward=n.SEEK_STEP}),this.add("ArrowUp",function(){e.art.volume+=n.VOLUME_STEP}),this.add("ArrowRight",function(){e.art.forward=n.SEEK_STEP}),this.add("ArrowDown",function(){e.art.volume-=n.VOLUME_STEP}),r(document,"keydown",function(t){if(e.art.isFocus){var r=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==n&&"true"!==n&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){var o=e.keys[t.code];if(o){t.preventDefault();for(var a=0;a'},{}],fRhwm:[function(e,t,r){t.exports=''},{}],"4tFZV":[function(e,t,r){t.exports=''},{}],a8x3K:[function(e,t,r){t.exports=''},{}],e0utR:[function(e,t,r){t.exports=''},{}],"69Sc6":[function(e,t,r){t.exports=''},{}],"72xuc":[function(e,t,r){t.exports=''},{}],"85cgQ":[function(e,t,r){t.exports=''},{}],"1Qm4Q":[function(e,t,r){t.exports=''},{}],fpGzT:[function(e,t,r){t.exports=''},{}],jlMSj:[function(e,t,r){t.exports=''},{}],"7sEdH":[function(e,t,r){t.exports=''},{}],eHsVM:[function(e,t,r){t.exports=''},{}],"2f6qz":[function(e,t,r){t.exports=''},{}],cy2gj:[function(e,t,r){t.exports=''},{}],hGnnd:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return x});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_inherits"),l=e("@swc/helpers/_/_to_consumable_array"),c=e("@swc/helpers/_/_create_super"),u=e("@swc/helpers/_/_ts_generator"),p=e("./flip"),f=n.interopDefault(p),d=e("./aspectRatio"),h=n.interopDefault(d),m=e("./playbackRate"),v=n.interopDefault(m),g=e("./subtitleOffset"),y=n.interopDefault(g),_=e("../utils/component"),b=n.interopDefault(_),w=e("../utils"),x=/*#__PURE__*/function(e){(0,s._)(r,e);var t=(0,c._)(r);function r(e){(0,a._)(this,r),n=t.call(this,e);var n,o=e.option,i=e.controls,s=e.template.$setting;return n.name="setting",n.$parent=s,n.id=0,n.active=null,n.cache=new Map,n.option=(0,l._)(n.builtin).concat((0,l._)(o.settings)),o.setting&&(n.format(),n.render(),e.on("blur",function(){n.show&&(n.show=!1,n.render())}),e.on("focus",function(e){var t=(0,w.includeFromEvent)(e,i.setting),r=(0,w.includeFromEvent)(e,n.$parent);!n.show||t||r||(n.show=!1,n.render())}),e.on("resize",function(){return n.resize()})),n}return(0,i._)(r,[{key:"builtin",get:function(){var e=[],t=this.art.option;return t.playbackRate&&e.push((0,v.default)(this.art)),t.aspectRatio&&e.push((0,h.default)(this.art)),t.flip&&e.push((0,f.default)(this.art)),t.subtitleOffset&&e.push((0,y.default)(this.art)),e}},{key:"traverse",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option,r=0;r0&&void 0!==arguments[0]?arguments[0]:this.option,r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=0;a0&&void 0!==arguments[0]?arguments[0]:"",t=null;return this.traverse(function(r){r.name===e&&(t=r)}),t}},{key:"resize",value:function(){var e=this.art,t=e.controls,r=e.constructor,n=r.SETTING_WIDTH,o=r.SETTING_ITEM_HEIGHT,a=e.template,i=a.$player,s=a.$setting;if(t.setting&&this.show){var l,c,u=(null===(c=this.active[0])||void 0===c?void 0:null===(l=c.$parent)||void 0===l?void 0:l.width)||n,p=(0,w.getRect)(t.setting),f=p.left,d=p.width,h=(0,w.getRect)(i),m=h.left,v=h.width,g=f-m+d/2-u/2,y=this.active===this.option?this.active.length*o:(this.active.length+1)*o;if((0,w.setStyle)(s,"height","".concat(y,"px")),(0,w.setStyle)(s,"width","".concat(u,"px")),this.art.isRotate||w.isMobile)return;g+u>v?((0,w.setStyle)(s,"left",null),(0,w.setStyle)(s,"right",null)):((0,w.setStyle)(s,"left","".concat(g,"px")),(0,w.setStyle)(s,"right","auto"))}}},{key:"inactivate",value:function(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:this.option;return t.push(e),this.format(),this.creatItem(e),this.render(),e}},{key:"creatHeader",value:function(e){var t=this;if(this.cache.has(e.$option)){var r=this.cache.get(e.$option),n=this.art,o=n.proxy,a=n.icons.arrowLeft,i=n.constructor.SETTING_ITEM_HEIGHT,s=(0,w.createElement)("div");(0,w.setStyle)(s,"height","".concat(i,"px")),(0,w.addClass)(s,"art-setting-item"),(0,w.addClass)(s,"art-setting-item-back");var l=(0,w.append)(s,'
'),c=(0,w.createElement)("div");(0,w.addClass)(c,"art-setting-item-left-icon"),(0,w.append)(c,a),(0,w.append)(l,c),(0,w.append)(l,e.$parent.html);var u=o(s,"click",function(){return t.render(e.$parents)});e.$parent.$events.push(u),(0,w.append)(r,s)}}},{key:"creatItem",value:function(e){var t,r,n=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.cache.has(e.$option)){var i=this.cache.get(e.$option),s=e.$item,c="selector";(0,w.has)(e,"switch")&&(c="switch"),(0,w.has)(e,"range")&&(c="range"),(0,w.has)(e,"onClick")&&(c="button");var p=this.art,f=p.icons,d=p.proxy,h=p.constructor,m=(0,w.createElement)("div");(0,w.addClass)(m,"art-setting-item"),(0,w.setStyle)(m,"height","".concat(h.SETTING_ITEM_HEIGHT,"px")),m.dataset.name=e.name||"",m.dataset.value=e.value||"";var v=(0,w.append)(m,'
'),g=(0,w.append)(m,'
'),y=(0,w.createElement)("div");switch((0,w.addClass)(y,"art-setting-item-left-icon"),c){case"button":case"switch":case"range":(0,w.append)(y,e.icon||f.config);break;case"selector":(null===(t=e.selector)||void 0===t?void 0:t.length)?(0,w.append)(y,e.icon||f.config):(0,w.append)(y,f.check)}(0,w.append)(v,y),(0,w.def)(e,"$icon",{configurable:!0,get:function(){return y}}),(0,w.def)(e,"icon",{configurable:!0,get:function(){return y.innerHTML},set:function(e){y.innerHTML="",(0,w.append)(y,e)}});var _=(0,w.createElement)("div");(0,w.addClass)(_,"art-setting-item-left-text"),(0,w.append)(_,e.html||""),(0,w.append)(v,_),(0,w.def)(e,"$html",{configurable:!0,get:function(){return _}}),(0,w.def)(e,"html",{configurable:!0,get:function(){return _.innerHTML},set:function(e){_.innerHTML="",(0,w.append)(_,e)}});var b=(0,w.createElement)("div");switch((0,w.addClass)(b,"art-setting-item-right-tooltip"),(0,w.append)(b,e.tooltip||""),(0,w.append)(g,b),(0,w.def)(e,"$tooltip",{configurable:!0,get:function(){return b}}),(0,w.def)(e,"tooltip",{configurable:!0,get:function(){return b.innerHTML},set:function(e){b.innerHTML="",(0,w.append)(b,e)}}),c){case"switch":var x=(0,w.createElement)("div");(0,w.addClass)(x,"art-setting-item-right-icon");var j=(0,w.append)(x,f.switchOn),k=(0,w.append)(x,f.switchOff);(0,w.setStyle)(e.switch?k:j,"display","none"),(0,w.append)(g,x),(0,w.def)(e,"$switch",{configurable:!0,get:function(){return x}});var M=e.switch;(0,w.def)(e,"switch",{configurable:!0,get:function(){return M},set:function(e){M=e,e?((0,w.setStyle)(k,"display","none"),(0,w.setStyle)(j,"display",null)):((0,w.setStyle)(k,"display",null),(0,w.setStyle)(j,"display","none"))}});break;case"range":var I=(0,w.createElement)("div");(0,w.addClass)(I,"art-setting-item-right-icon");var S=(0,w.append)(I,'');S.value=e.range[0],S.min=e.range[1],S.max=e.range[2],S.step=e.range[3],(0,w.addClass)(S,"art-setting-range"),(0,w.append)(g,I),(0,w.def)(e,"$range",{configurable:!0,get:function(){return S}});var D=(0,l._)(e.range);(0,w.def)(e,"range",{configurable:!0,get:function(){return D},set:function(e){D=(0,l._)(e),S.value=e[0],S.min=e[1],S.max=e[2],S.step=e[3]}});break;case"selector":if(null===(r=e.selector)||void 0===r?void 0:r.length){var T=(0,w.createElement)("div");(0,w.addClass)(T,"art-setting-item-right-icon"),(0,w.append)(T,f.arrowRight),(0,w.append)(g,T)}}switch(c){case"switch":if(e.onSwitch){var E,F=this,R=d(m,"click",(E=(0,o._)(function(t){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,e.onSwitch.call(F.art,e,m,t)];case 1:return e.switch=r.sent(),[2]}})}),function(e){return E.apply(this,arguments)}));e.$events.push(R)}break;case"range":if(e.$range){if(e.onRange){var O,C=this,W=d(e.$range,"change",(O=(0,o._)(function(t){return(0,u._)(this,function(r){switch(r.label){case 0:return e.range[0]=e.$range.valueAsNumber,[4,e.onRange.call(C.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return O.apply(this,arguments)}));e.$events.push(W)}if(e.onChange){var A,P=this,$=d(e.$range,"input",(A=(0,o._)(function(t){return(0,u._)(this,function(r){switch(r.label){case 0:return e.range[0]=e.$range.valueAsNumber,[4,e.onChange.call(P.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return A.apply(this,arguments)}));e.$events.push($)}}break;case"selector":var z,L=this,H=d(m,"click",(z=(0,o._)(function(t){var r,n;return(0,u._)(this,function(o){switch(o.label){case 0:if(!(null===(r=e.selector)||void 0===r?void 0:r.length))return[3,1];return L.render(e.selector),[3,3];case 1:if(L.check(e),!e.$parent.onSelect)return[3,3];return n=e.$parent,[4,e.$parent.onSelect.call(L.art,e,m,t)];case 2:n.tooltip=o.sent(),o.label=3;case 3:return[2]}})}),function(e){return z.apply(this,arguments)}));e.$events.push(H),e.default&&(0,w.addClass)(m,"art-current");break;case"button":if(e.onClick){var N,U=this,V=d(m,"click",(N=(0,o._)(function(t){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,e.onClick.call(U.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return N.apply(this,arguments)}));e.$events.push(V)}}(0,w.def)(e,"$item",{configurable:!0,get:function(){return m}}),a?(0,w.replaceElement)(m,s):(0,w.append)(i,m),e.mounted&&setTimeout(function(){return e.mounted.call(n.art,e.$item,e)},0)}}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option;if(this.active=e,this.cache.has(e)){var t=this.cache.get(e);(0,w.inverseClass)(t,"art-current")}else{var r,n=(0,w.createElement)("div");this.cache.set(e,n),(0,w.addClass)(n,"art-setting-panel"),(0,w.append)(this.$parent,n),(0,w.inverseClass)(n,"art-current"),(null===(r=e[0])||void 0===r?void 0:r.$parent)&&this.creatHeader(e[0]);for(var o=0;oo&&cu)&&setTimeout(function(){(0,i.setStyle)(s,"width","".concat(u,"px")),(0,i.setStyle)(s,"height","".concat(c,"px")),(0,i.setStyle)(s,"transform-origin","0 0"),(0,i.setStyle)(s,"transform","rotate(90deg) translate(0, -".concat(c,"px)")),(0,i.addClass)(s,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},r.AUTO_ORIENTATION_TIME)}else(0,i.hasClass)(s,"art-auto-orientation")&&((0,i.removeClass)(s,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",(t=(0,o._)(function(e){var t,r,n,o,c,u,p,f,d;return(0,a._)(this,function(a){switch(a.label){case 0:if(!(null===(r=screen)||void 0===r?void 0:null===(t=r.orientation)||void 0===t?void 0:t.lock))return[2];if(n=screen.orientation.type,!e)return[3,3];if(o=l.videoWidth,c=l.videoHeight,p=(u=document.documentElement).clientWidth,f=u.clientHeight,!(o>c&&pf))return[3,2];return d=n.startsWith("portrait")?"landscape":"portrait",[4,screen.orientation.lock(d)];case 1:a.sent(),(0,i.addClass)(s,"art-auto-orientation-fullscreen"),a.label=2;case 2:return[3,5];case 3:if(!(0,i.hasClass)(s,"art-auto-orientation-fullscreen"))return[3,5];return[4,screen.orientation.lock(n)];case 4:a.sent(),(0,i.removeClass)(s,"art-auto-orientation-fullscreen"),a.label=5;case 5:return[2]}})}),function(e){return t.apply(this,arguments)})),{name:"autoOrientation",get state(){return(0,i.hasClass)(s,"art-auto-orientation")}}}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bfOeF:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.i18n,r=e.icons,n=e.storage,a=e.constructor,i=e.proxy,s=e.template.$poster,l=e.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),c=(0,o.query)(".art-auto-playback-last",l),u=(0,o.query)(".art-auto-playback-jump",l),p=(0,o.query)(".art-auto-playback-close",l);(0,o.append)(p,r.close);var f=null;function d(){var r=(n.get("times")||{})[e.option.id||e.option.url];clearTimeout(f),(0,o.setStyle)(l,"display","none"),r&&r>=a.AUTO_PLAYBACK_MIN&&((0,o.setStyle)(l,"display","flex"),c.innerText="".concat(t.get("Last Seen")," ").concat((0,o.secondToTime)(r)),u.innerText=t.get("Jump Play"),i(p,"click",function(){(0,o.setStyle)(l,"display","none")}),i(u,"click",function(){e.seek=r,e.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")}),e.once("video:timeupdate",function(){f=setTimeout(function(){(0,o.setStyle)(l,"display","none")},a.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",function(){if(e.playing){var t=n.get("times")||{},r=Object.keys(t);r.length>a.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,n.set("times",t)}}),e.on("ready",d),e.on("restart",d),{name:"auto-playback",get times(){return n.get("times")||{}},clear:function(){return n.del("times")},delete:function(e){var t=n.get("times")||{};return delete t[e],n.set("times",t),t}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],giGC3:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.constructor,r=e.proxy,n=e.template,a=n.$player,i=n.$video,s=null,l=!1,c=1,u=function(){clearTimeout(s),l&&(l=!1,e.playbackRate=c,(0,o.removeClass)(a,"art-fast-forward"))};return r(i,"touchstart",function(r){1===r.touches.length&&e.playing&&!e.isLock&&(s=setTimeout(function(){l=!0,c=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",u),r(document,"touchend",u),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],e0Ov6:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.layers,r=e.icons,n=e.template.$player;function a(){return(0,o.hasClass)(n,"art-lock")}function i(){(0,o.addClass)(n,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,o.removeClass)(n,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted:function(t){var n=(0,o.append)(t,r.lock),a=(0,o.append)(t,r.unlock);(0,o.setStyle)(n,"display","none"),e.on("lock",function(e){e?((0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(a,"display","none")):((0,o.setStyle)(n,"display","none"),(0,o.setStyle)(a,"display","inline-flex"))})},click:function(){a()?s():i()}}),{name:"lock",get state(){return a()},set state(value){value?i():s()}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["4Be4O"],"4Be4O","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,a,i,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[n]&&l[n],u=c.i||{},p=c.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!p[t]){if(!e[t]){if(o[t])return o[t];var a="function"==typeof l[n]&&l[n];if(!r&&a)return a(t,!0);if(c)return c(t,!0);if(f&&"string"==typeof t)return f(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},u.cache={};var s=p[t]=new d.Module(t);e[t][0].call(s.exports,u,s,s.exports,l)}return p[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=f,this.exports={}},d.modules=e,d.cache=p,d.parent=c,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=u,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return l[n]}}),l[n]=d;for(var h=0;h").concat(e))};s("Version@"+t.version),s("Env@"+t.env),s("Build@"+t.build);for(var l=0;l<_.default.events.length;l++)n.on("video:"+_.default.events[l],function(e){return s("Event@"+e.type)})}return et.push(n),n}return(0,l._)(t,e),(0,s._)(t,[{key:"proxy",get:function(){return this.events.proxy}},{key:"query",get:function(){return this.template.query}},{key:"video",get:function(){return this.template.$video}},{key:"destroy",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.events.destroy(),this.template.destroy(e),et.splice(et.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return et}},{key:"version",get:function(){return"5.2.3"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2025-04-20 10:10:56"}},{key:"config",get:function(){return _.default}},{key:"utils",get:function(){return m}},{key:"scheme",get:function(){return g.default}},{key:"Emitter",get:function(){return h.default}},{key:"validator",get:function(){return f.default}},{key:"kindOf",get:function(){return f.default.kindOf}},{key:"html",get:function(){return w.default.html}},{key:"option",get:function(){var e;return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:function(e){return e}},moreVideoAttr:{controls:!1,preload:m.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:null==(e=navigator)?void 0:e.language.toLowerCase()}}}]),t}(h.default);er.STYLE=u.default,er.DEBUG=!1,er.CONTEXTMENU=!0,er.NOTICE_TIME=2e3,er.SETTING_WIDTH=250,er.SETTING_ITEM_WIDTH=200,er.SETTING_ITEM_HEIGHT=35,er.RESIZE_TIME=200,er.SCROLL_TIME=200,er.SCROLL_GAP=50,er.AUTO_PLAYBACK_MAX=10,er.AUTO_PLAYBACK_MIN=5,er.AUTO_PLAYBACK_TIMEOUT=3e3,er.RECONNECT_TIME_MAX=5,er.RECONNECT_SLEEP_TIME=1e3,er.CONTROL_HIDE_TIME=3e3,er.DBCLICK_TIME=300,er.DBCLICK_FULLSCREEN=!0,er.MOBILE_DBCLICK_PLAY=!0,er.MOBILE_CLICK_PLAY=!1,er.AUTO_ORIENTATION_TIME=200,er.INFO_LOOP_TIME=1e3,er.FAST_FORWARD_VALUE=3,er.FAST_FORWARD_TIME=1e3,er.TOUCH_MOVE_RATIO=.5,er.VOLUME_STEP=.1,er.SEEK_STEP=5,er.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],er.ASPECT_RATIO=["default","4:3","16:9"],er.FLIP=["normal","horizontal","vertical"],er.FULLSCREEN_WEB_IN_BODY=!1,er.LOG_VERSION=!0,er.USE_RAF=!1,m.isBrowser&&(window.Artplayer=er,m.setStyleText("artplayer-style",u.default),setTimeout(function(){er.LOG_VERSION&&console.log("%c ArtPlayer %c ".concat(er.version," %c https://artplayer.org"),"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","bundle-text:./style/index.less":"3eiHP","option-validator":"8OeHO","./utils/emitter":"2V7i9","./utils":"7MU7R","./scheme":"39ygm","./config":"emMME","./template":"gqSBs","./i18n":"7iXtC","./player":"j7piB","./control":"7z0K5","./contextmenu":"5RLZo","./info":"6JYu5","./subtitle":"WYfF6","./events":"47RGg","./hotkey":"gszG1","./layer":"dImgv","./loading":"6vtvO","./notice":"3Z2RQ","./mask":"hUoLo","./icons":"4Bz82","./setting":"hGnnd","./storage":"8dSC3","./plugins":"gv8Rm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jZCCG:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return l});var a=e("./_get_prototype_of.js"),i=e("./_is_native_reflect_construct.js"),s=e("./_possible_constructor_return.js");function l(e,t,r){return t=(0,a._)(t),(0,s._)(e,(0,i._)()?Reflect.construct(t,r||[],(0,a._)(e).constructor):t.apply(e,r))}},{"./_get_prototype_of.js":"dAKgy","./_is_native_reflect_construct.js":"7fioR","./_possible_constructor_return.js":"iVdhB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dAKgy:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"7fioR":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iVdhB:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return s});var a=e("./_assert_this_initialized.js"),i=e("./_type_of.js");function s(e,t){return t&&("object"===(0,i._)(t)||"function"==typeof t)?t:(0,a._)(e)}},{"./_assert_this_initialized.js":"jgeid","./_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9iJMm":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){for(var r=0;r1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector(e)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(t.querySelectorAll(e))}function l(e,t){return e.classList.add(t)}function c(e,t){return e.classList.remove(t)}function u(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 f(e){return e.parentNode.removeChild(e)}function d(e,t,r){return e.style[t]=r,e}function h(e,t){for(var r in t)d(e,r,t[r]);return e}function m(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(n):n}function v(e){return Array.from(e.parentElement.children).filter(function(t){return t!==e})}function g(e,t){v(e).forEach(function(e){return c(e,t)}),l(e,t)}function y(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top";a.isMobile||(e.setAttribute("aria-label",t),l(e,"hint--rounded"),l(e,"hint--".concat(r)))}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,a=r.top-t<=n&&r.top+r.height+t>=0,i=r.left-t<=o+t&&r.left+r.width+t>=0;return a&&i}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function w(e,t){return t.parentNode.replaceChild(e,t),e}function x(e){return document.createElement(e)}function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=x("i");return l(r,"art-icon"),l(r,"art-icon-".concat(e)),p(r,t),r}function k(e,t){var r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function M(){var e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function I(e){return e.getBoundingClientRect()}function S(e,t){return new Promise(function(r,n){var o=new Image;o.onload=function(){if(t&&1!==t){var a=document.createElement("canvas"),i=a.getContext("2d");a.width=o.width*t,a.height=o.height*t,i.drawImage(o,0,0,a.width,a.height),a.toBlob(function(t){var o=URL.createObjectURL(t),a=new Image;a.onload=function(){r(a)},a.onerror=function(){URL.revokeObjectURL(o),n(Error("Image load failed: ".concat(e)))},a.src=o})}else r(o)},o.onerror=function(){n(Error("Image load failed: ".concat(e)))},o.src=e})}},{"./compatibility":"f9Vc8","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],f9Vc8:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",function(){return a}),o.export(r,"isSafari",function(){return i}),o.export(r,"isWechat",function(){return s}),o.export(r,"isIE",function(){return l}),o.export(r,"isAndroid",function(){return c}),o.export(r,"isIOS",function(){return u}),o.export(r,"isIOS13",function(){return p}),o.export(r,"isMobile",function(){return f}),o.export(r,"isBrowser",function(){return d});var a="undefined"!=typeof navigator?navigator.userAgent:"",i=/^((?!chrome|android).)*safari/i.test(a),s=/MicroMessenger/i.test(a),l=/MSIE|Trident/i.test(a),c=/android/i.test(a),u=/iPad|iPhone|iPod/i.test(a)&&!window.MSStream,p=u||a.includes("Macintosh")&&navigator.maxTouchPoints>=1,f=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)||p,d="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6WanZ":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",function(){return l}),o.export(r,"errorHandle",function(){return c});var a=e("@swc/helpers/_/_call_super"),i=e("@swc/helpers/_/_class_call_check"),s=e("@swc/helpers/_/_inherits"),l=function(e){"use strict";function t(e,r){var n;return(0,i._)(this,t),n=(0,a._)(this,t,[e]),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(n,r||n.constructor),n.name="ArtPlayerError",n}return(0,s._)(t,e),t}((0,e("@swc/helpers/_/_wrap_native_super")._)(Error));function c(e,t){if(!e)throw new l(t);return e}},{"@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_wrap_native_super":"hNYY1","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hNYY1:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return c});var a=e("./_construct.js"),i=e("./_get_prototype_of.js"),s=e("./_is_native_function.js"),l=e("./_set_prototype_of.js");function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||!(0,s._)(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,a._)(e,arguments,(0,i._)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,l._)(r,e)})(e)}},{"./_construct.js":"ljlHN","./_get_prototype_of.js":"dAKgy","./_is_native_function.js":"fIKaN","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ljlHN:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return s});var a=e("./_is_native_reflect_construct.js"),i=e("./_set_prototype_of.js");function s(e,t,r){return(s=(0,a._)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,i._)(o,r.prototype),o}).apply(null,arguments)}},{"./_is_native_reflect_construct.js":"7fioR","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fIKaN:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return -1!==Function.toString.call(e).indexOf("[native code]")}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cZfjQ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,function(e,t,r){var n=r.slice(0,3);return 1===r.length&&(n=r+"00"),2===r.length&&(n=r+"0"),"".concat(t,",").concat(n)}).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"))}function i(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function s(e){var t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/[:.]/).map(function(e,t,r){if(t===r.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?".".concat(e):":".concat(e)}).join("")}return"WEBVTT\n\n"+e.split(/\r?\n/).map(function(e){var n=e.match(t);return n?{start:r(n[1].trim()),end:r(n[2].trim()),text:n[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(function(e){return e.trim()}).join("\n")}:null}).filter(function(e){return e}).map(function(e,t){return e?t+1+"\n"+"".concat(e.start," --\x3e ").concat(e.end)+"\n"+"".concat(e.text):""}).filter(function(e){return e.trim()}).join("\n\n")}o.defineInteropFlag(r),o.export(r,"srtToVtt",function(){return a}),o.export(r,"vttToBlob",function(){return i}),o.export(r,"assToVtt",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l2mTb:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){var 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",function(){return function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}}),o.export(r,"download",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5EnnX":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",function(){return s}),o.export(r,"has",function(){return c}),o.export(r,"get",function(){return u}),o.export(r,"mergeDeep",function(){return function e(){for(var t=arguments.length,r=Array(t),n=0;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(function(t){return setTimeout(t,e)})}function i(e,t){var r;return function(){for(var n=this,o=arguments.length,a=Array(o),i=0;i0?[t,r,n]:[r,n]).map(function(e){return e<10?"0".concat(e):String(e)}).join(":")}function l(e){return e.replace(/[&<>'"]/g,function(e){return({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e})}function c(e){var t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp("(".concat(Object.keys(t).join("|"),")"),"g");return e.replace(r,function(e){return t[e]||e})}o.defineInteropFlag(r),o.export(r,"clamp",function(){return a}),o.export(r,"capitalize",function(){return i}),o.export(r,"secondToTime",function(){return s}),o.export(r,"escape",function(){return l}),o.export(r,"unescape",function(){return c})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"39ygm":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",function(){return m});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils"),l="array",c="boolean",u="string",p="number",f="object",d="function";function h(e,t,r){return(0,s.errorHandle)(t===u||t===p||e instanceof Element,"".concat(r.join(".")," require '").concat(u,"' or 'Element' type"))}var m={html:h,disable:"?".concat(c),name:"?".concat(u),index:"?".concat(p),style:"?".concat(f),click:"?".concat(d),mounted:"?".concat(d),tooltip:"?".concat(u,"|").concat(p),width:"?".concat(p),selector:"?".concat(l),onSelect:"?".concat(d),switch:"?".concat(c),onSwitch:"?".concat(d),range:"?".concat(l),onRange:"?".concat(d),onChange:"?".concat(d)};r.default={id:u,container:h,url:u,poster:u,type:u,theme:u,lang:u,volume:p,isLive:c,muted:c,autoplay:c,autoSize:c,autoMini:c,loop:c,flip:c,playbackRate:c,aspectRatio:c,screenshot:c,setting:c,hotkey:c,pip:c,mutex:c,backdrop:c,fullscreen:c,fullscreenWeb:c,subtitleOffset:c,miniProgressBar:c,useSSR:c,playsInline:c,lock:c,gesture:c,fastForward:c,autoPlayback:c,autoOrientation:c,airplay:c,proxy:"?".concat(d),plugins:[d],layers:[m],contextmenu:[m],settings:[m],controls:[(0,i._)((0,a._)({},m),{position:function(e,t,r){var n=["top","left","right"];return(0,s.errorHandle)(n.includes(e),"".concat(r.join(".")," only accept ").concat(n.toString()," as parameters"))}})],quality:[{default:"?".concat(c),html:u,url:u}],highlight:[{time:p,text:u}],thumbnails:{url:u,number:p,column:p,width:p,height:p,scale:p},subtitle:{url:u,name:u,type:u,style:f,escape:c,encoding:u,onVttLoad:d},moreVideoAttr:f,i18n:f,icons:f,cssVar:f,customType:f}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return i});var a=e("./_define_property.js");function i(e){for(var t=1;t\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
5.2.3
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\nx\n
\n
\n
\n
[x]
\n
\n
\n\n '}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","./utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7iXtC":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return u});var a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("../utils"),l=e("./zh-cn"),c=o.interopDefault(l),u=function(){"use strict";function e(t){(0,a._)(this,e),this.art=t,this.languages={"zh-cn":c.default},this.language={},this.update(t.option.i18n)}return(0,i._)(e,[{key:"init",value:function(){var e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}},{key:"get",value:function(e){return this.language[e]||e}},{key:"update",value:function(e){this.languages=(0,s.mergeDeep)(this.languages,e),this.init()}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","../utils":"7MU7R","./zh-cn":"5mkZy","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5mkZy":[function(e,t,r,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","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":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],j7piB:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return ex});var a=e("@swc/helpers/_/_class_call_check"),i=e("./urlMix"),s=o.interopDefault(i),l=e("./attrMix"),c=o.interopDefault(l),u=e("./playMix"),p=o.interopDefault(u),f=e("./pauseMix"),d=o.interopDefault(f),h=e("./toggleMix"),m=o.interopDefault(h),v=e("./seekMix"),g=o.interopDefault(v),y=e("./volumeMix"),_=o.interopDefault(y),b=e("./currentTimeMix"),w=o.interopDefault(b),x=e("./durationMix"),j=o.interopDefault(x),k=e("./switchMix"),M=o.interopDefault(k),I=e("./playbackRateMix"),S=o.interopDefault(I),D=e("./aspectRatioMix"),T=o.interopDefault(D),E=e("./screenshotMix"),F=o.interopDefault(E),R=e("./fullscreenMix"),O=o.interopDefault(R),C=e("./fullscreenWebMix"),W=o.interopDefault(C),A=e("./pipMix"),P=o.interopDefault(A),$=e("./loadedMix"),L=o.interopDefault($),z=e("./playedMix"),H=o.interopDefault(z),N=e("./playingMix"),U=o.interopDefault(N),V=e("./autoSizeMix"),B=o.interopDefault(V),q=e("./rectMix"),Y=o.interopDefault(q),G=e("./flipMix"),J=o.interopDefault(G),K=e("./miniMix"),X=o.interopDefault(K),Z=e("./posterMix"),Q=o.interopDefault(Z),ee=e("./autoHeightMix"),et=o.interopDefault(ee),er=e("./cssVarMix"),en=o.interopDefault(er),eo=e("./themeMix"),ea=o.interopDefault(eo),ei=e("./typeMix"),es=o.interopDefault(ei),el=e("./stateMix"),ec=o.interopDefault(el),eu=e("./subtitleOffsetMix"),ep=o.interopDefault(eu),ef=e("./airplayMix"),ed=o.interopDefault(ef),eh=e("./qualityMix"),em=o.interopDefault(eh),ev=e("./thumbnailsMix"),eg=o.interopDefault(ev),ey=e("./optionInit"),e_=o.interopDefault(ey),eb=e("./eventInit"),ew=o.interopDefault(eb),ex=function e(t){"use strict";(0,a._)(this,e),(0,s.default)(t),(0,c.default)(t),(0,p.default)(t),(0,d.default)(t),(0,m.default)(t),(0,g.default)(t),(0,_.default)(t),(0,w.default)(t),(0,j.default)(t),(0,M.default)(t),(0,S.default)(t),(0,T.default)(t),(0,F.default)(t),(0,O.default)(t),(0,W.default)(t),(0,P.default)(t),(0,L.default)(t),(0,H.default)(t),(0,U.default)(t),(0,B.default)(t),(0,Y.default)(t),(0,J.default)(t),(0,X.default)(t),(0,Q.default)(t),(0,et.default)(t),(0,en.default)(t),(0,ea.default)(t),(0,es.default)(t),(0,ec.default)(t),(0,ep.default)(t),(0,ed.default)(t),(0,em.default)(t),(0,eg.default)(t),(0,ew.default)(t),(0,e_.default)(t)}},{"@swc/helpers/_/_class_call_check":"9iJMm","./urlMix":"bnOAX","./attrMix":"YLwHz","./playMix":"ktu66","./pauseMix":"6JstV","./toggleMix":"cotiM","./seekMix":"8DVLx","./volumeMix":"9fjEr","./currentTimeMix":"fniLa","./durationMix":"2WMs4","./switchMix":"5XnRj","./playbackRateMix":"atzXU","./aspectRatioMix":"e67kx","./screenshotMix":"7FJKj","./fullscreenMix":"1hnoY","./fullscreenWebMix":"aLUYJ","./pipMix":"jJ7PZ","./loadedMix":"3RcYf","./playedMix":"hpdzI","./playingMix":"dQpMB","./autoSizeMix":"i3W5n","./rectMix":"eA2QA","./flipMix":"8B7eY","./miniMix":"f1BFf","./posterMix":"3Bs5U","./autoHeightMix":"gRfBQ","./cssVarMix":"6gWkU","./themeMix":"6YX9w","./typeMix":"cBZG8","./stateMix":"bpFKI","./subtitleOffsetMix":"hyhz8","./airplayMix":"5fLM6","./qualityMix":"jj5tM","./thumbnailsMix":"g4G3o","./optionInit":"PZTTa","./eventInit":"cKj2D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bnOAX:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),s=e("../utils");function l(e){var t=e.option,r=e.template.$video;(0,s.def)(e,"url",{get:function(){return r.src},set:function(n){return(0,a._)(function(){var o,a,l;return(0,i._)(this,function(i){switch(i.label){case 0:if(!n)return[3,4];if(o=e.url,a=t.type||(0,s.getExt)(n),l=t.customType[a],!(a&&l))return[3,2];return[4,(0,s.sleep)()];case 1:return i.sent(),e.loading.show=!0,l.call(e,r,n,e),[3,3];case 2:URL.revokeObjectURL(o),r.src=n,i.label=3;case 3:return o!==e.url&&(e.option.url=n,e.isReady&&o&&e.once("video:canplay",function(){e.emit("restart",n)})),[3,6];case 4:return[4,(0,s.sleep)()];case 5:i.sent(),e.loading.show=!0,i.label=6;case 6:return[2]}})})()}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){r(e);return}s.done?t(l):Promise.resolve(l).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function s(e){a(i,n,o,s,l,"next",e)}function l(e){a(i,n,o,s,l,"throw",e)}s(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return a.__generator});var a=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"__extends",function(){return s}),o.export(r,"__assign",function(){return l}),o.export(r,"__rest",function(){return c}),o.export(r,"__decorate",function(){return u}),o.export(r,"__param",function(){return p}),o.export(r,"__esDecorate",function(){return f}),o.export(r,"__runInitializers",function(){return d}),o.export(r,"__propKey",function(){return h}),o.export(r,"__setFunctionName",function(){return m}),o.export(r,"__metadata",function(){return v}),o.export(r,"__awaiter",function(){return g}),o.export(r,"__generator",function(){return y}),o.export(r,"__createBinding",function(){return _}),o.export(r,"__exportStar",function(){return b}),o.export(r,"__values",function(){return w}),o.export(r,"__read",function(){return x}),o.export(r,"__spread",function(){return j}),o.export(r,"__spreadArrays",function(){return k}),o.export(r,"__spreadArray",function(){return M}),o.export(r,"__await",function(){return I}),o.export(r,"__asyncGenerator",function(){return S}),o.export(r,"__asyncDelegator",function(){return D}),o.export(r,"__asyncValues",function(){return T}),o.export(r,"__makeTemplateObject",function(){return E}),o.export(r,"__importStar",function(){return O}),o.export(r,"__importDefault",function(){return C}),o.export(r,"__classPrivateFieldGet",function(){return W}),o.export(r,"__classPrivateFieldSet",function(){return A}),o.export(r,"__classPrivateFieldIn",function(){return P}),o.export(r,"__addDisposableResource",function(){return $}),o.export(r,"__disposeResources",function(){return z}),o.export(r,"__rewriteRelativeImportExtension",function(){return H});var a=e("@swc/helpers/_/_type_of"),i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var l=function(){return(l=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,a._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function p(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",p=!t&&e?n.static?e:e.prototype:null,f=t||(p?Object.getOwnPropertyDescriptor(p,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var m={};for(var v in n)m[v]="access"===v?{}:n[v];for(var v in n.access)m.access[v]=n.access[v];m.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var g=(0,r[h])("accessor"===c?{get:f.get,set:f.set}:f[u],m);if("accessor"===c){if(void 0===g)continue;if(null===g||(void 0===g?"undefined":(0,a._)(g))!=="object")throw TypeError("Object expected");(l=s(g.get))&&(f.get=l),(l=s(g.set))&&(f.set=l),(l=s(g.init))&&o.unshift(l)}else(l=s(g))&&("field"===c?o.unshift(l):f[u]=l)}p&&Object.defineProperty(p,n.name,f),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function j(){for(var e=[],t=0;t1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=o[e](t)).value instanceof I?Promise.resolve(r.value.v).then(l,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function D(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:I(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=w(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var a,i,s;a=n,i=o,s=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){a({value:e,done:s})},i)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},R=function(e){return(R=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=R(e),n=0;nu?((0,a.setStyle)(o,"width","".concat(u*c,"px")),(0,a.setStyle)(o,"height","100%"),(0,a.setStyle)(o,"margin","0 auto")):((0,a.setStyle)(o,"width","100%"),(0,a.setStyle)(o,"height","".concat(l/u,"px")),(0,a.setStyle)(o,"margin","auto 0")),i.dataset.aspectRatio=n}r.show="".concat(t.get("Aspect Ratio"),": ").concat("default"===n?t.get("Default"):n),e.emit("aspectRatio",n)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7FJKj":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),s=e("../utils");function l(e){var t,r=e.notice,n=e.template.$video,o=(0,s.createElement)("canvas");(0,s.def)(e,"getDataURL",{value:function(){return new Promise(function(e,t){try{o.width=n.videoWidth,o.height=n.videoHeight,o.getContext("2d").drawImage(n,0,0),e(o.toDataURL("image/png"))}catch(e){r.show=e,t(e)}})}}),(0,s.def)(e,"getBlobUrl",{value:function(){return new Promise(function(e,t){try{o.width=n.videoWidth,o.height=n.videoHeight,o.getContext("2d").drawImage(n,0,0),o.toBlob(function(t){e(URL.createObjectURL(t))})}catch(e){r.show=e,t(e)}})}}),(0,s.def)(e,"screenshot",{value:(t=(0,a._)(function(t){var r,o;return(0,i._)(this,function(a){switch(a.label){case 0:return[4,e.getDataURL()];case 1:return r=a.sent(),o=t||"artplayer_".concat((0,s.secondToTime)(n.currentTime)),(0,s.download)(r,"".concat(o,".png")),e.emit("screenshot",r),[2,r]}})}),function(e){return t.apply(this,arguments)})})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1hnoY":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return u});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),s=e("../libs/screenfull"),l=o.interopDefault(s),c=e("../utils");function u(e){var t=e.i18n,r=e.notice,n=e.template,o=n.$video,s=n.$player,u=function(e){l.default.on("change",function(){e.emit("fullscreen",l.default.isFullscreen),l.default.isFullscreen?(e.state="fullscreen",(0,c.addClass)(s,"art-fullscreen")):(0,c.removeClass)(s,"art-fullscreen"),e.emit("resize")}),l.default.on("error",function(t){e.emit("fullscreenError",t)}),(0,c.def)(e,"fullscreen",{get:function(){return l.default.isFullscreen},set:function(e){return(0,a._)(function(){return(0,i._)(this,function(t){switch(t.label){case 0:if(!e)return[3,2];return[4,l.default.request(s)];case 1:return t.sent(),[3,4];case 2:return[4,l.default.exit()];case 3:t.sent(),t.label=4;case 4:return[2]}})})()}})},p=function(e){e.proxy(document,"webkitfullscreenchange",function(){e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,c.def)(e,"fullscreen",{get:function(){return document.fullscreenElement===o},set:function(t){t?(e.state="fullscreen",o.webkitEnterFullscreen()):o.webkitExitFullscreen()}})};e.once("video:loadedmetadata",function(){l.default.isEnabled?u(e):o.webkitSupportsFullscreen?p(e):(0,c.def)(e,"fullscreen",{get:function(){return!1},set:function(){r.show=t.get("Fullscreen Not Supported")}}),(0,c.def)(e,"fullscreen",(0,c.get)(e,"fullscreen"))})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../libs/screenfull":"cM8lD","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cM8lD:[function(e,t,r,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("@swc/helpers/_/_sliced_to_array"),a=[["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"]],i=function(){if("undefined"==typeof document)return!1;var e=a[0],t={},r=!0,n=!1,i=void 0;try{for(var s,l=a[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c[1]in document){var u=!0,p=!1,f=void 0;try{for(var d,h=c.entries()[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var m=(0,o._)(d.value,2),v=m[0],g=m[1];t[e[v]]=g}}catch(e){p=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw f}}return t}}}catch(e){n=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(n)throw i}}return!1}(),s={change:i.fullscreenchange,error:i.fullscreenerror},l={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise(function(r,n){var o=function(){l.off("change",o),r()};l.on("change",o);var a=e[i.requestFullscreen](t);a instanceof Promise&&a.then(o).catch(n)})},exit:function(){return new Promise(function(e,t){if(!l.isFullscreen)return void e();var r=function(){l.off("change",r),e()};l.on("change",r);var n=document[i.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)})},toggle:function(e,t){return l.isFullscreen?l.exit():l.request(e,t)},onchange:function(e){l.on("change",e)},onerror:function(e){l.on("error",e)},on:function(e,t){var r=s[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=s[e];r&&document.removeEventListener(r,t,!1)},raw:i};Object.defineProperties(l,{isFullscreen:{get:function(){return!!document[i.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[i.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!document[i.fullscreenEnabled]}}}),i||(l={isEnabled:!1}),r.default=l},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return c});var a=e("./_array_with_holes.js"),i=e("./_iterable_to_array_limit.js"),s=e("./_non_iterable_rest.js"),l=e("./_unsupported_iterable_to_array.js");function c(e,t){return(0,a._)(e)||(0,i._)(e,t)||(0,l._)(e,t)||(0,s._)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){if(Array.isArray(e))return e}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],loYCM:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw n}}return a}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],aLUYJ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.constructor,r=e.template,n=r.$container,o=r.$player,i="";(0,a.def)(e,"fullscreenWeb",{get:function(){return(0,a.hasClass)(o,"art-fullscreen-web")},set:function(r){r?(i=o.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,a.append)(document.body,o),e.state="fullscreenWeb",(0,a.setStyle)(o,"width","100%"),(0,a.setStyle)(o,"height","100%"),(0,a.addClass)(o,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,a.append)(n,o),i&&(o.style.cssText=i,i=""),(0,a.removeClass)(o,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jJ7PZ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t,r,n,o,i=e.i18n,s=e.notice,l=e.template.$video;document.pictureInPictureEnabled?(t=e.template.$video,r=e.proxy,n=e.notice,t.disablePictureInPicture=!1,(0,a.def)(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(r){r?(e.state="pip",t.requestPictureInPicture().catch(function(e){throw n.show=e,e})):document.exitPictureInPicture().catch(function(e){throw n.show=e,e})}}),r(t,"enterpictureinpicture",function(){e.emit("pip",!0)}),r(t,"leavepictureinpicture",function(){e.emit("pip",!1)})):l.webkitSupportsPresentationMode?((o=e.template.$video).webkitSetPresentationMode("inline"),(0,a.def)(e,"pip",{get:function(){return"picture-in-picture"===o.webkitPresentationMode},set:function(t){t?(e.state="pip",o.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(o.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})):(0,a.def)(e,"pip",{get:function(){return!1},set:function(){s.show=i.get("PIP Not Supported")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3RcYf":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template.$video;(0,a.def)(e,"loaded",{get:function(){return e.loadedTime/t.duration}}),(0,a.def)(e,"loadedTime",{get:function(){return t.buffered.length?t.buffered.end(t.buffered.length-1):0}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hpdzI:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){(0,a.def)(e,"played",{get:function(){return e.currentTime/e.duration}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dQpMB:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template.$video;(0,a.def)(e,"playing",{get:function(){return"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],i3W5n:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template,r=t.$container,n=t.$player,o=t.$video;(0,a.def)(e,"autoSize",{value:function(){var t=o.videoWidth,i=o.videoHeight,s=(0,a.getRect)(r),l=s.width,c=s.height,u=t/i;l/c>u?((0,a.setStyle)(n,"width","".concat(c*u/l*100,"%")),(0,a.setStyle)(n,"height","100%")):((0,a.setStyle)(n,"width","100%"),(0,a.setStyle)(n,"height","".concat(l/u/c*100,"%"))),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eA2QA:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){(0,a.def)(e,"rect",{get:function(){return(0,a.getRect)(e.template.$player)}});for(var t=["bottom","height","left","right","top","width"],r=0;r');(0,a.append)(d,t.close),r(d,"click",p);var h=(0,a.append)(i,'
'),m=(0,a.append)(h,t.play),v=(0,a.append)(h,t.pause);return r(m,"click",function(){return e.play()}),r(v,"click",function(){return e.pause()}),f(m,v),e.on("video:playing",function(){return f(m,v)}),e.on("video:pause",function(){return f(m,v)}),e.on("video:timeupdate",function(){return f(m,v)}),r(i,"mousedown",function(e){l=0===e.button,c=e.pageX,u=e.pageY}),e.on("document:mousemove",function(e){if(l){(0,a.addClass)(i,"art-mini-droging");var t=e.pageX-c,r=e.pageY-u;(0,a.setStyle)(i,"transform","translate(".concat(t,"px, ").concat(r,"px)"))}}),e.on("document:mouseup",function(){if(l){l=!1,(0,a.removeClass)(i,"art-mini-droging");var e=(0,a.getRect)(i);n.set("left",e.left),n.set("top",e.top),(0,a.setStyle)(i,"left","".concat(e.left,"px")),(0,a.setStyle)(i,"top","".concat(e.top,"px")),(0,a.setStyle)(i,"transform",null)}}),i}(),m=n.get("top"),v=n.get("left");m&&v?((0,a.setStyle)(h,"top","".concat(m,"px")),(0,a.setStyle)(h,"left","".concat(v,"px")),(0,a.isInViewport)(h)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3Bs5U":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template.$poster;(0,a.def)(e,"poster",{get:function(){try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set:function(e){(0,a.setStyle)(t,"backgroundImage","url(".concat(e,")"))}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gRfBQ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template,r=t.$container,n=t.$video;(0,a.def)(e,"autoHeight",{value:function(){var t=r.clientWidth,o=n.videoHeight,i=t/n.videoWidth*o;(0,a.setStyle)(r,"height",i+"px"),e.emit("autoHeight",i)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6gWkU":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template.$player;(0,a.def)(e,"cssVar",{value:function(e,r){return r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6YX9w":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){(0,a.def)(e,"theme",{get:function(){return e.cssVar("--art-theme")},set:function(t){e.cssVar("--art-theme",t)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cBZG8:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){(0,a.def)(e,"type",{get:function(){return e.option.type},set:function(t){e.option.type=t}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bpFKI:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=["mini","pip","fullscreen","fullscreenWeb"];(0,a.def)(e,"state",{get:function(){return t.find(function(t){return e[t]})||"standard"},set:function(r){for(var n=0;n0&&bl.clientWidth-m/2?(0,s.setStyle)(o,"left","".concat(l.clientWidth-m,"px")):(0,s.setStyle)(o,"left","".concat(t-m/2,"px"))}}(b):s.isMobile||(0,s.setStyle)(m,"display","none"),_&&(clearTimeout(u),u=setTimeout(function(){(0,s.setStyle)(m,"display","none")},500)),i.label=3;case 3:return[2]}})}),function(e,r,n){return t.apply(this,arguments)})),(0,s.def)(e,"thumbnails",{get:function(){return e.option.thumbnails},set:function(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(u),u=null,p=null,f=!1,d=!1)}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],PZTTa:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.option,r=e.storage,n=e.template,o=n.$video,i=n.$poster;for(var s in t.moreVideoAttr)e.attr(s,t.moreVideoAttr[s]);t.muted&&(e.muted=t.muted),t.volume&&(o.volume=(0,a.clamp)(t.volume,0,1));var l=r.get("volume");for(var c in"number"==typeof l&&(o.volume=(0,a.clamp)(l,0,1)),t.poster&&(0,a.setStyle)(i,"backgroundImage","url(".concat(t.poster,")")),t.autoplay&&(o.autoplay=t.autoplay),t.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(c,t.cssVar[c]);e.url=t.url}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cKj2D:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return u});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),s=e("../config"),l=o.interopDefault(s),c=e("../utils");function u(e){for(var t,r=e.i18n,n=e.notice,o=e.option,s=e.constructor,u=e.proxy,p=e.template,f=p.$player,d=p.$video,h=p.$poster,m=0,v=0;v=n.CONTROL_HIDE_TIME&&(r.show=!1)}),e.on("control",function(e){e?((0,W.removeClass)(a,"art-hide-cursor"),(0,W.addClass)(a,"art-hover"),r.timer=Date.now()):((0,W.addClass)(a,"art-hide-cursor"),(0,W.removeClass)(a,"art-hover"))}),r.init(),r}return(0,p._)(t,e),(0,l._)(t,[{key:"init",value:function(){var e=this,t=this.art.option;t.isLive||this.add((0,k.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,x.default)({name:"playAndPause",position:"left",index:10})),this.add((0,D.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,I.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,W.sleep)().then(function(){e.art.quality=t.quality}),t.screenshot&&!W.isMobile&&this.add((0,R.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,E.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,b.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,C.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,y.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,v.default)({name:"fullscreen",position:"right",index:70}));for(var r=0;r=Number(a.dataset.index)});c?c.insertAdjacentElement("beforebegin",a):(0,s.append)(this.$parent,a),r.html&&(0,s.append)(a,r.html),r.style&&(0,s.setStyles)(a,r.style),r.tooltip&&(0,s.tooltip)(a,r.tooltip);var f=[];if(r.click){var d=this.art.events.proxy(a,"click",function(e){e.preventDefault(),r.click.call(t.art,t,e)});f.push(d)}return r.selector&&["left","right"].includes(r.position)&&this.selector(r,a,f),this[n]=a,this.cache.set(n,{$ref:a,events:f,option:r}),r.mounted&&r.mounted.call(this.art,a),a}}},{key:"remove",value:function(e){var t=this.cache.get(e);(0,l.errorHandle)(t,"Can't find [".concat(e,"] from the [").concat(this.name,"]")),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(var r=0;r\n
\n
\n
\n
\n
\n
\n\n ',mounted:function(e){var a=null,i=!1,u=(0,s.query)(".art-progress-hover",e),p=(0,s.query)(".art-progress-loaded",e),f=(0,s.query)(".art-progress-played",e),d=(0,s.query)(".art-progress-highlight",e),h=(0,s.query)(".art-progress-indicator",e),m=(0,s.query)(".art-progress-tip",e);function v(r,n){var o=n||l(t,r),a=o.width;m.innerText=o.time;var i=m.clientWidth;a<=i/2?(0,s.setStyle)(m,"left",0):a>e.clientWidth-i/2?(0,s.setStyle)(m,"left","".concat(e.clientWidth-i,"px")):(0,s.setStyle)(m,"left","".concat(a-i/2,"px"))}r.indicator?(0,s.append)(h,r.indicator):(0,s.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,n,o){var i="played"===r&&o&&s.isMobile;"loaded"===r&&(0,s.setStyle)(p,"width","".concat(100*n,"%")),"hover"===r&&(0,s.setStyle)(u,"width","".concat(100*n,"%")),"played"===r&&((0,s.setStyle)(f,"width","".concat(100*n,"%")),(0,s.setStyle)(h,"left","".concat(100*n,"%"))),i&&((0,s.setStyle)(m,"display","flex"),v(o,{width:e.clientWidth*n,time:(0,s.secondToTime)(n*t.duration)}),clearTimeout(a),a=setTimeout(function(){(0,s.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){d.innerText="";for(var e=0;e');(0,s.append)(d,a)}}),t.on("video:progress",function(){t.emit("setBar","loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",function(){t.emit("setBar","played",t.played)}):t.on("video:timeupdate",function(){t.emit("setBar","played",t.played)}),t.on("video:ended",function(){t.emit("setBar","played",1)}),t.emit("setBar","loaded",t.loaded||0),s.isMobile||(o(e,"click",function(e){e.target!==h&&c(t,e)}),o(e,"mousemove",function(r){var n,o,a=l(t,r).percentage;(t.emit("setBar","hover",a,r),(0,s.setStyle)(m,"display","flex"),(0,s.includeFromEvent)(r,d))?(n=l(t,r).width,m.innerText=r.target.dataset.text,n<=(o=m.clientWidth)/2?(0,s.setStyle)(m,"left",0):n>e.clientWidth-o/2?(0,s.setStyle)(m,"left","".concat(e.clientWidth-o,"px")):(0,s.setStyle)(m,"left","".concat(n-o/2,"px"))):v(r)}),o(e,"mouseleave",function(e){(0,s.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),o(e,"mousedown",function(e){i=0===e.button}),t.on("document:mousemove",function(e){if(i){var r=l(t,e),n=r.second,o=r.percentage;t.emit("setBar","played",o,e),t.seek=n}}),t.on("document:mouseup",function(){i&&(i=!1)}))}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l3dNa:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){return(0,i._)((0,a._)({},e),{style:s.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:function(e){function r(){var r="".concat((0,s.secondToTime)(t.currentTime)," / ").concat((0,s.secondToTime)(t.duration));r!==e.innerText&&(e.innerText=r)}r();for(var n=["video:loadedmetadata","video:timeupdate","video:progress"],o=0;o'),l=(0,s.append)(i,'
'),c=(0,s.append)(l,'
'),u=(0,s.append)(l,'
'),p=(0,s.append)(u,'
'),f=(0,s.append)(p,'
'),d=(0,s.append)(u,'
');function h(e){var t=(0,s.getRect)(u),r=t.top,n=t.height;return 1-(e.clientY-r)/n}function m(){if(t.muted||0===t.volume)(0,s.setStyle)(o,"display","none"),(0,s.setStyle)(a,"display","flex"),(0,s.setStyle)(d,"top","100%"),(0,s.setStyle)(f,"top","100%"),c.innerText=0;else{var e=100*t.volume;(0,s.setStyle)(o,"display","flex"),(0,s.setStyle)(a,"display","none"),(0,s.setStyle)(d,"top","".concat(100-e,"%")),(0,s.setStyle)(f,"top","".concat(100-e,"%")),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(o,"click",function(){t.muted=!0}),r(a,"click",function(){t.muted=!1}),s.isMobile)(0,s.setStyle)(i,"display","none");else{var v=!1;r(u,"mousedown",function(e){v=0===e.button,t.volume=h(e)}),t.on("document:mousemove",function(e){v&&(t.muted=!1,t.volume=h(e))}),t.on("document:mouseup",function(){v&&(v=!1)})}}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2XGYu":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){return(0,i._)((0,a._)({},e),{tooltip:t.i18n.get("Show Setting"),mounted:function(e){var r=t.proxy,n=t.icons,o=t.i18n;(0,s.append)(e,n.setting),r(e,"click",function(){t.setting.toggle(),t.setting.resize()}),t.on("setting",function(t){(0,s.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],idjoR:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){return(0,i._)((0,a._)({},e),{tooltip:t.i18n.get("Screenshot"),mounted:function(e){var r=t.proxy,n=t.icons;(0,s.append)(e,n.screenshot),r(e,"click",function(){t.screenshot()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],huCXW:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){return(0,i._)((0,a._)({},e),{tooltip:t.i18n.get("AirPlay"),mounted:function(e){var r=t.proxy,n=t.icons;(0,s.append)(e,n.airplay),r(e,"click",function(){return t.airplay()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5RLZo":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return k});var a=e("@swc/helpers/_/_call_super"),i=e("@swc/helpers/_/_class_call_check"),s=e("@swc/helpers/_/_create_class"),l=e("@swc/helpers/_/_inherits"),c=e("../utils"),u=e("../utils/component"),p=o.interopDefault(u),f=e("./playbackRate"),d=o.interopDefault(f),h=e("./aspectRatio"),m=o.interopDefault(h),v=e("./flip"),g=o.interopDefault(v),y=e("./info"),_=o.interopDefault(y),b=e("./version"),w=o.interopDefault(b),x=e("./close"),j=o.interopDefault(x),k=function(e){"use strict";function t(e){var r;return(0,i._)(this,t),(r=(0,a._)(this,t,[e])).name="contextmenu",r.$parent=e.template.$contextmenu,c.isMobile||r.init(),r}return(0,l._)(t,e),(0,s._)(t,[{key:"init",value:function(){var e=this,t=this.art,r=t.option,n=t.proxy,o=t.template,a=o.$player,i=o.$contextmenu;r.playbackRate&&this.add((0,d.default)({name:"playbackRate",index:10})),r.aspectRatio&&this.add((0,m.default)({name:"aspectRatio",index:20})),r.flip&&this.add((0,g.default)({name:"flip",index:30})),this.add((0,_.default)({name:"info",index:40})),this.add((0,w.default)({name:"version",index:50})),this.add((0,j.default)({name:"close",index:60}));for(var s=0;su+l&&(m=l-h),n+d>p+s&&(v=s-d),(0,c.setStyles)(i,{top:"".concat(v,"px"),left:"".concat(m,"px")})}}),n(a,"click",function(t){(0,c.includeFromEvent)(t,i)||(e.show=!1)}),this.art.on("blur",function(){e.show=!1})}}]),t}(p.default)},{"@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","../utils":"7MU7R","../utils/component":"2dsXg","./playbackRate":"7w1iV","./aspectRatio":"cJDR0","./flip":"cpqHQ","./info":"FMfqg","./version":"a9IHg","./close":"9PxVB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7w1iV":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){var r=t.i18n,n=t.constructor.PLAYBACK_RATE.map(function(e){return'').concat(1===e?r.get("Normal"):e.toFixed(1),"")}).join("");return(0,i._)((0,a._)({},e),{html:"".concat(r.get("Play Speed"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.playbackRate=Number(n),e.show=!1)},mounted:function(e){var r=(0,s.query)('[data-value="1"]',e);r&&(0,s.inverseClass)(r,"art-current"),t.on("video:ratechange",function(){var r=(0,s.queryAll)("span",e).find(function(e){return Number(e.dataset.value)===t.playbackRate});r&&(0,s.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cJDR0:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){var r=t.i18n,n=t.constructor.ASPECT_RATIO.map(function(e){return'').concat("default"===e?r.get("Default"):e,"")}).join("");return(0,i._)((0,a._)({},e),{html:"".concat(r.get("Aspect Ratio"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.aspectRatio=n,e.show=!1)},mounted:function(e){var r=(0,s.query)('[data-value="default"]',e);r&&(0,s.inverseClass)(r,"art-current"),t.on("aspectRatio",function(t){var r=(0,s.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,s.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cpqHQ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){var r=t.i18n,n=t.constructor.FLIP.map(function(e){return'').concat(r.get((0,s.capitalize)(e)),"")}).join("");return(0,i._)((0,a._)({},e),{html:"".concat(r.get("Video Flip"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.flip=n.toLowerCase(),e.show=!1)},mounted:function(e){var r=(0,s.query)('[data-value="normal"]',e);r&&(0,s.inverseClass)(r,"art-current"),t.on("flip",function(t){var r=(0,s.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,s.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],FMfqg:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return s});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props");function s(e){return function(t){return(0,i._)((0,a._)({},e),{html:t.i18n.get("Video Info"),click:function(e){t.info.show=!0,e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],a9IHg:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return s});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props");function s(e){return(0,i._)((0,a._)({},e),{html:'ArtPlayer 5.2.3'})}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9PxVB":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return s});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props");function s(e){return function(t){return(0,i._)((0,a._)({},e),{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6JYu5":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return p});var a=e("@swc/helpers/_/_call_super"),i=e("@swc/helpers/_/_class_call_check"),s=e("@swc/helpers/_/_create_class"),l=e("@swc/helpers/_/_inherits"),c=e("./utils"),u=e("./utils/component"),p=function(e){"use strict";function t(e){var r;return(0,i._)(this,t),(r=(0,a._)(this,t,[e])).name="info",c.isMobile||r.init(),r}return(0,l._)(t,e),(0,s._)(t,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor,o=t.template,a=o.$infoPanel,i=o.$infoClose,s=o.$video;r(i,"click",function(){e.show=!1});var l=null,u=(0,c.queryAll)("[data-video]",a)||[];this.art.on("destroy",function(){return clearTimeout(l)}),!function e(){for(var t=0;t\n ').concat(t.escape?(0,h.escape)(e):e,"\n")}).join("")}).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}},{key:"switch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,a._)(function(){var n,o,a,i,s,l;return(0,d._)(this,function(c){switch(c.label){case 0:return o=(n=r.art).i18n,a=n.notice,i=n.option,s=(0,p._)((0,u._)({},i.subtitle,t),{url:e}),[4,r.init(s)];case 1:return l=c.sent(),t.name&&(a.show="".concat(o.get("Switch Subtitle"),": ").concat(t.name)),[2,l]}})})()}},{key:"createTrack",value:function(e,t){var r=this,n=this.art,o=n.template,a=n.proxy,i=n.option,s=o.$video,l=o.$track,c=(0,h.createElement)("track");c.default=!0,c.kind=e,c.src=t,c.label=i.subtitle.name||"Artplayer",c.track.mode="hidden",c.onload=function(){r.art.emit("subtitleLoad",r.cues,r.option)},this.art.events.remove(this.destroyEvent),l.onload=null,(0,h.remove)(l),(0,h.append)(s,c),o.$track=c,this.destroyEvent=a(this.textTrack,"cuechange",function(){return r.update()})}},{key:"init",value:function(e){var t=this;return(0,a._)(function(){var r,n,o;return(0,d._)(this,function(a){return(n=(r=t.art).notice,o=r.template.$subtitle,t.textTrack)?((0,y.default)(e,b.default.subtitle),e.url)?(t.option=e,t.style(e.style),[2,fetch(e.url).then(function(e){return e.arrayBuffer()}).then(function(t){var r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,h.getExt)(e.url)){case"srt":var n=(0,h.srtToVtt)(r),o=e.onVttLoad(n);return(0,h.vttToBlob)(o);case"ass":var a=(0,h.assToVtt)(r),i=e.onVttLoad(a);return(0,h.vttToBlob)(i);case"vtt":var s=e.onVttLoad(r);return(0,h.vttToBlob)(s);default:return e.url}}).then(function(e){return o.innerHTML="",t.url===e||(URL.revokeObjectURL(t.url),t.createTrack("metadata",e)),e}).catch(function(e){throw o.innerHTML="",n.show=e,e})]):[2]:[2,null]})})()}}]),t}(v.default)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","./utils":"7MU7R","./utils/component":"2dsXg","option-validator":"8OeHO","./scheme":"39ygm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"47RGg":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return M});var a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("./clickInit"),l=o.interopDefault(s),c=e("./hoverInit"),u=o.interopDefault(c),p=e("./moveInit"),f=o.interopDefault(p),d=e("./resizeInit"),h=o.interopDefault(d),m=e("./gestureInit"),v=o.interopDefault(m),g=e("./viewInit"),y=o.interopDefault(g),_=e("./documentInit"),b=o.interopDefault(_),w=e("./updateInit"),x=o.interopDefault(w),j=e("./restoreInit"),k=o.interopDefault(j),M=function(){"use strict";function e(t){(0,a._)(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,l.default)(t,this),(0,u.default)(t,this),(0,f.default)(t,this),(0,h.default)(t,this),(0,v.default)(t,this),(0,y.default)(t,this),(0,b.default)(t,this),(0,x.default)(t,this),(0,k.default)(t,this)}return(0,i._)(e,[{key:"proxy",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Array.isArray(t))return t.map(function(t){return n.proxy(e,t,r,o)});e.addEventListener(t,r,o);var a=function(){return e.removeEventListener(t,r,o)};return this.destroyEvents.push(a),a}},{key:"hover",value:function(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}},{key:"remove",value:function(e){var t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}},{key:"destroy",value:function(){for(var e=0;eMath.abs(a)&&2>Math.abs(o))return i;var s=180*Math.atan2(o,a)/Math.PI;return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}(c,u,o,i),d=[3,4].includes(f),h=[1,2].includes(f);if(d&&!e.isRotate||h&&e.isRotate){var m=(0,a.clamp)((o-c)/e.width,-1,1),v=(0,a.clamp)((i-u)/e.height,-1,1),g=e.isRotate?v:m,y=s===n?e.constructor.TOUCH_MOVE_RATIO:1,_=(0,a.clamp)(p+e.duration*g*y,0,e.duration);e.seek=_,e.emit("setBar","played",(0,a.clamp)(_/e.duration,0,1),t),e.notice.show="".concat((0,a.secondToTime)(_)," / ").concat((0,a.secondToTime)(e.duration))}}};e.option.gesture&&(t.proxy(n,"touchstart",function(e){s=n,f(e)}),t.proxy(n,"touchmove",d)),t.proxy(o,"touchstart",function(e){s=o,f(e)}),t.proxy(o,"touchmove",d),t.proxy(document,"touchend",function(){l&&(c=0,u=0,p=0,l=!1,s=null)})}}},{"../utils":"7MU7R","../control/progress":"fVfii","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jT4ny:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e,t){var r=e.option,n=e.constructor,o=e.template.$container,i=(0,a.throttle)(function(){e.emit("view",(0,a.isInViewport)(o,n.SCROLL_GAP))},n.SCROLL_TIME);t.proxy(window,"scroll",function(){return i()}),e.on("view",function(t){r.autoMini&&(e.mini=!t)})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],qu07O:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){t.proxy(document,"mousemove",function(t){e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",function(t){e.emit("document:mouseup",t)})}o.defineInteropFlag(r),o.export(r,"default",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9LDSG":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){if(e.constructor.USE_RAF){var t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",function(){cancelAnimationFrame(t)})}}o.defineInteropFlag(r),o.export(r,"default",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1G60N":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){}o.defineInteropFlag(r),o.export(r,"default",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gszG1:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("./utils"),l=function(){"use strict";function e(t){(0,a._)(this,e),this.art=t,this.keys={},t.option.hotkey&&!s.isMobile&&this.init()}return(0,i._)(e,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor;this.add("Escape",function(){e.art.fullscreenWeb&&(e.art.fullscreenWeb=!1)}),this.add("Space",function(){e.art.toggle()}),this.add("ArrowLeft",function(){e.art.backward=n.SEEK_STEP}),this.add("ArrowUp",function(){e.art.volume+=n.VOLUME_STEP}),this.add("ArrowRight",function(){e.art.forward=n.SEEK_STEP}),this.add("ArrowDown",function(){e.art.volume-=n.VOLUME_STEP}),r(document,"keydown",function(t){if(e.art.isFocus){var r=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==n&&"true"!==n&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){var o=e.keys[t.code];if(o){t.preventDefault();for(var a=0;a'},{}],ggvk3:[function(e,t,r,n){t.exports=''},{}],"60rtF":[function(e,t,r,n){t.exports=''},{}],"037y5":[function(e,t,r,n){t.exports=''},{}],i01AK:[function(e,t,r,n){t.exports=''},{}],bJChL:[function(e,t,r,n){t.exports=''},{}],bT9yN:[function(e,t,r,n){t.exports=''},{}],iYuuV:[function(e,t,r,n){t.exports=''},{}],"32gKF":[function(e,t,r,n){t.exports=''},{}],b9RG2:[function(e,t,r,n){t.exports=''},{}],fh6Ah:[function(e,t,r,n){t.exports=''},{}],"8KYz9":[function(e,t,r,n){t.exports=''},{}],"1bagN":[function(e,t,r,n){t.exports=''},{}],fRhwm:[function(e,t,r,n){t.exports=''},{}],"4tFZV":[function(e,t,r,n){t.exports=''},{}],a8x3K:[function(e,t,r,n){t.exports=''},{}],e0utR:[function(e,t,r,n){t.exports=''},{}],"69Sc6":[function(e,t,r,n){t.exports=''},{}],"72xuc":[function(e,t,r,n){t.exports=''},{}],"85cgQ":[function(e,t,r,n){t.exports=''},{}],"1Qm4Q":[function(e,t,r,n){t.exports=''},{}],fpGzT:[function(e,t,r,n){t.exports=''},{}],jlMSj:[function(e,t,r,n){t.exports=''},{}],"7sEdH":[function(e,t,r,n){t.exports=''},{}],eHsVM:[function(e,t,r,n){t.exports=''},{}],"2f6qz":[function(e,t,r,n){t.exports=''},{}],cy2gj:[function(e,t,r,n){t.exports=''},{}],hGnnd:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return j});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_call_super"),s=e("@swc/helpers/_/_class_call_check"),l=e("@swc/helpers/_/_create_class"),c=e("@swc/helpers/_/_inherits"),u=e("@swc/helpers/_/_to_consumable_array"),p=e("@swc/helpers/_/_ts_generator"),f=e("./flip"),d=o.interopDefault(f),h=e("./aspectRatio"),m=o.interopDefault(h),v=e("./playbackRate"),g=o.interopDefault(v),y=e("./subtitleOffset"),_=o.interopDefault(y),b=e("../utils/component"),w=o.interopDefault(b),x=e("../utils"),j=function(e){"use strict";function t(e){(0,s._)(this,t);var r=(0,i._)(this,t,[e]),n=e.option,o=e.controls,a=e.template.$setting;return r.name="setting",r.$parent=a,r.id=0,r.active=null,r.cache=new Map,r.option=(0,u._)(r.builtin).concat((0,u._)(n.settings)),n.setting&&(r.format(),r.render(),e.on("blur",function(){r.show&&(r.show=!1,r.render())}),e.on("focus",function(e){var t=(0,x.includeFromEvent)(e,o.setting),n=(0,x.includeFromEvent)(e,r.$parent);!r.show||t||n||(r.show=!1,r.render())}),e.on("resize",function(){return r.resize()})),r}return(0,c._)(t,e),(0,l._)(t,[{key:"builtin",get:function(){var e=[],t=this.art.option;return t.playbackRate&&e.push((0,g.default)(this.art)),t.aspectRatio&&e.push((0,m.default)(this.art)),t.flip&&e.push((0,d.default)(this.art)),t.subtitleOffset&&e.push((0,_.default)(this.art)),e}},{key:"traverse",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option,r=0;r0&&void 0!==arguments[0]?arguments[0]:this.option,r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=0;a0&&void 0!==arguments[0]?arguments[0]:"",t=null;return this.traverse(function(r){r.name===e&&(t=r)}),t}},{key:"resize",value:function(){var e=this.art,t=e.controls,r=e.constructor,n=r.SETTING_WIDTH,o=r.SETTING_ITEM_HEIGHT,a=e.template,i=a.$player,s=a.$setting;if(t.setting&&this.show){var l,c,u=(null==(c=this.active[0])||null==(l=c.$parent)?void 0:l.width)||n,p=(0,x.getRect)(t.setting),f=p.left,d=p.width,h=(0,x.getRect)(i),m=h.left,v=h.width,g=f-m+d/2-u/2,y=this.active===this.option?this.active.length*o:(this.active.length+1)*o;if((0,x.setStyle)(s,"height","".concat(y,"px")),(0,x.setStyle)(s,"width","".concat(u,"px")),this.art.isRotate||x.isMobile)return;g+u>v?((0,x.setStyle)(s,"left",null),(0,x.setStyle)(s,"right",null)):((0,x.setStyle)(s,"left","".concat(g,"px")),(0,x.setStyle)(s,"right","auto"))}}},{key:"inactivate",value:function(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:this.option;return t.push(e),this.format(),this.creatItem(e),this.render(),e}},{key:"creatHeader",value:function(e){var t=this;if(this.cache.has(e.$option)){var r=this.cache.get(e.$option),n=this.art,o=n.proxy,a=n.icons.arrowLeft,i=n.constructor.SETTING_ITEM_HEIGHT,s=(0,x.createElement)("div");(0,x.setStyle)(s,"height","".concat(i,"px")),(0,x.addClass)(s,"art-setting-item"),(0,x.addClass)(s,"art-setting-item-back");var l=(0,x.append)(s,'
'),c=(0,x.createElement)("div");(0,x.addClass)(c,"art-setting-item-left-icon"),(0,x.append)(c,a),(0,x.append)(l,c),(0,x.append)(l,e.$parent.html);var u=o(s,"click",function(){return t.render(e.$parents)});e.$parent.$events.push(u),(0,x.append)(r,s)}}},{key:"creatItem",value:function(e){var t,r,n=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.cache.has(e.$option)){var i=this.cache.get(e.$option),s=e.$item,l="selector";(0,x.has)(e,"switch")&&(l="switch"),(0,x.has)(e,"range")&&(l="range"),(0,x.has)(e,"onClick")&&(l="button");var c=this.art,f=c.icons,d=c.proxy,h=c.constructor,m=(0,x.createElement)("div");(0,x.addClass)(m,"art-setting-item"),(0,x.setStyle)(m,"height","".concat(h.SETTING_ITEM_HEIGHT,"px")),m.dataset.name=e.name||"",m.dataset.value=e.value||"";var v=(0,x.append)(m,'
'),g=(0,x.append)(m,'
'),y=(0,x.createElement)("div");switch((0,x.addClass)(y,"art-setting-item-left-icon"),l){case"button":case"switch":case"range":(0,x.append)(y,e.icon||f.config);break;case"selector":(null==(t=e.selector)?void 0:t.length)?(0,x.append)(y,e.icon||f.config):(0,x.append)(y,f.check)}(0,x.append)(v,y),(0,x.def)(e,"$icon",{configurable:!0,get:function(){return y}}),(0,x.def)(e,"icon",{configurable:!0,get:function(){return y.innerHTML},set:function(e){y.innerHTML="",(0,x.append)(y,e)}});var _=(0,x.createElement)("div");(0,x.addClass)(_,"art-setting-item-left-text"),(0,x.append)(_,e.html||""),(0,x.append)(v,_),(0,x.def)(e,"$html",{configurable:!0,get:function(){return _}}),(0,x.def)(e,"html",{configurable:!0,get:function(){return _.innerHTML},set:function(e){_.innerHTML="",(0,x.append)(_,e)}});var b=(0,x.createElement)("div");switch((0,x.addClass)(b,"art-setting-item-right-tooltip"),(0,x.append)(b,e.tooltip||""),(0,x.append)(g,b),(0,x.def)(e,"$tooltip",{configurable:!0,get:function(){return b}}),(0,x.def)(e,"tooltip",{configurable:!0,get:function(){return b.innerHTML},set:function(e){b.innerHTML="",(0,x.append)(b,e)}}),l){case"switch":var w=(0,x.createElement)("div");(0,x.addClass)(w,"art-setting-item-right-icon");var j=(0,x.append)(w,f.switchOn),k=(0,x.append)(w,f.switchOff);(0,x.setStyle)(e.switch?k:j,"display","none"),(0,x.append)(g,w),(0,x.def)(e,"$switch",{configurable:!0,get:function(){return w}});var M=e.switch;(0,x.def)(e,"switch",{configurable:!0,get:function(){return M},set:function(e){M=e,e?((0,x.setStyle)(k,"display","none"),(0,x.setStyle)(j,"display",null)):((0,x.setStyle)(k,"display",null),(0,x.setStyle)(j,"display","none"))}});break;case"range":var I=(0,x.createElement)("div");(0,x.addClass)(I,"art-setting-item-right-icon");var S=(0,x.append)(I,'');S.value=e.range[0],S.min=e.range[1],S.max=e.range[2],S.step=e.range[3],(0,x.addClass)(S,"art-setting-range"),(0,x.append)(g,I),(0,x.def)(e,"$range",{configurable:!0,get:function(){return S}});var D=(0,u._)(e.range);(0,x.def)(e,"range",{configurable:!0,get:function(){return D},set:function(e){D=(0,u._)(e),S.value=e[0],S.min=e[1],S.max=e[2],S.step=e[3]}});break;case"selector":if(null==(r=e.selector)?void 0:r.length){var T=(0,x.createElement)("div");(0,x.addClass)(T,"art-setting-item-right-icon"),(0,x.append)(T,f.arrowRight),(0,x.append)(g,T)}}switch(l){case"switch":if(e.onSwitch){var E,F=this,R=d(m,"click",(E=(0,a._)(function(t){return(0,p._)(this,function(r){switch(r.label){case 0:return[4,e.onSwitch.call(F.art,e,m,t)];case 1:return e.switch=r.sent(),[2]}})}),function(e){return E.apply(this,arguments)}));e.$events.push(R)}break;case"range":if(e.$range){if(e.onRange){var O,C=this,W=d(e.$range,"change",(O=(0,a._)(function(t){return(0,p._)(this,function(r){switch(r.label){case 0:return e.range[0]=e.$range.valueAsNumber,[4,e.onRange.call(C.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return O.apply(this,arguments)}));e.$events.push(W)}if(e.onChange){var A,P=this,$=d(e.$range,"input",(A=(0,a._)(function(t){return(0,p._)(this,function(r){switch(r.label){case 0:return e.range[0]=e.$range.valueAsNumber,[4,e.onChange.call(P.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return A.apply(this,arguments)}));e.$events.push($)}}break;case"selector":var L,z=this,H=d(m,"click",(L=(0,a._)(function(t){var r,n;return(0,p._)(this,function(o){switch(o.label){case 0:if(!(null==(r=e.selector)?void 0:r.length))return[3,1];return z.render(e.selector),[3,3];case 1:if(z.check(e),!e.$parent.onSelect)return[3,3];return n=e.$parent,[4,e.$parent.onSelect.call(z.art,e,m,t)];case 2:n.tooltip=o.sent(),o.label=3;case 3:return[2]}})}),function(e){return L.apply(this,arguments)}));e.$events.push(H),e.default&&(0,x.addClass)(m,"art-current");break;case"button":if(e.onClick){var N,U=this,V=d(m,"click",(N=(0,a._)(function(t){return(0,p._)(this,function(r){switch(r.label){case 0:return[4,e.onClick.call(U.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return N.apply(this,arguments)}));e.$events.push(V)}}(0,x.def)(e,"$item",{configurable:!0,get:function(){return m}}),o?(0,x.replaceElement)(m,s):(0,x.append)(i,m),e.mounted&&setTimeout(function(){return e.mounted.call(n.art,e.$item,e)},0)}}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option;if(this.active=e,this.cache.has(e)){var t=this.cache.get(e);(0,x.inverseClass)(t,"art-current")}else{var r,n=(0,x.createElement)("div");this.cache.set(e,n),(0,x.addClass)(n,"art-setting-panel"),(0,x.append)(this.$parent,n),(0,x.inverseClass)(n,"art-current"),(null==(r=e[0])?void 0:r.$parent)&&this.creatHeader(e[0]);for(var o=0;oa&&cu)&&setTimeout(function(){(0,s.setStyle)(o,"width","".concat(u,"px")),(0,s.setStyle)(o,"height","".concat(c,"px")),(0,s.setStyle)(o,"transform-origin","0 0"),(0,s.setStyle)(o,"transform","rotate(90deg) translate(0, -".concat(c,"px)")),(0,s.addClass)(o,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},r.AUTO_ORIENTATION_TIME)}else(0,s.hasClass)(o,"art-auto-orientation")&&((0,s.removeClass)(o,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",(t=(0,a._)(function(e){var t,r,n,a,c,u,p,f,d;return(0,i._)(this,function(i){switch(i.label){case 0:if(!(null==(r=screen)||null==(t=r.orientation)?void 0:t.lock))return[2];if(n=screen.orientation.type,!e)return[3,3];if(a=l.videoWidth,c=l.videoHeight,p=(u=document.documentElement).clientWidth,f=u.clientHeight,!(a>c&&pf))return[3,2];return d=n.startsWith("portrait")?"landscape":"portrait",[4,screen.orientation.lock(d)];case 1:i.sent(),(0,s.addClass)(o,"art-auto-orientation-fullscreen"),i.label=2;case 2:return[3,5];case 3:if(!(0,s.hasClass)(o,"art-auto-orientation-fullscreen"))return[3,5];return[4,screen.orientation.lock(n)];case 4:i.sent(),(0,s.removeClass)(o,"art-auto-orientation-fullscreen"),i.label=5;case 5:return[2]}})}),function(e){return t.apply(this,arguments)})),{name:"autoOrientation",get state(){return(0,s.hasClass)(o,"art-auto-orientation")}}}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bfOeF:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.i18n,r=e.icons,n=e.storage,o=e.constructor,i=e.proxy,s=e.template.$poster,l=e.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),c=(0,a.query)(".art-auto-playback-last",l),u=(0,a.query)(".art-auto-playback-jump",l),p=(0,a.query)(".art-auto-playback-close",l);(0,a.append)(p,r.close);var f=null;function d(){var r=(n.get("times")||{})[e.option.id||e.option.url];clearTimeout(f),(0,a.setStyle)(l,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&((0,a.setStyle)(l,"display","flex"),c.innerText="".concat(t.get("Last Seen")," ").concat((0,a.secondToTime)(r)),u.innerText=t.get("Jump Play"),i(p,"click",function(){(0,a.setStyle)(l,"display","none")}),i(u,"click",function(){e.seek=r,e.play(),(0,a.setStyle)(s,"display","none"),(0,a.setStyle)(l,"display","none")}),e.once("video:timeupdate",function(){f=setTimeout(function(){(0,a.setStyle)(l,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",function(){if(e.playing){var t=n.get("times")||{},r=Object.keys(t);r.length>o.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,n.set("times",t)}}),e.on("ready",d),e.on("restart",d),{name:"auto-playback",get times(){return n.get("times")||{}},clear:function(){return n.del("times")},delete:function(e){var t=n.get("times")||{};return delete t[e],n.set("times",t),t}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],giGC3:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.constructor,r=e.proxy,n=e.template,o=n.$player,i=n.$video,s=null,l=!1,c=1,u=function(){clearTimeout(s),l&&(l=!1,e.playbackRate=c,(0,a.removeClass)(o,"art-fast-forward"))};return r(i,"touchstart",function(r){1===r.touches.length&&e.playing&&!e.isLock&&(s=setTimeout(function(){l=!0,c=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,a.addClass)(o,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",u),r(document,"touchend",u),{name:"fastForward",get state(){return(0,a.hasClass)(o,"art-fast-forward")}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],e0Ov6:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.layers,r=e.icons,n=e.template.$player;function o(){return(0,a.hasClass)(n,"art-lock")}function i(){(0,a.addClass)(n,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,a.removeClass)(n,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted:function(t){var n=(0,a.append)(t,r.lock),o=(0,a.append)(t,r.unlock);(0,a.setStyle)(n,"display","none"),e.on("lock",function(e){e?((0,a.setStyle)(n,"display","inline-flex"),(0,a.setStyle)(o,"display","none")):((0,a.setStyle)(n,"display","none"),(0,a.setStyle)(o,"display","inline-flex"))})},click:function(){o()?s():i()}}),{name:"lock",get state(){return o()},set state(value){value?i():s()}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["4Be4O"],"4Be4O","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/docs/document/404.html b/docs/document/404.html index 972f33c19..6f0aa556e 100644 --- a/docs/document/404.html +++ b/docs/document/404.html @@ -5,10 +5,11 @@ 404 | Artplayer.js - - + + + - + @@ -20,7 +21,7 @@
- + \ No newline at end of file diff --git a/docs/document/advanced/built-in.html b/docs/document/advanced/built-in.html index a66fdd4c8..fed630ee3 100644 --- a/docs/document/advanced/built-in.html +++ b/docs/document/advanced/built-in.html @@ -5,14 +5,15 @@ 高级属性 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

高级属性 ​

这里的 高级属性 是指挂载在 实例 的 二级属性,比较少用

option ​

播放器的选项

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

高级属性 ​

这里的 高级属性 是指挂载在 实例 的 二级属性,比较少用

option ​

播放器的选项

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -204,8 +205,8 @@
 
 art.on('ready', () => {
     art.plugins.add(myPlugin);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/advanced/class.html b/docs/document/advanced/class.html index 7e8425e42..1d045a4fa 100644 --- a/docs/document/advanced/class.html +++ b/docs/document/advanced/class.html @@ -5,14 +5,15 @@ 静态属性 | Artplayer.js - - + + + - + - - - + + + @@ -22,15 +23,15 @@ -
Skip to content

静态属性 ​

这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用

instances ​

返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性

▶ Run Code
js
console.info([...Artplayer.instances]);
+    
Skip to content

静态属性 ​

这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用

instances ​

返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性

▶ Run Code
js
console.info([...Artplayer.instances]);
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-console.info([...Artplayer.instances]);

version ​

返回播放器的版本信息

▶ Run Code
js
console.info(Artplayer.version);

env ​

返回播放器的环境变量

▶ Run Code
js
console.info(Artplayer.env);

build ​

返回播放器的打包时间

▶ Run Code
js
console.info(Artplayer.build);

config ​

返回视频的默认配置

▶ Run Code
js
console.info(Artplayer.config);

utils ​

返回播放器的工具函数集合

▶ Run Code
js
console.info(Artplayer.utils);

全部工具函数请参考以下地址:

artplayer/types/utils.d.ts

scheme ​

返回播放器选项的校验方案

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

返回事件分发器的构造函数

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

返回选项的校验函数

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

返回类型检测的函数工具

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

返回播放器所需的 html 字符串

▶ Run Code
js
console.info(Artplayer.html);

option ​

返回播放器的默认选项

▶ Run Code
js
console.info(Artplayer.option);
- +console.info([...Artplayer.instances]);

version ​

返回播放器的版本信息

▶ Run Code
js
console.info(Artplayer.version);

env ​

返回播放器的环境变量

▶ Run Code
js
console.info(Artplayer.env);

build ​

返回播放器的打包时间

▶ Run Code
js
console.info(Artplayer.build);

config ​

返回视频的默认配置

▶ Run Code
js
console.info(Artplayer.config);

utils ​

返回播放器的工具函数集合

▶ Run Code
js
console.info(Artplayer.utils);

全部工具函数请参考以下地址:

artplayer/types/utils.d.ts

scheme ​

返回播放器选项的校验方案

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

返回事件分发器的构造函数

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

返回选项的校验函数

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

返回类型检测的函数工具

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

返回播放器所需的 html 字符串

▶ Run Code
js
console.info(Artplayer.html);

option ​

返回播放器的默认选项

▶ Run Code
js
console.info(Artplayer.option);
+ \ No newline at end of file diff --git a/docs/document/advanced/event.html b/docs/document/advanced/event.html index 475a58806..43ed805c5 100644 --- a/docs/document/advanced/event.html +++ b/docs/document/advanced/event.html @@ -5,14 +5,15 @@ 实例事件 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

实例事件 ​

播放器的事件分为两种,一种视频的 原生事件 (前缀 video:),另外一种是 自定义事件

监听事件:

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

实例事件 ​

播放器的事件分为两种,一种视频的 原生事件 (前缀 video:),另外一种是 自定义事件

监听事件:

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -383,8 +384,8 @@
 
 art.on('keydown', (event) => {
     console.log(event.code);
-});

video:canplay ​

浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容

video:canplaythrough ​

浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束

video:complete ​

OfflineAudioContext 渲染完成

video:durationchange ​

duration 属性的值改变时触发

video:emptied ​

媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载它

video:ended ​

视频停止播放,因为 media 已经到达结束点

video:error ​

获取媒体数据时出错,或者资源类型不是受支持的媒体格式

video:loadeddata ​

media 中的首帧已经完成加载

video:loadedmetadata ​

已加载元数据

video:pause ​

播放已暂停

video:play ​

播放已开始

video:playing ​

由于缺乏数据而暂停或延迟后,播放准备开始

video:progress ​

在浏览器加载资源时周期性触发

video:ratechange ​

播放速率发生变化

video:seeked ​

跳帧(seek)操作完成

video:seeking ​

跳帧(seek)操作开始

video:stalled ​

用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现

video:suspend ​

媒体数据加载已暂停

video:timeupdate ​

currentTime 属性指定的时间发生变化

video:volumechange ​

音量发生变化

video:waiting ​

由于暂时缺少数据,播放已停止

- +});

video:canplay ​

浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容

video:canplaythrough ​

浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束

video:complete ​

OfflineAudioContext 渲染完成

video:durationchange ​

duration 属性的值改变时触发

video:emptied ​

媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载它

video:ended ​

视频停止播放,因为 media 已经到达结束点

video:error ​

获取媒体数据时出错,或者资源类型不是受支持的媒体格式

video:loadeddata ​

media 中的首帧已经完成加载

video:loadedmetadata ​

已加载元数据

video:pause ​

播放已暂停

video:play ​

播放已开始

video:playing ​

由于缺乏数据而暂停或延迟后,播放准备开始

video:progress ​

在浏览器加载资源时周期性触发

video:ratechange ​

播放速率发生变化

video:seeked ​

跳帧(seek)操作完成

video:seeking ​

跳帧(seek)操作开始

video:stalled ​

用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现

video:suspend ​

媒体数据加载已暂停

video:timeupdate ​

currentTime 属性指定的时间发生变化

video:volumechange ​

音量发生变化

video:waiting ​

由于暂时缺少数据,播放已停止

+ \ No newline at end of file diff --git a/docs/document/advanced/global.html b/docs/document/advanced/global.html index 234913137..e01ecf8f1 100644 --- a/docs/document/advanced/global.html +++ b/docs/document/advanced/global.html @@ -5,14 +5,15 @@ 全局属性 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

全局属性 ​

这里的 全局属性 也是指挂载在 构造函数 的 一级属性,属性名字全部都是大写的形式,未来容易发生变动,基本上用不到

DEBUG ​

是否开始 debug 模式,可以打印出视频全部的内置事件,默认关闭

▶ Run Code
js
Artplayer.DEBUG = true;
+    
Skip to content

全局属性 ​

这里的 全局属性 也是指挂载在 构造函数 的 一级属性,属性名字全部都是大写的形式,未来容易发生变动,基本上用不到

DEBUG ​

是否开始 debug 模式,可以打印出视频全部的内置事件,默认关闭

▶ Run Code
js
Artplayer.DEBUG = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -238,8 +239,8 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/advanced/plugin.html b/docs/document/advanced/plugin.html index 39fbd11dc..ff8e3f4d4 100644 --- a/docs/document/advanced/plugin.html +++ b/docs/document/advanced/plugin.html @@ -5,14 +5,15 @@ 编写插件 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

编写插件 ​

但你已经知道播放器的属性, 方法和事件后,再编写插件是非常简单的事

可以在实例化的时候加载插件的函数

▶ Run Code
js
function myPlugin(art) {
+    
Skip to content

编写插件 ​

但你已经知道播放器的属性, 方法和事件后,再编写插件是非常简单的事

可以在实例化的时候加载插件的函数

▶ Run Code
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -120,8 +121,8 @@
             url: '/assets/sample/layer.png'
         })
     ],
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/advanced/property.html b/docs/document/advanced/property.html index 2107ad029..045df7663 100644 --- a/docs/document/advanced/property.html +++ b/docs/document/advanced/property.html @@ -5,14 +5,15 @@ 实例属性 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

实例属性 ​

这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用

play ​

  • Type: Function

播放视频

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

实例属性 ​

这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用

play ​

  • Type: Function

播放视频

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -425,8 +426,8 @@
 
 art.on('ready', () => {
     art.subtitleOffset = 1;
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/assets/advanced_built-in.md.Bo4XQb8X.lean.js b/docs/document/assets/advanced_built-in.md.Bo4XQb8X.lean.js deleted file mode 100644 index 90af2ff59..000000000 --- a/docs/document/assets/advanced_built-in.md.Bo4XQb8X.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const K=JSON.parse('{"title":"高级属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/built-in.md","filePath":"advanced/built-in.md","lastUpdated":1726997712000}'),p={name:"advanced/built-in.md"},e=s("",4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",4),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",5),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",5),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s("",2),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s("",3),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s("",5),F=i("div",{className:"run-code"},"▶ Run Code",-1),m=s("",4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s("",5),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s("",5),B=i("div",{className:"run-code"},"▶ Run Code",-1),T=s("",5),D=i("div",{className:"run-code"},"▶ Run Code",-1),w=s("",5),P=i("div",{className:"run-code"},"▶ Run Code",-1),S=s("",4),f=i("div",{className:"run-code"},"▶ Run Code",-1),x=s("",4),N=i("div",{className:"run-code"},"▶ Run Code",-1),R=s("",5),I=i("div",{className:"run-code"},"▶ Run Code",-1),V=s("",4),j=i("div",{className:"run-code"},"▶ Run Code",-1),q=s("",4),O=i("div",{className:"run-code"},"▶ Run Code",-1),M=s("",1),$=[e,h,t,k,r,E,d,c,o,g,y,b,u,F,m,_,C,v,A,B,T,D,w,P,S,f,x,N,R,I,V,j,q,O,M];function z(G,L,W,J,U,Y){return l(),n("div",null,$)}const Q=a(p,[["render",z]]);export{K as __pageData,Q as default}; diff --git a/docs/document/assets/advanced_built-in.md.Bo4XQb8X.js b/docs/document/assets/advanced_built-in.md.xIN6yJEQ.js similarity index 83% rename from docs/document/assets/advanced_built-in.md.Bo4XQb8X.js rename to docs/document/assets/advanced_built-in.md.xIN6yJEQ.js index ad9d2c159..2619b1fe6 100644 --- a/docs/document/assets/advanced_built-in.md.Bo4XQb8X.js +++ b/docs/document/assets/advanced_built-in.md.xIN6yJEQ.js @@ -1,15 +1,15 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const K=JSON.parse('{"title":"高级属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/built-in.md","filePath":"advanced/built-in.md","lastUpdated":1726997712000}'),p={name:"advanced/built-in.md"},e=s('

高级属性 ​

这里的 高级属性 是指挂载在 实例 的 二级属性,比较少用

option ​

播放器的选项

',4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"高级属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/built-in.md","filePath":"advanced/built-in.md","lastUpdated":1726997712000}'),e={name:"advanced/built-in.md"};function h(t,a,k,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s('

高级属性 ​

这里的 高级属性 是指挂载在 实例 的 二级属性,比较少用

option ​

播放器的选项

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-console.info(art.option);

提示

假如直接修改这个 option 对象,播放器不会马上做出响应

template ​

管理播放器所有的 DOM 元素

`,4),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s(`
js
var art = new Artplayer({
+console.info(art.option);

提示

假如直接修改这个 option 对象,播放器不会马上做出响应

template ​

管理播放器所有的 DOM 元素

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 console.info(art.template);
-console.info(art.template.$video);

提示

为了方便区别 DOM 元素和普通对象,播放器里的所有 DOM 元素都是以 $ 开头命名的

这是所有 DOM 元素的定义:artplayer/types/template.d.ts

events ​

管理播放器所有的 DOM 事件,实质上是代理了 addEventListener 和 removeEventListener, 当使用以下方法来处理事件,播放器销毁时也会自动销毁该事件

  • proxy 方法用于代理 DOM 事件
  • hover 方法用于代理自定义的 hover 事件
`,5),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var container = document.querySelector('.artplayer-app');
+console.info(art.template.$video);

提示

为了方便区别 DOM 元素和普通对象,播放器里的所有 DOM 元素都是以 $ 开头命名的

这是所有 DOM 元素的定义:artplayer/types/template.d.ts

events ​

管理播放器所有的 DOM 事件,实质上是代理了 addEventListener 和 removeEventListener, 当使用以下方法来处理事件,播放器销毁时也会自动销毁该事件

  • proxy 方法用于代理 DOM 事件
  • hover 方法用于代理自定义的 hover 事件
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var container = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
     container: container,
@@ -24,7 +24,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info('mouseenter', event);
 }, (event) => {
     console.info('mouseleave', event);
-});

提示

假如你需要一些 DOM 事件只存在于播放器的生命周期上时,强烈建议使用这些函数,以避免造成内存泄漏

storage ​

管理播放器的本地存储

  • name 属性用于设置缓存的 key
  • set 方法用于设置缓存
  • get 方法用于获取缓存
  • del 方法用于删除缓存
  • clear 方法用于清空缓存
`,5),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s(`
js
var art = new Artplayer({
+});

提示

假如你需要一些 DOM 事件只存在于播放器的生命周期上时,强烈建议使用这些函数,以避免造成内存泄漏

storage ​

管理播放器的本地存储

  • name 属性用于设置缓存的 key
  • set 方法用于设置缓存
  • get 方法用于获取缓存
  • del 方法用于删除缓存
  • clear 方法用于清空缓存
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -33,18 +33,18 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 const test = art.storage.get('test');
 console.info(test);
 art.storage.del('test');
-art.storage.clear();

提示

默认所有播放器实例都是共享同一个 localStorage 的,而且默认的 key 是 artplayer_settings

如果你想不同的播放器使用不同的 localStorage,你可以修改 art.storage.name 即可

`,2),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s(`
js
var art = new Artplayer({
+art.storage.clear();

提示

默认所有播放器实例都是共享同一个 localStorage 的,而且默认的 key 是 artplayer_settings

如果你想不同的播放器使用不同的 localStorage,你可以修改 art.storage.name 即可

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.storage.name = 'your-storage-key';
-art.storage.set('test', { foo: 'bar' });

icons ​

管理播放器所有的 svg 图标

`,3),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s(`
js
var art = new Artplayer({
+art.storage.set('test', { foo: 'bar' });

icons ​

管理播放器所有的 svg 图标

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-console.info(art.icons.loading);

这是所有图标的定义:

artplayer/types/icons.d.ts

i18n ​

管理播放器的 i18n

  • get 方法用于获取 i18n 的值
  • update 方法用于更新 i18n 对象
`,5),F=i("div",{className:"run-code"},"▶ Run Code",-1),m=s(`
js
var art = new Artplayer({
+console.info(art.icons.loading);

这是所有图标的定义:

artplayer/types/icons.d.ts

i18n ​

管理播放器的 i18n

  • get 方法用于获取 i18n 的值
  • update 方法用于更新 i18n 对象
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -55,14 +55,14 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     'zh-cn': {
         Play: 'Your Play'
     }
-});

WARNING

使用 art.i18n.update 只能更新实例化之后的 i18n,假如想在实例化之前更新 i18n,请使用基础选项的 i18n 来更新

notice ​

管理播放器的提示语,只有一个 show 属性用于显示提示语

`,4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s(`
js
var art = new Artplayer({
+});

WARNING

使用 art.i18n.update 只能更新实例化之后的 i18n,假如想在实例化之前更新 i18n,请使用基础选项的 i18n 来更新

notice ​

管理播放器的提示语,只有一个 show 属性用于显示提示语

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.notice.show = 'Video Ready To Play';
-})

WARNING

如果想马上隐藏 notice 的显示:art.notice.show = '';

layers ​

管理播放器的层

  • add 方法用于动态添加层
  • remove 方法用于动态删除层
  • update 方法用于动态更新层
  • show 属性用于设置是否显示全部层
  • toggle 方法用于切换是否显示全部层
`,5),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s(`
js
var art = new Artplayer({
+})

WARNING

如果想马上隐藏 notice 的显示:art.notice.show = '';

layers ​

管理播放器的层

  • add 方法用于动态添加层
  • remove 方法用于动态删除层
  • update 方法用于动态更新层
  • show 属性用于设置是否显示全部层
  • toggle 方法用于切换是否显示全部层
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -75,7 +75,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.layers.show = false;
 	}, 1000);
-});

组件配置 请参考以下地址:

/component/layers.html

controls ​

管理播放器的控制器

  • add 方法用于动态添加控制器
  • remove 方法用于动态删除控制器
  • update 方法用于动态更新控制器
  • show 属性用于设置是否显示全部控制器
  • toggle 方法用于切换是否显示全部控制器
`,5),B=i("div",{className:"run-code"},"▶ Run Code",-1),T=s(`
js
var art = new Artplayer({
+});

组件配置 请参考以下地址:

/component/layers.html

controls ​

管理播放器的控制器

  • add 方法用于动态添加控制器
  • remove 方法用于动态删除控制器
  • update 方法用于动态更新控制器
  • show 属性用于设置是否显示全部控制器
  • toggle 方法用于切换是否显示全部控制器
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -89,7 +89,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.controls.show = false;
 	}, 1000);
-});

组件配置 请参考以下地址:

/component/controls.html

contextmenu ​

管理播放器的右键菜单

  • add 方法用于动态添加菜单
  • remove 方法用于动态删除菜单
  • update 方法用于动态更新菜单
  • show 属性用于设置是否显示全部菜单
  • toggle 方法用于切换是否显示全部菜单
`,5),D=i("div",{className:"run-code"},"▶ Run Code",-1),w=s(`
js
var art = new Artplayer({
+});

组件配置 请参考以下地址:

/component/controls.html

contextmenu ​

管理播放器的右键菜单

  • add 方法用于动态添加菜单
  • remove 方法用于动态删除菜单
  • update 方法用于动态更新菜单
  • show 属性用于设置是否显示全部菜单
  • toggle 方法用于切换是否显示全部菜单
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -103,7 +103,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.contextmenu.show = false;
 	}, 1000);
-});

组件配置 请参考以下地址:

/component/contextmenu.html

subtitle ​

管理播放器的字幕功能

  • url 属性设置和返回当前字幕地址
  • style 方法设置当前字幕的样式
  • switch 方法设置当前字幕地址和选项
  • textTrack 获取当前字幕轨
  • activeCues 获取当前活跃的字幕列表
  • cues 获取整体的字幕列表
`,5),P=i("div",{className:"run-code"},"▶ Run Code",-1),S=s(`
js
var art = new Artplayer({
+});

组件配置 请参考以下地址:

/component/contextmenu.html

subtitle ​

管理播放器的字幕功能

  • url 属性设置和返回当前字幕地址
  • style 方法设置当前字幕的样式
  • switch 方法设置当前字幕地址和选项
  • textTrack 获取当前字幕轨
  • activeCues 获取当前活跃的字幕列表
  • cues 获取整体的字幕列表
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -113,7 +113,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     art.subtitle.style({
         color: 'red',
     });
-});

loading ​

管理播放器的加载层

  • show 属性用于设置是否显示加载层
  • toggle 属性用于切换是否显示加载层
`,4),f=i("div",{className:"run-code"},"▶ Run Code",-1),x=s(`
js
var art = new Artplayer({
+});

loading ​

管理播放器的加载层

  • show 属性用于设置是否显示加载层
  • toggle 属性用于切换是否显示加载层
`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -123,7 +123,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.loading.show = false;
 	}, 1000);
-});

hotkey ​

管理播放器的快捷键功能

  • add 方法用于添加快捷键
  • remove 方法用于删除快捷键
`,4),N=i("div",{className:"run-code"},"▶ Run Code",-1),R=s(`
js
var art = new Artplayer({
+});

hotkey ​

管理播放器的快捷键功能

  • add 方法用于添加快捷键
  • remove 方法用于删除快捷键
`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -137,7 +137,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
 		art.hotkey.remove(32, hotkeyEvent);
 	}, 5000);
-});

提示

只在播放器获得焦点后(如点击了播放器后),这些快捷键才会生效

mask ​

管理播放器的遮罩层

  • show 属性用于设置是否显示遮罩层
  • toggle 属性用于切换是否显示遮罩层
`,5),I=i("div",{className:"run-code"},"▶ Run Code",-1),V=s(`
js
var art = new Artplayer({
+});

提示

只在播放器获得焦点后(如点击了播放器后),这些快捷键才会生效

mask ​

管理播放器的遮罩层

  • show 属性用于设置是否显示遮罩层
  • toggle 属性用于切换是否显示遮罩层
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -147,7 +147,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.mask.show = true;
 	}, 1000);
-});

setting ​

管理播放器的设置面板

  • add 方法用于动态添加设置项
  • remove 方法用于动态删除设置项
  • update 方法用于动态更新设置项
  • show 属性用于设置是否显示全部设置项
  • toggle 方法用于切换是否显示全部设置项
`,4),j=i("div",{className:"run-code"},"▶ Run Code",-1),q=s(`
js
var art = new Artplayer({
+});

setting ​

管理播放器的设置面板

  • add 方法用于动态添加设置项
  • remove 方法用于动态删除设置项
  • update 方法用于动态更新设置项
  • show 属性用于设置是否显示全部设置项
  • toggle 方法用于切换是否显示全部设置项
`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -162,7 +162,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.setting.show = false;
 	}, 1000);
-});

设置面板 请参考以下地址

/component/setting.html

plugins ​

管理播放器的插件功能,只有一个方法 add 用于动态添加插件

`,4),O=i("div",{className:"run-code"},"▶ Run Code",-1),M=s(`
js
var art = new Artplayer({
+});

设置面板 请参考以下地址

/component/setting.html

plugins ​

管理播放器的插件功能,只有一个方法 add 用于动态添加插件

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -180,4 +180,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     art.plugins.add(myPlugin);
-});
`,1),$=[e,h,t,k,r,E,d,c,o,g,y,b,u,F,m,_,C,v,A,B,T,D,w,P,S,f,x,N,R,I,V,j,q,O,M];function z(G,L,W,J,U,Y){return l(),n("div",null,$)}const Q=a(p,[["render",z]]);export{K as __pageData,Q as default}; +});
`,1)]))}const o=n(e,[["render",h]]);export{g as __pageData,o as default}; diff --git a/docs/document/assets/advanced_built-in.md.xIN6yJEQ.lean.js b/docs/document/assets/advanced_built-in.md.xIN6yJEQ.lean.js new file mode 100644 index 000000000..ee1214991 --- /dev/null +++ b/docs/document/assets/advanced_built-in.md.xIN6yJEQ.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"高级属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/built-in.md","filePath":"advanced/built-in.md","lastUpdated":1726997712000}'),e={name:"advanced/built-in.md"};function h(t,a,k,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const o=n(e,[["render",h]]);export{g as __pageData,o as default}; diff --git a/docs/document/assets/advanced_class.md.BNit_d6q.js b/docs/document/assets/advanced_class.md.BNit_d6q.js deleted file mode 100644 index e4e1d0311..000000000 --- a/docs/document/assets/advanced_class.md.BNit_d6q.js +++ /dev/null @@ -1,8 +0,0 @@ -import{_ as i,c as e,o as n,a7 as s,j as a}from"./chunks/framework.DHbvjPBJ.js";const $=JSON.parse('{"title":"静态属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/class.md","filePath":"advanced/class.md","lastUpdated":1682233868000}'),t={name:"advanced/class.md"},l=s('

静态属性 ​

这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用

instances ​

返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性

',4),d=a("div",{className:"run-code"},"▶ Run Code",-1),p=s(`
js
console.info([...Artplayer.instances]);
-
-var art = new Artplayer({
-    container: '.artplayer-app',
-    url: '/assets/sample/video.mp4',
-});
-
-console.info([...Artplayer.instances]);

version ​

返回播放器的版本信息

`,3),h=a("div",{className:"run-code"},"▶ Run Code",-1),r=s('
js
console.info(Artplayer.version);

env ​

返回播放器的环境变量

',3),o=a("div",{className:"run-code"},"▶ Run Code",-1),c=s('
js
console.info(Artplayer.env);

build ​

返回播放器的打包时间

',3),k=a("div",{className:"run-code"},"▶ Run Code",-1),_=s('
js
console.info(Artplayer.build);

config ​

返回视频的默认配置

',3),u=a("div",{className:"run-code"},"▶ Run Code",-1),b=s('
js
console.info(Artplayer.config);

utils ​

返回播放器的工具函数集合

',3),E=a("div",{className:"run-code"},"▶ Run Code",-1),g=s('
js
console.info(Artplayer.utils);

全部工具函数请参考以下地址:

artplayer/types/utils.d.ts

scheme ​

返回播放器选项的校验方案

',4),m=a("div",{className:"run-code"},"▶ Run Code",-1),v=s('
js
console.info(Artplayer.scheme);

Emitter ​

返回事件分发器的构造函数

',3),y=a("div",{className:"run-code"},"▶ Run Code",-1),C=s('
js
console.info(Artplayer.Emitter);

validator ​

返回选项的校验函数

',3),T=a("div",{className:"run-code"},"▶ Run Code",-1),A=s('
js
console.info(Artplayer.validator);

kindOf ​

返回类型检测的函数工具

',3),f=a("div",{className:"run-code"},"▶ Run Code",-1),P=s('
js
console.info(Artplayer.kindOf);

html ​

返回播放器所需的 html 字符串

',3),S=a("div",{className:"run-code"},"▶ Run Code",-1),F=s('
js
console.info(Artplayer.html);

option ​

返回播放器的默认选项

',3),x=a("div",{className:"run-code"},"▶ Run Code",-1),N=s('
js
console.info(Artplayer.option);
',1),V=[l,d,p,h,r,o,c,k,_,u,b,E,g,m,v,y,C,T,A,f,P,S,F,x,N];function q(I,j,R,B,D,w){return n(),e("div",null,V)}const z=i(t,[["render",q]]);export{$ as __pageData,z as default}; diff --git a/docs/document/assets/advanced_class.md.BNit_d6q.lean.js b/docs/document/assets/advanced_class.md.BNit_d6q.lean.js deleted file mode 100644 index f09d51755..000000000 --- a/docs/document/assets/advanced_class.md.BNit_d6q.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as e,o as n,a7 as s,j as a}from"./chunks/framework.DHbvjPBJ.js";const $=JSON.parse('{"title":"静态属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/class.md","filePath":"advanced/class.md","lastUpdated":1682233868000}'),t={name:"advanced/class.md"},l=s("",4),d=a("div",{className:"run-code"},"▶ Run Code",-1),p=s("",3),h=a("div",{className:"run-code"},"▶ Run Code",-1),r=s("",3),o=a("div",{className:"run-code"},"▶ Run Code",-1),c=s("",3),k=a("div",{className:"run-code"},"▶ Run Code",-1),_=s("",3),u=a("div",{className:"run-code"},"▶ Run Code",-1),b=s("",3),E=a("div",{className:"run-code"},"▶ Run Code",-1),g=s("",4),m=a("div",{className:"run-code"},"▶ Run Code",-1),v=s("",3),y=a("div",{className:"run-code"},"▶ Run Code",-1),C=s("",3),T=a("div",{className:"run-code"},"▶ Run Code",-1),A=s("",3),f=a("div",{className:"run-code"},"▶ Run Code",-1),P=s("",3),S=a("div",{className:"run-code"},"▶ Run Code",-1),F=s("",3),x=a("div",{className:"run-code"},"▶ Run Code",-1),N=s("",1),V=[l,d,p,h,r,o,c,k,_,u,b,E,g,m,v,y,C,T,A,f,P,S,F,x,N];function q(I,j,R,B,D,w){return n(),e("div",null,V)}const z=i(t,[["render",q]]);export{$ as __pageData,z as default}; diff --git a/docs/document/assets/advanced_class.md.eY3DVSC3.js b/docs/document/assets/advanced_class.md.eY3DVSC3.js new file mode 100644 index 000000000..54e51f1d6 --- /dev/null +++ b/docs/document/assets/advanced_class.md.eY3DVSC3.js @@ -0,0 +1,8 @@ +import{_ as e,c as n,o as l,ak as s,j as a}from"./chunks/framework.CIzAx-5p.js";const u=JSON.parse('{"title":"静态属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/class.md","filePath":"advanced/class.md","lastUpdated":1682233868000}'),t={name:"advanced/class.md"};function p(d,i,r,h,o,c){return l(),n("div",null,i[0]||(i[0]=[s('

静态属性 ​

这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用

instances ​

返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性

',4),a("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
console.info([...Artplayer.instances]);
+
+var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+});
+
+console.info([...Artplayer.instances]);

version ​

返回播放器的版本信息

`,3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.version);

env ​

返回播放器的环境变量

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.env);

build ​

返回播放器的打包时间

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.build);

config ​

返回视频的默认配置

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.config);

utils ​

返回播放器的工具函数集合

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.utils);

全部工具函数请参考以下地址:

artplayer/types/utils.d.ts

scheme ​

返回播放器选项的校验方案

',4),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.scheme);

Emitter ​

返回事件分发器的构造函数

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.Emitter);

validator ​

返回选项的校验函数

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.validator);

kindOf ​

返回类型检测的函数工具

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.kindOf);

html ​

返回播放器所需的 html 字符串

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.html);

option ​

返回播放器的默认选项

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.option);
',1)]))}const _=e(t,[["render",p]]);export{u as __pageData,_ as default}; diff --git a/docs/document/assets/advanced_class.md.eY3DVSC3.lean.js b/docs/document/assets/advanced_class.md.eY3DVSC3.lean.js new file mode 100644 index 000000000..fa48321be --- /dev/null +++ b/docs/document/assets/advanced_class.md.eY3DVSC3.lean.js @@ -0,0 +1 @@ +import{_ as e,c as n,o as l,ak as s,j as a}from"./chunks/framework.CIzAx-5p.js";const u=JSON.parse('{"title":"静态属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/class.md","filePath":"advanced/class.md","lastUpdated":1682233868000}'),t={name:"advanced/class.md"};function p(d,i,r,h,o,c){return l(),n("div",null,i[0]||(i[0]=[s("",4),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",4),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const _=e(t,[["render",p]]);export{u as __pageData,_ as default}; diff --git a/docs/document/assets/advanced_event.md.RJ7ayOSh.lean.js b/docs/document/assets/advanced_event.md.RJ7ayOSh.lean.js deleted file mode 100644 index e8205cb05..000000000 --- a/docs/document/assets/advanced_event.md.RJ7ayOSh.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js";const ii=JSON.parse('{"title":"实例事件","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/event.md","filePath":"advanced/event.md","lastUpdated":1729412494000}'),p={name:"advanced/event.md"},h=s("h1",{id:"实例事件",tabindex:"-1"},[a("实例事件 "),s("a",{class:"header-anchor",href:"#实例事件","aria-label":'Permalink to "实例事件"'},"​")],-1),t=s("p",null,[a("播放器的事件分为两种,一种视频的 "),s("code",null,"原生事件"),a(" (前缀 "),s("code",null,"video:"),a("),另外一种是 "),s("code",null,"自定义事件")],-1),k=s("p",null,"监听事件:",-1),r=s("div",{className:"run-code"},"▶ Run Code",-1),E=i("",2),d=s("div",{className:"run-code"},"▶ Run Code",-1),c=i("",2),g=s("div",{className:"run-code"},"▶ Run Code",-1),o=i("",2),y=s("div",{className:"run-code"},"▶ Run Code",-1),b=i("",4),u=s("div",{className:"run-code"},"▶ Run Code",-1),F=i("",3),m=s("div",{className:"run-code"},"▶ Run Code",-1),_=i("",3),v=s("div",{className:"run-code"},"▶ Run Code",-1),C=i("",3),A=s("div",{className:"run-code"},"▶ Run Code",-1),B=i("",3),T=s("div",{className:"run-code"},"▶ Run Code",-1),D=i("",3),f=s("div",{className:"run-code"},"▶ Run Code",-1),P=i("",3),S=s("div",{className:"run-code"},"▶ Run Code",-1),q=i("",3),x=s("div",{className:"run-code"},"▶ Run Code",-1),w=i("",3),R=s("div",{className:"run-code"},"▶ Run Code",-1),N=i("",3),V=s("div",{className:"run-code"},"▶ Run Code",-1),j=i("",3),I=s("div",{className:"run-code"},"▶ Run Code",-1),z=i("",3),U=s("div",{className:"run-code"},"▶ Run Code",-1),O=i("",3),H=s("div",{className:"run-code"},"▶ Run Code",-1),W=i("",3),L=s("div",{className:"run-code"},"▶ Run Code",-1),$=i("",3),J=s("div",{className:"run-code"},"▶ Run Code",-1),G=i("",3),K=s("div",{className:"run-code"},"▶ Run Code",-1),M=i("",3),Q=s("div",{className:"run-code"},"▶ Run Code",-1),X=i("",3),Y=s("div",{className:"run-code"},"▶ Run Code",-1),Z=i("",3),ss=s("div",{className:"run-code"},"▶ Run Code",-1),is=i("",3),as=s("div",{className:"run-code"},"▶ Run Code",-1),ns=i("",3),ls=s("div",{className:"run-code"},"▶ Run Code",-1),es=i("",3),ps=s("div",{className:"run-code"},"▶ Run Code",-1),hs=i("",3),ts=s("div",{className:"run-code"},"▶ Run Code",-1),ks=i("",3),rs=s("div",{className:"run-code"},"▶ Run Code",-1),Es=i("",3),ds=s("div",{className:"run-code"},"▶ Run Code",-1),cs=i("",3),gs=s("div",{className:"run-code"},"▶ Run Code",-1),os=i("",3),ys=s("div",{className:"run-code"},"▶ Run Code",-1),bs=i("",3),us=s("div",{className:"run-code"},"▶ Run Code",-1),Fs=i("",3),ms=s("div",{className:"run-code"},"▶ Run Code",-1),_s=i("",3),vs=s("div",{className:"run-code"},"▶ Run Code",-1),Cs=i("",3),As=s("div",{className:"run-code"},"▶ Run Code",-1),Bs=i("",3),Ts=s("div",{className:"run-code"},"▶ Run Code",-1),Ds=i("",3),fs=s("div",{className:"run-code"},"▶ Run Code",-1),Ps=i("",3),Ss=s("div",{className:"run-code"},"▶ Run Code",-1),qs=i("",3),xs=s("div",{className:"run-code"},"▶ Run Code",-1),ws=i("",3),Rs=s("div",{className:"run-code"},"▶ Run Code",-1),Ns=i("",3),Vs=s("div",{className:"run-code"},"▶ Run Code",-1),js=i("",3),Is=s("div",{className:"run-code"},"▶ Run Code",-1),zs=i("",3),Us=s("div",{className:"run-code"},"▶ Run Code",-1),Os=i("",3),Hs=s("div",{className:"run-code"},"▶ Run Code",-1),Ws=i("",3),Ls=s("div",{className:"run-code"},"▶ Run Code",-1),$s=i("",43),Js=[h,t,k,r,E,d,c,g,o,y,b,u,F,m,_,v,C,A,B,T,D,f,P,S,q,x,w,R,N,V,j,I,z,U,O,H,W,L,$,J,G,K,M,Q,X,Y,Z,ss,is,as,ns,ls,es,ps,hs,ts,ks,rs,Es,ds,cs,gs,os,ys,bs,us,Fs,ms,_s,vs,Cs,As,Bs,Ts,Ds,fs,Ps,Ss,qs,xs,ws,Rs,Ns,Vs,js,Is,zs,Us,Os,Hs,Ws,Ls,$s];function Gs(Ks,Ms,Qs,Xs,Ys,Zs){return e(),l("div",null,Js)}const ai=n(p,[["render",Gs]]);export{ii as __pageData,ai as default}; diff --git a/docs/document/assets/advanced_event.md.RJ7ayOSh.js b/docs/document/assets/advanced_event.md.c-TsYEyx.js similarity index 80% rename from docs/document/assets/advanced_event.md.RJ7ayOSh.js rename to docs/document/assets/advanced_event.md.c-TsYEyx.js index 1eea6bb7c..0a4ed2bf3 100644 --- a/docs/document/assets/advanced_event.md.RJ7ayOSh.js +++ b/docs/document/assets/advanced_event.md.c-TsYEyx.js @@ -1,23 +1,23 @@ -import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js";const ii=JSON.parse('{"title":"实例事件","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/event.md","filePath":"advanced/event.md","lastUpdated":1729412494000}'),p={name:"advanced/event.md"},h=s("h1",{id:"实例事件",tabindex:"-1"},[a("实例事件 "),s("a",{class:"header-anchor",href:"#实例事件","aria-label":'Permalink to "实例事件"'},"​")],-1),t=s("p",null,[a("播放器的事件分为两种,一种视频的 "),s("code",null,"原生事件"),a(" (前缀 "),s("code",null,"video:"),a("),另外一种是 "),s("code",null,"自定义事件")],-1),k=s("p",null,"监听事件:",-1),r=s("div",{className:"run-code"},"▶ Run Code",-1),E=i(`
js
var art = new Artplayer({
+import{_ as l,c as p,o as e,j as s,ak as i,a}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"实例事件","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/event.md","filePath":"advanced/event.md","lastUpdated":1729412494000}'),h={name:"advanced/event.md"};function t(k,n,r,E,d,g){return e(),p("div",null,n[0]||(n[0]=[s("h1",{id:"实例事件",tabindex:"-1"},[a("实例事件 "),s("a",{class:"header-anchor",href:"#实例事件","aria-label":'Permalink to "实例事件"'},"​")],-1),s("p",null,[a("播放器的事件分为两种,一种视频的 "),s("code",null,"原生事件"),a(" (前缀 "),s("code",null,"video:"),a("),另外一种是 "),s("code",null,"自定义事件")],-1),s("p",null,"监听事件:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:canplay', () => {
     console.info('video:canplay');
-});

只监听一次事件:

`,2),d=s("div",{className:"run-code"},"▶ Run Code",-1),c=i(`
js
var art = new Artplayer({
+});

只监听一次事件:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.once('video:canplay', () => {
     console.info('video:canplay');
-});

手动触发事件:

`,2),g=s("div",{className:"run-code"},"▶ Run Code",-1),o=i(`
js
var art = new Artplayer({
+});

手动触发事件:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-art.emit('focus');

移除事件:

`,2),y=s("div",{className:"run-code"},"▶ Run Code",-1),b=i(`
js
var art = new Artplayer({
+art.emit('focus');

移除事件:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -27,14 +27,14 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
     art.off('ready', onReady);
 }
 
-art.on('ready', onReady);

全部事件请参考以下地址:

artplayer/types/events.d.ts

ready ​

当播放器首次可以播放器时触发

`,4),u=s("div",{className:"run-code"},"▶ Run Code",-1),F=i(`
js
var art = new Artplayer({
+art.on('ready', onReady);

全部事件请参考以下地址:

artplayer/types/events.d.ts

ready ​

当播放器首次可以播放器时触发

`,4),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info('ready');
-});

restart ​

当播放器切换地址后并可以播放时触发

`,3),m=s("div",{className:"run-code"},"▶ Run Code",-1),_=i(`
js
var art = new Artplayer({
+});

restart ​

当播放器切换地址后并可以播放时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -45,28 +45,28 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('restart', (url) => {
     console.info('restart', url);
-});

pause ​

当播放器暂停时触发

`,3),v=s("div",{className:"run-code"},"▶ Run Code",-1),C=i(`
js
var art = new Artplayer({
+});

pause ​

当播放器暂停时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('pause', () => {
     console.info('pause');
-});

play ​

当播放器播放时触发

`,3),A=s("div",{className:"run-code"},"▶ Run Code",-1),B=i(`
js
var art = new Artplayer({
+});

play ​

当播放器播放时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('play', () => {
     console.info('play');
-});

hotkey ​

当播放器热键被按下时触发

`,3),T=s("div",{className:"run-code"},"▶ Run Code",-1),D=i(`
js
var art = new Artplayer({
+});

hotkey ​

当播放器热键被按下时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('hotkey', (event) => {
     console.info('hotkey', event);
-});

destroy ​

当播放器销毁时触发

`,3),f=s("div",{className:"run-code"},"▶ Run Code",-1),P=i(`
js
var art = new Artplayer({
+});

destroy ​

当播放器销毁时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -77,70 +77,70 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('destroy', () => {
     console.info('destroy');
-});

focus ​

当播放器获得焦点时触发

`,3),S=s("div",{className:"run-code"},"▶ Run Code",-1),q=i(`
js
var art = new Artplayer({
+});

focus ​

当播放器获得焦点时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('focus', (event) => {
     console.info('focus', event);
-});

blur ​

当播放器失去焦点时触发

`,3),x=s("div",{className:"run-code"},"▶ Run Code",-1),w=i(`
js
var art = new Artplayer({
+});

blur ​

当播放器失去焦点时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('blur', (event) => {
     console.info('blur', event);
-});

dblclick ​

当播放器被双击时触发

`,3),R=s("div",{className:"run-code"},"▶ Run Code",-1),N=i(`
js
var art = new Artplayer({
+});

dblclick ​

当播放器被双击时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('dblclick', (event) => {
     console.info('dblclick', event);
-});

click ​

当播放器被单击时触发

`,3),V=s("div",{className:"run-code"},"▶ Run Code",-1),j=i(`
js
var art = new Artplayer({
+});

click ​

当播放器被单击时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('click', (event) => {
     console.info('click', event);
-});

error ​

当播放器加载视频发生错误时触发

`,3),I=s("div",{className:"run-code"},"▶ Run Code",-1),z=i(`
js
var art = new Artplayer({
+});

error ​

当播放器加载视频发生错误时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
 });
 
 art.on('error', (error, reconnectTime) => {
     console.info(error, reconnectTime);
-});

hover ​

当播放器被鼠标移出或者移入时触发

`,3),U=s("div",{className:"run-code"},"▶ Run Code",-1),O=i(`
js
var art = new Artplayer({
+});

hover ​

当播放器被鼠标移出或者移入时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('hover', (state, event) => {
     console.info('hover', state, event);
-});

mousemove ​

当播放器被鼠标经过时触发

`,3),H=s("div",{className:"run-code"},"▶ Run Code",-1),W=i(`
js
var art = new Artplayer({
+});

mousemove ​

当播放器被鼠标经过时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('mousemove', (event) => {
     console.info('mousemove', event);
-});

resize ​

当播放器尺寸变化时触发

`,3),L=s("div",{className:"run-code"},"▶ Run Code",-1),$=i(`
js
var art = new Artplayer({
+});

resize ​

当播放器尺寸变化时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('resize', () => {
     console.info('resize');
-});

view ​

当播放器出现在视口时触发

`,3),J=s("div",{className:"run-code"},"▶ Run Code",-1),G=i(`
js
var art = new Artplayer({
+});

view ​

当播放器出现在视口时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('view', (state) => {
     console.info('view', state);
-});

lock ​

在移动端,当锁定的状态发生变化时触发

`,3),K=s("div",{className:"run-code"},"▶ Run Code",-1),M=i(`
js
var art = new Artplayer({
+});

lock ​

在移动端,当锁定的状态发生变化时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lock: true,
@@ -148,7 +148,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('lock', (state) => {
     console.info('lock', state);
-});

aspectRatio ​

当播放器长宽比变化时触发

`,3),Q=s("div",{className:"run-code"},"▶ Run Code",-1),X=i(`
js
var art = new Artplayer({
+});

aspectRatio ​

当播放器长宽比变化时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     aspectRatio: true,
@@ -157,7 +157,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('aspectRatio', (aspectRatio) => {
     console.info('aspectRatio', aspectRatio);
-});

autoHeight ​

当播放器自动设置高度时触发

`,3),Y=s("div",{className:"run-code"},"▶ Run Code",-1),Z=i(`
js
var art = new Artplayer({
+});

autoHeight ​

当播放器自动设置高度时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -168,7 +168,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('autoHeight', (height) => {
     console.info('autoHeight', height);
-});

autoSize ​

当播放器自动设置尺寸时触发

`,3),ss=s("div",{className:"run-code"},"▶ Run Code",-1),is=i(`
js
var art = new Artplayer({
+});

autoSize ​

当播放器自动设置尺寸时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
@@ -176,7 +176,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('autoSize', () => {
     console.info('autoSize');
-});

flip ​

当播放器发生翻转时触发

`,3),as=s("div",{className:"run-code"},"▶ Run Code",-1),ns=i(`
js
var art = new Artplayer({
+});

flip ​

当播放器发生翻转时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     flip: true,
@@ -185,7 +185,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('flip', (flip) => {
     console.info('flip', flip);
-});

fullscreen ​

当播放器发生窗口全屏时触发

`,3),ls=s("div",{className:"run-code"},"▶ Run Code",-1),es=i(`
js
var art = new Artplayer({
+});

fullscreen ​

当播放器发生窗口全屏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
@@ -193,7 +193,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('fullscreen', (state) => {
     console.info('fullscreen', state);
-});

fullscreenError ​

当播放器发生窗口全屏错误时触发

`,3),ps=s("div",{className:"run-code"},"▶ Run Code",-1),hs=i(`
js
var art = new Artplayer({
+});

fullscreenError ​

当播放器发生窗口全屏错误时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -204,7 +204,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('fullscreenError', (event) => {
     console.info('fullscreenError', event);
-});

fullscreenWeb ​

当播放器发生网页全屏时触发

`,3),ts=s("div",{className:"run-code"},"▶ Run Code",-1),ks=i(`
js
var art = new Artplayer({
+});

fullscreenWeb ​

当播放器发生网页全屏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
@@ -212,7 +212,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('fullscreenWeb', (state) => {
     console.info('fullscreenWeb', state);
-});

mini ​

当播放器进入迷你模式时触发

`,3),rs=s("div",{className:"run-code"},"▶ Run Code",-1),Es=i(`
js
var art = new Artplayer({
+});

mini ​

当播放器进入迷你模式时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -223,7 +223,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('mini', (state) => {
     console.info('mini', state);
-});

pip ​

当播放器进入画中画时触发

`,3),ds=s("div",{className:"run-code"},"▶ Run Code",-1),cs=i(`
js
var art = new Artplayer({
+});

pip ​

当播放器进入画中画时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     pip: true,
@@ -231,7 +231,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('pip', (state) => {
     console.info('pip', state);
-});

screenshot ​

当播放器被截图时触发

`,3),gs=s("div",{className:"run-code"},"▶ Run Code",-1),os=i(`
js
var art = new Artplayer({
+});

screenshot ​

当播放器被截图时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     screenshot: true,
@@ -239,14 +239,14 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('screenshot', (dataUri) => {
     console.info('screenshot', dataUri);
-});

seek ​

当播放器发生时间跳转时触发

`,3),ys=s("div",{className:"run-code"},"▶ Run Code",-1),bs=i(`
js
var art = new Artplayer({
+});

seek ​

当播放器发生时间跳转时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('seek', (currentTime) => {
     console.info('seek', currentTime);
-});

subtitleOffset ​

当播放器发生字幕偏移时触发

`,3),us=s("div",{className:"run-code"},"▶ Run Code",-1),Fs=i(`
js
var art = new Artplayer({
+});

subtitleOffset ​

当播放器发生字幕偏移时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitleOffset: true,
@@ -258,7 +258,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('subtitleOffset', (offset) => {
     console.info('subtitleOffset', offset);
-});

subtitleBeforeUpdate ​

当字幕更新前触发

`,3),ms=s("div",{className:"run-code"},"▶ Run Code",-1),_s=i(`
js
var art = new Artplayer({
+});

subtitleBeforeUpdate ​

当字幕更新前触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -268,7 +268,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('subtitleBeforeUpdate', (cues) => {
     console.info('subtitleBeforeUpdate', cues);
-});

subtitleAfterUpdate ​

当字幕更新后触发

`,3),vs=s("div",{className:"run-code"},"▶ Run Code",-1),Cs=i(`
js
var art = new Artplayer({
+});

subtitleAfterUpdate ​

当字幕更新后触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -278,7 +278,7 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('subtitleAfterUpdate', (cues) => {
     console.info('subtitleAfterUpdate', cues);
-});

subtitleLoad ​

当字幕加载时触发

`,3),As=s("div",{className:"run-code"},"▶ Run Code",-1),Bs=i(`
js
var art = new Artplayer({
+});

subtitleLoad ​

当字幕加载时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -288,56 +288,56 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('subtitleLoad', (option, cues) => {
     console.info('subtitleLoad', cues, option);
-});

info ​

当信息面板显示或隐藏时触发

`,3),Ts=s("div",{className:"run-code"},"▶ Run Code",-1),Ds=i(`
js
var art = new Artplayer({
+});

info ​

当信息面板显示或隐藏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('info', (state) => {
     console.log(state);
-});

layer ​

当自定义层显示或隐藏时触发

`,3),fs=s("div",{className:"run-code"},"▶ Run Code",-1),Ps=i(`
js
var art = new Artplayer({
+});

layer ​

当自定义层显示或隐藏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('layer', (state) => {
     console.log(state);
-});

loading ​

当加载器显示或隐藏时触发

`,3),Ss=s("div",{className:"run-code"},"▶ Run Code",-1),qs=i(`
js
var art = new Artplayer({
+});

loading ​

当加载器显示或隐藏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('loading', (state) => {
     console.log(state);
-});

mask ​

当遮罩层显示或隐藏时触发

`,3),xs=s("div",{className:"run-code"},"▶ Run Code",-1),ws=i(`
js
var art = new Artplayer({
+});

mask ​

当遮罩层显示或隐藏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('mask', (state) => {
     console.log(state);
-});

subtitle ​

当字幕层显示或隐藏时触发

`,3),Rs=s("div",{className:"run-code"},"▶ Run Code",-1),Ns=i(`
js
var art = new Artplayer({
+});

subtitle ​

当字幕层显示或隐藏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('subtitle', (state) => {
     console.log(state);
-});

contextmenu ​

当右键菜单显示或隐藏时触发

`,3),Vs=s("div",{className:"run-code"},"▶ Run Code",-1),js=i(`
js
var art = new Artplayer({
+});

contextmenu ​

当右键菜单显示或隐藏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('contextmenu', (state) => {
     console.log(state);
-});

control ​

当控制器显示或隐藏时触发

`,3),Is=s("div",{className:"run-code"},"▶ Run Code",-1),zs=i(`
js
var art = new Artplayer({
+});

control ​

当控制器显示或隐藏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('control', (state) => {
     console.log(state);
-});

setting ​

当设置面板显示或隐藏时触发

`,3),Us=s("div",{className:"run-code"},"▶ Run Code",-1),Os=i(`
js
var art = new Artplayer({
+});

setting ​

当设置面板显示或隐藏时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -345,11 +345,11 @@ import{_ as n,c as l,o as e,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('setting', (state) => {
     console.log(state);
-});

muted ​

当静音的状态变化时触发

`,3),Hs=s("div",{className:"run-code"},"▶ Run Code",-1),Ws=i(`
js
var art = new Artplayer({
+});

muted ​

当静音的状态变化时触发

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('muted', (state) => {
     console.log(state);
-});

keydown ​

监听来自 document 的 keydown 事件

`,3),Ls=s("div",{className:"run-code"},"▶ Run Code",-1),$s=i('
js
var art = new Artplayer({\n    container: '.artplayer-app',\n    url: '/assets/sample/video.mp4',\n});\n\nart.on('keydown', (event) => {\n    console.log(event.code);\n});

video:canplay ​

浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容

video:canplaythrough ​

浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束

video:complete ​

OfflineAudioContext 渲染完成

video:durationchange ​

duration 属性的值改变时触发

video:emptied ​

媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载它

video:ended ​

视频停止播放,因为 media 已经到达结束点

video:error ​

获取媒体数据时出错,或者资源类型不是受支持的媒体格式

video:loadeddata ​

media 中的首帧已经完成加载

video:loadedmetadata ​

已加载元数据

video:pause ​

播放已暂停

video:play ​

播放已开始

video:playing ​

由于缺乏数据而暂停或延迟后,播放准备开始

video:progress ​

在浏览器加载资源时周期性触发

video:ratechange ​

播放速率发生变化

video:seeked ​

跳帧(seek)操作完成

video:seeking ​

跳帧(seek)操作开始

video:stalled ​

用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现

video:suspend ​

媒体数据加载已暂停

video:timeupdate ​

currentTime 属性指定的时间发生变化

video:volumechange ​

音量发生变化

video:waiting ​

由于暂时缺少数据,播放已停止

',43),Js=[h,t,k,r,E,d,c,g,o,y,b,u,F,m,_,v,C,A,B,T,D,f,P,S,q,x,w,R,N,V,j,I,z,U,O,H,W,L,$,J,G,K,M,Q,X,Y,Z,ss,is,as,ns,ls,es,ps,hs,ts,ks,rs,Es,ds,cs,gs,os,ys,bs,us,Fs,ms,_s,vs,Cs,As,Bs,Ts,Ds,fs,Ps,Ss,qs,xs,ws,Rs,Ns,Vs,js,Is,zs,Us,Os,Hs,Ws,Ls,$s];function Gs(Ks,Ms,Qs,Xs,Ys,Zs){return e(),l("div",null,Js)}const ai=n(p,[["render",Gs]]);export{ii as __pageData,ai as default}; +});

keydown ​

监听来自 document 的 keydown 事件

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i('
js
var art = new Artplayer({\n    container: '.artplayer-app',\n    url: '/assets/sample/video.mp4',\n});\n\nart.on('keydown', (event) => {\n    console.log(event.code);\n});

video:canplay ​

浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容

video:canplaythrough ​

浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束

video:complete ​

OfflineAudioContext 渲染完成

video:durationchange ​

duration 属性的值改变时触发

video:emptied ​

媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载它

video:ended ​

视频停止播放,因为 media 已经到达结束点

video:error ​

获取媒体数据时出错,或者资源类型不是受支持的媒体格式

video:loadeddata ​

media 中的首帧已经完成加载

video:loadedmetadata ​

已加载元数据

video:pause ​

播放已暂停

video:play ​

播放已开始

video:playing ​

由于缺乏数据而暂停或延迟后,播放准备开始

video:progress ​

在浏览器加载资源时周期性触发

video:ratechange ​

播放速率发生变化

video:seeked ​

跳帧(seek)操作完成

video:seeking ​

跳帧(seek)操作开始

video:stalled ​

用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现

video:suspend ​

媒体数据加载已暂停

video:timeupdate ​

currentTime 属性指定的时间发生变化

video:volumechange ​

音量发生变化

video:waiting ​

由于暂时缺少数据,播放已停止

',43)]))}const o=l(h,[["render",t]]);export{y as __pageData,o as default}; diff --git a/docs/document/assets/advanced_event.md.c-TsYEyx.lean.js b/docs/document/assets/advanced_event.md.c-TsYEyx.lean.js new file mode 100644 index 000000000..5169a6368 --- /dev/null +++ b/docs/document/assets/advanced_event.md.c-TsYEyx.lean.js @@ -0,0 +1 @@ +import{_ as l,c as p,o as e,j as s,ak as i,a}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"实例事件","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/event.md","filePath":"advanced/event.md","lastUpdated":1729412494000}'),h={name:"advanced/event.md"};function t(k,n,r,E,d,g){return e(),p("div",null,n[0]||(n[0]=[s("h1",{id:"实例事件",tabindex:"-1"},[a("实例事件 "),s("a",{class:"header-anchor",href:"#实例事件","aria-label":'Permalink to "实例事件"'},"​")],-1),s("p",null,[a("播放器的事件分为两种,一种视频的 "),s("code",null,"原生事件"),a(" (前缀 "),s("code",null,"video:"),a("),另外一种是 "),s("code",null,"自定义事件")],-1),s("p",null,"监听事件:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",4),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",43)]))}const o=l(h,[["render",t]]);export{y as __pageData,o as default}; diff --git a/docs/document/assets/advanced_global.md.BhN7_gRt.lean.js b/docs/document/assets/advanced_global.md.BhN7_gRt.lean.js deleted file mode 100644 index 26cd7918c..000000000 --- a/docs/document/assets/advanced_global.md.BhN7_gRt.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const Is=JSON.parse('{"title":"全局属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/global.md","filePath":"advanced/global.md","lastUpdated":1718941442000}'),p={name:"advanced/global.md"},e=s("",4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",3),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",3),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",3),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s("",3),y=i("div",{className:"run-code"},"▶ Run Code",-1),o=s("",3),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s("",3),F=i("div",{className:"run-code"},"▶ Run Code",-1),_=s("",3),m=i("div",{className:"run-code"},"▶ Run Code",-1),C=s("",3),A=i("div",{className:"run-code"},"▶ Run Code",-1),v=s("",3),T=i("div",{className:"run-code"},"▶ Run Code",-1),B=s("",3),D=i("div",{className:"run-code"},"▶ Run Code",-1),I=s("",3),S=i("div",{className:"run-code"},"▶ Run Code",-1),P=s("",3),R=i("div",{className:"run-code"},"▶ Run Code",-1),N=s("",3),O=i("div",{className:"run-code"},"▶ Run Code",-1),w=s("",3),L=i("div",{className:"run-code"},"▶ Run Code",-1),V=s("",3),x=i("div",{className:"run-code"},"▶ Run Code",-1),f=s("",3),q=i("div",{className:"run-code"},"▶ Run Code",-1),j=s("",3),M=i("div",{className:"run-code"},"▶ Run Code",-1),U=s("",3),K=i("div",{className:"run-code"},"▶ Run Code",-1),Y=s("",3),G=i("div",{className:"run-code"},"▶ Run Code",-1),H=s("",3),W=i("div",{className:"run-code"},"▶ Run Code",-1),X=s("",3),z=i("div",{className:"run-code"},"▶ Run Code",-1),$=s("",3),Z=i("div",{className:"run-code"},"▶ Run Code",-1),J=s("",3),Q=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s("",3),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s("",3),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s("",3),ps=i("div",{className:"run-code"},"▶ Run Code",-1),es=s("",3),hs=i("div",{className:"run-code"},"▶ Run Code",-1),ts=s("",3),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s("",3),Es=i("div",{className:"run-code"},"▶ Run Code",-1),ds=s("",3),cs=i("div",{className:"run-code"},"▶ Run Code",-1),gs=s("",3),ys=i("div",{className:"run-code"},"▶ Run Code",-1),os=s("",3),bs=i("div",{className:"run-code"},"▶ Run Code",-1),us=s("",1),Fs=[e,h,t,k,r,E,d,c,g,y,o,b,u,F,_,m,C,A,v,T,B,D,I,S,P,R,N,O,w,L,V,x,f,q,j,M,U,K,Y,G,H,W,X,z,$,Z,J,Q,ss,is,as,ns,ls,ps,es,hs,ts,ks,rs,Es,ds,cs,gs,ys,os,bs,us];function _s(ms,Cs,As,vs,Ts,Bs){return l(),n("div",null,Fs)}const Ss=a(p,[["render",_s]]);export{Is as __pageData,Ss as default}; diff --git a/docs/document/assets/advanced_global.md.BhN7_gRt.js b/docs/document/assets/advanced_global.md.BrPgVIjS.js similarity index 77% rename from docs/document/assets/advanced_global.md.BhN7_gRt.js rename to docs/document/assets/advanced_global.md.BrPgVIjS.js index 7d7f03de2..7084a39ce 100644 --- a/docs/document/assets/advanced_global.md.BhN7_gRt.js +++ b/docs/document/assets/advanced_global.md.BrPgVIjS.js @@ -1,19 +1,19 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const Is=JSON.parse('{"title":"全局属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/global.md","filePath":"advanced/global.md","lastUpdated":1718941442000}'),p={name:"advanced/global.md"},e=s('

全局属性 ​

这里的 全局属性 也是指挂载在 构造函数 的 一级属性,属性名字全部都是大写的形式,未来容易发生变动,基本上用不到

DEBUG ​

是否开始 debug 模式,可以打印出视频全部的内置事件,默认关闭

',4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js
Artplayer.DEBUG = true;
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"全局属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/global.md","filePath":"advanced/global.md","lastUpdated":1718941442000}'),e={name:"advanced/global.md"};function h(t,a,k,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s('

全局属性 ​

这里的 全局属性 也是指挂载在 构造函数 的 一级属性,属性名字全部都是大写的形式,未来容易发生变动,基本上用不到

DEBUG ​

是否开始 debug 模式,可以打印出视频全部的内置事件,默认关闭

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DEBUG = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

STYLE ​

返回播放器样式文本

`,3),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s('
js
console.log(Artplayer.STYLE);

CONTEXTMENU ​

是否开启右键菜单,默认开启

',3),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
Artplayer.CONTEXTMENU = false;
+});

STYLE ​

返回播放器样式文本

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.log(Artplayer.STYLE);

CONTEXTMENU ​

是否开启右键菜单,默认开启

',3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.CONTEXTMENU = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

NOTICE_TIME ​

提示信息的显示时长,单位为毫秒,默认为 2000

`,3),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s(`
js
Artplayer.NOTICE_TIME = 5000;
+});

NOTICE_TIME ​

提示信息的显示时长,单位为毫秒,默认为 2000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.NOTICE_TIME = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

SETTING_WIDTH ​

设置面板的默认宽度,单位为像素,默认为 250

`,3),y=i("div",{className:"run-code"},"▶ Run Code",-1),o=s(`
js
Artplayer.SETTING_WIDTH = 300;
+});

SETTING_WIDTH ​

设置面板的默认宽度,单位为像素,默认为 250

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_WIDTH = 300;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -23,7 +23,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

SETTING_ITEM_WIDTH ​

设置面板的设置项的默认宽度,单位为像素,默认为 200

`,3),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s(`
js
Artplayer.SETTING_ITEM_WIDTH = 300;
+});

SETTING_ITEM_WIDTH ​

设置面板的设置项的默认宽度,单位为像素,默认为 200

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_ITEM_WIDTH = 300;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -33,7 +33,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

SETTING_ITEM_HEIGHT ​

设置面板的设置项的默认高度,单位为像素,默认为 35

`,3),F=i("div",{className:"run-code"},"▶ Run Code",-1),_=s(`
js
Artplayer.SETTING_ITEM_HEIGHT = 40;
+});

SETTING_ITEM_HEIGHT ​

设置面板的设置项的默认高度,单位为像素,默认为 35

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_ITEM_HEIGHT = 40;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -43,7 +43,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

RESIZE_TIME ​

resize 事件的节流时间,单位为毫秒,默认为 200

`,3),m=i("div",{className:"run-code"},"▶ Run Code",-1),C=s(`
js
Artplayer.RESIZE_TIME = 500;
+});

RESIZE_TIME ​

resize 事件的节流时间,单位为毫秒,默认为 200

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.RESIZE_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -52,7 +52,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('resize', () => {
     console.log('resize');
-});

SCROLL_TIME ​

scroll 事件的节流时间,单位为毫秒,默认为 200

`,3),A=i("div",{className:"run-code"},"▶ Run Code",-1),v=s(`
js
Artplayer.SCROLL_TIME = 500;
+});

SCROLL_TIME ​

scroll 事件的节流时间,单位为毫秒,默认为 200

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SCROLL_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -61,7 +61,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('scroll', () => {
     console.log('scroll');
-});

SCROLL_GAP ​

view 事件的边界容差距离,单位为像素,默认为 50

`,3),T=i("div",{className:"run-code"},"▶ Run Code",-1),B=s(`
js
Artplayer.SCROLL_GAP = 100;
+});

SCROLL_GAP ​

view 事件的边界容差距离,单位为像素,默认为 50

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SCROLL_GAP = 100;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -70,40 +70,40 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('scroll', () => {
     console.log('scroll');
-});

AUTO_PLAYBACK_MAX ​

自动回放功能的最大记录数,默认为 10

`,3),D=i("div",{className:"run-code"},"▶ Run Code",-1),I=s(`
js
Artplayer.AUTO_PLAYBACK_MAX = 20;
+});

AUTO_PLAYBACK_MAX ​

自动回放功能的最大记录数,默认为 10

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_PLAYBACK_MAX = 20;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoPlayback: true,
-});

AUTO_PLAYBACK_MIN ​

自动回放功能的最小记录时长,单位为秒,默认为 5

`,3),S=i("div",{className:"run-code"},"▶ Run Code",-1),P=s(`
js
Artplayer.AUTO_PLAYBACK_MIN = 10;
+});

AUTO_PLAYBACK_MIN ​

自动回放功能的最小记录时长,单位为秒,默认为 5

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_PLAYBACK_MIN = 10;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoPlayback: true,
-});

AUTO_PLAYBACK_TIMEOUT ​

自动回放功能的隐藏延迟时长,单位为毫秒,默认为 3000

`,3),R=i("div",{className:"run-code"},"▶ Run Code",-1),N=s(`
js
Artplayer.AUTO_PLAYBACK_TIMEOUT = 5000;
+});

AUTO_PLAYBACK_TIMEOUT ​

自动回放功能的隐藏延迟时长,单位为毫秒,默认为 3000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_PLAYBACK_TIMEOUT = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoPlayback: true,
-});

RECONNECT_TIME_MAX ​

发生连接错误时,自动连接的最大次数,默认为 5

`,3),O=i("div",{className:"run-code"},"▶ Run Code",-1),w=s(`
js
Artplayer.RECONNECT_TIME_MAX = 10;
+});

RECONNECT_TIME_MAX ​

发生连接错误时,自动连接的最大次数,默认为 5

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.RECONNECT_TIME_MAX = 10;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
-});

RECONNECT_SLEEP_TIME ​

发生连接错误时,自动连接的延迟时间,单位为毫秒,默认为 1000

`,3),L=i("div",{className:"run-code"},"▶ Run Code",-1),V=s(`
js
Artplayer.RECONNECT_SLEEP_TIME = 3000;
+});

RECONNECT_SLEEP_TIME ​

发生连接错误时,自动连接的延迟时间,单位为毫秒,默认为 1000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.RECONNECT_SLEEP_TIME = 3000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
-});

CONTROL_HIDE_TIME ​

底部控制栏的自动隐藏的延迟时间,单位为毫秒,默认为 3000

`,3),x=i("div",{className:"run-code"},"▶ Run Code",-1),f=s(`
js
Artplayer.CONTROL_HIDE_TIME = 5000;
+});

CONTROL_HIDE_TIME ​

底部控制栏的自动隐藏的延迟时间,单位为毫秒,默认为 3000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.CONTROL_HIDE_TIME = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

DBCLICK_TIME ​

双击事件的延迟事件,单位为毫秒,默认为 300

`,3),q=i("div",{className:"run-code"},"▶ Run Code",-1),j=s(`
js
Artplayer.DBCLICK_TIME = 500;
+});

DBCLICK_TIME ​

双击事件的延迟事件,单位为毫秒,默认为 300

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DBCLICK_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -112,62 +112,62 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('dblclick', () => {
     console.log('dblclick');
-});

DBCLICK_FULLSCREEN ​

在桌面端,是否双击切换全屏,默认为 true

`,3),M=i("div",{className:"run-code"},"▶ Run Code",-1),U=s(`
js
Artplayer.DBCLICK_FULLSCREEN = false;
+});

DBCLICK_FULLSCREEN ​

在桌面端,是否双击切换全屏,默认为 true

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DBCLICK_FULLSCREEN = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

MOBILE_DBCLICK_PLAY ​

在移动端,是否双击切换播放暂停,默认为 true

`,3),K=i("div",{className:"run-code"},"▶ Run Code",-1),Y=s(`
js
Artplayer.MOBILE_DBCLICK_PLAY = false;
+});

MOBILE_DBCLICK_PLAY ​

在移动端,是否双击切换播放暂停,默认为 true

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_DBCLICK_PLAY = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

MOBILE_CLICK_PLAY ​

在移动端,是否单击切换播放暂停,默认为 false

`,3),G=i("div",{className:"run-code"},"▶ Run Code",-1),H=s(`
js
Artplayer.MOBILE_CLICK_PLAY = true;
+});

MOBILE_CLICK_PLAY ​

在移动端,是否单击切换播放暂停,默认为 false

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_CLICK_PLAY = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

AUTO_ORIENTATION_TIME ​

在移动端,自动旋屏的延迟时间,单位为毫秒,默认为 200

`,3),W=i("div",{className:"run-code"},"▶ Run Code",-1),X=s(`
js
Artplayer.AUTO_ORIENTATION_TIME = 500;
+});

AUTO_ORIENTATION_TIME ​

在移动端,自动旋屏的延迟时间,单位为毫秒,默认为 200

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_ORIENTATION_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoOrientation: true,
-});

INFO_LOOP_TIME ​

信息面板的刷新时间,单位为毫秒,默认为 1000

`,3),z=i("div",{className:"run-code"},"▶ Run Code",-1),$=s(`
js
Artplayer.INFO_LOOP_TIME = 2000;
+});

INFO_LOOP_TIME ​

信息面板的刷新时间,单位为毫秒,默认为 1000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.INFO_LOOP_TIME = 2000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-art.info.show = true;

FAST_FORWARD_VALUE ​

在移动端,长按加速的速率倍数,默认为 3

`,3),Z=i("div",{className:"run-code"},"▶ Run Code",-1),J=s(`
js
Artplayer.FAST_FORWARD_VALUE = 5;
+art.info.show = true;

FAST_FORWARD_VALUE ​

在移动端,长按加速的速率倍数,默认为 3

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FAST_FORWARD_VALUE = 5;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

FAST_FORWARD_TIME ​

在移动端,长按加速的延迟时间,单位为毫秒,默认为 1000

`,3),Q=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s(`
js
Artplayer.FAST_FORWARD_TIME = 2000;
+});

FAST_FORWARD_TIME ​

在移动端,长按加速的延迟时间,单位为毫秒,默认为 1000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FAST_FORWARD_TIME = 2000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

TOUCH_MOVE_RATIO ​

在移动端,左右滑动进度的速率倍数,默认为 0.5

`,3),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s(`
js
Artplayer.TOUCH_MOVE_RATIO = 1;
+});

TOUCH_MOVE_RATIO ​

在移动端,左右滑动进度的速率倍数,默认为 0.5

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.TOUCH_MOVE_RATIO = 1;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

VOLUME_STEP ​

快捷键调节音量的幅度比例,默认为 0.1

`,3),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s(`
js
Artplayer.VOLUME_STEP = 0.2;
+});

VOLUME_STEP ​

快捷键调节音量的幅度比例,默认为 0.1

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.VOLUME_STEP = 0.2;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

SEEK_STEP ​

快捷键调节播放进度的幅度,单位为秒,默认为 5

`,3),ps=i("div",{className:"run-code"},"▶ Run Code",-1),es=s(`
js
Artplayer.SEEK_STEP = 10;
+});

SEEK_STEP ​

快捷键调节播放进度的幅度,单位为秒,默认为 5

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SEEK_STEP = 10;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

PLAYBACK_RATE ​

内置播放速率的列表,默认为 [0.5, 0.75, 1, 1.25, 1.5, 2]

`,3),hs=i("div",{className:"run-code"},"▶ Run Code",-1),ts=s(`
js
Artplayer.PLAYBACK_RATE = [0.5, 1, 2, 3, 4, 5];
+});

PLAYBACK_RATE ​

内置播放速率的列表,默认为 [0.5, 0.75, 1, 1.25, 1.5, 2]

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.PLAYBACK_RATE = [0.5, 1, 2, 3, 4, 5];
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -177,7 +177,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

ASPECT_RATIO ​

内置视频长宽比的列表,默认为 ['default', '4:3', '16:9']

`,3),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s(`
js
Artplayer.ASPECT_RATIO = ['default', '1:1', '2:1', '4:3', '6:5'];
+art.setting.show = true;

ASPECT_RATIO ​

内置视频长宽比的列表,默认为 ['default', '4:3', '16:9']

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.ASPECT_RATIO = ['default', '1:1', '2:1', '4:3', '6:5'];
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -187,7 +187,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

FLIP ​

内置视频翻转的列表,默认为 ['normal', 'horizontal', 'vertical']

`,3),Es=i("div",{className:"run-code"},"▶ Run Code",-1),ds=s(`
js
Artplayer.FLIP = ['normal', 'horizontal'];
+art.setting.show = true;

FLIP ​

内置视频翻转的列表,默认为 ['normal', 'horizontal', 'vertical']

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FLIP = ['normal', 'horizontal'];
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -197,21 +197,21 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

FULLSCREEN_WEB_IN_BODY ​

网页全屏时,是否把播放器挂在在 body 元素下,默认为 false

`,3),cs=i("div",{className:"run-code"},"▶ Run Code",-1),gs=s(`
js
Artplayer.FULLSCREEN_WEB_IN_BODY = true;
+art.setting.show = true;

FULLSCREEN_WEB_IN_BODY ​

网页全屏时,是否把播放器挂在在 body 元素下,默认为 false

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FULLSCREEN_WEB_IN_BODY = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
-});

LOG_VERSION ​

设置是否打印播放器版本,默认为 true

`,3),ys=i("div",{className:"run-code"},"▶ Run Code",-1),os=s(`
js
Artplayer.LOG_VERSION = false;
+});

LOG_VERSION ​

设置是否打印播放器版本,默认为 true

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.LOG_VERSION = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

USE_RAF ​

设置是否使用 requestAnimationFrame ,默认为 false,目前主要用于进度条的平滑效果

`,3),bs=i("div",{className:"run-code"},"▶ Run Code",-1),us=s(`
js
Artplayer.USE_RAF = true;
+});

USE_RAF ​

设置是否使用 requestAnimationFrame ,默认为 false,目前主要用于进度条的平滑效果

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.USE_RAF = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});
`,1),Fs=[e,h,t,k,r,E,d,c,g,y,o,b,u,F,_,m,C,A,v,T,B,D,I,S,P,R,N,O,w,L,V,x,f,q,j,M,U,K,Y,G,H,W,X,z,$,Z,J,Q,ss,is,as,ns,ls,ps,es,hs,ts,ks,rs,Es,ds,cs,gs,ys,os,bs,us];function _s(ms,Cs,As,vs,Ts,Bs){return l(),n("div",null,Fs)}const Ss=a(p,[["render",_s]]);export{Is as __pageData,Ss as default}; +});
`,1)]))}const y=n(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/advanced_global.md.BrPgVIjS.lean.js b/docs/document/assets/advanced_global.md.BrPgVIjS.lean.js new file mode 100644 index 000000000..be7b13d9b --- /dev/null +++ b/docs/document/assets/advanced_global.md.BrPgVIjS.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"全局属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/global.md","filePath":"advanced/global.md","lastUpdated":1718941442000}'),e={name:"advanced/global.md"};function h(t,a,k,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/advanced_plugin.md.BreKSsG5.js b/docs/document/assets/advanced_plugin.md.BXZAPwSl.js similarity index 89% rename from docs/document/assets/advanced_plugin.md.BreKSsG5.js rename to docs/document/assets/advanced_plugin.md.BXZAPwSl.js index 446a10721..4a9544faf 100644 --- a/docs/document/assets/advanced_plugin.md.BreKSsG5.js +++ b/docs/document/assets/advanced_plugin.md.BXZAPwSl.js @@ -1,4 +1,4 @@ -import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjPBJ.js";const v=JSON.parse('{"title":"编写插件","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/plugin.md","filePath":"advanced/plugin.md","lastUpdated":1673441101000}'),h={name:"advanced/plugin.md"},e=s("h1",{id:"编写插件",tabindex:"-1"},[i("编写插件 "),s("a",{class:"header-anchor",href:"#编写插件","aria-label":'Permalink to "编写插件"'},"​")],-1),k=s("p",null,[i("但你已经知道播放器的"),s("code",null,"属性"),i(", "),s("code",null,"方法"),i("和"),s("code",null,"事件"),i("后,再编写插件是非常简单的事")],-1),t=s("p",null,"可以在实例化的时候加载插件的函数",-1),E=s("div",{className:"run-code"},"▶ Run Code",-1),r=a(`
js
function myPlugin(art) {
+import{_ as l,c as p,o as h,j as s,ak as a,a as i}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"编写插件","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/plugin.md","filePath":"advanced/plugin.md","lastUpdated":1673441101000}'),k={name:"advanced/plugin.md"};function e(t,n,E,r,d,g){return h(),p("div",null,n[0]||(n[0]=[s("h1",{id:"编写插件",tabindex:"-1"},[i("编写插件 "),s("a",{class:"header-anchor",href:"#编写插件","aria-label":'Permalink to "编写插件"'},"​")],-1),s("p",null,[i("但你已经知道播放器的"),s("code",null,"属性"),i(", "),s("code",null,"方法"),i("和"),s("code",null,"事件"),i("后,再编写插件是非常简单的事")],-1),s("p",null,"可以在实例化的时候加载插件的函数",-1),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -17,7 +17,7 @@ import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjP
 
 art.on('ready', () => {
     console.info(art.plugins.myPlugin);
-});

可以在实例化之后再加载插件的函数

`,2),d=s("div",{className:"run-code"},"▶ Run Code",-1),g=a(`
js
function myPlugin(art) {
+});

可以在实例化之后再加载插件的函数

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -37,7 +37,7 @@ import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjP
 
 art.on('ready', () => {
     console.info(art.plugins.myPlugin);
-});

例如我想写一个在视频暂停后,显示一个图片广告的插件

`,2),c=s("div",{className:"run-code"},"▶ Run Code",-1),y=a(`
js
function adsPlugin(option) {
+});

例如我想写一个在视频暂停后,显示一个图片广告的插件

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),a(`
js
function adsPlugin(option) {
     return (art) => {
         art.layers.add({
             name: 'ads',
@@ -96,4 +96,4 @@ import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjP
             url: '/assets/sample/layer.png'
         })
     ],
-});
`,1),b=[e,k,t,E,r,d,g,c,y];function F(u,m,o,C,B,_){return p(),l("div",null,b)}const D=n(h,[["render",F]]);export{v as __pageData,D as default}; +});
`,1)]))}const b=l(k,[["render",e]]);export{y as __pageData,b as default}; diff --git a/docs/document/assets/advanced_plugin.md.BXZAPwSl.lean.js b/docs/document/assets/advanced_plugin.md.BXZAPwSl.lean.js new file mode 100644 index 000000000..4c24f3773 --- /dev/null +++ b/docs/document/assets/advanced_plugin.md.BXZAPwSl.lean.js @@ -0,0 +1 @@ +import{_ as l,c as p,o as h,j as s,ak as a,a as i}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"编写插件","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/plugin.md","filePath":"advanced/plugin.md","lastUpdated":1673441101000}'),k={name:"advanced/plugin.md"};function e(t,n,E,r,d,g){return h(),p("div",null,n[0]||(n[0]=[s("h1",{id:"编写插件",tabindex:"-1"},[i("编写插件 "),s("a",{class:"header-anchor",href:"#编写插件","aria-label":'Permalink to "编写插件"'},"​")],-1),s("p",null,[i("但你已经知道播放器的"),s("code",null,"属性"),i(", "),s("code",null,"方法"),i("和"),s("code",null,"事件"),i("后,再编写插件是非常简单的事")],-1),s("p",null,"可以在实例化的时候加载插件的函数",-1),s("div",{className:"run-code"},"▶ Run Code",-1),a("",2),s("div",{className:"run-code"},"▶ Run Code",-1),a("",2),s("div",{className:"run-code"},"▶ Run Code",-1),a("",1)]))}const b=l(k,[["render",e]]);export{y as __pageData,b as default}; diff --git a/docs/document/assets/advanced_plugin.md.BreKSsG5.lean.js b/docs/document/assets/advanced_plugin.md.BreKSsG5.lean.js deleted file mode 100644 index 663498e69..000000000 --- a/docs/document/assets/advanced_plugin.md.BreKSsG5.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjPBJ.js";const v=JSON.parse('{"title":"编写插件","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/plugin.md","filePath":"advanced/plugin.md","lastUpdated":1673441101000}'),h={name:"advanced/plugin.md"},e=s("h1",{id:"编写插件",tabindex:"-1"},[i("编写插件 "),s("a",{class:"header-anchor",href:"#编写插件","aria-label":'Permalink to "编写插件"'},"​")],-1),k=s("p",null,[i("但你已经知道播放器的"),s("code",null,"属性"),i(", "),s("code",null,"方法"),i("和"),s("code",null,"事件"),i("后,再编写插件是非常简单的事")],-1),t=s("p",null,"可以在实例化的时候加载插件的函数",-1),E=s("div",{className:"run-code"},"▶ Run Code",-1),r=a("",2),d=s("div",{className:"run-code"},"▶ Run Code",-1),g=a("",2),c=s("div",{className:"run-code"},"▶ Run Code",-1),y=a("",1),b=[e,k,t,E,r,d,g,c,y];function F(u,m,o,C,B,_){return p(),l("div",null,b)}const D=n(h,[["render",F]]);export{v as __pageData,D as default}; diff --git a/docs/document/assets/advanced_property.md.DxYgetVh.js b/docs/document/assets/advanced_property.md.Bv9cWBio.js similarity index 88% rename from docs/document/assets/advanced_property.md.DxYgetVh.js rename to docs/document/assets/advanced_property.md.Bv9cWBio.js index b9679730a..ced1937da 100644 --- a/docs/document/assets/advanced_property.md.DxYgetVh.js +++ b/docs/document/assets/advanced_property.md.Bv9cWBio.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const Qs=JSON.parse('{"title":"实例属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/property.md","filePath":"advanced/property.md","lastUpdated":1726306667000}'),p={name:"advanced/property.md"},e=s('

实例属性 ​

这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用

play ​

  • Type: Function

播放视频

',5),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"实例属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/property.md","filePath":"advanced/property.md","lastUpdated":1726306667000}'),e={name:"advanced/property.md"};function h(t,a,k,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s('

实例属性 ​

这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用

play ​

  • Type: Function

播放视频

',5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -6,7 +6,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     art.play();
-});

pause ​

  • Type: Function

暂停视频

`,4),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s(`
js
var art = new Artplayer({
+});

pause ​

  • Type: Function

暂停视频

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -18,7 +18,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.pause();
     }, 3000);
-});

toggle ​

  • Type: Function

切换视频的播放和暂停

`,4),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var art = new Artplayer({
+});

toggle ​

  • Type: Function

切换视频的播放和暂停

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -30,28 +30,28 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.toggle();
     }, 3000);
-});

destroy ​

  • Type: Function
  • Parameter: Boolean

销毁播放器,接受一个参数表示是否销毁后同时移除播放器的 html,默认为 true

`,4),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s(`
js
var art = new Artplayer({
+});

destroy ​

  • Type: Function
  • Parameter: Boolean

销毁播放器,接受一个参数表示是否销毁后同时移除播放器的 html,默认为 true

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.destroy();
-});

seek ​

  • Type: Setter
  • Parameter: Number

视频时间跳转,单位秒

`,4),y=i("div",{className:"run-code"},"▶ Run Code",-1),o=s(`
js
var art = new Artplayer({
+});

seek ​

  • Type: Setter
  • Parameter: Number

视频时间跳转,单位秒

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.seek = 5;
-});

forward ​

  • Type: Setter
  • Parameter: Number

视频时间快进,单位秒

`,4),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s(`
js
var art = new Artplayer({
+});

forward ​

  • Type: Setter
  • Parameter: Number

视频时间快进,单位秒

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.forward = 5;
-});

backward ​

  • Type: Setter
  • Parameter: Number

视频时间快退,单位秒

`,4),F=i("div",{className:"run-code"},"▶ Run Code",-1),m=s(`
js
var art = new Artplayer({
+});

backward ​

  • Type: Setter
  • Parameter: Number

视频时间快退,单位秒

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -62,7 +62,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.backward = 2;
     }, 3000);
-});

volume ​

  • Type: Setter/Getter
  • Parameter: Number

设置和获取视频音量,范围在:[0, 1]

`,4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s(`
js
var art = new Artplayer({
+});

volume ​

  • Type: Setter/Getter
  • Parameter: Number

设置和获取视频音量,范围在:[0, 1]

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -71,14 +71,14 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.volume);
     art.volume = 0.5;
     console.info(art.volume);
-});

url ​

  • Type: Setter/Getter
  • Parameter: String

设置和获取视频地址

`,4),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s(`
js
var art = new Artplayer({
+});

url ​

  • Type: Setter/Getter
  • Parameter: String

设置和获取视频地址

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.url = '/assets/sample/video.mp4?t=0';
-});

switch ​

  • Type: Setter
  • Parameter: String

设置视频地址,设置时和 art.url 类似,但会执行一些优化操作

`,4),B=i("div",{className:"run-code"},"▶ Run Code",-1),T=s(`
js
var art = new Artplayer({
+});

switch ​

  • Type: Setter
  • Parameter: String

设置视频地址,设置时和 art.url 类似,但会执行一些优化操作

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -88,7 +88,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.switch = '/assets/sample/video.mp4?t=0';
     }, 3000);
-});

switchUrl ​

  • Type: Function
  • Parameter: String

设置视频地址,设置时和 art.url 类似,但会执行一些优化操作

`,4),D=i("div",{className:"run-code"},"▶ Run Code",-1),S=s(`
js
var art = new Artplayer({
+});

switchUrl ​

  • Type: Function
  • Parameter: String

设置视频地址,设置时和 art.url 类似,但会执行一些优化操作

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -98,7 +98,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.switchUrl('/assets/sample/video.mp4?t=0');
     }, 3000);
-});

提示

art.switch 和 art.switchUrl 的功能是一样的,只是 art.switchUrl 方法会返回 Promise,当 resolve 时表示新地址是可以播放,reject 时表示新地址加载错误

switchQuality ​

  • Type: Function
  • Parameter: String

设置视频画质地址,和 art.switchUrl 类似,但会带上之前的播放进度

`,5),P=i("div",{className:"run-code"},"▶ Run Code",-1),w=s(`
js
var art = new Artplayer({
+});

提示

art.switch 和 art.switchUrl 的功能是一样的,只是 art.switchUrl 方法会返回 Promise,当 resolve 时表示新地址是可以播放,reject 时表示新地址加载错误

switchQuality ​

  • Type: Function
  • Parameter: String

设置视频画质地址,和 art.switchUrl 类似,但会带上之前的播放进度

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -108,7 +108,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.switchQuality('/assets/sample/video.mp4?t=0');
     }, 3000);
-});

muted ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取视频是否静音

`,4),f=i("div",{className:"run-code"},"▶ Run Code",-1),q=s(`
js
var art = new Artplayer({
+});

muted ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取视频是否静音

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -117,7 +117,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.muted);
     art.muted = true;
     console.info(art.muted);
-});

currentTime ​

  • Type: Setter/Getter
  • Parameter: Number

设置和获取视频当前时间,设置时间时和 seek 类似,但它不会触发额外的事件

`,4),R=i("div",{className:"run-code"},"▶ Run Code",-1),N=s(`
js
var art = new Artplayer({
+});

currentTime ​

  • Type: Setter/Getter
  • Parameter: Number

设置和获取视频当前时间,设置时间时和 seek 类似,但它不会触发额外的事件

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -126,21 +126,21 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.currentTime);
     art.currentTime = 5;
     console.info(art.currentTime);
-});

duration ​

  • Type: Getter

获取视频时长

`,4),x=i("div",{className:"run-code"},"▶ Run Code",-1),V=s(`
js
var art = new Artplayer({
+});

duration ​

  • Type: Getter

获取视频时长

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info(art.duration);
-});

提示

有的视频是没有时长的,例如直播中的视频或者没被解码完成的视频,这个时候获取的时长会是 0

screenshot ​

  • Type: Function

下载当前视频帧的截图, 可选参数为截图名字

`,5),I=i("div",{className:"run-code"},"▶ Run Code",-1),j=s(`
js
var art = new Artplayer({
+});

提示

有的视频是没有时长的,例如直播中的视频或者没被解码完成的视频,这个时候获取的时长会是 0

screenshot ​

  • Type: Function

下载当前视频帧的截图, 可选参数为截图名字

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.screenshot('your-name');
-});

getDataURL ​

  • Type: Function

获取当前视频帧的截图的base64地址,返回的是一个 Promise

`,4),G=i("div",{className:"run-code"},"▶ Run Code",-1),U=s(`
js
var art = new Artplayer({
+});

getDataURL ​

  • Type: Function

获取当前视频帧的截图的base64地址,返回的是一个 Promise

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -148,7 +148,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 art.on('ready', async () => {
     const url = await art.getDataURL();
 	console.info(url)
-});

getBlobUrl ​

  • Type: Function

获取当前视频帧的截图的blob地址,返回的是一个 Promise

`,4),O=i("div",{className:"run-code"},"▶ Run Code",-1),z=s(`
js
var art = new Artplayer({
+});

getBlobUrl ​

  • Type: Function

获取当前视频帧的截图的blob地址,返回的是一个 Promise

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -156,7 +156,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 art.on('ready', async () => {
     const url = await art.getBlobUrl();
     console.info(url);
-});

fullscreen ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取播放器窗口全屏

`,4),H=i("div",{className:"run-code"},"▶ Run Code",-1),L=s(`
js
var art = new Artplayer({
+});

fullscreen ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取播放器窗口全屏

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -168,7 +168,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

提示

由于浏览器安全机制,触发窗口全屏前,页面必须先存在交互(例如用户点击过页面)

fullscreenWeb ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取播放器网页全屏

`,5),W=i("div",{className:"run-code"},"▶ Run Code",-1),$=s(`
js
var art = new Artplayer({
+});

提示

由于浏览器安全机制,触发窗口全屏前,页面必须先存在交互(例如用户点击过页面)

fullscreenWeb ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取播放器网页全屏

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
@@ -180,7 +180,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.fullscreenWeb = false;
     }, 3000);
-});

pip ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取播放器画中画模式

`,4),M=i("div",{className:"run-code"},"▶ Run Code",-1),Q=s(`
js
var art = new Artplayer({
+});

pip ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取播放器画中画模式

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -192,7 +192,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

提示

由于浏览器安全机制,触发画中画前,页面必须先存在交互(例如用户点击过页面)

poster ​

  • Type: Setter/Getter
  • Parameter: String

设置和获取视频海报,只有在视频播放前才能看到海报效果

`,5),J=i("div",{className:"run-code"},"▶ Run Code",-1),K=s(`
js
var art = new Artplayer({
+});

提示

由于浏览器安全机制,触发画中画前,页面必须先存在交互(例如用户点击过页面)

poster ​

  • Type: Setter/Getter
  • Parameter: String

设置和获取视频海报,只有在视频播放前才能看到海报效果

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     poster: '/assets/sample/poster.jpg',
@@ -202,14 +202,14 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.poster);
     art.poster = '/assets/sample/poster.jpg?t=0';
     console.info(art.poster);
-});

mini ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取播放器迷你模式

`,4),X=i("div",{className:"run-code"},"▶ Run Code",-1),Y=s(`
js
var art = new Artplayer({
+});

mini ​

  • Type: Setter/Getter
  • Parameter: Boolean

设置和获取播放器迷你模式

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.mini = true;
-});

playing ​

  • Type: Getter
  • Parameter: Boolean

获取视频是否正在播放中

`,4),Z=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s(`
js
var art = new Artplayer({
+});

playing ​

  • Type: Getter
  • Parameter: Boolean

获取视频是否正在播放中

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -217,21 +217,21 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     console.info(art.playing);
-});

autoSize ​

  • Type: Function

设置视频是否自适应尺寸

`,4),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s(`
js
var art = new Artplayer({
+});

autoSize ​

  • Type: Function

设置视频是否自适应尺寸

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.autoSize();
-});

rect ​

  • Type: Getter

获取播放器的尺寸和坐标信息

`,4),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s(`
js
var art = new Artplayer({
+});

rect ​

  • Type: Getter

获取播放器的尺寸和坐标信息

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info(JSON.stringify(art.rect));
-});

提示

尺寸和坐标信息是通过 getBoundingClientRect 获取的

flip ​

  • Type: Setter/Getter
  • Parameter: String

设置和获取播放器翻转,支持normal, horizontal, vertical

`,5),ps=i("div",{className:"run-code"},"▶ Run Code",-1),es=s(`
js
var art = new Artplayer({
+});

提示

尺寸和坐标信息是通过 getBoundingClientRect 获取的

flip ​

  • Type: Setter/Getter
  • Parameter: String

设置和获取播放器翻转,支持normal, horizontal, vertical

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -240,7 +240,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.flip);
     art.flip = 'horizontal';
     console.info(art.flip);
-});

playbackRate ​

  • Type: Setter/Getter
  • Parameter: Number

设置和获取播放器播放速度

`,4),hs=i("div",{className:"run-code"},"▶ Run Code",-1),ts=s(`
js
var art = new Artplayer({
+});

playbackRate ​

  • Type: Setter/Getter
  • Parameter: Number

设置和获取播放器播放速度

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -249,7 +249,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.playbackRate);
     art.playbackRate = 2;
     console.info(art.playbackRate);
-});

aspectRatio ​

  • Type: Setter/Getter
  • Parameter: String

设置和获取播放器长宽比

`,4),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s(`
js
var art = new Artplayer({
+});

aspectRatio ​

  • Type: Setter/Getter
  • Parameter: String

设置和获取播放器长宽比

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -258,7 +258,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.aspectRatio);
     art.aspectRatio = '16:9';
     console.info(art.aspectRatio);
-});

autoHeight ​

  • Type: Function

当容器只有宽度,该属性可以自动计算出并设置视频的高度

`,4),Es=i("div",{className:"run-code"},"▶ Run Code",-1),ds=s(`
js
var art = new Artplayer({
+});

autoHeight ​

  • Type: Function

当容器只有宽度,该属性可以自动计算出并设置视频的高度

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -269,7 +269,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('resize', () => {
     art.autoHeight();
-});

提示

当你的容器只有宽度,但不知道具体高度时,这个属性很有用,它能自动计算出视频的高度,但你需要确定设置这个属性的时机

attr ​

  • Type: Function
  • Parameter: String

动态获取和设置 video 元素的属性

`,5),cs=i("div",{className:"run-code"},"▶ Run Code",-1),gs=s(`
js
var art = new Artplayer({
+});

提示

当你的容器只有宽度,但不知道具体高度时,这个属性很有用,它能自动计算出视频的高度,但你需要确定设置这个属性的时机

attr ​

  • Type: Function
  • Parameter: String

动态获取和设置 video 元素的属性

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -278,7 +278,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.attr('playsInline'));
     art.attr('playsInline', true);
     console.info(art.attr('playsInline'));
-});

type ​

  • Type: Setter/Getter
  • Parameter: String

动态获取和设置视频类型

`,4),ys=i("div",{className:"run-code"},"▶ Run Code",-1),os=s(`
js
var art = new Artplayer({
+});

type ​

  • Type: Setter/Getter
  • Parameter: String

动态获取和设置视频类型

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -287,7 +287,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.type);
     art.type = 'm3u8';
     console.info(art.type);
-});

theme ​

  • Type: Setter/Getter
  • Parameter: String

动态获取和设置播放器主题颜色

`,4),bs=i("div",{className:"run-code"},"▶ Run Code",-1),us=s(`
js
var art = new Artplayer({
+});

theme ​

  • Type: Setter/Getter
  • Parameter: String

动态获取和设置播放器主题颜色

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -296,7 +296,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.theme);
     art.theme = '#000';
     console.info(art.theme);
-});

airplay ​

  • Type: Function

开启隔空播放

`,4),Fs=i("div",{className:"run-code"},"▶ Run Code",-1),ms=s(`
js
var art = new Artplayer({
+});

airplay ​

  • Type: Function

开启隔空播放

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -308,21 +308,21 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

loaded ​

  • Type: Getter

视频缓存的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用

`,4),_s=i("div",{className:"run-code"},"▶ Run Code",-1),Cs=s(`
js
var art = new Artplayer({
+});

loaded ​

  • Type: Getter

视频缓存的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.loaded);
-});

played ​

  • Type: Getter

视频播放的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用

`,4),vs=i("div",{className:"run-code"},"▶ Run Code",-1),As=s(`
js
var art = new Artplayer({
+});

played ​

  • Type: Getter

视频播放的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.played);
-});

proxy ​

  • Type: Function

DOM 事件的代理函数,实质上代理了 addEventListener 和 removeEventListener, 当使用 proxy 来处理事件,播放器销毁时也会自动销毁该事件

`,4),Bs=i("div",{className:"run-code"},"▶ Run Code",-1),Ts=s(`
js
var container = document.querySelector('.artplayer-app');
+});

proxy ​

  • Type: Function

DOM 事件的代理函数,实质上代理了 addEventListener 和 removeEventListener, 当使用 proxy 来处理事件,播放器销毁时也会自动销毁该事件

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var container = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
 	container: container,
@@ -331,17 +331,17 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.proxy(container, 'click', event => {
 	console.info(event);
-});

提示

假如你需要一些 DOM 事件只存在于播放器的生命周期上时,强烈建议使用该函数,以避免造成内存泄漏

query ​

  • Type: Function

DOM 的查询函数,类似 document.querySelector,但被查询的对象局限于当前播放器内,可以避免同类名的错误

`,5),Ds=i("div",{className:"run-code"},"▶ Run Code",-1),Ss=s(`
js
var art = new Artplayer({
+});

提示

假如你需要一些 DOM 事件只存在于播放器的生命周期上时,强烈建议使用该函数,以避免造成内存泄漏

query ​

  • Type: Function

DOM 的查询函数,类似 document.querySelector,但被查询的对象局限于当前播放器内,可以避免同类名的错误

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
 
-console.info(art.query('.art-video'));

video ​

  • Type: Element

快捷返回播放器的 video 元素

`,4),Ps=i("div",{className:"run-code"},"▶ Run Code",-1),ws=s(`
js
var art = new Artplayer({
+console.info(art.query('.art-video'));

video ​

  • Type: Element

快捷返回播放器的 video 元素

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
 
-console.info(art.video);

cssVar ​

  • Type: Function

动态获取或设置 css 变量

`,4),fs=i("div",{className:"run-code"},"▶ Run Code",-1),qs=s(`
js
var art = new Artplayer({
+console.info(art.video);

cssVar ​

  • Type: Function

动态获取或设置 css 变量

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -350,7 +350,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.log(art.cssVar('--art-theme'));
     art.cssVar('--art-theme', 'green');
     console.log(art.cssVar('--art-theme'));
-});

quality ​

  • Type: Setter
  • Parameter: Array

动态设置画质列表

`,4),Rs=i("div",{className:"run-code"},"▶ Run Code",-1),Ns=s(`
js
var art = new Artplayer({
+});

quality ​

  • Type: Setter
  • Parameter: Array

动态设置画质列表

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 	quality: [
@@ -380,7 +380,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 			},
 		];
 	}, 3000);
-})

thumbnails ​

  • Type: Setter/Getter
  • Parameter: Object

动态设置缩略图

`,4),xs=i("div",{className:"run-code"},"▶ Run Code",-1),Vs=s(`
js
var art = new Artplayer({
+})

thumbnails ​

  • Type: Setter/Getter
  • Parameter: Object

动态设置缩略图

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -391,7 +391,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         number: 60,
         column: 10,
     };
-});

subtitleOffset ​

  • Type: Setter/Getter
  • Parameter: Number

动态设置字幕偏移

`,4),Is=i("div",{className:"run-code"},"▶ Run Code",-1),js=s(`
js
var art = new Artplayer({
+});

subtitleOffset ​

  • Type: Setter/Getter
  • Parameter: Number

动态设置字幕偏移

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
     subtitle: {
@@ -401,4 +401,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     art.subtitleOffset = 1;
-});
`,1),Gs=[e,h,t,k,r,E,d,c,g,y,o,b,u,F,m,_,C,v,A,B,T,D,S,P,w,f,q,R,N,x,V,I,j,G,U,O,z,H,L,W,$,M,Q,J,K,X,Y,Z,ss,is,as,ns,ls,ps,es,hs,ts,ks,rs,Es,ds,cs,gs,ys,os,bs,us,Fs,ms,_s,Cs,vs,As,Bs,Ts,Ds,Ss,Ps,ws,fs,qs,Rs,Ns,xs,Vs,Is,js];function Us(Os,zs,Hs,Ls,Ws,$s){return l(),n("div",null,Gs)}const Js=a(p,[["render",Us]]);export{Qs as __pageData,Js as default}; +});
`,1)]))}const y=n(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/advanced_property.md.Bv9cWBio.lean.js b/docs/document/assets/advanced_property.md.Bv9cWBio.lean.js new file mode 100644 index 000000000..3e2e38ee9 --- /dev/null +++ b/docs/document/assets/advanced_property.md.Bv9cWBio.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"实例属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/property.md","filePath":"advanced/property.md","lastUpdated":1726306667000}'),e={name:"advanced/property.md"};function h(t,a,k,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/advanced_property.md.DxYgetVh.lean.js b/docs/document/assets/advanced_property.md.DxYgetVh.lean.js deleted file mode 100644 index c5ebacd27..000000000 --- a/docs/document/assets/advanced_property.md.DxYgetVh.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const Qs=JSON.parse('{"title":"实例属性","description":"","frontmatter":{},"headers":[],"relativePath":"advanced/property.md","filePath":"advanced/property.md","lastUpdated":1726306667000}'),p={name:"advanced/property.md"},e=s("",5),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",4),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",4),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",4),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s("",4),y=i("div",{className:"run-code"},"▶ Run Code",-1),o=s("",4),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s("",4),F=i("div",{className:"run-code"},"▶ Run Code",-1),m=s("",4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s("",4),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s("",4),B=i("div",{className:"run-code"},"▶ Run Code",-1),T=s("",4),D=i("div",{className:"run-code"},"▶ Run Code",-1),S=s("",5),P=i("div",{className:"run-code"},"▶ Run Code",-1),w=s("",4),f=i("div",{className:"run-code"},"▶ Run Code",-1),q=s("",4),R=i("div",{className:"run-code"},"▶ Run Code",-1),N=s("",4),x=i("div",{className:"run-code"},"▶ Run Code",-1),V=s("",5),I=i("div",{className:"run-code"},"▶ Run Code",-1),j=s("",4),G=i("div",{className:"run-code"},"▶ Run Code",-1),U=s("",4),O=i("div",{className:"run-code"},"▶ Run Code",-1),z=s("",4),H=i("div",{className:"run-code"},"▶ Run Code",-1),L=s("",5),W=i("div",{className:"run-code"},"▶ Run Code",-1),$=s("",4),M=i("div",{className:"run-code"},"▶ Run Code",-1),Q=s("",5),J=i("div",{className:"run-code"},"▶ Run Code",-1),K=s("",4),X=i("div",{className:"run-code"},"▶ Run Code",-1),Y=s("",4),Z=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s("",4),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s("",4),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s("",5),ps=i("div",{className:"run-code"},"▶ Run Code",-1),es=s("",4),hs=i("div",{className:"run-code"},"▶ Run Code",-1),ts=s("",4),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s("",4),Es=i("div",{className:"run-code"},"▶ Run Code",-1),ds=s("",5),cs=i("div",{className:"run-code"},"▶ Run Code",-1),gs=s("",4),ys=i("div",{className:"run-code"},"▶ Run Code",-1),os=s("",4),bs=i("div",{className:"run-code"},"▶ Run Code",-1),us=s("",4),Fs=i("div",{className:"run-code"},"▶ Run Code",-1),ms=s("",4),_s=i("div",{className:"run-code"},"▶ Run Code",-1),Cs=s("",4),vs=i("div",{className:"run-code"},"▶ Run Code",-1),As=s("",4),Bs=i("div",{className:"run-code"},"▶ Run Code",-1),Ts=s("",5),Ds=i("div",{className:"run-code"},"▶ Run Code",-1),Ss=s("",4),Ps=i("div",{className:"run-code"},"▶ Run Code",-1),ws=s("",4),fs=i("div",{className:"run-code"},"▶ Run Code",-1),qs=s("",4),Rs=i("div",{className:"run-code"},"▶ Run Code",-1),Ns=s("",4),xs=i("div",{className:"run-code"},"▶ Run Code",-1),Vs=s("",4),Is=i("div",{className:"run-code"},"▶ Run Code",-1),js=s("",1),Gs=[e,h,t,k,r,E,d,c,g,y,o,b,u,F,m,_,C,v,A,B,T,D,S,P,w,f,q,R,N,x,V,I,j,G,U,O,z,H,L,W,$,M,Q,J,K,X,Y,Z,ss,is,as,ns,ls,ps,es,hs,ts,ks,rs,Es,ds,cs,gs,ys,os,bs,us,Fs,ms,_s,Cs,vs,As,Bs,Ts,Ds,Ss,Ps,ws,fs,qs,Rs,Ns,xs,Vs,Is,js];function Us(Os,zs,Hs,Ls,Ws,$s){return l(),n("div",null,Gs)}const Js=a(p,[["render",Us]]);export{Qs as __pageData,Js as default}; diff --git a/docs/document/assets/app.7_G5wuQ7.js b/docs/document/assets/app.7_G5wuQ7.js new file mode 100644 index 000000000..9ba172ec9 --- /dev/null +++ b/docs/document/assets/app.7_G5wuQ7.js @@ -0,0 +1 @@ +import{t as p}from"./chunks/theme.LLaJeaxP.js";import{R as s,a6 as i,a7 as u,a8 as c,a9 as l,aa as f,ab as d,ac as m,ad as h,ae as g,af as A,d as v,u as y,v as C,s as P,ag as b,ah as w,ai as R,aj as E}from"./chunks/framework.CIzAx-5p.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=D(),a=j();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return A(S)}function D(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp}; diff --git a/docs/document/assets/app.CgT6V0gx.js b/docs/document/assets/app.CgT6V0gx.js deleted file mode 100644 index e93dcb12e..000000000 --- a/docs/document/assets/app.CgT6V0gx.js +++ /dev/null @@ -1 +0,0 @@ -import{U as o,a8 as p,a9 as u,aa as l,ab as c,ac as f,ad as d,ae as m,af as h,ag as g,ah as A,d as P,u as v,y,x as C,ai as b,aj as w,ak as E,al as R}from"./chunks/framework.DHbvjPBJ.js";import{t as S}from"./chunks/theme.DtPPs-el.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),_=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{C(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),E(),s.setup&&s.setup(),()=>R(s.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=x(),a=j();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return h(_)}function x(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{T as createApp}; diff --git a/docs/document/assets/chunks/framework.CIzAx-5p.js b/docs/document/assets/chunks/framework.CIzAx-5p.js new file mode 100644 index 000000000..b5fc7676b --- /dev/null +++ b/docs/document/assets/chunks/framework.CIzAx-5p.js @@ -0,0 +1,18 @@ +/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function js(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ee={},Rt=[],Ue=()=>{},Ko=()=>!1,tn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vs=e=>e.startsWith("onUpdate:"),de=Object.assign,ks=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},qo=Object.prototype.hasOwnProperty,Q=(e,t)=>qo.call(e,t),B=Array.isArray,Mt=e=>Fn(e)==="[object Map]",ii=e=>Fn(e)==="[object Set]",G=e=>typeof e=="function",oe=e=>typeof e=="string",Je=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",oi=e=>(se(e)||G(e))&&G(e.then)&&G(e.catch),li=Object.prototype.toString,Fn=e=>li.call(e),Go=e=>Fn(e).slice(8,-1),ci=e=>Fn(e)==="[object Object]",Us=e=>oe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ot=js(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Xo=/-(\w)/g,Ne=Hn(e=>e.replace(Xo,(t,n)=>n?n.toUpperCase():"")),Yo=/\B([A-Z])/g,rt=Hn(e=>e.replace(Yo,"-$1").toLowerCase()),Dn=Hn(e=>e.charAt(0).toUpperCase()+e.slice(1)),_n=Hn(e=>e?`on${Dn(e)}`:""),nt=(e,t)=>!Object.is(e,t),wn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Ts=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Jo=e=>{const t=oe(e)?Number(e):NaN;return isNaN(t)?e:t};let ar;const $n=()=>ar||(ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ws(e){if(B(e)){const t={};for(let n=0;n{if(n){const s=n.split(Qo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Bs(e){let t="";if(oe(e))t=e;else if(B(e))for(let n=0;n!!(e&&e.__v_isRef===!0),sl=e=>oe(e)?e:e==null?"":B(e)||se(e)&&(e.toString===li||!G(e.toString))?ui(e)?sl(e.value):JSON.stringify(e,di,2):String(e),di=(e,t)=>ui(t)?di(e,t.value):Mt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[es(s,i)+" =>"]=r,n),{})}:ii(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>es(n))}:Je(t)?es(t):se(t)&&!B(t)&&!ci(t)?String(t):t,es=(e,t="")=>{var n;return Je(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let we;class rl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=we,!t&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(kt){let t=kt;for(kt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Vt;){let t=Vt;for(Vt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function yi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function vi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Gs(s),ol(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function xs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(bi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function bi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qt))return;e.globalVersion=qt;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!xs(e)){e.flags&=-3;return}const n=ne,s=He;ne=e,He=!0;try{yi(e);const r=e.fn(e._value);(t.version===0||nt(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ne=n,He=s,vi(e),e.flags&=-3}}function Gs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Gs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ol(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let He=!0;const _i=[];function it(){_i.push(He),He=!1}function ot(){const e=_i.pop();He=e===void 0?!0:e}function fr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ne;ne=void 0;try{t()}finally{ne=n}}}let qt=0;class ll{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class jn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!ne||!He||ne===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ne)n=this.activeLink=new ll(ne,this),ne.deps?(n.prevDep=ne.depsTail,ne.depsTail.nextDep=n,ne.depsTail=n):ne.deps=ne.depsTail=n,wi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ne.depsTail,n.nextDep=void 0,ne.depsTail.nextDep=n,ne.depsTail=n,ne.deps===n&&(ne.deps=s)}return n}trigger(t){this.version++,qt++,this.notify(t)}notify(t){Ks();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qs()}}}function wi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)wi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const An=new WeakMap,ht=Symbol(""),Es=Symbol(""),Gt=Symbol("");function me(e,t,n){if(He&&ne){let s=An.get(e);s||An.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new jn),r.map=s,r.key=n),r.track()}}function qe(e,t,n,s,r,i){const o=An.get(e);if(!o){qt++;return}const l=c=>{c&&c.trigger()};if(Ks(),t==="clear")o.forEach(l);else{const c=B(e),f=c&&Us(n);if(c&&n==="length"){const a=Number(s);o.forEach((d,m)=>{(m==="length"||m===Gt||!Je(m)&&m>=a)&&l(d)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),f&&l(o.get(Gt)),t){case"add":c?f&&l(o.get("length")):(l(o.get(ht)),Mt(e)&&l(o.get(Es)));break;case"delete":c||(l(o.get(ht)),Mt(e)&&l(o.get(Es)));break;case"set":Mt(e)&&l(o.get(ht));break}}qs()}function cl(e,t){const n=An.get(e);return n&&n.get(t)}function xt(e){const t=z(e);return t===e?t:(me(t,"iterate",Gt),Pe(e)?t:t.map(ye))}function Vn(e){return me(e=z(e),"iterate",Gt),e}const al={__proto__:null,[Symbol.iterator](){return ns(this,Symbol.iterator,ye)},concat(...e){return xt(this).concat(...e.map(t=>B(t)?xt(t):t))},entries(){return ns(this,"entries",e=>(e[1]=ye(e[1]),e))},every(e,t){return We(this,"every",e,t,void 0,arguments)},filter(e,t){return We(this,"filter",e,t,n=>n.map(ye),arguments)},find(e,t){return We(this,"find",e,t,ye,arguments)},findIndex(e,t){return We(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return We(this,"findLast",e,t,ye,arguments)},findLastIndex(e,t){return We(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return We(this,"forEach",e,t,void 0,arguments)},includes(...e){return ss(this,"includes",e)},indexOf(...e){return ss(this,"indexOf",e)},join(e){return xt(this).join(e)},lastIndexOf(...e){return ss(this,"lastIndexOf",e)},map(e,t){return We(this,"map",e,t,void 0,arguments)},pop(){return Ht(this,"pop")},push(...e){return Ht(this,"push",e)},reduce(e,...t){return ur(this,"reduce",e,t)},reduceRight(e,...t){return ur(this,"reduceRight",e,t)},shift(){return Ht(this,"shift")},some(e,t){return We(this,"some",e,t,void 0,arguments)},splice(...e){return Ht(this,"splice",e)},toReversed(){return xt(this).toReversed()},toSorted(e){return xt(this).toSorted(e)},toSpliced(...e){return xt(this).toSpliced(...e)},unshift(...e){return Ht(this,"unshift",e)},values(){return ns(this,"values",ye)}};function ns(e,t,n){const s=Vn(e),r=s[t]();return s!==e&&!Pe(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const fl=Array.prototype;function We(e,t,n,s,r,i){const o=Vn(e),l=o!==e&&!Pe(e),c=o[t];if(c!==fl[t]){const d=c.apply(e,i);return l?ye(d):d}let f=n;o!==e&&(l?f=function(d,m){return n.call(this,ye(d),m,e)}:n.length>2&&(f=function(d,m){return n.call(this,d,m,e)}));const a=c.call(o,f,s);return l&&r?r(a):a}function ur(e,t,n,s){const r=Vn(e);let i=n;return r!==e&&(Pe(e)?n.length>3&&(i=function(o,l,c){return n.call(this,o,l,c,e)}):i=function(o,l,c){return n.call(this,o,ye(l),c,e)}),r[t](i,...s)}function ss(e,t,n){const s=z(e);me(s,"iterate",Gt);const r=s[t](...n);return(r===-1||r===!1)&&Js(n[0])?(n[0]=z(n[0]),s[t](...n)):r}function Ht(e,t,n=[]){it(),Ks();const s=z(e)[t].apply(e,n);return qs(),ot(),s}const ul=js("__proto__,__v_isRef,__isVue"),Si=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Je));function dl(e){Je(e)||(e=String(e));const t=z(this);return me(t,"has",e),t.hasOwnProperty(e)}class Ti{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Sl:Ai:i?Ci:Ei).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=B(t);if(!r){let c;if(o&&(c=al[n]))return c;if(n==="hasOwnProperty")return dl}const l=Reflect.get(t,n,fe(t)?t:s);return(Je(n)?Si.has(n):ul(n))||(r||me(t,"get",n),i)?l:fe(l)?o&&Us(n)?l:l.value:se(l)?r?kn(l):Lt(l):l}}class xi extends Ti{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const c=wt(i);if(!Pe(s)&&!wt(s)&&(i=z(i),s=z(s)),!B(t)&&fe(i)&&!fe(s))return c?!1:(i.value=s,!0)}const o=B(t)&&Us(n)?Number(n)e,cn=e=>Reflect.getPrototypeOf(e);function yl(e,t,n){return function(...s){const r=this.__v_raw,i=z(r),o=Mt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,f=r[e](...s),a=n?Cs:t?As:ye;return!t&&me(i,"iterate",c?Es:ht),{next(){const{value:d,done:m}=f.next();return m?{value:d,done:m}:{value:l?[a(d[0]),a(d[1])]:a(d),done:m}},[Symbol.iterator](){return this}}}}function an(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function vl(e,t){const n={get(r){const i=this.__v_raw,o=z(i),l=z(r);e||(nt(r,l)&&me(o,"get",r),me(o,"get",l));const{has:c}=cn(o),f=t?Cs:e?As:ye;if(c.call(o,r))return f(i.get(r));if(c.call(o,l))return f(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&me(z(r),"iterate",ht),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=z(i),l=z(r);return e||(nt(r,l)&&me(o,"has",r),me(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=z(l),f=t?Cs:e?As:ye;return!e&&me(c,"iterate",ht),l.forEach((a,d)=>r.call(i,f(a),f(d),o))}};return de(n,e?{add:an("add"),set:an("set"),delete:an("delete"),clear:an("clear")}:{add(r){!t&&!Pe(r)&&!wt(r)&&(r=z(r));const i=z(this);return cn(i).has.call(i,r)||(i.add(r),qe(i,"add",r,r)),this},set(r,i){!t&&!Pe(i)&&!wt(i)&&(i=z(i));const o=z(this),{has:l,get:c}=cn(o);let f=l.call(o,r);f||(r=z(r),f=l.call(o,r));const a=c.call(o,r);return o.set(r,i),f?nt(i,a)&&qe(o,"set",r,i):qe(o,"add",r,i),this},delete(r){const i=z(this),{has:o,get:l}=cn(i);let c=o.call(i,r);c||(r=z(r),c=o.call(i,r)),l&&l.call(i,r);const f=i.delete(r);return c&&qe(i,"delete",r,void 0),f},clear(){const r=z(this),i=r.size!==0,o=r.clear();return i&&qe(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=yl(r,e,t)}),n}function Xs(e,t){const n=vl(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Q(n,r)&&r in s?n:s,r,i)}const bl={get:Xs(!1,!1)},_l={get:Xs(!1,!0)},wl={get:Xs(!0,!1)};const Ei=new WeakMap,Ci=new WeakMap,Ai=new WeakMap,Sl=new WeakMap;function Tl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xl(e){return e.__v_skip||!Object.isExtensible(e)?0:Tl(Go(e))}function Lt(e){return wt(e)?e:Ys(e,!1,pl,bl,Ei)}function El(e){return Ys(e,!1,ml,_l,Ci)}function kn(e){return Ys(e,!0,gl,wl,Ai)}function Ys(e,t,n,s,r){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=xl(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function pt(e){return wt(e)?pt(e.__v_raw):!!(e&&e.__v_isReactive)}function wt(e){return!!(e&&e.__v_isReadonly)}function Pe(e){return!!(e&&e.__v_isShallow)}function Js(e){return e?!!e.__v_raw:!1}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function Sn(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&ai(e,"__v_skip",!0),e}const ye=e=>se(e)?Lt(e):e,As=e=>se(e)?kn(e):e;function fe(e){return e?e.__v_isRef===!0:!1}function gt(e){return Ri(e,!1)}function Le(e){return Ri(e,!0)}function Ri(e,t){return fe(e)?e:new Cl(e,t)}class Cl{constructor(t,n){this.dep=new jn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:z(t),this._value=n?t:ye(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Pe(t)||wt(t);t=s?t:z(t),nt(t,n)&&(this._rawValue=t,this._value=s?t:ye(t),this.dep.trigger())}}function zs(e){return fe(e)?e.value:e}function le(e){return G(e)?e():zs(e)}const Al={get:(e,t,n)=>t==="__v_raw"?e:zs(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return fe(r)&&!fe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Mi(e){return pt(e)?e:new Proxy(e,Al)}class Rl{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new jn,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Ml(e){return new Rl(e)}class Ol{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return cl(z(this._object),this._key)}}class Pl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ll(e,t,n){return fe(e)?e:G(e)?new Pl(e):se(e)&&arguments.length>1?Il(e,t,n):gt(e)}function Il(e,t,n){const s=e[t];return fe(s)?s:new Ol(e,t,n)}class Nl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new jn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ne!==this)return mi(this,!0),!0}get value(){const t=this.dep.track();return bi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Fl(e,t,n=!1){let s,r;return G(e)?s=e:(s=e.get,r=e.set),new Nl(s,r,n)}const fn={},Rn=new WeakMap;let ut;function Hl(e,t=!1,n=ut){if(n){let s=Rn.get(n);s||Rn.set(n,s=[]),s.push(e)}}function Dl(e,t,n=ee){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,f=g=>r?g:Pe(g)||r===!1||r===0?Ge(g,1):Ge(g);let a,d,m,v,x=!1,T=!1;if(fe(e)?(d=()=>e.value,x=Pe(e)):pt(e)?(d=()=>f(e),x=!0):B(e)?(T=!0,x=e.some(g=>pt(g)||Pe(g)),d=()=>e.map(g=>{if(fe(g))return g.value;if(pt(g))return f(g);if(G(g))return c?c(g,2):g()})):G(e)?t?d=c?()=>c(e,2):e:d=()=>{if(m){it();try{m()}finally{ot()}}const g=ut;ut=a;try{return c?c(e,3,[v]):e(v)}finally{ut=g}}:d=Ue,t&&r){const g=d,O=r===!0?1/0:r;d=()=>Ge(g(),O)}const K=hi(),F=()=>{a.stop(),K&&K.active&&ks(K.effects,a)};if(i&&t){const g=t;t=(...O)=>{g(...O),F()}}let U=T?new Array(e.length).fill(fn):fn;const p=g=>{if(!(!(a.flags&1)||!a.dirty&&!g))if(t){const O=a.run();if(r||x||(T?O.some((D,R)=>nt(D,U[R])):nt(O,U))){m&&m();const D=ut;ut=a;try{const R=[O,U===fn?void 0:T&&U[0]===fn?[]:U,v];c?c(t,3,R):t(...R),U=O}finally{ut=D}}}else a.run()};return l&&l(p),a=new pi(d),a.scheduler=o?()=>o(p,!1):p,v=g=>Hl(g,!1,a),m=a.onStop=()=>{const g=Rn.get(a);if(g){if(c)c(g,4);else for(const O of g)O();Rn.delete(a)}},t?s?p(!0):U=a.run():o?o(p.bind(null,!0),!0):a.run(),F.pause=a.pause.bind(a),F.resume=a.resume.bind(a),F.stop=F,F}function Ge(e,t=1/0,n){if(t<=0||!se(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,fe(e))Ge(e.value,t,n);else if(B(e))for(let s=0;s{Ge(s,t,n)});else if(ci(e)){for(const s in e)Ge(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ge(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function nn(e,t,n,s){try{return s?e(...s):e()}catch(r){Un(r,t,n)}}function De(e,t,n,s){if(G(e)){const r=nn(e,t,n,s);return r&&oi(r)&&r.catch(i=>{Un(i,t,n)}),r}if(B(e)){const r=[];for(let i=0;i>>1,r=Se[s],i=Xt(r);i=Xt(n)?Se.push(e):Se.splice(jl(t),0,e),e.flags|=1,Pi()}}function Pi(){Mn||(Mn=Oi.then(Li))}function Vl(e){B(e)?Pt.push(...e):Ze&&e.id===-1?Ze.splice(Ct+1,0,e):e.flags&1||(Pt.push(e),e.flags|=1),Pi()}function dr(e,t,n=Ve+1){for(;nXt(n)-Xt(s));if(Pt.length=0,Ze){Ze.push(...t);return}for(Ze=t,Ct=0;Cte.id==null?e.flags&2?-1:1/0:e.id;function Li(e){try{for(Ve=0;Ve{s._d&&Ar(-1);const i=Pn(t);let o;try{o=e(...r)}finally{Pn(i),s._d&&Ar(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Rf(e,t){if(ae===null)return e;const n=Yn(ae),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Ut=e=>e&&(e.disabled||e.disabled===""),hr=e=>e&&(e.defer||e.defer===""),pr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,gr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Rs=(e,t)=>{const n=e&&e.to;return oe(n)?t?t(n):null:n},Hi={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,f){const{mc:a,pc:d,pbc:m,o:{insert:v,querySelector:x,createText:T,createComment:K}}=f,F=Ut(t.props);let{shapeFlag:U,children:p,dynamicChildren:g}=t;if(e==null){const O=t.el=T(""),D=t.anchor=T("");v(O,n,s),v(D,n,s);const R=(w,M)=>{U&16&&(r&&r.isCE&&(r.ce._teleportTarget=w),a(p,w,M,r,i,o,l,c))},$=()=>{const w=t.target=Rs(t.props,x),M=Di(w,t,T,v);w&&(o!=="svg"&&pr(w)?o="svg":o!=="mathml"&&gr(w)&&(o="mathml"),F||(R(w,M),Tn(t,!1)))};F&&(R(n,D),Tn(t,!0)),hr(t.props)?_e(()=>{$(),t.el.__isMounted=!0},i):$()}else{if(hr(t.props)&&!e.el.__isMounted){_e(()=>{Hi.process(e,t,n,s,r,i,o,l,c,f),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;const O=t.anchor=e.anchor,D=t.target=e.target,R=t.targetAnchor=e.targetAnchor,$=Ut(e.props),w=$?n:D,M=$?O:R;if(o==="svg"||pr(D)?o="svg":(o==="mathml"||gr(D))&&(o="mathml"),g?(m(e.dynamicChildren,g,w,r,i,o,l),er(e,t,!0)):c||d(e,t,w,M,r,i,o,l,!1),F)$?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):un(t,n,O,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=Rs(t.props,x);A&&un(t,A,null,f,0)}else $&&un(t,D,R,f,1);Tn(t,F)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:f,targetAnchor:a,target:d,props:m}=e;if(d&&(r(f),r(a)),i&&r(c),o&16){const v=i||!Ut(m);for(let x=0;x{e.isMounted=!0}),qi(()=>{e.isUnmounting=!0}),e}const Re=[Function,Array],$i={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Re,onEnter:Re,onAfterEnter:Re,onEnterCancelled:Re,onBeforeLeave:Re,onLeave:Re,onAfterLeave:Re,onLeaveCancelled:Re,onBeforeAppear:Re,onAppear:Re,onAfterAppear:Re,onAppearCancelled:Re},ji=e=>{const t=e.subTree;return t.component?ji(t.component):t},Bl={name:"BaseTransition",props:$i,setup(e,{slots:t}){const n=sn(),s=Wl();return()=>{const r=t.default&&Ui(t.default(),!0);if(!r||!r.length)return;const i=Vi(r),o=z(e),{mode:l}=o;if(s.isLeaving)return rs(i);const c=mr(i);if(!c)return rs(i);let f=Ms(c,o,s,n,d=>f=d);c.type!==ve&&Yt(c,f);let a=n.subTree&&mr(n.subTree);if(a&&a.type!==ve&&!dt(c,a)&&ji(n).type!==ve){let d=Ms(a,o,s,n);if(Yt(a,d),l==="out-in"&&c.type!==ve)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,a=void 0},rs(i);l==="in-out"&&c.type!==ve?d.delayLeave=(m,v,x)=>{const T=ki(s,a);T[String(a.key)]=a,m[et]=()=>{v(),m[et]=void 0,delete f.delayedLeave,a=void 0},f.delayedLeave=()=>{x(),delete f.delayedLeave,a=void 0}}:a=void 0}else a&&(a=void 0);return i}}};function Vi(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ve){t=n;break}}return t}const Kl=Bl;function ki(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Ms(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:a,onEnterCancelled:d,onBeforeLeave:m,onLeave:v,onAfterLeave:x,onLeaveCancelled:T,onBeforeAppear:K,onAppear:F,onAfterAppear:U,onAppearCancelled:p}=t,g=String(e.key),O=ki(n,e),D=(w,M)=>{w&&De(w,s,9,M)},R=(w,M)=>{const A=M[1];D(w,M),B(w)?w.every(b=>b.length<=1)&&A():w.length<=1&&A()},$={mode:o,persisted:l,beforeEnter(w){let M=c;if(!n.isMounted)if(i)M=K||c;else return;w[et]&&w[et](!0);const A=O[g];A&&dt(e,A)&&A.el[et]&&A.el[et](),D(M,[w])},enter(w){let M=f,A=a,b=d;if(!n.isMounted)if(i)M=F||f,A=U||a,b=p||d;else return;let N=!1;const Y=w[dn]=re=>{N||(N=!0,re?D(b,[w]):D(A,[w]),$.delayedLeave&&$.delayedLeave(),w[dn]=void 0)};M?R(M,[w,Y]):Y()},leave(w,M){const A=String(e.key);if(w[dn]&&w[dn](!0),n.isUnmounting)return M();D(m,[w]);let b=!1;const N=w[et]=Y=>{b||(b=!0,M(),Y?D(T,[w]):D(x,[w]),w[et]=void 0,O[A]===e&&delete O[A])};O[A]=e,v?R(v,[w,N]):N()},clone(w){const M=Ms(w,t,n,s,r);return r&&r(M),M}};return $}function rs(e){if(Bn(e))return e=st(e),e.children=null,e}function mr(e){if(!Bn(e))return Fi(e.type)&&e.children?Vi(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&G(n.default))return n.default()}}function Yt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Yt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ui(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;iJt(x,t&&(B(t)?t[T]:t),n,s,r));return}if(mt(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Jt(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Yn(s.component):s.el,o=r?null:i,{i:l,r:c}=e,f=t&&t.r,a=l.refs===ee?l.refs={}:l.refs,d=l.setupState,m=z(d),v=d===ee?()=>!1:x=>Q(m,x);if(f!=null&&f!==c&&(oe(f)?(a[f]=null,v(f)&&(d[f]=null)):fe(f)&&(f.value=null)),G(c))nn(c,l,12,[o,a]);else{const x=oe(c),T=fe(c);if(x||T){const K=()=>{if(e.f){const F=x?v(c)?d[c]:a[c]:c.value;r?B(F)&&ks(F,i):B(F)?F.includes(i)||F.push(i):x?(a[c]=[i],v(c)&&(d[c]=a[c])):(c.value=[i],e.k&&(a[e.k]=c.value))}else x?(a[c]=o,v(c)&&(d[c]=o)):T&&(c.value=o,e.k&&(a[e.k]=o))};o?(K.id=-1,_e(K,n)):K()}}}let yr=!1;const Et=()=>{yr||(console.error("Hydration completed but contains mismatches."),yr=!0)},ql=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Gl=e=>e.namespaceURI.includes("MathML"),hn=e=>{if(e.nodeType===1){if(ql(e))return"svg";if(Gl(e))return"mathml"}},pn=e=>e.nodeType===8;function Xl(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:f}}=e,a=(p,g)=>{if(!g.hasChildNodes()){n(null,p,g),On(),g._vnode=p;return}d(g.firstChild,p,null,null,null),On(),g._vnode=p},d=(p,g,O,D,R,$=!1)=>{$=$||!!g.dynamicChildren;const w=pn(p)&&p.data==="[",M=()=>T(p,g,O,D,R,w),{type:A,ref:b,shapeFlag:N,patchFlag:Y}=g;let re=p.nodeType;g.el=p,Y===-2&&($=!1,g.dynamicChildren=null);let V=null;switch(A){case bt:re!==3?g.children===""?(c(g.el=r(""),o(p),p),V=p):V=M():(p.data!==g.children&&(Et(),p.data=g.children),V=i(p));break;case ve:U(p)?(V=i(p),F(g.el=p.content.firstChild,p,O)):re!==8||w?V=M():V=i(p);break;case Bt:if(w&&(p=i(p),re=p.nodeType),re===1||re===3){V=p;const X=!g.children.length;for(let j=0;j{$=$||!!g.dynamicChildren;const{type:w,props:M,patchFlag:A,shapeFlag:b,dirs:N,transition:Y}=g,re=w==="input"||w==="option";if(re||A!==-1){N&&ke(g,null,O,"created");let V=!1;if(U(p)){V=fo(null,Y)&&O&&O.vnode.props&&O.vnode.props.appear;const j=p.content.firstChild;V&&Y.beforeEnter(j),F(j,p,O),g.el=p=j}if(b&16&&!(M&&(M.innerHTML||M.textContent))){let j=v(p.firstChild,g,p,O,D,R,$);for(;j;){gn(p,1)||Et();const ce=j;j=j.nextSibling,l(ce)}}else if(b&8){let j=g.children;j[0]===` +`&&(p.tagName==="PRE"||p.tagName==="TEXTAREA")&&(j=j.slice(1)),p.textContent!==j&&(gn(p,0)||Et(),p.textContent=g.children)}if(M){if(re||!$||A&48){const j=p.tagName.includes("-");for(const ce in M)(re&&(ce.endsWith("value")||ce==="indeterminate")||tn(ce)&&!Ot(ce)||ce[0]==="."||j)&&s(p,ce,null,M[ce],void 0,O)}else if(M.onClick)s(p,"onClick",null,M.onClick,void 0,O);else if(A&4&&pt(M.style))for(const j in M.style)M.style[j]}let X;(X=M&&M.onVnodeBeforeMount)&&Me(X,O,g),N&&ke(g,null,O,"beforeMount"),((X=M&&M.onVnodeMounted)||N||V)&&vo(()=>{X&&Me(X,O,g),V&&Y.enter(p),N&&ke(g,null,O,"mounted")},D)}return p.nextSibling},v=(p,g,O,D,R,$,w)=>{w=w||!!g.dynamicChildren;const M=g.children,A=M.length;for(let b=0;b{const{slotScopeIds:w}=g;w&&(R=R?R.concat(w):w);const M=o(p),A=v(i(p),g,M,O,D,R,$);return A&&pn(A)&&A.data==="]"?i(g.anchor=A):(Et(),c(g.anchor=f("]"),M,A),A)},T=(p,g,O,D,R,$)=>{if(gn(p.parentElement,1)||Et(),g.el=null,$){const A=K(p);for(;;){const b=i(p);if(b&&b!==A)l(b);else break}}const w=i(p),M=o(p);return l(p),n(null,g,M,w,O,D,hn(M),R),O&&(O.vnode.el=g.el,mo(O,g.el)),w},K=(p,g="[",O="]")=>{let D=0;for(;p;)if(p=i(p),p&&pn(p)&&(p.data===g&&D++,p.data===O)){if(D===0)return i(p);D--}return p},F=(p,g,O)=>{const D=g.parentNode;D&&D.replaceChild(p,g);let R=O;for(;R;)R.vnode.el===g&&(R.vnode.el=R.subTree.el=p),R=R.parent},U=p=>p.nodeType===1&&p.tagName==="TEMPLATE";return[a,d]}const vr="data-allow-mismatch",Yl={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function gn(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(vr);)e=e.parentElement;const n=e&&e.getAttribute(vr);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return t===0&&s.includes("children")?!0:n.split(",").includes(Yl[t])}}$n().requestIdleCallback;$n().cancelIdleCallback;const mt=e=>!!e.type.__asyncLoader,Bn=e=>e.type.__isKeepAlive;function Jl(e,t){Ki(e,"a",t)}function zl(e,t){Ki(e,"da",t)}function Ki(e,t,n=ue){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Kn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Bn(r.parent.vnode)&&Ql(s,t,n,r),r=r.parent}}function Ql(e,t,n,s){const r=Kn(t,e,s,!0);qn(()=>{ks(s[t],r)},n)}function Kn(e,t,n=ue,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{it();const l=rn(n),c=De(t,n,e,o);return l(),ot(),c});return s?r.unshift(i):r.push(i),i}}const ze=e=>(t,n=ue)=>{(!Zt||e==="sp")&&Kn(e,(...s)=>t(...s),n)},Zl=ze("bm"),It=ze("m"),ec=ze("bu"),tc=ze("u"),qi=ze("bum"),qn=ze("um"),nc=ze("sp"),sc=ze("rtg"),rc=ze("rtc");function ic(e,t=ue){Kn("ec",e,t)}const Gi="components";function Of(e,t){return Yi(Gi,e,!0,t)||e}const Xi=Symbol.for("v-ndc");function Pf(e){return oe(e)?Yi(Gi,e,!1)||e:e||Xi}function Yi(e,t,n=!0,s=!1){const r=ae||ue;if(r){const i=r.type;{const l=Wc(i,!1);if(l&&(l===t||l===Ne(t)||l===Dn(Ne(t))))return i}const o=br(r[e]||i[e],t)||br(r.appContext[e],t);return!o&&s?i:o}}function br(e,t){return e&&(e[t]||e[Ne(t)]||e[Dn(Ne(t))])}function Lf(e,t,n,s){let r;const i=n,o=B(e);if(o||oe(e)){const l=o&&pt(e);let c=!1;l&&(c=!Pe(e),e=Vn(e)),r=new Array(e.length);for(let f=0,a=e.length;ft(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,f=l.length;cQt(t)?!(t.type===ve||t.type===Te&&!Ji(t.children)):!0)?e:null}function Nf(e,t){const n={};for(const s in e)n[/[A-Z]/.test(s)?`on:${s}`:_n(s)]=e[s];return n}const Os=e=>e?To(e)?Yn(e):Os(e.parent):null,Wt=de(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Os(e.parent),$root:e=>Os(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Qi(e),$forceUpdate:e=>e.f||(e.f=()=>{Qs(e.update)}),$nextTick:e=>e.n||(e.n=Wn.bind(e.proxy)),$watch:e=>Ac.bind(e)}),is=(e,t)=>e!==ee&&!e.__isScriptSetup&&Q(e,t),oc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let f;if(t[0]!=="$"){const v=o[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(is(s,t))return o[t]=1,s[t];if(r!==ee&&Q(r,t))return o[t]=2,r[t];if((f=e.propsOptions[0])&&Q(f,t))return o[t]=3,i[t];if(n!==ee&&Q(n,t))return o[t]=4,n[t];Ps&&(o[t]=0)}}const a=Wt[t];let d,m;if(a)return t==="$attrs"&&me(e.attrs,"get",""),a(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==ee&&Q(n,t))return o[t]=4,n[t];if(m=c.config.globalProperties,Q(m,t))return m[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return is(r,t)?(r[t]=n,!0):s!==ee&&Q(s,t)?(s[t]=n,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==ee&&Q(e,o)||is(t,o)||(l=i[0])&&Q(l,o)||Q(s,o)||Q(Wt,o)||Q(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Q(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ff(){return lc().slots}function lc(){const e=sn();return e.setupContext||(e.setupContext=Eo(e))}function _r(e){return B(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ps=!0;function cc(e){const t=Qi(e),n=e.proxy,s=e.ctx;Ps=!1,t.beforeCreate&&wr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:f,created:a,beforeMount:d,mounted:m,beforeUpdate:v,updated:x,activated:T,deactivated:K,beforeDestroy:F,beforeUnmount:U,destroyed:p,unmounted:g,render:O,renderTracked:D,renderTriggered:R,errorCaptured:$,serverPrefetch:w,expose:M,inheritAttrs:A,components:b,directives:N,filters:Y}=t;if(f&&ac(f,s,null),o)for(const X in o){const j=o[X];G(j)&&(s[X]=j.bind(n))}if(r){const X=r.call(n,n);se(X)&&(e.data=Lt(X))}if(Ps=!0,i)for(const X in i){const j=i[X],ce=G(j)?j.bind(n,n):G(j.get)?j.get.bind(n,n):Ue,on=!G(j)&&G(j.set)?j.set.bind(n):Ue,lt=ie({get:ce,set:on});Object.defineProperty(s,X,{enumerable:!0,configurable:!0,get:()=>lt.value,set:$e=>lt.value=$e})}if(l)for(const X in l)zi(l[X],s,n,X);if(c){const X=G(c)?c.call(n):c;Reflect.ownKeys(X).forEach(j=>{gc(j,X[j])})}a&&wr(a,e,"c");function V(X,j){B(j)?j.forEach(ce=>X(ce.bind(n))):j&&X(j.bind(n))}if(V(Zl,d),V(It,m),V(ec,v),V(tc,x),V(Jl,T),V(zl,K),V(ic,$),V(rc,D),V(sc,R),V(qi,U),V(qn,g),V(nc,w),B(M))if(M.length){const X=e.exposed||(e.exposed={});M.forEach(j=>{Object.defineProperty(X,j,{get:()=>n[j],set:ce=>n[j]=ce})})}else e.exposed||(e.exposed={});O&&e.render===Ue&&(e.render=O),A!=null&&(e.inheritAttrs=A),b&&(e.components=b),N&&(e.directives=N),w&&Bi(e)}function ac(e,t,n=Ue){B(e)&&(e=Ls(e));for(const s in e){const r=e[s];let i;se(r)?"default"in r?i=vt(r.from||s,r.default,!0):i=vt(r.from||s):i=vt(r),fe(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function wr(e,t,n){De(B(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function zi(e,t,n,s){let r=s.includes(".")?po(n,s):()=>n[s];if(oe(e)){const i=t[e];G(i)&&Ie(r,i)}else if(G(e))Ie(r,e.bind(n));else if(se(e))if(B(e))e.forEach(i=>zi(i,t,n,s));else{const i=G(e.handler)?e.handler.bind(n):t[e.handler];G(i)&&Ie(r,i,e)}}function Qi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>Ln(c,f,o,!0)),Ln(c,t,o)),se(t)&&i.set(t,c),c}function Ln(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Ln(e,i,n,!0),r&&r.forEach(o=>Ln(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=fc[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const fc={data:Sr,props:Tr,emits:Tr,methods:jt,computed:jt,beforeCreate:be,created:be,beforeMount:be,mounted:be,beforeUpdate:be,updated:be,beforeDestroy:be,beforeUnmount:be,destroyed:be,unmounted:be,activated:be,deactivated:be,errorCaptured:be,serverPrefetch:be,components:jt,directives:jt,watch:dc,provide:Sr,inject:uc};function Sr(e,t){return t?e?function(){return de(G(e)?e.call(this,this):e,G(t)?t.call(this,this):t)}:t:e}function uc(e,t){return jt(Ls(e),Ls(t))}function Ls(e){if(B(e)){const t={};for(let n=0;n1)return n&&G(t)?t.call(s&&s.proxy):t}}function eo(){return!!(ue||ae||yt)}const to={},no=()=>Object.create(to),so=e=>Object.getPrototypeOf(e)===to;function mc(e,t,n,s=!1){const r={},i=no();e.propsDefaults=Object.create(null),ro(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:El(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function yc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=z(r),[c]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const a=e.vnode.dynamicProps;for(let d=0;d{c=!0;const[m,v]=io(d,t,!0);de(o,m),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!i&&!c)return se(e)&&s.set(e,Rt),Rt;if(B(i))for(let a=0;ae[0]==="_"||e==="$stable",Zs=e=>B(e)?e.map(Oe):[Oe(e)],bc=(e,t,n)=>{if(t._n)return t;const s=kl((...r)=>Zs(t(...r)),n);return s._c=!1,s},lo=(e,t,n)=>{const s=e._ctx;for(const r in e){if(oo(r))continue;const i=e[r];if(G(i))t[r]=bc(r,i,s);else if(i!=null){const o=Zs(i);t[r]=()=>o}}},co=(e,t)=>{const n=Zs(t);e.slots.default=()=>n},ao=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},_c=(e,t,n)=>{const s=e.slots=no();if(e.vnode.shapeFlag&32){const r=t._;r?(ao(s,t,n),n&&ai(s,"_",r,!0)):lo(t,s)}else t&&co(e,t)},wc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=ee;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:ao(r,t,n):(i=!t.$stable,lo(t,r)),o=t}else t&&(co(e,t),o={default:1});if(i)for(const l in r)!oo(l)&&o[l]==null&&delete r[l]},_e=vo;function Sc(e){return Tc(e,Xl)}function Tc(e,t){const n=$n();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:f,setElementText:a,parentNode:d,nextSibling:m,setScopeId:v=Ue,insertStaticContent:x}=e,T=(u,h,y,E=null,_=null,S=null,I=void 0,L=null,P=!!h.dynamicChildren)=>{if(u===h)return;u&&!dt(u,h)&&(E=ln(u),$e(u,_,S,!0),u=null),h.patchFlag===-2&&(P=!1,h.dynamicChildren=null);const{type:C,ref:W,shapeFlag:H}=h;switch(C){case bt:K(u,h,y,E);break;case ve:F(u,h,y,E);break;case Bt:u==null&&U(h,y,E,I);break;case Te:b(u,h,y,E,_,S,I,L,P);break;default:H&1?O(u,h,y,E,_,S,I,L,P):H&6?N(u,h,y,E,_,S,I,L,P):(H&64||H&128)&&C.process(u,h,y,E,_,S,I,L,P,Tt)}W!=null&&_&&Jt(W,u&&u.ref,S,h||u,!h)},K=(u,h,y,E)=>{if(u==null)s(h.el=l(h.children),y,E);else{const _=h.el=u.el;h.children!==u.children&&f(_,h.children)}},F=(u,h,y,E)=>{u==null?s(h.el=c(h.children||""),y,E):h.el=u.el},U=(u,h,y,E)=>{[u.el,u.anchor]=x(u.children,h,y,E,u.el,u.anchor)},p=({el:u,anchor:h},y,E)=>{let _;for(;u&&u!==h;)_=m(u),s(u,y,E),u=_;s(h,y,E)},g=({el:u,anchor:h})=>{let y;for(;u&&u!==h;)y=m(u),r(u),u=y;r(h)},O=(u,h,y,E,_,S,I,L,P)=>{h.type==="svg"?I="svg":h.type==="math"&&(I="mathml"),u==null?D(h,y,E,_,S,I,L,P):w(u,h,_,S,I,L,P)},D=(u,h,y,E,_,S,I,L)=>{let P,C;const{props:W,shapeFlag:H,transition:k,dirs:q}=u;if(P=u.el=o(u.type,S,W&&W.is,W),H&8?a(P,u.children):H&16&&$(u.children,P,null,E,_,os(u,S),I,L),q&&ke(u,null,E,"created"),R(P,u,u.scopeId,I,E),W){for(const te in W)te!=="value"&&!Ot(te)&&i(P,te,null,W[te],S,E);"value"in W&&i(P,"value",null,W.value,S),(C=W.onVnodeBeforeMount)&&Me(C,E,u)}q&&ke(u,null,E,"beforeMount");const J=fo(_,k);J&&k.beforeEnter(P),s(P,h,y),((C=W&&W.onVnodeMounted)||J||q)&&_e(()=>{C&&Me(C,E,u),J&&k.enter(P),q&&ke(u,null,E,"mounted")},_)},R=(u,h,y,E,_)=>{if(y&&v(u,y),E)for(let S=0;S{for(let C=P;C{const L=h.el=u.el;let{patchFlag:P,dynamicChildren:C,dirs:W}=h;P|=u.patchFlag&16;const H=u.props||ee,k=h.props||ee;let q;if(y&&ct(y,!1),(q=k.onVnodeBeforeUpdate)&&Me(q,y,h,u),W&&ke(h,u,y,"beforeUpdate"),y&&ct(y,!0),(H.innerHTML&&k.innerHTML==null||H.textContent&&k.textContent==null)&&a(L,""),C?M(u.dynamicChildren,C,L,y,E,os(h,_),S):I||j(u,h,L,null,y,E,os(h,_),S,!1),P>0){if(P&16)A(L,H,k,y,_);else if(P&2&&H.class!==k.class&&i(L,"class",null,k.class,_),P&4&&i(L,"style",H.style,k.style,_),P&8){const J=h.dynamicProps;for(let te=0;te{q&&Me(q,y,h,u),W&&ke(h,u,y,"updated")},E)},M=(u,h,y,E,_,S,I)=>{for(let L=0;L{if(h!==y){if(h!==ee)for(const S in h)!Ot(S)&&!(S in y)&&i(u,S,h[S],null,_,E);for(const S in y){if(Ot(S))continue;const I=y[S],L=h[S];I!==L&&S!=="value"&&i(u,S,L,I,_,E)}"value"in y&&i(u,"value",h.value,y.value,_)}},b=(u,h,y,E,_,S,I,L,P)=>{const C=h.el=u?u.el:l(""),W=h.anchor=u?u.anchor:l("");let{patchFlag:H,dynamicChildren:k,slotScopeIds:q}=h;q&&(L=L?L.concat(q):q),u==null?(s(C,y,E),s(W,y,E),$(h.children||[],y,W,_,S,I,L,P)):H>0&&H&64&&k&&u.dynamicChildren?(M(u.dynamicChildren,k,y,_,S,I,L),(h.key!=null||_&&h===_.subTree)&&er(u,h,!0)):j(u,h,y,W,_,S,I,L,P)},N=(u,h,y,E,_,S,I,L,P)=>{h.slotScopeIds=L,u==null?h.shapeFlag&512?_.ctx.activate(h,y,E,I,P):Y(h,y,E,_,S,I,P):re(u,h,P)},Y=(u,h,y,E,_,S,I)=>{const L=u.component=jc(u,E,_);if(Bn(u)&&(L.ctx.renderer=Tt),Vc(L,!1,I),L.asyncDep){if(_&&_.registerDep(L,V,I),!u.el){const P=L.subTree=he(ve);F(null,P,h,y)}}else V(L,u,h,y,_,S,I)},re=(u,h,y)=>{const E=h.component=u.component;if(Lc(u,h,y))if(E.asyncDep&&!E.asyncResolved){X(E,h,y);return}else E.next=h,E.update();else h.el=u.el,E.vnode=h},V=(u,h,y,E,_,S,I)=>{const L=()=>{if(u.isMounted){let{next:H,bu:k,u:q,parent:J,vnode:te}=u;{const Ee=uo(u);if(Ee){H&&(H.el=te.el,X(u,H,I)),Ee.asyncDep.then(()=>{u.isUnmounted||L()});return}}let Z=H,xe;ct(u,!1),H?(H.el=te.el,X(u,H,I)):H=te,k&&wn(k),(xe=H.props&&H.props.onVnodeBeforeUpdate)&&Me(xe,J,H,te),ct(u,!0);const pe=ls(u),Fe=u.subTree;u.subTree=pe,T(Fe,pe,d(Fe.el),ln(Fe),u,_,S),H.el=pe.el,Z===null&&mo(u,pe.el),q&&_e(q,_),(xe=H.props&&H.props.onVnodeUpdated)&&_e(()=>Me(xe,J,H,te),_)}else{let H;const{el:k,props:q}=h,{bm:J,m:te,parent:Z,root:xe,type:pe}=u,Fe=mt(h);if(ct(u,!1),J&&wn(J),!Fe&&(H=q&&q.onVnodeBeforeMount)&&Me(H,Z,h),ct(u,!0),k&&Zn){const Ee=()=>{u.subTree=ls(u),Zn(k,u.subTree,u,_,null)};Fe&&pe.__asyncHydrate?pe.__asyncHydrate(k,u,Ee):Ee()}else{xe.ce&&xe.ce._injectChildStyle(pe);const Ee=u.subTree=ls(u);T(null,Ee,y,E,u,_,S),h.el=Ee.el}if(te&&_e(te,_),!Fe&&(H=q&&q.onVnodeMounted)){const Ee=h;_e(()=>Me(H,Z,Ee),_)}(h.shapeFlag&256||Z&&mt(Z.vnode)&&Z.vnode.shapeFlag&256)&&u.a&&_e(u.a,_),u.isMounted=!0,h=y=E=null}};u.scope.on();const P=u.effect=new pi(L);u.scope.off();const C=u.update=P.run.bind(P),W=u.job=P.runIfDirty.bind(P);W.i=u,W.id=u.uid,P.scheduler=()=>Qs(W),ct(u,!0),C()},X=(u,h,y)=>{h.component=u;const E=u.vnode.props;u.vnode=h,u.next=null,yc(u,h.props,E,y),wc(u,h.children,y),it(),dr(u),ot()},j=(u,h,y,E,_,S,I,L,P=!1)=>{const C=u&&u.children,W=u?u.shapeFlag:0,H=h.children,{patchFlag:k,shapeFlag:q}=h;if(k>0){if(k&128){on(C,H,y,E,_,S,I,L,P);return}else if(k&256){ce(C,H,y,E,_,S,I,L,P);return}}q&8?(W&16&&Nt(C,_,S),H!==C&&a(y,H)):W&16?q&16?on(C,H,y,E,_,S,I,L,P):Nt(C,_,S,!0):(W&8&&a(y,""),q&16&&$(H,y,E,_,S,I,L,P))},ce=(u,h,y,E,_,S,I,L,P)=>{u=u||Rt,h=h||Rt;const C=u.length,W=h.length,H=Math.min(C,W);let k;for(k=0;kW?Nt(u,_,S,!0,!1,H):$(h,y,E,_,S,I,L,P,H)},on=(u,h,y,E,_,S,I,L,P)=>{let C=0;const W=h.length;let H=u.length-1,k=W-1;for(;C<=H&&C<=k;){const q=u[C],J=h[C]=P?tt(h[C]):Oe(h[C]);if(dt(q,J))T(q,J,y,null,_,S,I,L,P);else break;C++}for(;C<=H&&C<=k;){const q=u[H],J=h[k]=P?tt(h[k]):Oe(h[k]);if(dt(q,J))T(q,J,y,null,_,S,I,L,P);else break;H--,k--}if(C>H){if(C<=k){const q=k+1,J=qk)for(;C<=H;)$e(u[C],_,S,!0),C++;else{const q=C,J=C,te=new Map;for(C=J;C<=k;C++){const Ce=h[C]=P?tt(h[C]):Oe(h[C]);Ce.key!=null&&te.set(Ce.key,C)}let Z,xe=0;const pe=k-J+1;let Fe=!1,Ee=0;const Ft=new Array(pe);for(C=0;C=pe){$e(Ce,_,S,!0);continue}let je;if(Ce.key!=null)je=te.get(Ce.key);else for(Z=J;Z<=k;Z++)if(Ft[Z-J]===0&&dt(Ce,h[Z])){je=Z;break}je===void 0?$e(Ce,_,S,!0):(Ft[je-J]=C+1,je>=Ee?Ee=je:Fe=!0,T(Ce,h[je],y,null,_,S,I,L,P),xe++)}const lr=Fe?xc(Ft):Rt;for(Z=lr.length-1,C=pe-1;C>=0;C--){const Ce=J+C,je=h[Ce],cr=Ce+1{const{el:S,type:I,transition:L,children:P,shapeFlag:C}=u;if(C&6){lt(u.component.subTree,h,y,E);return}if(C&128){u.suspense.move(h,y,E);return}if(C&64){I.move(u,h,y,Tt);return}if(I===Te){s(S,h,y);for(let H=0;HL.enter(S),_);else{const{leave:H,delayLeave:k,afterLeave:q}=L,J=()=>s(S,h,y),te=()=>{H(S,()=>{J(),q&&q()})};k?k(S,J,te):te()}else s(S,h,y)},$e=(u,h,y,E=!1,_=!1)=>{const{type:S,props:I,ref:L,children:P,dynamicChildren:C,shapeFlag:W,patchFlag:H,dirs:k,cacheIndex:q}=u;if(H===-2&&(_=!1),L!=null&&Jt(L,null,y,u,!0),q!=null&&(h.renderCache[q]=void 0),W&256){h.ctx.deactivate(u);return}const J=W&1&&k,te=!mt(u);let Z;if(te&&(Z=I&&I.onVnodeBeforeUnmount)&&Me(Z,h,u),W&6)Bo(u.component,y,E);else{if(W&128){u.suspense.unmount(y,E);return}J&&ke(u,null,h,"beforeUnmount"),W&64?u.type.remove(u,h,y,Tt,E):C&&!C.hasOnce&&(S!==Te||H>0&&H&64)?Nt(C,h,y,!1,!0):(S===Te&&H&384||!_&&W&16)&&Nt(P,h,y),E&&ir(u)}(te&&(Z=I&&I.onVnodeUnmounted)||J)&&_e(()=>{Z&&Me(Z,h,u),J&&ke(u,null,h,"unmounted")},y)},ir=u=>{const{type:h,el:y,anchor:E,transition:_}=u;if(h===Te){Wo(y,E);return}if(h===Bt){g(u);return}const S=()=>{r(y),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(u.shapeFlag&1&&_&&!_.persisted){const{leave:I,delayLeave:L}=_,P=()=>I(y,S);L?L(u.el,S,P):P()}else S()},Wo=(u,h)=>{let y;for(;u!==h;)y=m(u),r(u),u=y;r(h)},Bo=(u,h,y)=>{const{bum:E,scope:_,job:S,subTree:I,um:L,m:P,a:C}=u;Er(P),Er(C),E&&wn(E),_.stop(),S&&(S.flags|=8,$e(I,u,h,y)),L&&_e(L,h),_e(()=>{u.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&u.asyncDep&&!u.asyncResolved&&u.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Nt=(u,h,y,E=!1,_=!1,S=0)=>{for(let I=S;I{if(u.shapeFlag&6)return ln(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const h=m(u.anchor||u.el),y=h&&h[Ni];return y?m(y):h};let zn=!1;const or=(u,h,y)=>{u==null?h._vnode&&$e(h._vnode,null,null,!0):T(h._vnode||null,u,h,null,null,null,y),h._vnode=u,zn||(zn=!0,dr(),On(),zn=!1)},Tt={p:T,um:$e,m:lt,r:ir,mt:Y,mc:$,pc:j,pbc:M,n:ln,o:e};let Qn,Zn;return t&&([Qn,Zn]=t(Tt)),{render:or,hydrate:Qn,createApp:pc(or,Qn)}}function os({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fo(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function er(e,t,n=!1){const s=e.children,r=t.children;if(B(s)&&B(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function uo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:uo(t)}function Er(e){if(e)for(let t=0;tvt(Ec);function ho(e,t){return Gn(e,null,t)}function Hf(e,t){return Gn(e,null,{flush:"post"})}function Ie(e,t,n){return Gn(e,t,n)}function Gn(e,t,n=ee){const{immediate:s,deep:r,flush:i,once:o}=n,l=de({},n),c=t&&s||!t&&i!=="post";let f;if(Zt){if(i==="sync"){const v=Cc();f=v.__watcherHandles||(v.__watcherHandles=[])}else if(!c){const v=()=>{};return v.stop=Ue,v.resume=Ue,v.pause=Ue,v}}const a=ue;l.call=(v,x,T)=>De(v,a,x,T);let d=!1;i==="post"?l.scheduler=v=>{_e(v,a&&a.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(v,x)=>{x?v():Qs(v)}),l.augmentJob=v=>{t&&(v.flags|=4),d&&(v.flags|=2,a&&(v.id=a.uid,v.i=a))};const m=Dl(e,t,l);return Zt&&(f?f.push(m):c&&m()),m}function Ac(e,t,n){const s=this.proxy,r=oe(e)?e.includes(".")?po(s,e):()=>s[e]:e.bind(s,s);let i;G(t)?i=t:(i=t.handler,n=t);const o=rn(this),l=Gn(r,i.bind(s),n);return o(),l}function po(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ne(t)}Modifiers`]||e[`${rt(t)}Modifiers`];function Mc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ee;let r=n;const i=t.startsWith("update:"),o=i&&Rc(s,t.slice(7));o&&(o.trim&&(r=n.map(a=>oe(a)?a.trim():a)),o.number&&(r=n.map(Ts)));let l,c=s[l=_n(t)]||s[l=_n(Ne(t))];!c&&i&&(c=s[l=_n(rt(t))]),c&&De(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,De(f,e,6,r)}}function go(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!G(e)){const c=f=>{const a=go(f,t,!0);a&&(l=!0,de(o,a))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(se(e)&&s.set(e,null),null):(B(i)?i.forEach(c=>o[c]=null):de(o,i),se(e)&&s.set(e,o),o)}function Xn(e,t){return!e||!tn(t)?!1:(t=t.slice(2).replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,rt(t))||Q(e,t))}function ls(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:f,renderCache:a,props:d,data:m,setupState:v,ctx:x,inheritAttrs:T}=e,K=Pn(e);let F,U;try{if(n.shapeFlag&4){const g=r||s,O=g;F=Oe(f.call(O,g,a,d,v,m,x)),U=l}else{const g=t;F=Oe(g.length>1?g(d,{attrs:l,slots:o,emit:c}):g(d,null)),U=t.props?l:Oc(l)}}catch(g){Kt.length=0,Un(g,e,1),F=he(ve)}let p=F;if(U&&T!==!1){const g=Object.keys(U),{shapeFlag:O}=p;g.length&&O&7&&(i&&g.some(Vs)&&(U=Pc(U,i)),p=st(p,U,!1,!0))}return n.dirs&&(p=st(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(n.dirs):n.dirs),n.transition&&Yt(p,n.transition),F=p,Pn(K),F}const Oc=e=>{let t;for(const n in e)(n==="class"||n==="style"||tn(n))&&((t||(t={}))[n]=e[n]);return t},Pc=(e,t)=>{const n={};for(const s in e)(!Vs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Lc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Cr(s,o,f):!!o;if(c&8){const a=t.dynamicProps;for(let d=0;de.__isSuspense;function vo(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):Vl(e)}const Te=Symbol.for("v-fgt"),bt=Symbol.for("v-txt"),ve=Symbol.for("v-cmt"),Bt=Symbol.for("v-stc"),Kt=[];let Ae=null;function Ns(e=!1){Kt.push(Ae=e?null:[])}function Ic(){Kt.pop(),Ae=Kt[Kt.length-1]||null}let zt=1;function Ar(e,t=!1){zt+=e,e<0&&Ae&&t&&(Ae.hasOnce=!0)}function bo(e){return e.dynamicChildren=zt>0?Ae||Rt:null,Ic(),zt>0&&Ae&&Ae.push(e),e}function Df(e,t,n,s,r,i){return bo(wo(e,t,n,s,r,i,!0))}function Fs(e,t,n,s,r){return bo(he(e,t,n,s,r,!0))}function Qt(e){return e?e.__v_isVNode===!0:!1}function dt(e,t){return e.type===t.type&&e.key===t.key}const _o=({key:e})=>e??null,xn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?oe(e)||fe(e)||G(e)?{i:ae,r:e,k:t,f:!!n}:e:null);function wo(e,t=null,n=null,s=0,r=null,i=e===Te?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&_o(t),ref:t&&xn(t),scopeId:Ii,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ae};return l?(tr(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=oe(n)?8:16),zt>0&&!o&&Ae&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ae.push(c),c}const he=Nc;function Nc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Xi)&&(e=ve),Qt(e)){const l=st(e,t,!0);return n&&tr(l,n),zt>0&&!i&&Ae&&(l.shapeFlag&6?Ae[Ae.indexOf(e)]=l:Ae.push(l)),l.patchFlag=-2,l}if(Bc(e)&&(e=e.__vccOpts),t){t=Fc(t);let{class:l,style:c}=t;l&&!oe(l)&&(t.class=Bs(l)),se(c)&&(Js(c)&&!B(c)&&(c=de({},c)),t.style=Ws(c))}const o=oe(e)?1:yo(e)?128:Fi(e)?64:se(e)?4:G(e)?2:0;return wo(e,t,n,s,r,o,i,!0)}function Fc(e){return e?Js(e)||so(e)?de({},e):e:null}function st(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,f=t?Hc(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&_o(f),ref:t&&t.ref?n&&i?B(i)?i.concat(xn(t)):[i,xn(t)]:xn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Te?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&st(e.ssContent),ssFallback:e.ssFallback&&st(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Yt(a,c.clone(a)),a}function So(e=" ",t=0){return he(bt,null,e,t)}function $f(e,t){const n=he(Bt,null,e);return n.staticCount=t,n}function jf(e="",t=!1){return t?(Ns(),Fs(ve,null,e)):he(ve,null,e)}function Oe(e){return e==null||typeof e=="boolean"?he(ve):B(e)?he(Te,null,e.slice()):Qt(e)?tt(e):he(bt,null,String(e))}function tt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:st(e)}function tr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(B(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),tr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!so(t)?t._ctx=ae:r===3&&ae&&(ae.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else G(t)?(t={default:t,_ctx:ae},n=32):(t=String(t),s&64?(n=16,t=[So(t)]):n=8);e.children=t,e.shapeFlag|=n}function Hc(...e){const t={};for(let n=0;nue||ae;let In,Hs;{const e=$n(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};In=t("__VUE_INSTANCE_SETTERS__",n=>ue=n),Hs=t("__VUE_SSR_SETTERS__",n=>Zt=n)}const rn=e=>{const t=ue;return In(e),e.scope.on(),()=>{e.scope.off(),In(t)}},Rr=()=>{ue&&ue.scope.off(),In(null)};function To(e){return e.vnode.shapeFlag&4}let Zt=!1;function Vc(e,t=!1,n=!1){t&&Hs(t);const{props:s,children:r}=e.vnode,i=To(e);mc(e,s,i,t),_c(e,r,n);const o=i?kc(e,t):void 0;return t&&Hs(!1),o}function kc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,oc);const{setup:s}=n;if(s){it();const r=e.setupContext=s.length>1?Eo(e):null,i=rn(e),o=nn(s,e,0,[e.props,r]),l=oi(o);if(ot(),i(),(l||e.sp)&&!mt(e)&&Bi(e),l){if(o.then(Rr,Rr),t)return o.then(c=>{Mr(e,c)}).catch(c=>{Un(c,e,0)});e.asyncDep=o}else Mr(e,o)}else xo(e)}function Mr(e,t,n){G(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=Mi(t)),xo(e)}function xo(e,t,n){const s=e.type;e.render||(e.render=s.render||Ue);{const r=rn(e);it();try{cc(e)}finally{ot(),r()}}}const Uc={get(e,t){return me(e,"get",""),e[t]}};function Eo(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Uc),slots:e.slots,emit:e.emit,expose:t}}function Yn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Mi(Sn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Wt)return Wt[n](e)},has(t,n){return n in t||n in Wt}})):e.proxy}function Wc(e,t=!0){return G(e)?e.displayName||e.name:e.name||t&&e.__name}function Bc(e){return G(e)&&"__vccOpts"in e}const ie=(e,t)=>Fl(e,t,Zt);function Ds(e,t,n){const s=arguments.length;return s===2?se(t)&&!B(t)?Qt(t)?he(e,null,[t]):he(e,t):he(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Qt(n)&&(n=[n]),he(e,t,n))}const Kc="3.5.13";/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let $s;const Or=typeof window<"u"&&window.trustedTypes;if(Or)try{$s=Or.createPolicy("vue",{createHTML:e=>e})}catch{}const Co=$s?e=>$s.createHTML(e):e=>e,qc="http://www.w3.org/2000/svg",Gc="http://www.w3.org/1998/Math/MathML",Ke=typeof document<"u"?document:null,Pr=Ke&&Ke.createElement("template"),Xc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Ke.createElementNS(qc,e):t==="mathml"?Ke.createElementNS(Gc,e):n?Ke.createElement(e,{is:n}):Ke.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Ke.createTextNode(e),createComment:e=>Ke.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ke.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Pr.innerHTML=Co(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Pr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qe="transition",Dt="animation",en=Symbol("_vtc"),Ao={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Yc=de({},$i,Ao),Jc=e=>(e.displayName="Transition",e.props=Yc,e),Vf=Jc((e,{slots:t})=>Ds(Kl,zc(e),t)),at=(e,t=[])=>{B(e)?e.forEach(n=>n(...t)):e&&e(...t)},Lr=e=>e?B(e)?e.some(t=>t.length>1):e.length>1:!1;function zc(e){const t={};for(const b in e)b in Ao||(t[b]=e[b]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:f=o,appearToClass:a=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,x=Qc(r),T=x&&x[0],K=x&&x[1],{onBeforeEnter:F,onEnter:U,onEnterCancelled:p,onLeave:g,onLeaveCancelled:O,onBeforeAppear:D=F,onAppear:R=U,onAppearCancelled:$=p}=t,w=(b,N,Y,re)=>{b._enterCancelled=re,ft(b,N?a:l),ft(b,N?f:o),Y&&Y()},M=(b,N)=>{b._isLeaving=!1,ft(b,d),ft(b,v),ft(b,m),N&&N()},A=b=>(N,Y)=>{const re=b?R:U,V=()=>w(N,b,Y);at(re,[N,V]),Ir(()=>{ft(N,b?c:i),Be(N,b?a:l),Lr(re)||Nr(N,s,T,V)})};return de(t,{onBeforeEnter(b){at(F,[b]),Be(b,i),Be(b,o)},onBeforeAppear(b){at(D,[b]),Be(b,c),Be(b,f)},onEnter:A(!1),onAppear:A(!0),onLeave(b,N){b._isLeaving=!0;const Y=()=>M(b,N);Be(b,d),b._enterCancelled?(Be(b,m),Dr()):(Dr(),Be(b,m)),Ir(()=>{b._isLeaving&&(ft(b,d),Be(b,v),Lr(g)||Nr(b,s,K,Y))}),at(g,[b,Y])},onEnterCancelled(b){w(b,!1,void 0,!0),at(p,[b])},onAppearCancelled(b){w(b,!0,void 0,!0),at($,[b])},onLeaveCancelled(b){M(b),at(O,[b])}})}function Qc(e){if(e==null)return null;if(se(e))return[cs(e.enter),cs(e.leave)];{const t=cs(e);return[t,t]}}function cs(e){return Jo(e)}function Be(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[en]||(e[en]=new Set)).add(t)}function ft(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[en];n&&(n.delete(t),n.size||(e[en]=void 0))}function Ir(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zc=0;function Nr(e,t,n,s){const r=e._endId=++Zc,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=ea(e,t);if(!o)return s();const f=o+"end";let a=0;const d=()=>{e.removeEventListener(f,m),i()},m=v=>{v.target===e&&++a>=c&&d()};setTimeout(()=>{a(n[x]||"").split(", "),r=s(`${Qe}Delay`),i=s(`${Qe}Duration`),o=Fr(r,i),l=s(`${Dt}Delay`),c=s(`${Dt}Duration`),f=Fr(l,c);let a=null,d=0,m=0;t===Qe?o>0&&(a=Qe,d=o,m=i.length):t===Dt?f>0&&(a=Dt,d=f,m=c.length):(d=Math.max(o,f),a=d>0?o>f?Qe:Dt:null,m=a?a===Qe?i.length:c.length:0);const v=a===Qe&&/\b(transform|all)(,|$)/.test(s(`${Qe}Property`).toString());return{type:a,timeout:d,propCount:m,hasTransform:v}}function Fr(e,t){for(;e.lengthHr(n)+Hr(e[s])))}function Hr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Dr(){return document.body.offsetHeight}function ta(e,t,n){const s=e[en];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Nn=Symbol("_vod"),Ro=Symbol("_vsh"),kf={beforeMount(e,{value:t},{transition:n}){e[Nn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):$t(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),$t(e,!0),s.enter(e)):s.leave(e,()=>{$t(e,!1)}):$t(e,t))},beforeUnmount(e,{value:t}){$t(e,t)}};function $t(e,t){e.style.display=t?e[Nn]:"none",e[Ro]=!t}const na=Symbol(""),sa=/(^|;)\s*display\s*:/;function ra(e,t,n){const s=e.style,r=oe(n);let i=!1;if(n&&!r){if(t)if(oe(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&En(s,l,"")}else for(const o in t)n[o]==null&&En(s,o,"");for(const o in n)o==="display"&&(i=!0),En(s,o,n[o])}else if(r){if(t!==n){const o=s[na];o&&(n+=";"+o),s.cssText=n,i=sa.test(n)}}else t&&e.removeAttribute("style");Nn in e&&(e[Nn]=i?s.display:"",e[Ro]&&(s.display="none"))}const $r=/\s*!important$/;function En(e,t,n){if(B(n))n.forEach(s=>En(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=ia(e,t);$r.test(n)?e.setProperty(rt(s),n.replace($r,""),"important"):e[s]=n}}const jr=["Webkit","Moz","ms"],as={};function ia(e,t){const n=as[t];if(n)return n;let s=Ne(t);if(s!=="filter"&&s in e)return as[t]=s;s=Dn(s);for(let r=0;rfs||(aa.then(()=>fs=0),fs=Date.now());function ua(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;De(da(s,n.value),t,5,[s])};return n.value=e,n.attached=fa(),n}function da(e,t){if(B(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Kr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ha=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?ta(e,s,o):t==="style"?ra(e,n,s):tn(t)?Vs(t)||la(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pa(e,t,s,o))?(Ur(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&kr(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!oe(s))?Ur(e,Ne(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),kr(e,t,s,o))};function pa(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Kr(t)&&G(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Kr(t)&&oe(n)?!1:t in e}const qr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return B(t)?n=>wn(t,n):t};function ga(e){e.target.composing=!0}function Gr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const us=Symbol("_assign"),Uf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[us]=qr(r);const i=s||r.props&&r.props.type==="number";At(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Ts(l)),e[us](l)}),n&&At(e,"change",()=>{e.value=e.value.trim()}),t||(At(e,"compositionstart",ga),At(e,"compositionend",Gr),At(e,"change",Gr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[us]=qr(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Ts(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},ma=["ctrl","shift","alt","meta"],ya={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ma.some(n=>e[`${n}Key`]&&!t.includes(n))},Wf=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=rt(r.key);if(t.some(o=>o===i||va[o]===i))return e(r)})},ba=de({patchProp:ha},Xc);let ds,Xr=!1;function _a(){return ds=Xr?ds:Sc(ba),Xr=!0,ds}const Kf=(...e)=>{const t=_a().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Sa(s);if(r)return n(r,!0,wa(r))},t};function wa(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Sa(e){return oe(e)?document.querySelector(e):e}const Ta=window.__VP_SITE_DATA__;function Mo(e){return hi()?(il(e),!0):!1}const hs=new WeakMap,xa=(...e)=>{var t;const n=e[0],s=(t=sn())==null?void 0:t.proxy;if(s==null&&!eo())throw new Error("injectLocal must be called in setup");return s&&hs.has(s)&&n in hs.get(s)?hs.get(s)[n]:vt(...e)},Oo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ea=Object.prototype.toString,Ca=e=>Ea.call(e)==="[object Object]",St=()=>{},Yr=Aa();function Aa(){var e,t;return Oo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function nr(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const Po=e=>e();function Ra(e,t={}){let n,s,r=St;const i=c=>{clearTimeout(c),r(),r=St};let o;return c=>{const f=le(e),a=le(t.maxWait);return n&&i(n),f<=0||a!==void 0&&a<=0?(s&&(i(s),s=null),Promise.resolve(c())):new Promise((d,m)=>{r=t.rejectOnCancel?m:d,o=c,a&&!s&&(s=setTimeout(()=>{n&&i(n),s=null,d(o())},a)),n=setTimeout(()=>{s&&i(s),s=null,d(c())},f)})}}function Ma(...e){let t=0,n,s=!0,r=St,i,o,l,c,f;!fe(e[0])&&typeof e[0]=="object"?{delay:o,trailing:l=!0,leading:c=!0,rejectOnCancel:f=!1}=e[0]:[o,l=!0,c=!0,f=!1]=e;const a=()=>{n&&(clearTimeout(n),n=void 0,r(),r=St)};return m=>{const v=le(o),x=Date.now()-t,T=()=>i=m();return a(),v<=0?(t=Date.now(),T()):(x>v&&(c||!s)?(t=Date.now(),T()):l&&(i=new Promise((K,F)=>{r=f?F:K,n=setTimeout(()=>{t=Date.now(),s=!0,K(T()),a()},Math.max(0,v-x))})),!c&&!n&&(n=setTimeout(()=>s=!0,v)),s=!1,i)}}function Oa(e=Po,t={}){const{initialState:n="active"}=t,s=sr(n==="active");function r(){s.value=!1}function i(){s.value=!0}const o=(...l)=>{s.value&&e(...l)};return{isActive:kn(s),pause:r,resume:i,eventFilter:o}}function Jr(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Pa(e){return sn()}function ps(e){return Array.isArray(e)?e:[e]}function sr(...e){if(e.length!==1)return Ll(...e);const t=e[0];return typeof t=="function"?kn(Ml(()=>({get:t,set:St}))):gt(t)}function La(e,t=200,n={}){return nr(Ra(t,n),e)}function Ia(e,t=200,n=!1,s=!0,r=!1){return nr(Ma(t,n,s,r),e)}function Na(e,t,n={}){const{eventFilter:s=Po,...r}=n;return Ie(e,nr(s,t),r)}function Fa(e,t,n={}){const{eventFilter:s,initialState:r="active",...i}=n,{eventFilter:o,pause:l,resume:c,isActive:f}=Oa(s,{initialState:r});return{stop:Na(e,t,{...i,eventFilter:o}),pause:l,resume:c,isActive:f}}function Jn(e,t=!0,n){Pa()?It(e,n):t?e():Wn(e)}function Ha(e,t,n){return Ie(e,t,{...n,immediate:!0})}const Xe=Oo?window:void 0;function rr(e){var t;const n=le(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Ye(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},s=(l,c,f,a)=>(l.addEventListener(c,f,a),()=>l.removeEventListener(c,f,a)),r=ie(()=>{const l=ps(le(e[0])).filter(c=>c!=null);return l.every(c=>typeof c!="string")?l:void 0}),i=Ha(()=>{var l,c;return[(c=(l=r.value)==null?void 0:l.map(f=>rr(f)))!=null?c:[Xe].filter(f=>f!=null),ps(le(r.value?e[1]:e[0])),ps(zs(r.value?e[2]:e[1])),le(r.value?e[3]:e[2])]},([l,c,f,a])=>{if(n(),!(l!=null&&l.length)||!(c!=null&&c.length)||!(f!=null&&f.length))return;const d=Ca(a)?{...a}:a;t.push(...l.flatMap(m=>c.flatMap(v=>f.map(x=>s(m,v,x,d)))))},{flush:"post"}),o=()=>{i(),n()};return Mo(n),o}function Da(){const e=Le(!1),t=sn();return t&&It(()=>{e.value=!0},t),e}function $a(e){const t=Da();return ie(()=>(t.value,!!e()))}function ja(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function qf(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=Xe,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=ja(t);return Ye(r,i,a=>{a.repeat&&le(l)||c(a)&&n(a)},o)}const Va=Symbol("vueuse-ssr-width");function ka(){const e=eo()?xa(Va,null):null;return typeof e=="number"?e:void 0}function Lo(e,t={}){const{window:n=Xe,ssrWidth:s=ka()}=t,r=$a(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=Le(typeof s=="number"),o=Le(),l=Le(!1),c=f=>{l.value=f.matches};return ho(()=>{if(i.value){i.value=!r.value;const f=le(e).split(",");l.value=f.some(a=>{const d=a.includes("not all"),m=a.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),v=a.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let x=!!(m||v);return m&&x&&(x=s>=Jr(m[1])),v&&x&&(x=s<=Jr(v[1])),d?!x:x});return}r.value&&(o.value=n.matchMedia(le(e)),l.value=o.value.matches)}),Ye(o,"change",c,{passive:!0}),ie(()=>l.value)}const mn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yn="__vueuse_ssr_handlers__",Ua=Wa();function Wa(){return yn in mn||(mn[yn]=mn[yn]||{}),mn[yn]}function Io(e,t){return Ua[e]||t}function No(e){return Lo("(prefers-color-scheme: dark)",e)}function Ba(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ka={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},zr="vueuse-storage";function qa(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:a,window:d=Xe,eventFilter:m,onError:v=A=>{console.error(A)},initOnMounted:x}=s,T=(a?Le:gt)(typeof t=="function"?t():t),K=ie(()=>le(e));if(!n)try{n=Io("getDefaultStorage",()=>{var A;return(A=Xe)==null?void 0:A.localStorage})()}catch(A){v(A)}if(!n)return T;const F=le(t),U=Ba(F),p=(r=s.serializer)!=null?r:Ka[U],{pause:g,resume:O}=Fa(T,()=>R(T.value),{flush:i,deep:o,eventFilter:m});Ie(K,()=>w(),{flush:i}),d&&l&&Jn(()=>{n instanceof Storage?Ye(d,"storage",w,{passive:!0}):Ye(d,zr,M),x&&w()}),x||w();function D(A,b){if(d){const N={key:K.value,oldValue:A,newValue:b,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",N):new CustomEvent(zr,{detail:N}))}}function R(A){try{const b=n.getItem(K.value);if(A==null)D(b,null),n.removeItem(K.value);else{const N=p.write(A);b!==N&&(n.setItem(K.value,N),D(b,N))}}catch(b){v(b)}}function $(A){const b=A?A.newValue:n.getItem(K.value);if(b==null)return c&&F!=null&&n.setItem(K.value,p.write(F)),F;if(!A&&f){const N=p.read(b);return typeof f=="function"?f(N,F):U==="object"&&!Array.isArray(N)?{...F,...N}:N}else return typeof b!="string"?b:p.read(b)}function w(A){if(!(A&&A.storageArea!==n)){if(A&&A.key==null){T.value=F;return}if(!(A&&A.key!==K.value)){g();try{(A==null?void 0:A.newValue)!==p.write(T.value)&&(T.value=$(A))}catch(b){v(b)}finally{A?Wn(O):O()}}}}function M(A){w(A.detail)}return T}const Ga="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Xa(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=Xe,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:f,disableTransition:a=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},m=No({window:r}),v=ie(()=>m.value?"dark":"light"),x=c||(o==null?sr(s):qa(o,s,i,{window:r,listenToStorageChanges:l})),T=ie(()=>x.value==="auto"?v.value:x.value),K=Io("updateHTMLAttrs",(g,O,D)=>{const R=typeof g=="string"?r==null?void 0:r.document.querySelector(g):rr(g);if(!R)return;const $=new Set,w=new Set;let M=null;if(O==="class"){const b=D.split(/\s/g);Object.values(d).flatMap(N=>(N||"").split(/\s/g)).filter(Boolean).forEach(N=>{b.includes(N)?$.add(N):w.add(N)})}else M={key:O,value:D};if($.size===0&&w.size===0&&M===null)return;let A;a&&(A=r.document.createElement("style"),A.appendChild(document.createTextNode(Ga)),r.document.head.appendChild(A));for(const b of $)R.classList.add(b);for(const b of w)R.classList.remove(b);M&&R.setAttribute(M.key,M.value),a&&(r.getComputedStyle(A).opacity,document.head.removeChild(A))});function F(g){var O;K(t,n,(O=d[g])!=null?O:g)}function U(g){e.onChanged?e.onChanged(g,F):F(g)}Ie(T,U,{flush:"post",immediate:!0}),Jn(()=>U(T.value));const p=ie({get(){return f?x.value:T.value},set(g){x.value=g}});return Object.assign(p,{store:x,system:v,state:T})}function Ya(e={}){const{valueDark:t="dark",valueLight:n=""}=e,s=Xa({...e,onChanged:(o,l)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,o==="dark",l,o):l(o)},modes:{dark:t,light:n}}),r=ie(()=>s.system.value);return ie({get(){return s.value==="dark"},set(o){const l=o?"dark":"light";r.value===l?s.value="auto":s.value=l}})}function gs(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const Qr=1;function Ja(e,t={}){const{throttle:n=0,idle:s=200,onStop:r=St,onScroll:i=St,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:c="auto",window:f=Xe,onError:a=R=>{console.error(R)}}=t,d=Le(0),m=Le(0),v=ie({get(){return d.value},set(R){T(R,void 0)}}),x=ie({get(){return m.value},set(R){T(void 0,R)}});function T(R,$){var w,M,A,b;if(!f)return;const N=le(e);if(!N)return;(A=N instanceof Document?f.document.body:N)==null||A.scrollTo({top:(w=le($))!=null?w:x.value,left:(M=le(R))!=null?M:v.value,behavior:le(c)});const Y=((b=N==null?void 0:N.document)==null?void 0:b.documentElement)||(N==null?void 0:N.documentElement)||N;v!=null&&(d.value=Y.scrollLeft),x!=null&&(m.value=Y.scrollTop)}const K=Le(!1),F=Lt({left:!0,right:!1,top:!0,bottom:!1}),U=Lt({left:!1,right:!1,top:!1,bottom:!1}),p=R=>{K.value&&(K.value=!1,U.left=!1,U.right=!1,U.top=!1,U.bottom=!1,r(R))},g=La(p,n+s),O=R=>{var $;if(!f)return;const w=(($=R==null?void 0:R.document)==null?void 0:$.documentElement)||(R==null?void 0:R.documentElement)||rr(R),{display:M,flexDirection:A,direction:b}=getComputedStyle(w),N=b==="rtl"?-1:1,Y=w.scrollLeft;U.left=Yd.value;const re=Math.abs(Y*N)<=(o.left||0),V=Math.abs(Y*N)+w.clientWidth>=w.scrollWidth-(o.right||0)-Qr;M==="flex"&&A==="row-reverse"?(F.left=V,F.right=re):(F.left=re,F.right=V),d.value=Y;let X=w.scrollTop;R===f.document&&!X&&(X=f.document.body.scrollTop),U.top=Xm.value;const j=Math.abs(X)<=(o.top||0),ce=Math.abs(X)+w.clientHeight>=w.scrollHeight-(o.bottom||0)-Qr;M==="flex"&&A==="column-reverse"?(F.top=ce,F.bottom=j):(F.top=j,F.bottom=ce),m.value=X},D=R=>{var $;if(!f)return;const w=($=R.target.documentElement)!=null?$:R.target;O(w),K.value=!0,g(R),i(R)};return Ye(e,"scroll",n?Ia(D,n,!0,!1):D,l),Jn(()=>{try{const R=le(e);if(!R)return;O(R)}catch(R){a(R)}}),Ye(e,"scrollend",p,l),{x:v,y:x,isScrolling:K,arrivedState:F,directions:U,measure(){const R=le(e);f&&R&&O(R)}}}function Fo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const ms=new WeakMap;function Gf(e,t=!1){const n=Le(t);let s=null,r="";Ie(sr(e),l=>{const c=gs(le(l));if(c){const f=c;if(ms.get(f)||ms.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(r=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=gs(le(e));!l||n.value||(Yr&&(s=Ye(l,"touchmove",c=>{za(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=gs(le(e));!l||!n.value||(Yr&&(s==null||s()),l.style.overflow=r,ms.delete(l),n.value=!1)};return Mo(o),ie({get(){return n.value},set(l){l?i():o()}})}function Xf(e={}){const{window:t=Xe,...n}=e;return Ja(t,n)}function Yf(e={}){const{window:t=Xe,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=Le(n),c=Le(s),f=()=>{if(t)if(o==="outer")l.value=t.outerWidth,c.value=t.outerHeight;else if(o==="visual"&&t.visualViewport){const{width:d,height:m,scale:v}=t.visualViewport;l.value=Math.round(d*v),c.value=Math.round(m*v)}else i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};f(),Jn(f);const a={passive:!0};if(Ye("resize",f,a),t&&o==="visual"&&t.visualViewport&&Ye(t.visualViewport,"resize",f,a),r){const d=Lo("(orientation: portrait)");Ie(d,()=>f())}return{width:l,height:c}}const ys={};var vs={};const Ho=/^(?:[a-z]+:|\/\/)/i,Qa="vitepress-theme-appearance",Za=/#.*$/,ef=/[?#].*$/,tf=/(?:(^|\/)index)?\.(?:md|html)$/,ge=typeof document<"u",Do={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function nf(e,t,n=!1){if(t===void 0)return!1;if(e=Zr(`/${e}`),n)return new RegExp(t).test(e);if(Zr(t)!==e)return!1;const s=t.match(Za);return s?(ge?location.hash:"")===s[0]:!0}function Zr(e){return decodeURI(e).replace(ef,"").replace(tf,"$1")}function sf(e){return Ho.test(e)}function rf(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!sf(n)&&nf(t,`/${n}/`,!0))||"root"}function of(e,t){var s,r,i,o,l,c,f;const n=rf(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:jo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(f=e.locales[n])==null?void 0:f.themeConfig}})}function $o(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=lf(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function lf(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function cf(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function jo(e,t){return[...e.filter(n=>!cf(t,n)),...t]}const af=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,ff=/^[a-z]:/i;function ei(e){const t=ff.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(af,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const bs=new Set;function uf(e){if(bs.size===0){const n=typeof process=="object"&&(vs==null?void 0:vs.VITE_EXTRA_EXTENSIONS)||(ys==null?void 0:ys.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>bs.add(s))}const t=e.split(".").pop();return t==null||!bs.has(t.toLowerCase())}const df=Symbol(),_t=Le(Ta);function Jf(e){const t=ie(()=>of(_t.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?gt(!0):n==="force-auto"?No():n?Ya({storageKey:Qa,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):gt(!1),r=gt(ge?location.hash:"");return ge&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Ie(()=>e.data,()=>{r.value=ge?location.hash:""}),{site:t,theme:ie(()=>t.value.themeConfig),page:ie(()=>e.data),frontmatter:ie(()=>e.data.frontmatter),params:ie(()=>e.data.params),lang:ie(()=>t.value.lang),dir:ie(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:ie(()=>t.value.localeIndex||"root"),title:ie(()=>$o(t.value,e.data)),description:ie(()=>e.data.description||t.value.description),isDark:s,hash:ie(()=>r.value)}}function hf(){const e=vt(df);if(!e)throw new Error("vitepress data not properly injected in app");return e}function pf(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function ti(e){return Ho.test(e)||!e.startsWith("/")?e:pf(_t.value.base,e)}function gf(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),ge){const n="/document/";t=ei(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${ei(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let Cn=[];function zf(e){Cn.push(e),qn(()=>{Cn=Cn.filter(t=>t!==e)})}function mf(){let e=_t.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=ni(e,n);else if(Array.isArray(e))for(const s of e){const r=ni(s,n);if(r){t=r;break}}return t}function ni(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const yf=Symbol(),Vo="http://a.com",vf=()=>({path:"/",component:null,data:Do});function Qf(e,t){const n=Lt(vf()),s={route:n,go:r};async function r(l=ge?location.href:"/"){var c,f;l=_s(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(ge&&l!==_s(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((f=s.onAfterRouteChange??s.onAfterRouteChanged)==null?void 0:f(l)))}let i=null;async function o(l,c=0,f=!1){var m,v;if(await((m=s.onBeforePageLoad)==null?void 0:m.call(s,l))===!1)return;const a=new URL(l,Vo),d=i=a.pathname;try{let x=await e(d);if(!x)throw new Error(`Page not found: ${d}`);if(i===d){i=null;const{default:T,__pageData:K}=x;if(!T)throw new Error(`Invalid route component: ${T}`);await((v=s.onAfterPageLoad)==null?void 0:v.call(s,l)),n.path=ge?d:ti(d),n.component=Sn(T),n.data=Sn(K),ge&&Wn(()=>{let F=_t.value.base+K.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!_t.value.cleanUrls&&!F.endsWith("/")&&(F+=".html"),F!==a.pathname&&(a.pathname=F,l=F+a.search+a.hash,history.replaceState({},"",l)),a.hash&&!c){let U=null;try{U=document.getElementById(decodeURIComponent(a.hash).slice(1))}catch(p){console.warn(p)}if(U){si(U,a.hash);return}}window.scrollTo(0,c)})}}catch(x){if(!/fetch|Page not found/.test(x.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(x),!f)try{const T=await fetch(_t.value.base+"hashmap.json");window.__VP_HASH_MAP__=await T.json(),await o(l,c,!0);return}catch{}if(i===d){i=null,n.path=ge?d:ti(d),n.component=t?Sn(t):null;const T=ge?d.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...Do,relativePath:T}}}}return ge&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const f=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(f==null)return;const{href:a,origin:d,pathname:m,hash:v,search:x}=new URL(f,c.baseURI),T=new URL(location.href);d===T.origin&&uf(m)&&(l.preventDefault(),m===T.pathname&&x===T.search?(v!==T.hash&&(history.pushState({},"",a),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:T.href,newURL:a}))),v?si(c,v,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(a))},{capture:!0}),window.addEventListener("popstate",async l=>{var f;if(l.state===null)return;const c=_s(location.href);await o(c,l.state&&l.state.scrollPosition||0),await((f=s.onAfterRouteChange??s.onAfterRouteChanged)==null?void 0:f(c))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function bf(){const e=vt(yf);if(!e)throw new Error("useRouter() is called without provider.");return e}function ko(){return bf().route}function si(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-mf()+i;requestAnimationFrame(r)}}function _s(e){const t=new URL(e,Vo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),_t.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const vn=()=>Cn.forEach(e=>e()),Zf=Wi({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=ko(),{frontmatter:n,site:s}=hf();return Ie(n,vn,{deep:!0,flush:"post"}),()=>Ds(e.as,s.value.contentProps??{style:{position:"relative"}},[t.component?Ds(t.component,{onVnodeMounted:vn,onVnodeUpdated:vn,onVnodeUnmounted:vn}):"404 Page Not Found"])}}),eu=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},_f="modulepreload",wf=function(e){return"/document/"+e},ri={},tu=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=wf(c),c in ri)return;ri[c]=!0;const f=c.endsWith(".css"),a=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const d=document.createElement("link");if(d.rel=f?"stylesheet":_f,f||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),f)return new Promise((m,v)=>{d.addEventListener("load",m),d.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},nu=Wi({setup(e,{slots:t}){const n=gt(!1);return It(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function su(){ge&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(f=>f.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function ru(){if(ge){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(a=>a.remove());let f=c.textContent||"";o&&(f=f.replace(/^ *(\$|>) /gm,"").trim()),Sf(f).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const a=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,a)})}})}}async function Sf(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function iu(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=ws(l);for(const f of document.head.children)if(f.isEqualNode(c)){s.push(f);return}});return}const o=i.map(ws);s.forEach((l,c)=>{const f=o.findIndex(a=>a==null?void 0:a.isEqualNode(l??null));f!==-1?delete o[f]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};ho(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],f=$o(o,i);f!==document.title&&(document.title=f);const a=l||o.description;let d=document.querySelector("meta[name=description]");d?d.getAttribute("content")!==a&&d.setAttribute("content",a):ws(["meta",{name:"description",content:a}]),r(jo(o.head,xf(c)))})}function ws([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&t.async==null&&(s.async=!1),s}function Tf(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function xf(e){return e.filter(t=>!Tf(t))}const Ss=new Set,Uo=()=>document.createElement("link"),Ef=e=>{const t=Uo();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Cf=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let bn;const Af=ge&&(bn=Uo())&&bn.relList&&bn.relList.supports&&bn.relList.supports("prefetch")?Ef:Cf;function ou(){if(!ge||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!Ss.has(c)){Ss.add(c);const f=gf(c);f&&Af(f)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):Ss.add(l))})})};It(s);const r=ko();Ie(()=>r.path,s),qn(()=>{n&&n.disconnect()})}export{Mf as $,mf as A,Lf as B,Of as C,Le as D,zf as E,Te as F,he as G,Pf as H,Ho as I,ko as J,Hc as K,vt as L,Yf as M,Ws as N,qf as O,Wn as P,Xf as Q,ge as R,kn as S,Vf as T,bf as U,tu as V,Rf as W,kf as X,Wf as Y,Uf as Z,eu as _,So as a,Gf as a0,gc as a1,Nf as a2,Bf as a3,qi as a4,Ff as a5,iu as a6,yf as a7,Jf as a8,df as a9,Zf as aa,nu as ab,_t as ac,Qf as ad,gf as ae,Kf as af,ou as ag,ru as ah,su as ai,Ds as aj,$f as ak,Fs as b,Df as c,Wi as d,jf as e,uf as f,ti as g,ie as h,sf as i,wo as j,zs as k,nf as l,Lo as m,Bs as n,Ns as o,gt as p,Ie as q,If as r,ho as s,sl as t,hf as u,It as v,kl as w,qn as x,Hf as y,tc as z}; diff --git a/docs/document/assets/chunks/framework.DHbvjPBJ.js b/docs/document/assets/chunks/framework.DHbvjPBJ.js deleted file mode 100644 index 657741691..000000000 --- a/docs/document/assets/chunks/framework.DHbvjPBJ.js +++ /dev/null @@ -1,17 +0,0 @@ -/** -* @vue/shared v3.4.38 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function ws(e,t){const n=new Set(e.split(","));return s=>n.has(s)}const ne={},yt=[],Ae=()=>{},To=()=>!1,kt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),vs=e=>e.startsWith("onUpdate:"),ce=Object.assign,Es=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ao=Object.prototype.hasOwnProperty,J=(e,t)=>Ao.call(e,t),B=Array.isArray,_t=e=>En(e)==="[object Map]",Br=e=>En(e)==="[object Set]",k=e=>typeof e=="function",re=e=>typeof e=="string",Qe=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",kr=e=>(Z(e)||k(e))&&k(e.then)&&k(e.catch),Kr=Object.prototype.toString,En=e=>Kr.call(e),Oo=e=>En(e).slice(8,-1),Wr=e=>En(e)==="[object Object]",Cs=e=>re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bt=ws(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Cn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ro=/-(\w)/g,Le=Cn(e=>e.replace(Ro,(t,n)=>n?n.toUpperCase():"")),Lo=/\B([A-Z])/g,Ze=Cn(e=>e.replace(Lo,"-$1").toLowerCase()),Sn=Cn(e=>e.charAt(0).toUpperCase()+e.slice(1)),ln=Cn(e=>e?`on${Sn(e)}`:""),Je=(e,t)=>!Object.is(e,t),cn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ls=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Mo=e=>{const t=re(e)?Number(e):NaN;return isNaN(t)?e:t};let Gs;const Gr=()=>Gs||(Gs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ss(e){if(B(e)){const t={};for(let n=0;n{if(n){const s=n.split(Po);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function xs(e){let t="";if(re(e))t=e;else if(B(e))for(let n=0;n!!(e&&e.__v_isRef===!0),jo=e=>re(e)?e:e==null?"":B(e)||Z(e)&&(e.toString===Kr||!k(e.toString))?Yr(e)?jo(e.value):JSON.stringify(e,Jr,2):String(e),Jr=(e,t)=>Yr(t)?Jr(e,t.value):_t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[Bn(s,i)+" =>"]=r,n),{})}:Br(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Bn(n))}:Qe(t)?Bn(t):Z(t)&&!B(t)&&!Wr(t)?String(t):t,Bn=(e,t="")=>{var n;return Qe(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.4.38 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ee;class Vo{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ee,!t&&Ee&&(this.index=(Ee.scopes||(Ee.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Ee;try{return Ee=this,t()}finally{Ee=n}}}on(){Ee=this}off(){Ee=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),tt()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Ge,n=ct;try{return Ge=!0,ct=this,this._runnings++,Xs(this),this.fn()}finally{Ys(this),this._runnings--,ct=n,Ge=t}}stop(){this.active&&(Xs(this),Ys(this),this.onStop&&this.onStop(),this.active=!1)}}function Bo(e){return e.value}function Xs(e){e._trackId++,e._depsLength=0}function Ys(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},hn=new WeakMap,at=Symbol(""),fs=Symbol("");function we(e,t,n){if(Ge&&ct){let s=hn.get(e);s||hn.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=ni(()=>s.delete(n))),ei(ct,r)}}function He(e,t,n,s,r,i){const o=hn.get(e);if(!o)return;let l=[];if(t==="clear")l=[...o.values()];else if(n==="length"&&B(e)){const c=Number(s);o.forEach((f,d)=>{(d==="length"||!Qe(d)&&d>=c)&&l.push(f)})}else switch(n!==void 0&&l.push(o.get(n)),t){case"add":B(e)?Cs(n)&&l.push(o.get("length")):(l.push(o.get(at)),_t(e)&&l.push(o.get(fs)));break;case"delete":B(e)||(l.push(o.get(at)),_t(e)&&l.push(o.get(fs)));break;case"set":_t(e)&&l.push(o.get(at));break}As();for(const c of l)c&&ti(c,4);Os()}function ko(e,t){const n=hn.get(e);return n&&n.get(t)}const Ko=ws("__proto__,__v_isRef,__isVue"),si=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Qe)),Js=Wo();function Wo(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=z(this);for(let i=0,o=this.length;i{e[t]=function(...n){et(),As();const s=z(this)[t].apply(this,n);return Os(),tt(),s}}),e}function qo(e){Qe(e)||(e=String(e));const t=z(this);return we(t,"has",e),t.hasOwnProperty(e)}class ri{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?il:ci:i?li:oi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=B(t);if(!r){if(o&&J(Js,n))return Reflect.get(Js,n,s);if(n==="hasOwnProperty")return qo}const l=Reflect.get(t,n,s);return(Qe(n)?si.has(n):Ko(n))||(r||we(t,"get",n),i)?l:ge(l)?o&&Cs(n)?l:l.value:Z(l)?r?An(l):Tn(l):l}}class ii extends ri{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const c=dt(i);if(!xt(s)&&!dt(s)&&(i=z(i),s=z(s)),!B(t)&&ge(i)&&!ge(s))return c?!1:(i.value=s,!0)}const o=B(t)&&Cs(n)?Number(n)e,xn=e=>Reflect.getPrototypeOf(e);function Gt(e,t,n=!1,s=!1){e=e.__v_raw;const r=z(e),i=z(t);n||(Je(t,i)&&we(r,"get",t),we(r,"get",i));const{has:o}=xn(r),l=s?Rs:n?Is:jt;if(o.call(r,t))return l(e.get(t));if(o.call(r,i))return l(e.get(i));e!==r&&e.get(t)}function Xt(e,t=!1){const n=this.__v_raw,s=z(n),r=z(e);return t||(Je(e,r)&&we(s,"has",e),we(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Yt(e,t=!1){return e=e.__v_raw,!t&&we(z(e),"iterate",at),Reflect.get(e,"size",e)}function zs(e,t=!1){!t&&!xt(e)&&!dt(e)&&(e=z(e));const n=z(this);return xn(n).has.call(n,e)||(n.add(e),He(n,"add",e,e)),this}function Qs(e,t,n=!1){!n&&!xt(t)&&!dt(t)&&(t=z(t));const s=z(this),{has:r,get:i}=xn(s);let o=r.call(s,e);o||(e=z(e),o=r.call(s,e));const l=i.call(s,e);return s.set(e,t),o?Je(t,l)&&He(s,"set",e,t):He(s,"add",e,t),this}function Zs(e){const t=z(this),{has:n,get:s}=xn(t);let r=n.call(t,e);r||(e=z(e),r=n.call(t,e)),s&&s.call(t,e);const i=t.delete(e);return r&&He(t,"delete",e,void 0),i}function er(){const e=z(this),t=e.size!==0,n=e.clear();return t&&He(e,"clear",void 0,void 0),n}function Jt(e,t){return function(s,r){const i=this,o=i.__v_raw,l=z(o),c=t?Rs:e?Is:jt;return!e&&we(l,"iterate",at),o.forEach((f,d)=>s.call(r,c(f),c(d),i))}}function zt(e,t,n){return function(...s){const r=this.__v_raw,i=z(r),o=_t(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,f=r[e](...s),d=n?Rs:t?Is:jt;return!t&&we(i,"iterate",c?fs:at),{next(){const{value:h,done:m}=f.next();return m?{value:h,done:m}:{value:l?[d(h[0]),d(h[1])]:d(h),done:m}},[Symbol.iterator](){return this}}}}function De(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zo(){const e={get(i){return Gt(this,i)},get size(){return Yt(this)},has:Xt,add:zs,set:Qs,delete:Zs,clear:er,forEach:Jt(!1,!1)},t={get(i){return Gt(this,i,!1,!0)},get size(){return Yt(this)},has:Xt,add(i){return zs.call(this,i,!0)},set(i,o){return Qs.call(this,i,o,!0)},delete:Zs,clear:er,forEach:Jt(!1,!0)},n={get(i){return Gt(this,i,!0)},get size(){return Yt(this,!0)},has(i){return Xt.call(this,i,!0)},add:De("add"),set:De("set"),delete:De("delete"),clear:De("clear"),forEach:Jt(!0,!1)},s={get(i){return Gt(this,i,!0,!0)},get size(){return Yt(this,!0)},has(i){return Xt.call(this,i,!0)},add:De("add"),set:De("set"),delete:De("delete"),clear:De("clear"),forEach:Jt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=zt(i,!1,!1),n[i]=zt(i,!0,!1),t[i]=zt(i,!1,!0),s[i]=zt(i,!0,!0)}),[e,n,t,s]}const[Qo,Zo,el,tl]=zo();function Ls(e,t){const n=t?e?tl:el:e?Zo:Qo;return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(J(n,r)&&r in s?n:s,r,i)}const nl={get:Ls(!1,!1)},sl={get:Ls(!1,!0)},rl={get:Ls(!0,!1)};const oi=new WeakMap,li=new WeakMap,ci=new WeakMap,il=new WeakMap;function ol(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ll(e){return e.__v_skip||!Object.isExtensible(e)?0:ol(Oo(e))}function Tn(e){return dt(e)?e:Ms(e,!1,Xo,nl,oi)}function cl(e){return Ms(e,!1,Jo,sl,li)}function An(e){return Ms(e,!0,Yo,rl,ci)}function Ms(e,t,n,s,r){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=ll(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function wt(e){return dt(e)?wt(e.__v_raw):!!(e&&e.__v_isReactive)}function dt(e){return!!(e&&e.__v_isReadonly)}function xt(e){return!!(e&&e.__v_isShallow)}function ai(e){return e?!!e.__v_raw:!1}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function an(e){return Object.isExtensible(e)&&qr(e,"__v_skip",!0),e}const jt=e=>Z(e)?Tn(e):e,Is=e=>Z(e)?An(e):e;class fi{constructor(t,n,s,r){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ts(()=>t(this._value),()=>Pt(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=z(this);return(!t._cacheable||t.effect.dirty)&&Je(t._value,t._value=t.effect.run())&&Pt(t,4),Ps(t),t.effect._dirtyLevel>=2&&Pt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function al(e,t,n=!1){let s,r;const i=k(e);return i?(s=e,r=Ae):(s=e.get,r=e.set),new fi(s,r,i||!r,n)}function Ps(e){var t;Ge&&ct&&(e=z(e),ei(ct,(t=e.dep)!=null?t:e.dep=ni(()=>e.dep=void 0,e instanceof fi?e:void 0)))}function Pt(e,t=4,n,s){e=z(e);const r=e.dep;r&&ti(r,t)}function ge(e){return!!(e&&e.__v_isRef===!0)}function ue(e){return di(e,!1)}function ui(e){return di(e,!0)}function di(e,t){return ge(e)?e:new fl(e,t)}class fl{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:z(t),this._value=n?t:jt(t)}get value(){return Ps(this),this._value}set value(t){const n=this.__v_isShallow||xt(t)||dt(t);t=n?t:z(t),Je(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:jt(t),Pt(this,4))}}function hi(e){return ge(e)?e.value:e}const ul={get:(e,t,n)=>hi(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ge(r)&&!ge(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function pi(e){return wt(e)?e:new Proxy(e,ul)}class dl{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:s}=t(()=>Ps(this),()=>Pt(this));this._get=n,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function hl(e){return new dl(e)}class pl{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return ko(z(this._object),this._key)}}class gl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ml(e,t,n){return ge(e)?e:k(e)?new gl(e):Z(e)&&arguments.length>1?yl(e,t,n):ue(e)}function yl(e,t,n){const s=e[t];return ge(s)?s:new pl(e,t,n)}/** -* @vue/runtime-core v3.4.38 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Xe(e,t,n,s){try{return s?e(...s):e()}catch(r){On(r,t,n)}}function Oe(e,t,n,s){if(k(e)){const r=Xe(e,t,n,s);return r&&kr(r)&&r.catch(i=>{On(i,t,n)}),r}if(B(e)){const r=[];for(let i=0;i>>1,r=pe[s],i=Dt(r);iNe&&pe.splice(t,1)}function vl(e){B(e)?vt.push(...e):(!ke||!ke.includes(e,e.allowRecurse?ot+1:ot))&&vt.push(e),mi()}function tr(e,t,n=Vt?Ne+1:0){for(;nDt(n)-Dt(s));if(vt.length=0,ke){ke.push(...t);return}for(ke=t,ot=0;ote.id==null?1/0:e.id,El=(e,t)=>{const n=Dt(e)-Dt(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function yi(e){us=!1,Vt=!0,pe.sort(El);try{for(Ne=0;Ne{s._d&&pr(-1);const i=gn(t);let o;try{o=e(...r)}finally{gn(i),s._d&&pr(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function of(e,t){if(le===null)return e;const n=jn(le),s=e.dirs||(e.dirs=[]);for(let r=0;r{e.isMounted=!0}),Si(()=>{e.isUnmounting=!0}),e}const Se=[Function,Array],_i={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Se,onEnter:Se,onAfterEnter:Se,onEnterCancelled:Se,onBeforeLeave:Se,onLeave:Se,onAfterLeave:Se,onLeaveCancelled:Se,onBeforeAppear:Se,onAppear:Se,onAfterAppear:Se,onAppearCancelled:Se},bi=e=>{const t=e.subTree;return t.component?bi(t.component):t},xl={name:"BaseTransition",props:_i,setup(e,{slots:t}){const n=$n(),s=Sl();return()=>{const r=t.default&&vi(t.default(),!0);if(!r||!r.length)return;let i=r[0];if(r.length>1){for(const m of r)if(m.type!==ye){i=m;break}}const o=z(e),{mode:l}=o;if(s.isLeaving)return kn(i);const c=nr(i);if(!c)return kn(i);let f=ds(c,o,s,n,m=>f=m);mn(c,f);const d=n.subTree,h=d&&nr(d);if(h&&h.type!==ye&&!lt(c,h)&&bi(n).type!==ye){const m=ds(h,o,s,n);if(mn(h,m),l==="out-in"&&c.type!==ye)return s.isLeaving=!0,m.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},kn(i);l==="in-out"&&c.type!==ye&&(m.delayLeave=(C,A,P)=>{const D=wi(s,h);D[String(h.key)]=h,C[Ke]=()=>{A(),C[Ke]=void 0,delete f.delayedLeave},f.delayedLeave=P})}return i}}},Tl=xl;function wi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function ds(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:d,onEnterCancelled:h,onBeforeLeave:m,onLeave:C,onAfterLeave:A,onLeaveCancelled:P,onBeforeAppear:D,onAppear:K,onAfterAppear:G,onAppearCancelled:p}=t,y=String(e.key),M=wi(n,e),x=(L,_)=>{L&&Oe(L,s,9,_)},F=(L,_)=>{const N=_[1];x(L,_),B(L)?L.every(S=>S.length<=1)&&N():L.length<=1&&N()},H={mode:o,persisted:l,beforeEnter(L){let _=c;if(!n.isMounted)if(i)_=D||c;else return;L[Ke]&&L[Ke](!0);const N=M[y];N&<(e,N)&&N.el[Ke]&&N.el[Ke](),x(_,[L])},enter(L){let _=f,N=d,S=h;if(!n.isMounted)if(i)_=K||f,N=G||d,S=p||h;else return;let q=!1;const ee=L[Qt]=se=>{q||(q=!0,se?x(S,[L]):x(N,[L]),H.delayedLeave&&H.delayedLeave(),L[Qt]=void 0)};_?F(_,[L,ee]):ee()},leave(L,_){const N=String(e.key);if(L[Qt]&&L[Qt](!0),n.isUnmounting)return _();x(m,[L]);let S=!1;const q=L[Ke]=ee=>{S||(S=!0,_(),ee?x(P,[L]):x(A,[L]),L[Ke]=void 0,M[N]===e&&delete M[N])};M[N]=e,C?F(C,[L,q]):q()},clone(L){const _=ds(L,t,n,s,r);return r&&r(_),_}};return H}function kn(e){if(Mn(e))return e=ze(e),e.children=null,e}function nr(e){if(!Mn(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&k(n.default))return n.default()}}function mn(e,t){e.shapeFlag&6&&e.component?mn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function vi(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;i!!e.type.__asyncLoader,Mn=e=>e.type.__isKeepAlive;function Al(e,t){Ci(e,"a",t)}function Ol(e,t){Ci(e,"da",t)}function Ci(e,t,n=fe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(In(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Mn(r.parent.vnode)&&Rl(s,t,n,r),r=r.parent}}function Rl(e,t,n,s){const r=In(t,e,s,!0);Pn(()=>{Es(s[t],r)},n)}function In(e,t,n=fe,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{et();const l=Kt(n),c=Oe(t,n,e,o);return l(),tt(),c});return s?r.unshift(i):r.push(i),i}}const Ve=e=>(t,n=fe)=>{(!Hn||e==="sp")&&In(e,(...s)=>t(...s),n)},Ll=Ve("bm"),At=Ve("m"),Ml=Ve("bu"),Il=Ve("u"),Si=Ve("bum"),Pn=Ve("um"),Pl=Ve("sp"),Nl=Ve("rtg"),Fl=Ve("rtc");function $l(e,t=fe){In("ec",e,t)}const xi="components";function lf(e,t){return Ai(xi,e,!0,t)||e}const Ti=Symbol.for("v-ndc");function cf(e){return re(e)?Ai(xi,e,!1)||e:e||Ti}function Ai(e,t,n=!0,s=!1){const r=le||fe;if(r){const i=r.type;{const l=Oc(i,!1);if(l&&(l===t||l===Le(t)||l===Sn(Le(t))))return i}const o=sr(r[e]||i[e],t)||sr(r.appContext[e],t);return!o&&s?i:o}}function sr(e,t){return e&&(e[t]||e[Le(t)]||e[Sn(Le(t))])}function af(e,t,n,s){let r;const i=n;if(B(e)||re(e)){r=new Array(e.length);for(let o=0,l=e.length;ot(o,l,void 0,i));else{const o=Object.keys(e);r=new Array(o.length);for(let l=0,c=o.length;lbn(t)?!(t.type===ye||t.type===be&&!Oi(t.children)):!0)?e:null}function uf(e,t){const n={};for(const s in e)n[/[A-Z]/.test(s)?`on:${s}`:ln(s)]=e[s];return n}const hs=e=>e?to(e)?jn(e):hs(e.parent):null,Nt=ce(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>hs(e.parent),$root:e=>hs(e.root),$emit:e=>e.emit,$options:e=>$s(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Fs(e.update)}),$nextTick:e=>e.n||(e.n=Rn.bind(e.proxy)),$watch:e=>fc.bind(e)}),Kn=(e,t)=>e!==ne&&!e.__isScriptSetup&&J(e,t),Hl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let f;if(t[0]!=="$"){const C=o[t];if(C!==void 0)switch(C){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Kn(s,t))return o[t]=1,s[t];if(r!==ne&&J(r,t))return o[t]=2,r[t];if((f=e.propsOptions[0])&&J(f,t))return o[t]=3,i[t];if(n!==ne&&J(n,t))return o[t]=4,n[t];ps&&(o[t]=0)}}const d=Nt[t];let h,m;if(d)return t==="$attrs"&&we(e.attrs,"get",""),d(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==ne&&J(n,t))return o[t]=4,n[t];if(m=c.config.globalProperties,J(m,t))return m[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Kn(r,t)?(r[t]=n,!0):s!==ne&&J(s,t)?(s[t]=n,!0):J(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==ne&&J(e,o)||Kn(t,o)||(l=i[0])&&J(l,o)||J(s,o)||J(Nt,o)||J(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:J(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function df(){return jl().slots}function jl(){const e=$n();return e.setupContext||(e.setupContext=so(e))}function rr(e){return B(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ps=!0;function Vl(e){const t=$s(e),n=e.proxy,s=e.ctx;ps=!1,t.beforeCreate&&ir(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:f,created:d,beforeMount:h,mounted:m,beforeUpdate:C,updated:A,activated:P,deactivated:D,beforeDestroy:K,beforeUnmount:G,destroyed:p,unmounted:y,render:M,renderTracked:x,renderTriggered:F,errorCaptured:H,serverPrefetch:L,expose:_,inheritAttrs:N,components:S,directives:q,filters:ee}=t;if(f&&Dl(f,s,null),o)for(const Y in o){const U=o[Y];k(U)&&(s[Y]=U.bind(n))}if(r){const Y=r.call(n,n);Z(Y)&&(e.data=Tn(Y))}if(ps=!0,i)for(const Y in i){const U=i[Y],ae=k(U)?U.bind(n,n):k(U.get)?U.get.bind(n,n):Ae,Wt=!k(U)&&k(U.set)?U.set.bind(n):Ae,nt=ie({get:ae,set:Wt});Object.defineProperty(s,Y,{enumerable:!0,configurable:!0,get:()=>nt.value,set:Me=>nt.value=Me})}if(l)for(const Y in l)Ri(l[Y],s,n,Y);if(c){const Y=k(c)?c.call(n):c;Reflect.ownKeys(Y).forEach(U=>{ql(U,Y[U])})}d&&ir(d,e,"c");function V(Y,U){B(U)?U.forEach(ae=>Y(ae.bind(n))):U&&Y(U.bind(n))}if(V(Ll,h),V(At,m),V(Ml,C),V(Il,A),V(Al,P),V(Ol,D),V($l,H),V(Fl,x),V(Nl,F),V(Si,G),V(Pn,y),V(Pl,L),B(_))if(_.length){const Y=e.exposed||(e.exposed={});_.forEach(U=>{Object.defineProperty(Y,U,{get:()=>n[U],set:ae=>n[U]=ae})})}else e.exposed||(e.exposed={});M&&e.render===Ae&&(e.render=M),N!=null&&(e.inheritAttrs=N),S&&(e.components=S),q&&(e.directives=q)}function Dl(e,t,n=Ae){B(e)&&(e=gs(e));for(const s in e){const r=e[s];let i;Z(r)?"default"in r?i=St(r.from||s,r.default,!0):i=St(r.from||s):i=St(r),ge(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function ir(e,t,n){Oe(B(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ri(e,t,n,s){const r=s.includes(".")?qi(n,s):()=>n[s];if(re(e)){const i=t[e];k(i)&&Fe(r,i)}else if(k(e))Fe(r,e.bind(n));else if(Z(e))if(B(e))e.forEach(i=>Ri(i,t,n,s));else{const i=k(e.handler)?e.handler.bind(n):t[e.handler];k(i)&&Fe(r,i,e)}}function $s(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>yn(c,f,o,!0)),yn(c,t,o)),Z(t)&&i.set(t,c),c}function yn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&yn(e,i,n,!0),r&&r.forEach(o=>yn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Ul[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Ul={data:or,props:lr,emits:lr,methods:It,computed:It,beforeCreate:me,created:me,beforeMount:me,mounted:me,beforeUpdate:me,updated:me,beforeDestroy:me,beforeUnmount:me,destroyed:me,unmounted:me,activated:me,deactivated:me,errorCaptured:me,serverPrefetch:me,components:It,directives:It,watch:kl,provide:or,inject:Bl};function or(e,t){return t?e?function(){return ce(k(e)?e.call(this,this):e,k(t)?t.call(this,this):t)}:t:e}function Bl(e,t){return It(gs(e),gs(t))}function gs(e){if(B(e)){const t={};for(let n=0;n1)return n&&k(t)?t.call(s&&s.proxy):t}}const Mi={},Ii=()=>Object.create(Mi),Pi=e=>Object.getPrototypeOf(e)===Mi;function Gl(e,t,n,s=!1){const r={},i=Ii();e.propsDefaults=Object.create(null),Ni(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:cl(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Xl(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=z(r),[c]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[m,C]=Fi(h,t,!0);ce(o,m),C&&l.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return Z(e)&&s.set(e,yt),yt;if(B(i))for(let d=0;de[0]==="_"||e==="$stable",Hs=e=>B(e)?e.map(Te):[Te(e)],Jl=(e,t,n)=>{if(t._n)return t;const s=Cl((...r)=>Hs(t(...r)),n);return s._c=!1,s},Hi=(e,t,n)=>{const s=e._ctx;for(const r in e){if($i(r))continue;const i=e[r];if(k(i))t[r]=Jl(r,i,s);else if(i!=null){const o=Hs(i);t[r]=()=>o}}},ji=(e,t)=>{const n=Hs(t);e.slots.default=()=>n},Vi=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},zl=(e,t,n)=>{const s=e.slots=Ii();if(e.vnode.shapeFlag&32){const r=t._;r?(Vi(s,t,n),n&&qr(s,"_",r,!0)):Hi(t,s)}else t&&ji(e,t)},Ql=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=ne;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:Vi(r,t,n):(i=!t.$stable,Hi(t,r)),o=t}else t&&(ji(e,t),o={default:1});if(i)for(const l in r)!$i(l)&&o[l]==null&&delete r[l]};function _n(e,t,n,s,r=!1){if(B(e)){e.forEach((m,C)=>_n(m,t&&(B(t)?t[C]:t),n,s,r));return}if(Et(s)&&!r)return;const i=s.shapeFlag&4?jn(s.component):s.el,o=r?null:i,{i:l,r:c}=e,f=t&&t.r,d=l.refs===ne?l.refs={}:l.refs,h=l.setupState;if(f!=null&&f!==c&&(re(f)?(d[f]=null,J(h,f)&&(h[f]=null)):ge(f)&&(f.value=null)),k(c))Xe(c,l,12,[o,d]);else{const m=re(c),C=ge(c);if(m||C){const A=()=>{if(e.f){const P=m?J(h,c)?h[c]:d[c]:c.value;r?B(P)&&Es(P,i):B(P)?P.includes(i)||P.push(i):m?(d[c]=[i],J(h,c)&&(h[c]=d[c])):(c.value=[i],e.k&&(d[e.k]=c.value))}else m?(d[c]=o,J(h,c)&&(h[c]=o)):C&&(c.value=o,e.k&&(d[e.k]=o))};o?(A.id=-1,_e(A,n)):A()}}}const Di=Symbol("_vte"),Zl=e=>e.__isTeleport,Ft=e=>e&&(e.disabled||e.disabled===""),ar=e=>typeof SVGElement<"u"&&e instanceof SVGElement,fr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ys=(e,t)=>{const n=e&&e.to;return re(n)?t?t(n):null:n},ec={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,f){const{mc:d,pc:h,pbc:m,o:{insert:C,querySelector:A,createText:P,createComment:D}}=f,K=Ft(t.props);let{shapeFlag:G,children:p,dynamicChildren:y}=t;if(e==null){const M=t.el=P(""),x=t.anchor=P("");C(M,n,s),C(x,n,s);const F=t.target=ys(t.props,A),H=Bi(F,t,P,C);F&&(o==="svg"||ar(F)?o="svg":(o==="mathml"||fr(F))&&(o="mathml"));const L=(_,N)=>{G&16&&d(p,_,N,r,i,o,l,c)};K?L(n,x):F&&L(F,H)}else{t.el=e.el,t.targetStart=e.targetStart;const M=t.anchor=e.anchor,x=t.target=e.target,F=t.targetAnchor=e.targetAnchor,H=Ft(e.props),L=H?n:x,_=H?M:F;if(o==="svg"||ar(x)?o="svg":(o==="mathml"||fr(x))&&(o="mathml"),y?(m(e.dynamicChildren,y,L,r,i,o,l),js(e,t,!0)):c||h(e,t,L,_,r,i,o,l,!1),K)H?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Zt(t,n,M,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const N=t.target=ys(t.props,A);N&&Zt(t,N,null,f,0)}else H&&Zt(t,x,F,f,1)}Ui(t)},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:f,targetAnchor:d,target:h,props:m}=e;if(h&&(r(f),r(d)),i&&r(c),o&16){const C=i||!Ft(m);for(let A=0;A{ur||(console.error("Hydration completed but contains mismatches."),ur=!0)},nc=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",sc=e=>e.namespaceURI.includes("MathML"),en=e=>{if(nc(e))return"svg";if(sc(e))return"mathml"},tn=e=>e.nodeType===8;function rc(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:f}}=e,d=(p,y)=>{if(!y.hasChildNodes()){n(null,p,y),pn(),y._vnode=p;return}h(y.firstChild,p,null,null,null),pn(),y._vnode=p},h=(p,y,M,x,F,H=!1)=>{H=H||!!y.dynamicChildren;const L=tn(p)&&p.data==="[",_=()=>P(p,y,M,x,F,L),{type:N,ref:S,shapeFlag:q,patchFlag:ee}=y;let se=p.nodeType;y.el=p,ee===-2&&(H=!1,y.dynamicChildren=null);let V=null;switch(N){case ft:se!==3?y.children===""?(c(y.el=r(""),o(p),p),V=p):V=_():(p.data!==y.children&&(gt(),p.data=y.children),V=i(p));break;case ye:G(p)?(V=i(p),K(y.el=p.content.firstChild,p,M)):se!==8||L?V=_():V=i(p);break;case $t:if(L&&(p=i(p),se=p.nodeType),se===1||se===3){V=p;const Y=!y.children.length;for(let U=0;U{H=H||!!y.dynamicChildren;const{type:L,props:_,patchFlag:N,shapeFlag:S,dirs:q,transition:ee}=y,se=L==="input"||L==="option";if(se||N!==-1){q&&Pe(y,null,M,"created");let V=!1;if(G(p)){V=ki(x,ee)&&M&&M.vnode.props&&M.vnode.props.appear;const U=p.content.firstChild;V&&ee.beforeEnter(U),K(U,p,M),y.el=p=U}if(S&16&&!(_&&(_.innerHTML||_.textContent))){let U=C(p.firstChild,y,p,M,x,F,H);for(;U;){gt();const ae=U;U=U.nextSibling,l(ae)}}else S&8&&p.textContent!==y.children&&(gt(),p.textContent=y.children);if(_){if(se||!H||N&48){const U=p.tagName.includes("-");for(const ae in _)(se&&(ae.endsWith("value")||ae==="indeterminate")||kt(ae)&&!bt(ae)||ae[0]==="."||U)&&s(p,ae,null,_[ae],void 0,M)}else if(_.onClick)s(p,"onClick",null,_.onClick,void 0,M);else if(N&4&&wt(_.style))for(const U in _.style)_.style[U]}let Y;(Y=_&&_.onVnodeBeforeMount)&&xe(Y,M,y),q&&Pe(y,null,M,"beforeMount"),((Y=_&&_.onVnodeMounted)||q||V)&&Xi(()=>{Y&&xe(Y,M,y),V&&ee.enter(p),q&&Pe(y,null,M,"mounted")},x)}return p.nextSibling},C=(p,y,M,x,F,H,L)=>{L=L||!!y.dynamicChildren;const _=y.children,N=_.length;for(let S=0;S{const{slotScopeIds:L}=y;L&&(F=F?F.concat(L):L);const _=o(p),N=C(i(p),y,_,M,x,F,H);return N&&tn(N)&&N.data==="]"?i(y.anchor=N):(gt(),c(y.anchor=f("]"),_,N),N)},P=(p,y,M,x,F,H)=>{if(gt(),y.el=null,H){const N=D(p);for(;;){const S=i(p);if(S&&S!==N)l(S);else break}}const L=i(p),_=o(p);return l(p),n(null,y,_,L,M,x,en(_),F),L},D=(p,y="[",M="]")=>{let x=0;for(;p;)if(p=i(p),p&&tn(p)&&(p.data===y&&x++,p.data===M)){if(x===0)return i(p);x--}return p},K=(p,y,M)=>{const x=y.parentNode;x&&x.replaceChild(p,y);let F=M;for(;F;)F.vnode.el===y&&(F.vnode.el=F.subTree.el=p),F=F.parent},G=p=>p.nodeType===1&&p.tagName.toLowerCase()==="template";return[d,h]}const _e=Xi;function ic(e){return oc(e,rc)}function oc(e,t){const n=Gr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:f,setElementText:d,parentNode:h,nextSibling:m,setScopeId:C=Ae,insertStaticContent:A}=e,P=(a,u,g,v=null,b=null,E=null,R=void 0,T=null,O=!!u.dynamicChildren)=>{if(a===u)return;a&&!lt(a,u)&&(v=qt(a),Me(a,b,E,!0),a=null),u.patchFlag===-2&&(O=!1,u.dynamicChildren=null);const{type:w,ref:I,shapeFlag:j}=u;switch(w){case ft:D(a,u,g,v);break;case ye:K(a,u,g,v);break;case $t:a==null&&G(u,g,v,R);break;case be:S(a,u,g,v,b,E,R,T,O);break;default:j&1?M(a,u,g,v,b,E,R,T,O):j&6?q(a,u,g,v,b,E,R,T,O):(j&64||j&128)&&w.process(a,u,g,v,b,E,R,T,O,ht)}I!=null&&b&&_n(I,a&&a.ref,E,u||a,!u)},D=(a,u,g,v)=>{if(a==null)s(u.el=l(u.children),g,v);else{const b=u.el=a.el;u.children!==a.children&&f(b,u.children)}},K=(a,u,g,v)=>{a==null?s(u.el=c(u.children||""),g,v):u.el=a.el},G=(a,u,g,v)=>{[a.el,a.anchor]=A(a.children,u,g,v,a.el,a.anchor)},p=({el:a,anchor:u},g,v)=>{let b;for(;a&&a!==u;)b=m(a),s(a,g,v),a=b;s(u,g,v)},y=({el:a,anchor:u})=>{let g;for(;a&&a!==u;)g=m(a),r(a),a=g;r(u)},M=(a,u,g,v,b,E,R,T,O)=>{u.type==="svg"?R="svg":u.type==="math"&&(R="mathml"),a==null?x(u,g,v,b,E,R,T,O):L(a,u,b,E,R,T,O)},x=(a,u,g,v,b,E,R,T)=>{let O,w;const{props:I,shapeFlag:j,transition:$,dirs:W}=a;if(O=a.el=o(a.type,E,I&&I.is,I),j&8?d(O,a.children):j&16&&H(a.children,O,null,v,b,Wn(a,E),R,T),W&&Pe(a,null,v,"created"),F(O,a,a.scopeId,R,v),I){for(const te in I)te!=="value"&&!bt(te)&&i(O,te,null,I[te],E,v);"value"in I&&i(O,"value",null,I.value,E),(w=I.onVnodeBeforeMount)&&xe(w,v,a)}W&&Pe(a,null,v,"beforeMount");const X=ki(b,$);X&&$.beforeEnter(O),s(O,u,g),((w=I&&I.onVnodeMounted)||X||W)&&_e(()=>{w&&xe(w,v,a),X&&$.enter(O),W&&Pe(a,null,v,"mounted")},b)},F=(a,u,g,v,b)=>{if(g&&C(a,g),v)for(let E=0;E{for(let w=O;w{const T=u.el=a.el;let{patchFlag:O,dynamicChildren:w,dirs:I}=u;O|=a.patchFlag&16;const j=a.props||ne,$=u.props||ne;let W;if(g&&st(g,!1),(W=$.onVnodeBeforeUpdate)&&xe(W,g,u,a),I&&Pe(u,a,g,"beforeUpdate"),g&&st(g,!0),(j.innerHTML&&$.innerHTML==null||j.textContent&&$.textContent==null)&&d(T,""),w?_(a.dynamicChildren,w,T,g,v,Wn(u,b),E):R||U(a,u,T,null,g,v,Wn(u,b),E,!1),O>0){if(O&16)N(T,j,$,g,b);else if(O&2&&j.class!==$.class&&i(T,"class",null,$.class,b),O&4&&i(T,"style",j.style,$.style,b),O&8){const X=u.dynamicProps;for(let te=0;te{W&&xe(W,g,u,a),I&&Pe(u,a,g,"updated")},v)},_=(a,u,g,v,b,E,R)=>{for(let T=0;T{if(u!==g){if(u!==ne)for(const E in u)!bt(E)&&!(E in g)&&i(a,E,u[E],null,b,v);for(const E in g){if(bt(E))continue;const R=g[E],T=u[E];R!==T&&E!=="value"&&i(a,E,T,R,b,v)}"value"in g&&i(a,"value",u.value,g.value,b)}},S=(a,u,g,v,b,E,R,T,O)=>{const w=u.el=a?a.el:l(""),I=u.anchor=a?a.anchor:l("");let{patchFlag:j,dynamicChildren:$,slotScopeIds:W}=u;W&&(T=T?T.concat(W):W),a==null?(s(w,g,v),s(I,g,v),H(u.children||[],g,I,b,E,R,T,O)):j>0&&j&64&&$&&a.dynamicChildren?(_(a.dynamicChildren,$,g,b,E,R,T),(u.key!=null||b&&u===b.subTree)&&js(a,u,!0)):U(a,u,g,I,b,E,R,T,O)},q=(a,u,g,v,b,E,R,T,O)=>{u.slotScopeIds=T,a==null?u.shapeFlag&512?b.ctx.activate(u,g,v,R,O):ee(u,g,v,b,E,R,O):se(a,u,O)},ee=(a,u,g,v,b,E,R)=>{const T=a.component=Sc(a,v,b);if(Mn(a)&&(T.ctx.renderer=ht),xc(T,!1,R),T.asyncDep){if(b&&b.registerDep(T,V,R),!a.el){const O=T.subTree=de(ye);K(null,O,u,g)}}else V(T,a,u,g,b,E,R)},se=(a,u,g)=>{const v=u.component=a.component;if(gc(a,u,g))if(v.asyncDep&&!v.asyncResolved){Y(v,u,g);return}else v.next=u,wl(v.update),v.effect.dirty=!0,v.update();else u.el=a.el,v.vnode=u},V=(a,u,g,v,b,E,R)=>{const T=()=>{if(a.isMounted){let{next:I,bu:j,u:$,parent:W,vnode:X}=a;{const pt=Ki(a);if(pt){I&&(I.el=X.el,Y(a,I,R)),pt.asyncDep.then(()=>{a.isUnmounted||T()});return}}let te=I,Q;st(a,!1),I?(I.el=X.el,Y(a,I,R)):I=X,j&&cn(j),(Q=I.props&&I.props.onVnodeBeforeUpdate)&&xe(Q,W,I,X),st(a,!0);const oe=qn(a),Re=a.subTree;a.subTree=oe,P(Re,oe,h(Re.el),qt(Re),a,b,E),I.el=oe.el,te===null&&mc(a,oe.el),$&&_e($,b),(Q=I.props&&I.props.onVnodeUpdated)&&_e(()=>xe(Q,W,I,X),b)}else{let I;const{el:j,props:$}=u,{bm:W,m:X,parent:te}=a,Q=Et(u);if(st(a,!1),W&&cn(W),!Q&&(I=$&&$.onVnodeBeforeMount)&&xe(I,te,u),st(a,!0),j&&Un){const oe=()=>{a.subTree=qn(a),Un(j,a.subTree,a,b,null)};Q?u.type.__asyncLoader().then(()=>!a.isUnmounted&&oe()):oe()}else{const oe=a.subTree=qn(a);P(null,oe,g,v,a,b,E),u.el=oe.el}if(X&&_e(X,b),!Q&&(I=$&&$.onVnodeMounted)){const oe=u;_e(()=>xe(I,te,oe),b)}(u.shapeFlag&256||te&&Et(te.vnode)&&te.vnode.shapeFlag&256)&&a.a&&_e(a.a,b),a.isMounted=!0,u=g=v=null}},O=a.effect=new Ts(T,Ae,()=>Fs(w),a.scope),w=a.update=()=>{O.dirty&&O.run()};w.i=a,w.id=a.uid,st(a,!0),w()},Y=(a,u,g)=>{u.component=a;const v=a.vnode.props;a.vnode=u,a.next=null,Xl(a,u.props,v,g),Ql(a,u.children,g),et(),tr(a),tt()},U=(a,u,g,v,b,E,R,T,O=!1)=>{const w=a&&a.children,I=a?a.shapeFlag:0,j=u.children,{patchFlag:$,shapeFlag:W}=u;if($>0){if($&128){Wt(w,j,g,v,b,E,R,T,O);return}else if($&256){ae(w,j,g,v,b,E,R,T,O);return}}W&8?(I&16&&Ot(w,b,E),j!==w&&d(g,j)):I&16?W&16?Wt(w,j,g,v,b,E,R,T,O):Ot(w,b,E,!0):(I&8&&d(g,""),W&16&&H(j,g,v,b,E,R,T,O))},ae=(a,u,g,v,b,E,R,T,O)=>{a=a||yt,u=u||yt;const w=a.length,I=u.length,j=Math.min(w,I);let $;for($=0;$I?Ot(a,b,E,!0,!1,j):H(u,g,v,b,E,R,T,O,j)},Wt=(a,u,g,v,b,E,R,T,O)=>{let w=0;const I=u.length;let j=a.length-1,$=I-1;for(;w<=j&&w<=$;){const W=a[w],X=u[w]=O?We(u[w]):Te(u[w]);if(lt(W,X))P(W,X,g,null,b,E,R,T,O);else break;w++}for(;w<=j&&w<=$;){const W=a[j],X=u[$]=O?We(u[$]):Te(u[$]);if(lt(W,X))P(W,X,g,null,b,E,R,T,O);else break;j--,$--}if(w>j){if(w<=$){const W=$+1,X=W$)for(;w<=j;)Me(a[w],b,E,!0),w++;else{const W=w,X=w,te=new Map;for(w=X;w<=$;w++){const ve=u[w]=O?We(u[w]):Te(u[w]);ve.key!=null&&te.set(ve.key,w)}let Q,oe=0;const Re=$-X+1;let pt=!1,Ks=0;const Rt=new Array(Re);for(w=0;w=Re){Me(ve,b,E,!0);continue}let Ie;if(ve.key!=null)Ie=te.get(ve.key);else for(Q=X;Q<=$;Q++)if(Rt[Q-X]===0&<(ve,u[Q])){Ie=Q;break}Ie===void 0?Me(ve,b,E,!0):(Rt[Ie-X]=w+1,Ie>=Ks?Ks=Ie:pt=!0,P(ve,u[Ie],g,null,b,E,R,T,O),oe++)}const Ws=pt?lc(Rt):yt;for(Q=Ws.length-1,w=Re-1;w>=0;w--){const ve=X+w,Ie=u[ve],qs=ve+1{const{el:E,type:R,transition:T,children:O,shapeFlag:w}=a;if(w&6){nt(a.component.subTree,u,g,v);return}if(w&128){a.suspense.move(u,g,v);return}if(w&64){R.move(a,u,g,ht);return}if(R===be){s(E,u,g);for(let j=0;jT.enter(E),b);else{const{leave:j,delayLeave:$,afterLeave:W}=T,X=()=>s(E,u,g),te=()=>{j(E,()=>{X(),W&&W()})};$?$(E,X,te):te()}else s(E,u,g)},Me=(a,u,g,v=!1,b=!1)=>{const{type:E,props:R,ref:T,children:O,dynamicChildren:w,shapeFlag:I,patchFlag:j,dirs:$,cacheIndex:W}=a;if(j===-2&&(b=!1),T!=null&&_n(T,null,g,a,!0),W!=null&&(u.renderCache[W]=void 0),I&256){u.ctx.deactivate(a);return}const X=I&1&&$,te=!Et(a);let Q;if(te&&(Q=R&&R.onVnodeBeforeUnmount)&&xe(Q,u,a),I&6)xo(a.component,g,v);else{if(I&128){a.suspense.unmount(g,v);return}X&&Pe(a,null,u,"beforeUnmount"),I&64?a.type.remove(a,u,g,ht,v):w&&!w.hasOnce&&(E!==be||j>0&&j&64)?Ot(w,u,g,!1,!0):(E===be&&j&384||!b&&I&16)&&Ot(O,u,g),v&&Bs(a)}(te&&(Q=R&&R.onVnodeUnmounted)||X)&&_e(()=>{Q&&xe(Q,u,a),X&&Pe(a,null,u,"unmounted")},g)},Bs=a=>{const{type:u,el:g,anchor:v,transition:b}=a;if(u===be){So(g,v);return}if(u===$t){y(a);return}const E=()=>{r(g),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(a.shapeFlag&1&&b&&!b.persisted){const{leave:R,delayLeave:T}=b,O=()=>R(g,E);T?T(a.el,E,O):O()}else E()},So=(a,u)=>{let g;for(;a!==u;)g=m(a),r(a),a=g;r(u)},xo=(a,u,g)=>{const{bum:v,scope:b,update:E,subTree:R,um:T,m:O,a:w}=a;dr(O),dr(w),v&&cn(v),b.stop(),E&&(E.active=!1,Me(R,a,u,g)),T&&_e(T,u),_e(()=>{a.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&a.asyncDep&&!a.asyncResolved&&a.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},Ot=(a,u,g,v=!1,b=!1,E=0)=>{for(let R=E;R{if(a.shapeFlag&6)return qt(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const u=m(a.anchor||a.el),g=u&&u[Di];return g?m(g):u};let Vn=!1;const ks=(a,u,g)=>{a==null?u._vnode&&Me(u._vnode,null,null,!0):P(u._vnode||null,a,u,null,null,null,g),u._vnode=a,Vn||(Vn=!0,tr(),pn(),Vn=!1)},ht={p:P,um:Me,m:nt,r:Bs,mt:ee,mc:H,pc:U,pbc:_,n:qt,o:e};let Dn,Un;return t&&([Dn,Un]=t(ht)),{render:ks,hydrate:Dn,createApp:Wl(ks,Dn)}}function Wn({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function st({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ki(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function js(e,t,n=!1){const s=e.children,r=t.children;if(B(s)&&B(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Ki(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ki(t)}function dr(e){if(e)for(let t=0;tSt(cc);function Wi(e,t){return Nn(e,null,t)}function pf(e,t){return Nn(e,null,{flush:"post"})}const nn={};function Fe(e,t,n){return Nn(e,t,n)}function Nn(e,t,{immediate:n,deep:s,flush:r,once:i,onTrack:o,onTrigger:l}=ne){if(t&&i){const x=t;t=(...F)=>{x(...F),M()}}const c=fe,f=x=>s===!0?x:qe(x,s===!1?1:void 0);let d,h=!1,m=!1;if(ge(e)?(d=()=>e.value,h=xt(e)):wt(e)?(d=()=>f(e),h=!0):B(e)?(m=!0,h=e.some(x=>wt(x)||xt(x)),d=()=>e.map(x=>{if(ge(x))return x.value;if(wt(x))return f(x);if(k(x))return Xe(x,c,2)})):k(e)?t?d=()=>Xe(e,c,2):d=()=>(C&&C(),Oe(e,c,3,[A])):d=Ae,t&&s){const x=d;d=()=>qe(x())}let C,A=x=>{C=p.onStop=()=>{Xe(x,c,4),C=p.onStop=void 0}},P;if(Hn)if(A=Ae,t?n&&Oe(t,c,3,[d(),m?[]:void 0,A]):d(),r==="sync"){const x=ac();P=x.__watcherHandles||(x.__watcherHandles=[])}else return Ae;let D=m?new Array(e.length).fill(nn):nn;const K=()=>{if(!(!p.active||!p.dirty))if(t){const x=p.run();(s||h||(m?x.some((F,H)=>Je(F,D[H])):Je(x,D)))&&(C&&C(),Oe(t,c,3,[x,D===nn?void 0:m&&D[0]===nn?[]:D,A]),D=x)}else p.run()};K.allowRecurse=!!t;let G;r==="sync"?G=K:r==="post"?G=()=>_e(K,c&&c.suspense):(K.pre=!0,c&&(K.id=c.uid),G=()=>Fs(K));const p=new Ts(d,Ae,G),y=zr(),M=()=>{p.stop(),y&&Es(y.effects,p)};return t?n?K():D=p.run():r==="post"?_e(p.run.bind(p),c&&c.suspense):p.run(),P&&P.push(M),M}function fc(e,t,n){const s=this.proxy,r=re(e)?e.includes(".")?qi(s,e):()=>s[e]:e.bind(s,s);let i;k(t)?i=t:(i=t.handler,n=t);const o=Kt(this),l=Nn(r,i.bind(s),n);return o(),l}function qi(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r{qe(s,t,n)});else if(Wr(e)){for(const s in e)qe(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&qe(e[s],t,n)}return e}const uc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Le(t)}Modifiers`]||e[`${Ze(t)}Modifiers`];function dc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ne;let r=n;const i=t.startsWith("update:"),o=i&&uc(s,t.slice(7));o&&(o.trim&&(r=n.map(d=>re(d)?d.trim():d)),o.number&&(r=n.map(ls)));let l,c=s[l=ln(t)]||s[l=ln(Le(t))];!c&&i&&(c=s[l=ln(Ze(t))]),c&&Oe(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Oe(f,e,6,r)}}function Gi(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!k(e)){const c=f=>{const d=Gi(f,t,!0);d&&(l=!0,ce(o,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(Z(e)&&s.set(e,null),null):(B(i)?i.forEach(c=>o[c]=null):ce(o,i),Z(e)&&s.set(e,o),o)}function Fn(e,t){return!e||!kt(t)?!1:(t=t.slice(2).replace(/Once$/,""),J(e,t[0].toLowerCase()+t.slice(1))||J(e,Ze(t))||J(e,t))}function qn(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:f,renderCache:d,props:h,data:m,setupState:C,ctx:A,inheritAttrs:P}=e,D=gn(e);let K,G;try{if(n.shapeFlag&4){const y=r||s,M=y;K=Te(f.call(M,y,d,h,C,m,A)),G=l}else{const y=t;K=Te(y.length>1?y(h,{attrs:l,slots:o,emit:c}):y(h,null)),G=t.props?l:hc(l)}}catch(y){Ht.length=0,On(y,e,1),K=de(ye)}let p=K;if(G&&P!==!1){const y=Object.keys(G),{shapeFlag:M}=p;y.length&&M&7&&(i&&y.some(vs)&&(G=pc(G,i)),p=ze(p,G,!1,!0))}return n.dirs&&(p=ze(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(n.dirs):n.dirs),n.transition&&(p.transition=n.transition),K=p,gn(D),K}const hc=e=>{let t;for(const n in e)(n==="class"||n==="style"||kt(n))&&((t||(t={}))[n]=e[n]);return t},pc=(e,t)=>{const n={};for(const s in e)(!vs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function gc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?hr(s,o,f):!!o;if(c&8){const d=t.dynamicProps;for(let h=0;he.__isSuspense;function Xi(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):vl(e)}const be=Symbol.for("v-fgt"),ft=Symbol.for("v-txt"),ye=Symbol.for("v-cmt"),$t=Symbol.for("v-stc"),Ht=[];let Ce=null;function Yi(e=!1){Ht.push(Ce=e?null:[])}function _c(){Ht.pop(),Ce=Ht[Ht.length-1]||null}let Ut=1;function pr(e){Ut+=e,e<0&&Ce&&(Ce.hasOnce=!0)}function Ji(e){return e.dynamicChildren=Ut>0?Ce||yt:null,_c(),Ut>0&&Ce&&Ce.push(e),e}function gf(e,t,n,s,r,i){return Ji(Zi(e,t,n,s,r,i,!0))}function zi(e,t,n,s,r){return Ji(de(e,t,n,s,r,!0))}function bn(e){return e?e.__v_isVNode===!0:!1}function lt(e,t){return e.type===t.type&&e.key===t.key}const Qi=({key:e})=>e??null,fn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?re(e)||ge(e)||k(e)?{i:le,r:e,k:t,f:!!n}:e:null);function Zi(e,t=null,n=null,s=0,r=null,i=e===be?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Qi(t),ref:t&&fn(t),scopeId:Ln,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:le};return l?(Vs(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=re(n)?8:16),Ut>0&&!o&&Ce&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ce.push(c),c}const de=bc;function bc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Ti)&&(e=ye),bn(e)){const l=ze(e,t,!0);return n&&Vs(l,n),Ut>0&&!i&&Ce&&(l.shapeFlag&6?Ce[Ce.indexOf(e)]=l:Ce.push(l)),l.patchFlag=-2,l}if(Rc(e)&&(e=e.__vccOpts),t){t=wc(t);let{class:l,style:c}=t;l&&!re(l)&&(t.class=xs(l)),Z(c)&&(ai(c)&&!B(c)&&(c=ce({},c)),t.style=Ss(c))}const o=re(e)?1:yc(e)?128:Zl(e)?64:Z(e)?4:k(e)?2:0;return Zi(e,t,n,s,r,o,i,!0)}function wc(e){return e?ai(e)||Pi(e)?ce({},e):e:null}function ze(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,f=t?vc(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&Qi(f),ref:t&&t.ref?n&&i?B(i)?i.concat(fn(t)):[i,fn(t)]:fn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ze(e.ssContent),ssFallback:e.ssFallback&&ze(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&mn(d,c.clone(d)),d}function eo(e=" ",t=0){return de(ft,null,e,t)}function mf(e,t){const n=de($t,null,e);return n.staticCount=t,n}function yf(e="",t=!1){return t?(Yi(),zi(ye,null,e)):de(ye,null,e)}function Te(e){return e==null||typeof e=="boolean"?de(ye):B(e)?de(be,null,e.slice()):typeof e=="object"?We(e):de(ft,null,String(e))}function We(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ze(e)}function Vs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(B(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Vs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Pi(t)?t._ctx=le:r===3&&le&&(le.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else k(t)?(t={default:t,_ctx:le},n=32):(t=String(t),s&64?(n=16,t=[eo(t)]):n=8);e.children=t,e.shapeFlag|=n}function vc(...e){const t={};for(let n=0;nfe||le;let wn,_s;{const e=Gr(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};wn=t("__VUE_INSTANCE_SETTERS__",n=>fe=n),_s=t("__VUE_SSR_SETTERS__",n=>Hn=n)}const Kt=e=>{const t=fe;return wn(e),e.scope.on(),()=>{e.scope.off(),wn(t)}},gr=()=>{fe&&fe.scope.off(),wn(null)};function to(e){return e.vnode.shapeFlag&4}let Hn=!1;function xc(e,t=!1,n=!1){t&&_s(t);const{props:s,children:r}=e.vnode,i=to(e);Gl(e,s,i,t),zl(e,r,n);const o=i?Tc(e,t):void 0;return t&&_s(!1),o}function Tc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Hl);const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?so(e):null,i=Kt(e);et();const o=Xe(s,e,0,[e.props,r]);if(tt(),i(),kr(o)){if(o.then(gr,gr),t)return o.then(l=>{mr(e,l,t)}).catch(l=>{On(l,e,0)});e.asyncDep=o}else mr(e,o,t)}else no(e,t)}function mr(e,t,n){k(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=pi(t)),no(e,n)}let yr;function no(e,t,n){const s=e.type;if(!e.render){if(!t&&yr&&!s.render){const r=s.template||$s(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,f=ce(ce({isCustomElement:i,delimiters:l},o),c);s.render=yr(r,f)}}e.render=s.render||Ae}{const r=Kt(e);et();try{Vl(e)}finally{tt(),r()}}}const Ac={get(e,t){return we(e,"get",""),e[t]}};function so(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ac),slots:e.slots,emit:e.emit,expose:t}}function jn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(pi(an(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Nt)return Nt[n](e)},has(t,n){return n in t||n in Nt}})):e.proxy}function Oc(e,t=!0){return k(e)?e.displayName||e.name:e.name||t&&e.__name}function Rc(e){return k(e)&&"__vccOpts"in e}const ie=(e,t)=>al(e,t,Hn);function bs(e,t,n){const s=arguments.length;return s===2?Z(t)&&!B(t)?bn(t)?de(e,null,[t]):de(e,t):de(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&bn(n)&&(n=[n]),de(e,t,n))}const Lc="3.4.38";/** -* @vue/runtime-dom v3.4.38 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const Mc="http://www.w3.org/2000/svg",Ic="http://www.w3.org/1998/Math/MathML",$e=typeof document<"u"?document:null,_r=$e&&$e.createElement("template"),Pc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?$e.createElementNS(Mc,e):t==="mathml"?$e.createElementNS(Ic,e):n?$e.createElement(e,{is:n}):$e.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>$e.createTextNode(e),createComment:e=>$e.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>$e.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{_r.innerHTML=s==="svg"?`${e}`:s==="mathml"?`${e}`:e;const l=_r.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ue="transition",Lt="animation",Bt=Symbol("_vtc"),ro=(e,{slots:t})=>bs(Tl,Nc(e),t);ro.displayName="Transition";const io={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};ro.props=ce({},_i,io);const rt=(e,t=[])=>{B(e)?e.forEach(n=>n(...t)):e&&e(...t)},br=e=>e?B(e)?e.some(t=>t.length>1):e.length>1:!1;function Nc(e){const t={};for(const S in e)S in io||(t[S]=e[S]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:f=o,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,A=Fc(r),P=A&&A[0],D=A&&A[1],{onBeforeEnter:K,onEnter:G,onEnterCancelled:p,onLeave:y,onLeaveCancelled:M,onBeforeAppear:x=K,onAppear:F=G,onAppearCancelled:H=p}=t,L=(S,q,ee)=>{it(S,q?d:l),it(S,q?f:o),ee&&ee()},_=(S,q)=>{S._isLeaving=!1,it(S,h),it(S,C),it(S,m),q&&q()},N=S=>(q,ee)=>{const se=S?F:G,V=()=>L(q,S,ee);rt(se,[q,V]),wr(()=>{it(q,S?c:i),Be(q,S?d:l),br(se)||vr(q,s,P,V)})};return ce(t,{onBeforeEnter(S){rt(K,[S]),Be(S,i),Be(S,o)},onBeforeAppear(S){rt(x,[S]),Be(S,c),Be(S,f)},onEnter:N(!1),onAppear:N(!0),onLeave(S,q){S._isLeaving=!0;const ee=()=>_(S,q);Be(S,h),Be(S,m),jc(),wr(()=>{S._isLeaving&&(it(S,h),Be(S,C),br(y)||vr(S,s,D,ee))}),rt(y,[S,ee])},onEnterCancelled(S){L(S,!1),rt(p,[S])},onAppearCancelled(S){L(S,!0),rt(H,[S])},onLeaveCancelled(S){_(S),rt(M,[S])}})}function Fc(e){if(e==null)return null;if(Z(e))return[Gn(e.enter),Gn(e.leave)];{const t=Gn(e);return[t,t]}}function Gn(e){return Mo(e)}function Be(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Bt]||(e[Bt]=new Set)).add(t)}function it(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Bt];n&&(n.delete(t),n.size||(e[Bt]=void 0))}function wr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let $c=0;function vr(e,t,n,s){const r=e._endId=++$c,i=()=>{r===e._endId&&s()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=Hc(e,t);if(!o)return s();const f=o+"end";let d=0;const h=()=>{e.removeEventListener(f,m),i()},m=C=>{C.target===e&&++d>=c&&h()};setTimeout(()=>{d(n[A]||"").split(", "),r=s(`${Ue}Delay`),i=s(`${Ue}Duration`),o=Er(r,i),l=s(`${Lt}Delay`),c=s(`${Lt}Duration`),f=Er(l,c);let d=null,h=0,m=0;t===Ue?o>0&&(d=Ue,h=o,m=i.length):t===Lt?f>0&&(d=Lt,h=f,m=c.length):(h=Math.max(o,f),d=h>0?o>f?Ue:Lt:null,m=d?d===Ue?i.length:c.length:0);const C=d===Ue&&/\b(transform|all)(,|$)/.test(s(`${Ue}Property`).toString());return{type:d,timeout:h,propCount:m,hasTransform:C}}function Er(e,t){for(;e.lengthCr(n)+Cr(e[s])))}function Cr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function jc(){return document.body.offsetHeight}function Vc(e,t,n){const s=e[Bt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const vn=Symbol("_vod"),oo=Symbol("_vsh"),_f={beforeMount(e,{value:t},{transition:n}){e[vn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Mt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Mt(e,!0),s.enter(e)):s.leave(e,()=>{Mt(e,!1)}):Mt(e,t))},beforeUnmount(e,{value:t}){Mt(e,t)}};function Mt(e,t){e.style.display=t?e[vn]:"none",e[oo]=!t}const Dc=Symbol(""),Uc=/(^|;)\s*display\s*:/;function Bc(e,t,n){const s=e.style,r=re(n);let i=!1;if(n&&!r){if(t)if(re(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&un(s,l,"")}else for(const o in t)n[o]==null&&un(s,o,"");for(const o in n)o==="display"&&(i=!0),un(s,o,n[o])}else if(r){if(t!==n){const o=s[Dc];o&&(n+=";"+o),s.cssText=n,i=Uc.test(n)}}else t&&e.removeAttribute("style");vn in e&&(e[vn]=i?s.display:"",e[oo]&&(s.display="none"))}const Sr=/\s*!important$/;function un(e,t,n){if(B(n))n.forEach(s=>un(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=kc(e,t);Sr.test(n)?e.setProperty(Ze(s),n.replace(Sr,""),"important"):e[s]=n}}const xr=["Webkit","Moz","ms"],Xn={};function kc(e,t){const n=Xn[t];if(n)return n;let s=Le(t);if(s!=="filter"&&s in e)return Xn[t]=s;s=Sn(s);for(let r=0;rYn||(Xc.then(()=>Yn=0),Yn=Date.now());function Jc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Oe(zc(s,n.value),t,5,[s])};return n.value=e,n.attached=Yc(),n}function zc(e,t){if(B(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Lr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Qc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Vc(e,s,o):t==="style"?Bc(e,n,s):kt(t)?vs(t)||qc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zc(e,t,s,o))?(Kc(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ar(e,t,s,o,i,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Ar(e,t,s,o))};function Zc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Lr(t)&&k(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Lr(t)&&re(n)?!1:t in e}const Mr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return B(t)?n=>cn(t,n):t};function ea(e){e.target.composing=!0}function Ir(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Jn=Symbol("_assign"),bf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Jn]=Mr(r);const i=s||r.props&&r.props.type==="number";mt(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=ls(l)),e[Jn](l)}),n&&mt(e,"change",()=>{e.value=e.value.trim()}),t||(mt(e,"compositionstart",ea),mt(e,"compositionend",Ir),mt(e,"change",Ir))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[Jn]=Mr(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?ls(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},ta=["ctrl","shift","alt","meta"],na={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ta.some(n=>e[`${n}Key`]&&!t.includes(n))},wf=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=Ze(r.key);if(t.some(o=>o===i||sa[o]===i))return e(r)})},ra=ce({patchProp:Qc},Pc);let zn,Pr=!1;function ia(){return zn=Pr?zn:ic(ra),Pr=!0,zn}const Ef=(...e)=>{const t=ia().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=la(s);if(r)return n(r,!0,oa(r))},t};function oa(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function la(e){return re(e)?document.querySelector(e):e}const Cf=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},ca="modulepreload",aa=function(e){return"/document/"+e},Nr={},Sf=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.all(n.map(l=>{if(l=aa(l),l in Nr)return;Nr[l]=!0;const c=l.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":ca,c||(d.as="script",d.crossOrigin=""),d.href=l,o&&d.setAttribute("nonce",o),document.head.appendChild(d),c)return new Promise((h,m)=>{d.addEventListener("load",h),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}return r.then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},fa=window.__VP_SITE_DATA__;function Ds(e){return zr()?(Uo(e),!0):!1}function Ye(e){return typeof e=="function"?e():hi(e)}const lo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ua=Object.prototype.toString,da=e=>ua.call(e)==="[object Object]",co=()=>{},Fr=ha();function ha(){var e,t;return lo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function pa(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const ao=e=>e();function ga(e=ao){const t=ue(!0);function n(){t.value=!1}function s(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:An(t),pause:n,resume:s,eventFilter:r}}function ma(e){return $n()}function fo(...e){if(e.length!==1)return ml(...e);const t=e[0];return typeof t=="function"?An(hl(()=>({get:t,set:co}))):ue(t)}function ya(e,t,n={}){const{eventFilter:s=ao,...r}=n;return Fe(e,pa(s,t),r)}function _a(e,t,n={}){const{eventFilter:s,...r}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=ga(s);return{stop:ya(e,t,{...r,eventFilter:i}),pause:o,resume:l,isActive:c}}function Us(e,t=!0,n){ma()?At(e,n):t?e():Rn(e)}function uo(e){var t;const n=Ye(e);return(t=n==null?void 0:n.$el)!=null?t:n}const je=lo?window:void 0;function Tt(...e){let t,n,s,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,r]=e,t=je):[t,n,s,r]=e,!t)return co;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const i=[],o=()=>{i.forEach(d=>d()),i.length=0},l=(d,h,m,C)=>(d.addEventListener(h,m,C),()=>d.removeEventListener(h,m,C)),c=Fe(()=>[uo(t),Ye(r)],([d,h])=>{if(o(),!d)return;const m=da(h)?{...h}:h;i.push(...n.flatMap(C=>s.map(A=>l(d,C,A,m))))},{immediate:!0,flush:"post"}),f=()=>{c(),o()};return Ds(f),f}function ba(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function xf(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=je,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=ba(t);return Tt(r,i,d=>{d.repeat&&Ye(l)||c(d)&&n(d)},o)}function wa(){const e=ue(!1),t=$n();return t&&At(()=>{e.value=!0},t),e}function va(e){const t=wa();return ie(()=>(t.value,!!e()))}function ho(e,t={}){const{window:n=je}=t,s=va(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const i=ue(!1),o=f=>{i.value=f.matches},l=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o))},c=Wi(()=>{s.value&&(l(),r=n.matchMedia(Ye(e)),"addEventListener"in r?r.addEventListener("change",o):r.addListener(o),i.value=r.matches)});return Ds(()=>{c(),l(),r=void 0}),i}const sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},rn="__vueuse_ssr_handlers__",Ea=Ca();function Ca(){return rn in sn||(sn[rn]=sn[rn]||{}),sn[rn]}function po(e,t){return Ea[e]||t}function Sa(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const xa={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},$r="vueuse-storage";function Ta(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:d,window:h=je,eventFilter:m,onError:C=_=>{console.error(_)},initOnMounted:A}=s,P=(d?ui:ue)(typeof t=="function"?t():t);if(!n)try{n=po("getDefaultStorage",()=>{var _;return(_=je)==null?void 0:_.localStorage})()}catch(_){C(_)}if(!n)return P;const D=Ye(t),K=Sa(D),G=(r=s.serializer)!=null?r:xa[K],{pause:p,resume:y}=_a(P,()=>x(P.value),{flush:i,deep:o,eventFilter:m});h&&l&&Us(()=>{Tt(h,"storage",H),Tt(h,$r,L),A&&H()}),A||H();function M(_,N){h&&h.dispatchEvent(new CustomEvent($r,{detail:{key:e,oldValue:_,newValue:N,storageArea:n}}))}function x(_){try{const N=n.getItem(e);if(_==null)M(N,null),n.removeItem(e);else{const S=G.write(_);N!==S&&(n.setItem(e,S),M(N,S))}}catch(N){C(N)}}function F(_){const N=_?_.newValue:n.getItem(e);if(N==null)return c&&D!=null&&n.setItem(e,G.write(D)),D;if(!_&&f){const S=G.read(N);return typeof f=="function"?f(S,D):K==="object"&&!Array.isArray(S)?{...D,...S}:S}else return typeof N!="string"?N:G.read(N)}function H(_){if(!(_&&_.storageArea!==n)){if(_&&_.key==null){P.value=D;return}if(!(_&&_.key!==e)){p();try{(_==null?void 0:_.newValue)!==G.write(P.value)&&(P.value=F(_))}catch(N){C(N)}finally{_?Rn(y):y()}}}}function L(_){H(_.detail)}return P}function go(e){return ho("(prefers-color-scheme: dark)",e)}function Aa(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=je,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:f,disableTransition:d=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},m=go({window:r}),C=ie(()=>m.value?"dark":"light"),A=c||(o==null?fo(s):Ta(o,s,i,{window:r,listenToStorageChanges:l})),P=ie(()=>A.value==="auto"?C.value:A.value),D=po("updateHTMLAttrs",(y,M,x)=>{const F=typeof y=="string"?r==null?void 0:r.document.querySelector(y):uo(y);if(!F)return;let H;if(d&&(H=r.document.createElement("style"),H.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),r.document.head.appendChild(H)),M==="class"){const L=x.split(/\s/g);Object.values(h).flatMap(_=>(_||"").split(/\s/g)).filter(Boolean).forEach(_=>{L.includes(_)?F.classList.add(_):F.classList.remove(_)})}else F.setAttribute(M,x);d&&(r.getComputedStyle(H).opacity,document.head.removeChild(H))});function K(y){var M;D(t,n,(M=h[y])!=null?M:y)}function G(y){e.onChanged?e.onChanged(y,K):K(y)}Fe(P,G,{flush:"post",immediate:!0}),Us(()=>G(P.value));const p=ie({get(){return f?A.value:P.value},set(y){A.value=y}});try{return Object.assign(p,{store:A,system:C,state:P})}catch{return p}}function Oa(e={}){const{valueDark:t="dark",valueLight:n="",window:s=je}=e,r=Aa({...e,onChanged:(l,c)=>{var f;e.onChanged?(f=e.onChanged)==null||f.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=ie(()=>r.system?r.system.value:go({window:s}).value?"dark":"light");return ie({get(){return r.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?r.value="auto":r.value=c}})}function Qn(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function mo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Zn=new WeakMap;function Tf(e,t=!1){const n=ue(t);let s=null,r="";Fe(fo(e),l=>{const c=Qn(Ye(l));if(c){const f=c;if(Zn.get(f)||Zn.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(r=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=Qn(Ye(e));!l||n.value||(Fr&&(s=Tt(l,"touchmove",c=>{Ra(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=Qn(Ye(e));!l||!n.value||(Fr&&(s==null||s()),l.style.overflow=r,Zn.delete(l),n.value=!1)};return Ds(o),ie({get(){return n.value},set(l){l?i():o()}})}function Af(e={}){const{window:t=je,behavior:n="auto"}=e;if(!t)return{x:ue(0),y:ue(0)};const s=ue(t.scrollX),r=ue(t.scrollY),i=ie({get(){return s.value},set(l){scrollTo({left:l,behavior:n})}}),o=ie({get(){return r.value},set(l){scrollTo({top:l,behavior:n})}});return Tt(t,"scroll",()=>{s.value=t.scrollX,r.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function Of(e={}){const{window:t=je,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0}=e,o=ue(n),l=ue(s),c=()=>{t&&(i?(o.value=t.innerWidth,l.value=t.innerHeight):(o.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight))};if(c(),Us(c),Tt("resize",c,{passive:!0}),r){const f=ho("(orientation: portrait)");Fe(f,()=>c())}return{width:o,height:l}}const es={BASE_URL:"/document/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var ts={};const yo=/^(?:[a-z]+:|\/\/)/i,La="vitepress-theme-appearance",Ma=/#.*$/,Ia=/[?#].*$/,Pa=/(?:(^|\/)index)?\.(?:md|html)$/,he=typeof document<"u",_o={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function Na(e,t,n=!1){if(t===void 0)return!1;if(e=Hr(`/${e}`),n)return new RegExp(t).test(e);if(Hr(t)!==e)return!1;const s=t.match(Ma);return s?(he?location.hash:"")===s[0]:!0}function Hr(e){return decodeURI(e).replace(Ia,"").replace(Pa,"$1")}function Fa(e){return yo.test(e)}function $a(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!Fa(n)&&Na(t,`/${n}/`,!0))||"root"}function Ha(e,t){var s,r,i,o,l,c,f;const n=$a(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:wo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(f=e.locales[n])==null?void 0:f.themeConfig}})}function bo(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=ja(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function ja(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Va(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function wo(e,t){return[...e.filter(n=>!Va(t,n)),...t]}const Da=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,Ua=/^[a-z]:/i;function jr(e){const t=Ua.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Da,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const ns=new Set;function Ba(e){if(ns.size===0){const n=typeof process=="object"&&(ts==null?void 0:ts.VITE_EXTRA_EXTENSIONS)||(es==null?void 0:es.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>ns.add(s))}const t=e.split(".").pop();return t==null||!ns.has(t.toLowerCase())}const ka=Symbol(),ut=ui(fa);function Rf(e){const t=ie(()=>Ha(ut.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?ue(!0):n?Oa({storageKey:La,initialValue:()=>typeof n=="string"?n:"auto",...typeof n=="object"?n:{}}):ue(!1),r=ue(he?location.hash:"");return he&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Fe(()=>e.data,()=>{r.value=he?location.hash:""}),{site:t,theme:ie(()=>t.value.themeConfig),page:ie(()=>e.data),frontmatter:ie(()=>e.data.frontmatter),params:ie(()=>e.data.params),lang:ie(()=>t.value.lang),dir:ie(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:ie(()=>t.value.localeIndex||"root"),title:ie(()=>bo(t.value,e.data)),description:ie(()=>e.data.description||t.value.description),isDark:s,hash:ie(()=>r.value)}}function Ka(){const e=St(ka);if(!e)throw new Error("vitepress data not properly injected in app");return e}function Wa(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Vr(e){return yo.test(e)||!e.startsWith("/")?e:Wa(ut.value.base,e)}function qa(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),he){const n="/document/";t=jr(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${jr(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let dn=[];function Lf(e){dn.push(e),Pn(()=>{dn=dn.filter(t=>t!==e)})}function Ga(){let e=ut.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=Dr(e,n);else if(Array.isArray(e))for(const s of e){const r=Dr(s,n);if(r){t=r;break}}return t}function Dr(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const Xa=Symbol(),vo="http://a.com",Ya=()=>({path:"/",component:null,data:_o});function Mf(e,t){const n=Tn(Ya()),s={route:n,go:r};async function r(l=he?location.href:"/"){var c,f;l=ss(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(he&&l!==ss(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((f=s.onAfterRouteChanged)==null?void 0:f.call(s,l)))}let i=null;async function o(l,c=0,f=!1){var m;if(await((m=s.onBeforePageLoad)==null?void 0:m.call(s,l))===!1)return;const d=new URL(l,vo),h=i=d.pathname;try{let C=await e(h);if(!C)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:A,__pageData:P}=C;if(!A)throw new Error(`Invalid route component: ${A}`);n.path=he?h:Vr(h),n.component=an(A),n.data=an(P),he&&Rn(()=>{let D=ut.value.base+P.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!ut.value.cleanUrls&&!D.endsWith("/")&&(D+=".html"),D!==d.pathname&&(d.pathname=D,l=D+d.search+d.hash,history.replaceState({},"",l)),d.hash&&!c){let K=null;try{K=document.getElementById(decodeURIComponent(d.hash).slice(1))}catch(G){console.warn(G)}if(K){Ur(K,d.hash);return}}window.scrollTo(0,c)})}}catch(C){if(!/fetch|Page not found/.test(C.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(C),!f)try{const A=await fetch(ut.value.base+"hashmap.json");window.__VP_HASH_MAP__=await A.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=he?h:Vr(h),n.component=t?an(t):null;const A=he?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={..._o,relativePath:A}}}}return he&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.target.closest("button"))return;const f=l.target.closest("a");if(f&&!f.closest(".vp-raw")&&(f instanceof SVGElement||!f.download)){const{target:d}=f,{href:h,origin:m,pathname:C,hash:A,search:P}=new URL(f.href instanceof SVGAnimatedString?f.href.animVal:f.href,f.baseURI),D=new URL(location.href);!l.ctrlKey&&!l.shiftKey&&!l.altKey&&!l.metaKey&&!d&&m===D.origin&&Ba(C)&&(l.preventDefault(),C===D.pathname&&P===D.search?(A!==D.hash&&(history.pushState({},"",h),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:D.href,newURL:h}))),A?Ur(f,A,f.classList.contains("header-anchor")):window.scrollTo(0,0)):r(h))}},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(ss(location.href),l.state&&l.state.scrollPosition||0),(c=s.onAfterRouteChanged)==null||c.call(s,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function Ja(){const e=St(Xa);if(!e)throw new Error("useRouter() is called without provider.");return e}function Eo(){return Ja().route}function Ur(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-Ga()+i;requestAnimationFrame(r)}}function ss(e){const t=new URL(e,vo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),ut.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const rs=()=>dn.forEach(e=>e()),If=Ei({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=Eo(),{site:n}=Ka();return()=>bs(e.as,n.value.contentProps??{style:{position:"relative"}},[t.component?bs(t.component,{onVnodeMounted:rs,onVnodeUpdated:rs,onVnodeUnmounted:rs}):"404 Page Not Found"])}}),Pf=Ei({setup(e,{slots:t}){const n=ue(!1);return At(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function Nf(){he&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(f=>f.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function Ff(){if(he){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(d=>d.remove());let f=c.textContent||"";o&&(f=f.replace(/^ *(\$|>) /gm,"").trim()),za(f).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const d=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,d)})}})}}async function za(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function $f(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=is(l);for(const f of document.head.children)if(f.isEqualNode(c)){s.push(f);return}});return}const o=i.map(is);s.forEach((l,c)=>{const f=o.findIndex(d=>d==null?void 0:d.isEqualNode(l??null));f!==-1?delete o[f]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};Wi(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],f=bo(o,i);f!==document.title&&(document.title=f);const d=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==d&&h.setAttribute("content",d):is(["meta",{name:"description",content:d}]),r(wo(o.head,Za(c)))})}function is([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&!t.async&&(s.async=!1),s}function Qa(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function Za(e){return e.filter(t=>!Qa(t))}const os=new Set,Co=()=>document.createElement("link"),ef=e=>{const t=Co();t.rel="prefetch",t.href=e,document.head.appendChild(t)},tf=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let on;const nf=he&&(on=Co())&&on.relList&&on.relList.supports&&on.relList.supports("prefetch")?ef:tf;function Hf(){if(!he||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!os.has(c)){os.add(c);const f=qa(c);f&&nf(f)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):os.add(l))})})};At(s);const r=Eo();Fe(()=>r.path,s),Pn(()=>{n&&n.disconnect()})}export{wf as $,pf as A,Il as B,Ga as C,lf as D,af as E,be as F,ui as G,Lf as H,de as I,cf as J,yo as K,Eo as L,vc as M,St as N,Of as O,Ss as P,xf as Q,Rn as R,Af as S,ro as T,he as U,An as V,Ja as W,Sf as X,of as Y,_f as Z,Cf as _,eo as a,bf as a0,hf as a1,Tf as a2,ql as a3,vf as a4,uf as a5,df as a6,mf as a7,$f as a8,Xa as a9,Rf as aa,ka as ab,If as ac,Pf as ad,ut as ae,Ef as af,Mf as ag,qa as ah,Hf as ai,Ff as aj,Nf as ak,bs as al,zi as b,gf as c,Ei as d,yf as e,Ba as f,Vr as g,ie as h,Fa as i,Zi as j,hi as k,rf as l,Na as m,xs as n,Yi as o,sf as p,ho as q,ff as r,ue as s,jo as t,Ka as u,Fe as v,Cl as w,Wi as x,At as y,Pn as z}; diff --git a/docs/document/assets/chunks/theme.DtPPs-el.js b/docs/document/assets/chunks/theme.DtPPs-el.js deleted file mode 100644 index 09d0b7cbf..000000000 --- a/docs/document/assets/chunks/theme.DtPPs-el.js +++ /dev/null @@ -1 +0,0 @@ -import{d as k,o as r,c as p,r as d,n as C,a as J,t as M,b as S,w as v,e as g,T as Ne,_ as L,u as Re,i as vt,f as ft,g as fe,h as V,j as h,k as l,p as z,l as j,m as ee,q as Le,s as I,v as Q,x as me,y as oe,z as Me,A as xe,B as mt,C as _t,D as Z,F as A,E as F,G as Ke,H as _e,I as y,J as se,K as We,L as ge,M as ce,N as ke,O as gt,P as Je,Q as kt,R as Xe,S as Ye,U as $e,V as $t,W as bt,X as yt,Y as Fe,Z as Pt,$ as Qe,a0 as Vt,a1 as Lt,a2 as Ze,a3 as et,a4 as St,a5 as wt,a6 as It}from"./framework.DHbvjPBJ.js";const Tt=k({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(e){return(t,n)=>(r(),p("span",{class:C(["VPBadge",t.type])},[d(t.$slots,"default",{},()=>[J(M(t.text),1)])],2))}}),Nt={key:0,class:"VPBackdrop"},Mt=k({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(e){return(t,n)=>(r(),S(Ne,{name:"fade"},{default:v(()=>[t.show?(r(),p("div",Nt)):g("",!0)]),_:1}))}}),Ct=L(Mt,[["__scopeId","data-v-b2600058"]]),T=Re;function At(e,t){let n,s=!1;return()=>{n&&clearTimeout(n),s?n=setTimeout(e,t):(e(),(s=!0)&&setTimeout(()=>s=!1,t))}}function Se(e){return/^\//.test(e)?e:`/${e}`}function Ce(e){const{pathname:t,search:n,hash:s,protocol:o}=new URL(e,"http://a.com");if(vt(e)||e.startsWith("#")||!o.startsWith("http")||!ft(t))return e;const{site:a}=T(),i=t.endsWith("/")||t.endsWith(".html")?e:e.replace(/(?:(^\.+)\/)?.*$/,`$1${t.replace(/(\.md)?$/,a.value.cleanUrls?"":".html")}${n}${s}`);return fe(i)}function ie({correspondingLink:e=!1}={}){const{site:t,localeIndex:n,page:s,theme:o,hash:a}=T(),i=V(()=>{var u,f;return{label:(u=t.value.locales[n.value])==null?void 0:u.label,link:((f=t.value.locales[n.value])==null?void 0:f.link)||(n.value==="root"?"/":`/${n.value}/`)}});return{localeLinks:V(()=>Object.entries(t.value.locales).flatMap(([u,f])=>i.value.label===f.label?[]:{text:f.label,link:Bt(f.link||(u==="root"?"/":`/${u}/`),o.value.i18nRouting!==!1&&e,s.value.relativePath.slice(i.value.link.length-1),!t.value.cleanUrls)+a.value})),currentLang:i}}function Bt(e,t,n,s){return t?e.replace(/\/$/,"")+Se(n.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):e}const Ht=e=>(z("data-v-93fd8736"),e=e(),j(),e),Et={class:"NotFound"},Ot={class:"code"},Dt={class:"title"},Ft=Ht(()=>h("div",{class:"divider"},null,-1)),zt={class:"quote"},jt={class:"action"},Ut=["href","aria-label"],qt=k({__name:"NotFound",setup(e){const{theme:t}=T(),{currentLang:n}=ie();return(s,o)=>{var a,i,c,u,f;return r(),p("div",Et,[h("p",Ot,M(((a=l(t).notFound)==null?void 0:a.code)??"404"),1),h("h1",Dt,M(((i=l(t).notFound)==null?void 0:i.title)??"PAGE NOT FOUND"),1),Ft,h("blockquote",zt,M(((c=l(t).notFound)==null?void 0:c.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),h("div",jt,[h("a",{class:"link",href:l(fe)(l(n).link),"aria-label":((u=l(t).notFound)==null?void 0:u.linkLabel)??"go to home"},M(((f=l(t).notFound)==null?void 0:f.linkText)??"Take me home"),9,Ut)])])}}}),Gt=L(qt,[["__scopeId","data-v-93fd8736"]]);function tt(e,t){if(Array.isArray(e))return ue(e);if(e==null)return[];t=Se(t);const n=Object.keys(e).sort((o,a)=>a.split("/").length-o.split("/").length).find(o=>t.startsWith(Se(o))),s=n?e[n]:[];return Array.isArray(s)?ue(s):ue(s.items,s.base)}function Rt(e){const t=[];let n=0;for(const s in e){const o=e[s];if(o.items){n=t.push(o);continue}t[n]||t.push({items:[]}),t[n].items.push(o)}return t}function xt(e){const t=[];function n(s){for(const o of s)o.text&&o.link&&t.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&n(o.items)}return n(e),t}function we(e,t){return Array.isArray(t)?t.some(n=>we(e,n)):ee(e,t.link)?!0:t.items?we(e,t.items):!1}function ue(e,t){return[...e].map(n=>{const s={...n},o=s.base||t;return o&&s.link&&(s.link=o+s.link),s.items&&(s.items=ue(s.items,o)),s})}function X(){const{frontmatter:e,page:t,theme:n}=T(),s=Le("(min-width: 960px)"),o=I(!1),a=V(()=>{const N=n.value.sidebar,w=t.value.relativePath;return N?tt(N,w):[]}),i=I(a.value);Q(a,(N,w)=>{JSON.stringify(N)!==JSON.stringify(w)&&(i.value=a.value)});const c=V(()=>e.value.sidebar!==!1&&i.value.length>0&&e.value.layout!=="home"),u=V(()=>f?e.value.aside==null?n.value.aside==="left":e.value.aside==="left":!1),f=V(()=>e.value.layout==="home"?!1:e.value.aside!=null?!!e.value.aside:n.value.aside!==!1),_=V(()=>c.value&&s.value),m=V(()=>c.value?Rt(i.value):[]);function P(){o.value=!0}function $(){o.value=!1}function b(){o.value?$():P()}return{isOpen:o,sidebar:i,sidebarGroups:m,hasSidebar:c,hasAside:f,leftAside:u,isSidebarEnabled:_,open:P,close:$,toggle:b}}function Kt(e,t){let n;me(()=>{n=e.value?document.activeElement:void 0}),oe(()=>{window.addEventListener("keyup",s)}),Me(()=>{window.removeEventListener("keyup",s)});function s(o){o.key==="Escape"&&e.value&&(t(),n==null||n.focus())}}function Wt(e){const{page:t,hash:n}=T(),s=I(!1),o=V(()=>e.value.collapsed!=null),a=V(()=>!!e.value.link),i=I(!1),c=()=>{i.value=ee(t.value.relativePath,e.value.link)};Q([t,e,n],c),oe(c);const u=V(()=>i.value?!0:e.value.items?we(t.value.relativePath,e.value.items):!1),f=V(()=>!!(e.value.items&&e.value.items.length));me(()=>{s.value=!!(o.value&&e.value.collapsed)}),xe(()=>{(i.value||u.value)&&(s.value=!1)});function _(){o.value&&(s.value=!s.value)}return{collapsed:s,collapsible:o,isLink:a,isActiveLink:i,hasActiveLink:u,hasChildren:f,toggle:_}}function Jt(){const{hasSidebar:e}=X(),t=Le("(min-width: 960px)"),n=Le("(min-width: 1280px)");return{isAsideEnabled:V(()=>!n.value&&!t.value?!1:e.value?n.value:t.value)}}const Ie=[];function nt(e){return typeof e.outline=="object"&&!Array.isArray(e.outline)&&e.outline.label||e.outlineTitle||"On this page"}function Ae(e){const t=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(n=>n.id&&n.hasChildNodes()).map(n=>{const s=Number(n.tagName[1]);return{element:n,title:Xt(n),link:"#"+n.id,level:s}});return Yt(t,e)}function Xt(e){let t="";for(const n of e.childNodes)if(n.nodeType===1){if(n.classList.contains("VPBadge")||n.classList.contains("header-anchor")||n.classList.contains("ignore-header"))continue;t+=n.textContent}else n.nodeType===3&&(t+=n.textContent);return t.trim()}function Yt(e,t){if(t===!1)return[];const n=(typeof t=="object"&&!Array.isArray(t)?t.level:t)||2,[s,o]=typeof n=="number"?[n,n]:n==="deep"?[2,6]:n;e=e.filter(i=>i.level>=s&&i.level<=o),Ie.length=0;for(const{element:i,link:c}of e)Ie.push({element:i,link:c});const a=[];e:for(let i=0;i=0;u--){const f=e[u];if(f.level{requestAnimationFrame(a),window.addEventListener("scroll",s)}),mt(()=>{i(location.hash)}),Me(()=>{window.removeEventListener("scroll",s)});function a(){if(!n.value)return;const c=window.scrollY,u=window.innerHeight,f=document.body.offsetHeight,_=Math.abs(c+u-f)<1,m=Ie.map(({element:$,link:b})=>({link:b,top:Zt($)})).filter(({top:$})=>!Number.isNaN($)).sort(($,b)=>$.top-b.top);if(!m.length){i(null);return}if(c<1){i(null);return}if(_){i(m[m.length-1].link);return}let P=null;for(const{link:$,top:b}of m){if(b>c+_t()+4)break;P=$}i(P)}function i(c){o&&o.classList.remove("active"),c==null?o=null:o=e.value.querySelector(`a[href="${decodeURIComponent(c)}"]`);const u=o;u?(u.classList.add("active"),t.value.style.top=u.offsetTop+39+"px",t.value.style.opacity="1"):(t.value.style.top="33px",t.value.style.opacity="0")}}function Zt(e){let t=0;for(;e!==document.body;){if(e===null)return NaN;t+=e.offsetTop,e=e.offsetParent}return t}const en=["href","title"],tn=k({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(e){function t({target:n}){const s=n.href.split("#")[1],o=document.getElementById(decodeURIComponent(s));o==null||o.focus({preventScroll:!0})}return(n,s)=>{const o=Z("VPDocOutlineItem",!0);return r(),p("ul",{class:C(["VPDocOutlineItem",n.root?"root":"nested"])},[(r(!0),p(A,null,F(n.headers,({children:a,link:i,title:c})=>(r(),p("li",null,[h("a",{class:"outline-link",href:i,onClick:t,title:c},M(c),9,en),a!=null&&a.length?(r(),S(o,{key:0,headers:a},null,8,["headers"])):g("",!0)]))),256))],2)}}}),st=L(tn,[["__scopeId","data-v-da421f78"]]),nn={class:"content"},sn={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},on=k({__name:"VPDocAsideOutline",setup(e){const{frontmatter:t,theme:n}=T(),s=Ke([]);_e(()=>{s.value=Ae(t.value.outline??n.value.outline)});const o=I(),a=I();return Qt(o,a),(i,c)=>(r(),p("nav",{"aria-labelledby":"doc-outline-aria-label",class:C(["VPDocAsideOutline",{"has-outline":s.value.length>0}]),ref_key:"container",ref:o},[h("div",nn,[h("div",{class:"outline-marker",ref_key:"marker",ref:a},null,512),h("div",sn,M(l(nt)(l(n))),1),y(st,{headers:s.value,root:!0},null,8,["headers"])])],2))}}),an=L(on,[["__scopeId","data-v-dfbd9fb8"]]),rn={class:"VPDocAsideCarbonAds"},ln=k({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(e){const t=()=>null;return(n,s)=>(r(),p("div",rn,[y(l(t),{"carbon-ads":n.carbonAds},null,8,["carbon-ads"])]))}}),cn=e=>(z("data-v-79cae1a0"),e=e(),j(),e),un={class:"VPDocAside"},dn=cn(()=>h("div",{class:"spacer"},null,-1)),hn=k({__name:"VPDocAside",setup(e){const{theme:t}=T();return(n,s)=>(r(),p("div",un,[d(n.$slots,"aside-top",{},void 0,!0),d(n.$slots,"aside-outline-before",{},void 0,!0),y(an),d(n.$slots,"aside-outline-after",{},void 0,!0),dn,d(n.$slots,"aside-ads-before",{},void 0,!0),l(t).carbonAds?(r(),S(ln,{key:0,"carbon-ads":l(t).carbonAds},null,8,["carbon-ads"])):g("",!0),d(n.$slots,"aside-ads-after",{},void 0,!0),d(n.$slots,"aside-bottom",{},void 0,!0)]))}}),pn=L(hn,[["__scopeId","data-v-79cae1a0"]]);function vn(){const{theme:e,page:t}=T();return V(()=>{const{text:n="Edit this page",pattern:s=""}=e.value.editLink||{};let o;return typeof s=="function"?o=s(t.value):o=s.replace(/:path/g,t.value.filePath),{url:o,text:n}})}function fn(){const{page:e,theme:t,frontmatter:n}=T();return V(()=>{var f,_,m,P,$,b,N,w;const s=tt(t.value.sidebar,e.value.relativePath),o=xt(s),a=mn(o,U=>U.link.replace(/[?#].*$/,"")),i=a.findIndex(U=>ee(e.value.relativePath,U.link)),c=((f=t.value.docFooter)==null?void 0:f.prev)===!1&&!n.value.prev||n.value.prev===!1,u=((_=t.value.docFooter)==null?void 0:_.next)===!1&&!n.value.next||n.value.next===!1;return{prev:c?void 0:{text:(typeof n.value.prev=="string"?n.value.prev:typeof n.value.prev=="object"?n.value.prev.text:void 0)??((m=a[i-1])==null?void 0:m.docFooterText)??((P=a[i-1])==null?void 0:P.text),link:(typeof n.value.prev=="object"?n.value.prev.link:void 0)??(($=a[i-1])==null?void 0:$.link)},next:u?void 0:{text:(typeof n.value.next=="string"?n.value.next:typeof n.value.next=="object"?n.value.next.text:void 0)??((b=a[i+1])==null?void 0:b.docFooterText)??((N=a[i+1])==null?void 0:N.text),link:(typeof n.value.next=="object"?n.value.next.link:void 0)??((w=a[i+1])==null?void 0:w.link)}}})}function mn(e,t){const n=new Set;return e.filter(s=>{const o=t(s);return n.has(o)?!1:n.add(o)})}const W=k({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(e){const t=e,n=V(()=>t.tag??(t.href?"a":"span")),s=V(()=>t.href&&We.test(t.href)||t.target==="_blank");return(o,a)=>(r(),S(se(n.value),{class:C(["VPLink",{link:o.href,"vp-external-link-icon":s.value,"no-icon":o.noIcon}]),href:o.href?l(Ce)(o.href):void 0,target:o.target??(s.value?"_blank":void 0),rel:o.rel??(s.value?"noreferrer":void 0)},{default:v(()=>[d(o.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),_n={class:"VPLastUpdated"},gn=["datetime"],kn=k({__name:"VPDocFooterLastUpdated",setup(e){const{theme:t,page:n,frontmatter:s,lang:o}=T(),a=V(()=>new Date(s.value.lastUpdated??n.value.lastUpdated)),i=V(()=>a.value.toISOString()),c=I("");return oe(()=>{me(()=>{var u,f,_;c.value=new Intl.DateTimeFormat((f=(u=t.value.lastUpdated)==null?void 0:u.formatOptions)!=null&&f.forceLocale?o.value:void 0,((_=t.value.lastUpdated)==null?void 0:_.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(a.value)})}),(u,f)=>{var _;return r(),p("p",_n,[J(M(((_=l(t).lastUpdated)==null?void 0:_.text)||l(t).lastUpdatedText||"Last updated")+": ",1),h("time",{datetime:i.value},M(c.value),9,gn)])}}}),$n=L(kn,[["__scopeId","data-v-5be60f87"]]),ot=e=>(z("data-v-0ce50de1"),e=e(),j(),e),bn={key:0,class:"VPDocFooter"},yn={key:0,class:"edit-info"},Pn={key:0,class:"edit-link"},Vn=ot(()=>h("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),Ln={key:1,class:"last-updated"},Sn={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},wn=ot(()=>h("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),In={class:"pager"},Tn=["innerHTML"],Nn=["innerHTML"],Mn={class:"pager"},Cn=["innerHTML"],An=["innerHTML"],Bn=k({__name:"VPDocFooter",setup(e){const{theme:t,page:n,frontmatter:s}=T(),o=vn(),a=fn(),i=V(()=>t.value.editLink&&s.value.editLink!==!1),c=V(()=>n.value.lastUpdated&&s.value.lastUpdated!==!1),u=V(()=>i.value||c.value||a.value.prev||a.value.next);return(f,_)=>{var m,P,$,b;return u.value?(r(),p("footer",bn,[d(f.$slots,"doc-footer-before",{},void 0,!0),i.value||c.value?(r(),p("div",yn,[i.value?(r(),p("div",Pn,[y(W,{class:"edit-link-button",href:l(o).url,"no-icon":!0},{default:v(()=>[Vn,J(" "+M(l(o).text),1)]),_:1},8,["href"])])):g("",!0),c.value?(r(),p("div",Ln,[y($n)])):g("",!0)])):g("",!0),(m=l(a).prev)!=null&&m.link||(P=l(a).next)!=null&&P.link?(r(),p("nav",Sn,[wn,h("div",In,[($=l(a).prev)!=null&&$.link?(r(),S(W,{key:0,class:"pager-link prev",href:l(a).prev.link},{default:v(()=>{var N;return[h("span",{class:"desc",innerHTML:((N=l(t).docFooter)==null?void 0:N.prev)||"Previous page"},null,8,Tn),h("span",{class:"title",innerHTML:l(a).prev.text},null,8,Nn)]}),_:1},8,["href"])):g("",!0)]),h("div",Mn,[(b=l(a).next)!=null&&b.link?(r(),S(W,{key:0,class:"pager-link next",href:l(a).next.link},{default:v(()=>{var N;return[h("span",{class:"desc",innerHTML:((N=l(t).docFooter)==null?void 0:N.next)||"Next page"},null,8,Cn),h("span",{class:"title",innerHTML:l(a).next.text},null,8,An)]}),_:1},8,["href"])):g("",!0)])])):g("",!0)])):g("",!0)}}}),Hn=L(Bn,[["__scopeId","data-v-0ce50de1"]]),En=e=>(z("data-v-ef3a4dda"),e=e(),j(),e),On={class:"container"},Dn=En(()=>h("div",{class:"aside-curtain"},null,-1)),Fn={class:"aside-container"},zn={class:"aside-content"},jn={class:"content"},Un={class:"content-container"},qn={class:"main"},Gn=k({__name:"VPDoc",setup(e){const{theme:t}=T(),n=ge(),{hasSidebar:s,hasAside:o,leftAside:a}=X(),i=V(()=>n.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(c,u)=>{const f=Z("Content");return r(),p("div",{class:C(["VPDoc",{"has-sidebar":l(s),"has-aside":l(o)}])},[d(c.$slots,"doc-top",{},void 0,!0),h("div",On,[l(o)?(r(),p("div",{key:0,class:C(["aside",{"left-aside":l(a)}])},[Dn,h("div",Fn,[h("div",zn,[y(pn,null,{"aside-top":v(()=>[d(c.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[d(c.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[d(c.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[d(c.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[d(c.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[d(c.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):g("",!0),h("div",jn,[h("div",Un,[d(c.$slots,"doc-before",{},void 0,!0),h("main",qn,[y(f,{class:C(["vp-doc",[i.value,l(t).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),y(Hn,null,{"doc-footer-before":v(()=>[d(c.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),d(c.$slots,"doc-after",{},void 0,!0)])])]),d(c.$slots,"doc-bottom",{},void 0,!0)],2)}}}),Rn=L(Gn,[["__scopeId","data-v-ef3a4dda"]]),xn=k({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(e){const t=e,n=V(()=>t.href&&We.test(t.href)),s=V(()=>t.tag||t.href?"a":"button");return(o,a)=>(r(),S(se(s.value),{class:C(["VPButton",[o.size,o.theme]]),href:o.href?l(Ce)(o.href):void 0,target:t.target??(n.value?"_blank":void 0),rel:t.rel??(n.value?"noreferrer":void 0)},{default:v(()=>[J(M(o.text),1)]),_:1},8,["class","href","target","rel"]))}}),Kn=L(xn,[["__scopeId","data-v-877bb349"]]),Wn=["src","alt"],Jn=k({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(e){return(t,n)=>{const s=Z("VPImage",!0);return t.image?(r(),p(A,{key:0},[typeof t.image=="string"||"src"in t.image?(r(),p("img",ce({key:0,class:"VPImage"},typeof t.image=="string"?t.$attrs:{...t.image,...t.$attrs},{src:l(fe)(typeof t.image=="string"?t.image:t.image.src),alt:t.alt??(typeof t.image=="string"?"":t.image.alt||"")}),null,16,Wn)):(r(),p(A,{key:1},[y(s,ce({class:"dark",image:t.image.dark,alt:t.image.alt},t.$attrs),null,16,["image","alt"]),y(s,ce({class:"light",image:t.image.light,alt:t.image.alt},t.$attrs),null,16,["image","alt"])],64))],64)):g("",!0)}}}),he=L(Jn,[["__scopeId","data-v-4d414b82"]]),Xn=e=>(z("data-v-e244e0a0"),e=e(),j(),e),Yn={class:"container"},Qn={class:"main"},Zn={key:0,class:"name"},es=["innerHTML"],ts=["innerHTML"],ns=["innerHTML"],ss={key:0,class:"actions"},os={key:0,class:"image"},as={class:"image-container"},is=Xn(()=>h("div",{class:"image-bg"},null,-1)),rs=k({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(e){const t=ke("hero-image-slot-exists");return(n,s)=>(r(),p("div",{class:C(["VPHero",{"has-image":n.image||l(t)}])},[h("div",Yn,[h("div",Qn,[d(n.$slots,"home-hero-info-before",{},void 0,!0),d(n.$slots,"home-hero-info",{},()=>[n.name?(r(),p("h1",Zn,[h("span",{innerHTML:n.name,class:"clip"},null,8,es)])):g("",!0),n.text?(r(),p("p",{key:1,innerHTML:n.text,class:"text"},null,8,ts)):g("",!0),n.tagline?(r(),p("p",{key:2,innerHTML:n.tagline,class:"tagline"},null,8,ns)):g("",!0)],!0),d(n.$slots,"home-hero-info-after",{},void 0,!0),n.actions?(r(),p("div",ss,[(r(!0),p(A,null,F(n.actions,o=>(r(),p("div",{key:o.link,class:"action"},[y(Kn,{tag:"a",size:"medium",theme:o.theme,text:o.text,href:o.link,target:o.target,rel:o.rel},null,8,["theme","text","href","target","rel"])]))),128))])):g("",!0),d(n.$slots,"home-hero-actions-after",{},void 0,!0)]),n.image||l(t)?(r(),p("div",os,[h("div",as,[is,d(n.$slots,"home-hero-image",{},()=>[n.image?(r(),S(he,{key:0,class:"image-src",image:n.image},null,8,["image"])):g("",!0)],!0)])])):g("",!0)])],2))}}),ls=L(rs,[["__scopeId","data-v-e244e0a0"]]),cs=k({__name:"VPHomeHero",setup(e){const{frontmatter:t}=T();return(n,s)=>l(t).hero?(r(),S(ls,{key:0,class:"VPHomeHero",name:l(t).hero.name,text:l(t).hero.text,tagline:l(t).hero.tagline,image:l(t).hero.image,actions:l(t).hero.actions},{"home-hero-info-before":v(()=>[d(n.$slots,"home-hero-info-before")]),"home-hero-info":v(()=>[d(n.$slots,"home-hero-info")]),"home-hero-info-after":v(()=>[d(n.$slots,"home-hero-info-after")]),"home-hero-actions-after":v(()=>[d(n.$slots,"home-hero-actions-after")]),"home-hero-image":v(()=>[d(n.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):g("",!0)}}),us=e=>(z("data-v-95001937"),e=e(),j(),e),ds={class:"box"},hs={key:0,class:"icon"},ps=["innerHTML"],vs=["innerHTML"],fs=["innerHTML"],ms={key:4,class:"link-text"},_s={class:"link-text-value"},gs=us(()=>h("span",{class:"vpi-arrow-right link-text-icon"},null,-1)),ks=k({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(e){return(t,n)=>(r(),S(W,{class:"VPFeature",href:t.link,rel:t.rel,target:t.target,"no-icon":!0,tag:t.link?"a":"div"},{default:v(()=>[h("article",ds,[typeof t.icon=="object"&&t.icon.wrap?(r(),p("div",hs,[y(he,{image:t.icon,alt:t.icon.alt,height:t.icon.height||48,width:t.icon.width||48},null,8,["image","alt","height","width"])])):typeof t.icon=="object"?(r(),S(he,{key:1,image:t.icon,alt:t.icon.alt,height:t.icon.height||48,width:t.icon.width||48},null,8,["image","alt","height","width"])):t.icon?(r(),p("div",{key:2,class:"icon",innerHTML:t.icon},null,8,ps)):g("",!0),h("h2",{class:"title",innerHTML:t.title},null,8,vs),t.details?(r(),p("p",{key:3,class:"details",innerHTML:t.details},null,8,fs)):g("",!0),t.linkText?(r(),p("div",ms,[h("p",_s,[J(M(t.linkText)+" ",1),gs])])):g("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),$s=L(ks,[["__scopeId","data-v-95001937"]]),bs={key:0,class:"VPFeatures"},ys={class:"container"},Ps={class:"items"},Vs=k({__name:"VPFeatures",props:{features:{}},setup(e){const t=e,n=V(()=>{const s=t.features.length;if(s){if(s===2)return"grid-2";if(s===3)return"grid-3";if(s%3===0)return"grid-6";if(s>3)return"grid-4"}else return});return(s,o)=>s.features?(r(),p("div",bs,[h("div",ys,[h("div",Ps,[(r(!0),p(A,null,F(s.features,a=>(r(),p("div",{key:a.title,class:C(["item",[n.value]])},[y($s,{icon:a.icon,title:a.title,details:a.details,link:a.link,"link-text":a.linkText,rel:a.rel,target:a.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):g("",!0)}}),Ls=L(Vs,[["__scopeId","data-v-1da4ff3d"]]),Ss=k({__name:"VPHomeFeatures",setup(e){const{frontmatter:t}=T();return(n,s)=>l(t).features?(r(),S(Ls,{key:0,class:"VPHomeFeatures",features:l(t).features},null,8,["features"])):g("",!0)}}),ws=k({__name:"VPHomeContent",setup(e){const{width:t}=gt({initialWidth:0,includeScrollbar:!1});return(n,s)=>(r(),p("div",{class:"vp-doc container",style:Je(l(t)?{"--vp-offset":`calc(50% - ${l(t)/2}px)`}:{})},[d(n.$slots,"default",{},void 0,!0)],4))}}),Is=L(ws,[["__scopeId","data-v-2498cc33"]]),Ts={class:"VPHome"},Ns=k({__name:"VPHome",setup(e){const{frontmatter:t}=T();return(n,s)=>{const o=Z("Content");return r(),p("div",Ts,[d(n.$slots,"home-hero-before",{},void 0,!0),y(cs,null,{"home-hero-info-before":v(()=>[d(n.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[d(n.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[d(n.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[d(n.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[d(n.$slots,"home-hero-image",{},void 0,!0)]),_:3}),d(n.$slots,"home-hero-after",{},void 0,!0),d(n.$slots,"home-features-before",{},void 0,!0),y(Ss),d(n.$slots,"home-features-after",{},void 0,!0),l(t).markdownStyles!==!1?(r(),S(Is,{key:0},{default:v(()=>[y(o)]),_:1})):(r(),S(o,{key:1}))])}}}),Ms=L(Ns,[["__scopeId","data-v-95a6a92c"]]),Cs={},As={class:"VPPage"};function Bs(e,t){const n=Z("Content");return r(),p("div",As,[d(e.$slots,"page-top"),y(n),d(e.$slots,"page-bottom")])}const Hs=L(Cs,[["render",Bs]]),Es=k({__name:"VPContent",setup(e){const{page:t,frontmatter:n}=T(),{hasSidebar:s}=X();return(o,a)=>(r(),p("div",{class:C(["VPContent",{"has-sidebar":l(s),"is-home":l(n).layout==="home"}]),id:"VPContent"},[l(t).isNotFound?d(o.$slots,"not-found",{key:0},()=>[y(Gt)],!0):l(n).layout==="page"?(r(),S(Hs,{key:1},{"page-top":v(()=>[d(o.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[d(o.$slots,"page-bottom",{},void 0,!0)]),_:3})):l(n).layout==="home"?(r(),S(Ms,{key:2},{"home-hero-before":v(()=>[d(o.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[d(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[d(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[d(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[d(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[d(o.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[d(o.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[d(o.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[d(o.$slots,"home-features-after",{},void 0,!0)]),_:3})):l(n).layout&&l(n).layout!=="doc"?(r(),S(se(l(n).layout),{key:3})):(r(),S(Rn,{key:4},{"doc-top":v(()=>[d(o.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[d(o.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":v(()=>[d(o.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[d(o.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[d(o.$slots,"doc-after",{},void 0,!0)]),"aside-top":v(()=>[d(o.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":v(()=>[d(o.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[d(o.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[d(o.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[d(o.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":v(()=>[d(o.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),Os=L(Es,[["__scopeId","data-v-d2aef184"]]),Ds={class:"container"},Fs=["innerHTML"],zs=["innerHTML"],js=k({__name:"VPFooter",setup(e){const{theme:t,frontmatter:n}=T(),{hasSidebar:s}=X();return(o,a)=>l(t).footer&&l(n).footer!==!1?(r(),p("footer",{key:0,class:C(["VPFooter",{"has-sidebar":l(s)}])},[h("div",Ds,[l(t).footer.message?(r(),p("p",{key:0,class:"message",innerHTML:l(t).footer.message},null,8,Fs)):g("",!0),l(t).footer.copyright?(r(),p("p",{key:1,class:"copyright",innerHTML:l(t).footer.copyright},null,8,zs)):g("",!0)])],2)):g("",!0)}}),Us=L(js,[["__scopeId","data-v-e3157d6d"]]);function qs(){const{theme:e,frontmatter:t}=T(),n=Ke([]),s=V(()=>n.value.length>0);return _e(()=>{n.value=Ae(t.value.outline??e.value.outline)}),{headers:n,hasLocalNav:s}}const Gs=e=>(z("data-v-d1de893e"),e=e(),j(),e),Rs={class:"menu-text"},xs=Gs(()=>h("span",{class:"vpi-chevron-right icon"},null,-1)),Ks={class:"header"},Ws={class:"outline"},Js=k({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(e){const t=e,{theme:n}=T(),s=I(!1),o=I(0),a=I(),i=I();function c(m){var P;(P=a.value)!=null&&P.contains(m.target)||(s.value=!1)}Q(s,m=>{if(m){document.addEventListener("click",c);return}document.removeEventListener("click",c)}),kt("Escape",()=>{s.value=!1}),_e(()=>{s.value=!1});function u(){s.value=!s.value,o.value=window.innerHeight+Math.min(window.scrollY-t.navHeight,0)}function f(m){m.target.classList.contains("outline-link")&&(i.value&&(i.value.style.transition="none"),Xe(()=>{s.value=!1}))}function _(){s.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(m,P)=>(r(),p("div",{class:"VPLocalNavOutlineDropdown",style:Je({"--vp-vh":o.value+"px"}),ref_key:"main",ref:a},[m.headers.length>0?(r(),p("button",{key:0,onClick:u,class:C({open:s.value})},[h("span",Rs,M(l(nt)(l(n))),1),xs],2)):(r(),p("button",{key:1,onClick:_},M(l(n).returnToTopLabel||"Return to top"),1)),y(Ne,{name:"flyout"},{default:v(()=>[s.value?(r(),p("div",{key:0,ref_key:"items",ref:i,class:"items",onClick:f},[h("div",Ks,[h("a",{class:"top-link",href:"#",onClick:_},M(l(n).returnToTopLabel||"Return to top"),1)]),h("div",Ws,[y(st,{headers:m.headers},null,8,["headers"])])],512)):g("",!0)]),_:1})],4))}}),Xs=L(Js,[["__scopeId","data-v-d1de893e"]]),Ys=e=>(z("data-v-9d8129cc"),e=e(),j(),e),Qs={class:"container"},Zs=["aria-expanded"],eo=Ys(()=>h("span",{class:"vpi-align-left menu-icon"},null,-1)),to={class:"menu-text"},no=k({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(e){const{theme:t,frontmatter:n}=T(),{hasSidebar:s}=X(),{headers:o}=qs(),{y:a}=Ye(),i=I(0);oe(()=>{i.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),_e(()=>{o.value=Ae(n.value.outline??t.value.outline)});const c=V(()=>o.value.length===0),u=V(()=>c.value&&!s.value),f=V(()=>({VPLocalNav:!0,"has-sidebar":s.value,empty:c.value,fixed:u.value}));return(_,m)=>l(n).layout!=="home"&&(!u.value||l(a)>=i.value)?(r(),p("div",{key:0,class:C(f.value)},[h("div",Qs,[l(s)?(r(),p("button",{key:0,class:"menu","aria-expanded":_.open,"aria-controls":"VPSidebarNav",onClick:m[0]||(m[0]=P=>_.$emit("open-menu"))},[eo,h("span",to,M(l(t).sidebarMenuLabel||"Menu"),1)],8,Zs)):g("",!0),y(Xs,{headers:l(o),navHeight:i.value},null,8,["headers","navHeight"])])],2)):g("",!0)}}),so=L(no,[["__scopeId","data-v-9d8129cc"]]);function oo(){const e=I(!1);function t(){e.value=!0,window.addEventListener("resize",o)}function n(){e.value=!1,window.removeEventListener("resize",o)}function s(){e.value?n():t()}function o(){window.outerWidth>=768&&n()}const a=ge();return Q(()=>a.path,n),{isScreenOpen:e,openScreen:t,closeScreen:n,toggleScreen:s}}const ao={},io={class:"VPSwitch",type:"button",role:"switch"},ro={class:"check"},lo={key:0,class:"icon"};function co(e,t){return r(),p("button",io,[h("span",ro,[e.$slots.default?(r(),p("span",lo,[d(e.$slots,"default",{},void 0,!0)])):g("",!0)])])}const uo=L(ao,[["render",co],["__scopeId","data-v-7012e5dd"]]),at=e=>(z("data-v-bfa23729"),e=e(),j(),e),ho=at(()=>h("span",{class:"vpi-sun sun"},null,-1)),po=at(()=>h("span",{class:"vpi-moon moon"},null,-1)),vo=k({__name:"VPSwitchAppearance",setup(e){const{isDark:t,theme:n}=T(),s=ke("toggle-appearance",()=>{t.value=!t.value}),o=V(()=>t.value?n.value.lightModeSwitchTitle||"Switch to light theme":n.value.darkModeSwitchTitle||"Switch to dark theme");return(a,i)=>(r(),S(uo,{title:o.value,class:"VPSwitchAppearance","aria-checked":l(t),onClick:l(s)},{default:v(()=>[ho,po]),_:1},8,["title","aria-checked","onClick"]))}}),Be=L(vo,[["__scopeId","data-v-bfa23729"]]),fo={key:0,class:"VPNavBarAppearance"},mo=k({__name:"VPNavBarAppearance",setup(e){const{site:t}=T();return(n,s)=>l(t).appearance&&l(t).appearance!=="force-dark"?(r(),p("div",fo,[y(Be)])):g("",!0)}}),_o=L(mo,[["__scopeId","data-v-f774fc1d"]]),He=I();let it=!1,ye=0;function go(e){const t=I(!1);if($e){!it&&ko(),ye++;const n=Q(He,s=>{var o,a,i;s===e.el.value||(o=e.el.value)!=null&&o.contains(s)?(t.value=!0,(a=e.onFocus)==null||a.call(e)):(t.value=!1,(i=e.onBlur)==null||i.call(e))});Me(()=>{n(),ye--,ye||$o()})}return $t(t)}function ko(){document.addEventListener("focusin",rt),it=!0,He.value=document.activeElement}function $o(){document.removeEventListener("focusin",rt)}function rt(){He.value=document.activeElement}const bo={class:"VPMenuLink"},yo=k({__name:"VPMenuLink",props:{item:{}},setup(e){const{page:t}=T();return(n,s)=>(r(),p("div",bo,[y(W,{class:C({active:l(ee)(l(t).relativePath,n.item.activeMatch||n.item.link,!!n.item.activeMatch)}),href:n.item.link,target:n.item.target,rel:n.item.rel},{default:v(()=>[J(M(n.item.text),1)]),_:1},8,["class","href","target","rel"])]))}}),be=L(yo,[["__scopeId","data-v-71c5411b"]]),Po={class:"VPMenuGroup"},Vo={key:0,class:"title"},Lo=k({__name:"VPMenuGroup",props:{text:{},items:{}},setup(e){return(t,n)=>(r(),p("div",Po,[t.text?(r(),p("p",Vo,M(t.text),1)):g("",!0),(r(!0),p(A,null,F(t.items,s=>(r(),p(A,null,["link"in s?(r(),S(be,{key:0,item:s},null,8,["item"])):g("",!0)],64))),256))]))}}),So=L(Lo,[["__scopeId","data-v-2bec9359"]]),wo={class:"VPMenu"},Io={key:0,class:"items"},To=k({__name:"VPMenu",props:{items:{}},setup(e){return(t,n)=>(r(),p("div",wo,[t.items?(r(),p("div",Io,[(r(!0),p(A,null,F(t.items,s=>(r(),p(A,{key:s.text},["link"in s?(r(),S(be,{key:0,item:s},null,8,["item"])):(r(),S(So,{key:1,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):g("",!0),d(t.$slots,"default",{},void 0,!0)]))}}),No=L(To,[["__scopeId","data-v-7bffa9cd"]]),Mo=e=>(z("data-v-8fd20e7d"),e=e(),j(),e),Co=["aria-expanded","aria-label"],Ao={key:0,class:"text"},Bo=["innerHTML"],Ho=Mo(()=>h("span",{class:"vpi-chevron-down text-icon"},null,-1)),Eo={key:1,class:"vpi-more-horizontal icon"},Oo={class:"menu"},Do=k({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(e){const t=I(!1),n=I();go({el:n,onBlur:s});function s(){t.value=!1}return(o,a)=>(r(),p("div",{class:"VPFlyout",ref_key:"el",ref:n,onMouseenter:a[1]||(a[1]=i=>t.value=!0),onMouseleave:a[2]||(a[2]=i=>t.value=!1)},[h("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":t.value,"aria-label":o.label,onClick:a[0]||(a[0]=i=>t.value=!t.value)},[o.button||o.icon?(r(),p("span",Ao,[o.icon?(r(),p("span",{key:0,class:C([o.icon,"option-icon"])},null,2)):g("",!0),o.button?(r(),p("span",{key:1,innerHTML:o.button},null,8,Bo)):g("",!0),Ho])):(r(),p("span",Eo))],8,Co),h("div",Oo,[y(No,{items:o.items},{default:v(()=>[d(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),Ee=L(Do,[["__scopeId","data-v-8fd20e7d"]]),Fo=["href","aria-label","innerHTML"],zo=k({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(e){const t=e,n=V(()=>typeof t.icon=="object"?t.icon.svg:``);return(s,o)=>(r(),p("a",{class:"VPSocialLink no-icon",href:s.link,"aria-label":s.ariaLabel??(typeof s.icon=="string"?s.icon:""),target:"_blank",rel:"noopener",innerHTML:n.value},null,8,Fo))}}),jo=L(zo,[["__scopeId","data-v-50151957"]]),Uo={class:"VPSocialLinks"},qo=k({__name:"VPSocialLinks",props:{links:{}},setup(e){return(t,n)=>(r(),p("div",Uo,[(r(!0),p(A,null,F(t.links,({link:s,icon:o,ariaLabel:a})=>(r(),S(jo,{key:s,icon:o,link:s,ariaLabel:a},null,8,["icon","link","ariaLabel"]))),128))]))}}),Oe=L(qo,[["__scopeId","data-v-f2234a39"]]),Go={key:0,class:"group translations"},Ro={class:"trans-title"},xo={key:1,class:"group"},Ko={class:"item appearance"},Wo={class:"label"},Jo={class:"appearance-action"},Xo={key:2,class:"group"},Yo={class:"item social-links"},Qo=k({__name:"VPNavBarExtra",setup(e){const{site:t,theme:n}=T(),{localeLinks:s,currentLang:o}=ie({correspondingLink:!0}),a=V(()=>s.value.length&&o.value.label||t.value.appearance||n.value.socialLinks);return(i,c)=>a.value?(r(),S(Ee,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:v(()=>[l(s).length&&l(o).label?(r(),p("div",Go,[h("p",Ro,M(l(o).label),1),(r(!0),p(A,null,F(l(s),u=>(r(),S(be,{key:u.link,item:u},null,8,["item"]))),128))])):g("",!0),l(t).appearance&&l(t).appearance!=="force-dark"?(r(),p("div",xo,[h("div",Ko,[h("p",Wo,M(l(n).darkModeSwitchLabel||"Appearance"),1),h("div",Jo,[y(Be)])])])):g("",!0),l(n).socialLinks?(r(),p("div",Xo,[h("div",Yo,[y(Oe,{class:"social-links-list",links:l(n).socialLinks},null,8,["links"])])])):g("",!0)]),_:1})):g("",!0)}}),Zo=L(Qo,[["__scopeId","data-v-ca99dad5"]]),ea=e=>(z("data-v-670493dd"),e=e(),j(),e),ta=["aria-expanded"],na=ea(()=>h("span",{class:"container"},[h("span",{class:"top"}),h("span",{class:"middle"}),h("span",{class:"bottom"})],-1)),sa=[na],oa=k({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>(r(),p("button",{type:"button",class:C(["VPNavBarHamburger",{active:t.active}]),"aria-label":"mobile navigation","aria-expanded":t.active,"aria-controls":"VPNavScreen",onClick:n[0]||(n[0]=s=>t.$emit("click"))},sa,10,ta))}}),aa=L(oa,[["__scopeId","data-v-670493dd"]]),ia=["innerHTML"],ra=k({__name:"VPNavBarMenuLink",props:{item:{}},setup(e){const{page:t}=T();return(n,s)=>(r(),S(W,{class:C({VPNavBarMenuLink:!0,active:l(ee)(l(t).relativePath,n.item.activeMatch||n.item.link,!!n.item.activeMatch)}),href:n.item.link,noIcon:n.item.noIcon,target:n.item.target,rel:n.item.rel,tabindex:"0"},{default:v(()=>[h("span",{innerHTML:n.item.text},null,8,ia)]),_:1},8,["class","href","noIcon","target","rel"]))}}),la=L(ra,[["__scopeId","data-v-2b93b872"]]),ca=k({__name:"VPNavBarMenuGroup",props:{item:{}},setup(e){const t=e,{page:n}=T(),s=a=>"link"in a?ee(n.value.relativePath,a.link,!!t.item.activeMatch):a.items.some(s),o=V(()=>s(t.item));return(a,i)=>(r(),S(Ee,{class:C({VPNavBarMenuGroup:!0,active:l(ee)(l(n).relativePath,a.item.activeMatch,!!a.item.activeMatch)||o.value}),button:a.item.text,items:a.item.items},null,8,["class","button","items"]))}}),ua=e=>(z("data-v-c6c3e6d4"),e=e(),j(),e),da={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},ha=ua(()=>h("span",{id:"main-nav-aria-label",class:"visually-hidden"},"Main Navigation",-1)),pa=k({__name:"VPNavBarMenu",setup(e){const{theme:t}=T();return(n,s)=>l(t).nav?(r(),p("nav",da,[ha,(r(!0),p(A,null,F(l(t).nav,o=>(r(),p(A,{key:o.text},["link"in o?(r(),S(la,{key:0,item:o},null,8,["item"])):(r(),S(ca,{key:1,item:o},null,8,["item"]))],64))),128))])):g("",!0)}}),va=L(pa,[["__scopeId","data-v-c6c3e6d4"]]),fa="/document/assets/flex-logo.BJA2J7hW.svg";function Pe(e,t){return typeof e>"u"?t:e}function ze(e){const t=Array(e);for(let n=0;n=this.minlength&&(c||!i[_])){let P=le(u,o,f),$="";switch(this.tokenize){case"full":if(3b;N--)if(N-b>=this.minlength){const w=le(u,o,f,m,b);$=_.substring(b,N),this.push_index(i,$,w,e,n)}break}case"reverse":if(2=this.minlength){const N=le(u,o,f,m,b);this.push_index(i,$,N,e,n)}$=""}case"forward":if(1=this.minlength&&this.push_index(i,$,P,e,n);break}default:if(this.boost&&(P=Math.min(0|P/this.boost(t,_,f),u-1)),this.push_index(i,_,P,e,n),c&&1=this.minlength&&!b[_]){b[_]=1;const K=le(N+(o/2>N?0:1),o,f,U-1,D-1),Y=this.bidirectional&&_>w;this.push_index(a,Y?w:_,K,e,n,Y?_:w)}}}}}this.fastupdate||(this.register[e]=1)}}return this};function le(e,t,n,s,o){return n&&1=this.minlength&&!m[$]){if(!this.optimize&&!a&&!this.map[$])return i;P[N++]=$,m[$]=1}e=P,s=e.length}if(!s)return i;t||(t=100);let u,f=this.depth&&1=n)))));$++);if(f)return o?qe(c,n,0):void(e[e.length]=c)}return!t&&c};function qe(e,t,n){return e=e.length===1?e[0]:_a(e),n||e.length>t?e.slice(n,n+t):e}function Ge(e,t,n,s){if(n){const o=s&&t>n;e=e[o?t:n],e=e&&e[o?n:t]}else e=e[t];return e}R.prototype.contain=function(e){return!!this.register[e]},R.prototype.update=function(e,t){return this.remove(e).add(e,t)},R.prototype.remove=function(e,t){const n=this.register[e];if(n){if(this.fastupdate)for(let s,o=0;o{if(a.value){for(var H=m.value.search(a.value,{enrich:!0}),B=[],q=0;q!H||!H.length?[]:H.reduce((q,E)=>(q[B(E)]||(q[B(E)]=[]),q[B(E)].push(E),q),{}),K=()=>{setTimeout(()=>{c.value&&c.value.focus()},100),De(),o.value=!0};oe(async()=>{var E,O;const H=await yt(()=>import("./virtual_search-data.CMKl0EDN.js"),[]);u.value=H.default.INDEX_DATA,f.value=H.default.PREVIEW_LOOKUP,_.value=H.default.Options,i.value=window.location.origin+fe(n.value==="root"?"/":n.value),P.value=((E=_.value)==null?void 0:E.buttonLabel)||P.value,$.value=((O=_.value)==null?void 0:O.placeholder)||$.value;var B=new R(_.value);B.import("reg",u.value.reg),B.import("cfg",u.value.cfg),B.import("map",u.value.map),B.import("ctx",u.value.ctx),m.value=B,s.value.innerHTML=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"⌘":"Ctrl";const q=G=>{var ne;G.key==="k"&&(G.ctrlKey||G.metaKey)&&(G.preventDefault(),K()),G.key==="Escape"&&((ne=a.value)==null?void 0:ne.length)==0&&o.value&&(o.value=!1)};window.addEventListener("keydown",q)});const Y=V(()=>D(U.value,H=>H.link.split("/").slice(0,-1).join("-"))),te=V(()=>Object.values(Y.value).flat().map(H=>H.id));function De(){o.value=!1,a.value=""}const ht=H=>{var B,q;if(document.getElementsByClassName("search-group")[0]){if(H.key=="ArrowUp"||H.key=="ArrowDown"){const E=te.value.indexOf(b.value);if(H.key=="ArrowUp"){const O=E==0?te.value.length-1:E-1;b.value=te.value[O]}if(H.key=="ArrowDown"){const O=E>te.value.length-2?0:E+1;b.value=te.value[O]}if(E<5){const O=N.value.getElementsByClassName("VPPluginSearch-search-group")[0];O==null||O.scrollIntoView(!0)}else(B=document.getElementById(te.value[b.value]))==null||B.scrollIntoView(!0);Xe()}H.key=="Enter"&&w.go(t.site.value.base+((q=N.value.getElementsByClassName("link-focused")[0].getAttribute("href"))==null?void 0:q.replace(i.value,"")))}};return(H,B)=>{const q=Z("ClientOnly");return r(),p("div",Oa,[y(q,null,{default:v(()=>[(r(),S(Lt,{to:"body"},[Fe(h("div",{class:"VPPluginSearch-modal-back",onClick:B[2]||(B[2]=E=>o.value=!1),onKeydown:ht},[h("div",{class:"VPPluginSearch-modal",onClick:B[1]||(B[1]=Qe(()=>{},["stop"])),ref_key:"modal",ref:N},[h("form",Da,[Fa,Fe(h("input",{class:"DocSearch-Input","aria-autocomplete":"both","aria-labelledby":"docsearch-label",id:"docsearch-input",autocomplete:"off",autocorrect:"off",autocapitalize:"off",enterkeyhint:"search",spellcheck:"false",autofocus:"true","onUpdate:modelValue":B[0]||(B[0]=E=>a.value=E),placeholder:$.value,maxlength:"64",type:"search",ref_key:"input",ref:c},null,8,za),[[Vt,a.value]])]),h("div",ja,[(r(!0),p(A,null,F(Y.value,(E,O)=>(r(),p("div",{class:"search-group",key:O},[h("span",Ua,M(O?O.toString()[0].toUpperCase()+O.toString().slice(1):"Home"),1),(r(!0),p(A,null,F(E,(G,ne)=>(r(),p("a",{href:i.value+G.link,key:G.id,onClick:De,onMouseenter:re=>b.value=G.id,class:C({"link-focused":b.value==G.id}),id:ne.toString()},[h("div",Ga,[h("span",Ra,M(G.link.includes("#")?"#":"▤"),1),h("div",xa,[h("h3",null,M(G.title),1),h("p",null,[h("div",{innerHTML:G.preview},null,8,Ka)])]),Wa])],42,qa))),128))]))),128))]),Ja],512)],544),[[Pt,o.value]])]))]),_:1}),h("div",{id:"docsearch",onClick:B[3]||(B[3]=E=>K())},[h("button",Xa,[h("span",Ya,[Qa,h("span",Za,M(P.value),1)]),h("span",ei,[h("span",{class:"DocSearch-Button-Key",ref_key:"metaKey",ref:s},"Meta",512),ti])])])])}}}),si=k({__name:"VPNavBarSocialLinks",setup(e){const{theme:t}=T();return(n,s)=>l(t).socialLinks?(r(),S(Oe,{key:0,class:"VPNavBarSocialLinks",links:l(t).socialLinks},null,8,["links"])):g("",!0)}}),oi=L(si,[["__scopeId","data-v-08b35e6f"]]),ai=["href","rel","target"],ii={key:1},ri={key:2},li=k({__name:"VPNavBarTitle",setup(e){const{site:t,theme:n}=T(),{hasSidebar:s}=X(),{currentLang:o}=ie(),a=V(()=>{var u;return typeof n.value.logoLink=="string"?n.value.logoLink:(u=n.value.logoLink)==null?void 0:u.link}),i=V(()=>{var u;return typeof n.value.logoLink=="string"||(u=n.value.logoLink)==null?void 0:u.rel}),c=V(()=>{var u;return typeof n.value.logoLink=="string"||(u=n.value.logoLink)==null?void 0:u.target});return(u,f)=>(r(),p("div",{class:C(["VPNavBarTitle",{"has-sidebar":l(s)}])},[h("a",{class:"title",href:a.value??l(Ce)(l(o).link),rel:i.value,target:c.value},[d(u.$slots,"nav-bar-title-before",{},void 0,!0),l(n).logo?(r(),S(he,{key:0,class:"logo",image:l(n).logo},null,8,["image"])):g("",!0),l(n).siteTitle?(r(),p("span",ii,M(l(n).siteTitle),1)):l(n).siteTitle===void 0?(r(),p("span",ri,M(l(t).title),1)):g("",!0),d(u.$slots,"nav-bar-title-after",{},void 0,!0)],8,ai)],2))}}),ci=L(li,[["__scopeId","data-v-dbe614b8"]]),ui={class:"items"},di={class:"title"},hi=k({__name:"VPNavBarTranslations",setup(e){const{theme:t}=T(),{localeLinks:n,currentLang:s}=ie({correspondingLink:!0});return(o,a)=>l(n).length&&l(s).label?(r(),S(Ee,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:l(t).langMenuLabel||"Change language"},{default:v(()=>[h("div",ui,[h("p",di,M(l(s).label),1),(r(!0),p(A,null,F(l(n),i=>(r(),S(be,{key:i.link,item:i},null,8,["item"]))),128))])]),_:1},8,["label"])):g("",!0)}}),pi=L(hi,[["__scopeId","data-v-dac637f3"]]),vi=e=>(z("data-v-48384a78"),e=e(),j(),e),fi={class:"wrapper"},mi={class:"container"},_i={class:"title"},gi={class:"content"},ki={class:"content-body"},$i=vi(()=>h("div",{class:"divider"},[h("div",{class:"divider-line"})],-1)),bi=k({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(e){const{y:t}=Ye(),{hasSidebar:n}=X(),{frontmatter:s}=T(),o=I({});return xe(()=>{o.value={"has-sidebar":n.value,home:s.value.layout==="home",top:t.value===0}}),(a,i)=>(r(),p("div",{class:C(["VPNavBar",o.value])},[h("div",fi,[h("div",mi,[h("div",_i,[y(ci,null,{"nav-bar-title-before":v(()=>[d(a.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[d(a.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),h("div",gi,[h("div",ki,[d(a.$slots,"nav-bar-content-before",{},void 0,!0),y(ni,{class:"search"}),y(va,{class:"menu"}),y(pi,{class:"translations"}),y(_o,{class:"appearance"}),y(oi,{class:"social-links"}),y(Zo,{class:"extra"}),d(a.$slots,"nav-bar-content-after",{},void 0,!0),y(aa,{class:"hamburger",active:a.isScreenOpen,onClick:i[0]||(i[0]=c=>a.$emit("toggle-screen"))},null,8,["active"])])])])]),$i],2))}}),yi=L(bi,[["__scopeId","data-v-48384a78"]]),Pi={key:0,class:"VPNavScreenAppearance"},Vi={class:"text"},Li=k({__name:"VPNavScreenAppearance",setup(e){const{site:t,theme:n}=T();return(s,o)=>l(t).appearance&&l(t).appearance!=="force-dark"?(r(),p("div",Pi,[h("p",Vi,M(l(n).darkModeSwitchLabel||"Appearance"),1),y(Be)])):g("",!0)}}),Si=L(Li,[["__scopeId","data-v-2836e9a8"]]),wi=k({__name:"VPNavScreenMenuLink",props:{item:{}},setup(e){const t=ke("close-screen");return(n,s)=>(r(),S(W,{class:"VPNavScreenMenuLink",href:n.item.link,target:n.item.target,rel:n.item.rel,onClick:l(t),innerHTML:n.item.text},null,8,["href","target","rel","onClick","innerHTML"]))}}),Ii=L(wi,[["__scopeId","data-v-077287e8"]]),Ti=k({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(e){const t=ke("close-screen");return(n,s)=>(r(),S(W,{class:"VPNavScreenMenuGroupLink",href:n.item.link,target:n.item.target,rel:n.item.rel,onClick:l(t)},{default:v(()=>[J(M(n.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}}),lt=L(Ti,[["__scopeId","data-v-ed7bb82d"]]),Ni={class:"VPNavScreenMenuGroupSection"},Mi={key:0,class:"title"},Ci=k({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(e){return(t,n)=>(r(),p("div",Ni,[t.text?(r(),p("p",Mi,M(t.text),1)):g("",!0),(r(!0),p(A,null,F(t.items,s=>(r(),S(lt,{key:s.text,item:s},null,8,["item"]))),128))]))}}),Ai=L(Ci,[["__scopeId","data-v-836cddb8"]]),Bi=e=>(z("data-v-43fd4ddf"),e=e(),j(),e),Hi=["aria-controls","aria-expanded"],Ei=["innerHTML"],Oi=Bi(()=>h("span",{class:"vpi-plus button-icon"},null,-1)),Di=["id"],Fi={key:1,class:"group"},zi=k({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(e){const t=e,n=I(!1),s=V(()=>`NavScreenGroup-${t.text.replace(" ","-").toLowerCase()}`);function o(){n.value=!n.value}return(a,i)=>(r(),p("div",{class:C(["VPNavScreenMenuGroup",{open:n.value}])},[h("button",{class:"button","aria-controls":s.value,"aria-expanded":n.value,onClick:o},[h("span",{class:"button-text",innerHTML:a.text},null,8,Ei),Oi],8,Hi),h("div",{id:s.value,class:"items"},[(r(!0),p(A,null,F(a.items,c=>(r(),p(A,{key:c.text},["link"in c?(r(),p("div",{key:c.text,class:"item"},[y(lt,{item:c},null,8,["item"])])):(r(),p("div",Fi,[y(Ai,{text:c.text,items:c.items},null,8,["text","items"])]))],64))),128))],8,Di)],2))}}),ji=L(zi,[["__scopeId","data-v-43fd4ddf"]]),Ui={key:0,class:"VPNavScreenMenu"},qi=k({__name:"VPNavScreenMenu",setup(e){const{theme:t}=T();return(n,s)=>l(t).nav?(r(),p("nav",Ui,[(r(!0),p(A,null,F(l(t).nav,o=>(r(),p(A,{key:o.text},["link"in o?(r(),S(Ii,{key:0,item:o},null,8,["item"])):(r(),S(ji,{key:1,text:o.text||"",items:o.items},null,8,["text","items"]))],64))),128))])):g("",!0)}}),Gi=k({__name:"VPNavScreenSocialLinks",setup(e){const{theme:t}=T();return(n,s)=>l(t).socialLinks?(r(),S(Oe,{key:0,class:"VPNavScreenSocialLinks",links:l(t).socialLinks},null,8,["links"])):g("",!0)}}),ct=e=>(z("data-v-0d43316b"),e=e(),j(),e),Ri=ct(()=>h("span",{class:"vpi-languages icon lang"},null,-1)),xi=ct(()=>h("span",{class:"vpi-chevron-down icon chevron"},null,-1)),Ki={class:"list"},Wi=k({__name:"VPNavScreenTranslations",setup(e){const{localeLinks:t,currentLang:n}=ie({correspondingLink:!0}),s=I(!1);function o(){s.value=!s.value}return(a,i)=>l(t).length&&l(n).label?(r(),p("div",{key:0,class:C(["VPNavScreenTranslations",{open:s.value}])},[h("button",{class:"title",onClick:o},[Ri,J(" "+M(l(n).label)+" ",1),xi]),h("ul",Ki,[(r(!0),p(A,null,F(l(t),c=>(r(),p("li",{key:c.link,class:"item"},[y(W,{class:"link",href:c.link},{default:v(()=>[J(M(c.text),1)]),_:2},1032,["href"])]))),128))])],2)):g("",!0)}}),Ji=L(Wi,[["__scopeId","data-v-0d43316b"]]),Xi={class:"container"},Yi=k({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(e){const t=I(null),n=Ze($e?document.body:null);return(s,o)=>(r(),S(Ne,{name:"fade",onEnter:o[0]||(o[0]=a=>n.value=!0),onAfterLeave:o[1]||(o[1]=a=>n.value=!1)},{default:v(()=>[s.open?(r(),p("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:t,id:"VPNavScreen"},[h("div",Xi,[d(s.$slots,"nav-screen-content-before",{},void 0,!0),y(qi,{class:"menu"}),y(Ji,{class:"translations"}),y(Si,{class:"appearance"}),y(Gi,{class:"social-links"}),d(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):g("",!0)]),_:3}))}}),Qi=L(Yi,[["__scopeId","data-v-5f4e75ae"]]),Zi={key:0,class:"VPNav"},er=k({__name:"VPNav",setup(e){const{isScreenOpen:t,closeScreen:n,toggleScreen:s}=oo(),{frontmatter:o}=T(),a=V(()=>o.value.navbar!==!1);return et("close-screen",n),me(()=>{$e&&document.documentElement.classList.toggle("hide-nav",!a.value)}),(i,c)=>a.value?(r(),p("header",Zi,[y(yi,{"is-screen-open":l(t),onToggleScreen:l(s)},{"nav-bar-title-before":v(()=>[d(i.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[d(i.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[d(i.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[d(i.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),y(Qi,{open:l(t)},{"nav-screen-content-before":v(()=>[d(i.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[d(i.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):g("",!0)}}),tr=L(er,[["__scopeId","data-v-a46e73f0"]]),ut=e=>(z("data-v-f2cc49b6"),e=e(),j(),e),nr=["role","tabindex"],sr=ut(()=>h("div",{class:"indicator"},null,-1)),or=ut(()=>h("span",{class:"vpi-chevron-right caret-icon"},null,-1)),ar=[or],ir={key:1,class:"items"},rr=k({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(e){const t=e,{collapsed:n,collapsible:s,isLink:o,isActiveLink:a,hasActiveLink:i,hasChildren:c,toggle:u}=Wt(V(()=>t.item)),f=V(()=>c.value?"section":"div"),_=V(()=>o.value?"a":"div"),m=V(()=>c.value?t.depth+2===7?"p":`h${t.depth+2}`:"p"),P=V(()=>o.value?void 0:"button"),$=V(()=>[[`level-${t.depth}`],{collapsible:s.value},{collapsed:n.value},{"is-link":o.value},{"is-active":a.value},{"has-active":i.value}]);function b(w){"key"in w&&w.key!=="Enter"||!t.item.link&&u()}function N(){t.item.link&&u()}return(w,U)=>{const D=Z("VPSidebarItem",!0);return r(),S(se(f.value),{class:C(["VPSidebarItem",$.value])},{default:v(()=>[w.item.text?(r(),p("div",ce({key:0,class:"item",role:P.value},wt(w.item.items?{click:b,keydown:b}:{},!0),{tabindex:w.item.items&&0}),[sr,w.item.link?(r(),S(W,{key:0,tag:_.value,class:"link",href:w.item.link,rel:w.item.rel,target:w.item.target},{default:v(()=>[(r(),S(se(m.value),{class:"text",innerHTML:w.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(r(),S(se(m.value),{key:1,class:"text",innerHTML:w.item.text},null,8,["innerHTML"])),w.item.collapsed!=null&&w.item.items&&w.item.items.length?(r(),p("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:N,onKeydown:St(N,["enter"]),tabindex:"0"},ar,32)):g("",!0)],16,nr)):g("",!0),w.item.items&&w.item.items.length?(r(),p("div",ir,[w.depth<5?(r(!0),p(A,{key:0},F(w.item.items,K=>(r(),S(D,{key:K.text,item:K,depth:w.depth+1},null,8,["item","depth"]))),128)):g("",!0)])):g("",!0)]),_:1},8,["class"])}}}),lr=L(rr,[["__scopeId","data-v-f2cc49b6"]]),dt=e=>(z("data-v-2667f5e2"),e=e(),j(),e),cr=dt(()=>h("div",{class:"curtain"},null,-1)),ur={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},dr=dt(()=>h("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),hr=k({__name:"VPSidebar",props:{open:{type:Boolean}},setup(e){const{sidebarGroups:t,hasSidebar:n}=X(),s=e,o=I(null),a=Ze($e?document.body:null);return Q([s,o],()=>{var i;s.open?(a.value=!0,(i=o.value)==null||i.focus()):a.value=!1},{immediate:!0,flush:"post"}),(i,c)=>l(n)?(r(),p("aside",{key:0,class:C(["VPSidebar",{open:i.open}]),ref_key:"navEl",ref:o,onClick:c[0]||(c[0]=Qe(()=>{},["stop"]))},[cr,h("nav",ur,[dr,d(i.$slots,"sidebar-nav-before",{},void 0,!0),(r(!0),p(A,null,F(l(t),u=>(r(),p("div",{key:u.text,class:"group"},[y(lr,{item:u,depth:0},null,8,["item"])]))),128)),d(i.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):g("",!0)}}),pr=L(hr,[["__scopeId","data-v-2667f5e2"]]),vr=k({__name:"VPSkipLink",setup(e){const t=ge(),n=I();Q(()=>t.path,()=>n.value.focus());function s({target:o}){const a=document.getElementById(decodeURIComponent(o.hash).slice(1));if(a){const i=()=>{a.removeAttribute("tabindex"),a.removeEventListener("blur",i)};a.setAttribute("tabindex","-1"),a.addEventListener("blur",i),a.focus(),window.scrollTo(0,0)}}return(o,a)=>(r(),p(A,null,[h("span",{ref_key:"backToTop",ref:n,tabindex:"-1"},null,512),h("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:s}," Skip to content ")],64))}}),fr=L(vr,[["__scopeId","data-v-b22defb4"]]),mr=k({__name:"Layout",setup(e){const{isOpen:t,open:n,close:s}=X(),o=ge();Q(()=>o.path,s),Kt(t,s);const{frontmatter:a}=T(),i=It(),c=V(()=>!!i["home-hero-image"]);return et("hero-image-slot-exists",c),(u,f)=>{const _=Z("Content");return l(a).layout!==!1?(r(),p("div",{key:0,class:C(["Layout",l(a).pageClass])},[d(u.$slots,"layout-top",{},void 0,!0),y(fr),y(Ct,{class:"backdrop",show:l(t),onClick:l(s)},null,8,["show","onClick"]),y(tr,null,{"nav-bar-title-before":v(()=>[d(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[d(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[d(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[d(u.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":v(()=>[d(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[d(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),y(so,{open:l(t),onOpenMenu:l(n)},null,8,["open","onOpenMenu"]),y(pr,{open:l(t)},{"sidebar-nav-before":v(()=>[d(u.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":v(()=>[d(u.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),y(Os,null,{"page-top":v(()=>[d(u.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[d(u.$slots,"page-bottom",{},void 0,!0)]),"not-found":v(()=>[d(u.$slots,"not-found",{},void 0,!0)]),"home-hero-before":v(()=>[d(u.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[d(u.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[d(u.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[d(u.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[d(u.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[d(u.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[d(u.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[d(u.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[d(u.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":v(()=>[d(u.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[d(u.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[d(u.$slots,"doc-after",{},void 0,!0)]),"doc-top":v(()=>[d(u.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[d(u.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":v(()=>[d(u.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[d(u.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[d(u.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[d(u.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[d(u.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[d(u.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),y(Us),d(u.$slots,"layout-bottom",{},void 0,!0)],2)):(r(),S(_,{key:1}))}}}),_r=L(mr,[["__scopeId","data-v-c4daae71"]]),kr={Layout:_r,enhanceApp:({app:e})=>{e.component("Badge",Tt)}};export{kr as t}; diff --git a/docs/document/assets/chunks/theme.LLaJeaxP.js b/docs/document/assets/chunks/theme.LLaJeaxP.js new file mode 100644 index 000000000..5490a2b52 --- /dev/null +++ b/docs/document/assets/chunks/theme.LLaJeaxP.js @@ -0,0 +1 @@ +import{d as k,c as h,r as p,n as A,o as i,a as ee,t as C,b as P,w as f,T as we,e as g,_ as V,u as Re,i as it,f as lt,g as he,h as S,j as d,k as c,l as te,m as Pe,p as T,q as J,s as fe,v as Q,x as Me,y as Ne,z as ct,A as ut,F as H,B as z,C as Z,D as We,E as ve,G as y,H as W,I as Ke,J as me,K as Y,L as _e,M as dt,N as Je,O as pt,P as Ie,Q as xe,R as ge,S as ht,U as ft,V as vt,W as Fe,X as mt,Y as Xe,Z as _t,$ as gt,a0 as Ye,a1 as Qe,a2 as kt,a3 as bt,a4 as $t,a5 as yt}from"./framework.CIzAx-5p.js";const Pt=k({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(n){return(e,t)=>(i(),h("span",{class:A(["VPBadge",e.type])},[p(e.$slots,"default",{},()=>[ee(C(e.text),1)])],2))}}),Lt={key:0,class:"VPBackdrop"},Vt=k({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(n){return(e,t)=>(i(),P(we,{name:"fade"},{default:f(()=>[e.show?(i(),h("div",Lt)):g("",!0)]),_:1}))}}),St=V(Vt,[["__scopeId","data-v-b2600058"]]),M=Re;function Tt(n,e){let t,s=!1;return()=>{t&&clearTimeout(t),s?t=setTimeout(n,e):(n(),(s=!0)&&setTimeout(()=>s=!1,e))}}function Le(n){return n.startsWith("/")?n:`/${n}`}function Ce(n){const{pathname:e,search:t,hash:s,protocol:o}=new URL(n,"http://a.com");if(it(n)||n.startsWith("#")||!o.startsWith("http")||!lt(e))return n;const{site:a}=M(),r=e.endsWith("/")||e.endsWith(".html")?n:n.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,a.value.cleanUrls?"":".html")}${t}${s}`);return he(r)}function ae({correspondingLink:n=!1}={}){const{site:e,localeIndex:t,page:s,theme:o,hash:a}=M(),r=S(()=>{var u,v;return{label:(u=e.value.locales[t.value])==null?void 0:u.label,link:((v=e.value.locales[t.value])==null?void 0:v.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:S(()=>Object.entries(e.value.locales).flatMap(([u,v])=>r.value.label===v.label?[]:{text:v.label,link:wt(v.link||(u==="root"?"/":`/${u}/`),o.value.i18nRouting!==!1&&n,s.value.relativePath.slice(r.value.link.length-1),!e.value.cleanUrls)+a.value})),currentLang:r}}function wt(n,e,t,s){return e?n.replace(/\/$/,"")+Le(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):n}const Mt={class:"NotFound"},Nt={class:"code"},It={class:"title"},Ct={class:"quote"},At={class:"action"},Ht=["href","aria-label"],Bt=k({__name:"NotFound",setup(n){const{theme:e}=M(),{currentLang:t}=ae();return(s,o)=>{var a,r,l,u,v;return i(),h("div",Mt,[d("p",Nt,C(((a=c(e).notFound)==null?void 0:a.code)??"404"),1),d("h1",It,C(((r=c(e).notFound)==null?void 0:r.title)??"PAGE NOT FOUND"),1),o[0]||(o[0]=d("div",{class:"divider"},null,-1)),d("blockquote",Ct,C(((l=c(e).notFound)==null?void 0:l.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",At,[d("a",{class:"link",href:c(he)(c(t).link),"aria-label":((u=c(e).notFound)==null?void 0:u.linkLabel)??"go to home"},C(((v=c(e).notFound)==null?void 0:v.linkText)??"Take me home"),9,Ht)])])}}}),Et=V(Bt,[["__scopeId","data-v-93fd8736"]]);function Ze(n,e){if(Array.isArray(n))return le(n);if(n==null)return[];e=Le(e);const t=Object.keys(n).sort((o,a)=>a.split("/").length-o.split("/").length).find(o=>e.startsWith(Le(o))),s=t?n[t]:[];return Array.isArray(s)?le(s):le(s.items,s.base)}function Ot(n){const e=[];let t=0;for(const s in n){const o=n[s];if(o.items){t=e.push(o);continue}e[t]||e.push({items:[]}),e[t].items.push(o)}return e}function Dt(n){const e=[];function t(s){for(const o of s)o.text&&o.link&&e.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&t(o.items)}return t(n),e}function Ve(n,e){return Array.isArray(e)?e.some(t=>Ve(n,t)):te(n,e.link)?!0:e.items?Ve(n,e.items):!1}function le(n,e){return[...n].map(t=>{const s={...t},o=s.base||e;return o&&s.link&&(s.link=o+s.link),s.items&&(s.items=le(s.items,o)),s})}function x(){const{frontmatter:n,page:e,theme:t}=M(),s=Pe("(min-width: 960px)"),o=T(!1),a=S(()=>{const N=t.value.sidebar,w=e.value.relativePath;return N?Ze(N,w):[]}),r=T(a.value);J(a,(N,w)=>{JSON.stringify(N)!==JSON.stringify(w)&&(r.value=a.value)});const l=S(()=>n.value.sidebar!==!1&&r.value.length>0&&n.value.layout!=="home"),u=S(()=>v?n.value.aside==null?t.value.aside==="left":n.value.aside==="left":!1),v=S(()=>n.value.layout==="home"?!1:n.value.aside!=null?!!n.value.aside:t.value.aside!==!1),_=S(()=>l.value&&s.value),m=S(()=>l.value?Ot(r.value):[]);function L(){o.value=!0}function b(){o.value=!1}function $(){o.value?b():L()}return{isOpen:o,sidebar:r,sidebarGroups:m,hasSidebar:l,hasAside:v,leftAside:u,isSidebarEnabled:_,open:L,close:b,toggle:$}}function Ft(n,e){let t;fe(()=>{t=n.value?document.activeElement:void 0}),Q(()=>{window.addEventListener("keyup",s)}),Me(()=>{window.removeEventListener("keyup",s)});function s(o){o.key==="Escape"&&n.value&&(e(),t==null||t.focus())}}function zt(n){const{page:e,hash:t}=M(),s=T(!1),o=S(()=>n.value.collapsed!=null),a=S(()=>!!n.value.link),r=T(!1),l=()=>{r.value=te(e.value.relativePath,n.value.link)};J([e,n,t],l),Q(l);const u=S(()=>r.value?!0:n.value.items?Ve(e.value.relativePath,n.value.items):!1),v=S(()=>!!(n.value.items&&n.value.items.length));fe(()=>{s.value=!!(o.value&&n.value.collapsed)}),Ne(()=>{(r.value||u.value)&&(s.value=!1)});function _(){o.value&&(s.value=!s.value)}return{collapsed:s,collapsible:o,isLink:a,isActiveLink:r,hasActiveLink:u,hasChildren:v,toggle:_}}function jt(){const{hasSidebar:n}=x(),e=Pe("(min-width: 960px)"),t=Pe("(min-width: 1280px)");return{isAsideEnabled:S(()=>!t.value&&!e.value?!1:n.value?t.value:e.value)}}const Ut=/\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/,Se=[];function et(n){return typeof n.outline=="object"&&!Array.isArray(n.outline)&&n.outline.label||n.outlineTitle||"On this page"}function Ae(n){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const s=Number(t.tagName[1]);return{element:t,title:qt(t),link:"#"+t.id,level:s}});return Gt(e,n)}function qt(n){let e="";for(const t of n.childNodes)if(t.nodeType===1){if(Ut.test(t.className))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function Gt(n,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[s,o]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;return Kt(n,s,o)}function Rt(n,e){const{isAsideEnabled:t}=jt(),s=Tt(a,100);let o=null;Q(()=>{requestAnimationFrame(a),window.addEventListener("scroll",s)}),ct(()=>{r(location.hash)}),Me(()=>{window.removeEventListener("scroll",s)});function a(){if(!t.value)return;const l=window.scrollY,u=window.innerHeight,v=document.body.offsetHeight,_=Math.abs(l+u-v)<1,m=Se.map(({element:b,link:$})=>({link:$,top:Wt(b)})).filter(({top:b})=>!Number.isNaN(b)).sort((b,$)=>b.top-$.top);if(!m.length){r(null);return}if(l<1){r(null);return}if(_){r(m[m.length-1].link);return}let L=null;for(const{link:b,top:$}of m){if($>l+ut()+4)break;L=b}r(L)}function r(l){o&&o.classList.remove("active"),l==null?o=null:o=n.value.querySelector(`a[href="${decodeURIComponent(l)}"]`);const u=o;u?(u.classList.add("active"),e.value.style.top=u.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function Wt(n){let e=0;for(;n!==document.body;){if(n===null)return NaN;e+=n.offsetTop,n=n.offsetParent}return e}function Kt(n,e,t){Se.length=0;const s=[],o=[];return n.forEach(a=>{const r={...a,children:[]};let l=o[o.length-1];for(;l&&l.level>=r.level;)o.pop(),l=o[o.length-1];if(r.element.classList.contains("ignore-header")||l&&"shouldIgnore"in l){o.push({level:r.level,shouldIgnore:!0});return}r.level>t||r.level{const o=Z("VPDocOutlineItem",!0);return i(),h("ul",{class:A(["VPDocOutlineItem",t.root?"root":"nested"])},[(i(!0),h(H,null,z(t.headers,({children:a,link:r,title:l})=>(i(),h("li",null,[d("a",{class:"outline-link",href:r,onClick:e,title:l},C(l),9,Jt),a!=null&&a.length?(i(),P(o,{key:0,headers:a},null,8,["headers"])):g("",!0)]))),256))],2)}}}),tt=V(xt,[["__scopeId","data-v-da421f78"]]),Xt={class:"content"},Yt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Qt=k({__name:"VPDocAsideOutline",setup(n){const{frontmatter:e,theme:t}=M(),s=We([]);ve(()=>{s.value=Ae(e.value.outline??t.value.outline)});const o=T(),a=T();return Rt(o,a),(r,l)=>(i(),h("nav",{"aria-labelledby":"doc-outline-aria-label",class:A(["VPDocAsideOutline",{"has-outline":s.value.length>0}]),ref_key:"container",ref:o},[d("div",Xt,[d("div",{class:"outline-marker",ref_key:"marker",ref:a},null,512),d("div",Yt,C(c(et)(c(t))),1),y(tt,{headers:s.value,root:!0},null,8,["headers"])])],2))}}),Zt=V(Qt,[["__scopeId","data-v-dfbd9fb8"]]),en={class:"VPDocAsideCarbonAds"},tn=k({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(n){const e=()=>null;return(t,s)=>(i(),h("div",en,[y(c(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),nn={class:"VPDocAside"},sn=k({__name:"VPDocAside",setup(n){const{theme:e}=M();return(t,s)=>(i(),h("div",nn,[p(t.$slots,"aside-top",{},void 0,!0),p(t.$slots,"aside-outline-before",{},void 0,!0),y(Zt),p(t.$slots,"aside-outline-after",{},void 0,!0),s[0]||(s[0]=d("div",{class:"spacer"},null,-1)),p(t.$slots,"aside-ads-before",{},void 0,!0),c(e).carbonAds?(i(),P(tn,{key:0,"carbon-ads":c(e).carbonAds},null,8,["carbon-ads"])):g("",!0),p(t.$slots,"aside-ads-after",{},void 0,!0),p(t.$slots,"aside-bottom",{},void 0,!0)]))}}),on=V(sn,[["__scopeId","data-v-79cae1a0"]]);function an(){const{theme:n,page:e}=M();return S(()=>{const{text:t="Edit this page",pattern:s=""}=n.value.editLink||{};let o;return typeof s=="function"?o=s(e.value):o=s.replace(/:path/g,e.value.filePath),{url:o,text:t}})}function rn(){const{page:n,theme:e,frontmatter:t}=M();return S(()=>{var v,_,m,L,b,$,N,w;const s=Ze(e.value.sidebar,n.value.relativePath),o=Dt(s),a=ln(o,O=>O.link.replace(/[?#].*$/,"")),r=a.findIndex(O=>te(n.value.relativePath,O.link)),l=((v=e.value.docFooter)==null?void 0:v.prev)===!1&&!t.value.prev||t.value.prev===!1,u=((_=e.value.docFooter)==null?void 0:_.next)===!1&&!t.value.next||t.value.next===!1;return{prev:l?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((m=a[r-1])==null?void 0:m.docFooterText)??((L=a[r-1])==null?void 0:L.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((b=a[r-1])==null?void 0:b.link)},next:u?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??(($=a[r+1])==null?void 0:$.docFooterText)??((N=a[r+1])==null?void 0:N.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((w=a[r+1])==null?void 0:w.link)}}})}function ln(n,e){const t=new Set;return n.filter(s=>{const o=e(s);return t.has(o)?!1:t.add(o)})}const K=k({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(n){const e=n,t=S(()=>e.tag??(e.href?"a":"span")),s=S(()=>e.href&&Ke.test(e.href)||e.target==="_blank");return(o,a)=>(i(),P(W(t.value),{class:A(["VPLink",{link:o.href,"vp-external-link-icon":s.value,"no-icon":o.noIcon}]),href:o.href?c(Ce)(o.href):void 0,target:o.target??(s.value?"_blank":void 0),rel:o.rel??(s.value?"noreferrer":void 0)},{default:f(()=>[p(o.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),cn={class:"VPLastUpdated"},un=["datetime"],dn=k({__name:"VPDocFooterLastUpdated",setup(n){const{theme:e,page:t,lang:s}=M(),o=S(()=>new Date(t.value.lastUpdated)),a=S(()=>o.value.toISOString()),r=T("");return Q(()=>{fe(()=>{var l,u,v;r.value=new Intl.DateTimeFormat((u=(l=e.value.lastUpdated)==null?void 0:l.formatOptions)!=null&&u.forceLocale?s.value:void 0,((v=e.value.lastUpdated)==null?void 0:v.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(o.value)})}),(l,u)=>{var v;return i(),h("p",cn,[ee(C(((v=c(e).lastUpdated)==null?void 0:v.text)||c(e).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:a.value},C(r.value),9,un)])}}}),pn=V(dn,[["__scopeId","data-v-e95db471"]]),hn={key:0,class:"VPDocFooter"},fn={key:0,class:"edit-info"},vn={key:0,class:"edit-link"},mn={key:1,class:"last-updated"},_n={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},gn={class:"pager"},kn=["innerHTML"],bn=["innerHTML"],$n={class:"pager"},yn=["innerHTML"],Pn=["innerHTML"],Ln=k({__name:"VPDocFooter",setup(n){const{theme:e,page:t,frontmatter:s}=M(),o=an(),a=rn(),r=S(()=>e.value.editLink&&s.value.editLink!==!1),l=S(()=>t.value.lastUpdated),u=S(()=>r.value||l.value||a.value.prev||a.value.next);return(v,_)=>{var m,L,b,$;return u.value?(i(),h("footer",hn,[p(v.$slots,"doc-footer-before",{},void 0,!0),r.value||l.value?(i(),h("div",fn,[r.value?(i(),h("div",vn,[y(K,{class:"edit-link-button",href:c(o).url,"no-icon":!0},{default:f(()=>[_[0]||(_[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),ee(" "+C(c(o).text),1)]),_:1},8,["href"])])):g("",!0),l.value?(i(),h("div",mn,[y(pn)])):g("",!0)])):g("",!0),(m=c(a).prev)!=null&&m.link||(L=c(a).next)!=null&&L.link?(i(),h("nav",_n,[_[1]||(_[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",gn,[(b=c(a).prev)!=null&&b.link?(i(),P(K,{key:0,class:"pager-link prev",href:c(a).prev.link},{default:f(()=>{var N;return[d("span",{class:"desc",innerHTML:((N=c(e).docFooter)==null?void 0:N.prev)||"Previous page"},null,8,kn),d("span",{class:"title",innerHTML:c(a).prev.text},null,8,bn)]}),_:1},8,["href"])):g("",!0)]),d("div",$n,[($=c(a).next)!=null&&$.link?(i(),P(K,{key:0,class:"pager-link next",href:c(a).next.link},{default:f(()=>{var N;return[d("span",{class:"desc",innerHTML:((N=c(e).docFooter)==null?void 0:N.next)||"Next page"},null,8,yn),d("span",{class:"title",innerHTML:c(a).next.text},null,8,Pn)]}),_:1},8,["href"])):g("",!0)])])):g("",!0)])):g("",!0)}}}),Vn=V(Ln,[["__scopeId","data-v-07d71ff1"]]),Sn={class:"container"},Tn={class:"aside-container"},wn={class:"aside-content"},Mn={class:"content"},Nn={class:"content-container"},In={class:"main"},Cn=k({__name:"VPDoc",setup(n){const{theme:e}=M(),t=me(),{hasSidebar:s,hasAside:o,leftAside:a}=x(),r=S(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(l,u)=>{const v=Z("Content");return i(),h("div",{class:A(["VPDoc",{"has-sidebar":c(s),"has-aside":c(o)}])},[p(l.$slots,"doc-top",{},void 0,!0),d("div",Sn,[c(o)?(i(),h("div",{key:0,class:A(["aside",{"left-aside":c(a)}])},[u[0]||(u[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",Tn,[d("div",wn,[y(on,null,{"aside-top":f(()=>[p(l.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[p(l.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[p(l.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(l.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(l.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(l.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):g("",!0),d("div",Mn,[d("div",Nn,[p(l.$slots,"doc-before",{},void 0,!0),d("main",In,[y(v,{class:A(["vp-doc",[r.value,c(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),y(Vn,null,{"doc-footer-before":f(()=>[p(l.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),p(l.$slots,"doc-after",{},void 0,!0)])])]),p(l.$slots,"doc-bottom",{},void 0,!0)],2)}}}),An=V(Cn,[["__scopeId","data-v-ef3a4dda"]]),Hn=k({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(n){const e=n,t=S(()=>e.href&&Ke.test(e.href)),s=S(()=>e.tag||(e.href?"a":"button"));return(o,a)=>(i(),P(W(s.value),{class:A(["VPButton",[o.size,o.theme]]),href:o.href?c(Ce)(o.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:f(()=>[ee(C(o.text),1)]),_:1},8,["class","href","target","rel"]))}}),Bn=V(Hn,[["__scopeId","data-v-b20c43c2"]]),En=["src","alt"],On=k({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(n){return(e,t)=>{const s=Z("VPImage",!0);return e.image?(i(),h(H,{key:0},[typeof e.image=="string"||"src"in e.image?(i(),h("img",Y({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:c(he)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,En)):(i(),h(H,{key:1},[y(s,Y({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),y(s,Y({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):g("",!0)}}}),ue=V(On,[["__scopeId","data-v-4d414b82"]]),Dn={class:"container"},Fn={class:"main"},zn={class:"heading"},jn=["innerHTML"],Un=["innerHTML"],qn=["innerHTML"],Gn={key:0,class:"actions"},Rn={key:0,class:"image"},Wn={class:"image-container"},Kn=k({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(n){const e=_e("hero-image-slot-exists");return(t,s)=>(i(),h("div",{class:A(["VPHero",{"has-image":t.image||c(e)}])},[d("div",Dn,[d("div",Fn,[p(t.$slots,"home-hero-info-before",{},void 0,!0),p(t.$slots,"home-hero-info",{},()=>[d("h1",zn,[t.name?(i(),h("span",{key:0,innerHTML:t.name,class:"name clip"},null,8,jn)):g("",!0),t.text?(i(),h("span",{key:1,innerHTML:t.text,class:"text"},null,8,Un)):g("",!0)]),t.tagline?(i(),h("p",{key:0,innerHTML:t.tagline,class:"tagline"},null,8,qn)):g("",!0)],!0),p(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(i(),h("div",Gn,[(i(!0),h(H,null,z(t.actions,o=>(i(),h("div",{key:o.link,class:"action"},[y(Bn,{tag:"a",size:"medium",theme:o.theme,text:o.text,href:o.link,target:o.target,rel:o.rel},null,8,["theme","text","href","target","rel"])]))),128))])):g("",!0),p(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||c(e)?(i(),h("div",Rn,[d("div",Wn,[s[0]||(s[0]=d("div",{class:"image-bg"},null,-1)),p(t.$slots,"home-hero-image",{},()=>[t.image?(i(),P(ue,{key:0,class:"image-src",image:t.image},null,8,["image"])):g("",!0)],!0)])])):g("",!0)])],2))}}),Jn=V(Kn,[["__scopeId","data-v-d266baba"]]),xn=k({__name:"VPHomeHero",setup(n){const{frontmatter:e}=M();return(t,s)=>c(e).hero?(i(),P(Jn,{key:0,class:"VPHomeHero",name:c(e).hero.name,text:c(e).hero.text,tagline:c(e).hero.tagline,image:c(e).hero.image,actions:c(e).hero.actions},{"home-hero-info-before":f(()=>[p(t.$slots,"home-hero-info-before")]),"home-hero-info":f(()=>[p(t.$slots,"home-hero-info")]),"home-hero-info-after":f(()=>[p(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":f(()=>[p(t.$slots,"home-hero-actions-after")]),"home-hero-image":f(()=>[p(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):g("",!0)}}),Xn={class:"box"},Yn={key:0,class:"icon"},Qn=["innerHTML"],Zn=["innerHTML"],es=["innerHTML"],ts={key:4,class:"link-text"},ns={class:"link-text-value"},ss=k({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(n){return(e,t)=>(i(),P(K,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:f(()=>[d("article",Xn,[typeof e.icon=="object"&&e.icon.wrap?(i(),h("div",Yn,[y(ue,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(i(),P(ue,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(i(),h("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Qn)):g("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Zn),e.details?(i(),h("p",{key:3,class:"details",innerHTML:e.details},null,8,es)):g("",!0),e.linkText?(i(),h("div",ts,[d("p",ns,[ee(C(e.linkText)+" ",1),t[0]||(t[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):g("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),os=V(ss,[["__scopeId","data-v-95001937"]]),as={key:0,class:"VPFeatures"},rs={class:"container"},is={class:"items"},ls=k({__name:"VPFeatures",props:{features:{}},setup(n){const e=n,t=S(()=>{const s=e.features.length;if(s){if(s===2)return"grid-2";if(s===3)return"grid-3";if(s%3===0)return"grid-6";if(s>3)return"grid-4"}else return});return(s,o)=>s.features?(i(),h("div",as,[d("div",rs,[d("div",is,[(i(!0),h(H,null,z(s.features,a=>(i(),h("div",{key:a.title,class:A(["item",[t.value]])},[y(os,{icon:a.icon,title:a.title,details:a.details,link:a.link,"link-text":a.linkText,rel:a.rel,target:a.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):g("",!0)}}),cs=V(ls,[["__scopeId","data-v-1da4ff3d"]]),us=k({__name:"VPHomeFeatures",setup(n){const{frontmatter:e}=M();return(t,s)=>c(e).features?(i(),P(cs,{key:0,class:"VPHomeFeatures",features:c(e).features},null,8,["features"])):g("",!0)}}),ds=k({__name:"VPHomeContent",setup(n){const{width:e}=dt({initialWidth:0,includeScrollbar:!1});return(t,s)=>(i(),h("div",{class:"vp-doc container",style:Je(c(e)?{"--vp-offset":`calc(50% - ${c(e)/2}px)`}:{})},[p(t.$slots,"default",{},void 0,!0)],4))}}),ps=V(ds,[["__scopeId","data-v-2498cc33"]]),hs=k({__name:"VPHome",setup(n){const{frontmatter:e,theme:t}=M();return(s,o)=>{const a=Z("Content");return i(),h("div",{class:A(["VPHome",{"external-link-icon-enabled":c(t).externalLinkIcon}])},[p(s.$slots,"home-hero-before",{},void 0,!0),y(xn,null,{"home-hero-info-before":f(()=>[p(s.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(s.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(s.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(s.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(s.$slots,"home-hero-image",{},void 0,!0)]),_:3}),p(s.$slots,"home-hero-after",{},void 0,!0),p(s.$slots,"home-features-before",{},void 0,!0),y(us),p(s.$slots,"home-features-after",{},void 0,!0),c(e).markdownStyles!==!1?(i(),P(ps,{key:0},{default:f(()=>[y(a)]),_:1})):(i(),P(a,{key:1}))],2)}}}),fs=V(hs,[["__scopeId","data-v-8b59c434"]]),vs={},ms={class:"VPPage"};function _s(n,e){const t=Z("Content");return i(),h("div",ms,[p(n.$slots,"page-top"),y(t),p(n.$slots,"page-bottom")])}const gs=V(vs,[["render",_s]]),ks=k({__name:"VPContent",setup(n){const{page:e,frontmatter:t}=M(),{hasSidebar:s}=x();return(o,a)=>(i(),h("div",{class:A(["VPContent",{"has-sidebar":c(s),"is-home":c(t).layout==="home"}]),id:"VPContent"},[c(e).isNotFound?p(o.$slots,"not-found",{key:0},()=>[y(Et)],!0):c(t).layout==="page"?(i(),P(gs,{key:1},{"page-top":f(()=>[p(o.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[p(o.$slots,"page-bottom",{},void 0,!0)]),_:3})):c(t).layout==="home"?(i(),P(fs,{key:2},{"home-hero-before":f(()=>[p(o.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[p(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(o.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[p(o.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[p(o.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[p(o.$slots,"home-features-after",{},void 0,!0)]),_:3})):c(t).layout&&c(t).layout!=="doc"?(i(),P(W(c(t).layout),{key:3})):(i(),P(An,{key:4},{"doc-top":f(()=>[p(o.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[p(o.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":f(()=>[p(o.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[p(o.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[p(o.$slots,"doc-after",{},void 0,!0)]),"aside-top":f(()=>[p(o.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":f(()=>[p(o.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(o.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(o.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(o.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":f(()=>[p(o.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),bs=V(ks,[["__scopeId","data-v-d2aef184"]]),$s={class:"container"},ys=["innerHTML"],Ps=["innerHTML"],Ls=k({__name:"VPFooter",setup(n){const{theme:e,frontmatter:t}=M(),{hasSidebar:s}=x();return(o,a)=>c(e).footer&&c(t).footer!==!1?(i(),h("footer",{key:0,class:A(["VPFooter",{"has-sidebar":c(s)}])},[d("div",$s,[c(e).footer.message?(i(),h("p",{key:0,class:"message",innerHTML:c(e).footer.message},null,8,ys)):g("",!0),c(e).footer.copyright?(i(),h("p",{key:1,class:"copyright",innerHTML:c(e).footer.copyright},null,8,Ps)):g("",!0)])],2)):g("",!0)}}),Vs=V(Ls,[["__scopeId","data-v-e3157d6d"]]);function Ss(){const{theme:n,frontmatter:e}=M(),t=We([]),s=S(()=>t.value.length>0);return ve(()=>{t.value=Ae(e.value.outline??n.value.outline)}),{headers:t,hasLocalNav:s}}const Ts={class:"menu-text"},ws={class:"header"},Ms={class:"outline"},Ns=k({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(n){const e=n,{theme:t}=M(),s=T(!1),o=T(0),a=T(),r=T();function l(m){var L;(L=a.value)!=null&&L.contains(m.target)||(s.value=!1)}J(s,m=>{if(m){document.addEventListener("click",l);return}document.removeEventListener("click",l)}),pt("Escape",()=>{s.value=!1}),ve(()=>{s.value=!1});function u(){s.value=!s.value,o.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function v(m){m.target.classList.contains("outline-link")&&(r.value&&(r.value.style.transition="none"),Ie(()=>{s.value=!1}))}function _(){s.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(m,L)=>(i(),h("div",{class:"VPLocalNavOutlineDropdown",style:Je({"--vp-vh":o.value+"px"}),ref_key:"main",ref:a},[m.headers.length>0?(i(),h("button",{key:0,onClick:u,class:A({open:s.value})},[d("span",Ts,C(c(et)(c(t))),1),L[0]||(L[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(i(),h("button",{key:1,onClick:_},C(c(t).returnToTopLabel||"Return to top"),1)),y(we,{name:"flyout"},{default:f(()=>[s.value?(i(),h("div",{key:0,ref_key:"items",ref:r,class:"items",onClick:v},[d("div",ws,[d("a",{class:"top-link",href:"#",onClick:_},C(c(t).returnToTopLabel||"Return to top"),1)]),d("div",Ms,[y(tt,{headers:m.headers},null,8,["headers"])])],512)):g("",!0)]),_:1})],4))}}),Is=V(Ns,[["__scopeId","data-v-d61422fe"]]),Cs={class:"container"},As=["aria-expanded"],Hs={class:"menu-text"},Bs=k({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(n){const{theme:e,frontmatter:t}=M(),{hasSidebar:s}=x(),{headers:o}=Ss(),{y:a}=xe(),r=T(0);Q(()=>{r.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),ve(()=>{o.value=Ae(t.value.outline??e.value.outline)});const l=S(()=>o.value.length===0),u=S(()=>l.value&&!s.value),v=S(()=>({VPLocalNav:!0,"has-sidebar":s.value,empty:l.value,fixed:u.value}));return(_,m)=>c(t).layout!=="home"&&(!u.value||c(a)>=r.value)?(i(),h("div",{key:0,class:A(v.value)},[d("div",Cs,[c(s)?(i(),h("button",{key:0,class:"menu","aria-expanded":_.open,"aria-controls":"VPSidebarNav",onClick:m[0]||(m[0]=L=>_.$emit("open-menu"))},[m[1]||(m[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",Hs,C(c(e).sidebarMenuLabel||"Menu"),1)],8,As)):g("",!0),y(Is,{headers:c(o),navHeight:r.value},null,8,["headers","navHeight"])])],2)):g("",!0)}}),Es=V(Bs,[["__scopeId","data-v-9d8129cc"]]);function Os(){const n=T(!1);function e(){n.value=!0,window.addEventListener("resize",o)}function t(){n.value=!1,window.removeEventListener("resize",o)}function s(){n.value?t():e()}function o(){window.outerWidth>=768&&t()}const a=me();return J(()=>a.path,t),{isScreenOpen:n,openScreen:e,closeScreen:t,toggleScreen:s}}const Ds={},Fs={class:"VPSwitch",type:"button",role:"switch"},zs={class:"check"},js={key:0,class:"icon"};function Us(n,e){return i(),h("button",Fs,[d("span",zs,[n.$slots.default?(i(),h("span",js,[p(n.$slots,"default",{},void 0,!0)])):g("",!0)])])}const qs=V(Ds,[["render",Us],["__scopeId","data-v-7012e5dd"]]),Gs=k({__name:"VPSwitchAppearance",setup(n){const{isDark:e,theme:t}=M(),s=_e("toggle-appearance",()=>{e.value=!e.value}),o=T("");return Ne(()=>{o.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(a,r)=>(i(),P(qs,{title:o.value,class:"VPSwitchAppearance","aria-checked":c(e),onClick:c(s)},{default:f(()=>r[0]||(r[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])),_:1},8,["title","aria-checked","onClick"]))}}),He=V(Gs,[["__scopeId","data-v-fa1daf57"]]),Rs={key:0,class:"VPNavBarAppearance"},Ws=k({__name:"VPNavBarAppearance",setup(n){const{site:e}=M();return(t,s)=>c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",Rs,[y(He)])):g("",!0)}}),Ks=V(Ws,[["__scopeId","data-v-123fcb2f"]]),Be=T();let nt=!1,be=0;function Js(n){const e=T(!1);if(ge){!nt&&xs(),be++;const t=J(Be,s=>{var o,a,r;s===n.el.value||(o=n.el.value)!=null&&o.contains(s)?(e.value=!0,(a=n.onFocus)==null||a.call(n)):(e.value=!1,(r=n.onBlur)==null||r.call(n))});Me(()=>{t(),be--,be||Xs()})}return ht(e)}function xs(){document.addEventListener("focusin",st),nt=!0,Be.value=document.activeElement}function Xs(){document.removeEventListener("focusin",st)}function st(){Be.value=document.activeElement}const Ys={class:"VPMenuLink"},Qs=["innerHTML"],Zs=k({__name:"VPMenuLink",props:{item:{}},setup(n){const{page:e}=M();return(t,s)=>(i(),h("div",Ys,[y(K,{class:A({active:c(te)(c(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Qs)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),ke=V(Zs,[["__scopeId","data-v-65e4a6b1"]]),eo={class:"VPMenuGroup"},to={key:0,class:"title"},no=k({__name:"VPMenuGroup",props:{text:{},items:{}},setup(n){return(e,t)=>(i(),h("div",eo,[e.text?(i(),h("p",to,C(e.text),1)):g("",!0),(i(!0),h(H,null,z(e.items,s=>(i(),h(H,null,["link"in s?(i(),P(ke,{key:0,item:s},null,8,["item"])):g("",!0)],64))),256))]))}}),so=V(no,[["__scopeId","data-v-2bec9359"]]),oo={class:"VPMenu"},ao={key:0,class:"items"},ro=k({__name:"VPMenu",props:{items:{}},setup(n){return(e,t)=>(i(),h("div",oo,[e.items?(i(),h("div",ao,[(i(!0),h(H,null,z(e.items,s=>(i(),h(H,{key:JSON.stringify(s)},["link"in s?(i(),P(ke,{key:0,item:s},null,8,["item"])):"component"in s?(i(),P(W(s.component),Y({key:1,ref_for:!0},s.props),null,16)):(i(),P(so,{key:2,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):g("",!0),p(e.$slots,"default",{},void 0,!0)]))}}),io=V(ro,[["__scopeId","data-v-39eca401"]]),lo=["aria-expanded","aria-label"],co={key:0,class:"text"},uo=["innerHTML"],po={key:1,class:"vpi-more-horizontal icon"},ho={class:"menu"},fo=k({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(n){const e=T(!1),t=T();Js({el:t,onBlur:s});function s(){e.value=!1}return(o,a)=>(i(),h("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:a[1]||(a[1]=r=>e.value=!0),onMouseleave:a[2]||(a[2]=r=>e.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":o.label,onClick:a[0]||(a[0]=r=>e.value=!e.value)},[o.button||o.icon?(i(),h("span",co,[o.icon?(i(),h("span",{key:0,class:A([o.icon,"option-icon"])},null,2)):g("",!0),o.button?(i(),h("span",{key:1,innerHTML:o.button},null,8,uo)):g("",!0),a[3]||(a[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(i(),h("span",po))],8,lo),d("div",ho,[y(io,{items:o.items},{default:f(()=>[p(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),Ee=V(fo,[["__scopeId","data-v-40e55da0"]]),vo=["href","aria-label","innerHTML"],mo=k({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(n){const e=n,t=T();Q(async()=>{var a;await Ie();const o=(a=t.value)==null?void 0:a.children[0];o instanceof HTMLElement&&o.className.startsWith("vpi-social-")&&(getComputedStyle(o).maskImage||getComputedStyle(o).webkitMaskImage)==="none"&&o.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${e.icon}.svg')`)});const s=S(()=>typeof e.icon=="object"?e.icon.svg:``);return(o,a)=>(i(),h("a",{ref_key:"el",ref:t,class:"VPSocialLink no-icon",href:o.link,"aria-label":o.ariaLabel??(typeof o.icon=="string"?o.icon:""),target:"_blank",rel:"noopener",innerHTML:s.value},null,8,vo))}}),_o=V(mo,[["__scopeId","data-v-fbf39218"]]),go={class:"VPSocialLinks"},ko=k({__name:"VPSocialLinks",props:{links:{}},setup(n){return(e,t)=>(i(),h("div",go,[(i(!0),h(H,null,z(e.links,({link:s,icon:o,ariaLabel:a})=>(i(),P(_o,{key:s,icon:o,link:s,ariaLabel:a},null,8,["icon","link","ariaLabel"]))),128))]))}}),Oe=V(ko,[["__scopeId","data-v-f2234a39"]]),bo={key:0,class:"group translations"},$o={class:"trans-title"},yo={key:1,class:"group"},Po={class:"item appearance"},Lo={class:"label"},Vo={class:"appearance-action"},So={key:2,class:"group"},To={class:"item social-links"},wo=k({__name:"VPNavBarExtra",setup(n){const{site:e,theme:t}=M(),{localeLinks:s,currentLang:o}=ae({correspondingLink:!0}),a=S(()=>s.value.length&&o.value.label||e.value.appearance||t.value.socialLinks);return(r,l)=>a.value?(i(),P(Ee,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:f(()=>[c(s).length&&c(o).label?(i(),h("div",bo,[d("p",$o,C(c(o).label),1),(i(!0),h(H,null,z(c(s),u=>(i(),P(ke,{key:u.link,item:u},null,8,["item"]))),128))])):g("",!0),c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",yo,[d("div",Po,[d("p",Lo,C(c(t).darkModeSwitchLabel||"Appearance"),1),d("div",Vo,[y(He)])])])):g("",!0),c(t).socialLinks?(i(),h("div",So,[d("div",To,[y(Oe,{class:"social-links-list",links:c(t).socialLinks},null,8,["links"])])])):g("",!0)]),_:1})):g("",!0)}}),Mo=V(wo,[["__scopeId","data-v-0c845e5d"]]),No=["aria-expanded"],Io=k({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(n){return(e,t)=>(i(),h("button",{type:"button",class:A(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=s=>e.$emit("click"))},t[1]||(t[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)]),10,No))}}),Co=V(Io,[["__scopeId","data-v-670493dd"]]),Ao=["innerHTML"],Ho=k({__name:"VPNavBarMenuLink",props:{item:{}},setup(n){const{page:e}=M();return(t,s)=>(i(),P(K,{class:A({VPNavBarMenuLink:!0,active:c(te)(c(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,tabindex:"0"},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ao)]),_:1},8,["class","href","target","rel","no-icon"]))}}),Bo=V(Ho,[["__scopeId","data-v-8dbce4d0"]]),Eo=k({__name:"VPNavBarMenuGroup",props:{item:{}},setup(n){const e=n,{page:t}=M(),s=a=>"component"in a?!1:"link"in a?te(t.value.relativePath,a.link,!!e.item.activeMatch):a.items.some(s),o=S(()=>s(e.item));return(a,r)=>(i(),P(Ee,{class:A({VPNavBarMenuGroup:!0,active:c(te)(c(t).relativePath,a.item.activeMatch,!!a.item.activeMatch)||o.value}),button:a.item.text,items:a.item.items},null,8,["class","button","items"]))}}),Oo={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Do=k({__name:"VPNavBarMenu",setup(n){const{theme:e}=M();return(t,s)=>c(e).nav?(i(),h("nav",Oo,[s[0]||(s[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(i(!0),h(H,null,z(c(e).nav,o=>(i(),h(H,{key:JSON.stringify(o)},["link"in o?(i(),P(Bo,{key:0,item:o},null,8,["item"])):"component"in o?(i(),P(W(o.component),Y({key:1,ref_for:!0},o.props),null,16)):(i(),P(Eo,{key:2,item:o},null,8,["item"]))],64))),128))])):g("",!0)}}),Fo=V(Do,[["__scopeId","data-v-5bacfe89"]]),zo="/document/assets/flex-logo.BJA2J7hW.svg";function $e(n,e){return typeof n>"u"?e:n}function ze(n){const e=Array(n);for(let t=0;t=this.minlength&&(l||!r[_])){let L=ie(u,o,v),b="";switch(this.tokenize){case"full":if(3$;N--)if(N-$>=this.minlength){const w=ie(u,o,v,m,$);b=_.substring($,N),this.push_index(r,b,w,n,t)}break}case"reverse":if(2=this.minlength){const N=ie(u,o,v,m,$);this.push_index(r,b,N,n,t)}b=""}case"forward":if(1=this.minlength&&this.push_index(r,b,L,n,t);break}default:if(this.boost&&(L=Math.min(0|L/this.boost(e,_,v),u-1)),this.push_index(r,_,L,n,t),l&&1=this.minlength&&!$[_]){$[_]=1;const R=ie(N+(o/2>N?0:1),o,v,O-1,F-1),X=this.bidirectional&&_>w;this.push_index(a,X?w:_,R,n,t,X?_:w)}}}}}this.fastupdate||(this.register[n]=1)}}return this};function ie(n,e,t,s,o){return t&&1=this.minlength&&!m[b]){if(!this.optimize&&!a&&!this.map[b])return r;L[N++]=b,m[b]=1}n=L,s=n.length}if(!s)return r;e||(e=100);let u,v=this.depth&&1=t)))));b++);if(v)return o?qe(l,t,0):void(n[n.length]=l)}return!e&&l};function qe(n,e,t){return n=n.length===1?n[0]:Uo(n),t||n.length>e?n.slice(t,t+e):n}function Ge(n,e,t,s){if(t){const o=s&&e>t;n=n[o?e:t],n=n&&n[o?t:e]}else n=n[e];return n}q.prototype.contain=function(n){return!!this.register[n]},q.prototype.update=function(n,e){return this.remove(n).add(n,e)},q.prototype.remove=function(n,e){const t=this.register[n];if(t){if(this.fastupdate)for(let s,o=0;o{if(a.value){for(var B=m.value.search(a.value,{enrich:!0}),I=[],j=0;j!B||!B.length?[]:B.reduce((j,E)=>(j[I(E)]||(j[I(E)]=[]),j[I(E)].push(E),j),{}),R=()=>{setTimeout(()=>{l.value&&l.value.focus()},100),De(),o.value=!0};Q(async()=>{var E,D;const B=await vt(()=>import("./virtual_search-data.z0DSvrjA.js"),[]);u.value=B.default.INDEX_DATA,v.value=B.default.PREVIEW_LOOKUP,_.value=B.default.Options,r.value=window.location.origin+he(t.value==="root"?"/":t.value),L.value=((E=_.value)==null?void 0:E.buttonLabel)||L.value,b.value=((D=_.value)==null?void 0:D.placeholder)||b.value;var I=new q(_.value);I.import("reg",u.value.reg),I.import("cfg",u.value.cfg),I.import("map",u.value.map),I.import("ctx",u.value.ctx),m.value=I,s.value.innerHTML=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"⌘":"Ctrl";const j=U=>{var se;U.key==="k"&&(U.ctrlKey||U.metaKey)&&(U.preventDefault(),R()),U.key==="Escape"&&((se=a.value)==null?void 0:se.length)==0&&o.value&&(o.value=!1)};window.addEventListener("keydown",j)});const X=S(()=>F(O.value,B=>B.link.split("/").slice(0,-1).join("-"))),ne=S(()=>Object.values(X.value).flat().map(B=>B.id));function De(){o.value=!1,a.value=""}const at=B=>{var I,j;if(document.getElementsByClassName("search-group")[0]){if(B.key=="ArrowUp"||B.key=="ArrowDown"){const E=ne.value.indexOf($.value);if(B.key=="ArrowUp"){const D=E==0?ne.value.length-1:E-1;$.value=ne.value[D]}if(B.key=="ArrowDown"){const D=E>ne.value.length-2?0:E+1;$.value=ne.value[D]}if(E<5){const D=N.value.getElementsByClassName("VPPluginSearch-search-group")[0];D==null||D.scrollIntoView(!0)}else(I=document.getElementById(ne.value[$.value]))==null||I.scrollIntoView(!0);Ie()}B.key=="Enter"&&w.go(e.site.value.base+((j=N.value.getElementsByClassName("link-focused")[0].getAttribute("href"))==null?void 0:j.replace(r.value,"")))}};return(B,I)=>{const j=Z("ClientOnly");return i(),h("div",la,[y(j,null,{default:f(()=>[(i(),P(gt,{to:"body"},[Fe(d("div",{class:"VPPluginSearch-modal-back",onClick:I[2]||(I[2]=E=>o.value=!1),onKeydown:at},[d("div",{class:"VPPluginSearch-modal",onClick:I[1]||(I[1]=Xe(()=>{},["stop"])),ref_key:"modal",ref:N},[d("form",ca,[I[4]||(I[4]=d("label",{class:"DocSearch-MagnifierLabel",for:"docsearch-input",id:"docsearch-label"},[d("svg",{width:"20",height:"20",class:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},[d("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),Fe(d("input",{class:"DocSearch-Input","aria-autocomplete":"both","aria-labelledby":"docsearch-label",id:"docsearch-input",autocomplete:"off",autocorrect:"off",autocapitalize:"off",enterkeyhint:"search",spellcheck:"false",autofocus:"true","onUpdate:modelValue":I[0]||(I[0]=E=>a.value=E),placeholder:b.value,maxlength:"64",type:"search",ref_key:"input",ref:l},null,8,ua),[[_t,a.value]])]),d("div",da,[(i(!0),h(H,null,z(X.value,(E,D)=>(i(),h("div",{class:"search-group",key:D},[d("span",pa,C(D?D.toString()[0].toUpperCase()+D.toString().slice(1):"Home"),1),(i(!0),h(H,null,z(E,(U,se)=>(i(),h("a",{href:r.value+U.link,key:U.id,onClick:De,onMouseenter:re=>$.value=U.id,class:A({"link-focused":$.value==U.id}),id:se.toString()},[d("div",fa,[d("span",va,C(U.link.includes("#")?"#":"▤"),1),d("div",ma,[d("h3",null,C(U.title),1),d("p",null,[d("div",{innerHTML:U.preview},null,8,_a)])]),I[5]||(I[5]=d("span",{class:"VPPluginSearch-search-item-icon"},"↪",-1))])],42,ha))),128))]))),128))]),I[6]||(I[6]=d("img",{class:"VPPluginSearch-flex-logo",src:zo,alt:"flex logo"},null,-1))],512)],544),[[mt,o.value]])]))]),_:1}),d("div",{id:"docsearch",onClick:I[3]||(I[3]=E=>R())},[d("button",ga,[d("span",ka,[I[7]||(I[7]=d("svg",{width:"20",height:"20",class:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},[d("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),d("span",ba,C(L.value),1)]),d("span",$a,[d("span",{class:"DocSearch-Button-Key",ref_key:"metaKey",ref:s},"Meta",512),I[8]||(I[8]=d("span",{class:"DocSearch-Button-Key"},"K",-1))])])])])}}}),Pa=k({__name:"VPNavBarSocialLinks",setup(n){const{theme:e}=M();return(t,s)=>c(e).socialLinks?(i(),P(Oe,{key:0,class:"VPNavBarSocialLinks",links:c(e).socialLinks},null,8,["links"])):g("",!0)}}),La=V(Pa,[["__scopeId","data-v-08b35e6f"]]),Va=["href","rel","target"],Sa=["innerHTML"],Ta={key:2},wa=k({__name:"VPNavBarTitle",setup(n){const{site:e,theme:t}=M(),{hasSidebar:s}=x(),{currentLang:o}=ae(),a=S(()=>{var u;return typeof t.value.logoLink=="string"?t.value.logoLink:(u=t.value.logoLink)==null?void 0:u.link}),r=S(()=>{var u;return typeof t.value.logoLink=="string"||(u=t.value.logoLink)==null?void 0:u.rel}),l=S(()=>{var u;return typeof t.value.logoLink=="string"||(u=t.value.logoLink)==null?void 0:u.target});return(u,v)=>(i(),h("div",{class:A(["VPNavBarTitle",{"has-sidebar":c(s)}])},[d("a",{class:"title",href:a.value??c(Ce)(c(o).link),rel:r.value,target:l.value},[p(u.$slots,"nav-bar-title-before",{},void 0,!0),c(t).logo?(i(),P(ue,{key:0,class:"logo",image:c(t).logo},null,8,["image"])):g("",!0),c(t).siteTitle?(i(),h("span",{key:1,innerHTML:c(t).siteTitle},null,8,Sa)):c(t).siteTitle===void 0?(i(),h("span",Ta,C(c(e).title),1)):g("",!0),p(u.$slots,"nav-bar-title-after",{},void 0,!0)],8,Va)],2))}}),Ma=V(wa,[["__scopeId","data-v-5622a072"]]),Na={class:"items"},Ia={class:"title"},Ca=k({__name:"VPNavBarTranslations",setup(n){const{theme:e}=M(),{localeLinks:t,currentLang:s}=ae({correspondingLink:!0});return(o,a)=>c(t).length&&c(s).label?(i(),P(Ee,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:c(e).langMenuLabel||"Change language"},{default:f(()=>[d("div",Na,[d("p",Ia,C(c(s).label),1),(i(!0),h(H,null,z(c(t),r=>(i(),P(ke,{key:r.link,item:r},null,8,["item"]))),128))])]),_:1},8,["label"])):g("",!0)}}),Aa=V(Ca,[["__scopeId","data-v-dac637f3"]]),Ha={class:"wrapper"},Ba={class:"container"},Ea={class:"title"},Oa={class:"content"},Da={class:"content-body"},Fa=k({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(n){const e=n,{y:t}=xe(),{hasSidebar:s}=x(),{frontmatter:o}=M(),a=T({});return Ne(()=>{a.value={"has-sidebar":s.value,home:o.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(r,l)=>(i(),h("div",{class:A(["VPNavBar",a.value])},[d("div",Ha,[d("div",Ba,[d("div",Ea,[y(Ma,null,{"nav-bar-title-before":f(()=>[p(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(r.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",Oa,[d("div",Da,[p(r.$slots,"nav-bar-content-before",{},void 0,!0),y(ya,{class:"search"}),y(Fo,{class:"menu"}),y(Aa,{class:"translations"}),y(Ks,{class:"appearance"}),y(La,{class:"social-links"}),y(Mo,{class:"extra"}),p(r.$slots,"nav-bar-content-after",{},void 0,!0),y(Co,{class:"hamburger",active:r.isScreenOpen,onClick:l[0]||(l[0]=u=>r.$emit("toggle-screen"))},null,8,["active"])])])])]),l[1]||(l[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),za=V(Fa,[["__scopeId","data-v-bb7529ee"]]),ja={key:0,class:"VPNavScreenAppearance"},Ua={class:"text"},qa=k({__name:"VPNavScreenAppearance",setup(n){const{site:e,theme:t}=M();return(s,o)=>c(e).appearance&&c(e).appearance!=="force-dark"&&c(e).appearance!=="force-auto"?(i(),h("div",ja,[d("p",Ua,C(c(t).darkModeSwitchLabel||"Appearance"),1),y(He)])):g("",!0)}}),Ga=V(qa,[["__scopeId","data-v-774971f8"]]),Ra=["innerHTML"],Wa=k({__name:"VPNavScreenMenuLink",props:{item:{}},setup(n){const e=_e("close-screen");return(t,s)=>(i(),P(K,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:c(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ra)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ka=V(Wa,[["__scopeId","data-v-29871565"]]),Ja=["innerHTML"],xa=k({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(n){const e=_e("close-screen");return(t,s)=>(i(),P(K,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:c(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ja)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),ot=V(xa,[["__scopeId","data-v-581896e9"]]),Xa={class:"VPNavScreenMenuGroupSection"},Ya={key:0,class:"title"},Qa=k({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(n){return(e,t)=>(i(),h("div",Xa,[e.text?(i(),h("p",Ya,C(e.text),1)):g("",!0),(i(!0),h(H,null,z(e.items,s=>(i(),P(ot,{key:s.text,item:s},null,8,["item"]))),128))]))}}),Za=V(Qa,[["__scopeId","data-v-836cddb8"]]),er=["aria-controls","aria-expanded"],tr=["innerHTML"],nr=["id"],sr={key:0,class:"item"},or={key:1,class:"item"},ar={key:2,class:"group"},rr=k({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(n){const e=n,t=T(!1),s=S(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function o(){t.value=!t.value}return(a,r)=>(i(),h("div",{class:A(["VPNavScreenMenuGroup",{open:t.value}])},[d("button",{class:"button","aria-controls":s.value,"aria-expanded":t.value,onClick:o},[d("span",{class:"button-text",innerHTML:a.text},null,8,tr),r[0]||(r[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,er),d("div",{id:s.value,class:"items"},[(i(!0),h(H,null,z(a.items,l=>(i(),h(H,{key:JSON.stringify(l)},["link"in l?(i(),h("div",sr,[y(ot,{item:l},null,8,["item"])])):"component"in l?(i(),h("div",or,[(i(),P(W(l.component),Y({ref_for:!0},l.props,{"screen-menu":""}),null,16))])):(i(),h("div",ar,[y(Za,{text:l.text,items:l.items},null,8,["text","items"])]))],64))),128))],8,nr)],2))}}),ir=V(rr,[["__scopeId","data-v-a8d3502a"]]),lr={key:0,class:"VPNavScreenMenu"},cr=k({__name:"VPNavScreenMenu",setup(n){const{theme:e}=M();return(t,s)=>c(e).nav?(i(),h("nav",lr,[(i(!0),h(H,null,z(c(e).nav,o=>(i(),h(H,{key:JSON.stringify(o)},["link"in o?(i(),P(Ka,{key:0,item:o},null,8,["item"])):"component"in o?(i(),P(W(o.component),Y({key:1,ref_for:!0},o.props,{"screen-menu":""}),null,16)):(i(),P(ir,{key:2,text:o.text||"",items:o.items},null,8,["text","items"]))],64))),128))])):g("",!0)}}),ur=k({__name:"VPNavScreenSocialLinks",setup(n){const{theme:e}=M();return(t,s)=>c(e).socialLinks?(i(),P(Oe,{key:0,class:"VPNavScreenSocialLinks",links:c(e).socialLinks},null,8,["links"])):g("",!0)}}),dr={class:"list"},pr=k({__name:"VPNavScreenTranslations",setup(n){const{localeLinks:e,currentLang:t}=ae({correspondingLink:!0}),s=T(!1);function o(){s.value=!s.value}return(a,r)=>c(e).length&&c(t).label?(i(),h("div",{key:0,class:A(["VPNavScreenTranslations",{open:s.value}])},[d("button",{class:"title",onClick:o},[r[0]||(r[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),ee(" "+C(c(t).label)+" ",1),r[1]||(r[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",dr,[(i(!0),h(H,null,z(c(e),l=>(i(),h("li",{key:l.link,class:"item"},[y(K,{class:"link",href:l.link},{default:f(()=>[ee(C(l.text),1)]),_:2},1032,["href"])]))),128))])],2)):g("",!0)}}),hr=V(pr,[["__scopeId","data-v-0d43316b"]]),fr={class:"container"},vr=k({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(n){const e=T(null),t=Ye(ge?document.body:null);return(s,o)=>(i(),P(we,{name:"fade",onEnter:o[0]||(o[0]=a=>t.value=!0),onAfterLeave:o[1]||(o[1]=a=>t.value=!1)},{default:f(()=>[s.open?(i(),h("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[d("div",fr,[p(s.$slots,"nav-screen-content-before",{},void 0,!0),y(cr,{class:"menu"}),y(hr,{class:"translations"}),y(Ga,{class:"appearance"}),y(ur,{class:"social-links"}),p(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):g("",!0)]),_:3}))}}),mr=V(vr,[["__scopeId","data-v-34fa79a7"]]),_r={key:0,class:"VPNav"},gr=k({__name:"VPNav",setup(n){const{isScreenOpen:e,closeScreen:t,toggleScreen:s}=Os(),{frontmatter:o}=M(),a=S(()=>o.value.navbar!==!1);return Qe("close-screen",t),fe(()=>{ge&&document.documentElement.classList.toggle("hide-nav",!a.value)}),(r,l)=>a.value?(i(),h("header",_r,[y(za,{"is-screen-open":c(e),onToggleScreen:c(s)},{"nav-bar-title-before":f(()=>[p(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(r.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[p(r.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[p(r.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),y(mr,{open:c(e)},{"nav-screen-content-before":f(()=>[p(r.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[p(r.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):g("",!0)}}),kr=V(gr,[["__scopeId","data-v-a46e73f0"]]),br=["role","tabindex"],$r={key:1,class:"items"},yr=k({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(n){const e=n,{collapsed:t,collapsible:s,isLink:o,isActiveLink:a,hasActiveLink:r,hasChildren:l,toggle:u}=zt(S(()=>e.item)),v=S(()=>l.value?"section":"div"),_=S(()=>o.value?"a":"div"),m=S(()=>l.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),L=S(()=>o.value?void 0:"button"),b=S(()=>[[`level-${e.depth}`],{collapsible:s.value},{collapsed:t.value},{"is-link":o.value},{"is-active":a.value},{"has-active":r.value}]);function $(w){"key"in w&&w.key!=="Enter"||!e.item.link&&u()}function N(){e.item.link&&u()}return(w,O)=>{const F=Z("VPSidebarItem",!0);return i(),P(W(v.value),{class:A(["VPSidebarItem",b.value])},{default:f(()=>[w.item.text?(i(),h("div",Y({key:0,class:"item",role:L.value},kt(w.item.items?{click:$,keydown:$}:{},!0),{tabindex:w.item.items&&0}),[O[1]||(O[1]=d("div",{class:"indicator"},null,-1)),w.item.link?(i(),P(K,{key:0,tag:_.value,class:"link",href:w.item.link,rel:w.item.rel,target:w.item.target},{default:f(()=>[(i(),P(W(m.value),{class:"text",innerHTML:w.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(i(),P(W(m.value),{key:1,class:"text",innerHTML:w.item.text},null,8,["innerHTML"])),w.item.collapsed!=null&&w.item.items&&w.item.items.length?(i(),h("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:N,onKeydown:bt(N,["enter"]),tabindex:"0"},O[0]||(O[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):g("",!0)],16,br)):g("",!0),w.item.items&&w.item.items.length?(i(),h("div",$r,[w.depth<5?(i(!0),h(H,{key:0},z(w.item.items,R=>(i(),P(F,{key:R.text,item:R,depth:w.depth+1},null,8,["item","depth"]))),128)):g("",!0)])):g("",!0)]),_:1},8,["class"])}}}),Pr=V(yr,[["__scopeId","data-v-2e0476bc"]]),Lr=k({__name:"VPSidebarGroup",props:{items:{}},setup(n){const e=T(!0);let t=null;return Q(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),$t(()=>{t!=null&&(clearTimeout(t),t=null)}),(s,o)=>(i(!0),h(H,null,z(s.items,a=>(i(),h("div",{key:a.text,class:A(["group",{"no-transition":e.value}])},[y(Pr,{item:a,depth:0},null,8,["item"])],2))),128))}}),Vr=V(Lr,[["__scopeId","data-v-ec086cd5"]]),Sr={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Tr=k({__name:"VPSidebar",props:{open:{type:Boolean}},setup(n){const{sidebarGroups:e,hasSidebar:t}=x(),s=n,o=T(null),a=Ye(ge?document.body:null);J([s,o],()=>{var l;s.open?(a.value=!0,(l=o.value)==null||l.focus()):a.value=!1},{immediate:!0,flush:"post"});const r=T(0);return J(e,()=>{r.value+=1},{deep:!0}),(l,u)=>c(t)?(i(),h("aside",{key:0,class:A(["VPSidebar",{open:l.open}]),ref_key:"navEl",ref:o,onClick:u[0]||(u[0]=Xe(()=>{},["stop"]))},[u[2]||(u[2]=d("div",{class:"curtain"},null,-1)),d("nav",Sr,[u[1]||(u[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),p(l.$slots,"sidebar-nav-before",{},void 0,!0),(i(),P(Vr,{items:c(e),key:r.value},null,8,["items"])),p(l.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):g("",!0)}}),wr=V(Tr,[["__scopeId","data-v-12a40e3d"]]),Mr=k({__name:"VPSkipLink",setup(n){const{theme:e}=M(),t=me(),s=T();J(()=>t.path,()=>s.value.focus());function o({target:a}){const r=document.getElementById(decodeURIComponent(a.hash).slice(1));if(r){const l=()=>{r.removeAttribute("tabindex"),r.removeEventListener("blur",l)};r.setAttribute("tabindex","-1"),r.addEventListener("blur",l),r.focus(),window.scrollTo(0,0)}}return(a,r)=>(i(),h(H,null,[d("span",{ref_key:"backToTop",ref:s,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:o},C(c(e).skipToContentLabel||"Skip to content"),1)],64))}}),Nr=V(Mr,[["__scopeId","data-v-17ad389b"]]),Ir=k({__name:"Layout",setup(n){const{isOpen:e,open:t,close:s}=x(),o=me();J(()=>o.path,s),Ft(e,s);const{frontmatter:a}=M(),r=yt(),l=S(()=>!!r["home-hero-image"]);return Qe("hero-image-slot-exists",l),(u,v)=>{const _=Z("Content");return c(a).layout!==!1?(i(),h("div",{key:0,class:A(["Layout",c(a).pageClass])},[p(u.$slots,"layout-top",{},void 0,!0),y(Nr),y(St,{class:"backdrop",show:c(e),onClick:c(s)},null,8,["show","onClick"]),y(kr,null,{"nav-bar-title-before":f(()=>[p(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[p(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[p(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[p(u.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":f(()=>[p(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[p(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),y(Es,{open:c(e),onOpenMenu:c(t)},null,8,["open","onOpenMenu"]),y(wr,{open:c(e)},{"sidebar-nav-before":f(()=>[p(u.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":f(()=>[p(u.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),y(bs,null,{"page-top":f(()=>[p(u.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[p(u.$slots,"page-bottom",{},void 0,!0)]),"not-found":f(()=>[p(u.$slots,"not-found",{},void 0,!0)]),"home-hero-before":f(()=>[p(u.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[p(u.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[p(u.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[p(u.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[p(u.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[p(u.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[p(u.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[p(u.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[p(u.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":f(()=>[p(u.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[p(u.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[p(u.$slots,"doc-after",{},void 0,!0)]),"doc-top":f(()=>[p(u.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[p(u.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":f(()=>[p(u.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[p(u.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[p(u.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[p(u.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[p(u.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[p(u.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),y(Vs),p(u.$slots,"layout-bottom",{},void 0,!0)],2)):(i(),P(_,{key:1}))}}}),Cr=V(Ir,[["__scopeId","data-v-c4daae71"]]),Hr={Layout:Cr,enhanceApp:({app:n})=>{n.component("Badge",Pt)}};export{Hr as t}; diff --git a/docs/document/assets/chunks/virtual_search-data.CMKl0EDN.js b/docs/document/assets/chunks/virtual_search-data.CMKl0EDN.js deleted file mode 100644 index bf239ba88..000000000 --- a/docs/document/assets/chunks/virtual_search-data.CMKl0EDN.js +++ /dev/null @@ -1,1327 +0,0 @@ -const e={map:'[{"高级属性":["0.0"],"option":["0.1","1.12","10.1","11.12","20.9","23.9","24.17"],"template":["0.2","10.2"],"events":["0.3","10.3"],"storage":["0.4","10.4"],"icons":["0.5","10.5","22.38","26.38"],"i18n":["0.6","10.6","22.42","26.42"],"notice":["0.7","3.4","10.7","13.4"],"layers":["0.8","10.8","22.28","26.28"],"controls":["0.9","10.9","22.31","26.31"],"contextmenu":["0.10","2.37","3.3","10.10","12.37","13.3","22.30","26.30"],"subtitle":["0.11","2.36","10.11","12.36","22.36","26.36"],"loading":["0.12","2.34","10.12","12.34"],"hotkey":["0.13","2.5","10.13","12.5","22.19","26.19"],"mask":["0.14","2.35","10.14","12.35"],"setting":["0.15","2.39","3.5","3.6","3.7","10.15","12.39","13.5","13.6","13.7","22.18","26.18"],"plugins":["0.16","10.16","22.34","26.34"],"静态属性":["1.0"],"instances":["1.1","11.1"],"version":["1.2","11.2"],"env":["1.3","11.3"],"build":["1.4","11.4"],"config":["1.5","11.5","24.13"],"utils":["1.6","11.6"],"scheme":["1.7","11.7"],"emitter":["1.8","11.8"],"validator":["1.9","11.9"],"kindof":["1.10","11.10"],"html":["1.11","11.11"],"实例事件":["2.0"],"ready":["2.1","12.1"],"restart":["2.2","12.2"],"pause":["2.3","5.2","12.3","15.2"],"play":["2.4","5.1","12.4","15.1"],"destroy":["2.6","5.4","12.6","15.4"],"focus":["2.7","12.7"],"blur":["2.8","12.8"],"dblclick":["2.9","12.9"],"click":["2.10","12.10"],"error":["2.11","12.11"],"hover":["2.12","12.12"],"mousemove":["2.13","12.13"],"resize":["2.14","3.8","12.14","13.8"],"view":["2.15","12.15"],"lock":["2.16","12.16","22.43","26.43"],"aspectratio":["2.17","5.29","12.17","15.29","22.16","26.16"],"autoheight":["2.18","5.30","12.18","15.30"],"autosize":["2.19","5.25","12.19","15.25","22.11","26.11"],"flip":["2.20","3.30","5.27","12.20","13.30","15.27","22.14","26.14"],"fullscreen":["2.21","3.31","5.19","12.21","13.31","15.19","22.22","26.22"],"fullscreenerror":["2.22","12.22"],"fullscreenweb":["2.23","5.20","12.23","15.20","22.23","26.23"],"mini":["2.24","5.23","12.24","15.23"],"pip":["2.25","5.21","12.25","15.21","22.20","26.20"],"screenshot":["2.26","5.16","12.26","15.16","22.17","26.17"],"seek":["2.27","3.27","5.5","12.27","13.27","15.5"],"subtitleoffset":["2.28","5.43","12.28","15.43","22.24","26.24"],"subtitlebeforeupdate":["2.29","12.29"],"subtitleafterupdate":["2.30","12.30"],"subtitleload":["2.31","12.31"],"info":["2.32","3.22","12.32","13.22"],"layer":["2.33","12.33","18.0"],"control":["2.38","3.16","12.38","13.16"],"muted":["2.40","5.13","12.40","15.13","22.9","26.9"],"keydown":["2.41","12.41"],"video":["2.42","2.43","2.44","2.45","2.46","2.47","2.48","2.49","2.50","2.51","2.52","2.53","2.54","2.55","2.56","2.57","2.58","2.59","2.60","2.61","2.62","5.39","12.42","12.43","12.44","12.45","12.46","12.47","12.48","12.49","12.50","12.51","12.52","12.53","12.54","12.55","12.56","12.57","12.58","12.59","12.60","12.61","12.62","15.39"],"全局属性":["3.0"],"debug":["3.1","13.1"],"style":["3.2","13.2"],"scroll":["3.9","3.10","13.9","13.10"],"auto":["3.11","3.12","3.13","3.21","13.11","13.12","13.13","13.21"],"reconnect":["3.14","3.15","13.14","13.15"],"dbclick":["3.17","3.18","13.17","13.18"],"mobile":["3.19","3.20","13.19","13.20"],"fast":["3.23","3.24","13.23","13.24"],"touch":["3.25","13.25"],"volume":["3.26","5.8","13.26","15.8","22.7","26.7"],"playback":["3.28","13.28"],"aspect":["3.29","13.29"],"log":["3.32","13.32"],"use":["3.33","13.33"],"编写插件":["4.0"],"实例属性":["5.0"],"toggle":["5.3","15.3"],"forward":["5.6","15.6"],"backward":["5.7","15.7"],"url":["5.9","15.9","22.2","26.2"],"switch":["5.10","15.10"],"switchurl":["5.11","15.11"],"switchquality":["5.12","15.12"],"currenttime":["5.14","15.14"],"duration":["5.15","15.15"],"getdataurl":["5.17","15.17"],"getbloburl":["5.18","15.18"],"poster":["5.22","15.22","22.5","26.5"],"playing":["5.24","15.24"],"rect":["5.26","15.26"],"playbackrate":["5.28","15.28","22.15","26.15"],"attr":["5.31","15.31"],"type":["5.32","15.32","22.39","26.39"],"theme":["5.33","15.33","22.6","26.6"],"airplay":["5.34","15.34","22.47","26.47"],"loaded":["5.35","15.35"],"played":["5.36","15.36"],"proxy":["5.37","15.37","22.49","26.49"],"query":["5.38","15.38"],"cssvar":["5.40","15.40","22.48","26.48"],"quality":["5.41","15.41","22.32","26.32"],"thumbnails":["5.42","15.42","22.35","26.35"],"右键菜单":["6.0"],"配置":["6.1","7.1","8.1"],"创建":["6.2","7.2","8.2","9.2","9.3","9.4","9.5"],"添加":["6.3","7.3","8.3","9.6"],"删除":["6.4","7.4","8.4","9.7"],"更新":["6.5","7.5","8.5","9.8"],"控制器":["7.0"],"业务层":["8.0"],"设置面板":["9.0"],"内置":["9.1"],"advanced":["10.0"],"static":["11.0"],"example":["12.0"],"global":["13.0"],"writing":["14.0"],"instance":["15.0"],"context":["16.0"],"configuration":["16.1","17.1","18.1"],"creation":["16.2","17.2","18.2"],"add":["16.3","18.3","19.6","21.3"],"delete":["16.4","17.4","18.4","19.7"],"updates":["16.5","19.8"],"controller":["17.0"],"adding":["17.3"],"update":["17.5","18.5"],"settings":["19.0","22.29","26.29"],"built":["19.1"],"create":["19.2","19.4","19.5"],"creating":["19.3"],"installation":["20.0","20.1"],"cdn":["20.2","23.2","24.3"],"usage":["20.3"],"vue":["20.4","20.7","23.4","23.7"],"react":["20.5","20.8","23.5","23.8"],"typescript":["20.6","23.6"],"javascript":["20.10","23.10"],"ancient":["20.11"],"language":["21.0"],"default":["21.1"],"importing":["21.2"],"modify":["21.4"],"basic":["22.0"],"container":["22.1","26.1"],"id":["22.3","26.3"],"onready":["22.4","26.4"],"islive":["22.8","26.8"],"autoplay":["22.10","26.10"],"automini":["22.12","26.12"],"loop":["22.13","26.13"],"mutex":["22.21","26.21"],"miniprogressbar":["22.25","26.25"],"usessr":["22.26","26.26"],"playsinline":["22.27","26.27"],"highlight":["22.33","26.33"],"morevideoattr":["22.37","26.37"],"customtype":["22.40","26.40"],"lang":["22.41","26.41"],"fastforward":["22.44","26.44"],"autoplayback":["22.45","26.45"],"autoorientation":["22.46","26.46"],"安装使用":["23.0"],"安装":["23.1","24.2"],"使用":["23.3"],"古老的浏览器":["23.11"],"弹幕库":["24.0"],"演示":["24.1"],"弹幕结构":["24.4"],"全部选项":["24.5"],"生命周期":["24.6"],"使用弹幕数组":["24.7"],"使用弹幕":["24.8"],"使用异步返回":["24.9"],"hide":["24.10"],"ishide":["24.11"],"emit":["24.12"],"load":["24.14"],"reset":["24.15"],"mount":["24.16"],"事件":["24.18"],"语言设置":["25.0"],"默认语言":["25.1"],"导入语言":["25.2"],"新增语言":["25.3"],"修改语言":["25.4"],"基础选项":["26.0"]},{"0":["3.28","5.35","5.36","22.7","26.7"],"1":["23.11","24.5"],"3":["3.29","23.9"],"4":["3.29","21.3","25.3"],"5":["3.28","8.2","18.2","24.5"],"7":["8.3","18.3","22.7"],"9":["25.3"],"10":["24.5"],"15":["4.0","14.0"],"21":["8.5","9.8","18.5","19.8"],"26":["7.5","17.5"],"27":["9.8","19.8"],"75":["3.28"],"250":["3.5"],"这里的":["0.0","1.0","3.0","5.0"],"播放器的选项":["0.1"],"div":["0.1","0.2","0.4","0.5","0.7","0.13","0.16","1.1","1.6","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.3","4.0","5.1","5.2","5.3","5.15","5.26","5.30","5.34","5.41","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.3","9.6","9.7","9.8","10.1","14.0","15.15","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.3","19.6","19.7","19.8","22.2","22.28","22.29","24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.28","26.29","26.30","26.31"],"classname":["0.1","0.2","0.16","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","4.0","5.41","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.3","9.6","9.7","9.8","14.0","15.15","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.3","19.6","19.7","19.8","22.2","22.28","22.29","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.28","26.29"],"run":["0.1","0.2","2.0","2.2","2.6","2.11","2.12","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","2.39","4.0","5.41","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.3","9.6","9.7","9.8","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.3","19.6","19.7","19.8","22.2","22.28","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.28","26.29"],"管理播放器所有的":["0.2","0.3","0.5"],"dom":["0.2","0.3","5.37","5.38","9.2","9.4","9.5","10.2","10.3","15.37","15.38","19.2","19.4","19.5","22.1","26.1"],"元素":["0.2","9.4","9.5"],"事件":["0.3","4.0"],"实质上是代理了":["0.3"],"addeventlistener":["0.3","5.37","10.3","15.37"],"和":["0.3","4.0","5.12","24.8","24.10","26.4"],"removeeventlistener":["0.3","10.3"],"当使用以下方法来处理事件":["0.3"],"播放器销毁时也会自动销毁该事件":["0.3"],"管理播放器的本地存储":["0.4"],"name":["0.4","4.0","10.4","17.1"],"属性用于设置缓存的":["0.4"],"key":["0.4","10.4"],"set":["0.4","10.4","13.6","13.7","15.10","15.11","15.12","15.13","15.14","15.19","15.20","15.21","15.22","15.27","15.28","15.29","22.35","22.36"],"方法用于设置缓存":["0.4"],"get":["0.4","0.6","10.6","15.14","15.15","15.19","15.21","15.22","15.24","15.31"],"方法用于获取缓存":["0.4"],"del":["0.4"],"方法用于删除缓存":["0.4"],"clear":["0.4"],"方法用于清空缓存":["0.4"],"svg":["0.5","10.5"],"图标":["0.5"],"管理播放器的":["0.6"],"方法用于获取":["0.6"],"的值":["0.6"],"update":["0.6","0.8","0.9","0.10","0.15"],"管理播放器的提示语":["0.7"],"只有一个":["0.7"],"show":["0.7","0.12","0.14","10.12","10.14","22.17","22.20","22.32","22.33","24.10"],"属性用于显示提示语":["0.7"],"管理播放器的层":["0.8"],"add":["0.8","0.9","0.10","0.13","0.15","0.16","10.8","10.9","10.10","10.13","10.15"],"方法用于动态添加层":["0.8"],"remove":["0.8","0.9","0.10","0.13","0.15"],"方法用于动态删除层":["0.8"],"管理播放器的控制器":["0.9"],"方法用于动态添加控制器":["0.9"],"方法用于动态删除控制器":["0.9"],"管理播放器的右键菜单":["0.10"],"方法用于动态添加菜单":["0.10"],"方法用于动态删除菜单":["0.10"],"方法用于动态更新菜单":["0.10"],"管理播放器的字幕功能":["0.11"],"url":["0.11","5.11","10.11"],"属性设置和返回当前字幕地址":["0.11"],"style":["0.11"],"方法设置当前字幕的样式":["0.11"],"switch":["0.11"],"管理播放器的加载层":["0.12"],"属性用于设置是否显示加载层":["0.12"],"toggle":["0.12","0.14","19.4"],"管理播放器的快捷键功能":["0.13"],"方法用于添加快捷键":["0.13"],"方法用于删除快捷键":["0.13"],"管理播放器的遮罩层":["0.14"],"属性用于设置是否显示遮罩层":["0.14"],"管理播放器的设置面板":["0.15"],"方法用于动态添加设置项":["0.15"],"方法用于动态删除设置项":["0.15"],"方法用于动态更新设置项":["0.15"],"管理播放器的插件功能":["0.16"],"只有一个方法":["0.16"],"用于动态添加插件":["0.16"],"返回全部播放器实例的数组":["1.1"],"假如你想同时管理多个播放器的时候":["1.1"],"可以用到该属性":["1.1"],"返回播放器的版本信息":["1.2"],"返回播放器的环境变量":["1.3"],"返回播放器的打包时间":["1.4"],"返回视频的默认配置":["1.5"],"返回播放器的工具函数集合":["1.6"],"返回播放器选项的校验方案":["1.7"],"返回事件分发器的构造函数":["1.8"],"返回选项的校验函数":["1.9"],"返回类型检测的函数工具":["1.10"],"返回播放器所需的":["1.11"],"返回播放器的默认选项":["1.12"],"播放器的事件分为两种":["2.0"],"一种视频的":["2.0"],"原生事件":["2.0"],"前缀":["2.0"],"video":["2.0","12.0","13.29","13.30","15.1","15.2","15.7","15.10","15.11","15.12","15.15","22.2","22.36","22.39","22.40"],"另外一种是":["2.0"],"自定义事件":["2.0"],"监听事件":["2.0"],"code":["2.0","2.2","2.28","4.0","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.3","9.6","9.7","9.8","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.3","19.6","19.7","19.8","20.1","20.2","20.3","20.4","20.5","22.2","22.28","23.1","23.2","23.3","23.4","23.5","24.2","24.3","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.28"],"js":["2.0","4.0","6.5","7.2","7.3","7.5","8.2","8.3","8.5","9.3","9.7","9.8","14.0","16.5","17.2","17.3","17.5","18.2","18.3","18.5","19.3","19.7","19.8","20.4","20.5","20.7","20.8","20.10","20.11","21.2","21.3","21.4","23.4","23.5","23.7","23.8","23.10","23.11","24.5","24.18","25.2","25.3","25.4"],"当播放器首次可以播放器时触发":["2.1"],"当播放器切换地址后并可以播放时触发":["2.2"],"当播放器暂停时触发":["2.3"],"当播放器播放时触发":["2.4"],"当播放器热键被按下时触发":["2.5"],"当播放器销毁时触发":["2.6"],"当播放器获得焦点时触发":["2.7"],"当播放器失去焦点时触发":["2.8"],"当播放器被双击时触发":["2.9"],"当播放器被单击时触发":["2.10"],"当播放器加载视频发生错误时触发":["2.11"],"当播放器被鼠标移出或者移入时触发":["2.12"],"当播放器被鼠标经过时触发":["2.13"],"当播放器尺寸变化时触发":["2.14"],"当播放器出现在视口时触发":["2.15"],"在移动端":["2.16","3.19","3.20","3.21","3.23","3.24","3.25"],"当锁定的状态发生变化时触发":["2.16"],"当播放器长宽比变化时触发":["2.17"],"当播放器自动设置高度时触发":["2.18"],"当播放器自动设置尺寸时触发":["2.19"],"当播放器发生翻转时触发":["2.20"],"当播放器发生窗口全屏时触发":["2.21"],"当播放器发生窗口全屏错误时触发":["2.22"],"当播放器发生网页全屏时触发":["2.23"],"当播放器进入迷你模式时触发":["2.24"],"当播放器进入画中画时触发":["2.25"],"当播放器被截图时触发":["2.26"],"当播放器发生时间跳转时触发":["2.27"],"当播放器发生字幕偏移时触发":["2.28"],"当字幕更新前触发":["2.29"],"当字幕更新后触发":["2.30"],"当字幕加载时触发":["2.31"],"当信息面板显示或隐藏时触发":["2.32"],"当自定义层显示或隐藏时触发":["2.33"],"当加载器显示或隐藏时触发":["2.34"],"当遮罩层显示或隐藏时触发":["2.35"],"当字幕层显示或隐藏时触发":["2.36"],"当右键菜单显示或隐藏时触发":["2.37"],"当控制器显示或隐藏时触发":["2.38"],"当设置面板显示或隐藏时触发":["2.39"],"当静音的状态变化时触发":["2.40"],"监听来自":["2.41"],"document":["2.41"],"的":["2.41"],"canplay":["2.42","12.42"],"canplaythrough":["2.43","12.43"],"complete":["2.44","12.44"],"durationchange":["2.45","12.45"],"emptied":["2.46","12.46"],"ended":["2.47","12.47"],"error":["2.48","12.48"],"loadeddata":["2.49","12.49"],"loadedmetadata":["2.50","12.50"],"pause":["2.51","12.51","13.20"],"play":["2.52","3.19","3.20","12.52","13.19","13.20","15.3","22.10"],"playing":["2.53","12.53"],"progress":["2.54","12.54","22.35"],"ratechange":["2.55","12.55"],"seeked":["2.56","12.56"],"seeking":["2.57","12.57"],"stalled":["2.58","12.58"],"suspend":["2.59","12.59"],"timeupdate":["2.60","12.60"],"volumechange":["2.61","12.61"],"waiting":["2.62","12.62"],"是否开始":["3.1"],"模式":["3.1"],"返回播放器样式文本":["3.2"],"是否开启右键菜单":["3.3"],"默认开启":["3.3"],"time":["3.4","3.8","3.9","3.14","3.15","3.16","3.17","3.21","3.22","3.24","13.4","13.8","13.9","13.14","13.15","13.16","13.17","13.21","13.22","13.24","22.24"],"提示信息的显示时长":["3.4"],"单位为毫秒":["3.4","3.8","3.9","3.13","3.16","3.17","3.22"],"width":["3.5","3.6","9.2","13.5","13.6","15.30"],"设置面板的默认宽度":["3.5"],"单位为像素":["3.5","3.6","3.7","3.10"],"默认为":["3.5","3.6","3.7","3.11","3.17","3.26","3.28","3.29","3.30","3.32","3.33"],"item":["3.6","3.7","13.6","13.7","19.2"],"设置面板的设置项的默认宽度":["3.6"],"height":["3.7","13.7"],"设置面板的设置项的默认高度":["3.7"],"事件的节流时间":["3.8","3.9"],"gap":["3.10","13.10"],"view":["3.10"],"事件的边界容差距离":["3.10"],"playback":["3.11","3.12","3.13","12.53","13.11","13.12","13.13","22.45"],"max":["3.11","3.14","13.11","13.14"],"自动回放功能的最大记录数":["3.11"],"min":["3.12","13.12"],"自动回放功能的最小记录时长":["3.12"],"单位为秒":["3.12","3.27"],"timeout":["3.13","13.13"],"自动回放功能的隐藏延迟时长":["3.13"],"发生连接错误时":["3.14","3.15"],"自动连接的最大次数":["3.14"],"sleep":["3.15","13.15"],"自动连接的延迟时间":["3.15"],"hide":["3.16","13.16"],"底部控制栏的自动隐藏的延迟时间":["3.16"],"双击事件的延迟事件":["3.17"],"fullscreen":["3.18","13.18"],"在桌面端":["3.18"],"是否双击切换全屏":["3.18"],"dbclick":["3.19","13.19"],"是否双击切换播放暂停":["3.19"],"click":["3.20","10.10","13.17","13.20"],"是否单击切换播放暂停":["3.20"],"orientation":["3.21","13.21"],"自动旋屏的延迟时间":["3.21"],"loop":["3.22","13.22"],"信息面板的刷新时间":["3.22"],"forward":["3.23","3.24","13.23","13.24"],"value":["3.23","13.23"],"长按加速的速率倍数":["3.23"],"长按加速的延迟时间":["3.24"],"move":["3.25","13.25"],"ratio":["3.25","3.29","12.17","13.25","13.26","13.29"],"左右滑动进度的速率倍数":["3.25"],"step":["3.26","3.27","13.26","13.27"],"快捷键调节音量的幅度比例":["3.26"],"快捷键调节播放进度的幅度":["3.27"],"rate":["3.28","13.28"],"内置播放速率的列表":["3.28"],"内置视频长宽比的列表":["3.29"],"default":["3.29","13.5","13.6","13.7","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.29","22.30","22.31","22.32","22.33","22.34","22.35","22.36","22.37","22.38","22.39","22.40","22.41","22.42","22.43","22.44","22.45","22.46","22.47","22.48","22.49","26.1","26.2","26.3","26.4","26.5","26.6","26.7","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.29","26.30","26.31","26.32","26.33","26.34","26.35","26.36","26.37","26.38","26.39","26.40","26.41","26.42","26.43","26.44","26.45","26.46","26.47","26.48","26.49"],"内置视频翻转的列表":["3.30"],"normal":["3.30"],"horizontal":["3.30"],"vertical":["3.30"],"web":["3.31","13.31"],"in":["3.31","10.3","13.24","13.28","13.29","13.30","13.31","19.1","21.2","22.39"],"body":["3.31","13.31"],"网页全屏时":["3.31"],"version":["3.32","13.32"],"设置是否打印播放器版本":["3.32"],"raf":["3.33","13.33"],"设置是否使用":["3.33"],"requestanimationframe":["3.33"],"但你已经知道播放器的":["4.0"],"属性":["4.0","6.1","7.1","8.1","9.2","9.4","9.5","26.32","26.33","26.35","26.36"],"方法":["4.0"],"后":["4.0"],"再编写插件是非常简单的事":["4.0"],"可以在实例化的时候加载插件的函数":["4.0"],"function":["4.0","5.1","5.2","5.3","5.4","5.11","5.12","5.16","5.17","5.18","5.25","5.30","5.31","5.34","5.37","5.38","5.40","9.2","14.0","15.1","15.2","15.3","15.4","15.11","15.12","15.16","15.17","15.18","15.25","15.30","15.31","15.34","15.37","15.38","15.40","19.2","22.4","22.49","26.4","26.49"],"myplugin":["4.0"],"art":["4.0","5.11","7.2","15.11","17.2"],"console":["4.0"],"info":["4.0"],"return":["4.0"],"something":["4.0"],"type":["5.1","5.2","5.3","5.4","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.27","5.28","5.29","5.30","5.31","5.33","5.34","5.35","5.36","5.37","5.38","5.39","5.40","5.41","5.42","5.43","15.1","15.2","15.3","15.4","15.5","15.6","15.7","15.8","15.9","15.10","15.11","15.12","15.13","15.14","15.15","15.16","15.17","15.18","15.19","15.20","15.21","15.22","15.23","15.24","15.25","15.26","15.27","15.28","15.29","15.30","15.31","15.33","15.34","15.35","15.36","15.37","15.38","15.39","15.40","15.41","15.42","15.43","16.1","17.1","18.1","19.2","19.4","19.5","20.10","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.29","22.30","22.31","22.32","22.33","22.34","22.35","22.36","22.37","22.38","22.40","22.41","22.42","22.43","22.44","22.45","22.46","22.47","22.48","22.49","26.1","26.2","26.3","26.4","26.5","26.6","26.7","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.29","26.30","26.31","26.32","26.33","26.34","26.35","26.36","26.37","26.38","26.40","26.41","26.42","26.43","26.44","26.45","26.46","26.47","26.48","26.49"],"播放视频":["5.1"],"暂停视频":["5.2"],"切换视频的播放和暂停":["5.3"],"parameter":["5.4","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.19","5.20","5.21","5.22","5.23","5.24","5.27","5.28","5.29","5.31","5.32","5.33","5.41","5.42","5.43","15.4","15.5","15.6","15.7","15.8","15.9","15.10","15.11","15.12","15.13","15.14","15.19","15.20","15.21","15.22","15.23","15.24","15.27","15.28","15.29","15.31","15.32","15.33","15.41","15.42","15.43"],"boolean":["5.4","5.13","5.19","5.20","5.21","5.24","7.1","15.4","15.13","15.19","15.20","15.21","15.23","15.24","16.1","17.1","18.1","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.43","22.44","22.45","22.46","22.47","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.43","26.44","26.45","26.46","26.47"],"setter":["5.5","5.6","5.7","5.8","5.9","5.10","5.13","5.14","5.19","5.20","5.21","5.22","5.23","5.27","5.28","5.29","5.32","5.33","5.41","5.42","5.43","15.5","15.6","15.7","15.8","15.9","15.10","15.13","15.14","15.19","15.20","15.21","15.22","15.23","15.27","15.28","15.29","15.32","15.33","15.41","15.42","15.43"],"number":["5.5","5.6","5.7","5.8","5.14","5.28","13.11","13.14","15.5","15.6","15.7","15.8","15.14","15.28","15.43","21.0","22.7","26.7"],"getter":["5.8","5.9","5.13","5.14","5.15","5.19","5.20","5.21","5.22","5.23","5.24","5.26","5.27","5.28","5.29","5.32","5.33","5.35","5.36","5.42","5.43","15.8","15.9","15.13","15.14","15.15","15.19","15.20","15.21","15.22","15.23","15.24","15.26","15.27","15.28","15.29","15.32","15.33","15.35","15.36","15.42","15.43"],"string":["5.10","5.11","5.12","5.22","5.27","5.29","5.31","5.32","5.33","9.2","9.4","9.5","15.9","15.10","15.11","15.12","15.22","15.27","15.29","15.31","15.32","15.33","17.1","19.2","19.4","19.5","22.1","22.2","22.3","22.5","22.6","22.39","22.41","26.1","26.2","26.3","26.5","26.6","26.39","26.41"],"设置视频地址":["5.10","5.11"],"设置时和":["5.10","5.11"],"设置视频画质地址":["5.12"],"获取视频时长":["5.15"],"下载当前视频帧的截图":["5.16"],"可选参数为截图名字":["5.16"],"获取当前视频帧的截图的":["5.17","5.18"],"base64":["5.17","15.17"],"地址":["5.17","5.18"],"blob":["5.18","15.18"],"设置和获取视频海报":["5.22"],"设置视频是否自适应尺寸":["5.25"],"获取播放器的尺寸和坐标信息":["5.26"],"当容器只有宽度":["5.30"],"该属性可以自动计算出并设置视频的高度":["5.30"],"动态获取和设置":["5.31"],"开启隔空播放":["5.34"],"视频缓存的比例":["5.35"],"范围是":["5.35","5.36"],"视频播放的比例":["5.36"],"事件的代理函数":["5.37"],"实质上代理了":["5.37"],"的查询函数":["5.38"],"element":["5.39","9.2","9.4","9.5","15.39","19.2","19.4","19.5","22.1","26.1"],"快捷返回播放器的":["5.39"],"动态获取或设置":["5.40"],"css":["5.40"],"变量":["5.40","23.10"],"array":["5.41","9.2","11.1","15.41","19.2","22.28","22.29","22.30","22.31","22.32","22.33","22.34","26.28","26.29","26.30","26.31","26.32","26.33","26.34"],"动态设置画质列表":["5.41"],"object":["5.42","15.42","22.35","22.36","22.37","22.38","22.40","22.42","22.48","26.35","26.36","26.37","26.38","26.40","26.42","26.48"],"类型":["6.1","7.1","8.1","9.2","9.4","9.5","26.33","26.35","26.36"],"描述":["6.1","7.1","8.1","9.2","9.4","9.5","26.35"],"disable":["6.1","7.1","8.1","16.1","17.1","18.1"],"var":["7.2","9.3","17.2"],"new":["7.2","17.2"],"artplayer":["7.2","17.2","20.4","20.5","20.11","21.2","22.1","23.5","23.11","24.18","25.2","25.4","26.1"],"container":["7.2","15.30","17.2"],"须先打开设置面板":["9.1"],"然后自带四个内置项":["9.1"],"flip":["9.1"],"playbackrate":["9.1"],"选择列表":["9.2"],"html":["9.2","9.4","9.5","19.2","19.4","19.5","20.3","23.3","26.38"],"元素的":["9.2","9.4","9.5"],"icon":["9.2","9.4","9.5","19.2","19.5"],"元素的图标":["9.2"],"selector":["9.2","19.2"],"元素列表":["9.2"],"onselect":["9.2","19.2"],"元素点击事件":["9.2"],"列表嵌套":["9.3"],"切换按钮":["9.4"],"范围滑块":["9.5"],"properties":["10.0","11.0","14.0","15.0"],"the":["10.0","10.1","10.2","10.3","10.4","10.5","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","12.0","12.1","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.30","12.31","12.32","12.36","12.37","12.38","12.39","12.40","12.41","12.42","12.43","12.46","12.58","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.14","13.15","13.23","13.24","13.25","13.26","13.27","13.28","14.0","15.3","15.4","15.10","15.11","15.15","15.17","15.18","15.19","15.26","15.30","15.35","15.36","15.41","17.1","19.1","19.5","20.9","20.10","20.11","21.0","21.1","22.1","22.2","22.3","22.4","22.5","22.7","22.11","22.17","22.32","22.33","22.35","22.36","22.39","22.40","22.45","22.49"],"options":["10.1","22.0"],"for":["10.1","10.3","10.8","13.8","13.9","15.37"],"player":["10.1","10.2","10.3","10.4","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","11.1","12.0","12.1","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.12","12.14","12.15","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","14.0"],"manages":["10.2","10.3","10.4"],"all":["10.2","10.3","10.5","11.1"],"of":["10.2","10.4","10.8","10.10","10.11","10.12","10.13","11.1","11.6","13.5","13.28","13.29","13.30","15.35","15.36","15.41","20.11","21.0","22.5","22.11","22.39"],"elements":["10.2"],"which":["10.3","13.27","15.37","22.4","22.39","22.42"],"is":["10.3","10.4","10.6","10.8","10.9","10.10","10.13","10.15","12.0","12.1","12.12","14.0","20.11","22.39"],"essentially":["10.3","15.37"],"a":["10.3","10.15","11.6","12.5","12.33","12.34","12.35","15.16","15.37","15.39","22.4"],"proxy":["10.3"],"and":["10.3","10.11","14.0","15.14","15.19","15.21","15.22","15.26","20.0"],"local":["10.4"],"attribute":["10.4","15.30","19.5"],"used":["10.4","10.6","10.8","10.9","10.10","10.15","22.38","22.39","22.48"],"to":["10.4","10.6","10.9","10.15","12.41","13.1","13.3","13.20","13.24","13.32","13.33","15.11","15.38","16.1","17.1","18.1","22.10","22.15","22.17","22.19","22.26","22.32","22.38","22.39","22.45","22.46","22.48"],"cache":["10.4"],"method":["10.4","10.6","10.8","10.9","10.10","10.13","10.15"],"manage":["10.5","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16"],"s":["10.6","10.7","10.9","10.14","10.15","10.16","12.0","14.0","19.4","19.5","22.40"],"notices":["10.7"],"there":["10.7"],"dynamically":["10.8","10.9","10.15","15.31","15.32","15.33","15.40","15.41"],"controllers":["10.9"],"right":["10.10","12.37"],"context":["10.10","22.30"],"menu":["10.10","16.0","22.30"],"features":["10.11","10.16"],"property":["10.11","10.14","16.1","17.1","18.1","19.2","19.4"],"sets":["10.11","15.8","15.25"],"layer":["10.12","10.14"],"functionality":["10.13"],"settings":["10.15","12.39","19.1","21.0"],"panel":["10.15","12.39","13.22","19.0","19.1","22.29"],"plugin":["10.16","14.0","24.18"],"with":["10.16","20.11"],"here":["11.0","13.0","15.0"],"returns":["11.1","11.2","11.3","11.4","11.5","11.6","11.7","11.8","11.9","11.10","11.11","11.12","13.2"],"an":["11.1","12.11","12.48"],"collection":["11.6"],"utility":["11.6"],"events":["12.0","14.0","15.37"],"are":["12.0","12.29","12.30","21.2"],"divided":["12.0"],"into":["12.0"],"two":["12.0"],"types":["12.0"],"one":["12.0"],"native":["12.0"],"prefix":["12.0"],"other":["12.0"],"custom":["12.0","12.33","22.28","22.29","22.30","22.31","22.34","22.42"],"triggered":["12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40"],"when":["12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","13.31","14.0","15.30"],"switches":["12.2"],"occurs":["12.11","12.28"],"mouse":["12.13"],"on":["12.16","13.18","13.19","13.20","13.21","13.23","13.25","22.33","22.35"],"mobile":["12.16","13.21","13.23","13.25"],"aspect":["12.17"],"automatically":["12.18","22.10","22.12"],"goes":["12.21","12.22"],"enters":["12.24","12.25"],"subtitle":["12.28","12.31","22.24"],"offset":["12.28"],"before":["12.29","21.2"],"subtitles":["12.29","12.30","22.36"],"updated":["12.29"],"loads":["12.31"],"information":["12.32","22.33"],"loader":["12.34"],"controller":["12.38"],"listen":["12.41"],"browser":["12.42"],"media":["12.46"],"content":["12.46"],"attributes":["13.0"],"whether":["13.1","13.3","13.18","13.19","13.20","13.32","13.33","15.25","16.1","17.1","18.1","22.10","22.14","22.15","22.17","22.19","22.26","22.32","22.43","22.44","22.45","22.46","22.47"],"start":["13.1"],"mode":["13.1"],"enable":["13.3"],"display":["13.4","22.18","22.22","22.23"],"duration":["13.4","13.12","13.13"],"throttle":["13.8","13.9"],"boundary":["13.10"],"tolerance":["13.10"],"distance":["13.10"],"maximum":["13.11","13.14"],"minimum":["13.12"],"delay":["13.13","13.15","13.16","13.17"],"auto":["13.16"],"double":["13.17"],"event":["13.17"],"desktop":["13.18"],"devices":["13.21"],"refresh":["13.22"],"milliseconds":["13.24"],"increment":["13.27"],"by":["13.27"],"list":["13.28","13.29","13.30","15.41","19.2"],"built":["13.28","13.29","13.30"],"flips":["13.30"],"setting":["13.32","13.33","15.11","15.40","15.41"],"plugins":["14.0"],"once":["14.0"],"you":["14.0","20.9","21.2"],"know":["14.0"],"methods":["14.0"],"very":["14.0"],"simple":["14.0"],"can":["14.0","15.30","20.9"],"load":["14.0"],"functions":["14.0"],"instantiated":["14.0"],"jump":["15.5"],"address":["15.11","15.17","15.18","22.2"],"similar":["15.11","15.38"],"quality":["15.12"],"download":["15.16"],"gets":["15.17","15.18","15.26"],"size":["15.26","22.11"],"has":["15.30"],"only":["15.30","20.11"],"this":["15.30"],"activate":["15.34"],"proportion":["15.35","15.36"],"proxies":["15.37"],"shortcut":["15.39"],"getting":["15.40"],"or":["15.40"],"description":["16.1","17.1","18.1","19.2","19.4","19.5"],"component":["17.1"],"first":["19.1"],"open":["19.1"],"selection":["19.2","22.32"],"nested":["19.3"],"lists":["19.3"],"button":["19.4"],"range":["19.5"],"slider":["19.5"],"group":["20.1","20.2","20.3","20.4","20.5","23.1","23.2","23.3","23.4","23.5","24.2","24.3"],"bash":["20.2","23.2","24.2","24.3"],"index":["20.3","23.3","24.18"],"head":["20.3"],"jsx":["20.5","20.8","23.5","23.8"],"import":["20.5","21.4","23.5","23.9","25.4"],"useeffect":["20.5","23.5"],"useref":["20.5","23.5"],"from":["20.5","21.4","23.5","25.4"],"importing":["20.6"],"also":["20.9"],"use":["20.9","22.8","22.19","22.26","22.45"],"sometimes":["20.10"],"your":["20.10"],"file":["20.10"],"may":["20.10"],"lose":["20.10"],"typescript":["20.10","23.10"],"hints":["20.10"],"browsers":["20.11"],"production":["20.11"],"build":["20.11"],"compatible":["20.11"],"danger":["21.0","25.0"],"given":["21.0"],"increasing":["21.0"],"bundled":["21.0"],"languages":["21.1","21.2"],"language":["21.2","21.3","21.4","22.41","26.41"],"files":["21.2"],"packaging":["21.2"],"located":["21.2"],"src":["21.2","25.2"],"i18n":["21.2","25.2"],"zhtw":["21.4","25.4"],"where":["22.1"],"source":["22.2"],"unique":["22.3"],"undefined":["22.4","22.49","26.4","26.49"],"constructor":["22.4"],"accepts":["22.4"],"as":["22.4"],"second":["22.4"],"argument":["22.4"],"f00":["22.6","26.6"],"false":["22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.20","22.22","22.23","22.24","22.25","22.26","22.37","22.43","22.44","22.45","22.46","22.47","26.10","26.11","26.12","26.14","26.15","26.16","26.17","26.24","26.26","26.43","26.45","26.47"],"displays":["22.16"],"true":["22.19","22.21","22.27","26.19"],"hotkeys":["22.19"],"if":["22.21"],"mini":["22.25"],"ssr":["22.26","26.26"],"server":["22.26"],"initializes":["22.28","22.29","22.31"],"initialize":["22.30","22.34"],"bottom":["22.31"],"control":["22.31"],"bar":["22.35"],"supporting":["22.36"],"formats":["22.36"],"vtt":["22.36","26.36"],"srt":["22.36","26.36"],"controls":["22.37","26.37"],"preload":["22.37"],"replace":["22.38"],"specify":["22.39"],"format":["22.39"],"conjunction":["22.39"],"matches":["22.40"],"navigator":["22.41","26.41"],"configuration":["22.42"],"will":["22.42"],"be":["22.42"],"deeply":["22.42"],"merged":["22.42"],"automatic":["22.45"],"导入":["23.6"],"你也可以使用选项的类型":["23.9"],"ts":["23.9"],"有时你的":["23.10"],"文件会丢失":["23.10"],"的类型提示":["23.10"],"这时候你可以手动导入类型":["23.10"],"生产构建的":["23.11"],"只兼容最新一个主版本的":["23.11"],"chrome":["23.11"],"last":["23.11"],"查看完整演示":["24.1"],"jsdelivr":["24.3"],"每一个弹幕是一个对象":["24.4"],"多个弹幕组成的数组就是弹幕库":["24.4"],"通常只需要":["24.4"],"text":["24.4"],"只有":["24.5"],"danmuku":["24.5","24.18"],"是必须的参数":["24.5"],"其余都是非必填":["24.5"],"弹幕数据":["24.5"],"speed":["24.5"],"弹幕持续时间":["24.5"],"范围在":["24.5"],"margin":["24.5"],"来自用户输入的弹幕":["24.6"],"beforeemit":["24.6"],"filter":["24.6"],"beforevisible":["24.6"],"artplayerplugindanmuku":["24.6"],"visible":["24.6"],"来自服务器的弹幕":["24.6"],"xml":["24.8"],"弹幕":["24.8"],"文件":["24.8"],"data":["24.9","24.11","24.12","24.13","24.14","24.18"],"通过方法":["24.10","24.12","24.13"],"进行隐藏或者显示弹幕":["24.10"],"通过属性":["24.11"],"判断当前弹幕是隐藏或者显示":["24.11"],"发送一条实时弹幕":["24.12"],"libs":["24.12","24.13","24.14","24.18"],"实时改变弹幕配置":["24.13"],"uncompiled":["24.13","24.14","24.18"],"通过":["24.14"],"方法可以重载弹幕库":["24.14"],"或者切换新弹幕库":["24.14"],"或者追加新的弹幕库":["24.14"],"用于清空当前显示的弹幕":["24.15"],"在初始化弹幕插件的时候":["24.16"],"是可以指定弹幕发射器的挂载位置的":["24.16"],"默认是挂载在控制栏的中部":["24.16"],"你也可以把它挂载在播放器以外的地方":["24.16"],"当播放器全屏的时候":["24.16"],"发射器会自动回到控制栏的中部":["24.16"],"假如你挂载的地方是亮色的话":["24.16"],"建议把":["24.16"],"用于获取当前弹幕配置":["24.17"],"鉴于捆绑的多国语言越来越多":["25.0"],"从":["25.0"],"默认语言有":["25.1"],"en":["25.1"],"zh":["25.1"],"打包前的语言文件存放于":["25.2"],"欢迎来添加你的语言":["25.2"],"打包后的语言文件存放于":["25.2"],"dist":["25.2"],"播放器挂载的":["26.1"],"视频源地址":["26.2"],"播放器的唯一标识":["26.3"],"构造函数接受一个函数作为第二个参数":["26.4"],"播放器初始化成功且视频可以播放时触发":["26.4"],"ready":["26.4"],"视频的海报":["26.5"],"是否自动播放":["26.10"],"是否使用快捷键":["26.19"],"字幕时间偏移":["26.24"],"是否使用":["26.26"],"初始化自定义的":["26.28","26.29","26.30","26.34"],"层":["26.28"],"设置面板":["26.29"],"右键菜单":["26.30"],"初始化自定义的底部":["26.31"],"控制栏":["26.31"],"是否在底部控制栏里显示":["26.32"],"画质选择":["26.32"],"列表":["26.32"],"在进度条上显示":["26.33"],"高亮信息":["26.33"],"插件":["26.34"],"在进度条上设置":["26.35"],"预览图":["26.35"],"设置视频的字幕":["26.36"],"支持字幕格式":["26.36"],"ass":["26.36"],"用于替换默认图标":["26.38"],"支持":["26.38"],"用于指明视频的格式":["26.39"],"需要配合":["26.39"],"customtype":["26.39"],"通过视频的":["26.40"],"自定义":["26.42"],"配置":["26.42"],"该配置会和自带的":["26.42"],"进行深度合并":["26.42"],"新增你的语言":["26.42"],"是否使用自动":["26.45"],"回放功能":["26.45"],"用于改变内置的css变量":["26.48"]},{"0":["3.25","3.26","5.8","13.28","21.0","24.5","25.0"],"1":["3.26","3.28","5.8","5.35","5.36","13.28","20.11","21.0","23.10","25.0"],"2":["3.28","20.8","23.8"],"3":["3.23","13.29","20.9","22.2","23.10","26.2"],"4":["6.2","13.29","16.2","22.45","26.42"],"5":["3.12","3.14","3.25","3.27","13.28","21.0","22.28","22.29","25.0","26.28","26.29"],"6":["2.0","6.3","7.3","12.0","16.3","17.3"],"7":["15.15","26.7"],"8":["20.3"],"9":["3.29","9.6","13.29","19.6","21.3","26.42"],"10":["2.2","3.11","7.2","17.2"],"11":["2.28"],"13":["6.2","6.3","16.2","16.3"],"14":["9.6","19.6"],"16":["3.29","13.29"],"19":["5.41"],"21":["6.4","6.5","7.3","7.4","8.4","16.4","16.5","17.3","17.4","18.4"],"22":["8.2","8.3","9.7","18.2","18.3","19.7"],"23":["22.28","26.28"],"24":["6.5","16.5"],"25":["3.28","24.5"],"29":["5.41","8.5","18.5"],"34":["22.29","26.29"],"35":["3.7"],"40":["7.5","17.5"],"50":["3.10"],"75":["13.28"],"200":["3.6","3.8","3.9","3.21"],"300":["3.17"],"1000":["3.15","3.22","3.24"],"2000":["3.4"],"3000":["3.13","3.16"],"code":["0.1","0.2","0.4","0.5","0.6","0.7","0.12","0.13","0.14","0.15","0.16","1.1","1.6","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.3","3.5","3.6","3.7","3.17","3.29","3.30","5.1","5.2","5.3","5.11","5.13","5.15","5.16","5.19","5.20","5.21","5.22","5.24","5.25","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.40","5.41","5.42","9.2","10.1","10.2","12.0","12.20","12.29","12.30","12.31","13.20","15.1","15.2","15.11","15.15","15.19","15.34","15.40","15.41","19.2","22.1","22.7","22.10","22.19","22.29","22.30","22.31","22.34","22.42","22.45","24.10","24.16","25.2","26.1","26.4","26.10","26.19","26.29","26.30","26.31","26.34","26.38","26.42","26.45","26.48"],"js":["0.2","0.4","0.13","0.16","2.2","2.18","2.22","2.24","2.28","2.29","2.30","2.31","5.41","6.2","6.3","6.4","7.4","8.4","9.2","9.5","9.6","10.2","12.0","15.15","15.41","16.2","16.3","16.4","17.4","18.4","19.2","19.6","22.1","22.2","22.19","22.28","22.29","22.45","24.4","24.6","24.11","24.12","24.13","24.14","25.1","26.2","26.4","26.28","26.29","26.31","26.42"],"var":["0.2","0.4","2.0","4.0","5.41","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.2","9.6","9.7","9.8","10.2","12.0","14.0","15.15","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.2","19.3","19.6","19.7","19.8","21.3","22.2","22.28","22.29","24.13","24.14","24.18","25.3","25.4","26.2","26.28","26.29"],"proxy":["0.3"],"方法用于代理":["0.3"],"hover":["0.3"],"方法用于代理自定义的":["0.3"],"div":["0.3","0.6","0.8","0.9","0.10","0.12","0.14","0.15","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","2.41","3.1","3.2","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.17","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.29","3.30","3.32","3.33","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.27","5.28","5.29","5.31","5.32","5.33","5.37","5.39","5.40","5.42","5.43","9.1","9.2","10.2","10.5","11.6","12.0","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.34","12.38","12.39","12.40","12.41","13.20","13.30","15.1","15.2","15.7","15.11","15.19","15.21","15.26","15.30","15.34","15.40","15.41","15.42","15.43","19.2","20.4","22.1","22.7","22.10","22.19","22.30","22.31","22.34","22.38","22.42","22.45","23.4","24.8","24.16","26.1","26.3","26.4","26.5","26.7","26.8","26.9","26.10","26.13","26.17","26.19","26.21","26.25","26.34","26.38","26.42","26.44","26.45","26.48"],"classname":["0.4","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.13","0.14","0.15","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","1.10","1.12","2.41","3.1","3.2","3.3","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.16","3.17","3.18","3.19","3.20","3.22","3.23","3.26","3.27","3.29","3.30","3.32","3.33","5.1","5.2","5.3","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.39","5.40","5.42","5.43","9.1","9.2","10.1","10.2","10.5","12.0","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.14","12.16","12.18","12.20","12.21","12.22","12.23","12.24","12.26","12.27","12.28","12.29","12.30","12.31","12.40","12.41","13.20","15.1","15.2","15.11","15.19","15.21","15.26","15.30","15.34","15.40","15.41","15.42","19.2","22.1","22.7","22.10","22.19","22.30","22.31","22.34","22.38","22.42","22.45","24.8","24.10","24.16","26.1","26.3","26.4","26.5","26.7","26.9","26.10","26.13","26.17","26.19","26.30","26.31","26.34","26.38","26.42","26.44","26.45","26.48"],"run":["0.4","0.5","0.6","0.7","0.10","0.12","0.13","0.14","0.15","0.16","1.1","1.6","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.3","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.17","3.22","3.29","3.30","3.32","5.1","5.2","5.3","5.7","5.9","5.11","5.13","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.24","5.25","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.40","5.42","5.43","9.1","9.2","10.1","10.2","10.5","12.0","12.6","12.7","12.8","12.10","12.20","12.24","12.28","12.29","12.30","12.31","13.20","15.1","15.2","15.11","15.15","15.19","15.21","15.30","15.34","15.40","15.41","19.2","22.1","22.7","22.10","22.19","22.29","22.30","22.31","22.34","22.42","22.45","24.8","24.10","24.16","26.1","26.4","26.5","26.7","26.10","26.19","26.30","26.31","26.34","26.38","26.42","26.45","26.48"],"art":["0.4","2.0","5.10","5.12","5.41","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.2","8.3","8.5","9.2","9.3","9.6","9.7","9.8","12.0","14.0","15.10","15.12","15.15","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.2","18.3","18.5","19.2","19.3","19.6","19.7","19.8","20.5","21.3","22.2","23.10","24.14","24.18","25.3","26.2"],"new":["0.4","2.0","4.0","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.3","9.2","9.3","9.6","9.7","9.8","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.3","19.2","19.3","19.6","19.7","19.8","20.5","22.2","24.14","24.18","25.3","26.2"],"artplayer":["0.4","2.0","4.0","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.2","9.3","9.7","9.8","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.3","19.7","19.8","20.3","20.6","21.4","22.2","23.3","23.4","23.6","23.9","23.10","24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17","26.2"],"container":["0.4","2.0","4.0","6.4","6.5","7.3","7.5","9.2","9.3","9.7","9.8","12.0","14.0","16.4","16.5","17.3","17.5","19.3","19.7","19.8","22.2","22.11","24.18","26.11"],"方法用于更新":["0.6"],"对象":["0.6"],"方法用于动态更新层":["0.8"],"show":["0.8","0.9","0.10","0.15","10.7","22.14","22.15"],"属性用于设置是否显示全部层":["0.8"],"toggle":["0.8","0.9","0.10","0.15","13.19","22.18"],"方法用于切换是否显示全部层":["0.8"],"方法用于动态更新控制器":["0.9"],"属性用于设置是否显示全部控制器":["0.9"],"方法用于切换是否显示全部控制器":["0.9"],"属性用于设置是否显示全部菜单":["0.10"],"方法用于切换是否显示全部菜单":["0.10"],"方法设置当前字幕地址和选项":["0.11"],"texttrack":["0.11"],"获取当前字幕轨":["0.11"],"activecues":["0.11"],"获取当前活跃的字幕列表":["0.11"],"cues":["0.11"],"属性用于切换是否显示加载层":["0.12"],"属性用于切换是否显示遮罩层":["0.14"],"属性用于设置是否显示全部设置项":["0.15"],"方法用于切换是否显示全部设置项":["0.15"],"字符串":["1.11"],"app":["2.0","4.0","7.2","7.5","9.2","9.3","9.7","9.8","12.0","14.0","17.2","17.5","19.3","19.7","19.8","22.2","24.18"],"url":["2.0","4.0","5.10","7.2","7.5","9.3","9.8","12.0","14.0","15.10","15.11","17.2","17.5","19.3","19.8","22.35","22.36","24.18","26.35","26.36"],"assets":["2.0","4.0","7.2","8.2","8.3","8.4","8.5","9.3","9.8","12.0","14.0","17.2","18.2","18.3","18.4","18.5","19.3","19.8","22.2","22.28","24.18","26.28"],"sample":["2.0","4.0","7.2","8.2","8.3","8.4","8.5","9.3","9.8","14.0","17.2","18.2","18.3","18.4","18.5","19.3","19.8","22.2","22.28","24.18","26.28"],"mp4":["2.0","4.0","7.2","14.0","17.2","24.18"],"on":["2.0","4.0","12.5","14.0","22.21","22.22","22.23","22.46"],"canplay":["2.0"],"事件":["2.41"],"浏览器可以播放媒体文件了":["2.42"],"浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束":["2.43"],"offlineaudiocontext":["2.44","12.44"],"duration":["2.45"],"媒体内容变为空":["2.46"],"例如":["2.46"],"视频停止播放":["2.47"],"获取媒体数据时出错":["2.48"],"media":["2.49","12.42","12.59"],"已加载元数据":["2.50"],"播放已暂停":["2.51"],"播放已开始":["2.52"],"由于缺乏数据而暂停或延迟后":["2.53"],"在浏览器加载资源时周期性触发":["2.54"],"播放速率发生变化":["2.55"],"跳帧":["2.56","2.57"],"用户代理":["2.58"],"媒体数据加载已暂停":["2.59"],"currenttime":["2.60"],"音量发生变化":["2.61"],"由于暂时缺少数据":["2.62"],"可以打印出视频全部的内置事件":["3.1"],"默认关闭":["3.1"],"默认为":["3.4","3.8","3.9","3.10","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.27","3.31","5.4"],"单位为毫秒":["3.15","3.21","3.24"],"true":["3.18","3.19","3.32","5.4","26.21","26.27"],"false":["3.20","3.31","3.33","13.20","13.33","26.8","26.9","26.13","26.18","26.20","26.22","26.23","26.25","26.37","26.44","26.46"],"是否把播放器挂在在":["3.31"],"元素下":["3.31"],"目前主要用于进度条的平滑效果":["3.33"],"dosomething":["4.0","14.0"],"video":["4.0","5.31","5.35","5.36","7.2","9.3","9.8","14.0","15.3","15.6","15.8","15.9","15.13","15.14","15.16","15.17","15.18","15.22","15.24","15.25","15.30","15.31","15.32","15.35","15.36","17.2","19.3","19.8","22.4","22.5","22.14","22.16","22.37","24.18","26.40"],"plugins":["4.0"],"ready":["4.0","12.53","14.0","22.4"],"可以在实例化之后再加载插件的函数":["4.0"],"销毁播放器":["5.4"],"接受一个参数表示是否销毁后同时移除播放器的":["5.4"],"html":["5.4","22.38","26.26","26.32"],"视频时间跳转":["5.5"],"单位秒":["5.5","5.6","5.7","26.33"],"视频时间快进":["5.6"],"视频时间快退":["5.7"],"设置和获取视频音量":["5.8"],"范围在":["5.8","26.24"],"string":["5.9","6.1","7.1","8.1","11.11","16.1","18.1","22.35","22.36","26.32","26.33","26.35","26.36"],"设置和获取视频地址":["5.9"],"类似":["5.10","5.11","5.12","5.14","5.38"],"但会执行一些优化操作":["5.10","5.11"],"switchurl":["5.12","15.12"],"但会带上之前的播放进度":["5.12"],"设置和获取视频是否静音":["5.13"],"设置和获取视频当前时间":["5.14"],"设置时间时和":["5.14"],"seek":["5.14"],"但它不会触发额外的事件":["5.14"],"返回的是一个":["5.17","5.18"],"promise":["5.17","5.18"],"设置和获取播放器窗口全屏":["5.19"],"设置和获取播放器网页全屏":["5.20"],"设置和获取播放器画中画模式":["5.21"],"只有在视频播放前才能看到海报效果":["5.22"],"boolean":["5.23","6.1","8.1","9.4","19.4","26.32"],"设置和获取播放器迷你模式":["5.23"],"获取视频是否正在播放中":["5.24"],"设置和获取播放器翻转":["5.27"],"支持":["5.27"],"normal":["5.27","13.30"],"horizontal":["5.27","13.30"],"vertical":["5.27","13.30"],"设置和获取播放器播放速度":["5.28"],"设置和获取播放器长宽比":["5.29"],"元素的属性":["5.31"],"动态获取和设置视频类型":["5.32"],"动态获取和设置播放器主题颜色":["5.33"],"常配合":["5.35","5.36"],"timeupdate":["5.35","5.36"],"事件使用":["5.35","5.36"],"和":["5.37","26.6","26.14","26.15","26.16"],"removeeventlistener":["5.37","15.37"],"当使用":["5.37"],"来处理事件":["5.37"],"播放器销毁时也会自动销毁该事件":["5.37"],"document":["5.38","12.41","15.38"],"queryselector":["5.38","15.38"],"但被查询的对象局限于当前播放器内":["5.38"],"可以避免同类名的错误":["5.38"],"元素":["5.39"],"动态设置缩略图":["5.42"],"number":["5.43","9.2","17.1","19.2","22.33","22.35","26.33","26.35"],"动态设置字幕偏移":["5.43"],"是否禁用组件":["6.1","7.1","8.1"],"name":["6.1","7.1","7.2","8.1","14.0","16.1","17.2","18.1","22.36","26.36"],"组件唯一名称":["7.1"],"用于标记类名":["7.1"],"index":["7.1","7.2","17.1","17.2","24.6","24.9","24.11","24.12","24.13","24.14"],"controls":["7.2","17.2"],"your":["7.2","17.2","21.2","22.42"],"button":["7.2","17.2","22.17","22.18","22.22","22.23","22.43","22.47"],"img":["8.2","8.3","8.4","8.5","18.2","18.3","18.4","18.5","22.28","26.28"],"layer":["8.2","8.3","8.4","8.5","12.35","12.36","18.2","18.3","18.4","18.5","22.28"],"png":["8.2","8.3","8.5","18.2","18.3","18.5"],"aspectratio":["9.1"],"subtitleoffset":["9.1"],"列表宽度":["9.2"],"tooltip":["9.2","9.4","9.5","19.2"],"提示文本":["9.2","9.5"],"元素的图标":["9.4","9.5"],"switch":["9.4","13.18","19.4","22.20"],"按钮默认状态":["9.4"],"onswitch":["9.4"],"function":["9.4","9.5","11.9","11.10","19.5","20.5","22.44","23.5","24.6"],"按钮切换事件":["9.4"],"range":["9.5","22.24"],"array":["9.5","19.5"],"默认状态数组":["9.5"],"onrange":["9.5","19.5"],"完成时触发的事件":["9.5"],"onchange":["9.5"],"变化时触发的事件":["9.5"],"here":["10.0"],"when":["10.3","11.1","13.14","13.15","13.23","13.24","15.37","22.4","22.5","22.12","22.25"],"using":["10.3","15.37"],"following":["10.3"],"methods":["10.3"],"to":["10.3","10.7","10.10","10.12","10.13","10.14","10.16","12.0","12.1","12.2","13.0","13.5","13.18","13.19","13.30","13.31","15.5","15.10","15.12","15.37","15.39","21.2","22.4","22.9","22.13","22.14","22.27","22.40","22.43","22.44","22.47"],"handle":["10.3","15.37"],"event":["10.3","12.41","13.8","13.9","13.10","15.37","19.2","19.5"],"will":["10.3","15.11","15.37","22.8","22.11","22.17"],"also":["10.3"],"be":["10.3","15.11"],"automatically":["10.3","12.19","15.30","15.37"],"destroyed":["10.3","12.6"],"get":["10.4","15.13","15.20","15.23","15.27","15.28","15.29","15.32","15.33"],"del":["10.4"],"of":["10.5","10.6","11.2","11.3","11.4","11.5","12.17","13.4","13.6","13.7","13.11","13.14","13.23","13.25","13.26","15.3","15.14","15.16","15.17","15.18","15.26","15.28","15.29","15.30","15.31","16.1","17.1","18.1","22.3","22.7","22.15"],"player":["10.5","11.6","11.12","12.5","12.11","12.13","12.17","12.28","13.2","13.31","13.32","15.4","15.19","15.20","15.21","15.23","15.26","15.27","15.33","20.5","22.1","22.3","22.4","22.6","22.7","22.11","22.46","23.5"],"retrieve":["10.6","15.9"],"value":["10.6"],"update":["10.6","10.8","10.9","10.15"],"only":["10.7","10.16","15.22","22.5","22.25"],"one":["10.7","10.16"],"property":["10.7","10.12","11.1","22.32","22.33","22.35","22.36"],"used":["10.7","10.12","10.13","10.14","22.6"],"display":["10.7","10.12","10.14","22.41","22.43","22.47"],"adding":["10.8"],"remove":["10.8","10.9","10.10","10.13","10.15"],"removing":["10.8"],"dynamically":["10.10","10.16","15.42","15.43"],"items":["10.10","13.6","13.7"],"returns":["10.11"],"current":["10.11","15.14","15.16","15.17","15.18"],"address":["10.11","12.2","15.9","15.10","15.12"],"style":["10.11"],"method":["10.11","10.16"],"is":["10.12","10.14","12.2","12.3","12.5","12.6","12.9","12.10","12.11","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.53","13.20","13.24","13.27","13.29","13.33","15.10","15.13","15.22","15.24","15.35","22.4","22.24"],"set":["10.12","10.14","15.9","15.23","15.30","15.31","15.32","15.33","15.42","15.43"],"whether":["10.12","10.14","13.31","15.4","15.13","15.24","22.9","22.13","22.27"],"a":["10.13","12.26","12.56","12.57","15.4","15.5","22.40","22.43","22.49"],"item":["10.15"],"add":["10.16","21.2","22.42","22.44"],"refer":["11.0","13.0"],"you":["11.1","20.10","20.11","22.26"],"can":["11.1","12.42","13.1","20.10","22.49"],"use":["11.1","22.27"],"this":["11.1","20.10"],"information":["11.2","15.26"],"environment":["11.3"],"variables":["11.3","15.40","20.10","22.48"],"time":["11.4","12.27","15.5","15.6","15.7","15.14","22.33","26.33"],"default":["11.5","13.17","13.20","13.22","13.24","13.28","13.29","13.33","19.4","19.5","20.5","23.5"],"configuration":["11.5"],"functions":["11.6"],"for":["11.6","11.7","11.8","11.10","12.1","12.46","13.10","13.11","13.12","13.13","13.15","13.16","13.21","17.1","20.11","22.18"],"the":["11.6","12.5","12.11","12.47","12.49","12.55","12.60","13.0","13.16","13.21","13.31","13.32","13.33","15.6","15.8","15.9","15.13","15.14","15.16","15.20","15.21","15.22","15.23","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.38","15.39","16.1","18.1","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.42","22.46","22.47"],"validation":["11.7","11.9"],"constructor":["11.8"],"tool":["11.10"],"required":["11.11"],"s":["11.12","15.33"],"listening":["12.0"],"able":["12.1","12.2"],"play":["12.1","12.2","12.42","22.4"],"and":["12.2","15.3","15.8","15.9","15.13","15.20","15.23","15.27","15.28","15.29","15.30","15.31","15.32","15.33","15.37","19.1","22.4","22.17","22.38"],"paused":["12.3"],"starts":["12.4"],"playing":["12.4"],"pressed":["12.5"],"gains":["12.7"],"loses":["12.8"],"focus":["12.8"],"double":["12.9","13.24"],"clicked":["12.9","12.10"],"while":["12.11"],"loading":["12.11"],"hovered":["12.12"],"or":["12.12","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"unhovered":["12.12"],"by":["12.12","13.28","22.9","22.11","22.39"],"moves":["12.13"],"over":["12.13"],"size":["12.14","12.19"],"changes":["12.14","12.16","12.17","12.40"],"appears":["12.15","22.5","22.25"],"in":["12.15","12.25","12.27","12.28","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.12","13.17","13.22","15.5","15.7","15.21","20.10","22.17","22.20","22.32","22.42","22.48"],"viewport":["12.15"],"locked":["12.16"],"state":["12.16","12.40","15.3","19.4","19.5"],"sets":["12.18","12.19"],"height":["12.18","15.30"],"flips":["12.20"],"into":["12.21","12.22"],"full":["12.21","12.22"],"screen":["12.21","12.22"],"error":["12.22"],"enters":["12.23"],"web":["12.23","15.20","22.23","22.46"],"fullscreen":["12.23","22.23"],"mode":["12.24","12.25","15.21","22.8","22.12","22.26","22.27","24.5"],"picture":["12.25","15.21","22.20"],"takes":["12.26"],"jumps":["12.27"],"updated":["12.30"],"panel":["12.32","13.5","13.6","13.7"],"shown":["12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"hidden":["12.32","12.33","12.34","12.35","12.36","12.38","12.39"],"click":["12.37","13.3","19.2"],"menu":["12.37","13.3"],"from":["12.41","15.35","15.36","21.0","23.9"],"browser":["12.43"],"estimates":["12.43"],"triggered":["12.45","19.5","22.4"],"becomes":["12.46"],"empty":["12.46"],"example":["12.46"],"occurred":["12.48"],"metadata":["12.50","22.37","26.37"],"playback":["12.51","12.52","12.62","13.27","15.28","22.15"],"periodically":["12.54"],"user":["12.58"],"agent":["12.58"],"volume":["12.61"],"which":["13.1","15.8","15.10","22.5","22.8"],"print":["13.1","13.32"],"out":["13.1"],"all":["13.1"],"built":["13.1","22.42","22.48"],"right":["13.3"],"context":["13.3","22.17"],"notification":["13.4"],"message":["13.4"],"settings":["13.5","13.6","13.7"],"pixels":["13.5","13.10"],"defaults":["13.5","13.8","13.9","13.30"],"milliseconds":["13.8","13.9","13.17","13.22"],"view":["13.10"],"records":["13.11"],"automatic":["13.11","13.14","13.15"],"feature":["13.12","13.13","22.14","22.15","22.16","22.45"],"hiding":["13.13"],"reconnection":["13.14","13.15"],"attempts":["13.14"],"attempt":["13.15"],"bottom":["13.16","22.32"],"measured":["13.17"],"pause":["13.19","15.3"],"single":["13.20"],"delay":["13.21"],"rotation":["13.21"],"unit":["13.22"],"multiplier":["13.23"],"rate":["13.23"],"speed":["13.23","13.25","15.28","22.15"],"tapped":["13.24"],"sliding":["13.25"],"adjusting":["13.26"],"with":["13.26","19.1","22.39","22.42"],"shortcuts":["13.26"],"progress":["13.27","22.25","22.33"],"adjusted":["13.27"],"via":["13.27"],"speeds":["13.28"],"ratios":["13.29"],"mount":["13.31","22.26"],"requestanimationframe":["13.33"],"currently":["13.33","15.24","22.3","22.6","22.41"],"myplugin":["14.0"],"console":["14.0"],"info":["14.0"],"return":["14.0","15.39","22.49"],"something":["14.0"],"accepts":["15.4"],"indicating":["15.4"],"specific":["15.5"],"fast":["15.6","22.44"],"rewind":["15.7"],"seconds":["15.7"],"gets":["15.8"],"ranges":["15.8"],"similar":["15.10","15.12"],"but":["15.11","15.12","15.38"],"some":["15.11"],"optimization":["15.11"],"operations":["15.11"],"executed":["15.11"],"it":["15.12","19.1","22.16","22.17"],"setting":["15.14"],"frame":["15.16"],"optional":["15.16"],"screenshot":["15.17","15.18"],"window":["15.19","22.22"],"page":["15.20"],"effect":["15.22"],"visible":["15.22"],"should":["15.25"],"auto":["15.25"],"adjust":["15.25"],"position":["15.26"],"supports":["15.27","22.38","22.41"],"aspect":["15.29","22.16"],"ratio":["15.29","22.16"],"calculate":["15.30"],"attributes":["15.31","22.37"],"that":["15.35","15.36"],"cached":["15.35"],"ranging":["15.35","15.36"],"has":["15.36"],"been":["15.36"],"object":["15.38"],"being":["15.38"],"queried":["15.38"],"css":["15.40","22.48"],"qualities":["15.41"],"subtitle":["15.43"],"offset":["15.43","22.24"],"component":["16.1","18.1"],"unique":["16.1","17.1","18.1"],"class":["17.1"],"identification":["17.1"],"then":["19.1"],"comes":["19.1"],"four":["19.1"],"width":["19.2"],"text":["19.2","26.33"],"icon":["19.4"],"upon":["19.5"],"usage":["20.0"],"bash":["20.1","23.1"],"npm":["20.1","23.1","24.2"],"jsdelivr":["20.2","23.2"],"net":["20.2","23.2","24.3"],"https":["20.2","23.2","24.3"],"title":["20.3","23.3"],"demo":["20.3"],"meta":["20.3"],"charset":["20.3"],"utf":["20.3"],"template":["20.4","23.4"],"ref":["20.4"],"artref":["20.4","20.5","23.5"],"export":["20.5","23.5"],"option":["20.5","23.5"],"getinstance":["20.5","23.5"],"rest":["20.5","23.5"],"const":["20.5","23.5","23.9"],"import":["20.8","20.9","20.10","23.8","23.10"],"type":["20.9","23.10"],"ts":["20.9","26.39"],"case":["20.10"],"manually":["20.10"],"types":["20.10"],"latest":["20.11"],"major":["20.11"],"version":["20.11","21.0","23.11"],"chrome":["20.11"],"last":["20.11"],"multilingual":["21.0"],"packs":["21.0"],"starting":["21.0"],"are":["21.1","22.21"],"en":["21.1","26.41"],"zh":["21.1","21.4","25.2","25.4","26.41"],"cn":["21.1","25.1"],"welcome":["21.2"],"packaged":["21.2"],"at":["21.2"],"dist":["21.2"],"i18n":["21.4","25.4"],"tw":["21.4","25.2","25.4"],"mounts":["22.1"],"identifier":["22.3"],"successfully":["22.4"],"initialized":["22.4"],"color":["22.6","24.5"],"live":["22.8"],"hide":["22.8"],"mute":["22.9"],"fill":["22.11"],"entire":["22.11"],"enter":["22.12"],"mini":["22.12"],"appear":["22.17"],"toolbar":["22.17"],"there":["22.21"],"multiple":["22.21"],"players":["22.21"],"5s":["22.24","26.24"],"bar":["22.25","22.31","22.32","22.33"],"side":["22.26"],"rendering":["22.26"],"useful":["22.26"],"if":["22.26"],"want":["22.26"],"list":["22.32"],"control":["22.32"],"description":["22.32","22.33","22.35","22.36"],"thumbnail":["22.35"],"ass":["22.36"],"additional":["22.37"],"these":["22.37"],"strings":["22.38"],"htmlelement":["22.38","26.38"],"customtype":["22.39"],"same":["22.39"],"as":["22.39"],"file":["22.39"],"extension":["22.39"],"delegate":["22.40"],"decoding":["22.40"],"third":["22.40","22.49"],"tolowercase":["22.41","26.41"],"language":["22.42"],"forward":["22.44"],"rotate":["22.46"],"mobile":["22.46"],"change":["22.48"],"party":["22.49"],"htmlcanvaselement":["22.49","26.49"],"head":["23.3"],"let":["23.10"],"null":["23.10"],"参数":["23.10"],"对于古老的浏览器":["23.11"],"可以使用":["23.11"],"legacy":["23.11"],"文件":["23.11"],"install":["24.2"],"就可以发送一个弹幕":["24.4"],"其余都是非必要参数":["24.4"],"弹幕文本":["24.4"],"弹幕上下边距":["24.5"],"支持像素数字和百分比":["24.5"],"opacity":["24.5"],"弹幕透明度":["24.5"],"ffffff":["24.5"],"默认弹幕颜色":["24.5"],"可以被单独弹幕项覆盖":["24.5"],"data":["24.6","24.7","24.10","24.15","24.17"],"libs":["24.6","24.7","24.9","24.10","24.11","24.15","24.17"],"uncompiled":["24.6","24.7","24.9","24.10","24.11","24.12","24.15","24.17"],"plugin":["24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17"],"danmuku":["24.6","24.9","24.11","24.12","24.13","24.14","24.15","24.17"],"保存到数据库":["24.6"],"savedanmu":["24.6"],"bilibili":["24.8"],"网站的弹幕格式一致":["24.8"],"theme":["24.16"],"设置成":["24.16"],"light":["24.16"],"否则会看不清":["24.16"],"无需手动导入":["25.1"],"手动导入的语言有":["25.2"],"cs":["25.2"],"es":["25.2"],"fa":["25.2"],"fr":["25.2"],"id":["25.2"],"pl":["25.2"],"ru":["25.2"],"ar":["25.2"],"容器":["26.1"],"目前只用于记忆播放":["26.3"],"autoplayback":["26.3"],"事件一样":["26.4"],"只会出现在播放器初始化且未播放的状态下":["26.5"],"播放器主题颜色":["26.6"],"目前用于":["26.6"],"进度条":["26.6"],"播放器的默认音量":["26.7"],"使用直播模式":["26.8"],"会隐藏进度条和播放时间":["26.8"],"是否默认静音":["26.9"],"播放器的尺寸默认会填充整个":["26.11"],"容器尺寸":["26.11"],"所以经常出现黑边":["26.11"],"该值能自动调整播放器尺寸以隐藏黑边":["26.11"],"当播放器滚动到浏览器视口以外时":["26.12"],"自动进入":["26.12"],"迷你播放":["26.12"],"模式":["26.12","26.27"],"是否循环播放":["26.13"],"是否显示视频翻转功能":["26.14"],"目前只出现在":["26.14"],"设置面板":["26.14","26.15","26.16","26.18","26.24"],"右键菜单":["26.14","26.15","26.16"],"是否显示视频播放速度功能":["26.15"],"会出现在":["26.15","26.16"],"是否显示视频长宽比功能":["26.16"],"是否在底部控制栏里显示":["26.17","26.18","26.20"],"视频截图":["26.17"],"功能":["26.17"],"的开关按钮":["26.18","26.20"],"画中画":["26.20"],"假如页面里同时存在多个播放器":["26.21"],"是否只能让一个播放器播放":["26.21"],"是否在底部控制栏里显示播放器":["26.22","26.23"],"窗口全屏":["26.22"],"按钮":["26.22","26.23","26.47"],"网页全屏":["26.23"],"出现在":["26.24"],"迷你进度条":["26.25"],"只在播放器失去焦点后且正在播放时出现":["26.25"],"挂载模式":["26.26"],"假如你希望在播放器挂载前":["26.26"],"就提前渲染好播放器所需的":["26.26"],"时有用":["26.26"],"你可以通过":["26.26"],"在移动端是否使用":["26.27"],"类型":["26.32"],"描述":["26.32","26.33","26.36"],"默认画质":["26.32"],"画质名字":["26.32"],"高亮时间":["26.33"],"高亮文本":["26.33"],"预览图地址":["26.35"],"预览图数量":["26.35"],"column":["26.35"],"字幕名字":["26.36"],"字幕地址":["26.36"],"字幕类型":["26.36"],"可选":["26.36"],"preload":["26.37"],"更多视频属性":["26.37"],"这些属性将直接写入视频元素里":["26.37"],"字符串和":["26.38"],"一起使用":["26.39"],"默认视频的格式就是视频地址的后缀":["26.39"],"如":["26.39"],"m3u8":["26.39"],"mkv":["26.39"],"但有时候视频地地址没有正确的后缀":["26.39"],"进行匹配":["26.40"],"把视频解码权交给第三方程序进行处理":["26.40"],"处理的函数能接收三个参数":["26.40"],"视频":["26.40"],"dom":["26.40"],"默认显示语言":["26.41"],"目前支持":["26.41"],"是否在移动端显示一个":["26.43"],"锁定按钮":["26.43"],"用于隐藏底部":["26.43"],"控制栏":["26.43"],"是否在移动端添加长按视频快进功能":["26.44"],"是否在移动端的网页全屏时":["26.46"],"根据视频尺寸和视口尺寸":["26.46"],"旋转播放器":["26.46"],"是否显示":["26.47"],"当前只有部分浏览器支持该功能":["26.47"],"函数可以返回一个第三方的":["26.49"],"或者":["26.49"],"htmlvideoelement":["26.49"],"例如可以代理一个已经存在的":["26.49"]},{"0":["9.5","13.26","15.8","15.35","15.36"],"1":["9.5","13.26","15.8","15.35","15.36","19.5","20.10"],"2":["13.28","22.1","24.5","26.1"],"3":["20.7","20.10","23.7"],"4":["22.7","22.10","22.19","22.30","22.31","22.38","22.42","25.1","26.10","26.19","26.30","26.31","26.38","26.45","26.48"],"5":["9.5","13.12","19.5","22.45","26.45"],"6":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40"],"7":["2.19","2.21","2.23","2.25","2.26","5.15","5.26","5.30","15.30","22.4","22.38","26.4","26.38"],"8":["2.17","2.20","5.1","5.13","5.20","5.28","5.29","5.31","5.32","5.33","5.40","12.20","15.40"],"9":["2.29","2.30","2.31","5.11","5.19","5.21","5.22","5.34","12.29","12.30","12.31","15.11","15.19","15.21","15.34","22.4","22.42","26.4"],"10":["2.6","2.18","2.24","7.5","9.5","12.24","13.11","13.24","17.5","24.4"],"11":["5.2","5.3","5.20","5.30","12.28","15.2","15.30","23.11"],"12":["22.30","26.30"],"15":["22.34","26.34"],"16":["22.31","26.31"],"17":["4.0"],"19":["15.41"],"25":["13.28"],"29":["15.41"],"35":["13.7"],"50":["13.10"],"200":["13.6","13.8","13.9","13.21"],"250":["9.2","13.5","19.2"],"300":["13.17"],"1000":["13.22","24.6"],"2000":["13.4"],"是指挂载在":["0.0","1.0","5.0"],"js":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.14","0.15","1.1","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.3","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","3.30","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.24","5.25","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.37","5.40","5.42","5.43","9.1","9.4","10.1","10.4","10.5","10.6","10.13","12.6","12.18","12.20","12.24","12.28","12.29","12.30","12.31","13.20","15.1","15.2","15.11","15.19","15.21","15.26","15.30","15.34","15.40","15.42","19.5","21.0","22.4","22.7","22.10","22.30","22.31","22.34","22.38","22.42","24.7","24.9","24.10","24.15","24.16","24.17","25.0","26.1","26.7","26.10","26.19","26.30","26.33","26.34","26.38","26.45","26.48"],"var":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.13","0.14","0.15","0.16","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","5.2","5.3","5.11","5.13","5.15","5.19","5.21","5.22","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.40","5.42","9.4","10.1","10.5","12.29","12.30","12.31","13.20","15.2","15.11","15.19","15.21","15.30","15.40","15.41","21.4","22.1","22.7","22.10","22.19","22.30","22.31","22.42","22.45","24.6","24.9","24.10","24.11","24.12","25.1","26.1","26.4","26.10","26.19","26.30","26.31","26.38","26.42","26.45"],"art":["0.1","0.2","0.5","0.6","0.7","0.10","0.13","0.15","0.16","2.2","2.6","2.11","2.12","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","2.39","5.15","5.19","5.21","5.22","5.26","5.30","5.40","8.4","9.4","10.1","10.2","12.31","13.20","15.19","15.21","15.30","15.40","15.41","18.4","20.10","21.4","22.1","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.45","23.5","24.6","24.11","24.12","24.13","25.1","25.4","26.1","26.4","26.19","26.28","26.29","26.30","26.31","26.34","26.38","26.40","26.42","26.45"],"new":["0.1","0.2","0.6","0.7","0.13","0.15","0.16","2.2","2.6","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.11","5.22","5.40","5.41","8.2","8.4","8.5","10.1","10.2","15.11","15.15","15.19","15.21","15.30","15.41","18.2","18.4","18.5","21.3","21.4","22.1","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.45","23.5","24.6","24.11","24.12","24.13","25.4","26.1","26.4","26.28","26.29","26.30","26.31","26.42"],"artplayer":["0.2","0.7","0.13","0.15","0.16","2.2","2.22","2.24","2.28","2.29","2.30","2.31","3.5","3.6","3.7","3.29","3.30","5.11","5.22","5.41","8.2","8.3","8.4","8.5","9.6","10.1","10.2","13.20","15.11","15.15","15.19","15.30","15.41","18.2","18.3","18.4","18.5","19.2","19.6","20.1","20.8","20.9","20.10","21.0","21.3","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.45","23.1","23.8","24.2","24.3","24.8","24.16","25.0","25.3","26.4","26.26","26.28","26.29","26.30","26.31","26.42"],"container":["0.2","0.3","0.13","0.16","2.2","2.28","5.11","5.41","6.2","6.3","7.4","8.2","8.3","8.4","8.5","9.6","10.2","15.11","15.15","15.19","15.41","16.2","16.3","17.4","18.2","18.3","18.4","18.5","19.2","19.6","20.5","21.3","21.4","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.45","23.5","23.9","24.6","24.11","24.12","24.13","24.14","25.3","25.4","26.2","26.4","26.28","26.29","26.31","26.42"],"app":["0.2","0.4","0.13","5.41","6.2","6.3","6.4","6.5","7.3","7.4","8.2","8.3","8.4","8.5","9.6","10.2","15.11","15.15","15.41","16.2","16.3","16.4","16.5","17.3","17.4","18.2","18.3","18.4","18.5","19.2","19.6","20.3","20.4","22.1","22.19","22.28","22.29","22.45","24.11","24.12","24.13","24.14","25.4","26.2","26.4","26.28","26.29","26.42"],"url":["0.2","0.4","5.41","6.2","6.3","6.4","6.5","7.3","7.4","8.2","8.3","8.5","9.2","9.6","9.7","10.2","15.15","15.41","16.2","16.3","16.4","16.5","17.3","17.4","18.2","18.3","18.5","19.2","19.6","19.7","22.19","22.28","22.29","22.32","22.39","22.45","24.12","24.13","24.14","26.28","26.29","26.32","26.40","26.42"],"classname":["0.3","0.11","1.11","3.15","3.21","3.24","3.25","3.28","3.31","5.4","5.14","5.27","5.35","5.36","5.37","5.38","9.4","10.4","10.6","10.7","10.13","10.16","11.6","12.1","12.2","12.5","12.11","12.12","12.13","12.15","12.17","12.19","12.25","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","13.2","13.3","13.5","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","13.32","15.3","15.5","15.6","15.7","15.8","15.9","15.10","15.13","15.20","15.22","15.23","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.39","15.43","19.4","22.4","22.9","22.13","22.33","22.41","22.48","26.6","26.8","26.12","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.32","26.33","26.37","26.39","26.41","26.43","26.46","26.47","26.49"],"run":["0.3","0.8","0.9","0.11","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.1","3.2","3.4","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.33","5.4","5.5","5.6","5.8","5.10","5.12","5.14","5.23","5.27","5.35","5.36","5.37","5.38","5.39","9.4","10.4","10.6","10.7","10.13","10.16","11.6","12.1","12.2","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.22","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","15.3","15.6","15.7","15.8","15.9","15.13","15.20","15.22","15.24","15.25","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.42","15.43","19.4","22.4","22.9","22.13","22.33","22.38","22.41","22.48","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.27","26.32","26.33","26.37","26.39","26.41","26.43","26.44","26.46","26.47","26.49"],"code":["0.3","0.8","0.9","0.10","0.11","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","2.41","3.1","3.2","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","5.4","5.5","5.6","5.7","5.8","5.9","5.10","5.12","5.14","5.17","5.18","5.23","5.27","5.35","5.36","5.37","5.38","5.39","5.43","9.1","9.4","10.4","10.5","10.6","10.7","10.13","10.16","11.6","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.8","13.9","13.17","13.22","13.29","13.30","15.3","15.7","15.8","15.9","15.13","15.20","15.21","15.24","15.26","15.27","15.28","15.29","15.30","15.31","15.32","15.33","15.37","15.42","15.43","19.4","21.0","22.4","22.38","22.48","24.8","26.3","26.5","26.7","26.8","26.9","26.12","26.13","26.17","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.27","26.32","26.33","26.37","26.39","26.41","26.43","26.44","26.46","26.47"],"document":["0.3","22.1"],"assets":["0.4","5.41","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.2","9.6","9.7","10.2","15.11","15.15","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.2","19.6","19.7","22.29","22.45","24.12","24.13","24.14","26.2","26.29","26.42"],"sample":["0.4","5.41","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.2","9.7","10.2","12.0","15.15","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.2","19.7","22.29","24.13","24.14","26.2","26.29","26.42"],"video":["0.4","5.41","6.2","6.3","6.4","6.5","7.3","7.5","8.2","8.3","8.5","9.2","9.7","10.2","11.5","12.11","13.1","15.5","16.2","16.3","16.4","16.5","17.3","17.5","18.2","18.3","18.5","19.2","19.7","22.13","22.15","22.29","22.44","24.13","24.14","26.2","26.49"],"mp4":["0.4","6.3","6.4","6.5","7.3","7.5","8.2","8.3","8.5","9.2","9.3","9.7","9.8","12.0","16.3","16.4","16.5","17.3","17.5","18.2","18.3","18.5","19.2","19.3","19.7","19.8","22.2","24.14","26.2"],"test":["0.4"],"foo":["0.4"],"bar":["0.4","13.16","13.33","22.6","22.8","22.17","22.22","22.23"],"const":["0.4","9.5","19.5","20.9"],"获取整体的字幕列表":["0.11"],"div":["0.11","3.31","5.4","5.35","5.36","5.38","9.4","10.4","10.6","10.7","10.13","10.16","11.9","11.12","12.1","12.2","12.5","12.11","12.12","12.32","12.33","12.35","12.36","12.37","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.17","13.22","13.26","13.28","13.29","13.32","15.3","15.5","15.6","15.8","15.9","15.10","15.12","15.13","15.16","15.17","15.18","15.20","15.22","15.23","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.39","19.4","20.3","22.4","22.9","22.13","22.24","22.27","22.33","22.41","22.48","26.6","26.12","26.14","26.15","26.16","26.18","26.20","26.22","26.23","26.24","26.26","26.27","26.32","26.33","26.37","26.39","26.40","26.41","26.43","26.46","26.47","26.49"],"console":["1.1","2.0","12.0","24.18"],"info":["2.0","12.0","24.18"],"只监听一次事件":["2.0"],"但估计没有足够的数据来支撑播放到结束":["2.42"],"渲染完成":["2.44"],"属性的值改变时触发":["2.45"],"当这个":["2.46"],"因为":["2.47"],"或者资源类型不是受支持的媒体格式":["2.48"],"中的首帧已经完成加载":["2.49"],"播放准备开始":["2.53"],"seek":["2.56","2.57","12.56","12.57","13.25","15.14"],"user":["2.58"],"属性指定的时间发生变化":["2.60"],"播放已停止":["2.62"],"也是指挂载在":["3.0"],"构造函数":["3.0"],"组件唯一名称":["6.1","8.1"],"用于标记类名":["6.1","8.1"],"index":["6.1","7.5","8.1","16.1","17.5","18.1","24.7","24.10","24.15","24.16","24.17"],"number":["6.1","7.1","8.1","16.1","18.1"],"contextmenu":["6.4","6.5","16.4","16.5"],"name":["6.5","7.5","9.8","15.16","16.5","17.5","19.8","22.32"],"组件索引":["7.1"],"用于显示的优先级":["7.1"],"html":["7.1","7.2","9.3","9.8","15.4","17.1","17.2","19.3","19.8","22.26","22.32"],"element":["7.1","13.31","15.31","17.1"],"position":["7.2","7.5","17.2","17.5"],"left":["7.2","13.25","17.2"],"tooltip":["7.2","9.8","17.2","19.4","19.5","19.8"],"style":["7.2","9.2","17.2","22.36","26.36"],"color":["7.2","15.33","17.2"],"red":["7.2","17.2"],"click":["7.2","13.18","13.19","17.2"],"function":["7.2","17.2","19.4","22.17","22.34","22.40","23.10","26.34"],"args":["7.2","17.2"],"controls":["7.3","7.5","17.3","17.5"],"add":["7.3","17.3"],"button1":["7.5","17.5"],"png":["8.4","18.4","22.28","26.28"],"setting":["9.2","9.3","9.7","9.8","19.2","19.3","19.7","19.8"],"true":["9.2","9.3","9.7","9.8","13.18","13.19","13.20","13.32","19.2","19.3","19.7","19.8","24.6"],"settings":["9.2","9.3","9.8","19.2","19.3","19.8","22.14","22.16","22.18","22.24"],"subtitle":["9.2","19.2"],"01":["9.2","9.3","19.2"],"default":["9.2","11.12","13.3","13.10","13.11","13.12","13.13","13.14","13.16","13.18","13.19","13.23","13.25","13.26","13.32","19.2"],"span":["9.2"],"multi":["9.3","19.3"],"level":["9.3","13.0","19.3"],"selector":["9.3","19.3"],"提示文本":["9.4"],"value":["9.5","22.11"],"min":["9.5"],"flip":["9.7","19.1","19.7"],"slider":["9.8","19.8"],"5x":["9.8","19.8"],"icon":["9.8","19.8"],"refer":["10.0","15.0"],"to":["10.0","10.8","11.0","11.1","12.53","12.58","13.4","13.8","13.9","13.21","13.25","15.0","15.4","15.14","20.11"],"method":["10.3"],"used":["10.3","13.33","15.35","15.36","16.1","17.1","18.1","22.3"],"hover":["10.3"],"delete":["10.4"],"clear":["10.4"],"object":["10.6","26.11"],"updating":["10.8"],"show":["10.8","10.9","10.10","10.15"],"property":["10.8","10.9","10.15"],"set":["10.8","10.9","10.15"],"whether":["10.9","10.15"],"display":["10.9","17.1","22.17"],"update":["10.10"],"attribute":["10.10","10.12"],"switch":["10.11"],"toggle":["10.12","10.14"],"the":["11.0","12.45","13.1","15.0","15.5","15.12","22.8","22.25","22.26","22.37","22.43","22.44"],"want":["11.1"],"manage":["11.1"],"multiple":["11.1"],"players":["11.1"],"player":["11.2","11.3","11.4","11.7","11.11","15.28","15.29","15.37","15.38","15.39","22.5","22.12","22.21","22.25","22.26"],"options":["11.7","11.9","11.12","22.36"],"event":["11.8","12.0","19.4","22.4"],"dispatcher":["11.8"],"for":["11.9","11.11","13.23","13.33","16.1","18.1","22.3","22.6","22.40","22.49"],"type":["11.10"],"checking":["11.10"],"on":["12.0","13.24","19.5","22.20","22.27","22.43","22.44","24.18"],"canplay":["12.0"],"listen":["12.0"],"an":["12.0"],"only":["12.0","22.3","22.14","22.21","22.47"],"once":["12.0"],"first":["12.1","12.49","13.0"],"time":["12.1","12.60","24.4"],"mouse":["12.12"],"hidden":["12.37"],"file":["12.42","20.11"],"but":["12.42","15.10","15.14"],"estimates":["12.42"],"there":["12.42"],"it":["12.43","15.14","22.15","22.49"],"can":["12.43","15.38","20.11","22.11","22.40"],"play":["12.43"],"rendering":["12.44"],"when":["12.45","12.46"],"this":["12.46","22.11"],"has":["12.46","12.47","12.50","12.51","12.52","12.62"],"stopped":["12.47"],"while":["12.48","12.54","14.0"],"fetching":["12.48"],"media":["12.48"],"frame":["12.49","15.17","15.18"],"start":["12.53"],"triggered":["12.54"],"playback":["12.55","15.12","22.3","22.8"],"is":["12.58","13.6","13.7","13.10","13.11","13.14","13.16","13.17","13.18","13.19","13.22","13.26","13.32","15.14","15.16","15.37","15.38","22.2","22.5"],"trying":["12.58"],"data":["12.59","24.8","24.16"],"specified":["12.60"],"changed":["12.61"],"properties":["13.0"],"mounted":["13.0"],"in":["13.1","13.13","13.15","13.16","13.21","13.27","15.6","22.2","22.11","22.14","22.15","22.16","22.18","22.24","22.33","22.46"],"events":["13.1"],"of":["13.1","13.12","13.13","13.24","14.0","15.39","22.12","22.35"],"by":["13.1","13.3","22.44"],"text":["13.2","14.0","19.4","19.5","22.33"],"enabled":["13.3"],"milliseconds":["13.4","13.13","13.15","13.16","13.21"],"defaults":["13.4","13.21","13.31"],"pixels":["13.6","13.7"],"feature":["13.11"],"seconds":["13.12","13.27","15.5","15.6","22.33"],"with":["13.12","13.13","15.35","15.36","22.3"],"a":["13.12","13.13","13.14","13.15","14.0","15.17","15.18"],"connection":["13.14","13.15"],"error":["13.14","13.15"],"occurs":["13.14","13.15"],"measured":["13.16"],"double":["13.18","13.19"],"long":["13.23","22.44"],"pressing":["13.23","22.44"],"mobile":["13.24","22.27","22.43"],"delay":["13.24"],"and":["13.25","22.5","22.6","22.8","22.25"],"right":["13.25"],"keyboard":["13.27"],"shortcuts":["13.27"],"under":["13.31"],"mainly":["13.33"],"smooth":["13.33"],"progress":["13.33","15.12","22.6","22.8"],"here":["14.0"],"translation":["14.0"],"provided":["14.0"],"into":["14.0","22.37"],"english":["14.0"],"preserving":["14.0"],"markdown":["14.0"],"formatting":["14.0"],"that":["14.0"],"allows":["14.0"],"loading":["14.0"],"after":["14.0","15.4"],"instantiation":["14.0"],"remove":["15.4"],"s":["15.4","15.23","17.1","22.26"],"from":["15.8","20.8","20.9","23.8","23.11","25.2"],"performs":["15.10"],"some":["15.10","22.47"],"optimization":["15.10"],"operations":["15.10"],"will":["15.12","20.6","21.0","22.15","22.16","22.37"],"carry":["15.12"],"over":["15.12"],"previous":["15.12"],"similar":["15.14","22.4"],"does":["15.14","22.39"],"parameter":["15.16"],"which":["15.17","15.18","15.38","20.11","21.1","22.2","22.11"],"returns":["15.17","15.18"],"promise":["15.17","15.18","24.6"],"full":["15.20","22.46"],"screen":["15.20","22.46"],"before":["15.22","22.5","22.26"],"starts":["15.22"],"playing":["15.22"],"mode":["15.23"],"its":["15.25"],"size":["15.25"],"normal":["15.27"],"horizontal":["15.27"],"vertical":["15.27"],"commonly":["15.35","15.36"],"be":["15.37","22.21","22.37"],"destroyed":["15.37"],"limited":["15.38"],"within":["15.38"],"current":["15.38","20.5","23.5"],"marking":["16.1","18.1"],"class":["16.1","18.1","20.3"],"priority":["17.1"],"items":["19.1"],"playbackrate":["19.1"],"aspectratio":["19.1"],"subtitleoffset":["19.1"],"onswitch":["19.4"],"completion":["19.5"],"onchange":["19.5"],"change":["19.5"],"install":["20.1","23.1"],"body":["20.3"],"if":["20.5","23.5"],"typeof":["20.5","23.5"],"return":["20.5","24.6"],"let":["20.10"],"null":["20.10"],"parameters":["20.10"],"use":["20.11"],"legacy":["20.11"],"up":["20.11"],"ie":["20.11","23.11"],"core":["21.0"],"no":["21.0"],"longer":["21.0"],"do":["21.1"],"not":["21.1","22.2","22.39"],"require":["21.1"],"manual":["21.1"],"manually":["21.2"],"imported":["21.2"],"include":["21.2"],"cs":["21.2"],"es":["21.2"],"fa":["21.2"],"fr":["21.2"],"id":["21.2"],"pl":["21.2"],"ru":["21.2"],"ar":["21.2"],"zh":["21.2","22.41"],"tw":["21.2"],"sometimes":["22.2","22.39"],"known":["22.2"],"so":["22.2"],"quickly":["22.2"],"case":["22.2"],"you":["22.2"],"remembering":["22.3"],"initialized":["22.5"],"highlight":["22.6"],"often":["22.11"],"results":["22.11"],"black":["22.11"],"bars":["22.11"],"scrolls":["22.12"],"out":["22.12"],"currently":["22.14","22.47"],"available":["22.14"],"panel":["22.14","22.16","22.18","22.24"],"appear":["22.15","22.16"],"menu":["22.17"],"bottom":["22.17","22.18","22.20","22.43"],"control":["22.17","22.20","22.22","22.23"],"button":["22.20"],"page":["22.21"],"should":["22.21"],"one":["22.21"],"at":["22.22","22.23"],"appearing":["22.24"],"loses":["22.25"],"focus":["22.25"],"pre":["22.26"],"render":["22.26"],"required":["22.26"],"devices":["22.27"],"boolean":["22.32"],"string":["22.32","22.33"],"myplugin":["22.34","26.34"],"column":["22.35"],"columns":["22.35"],"width":["22.35","26.35"],"encoding":["22.36","26.36"],"directly":["22.37"],"written":["22.37"],"such":["22.39"],"m3u8":["22.39"],"mkv":["22.39"],"ts":["22.39"],"however":["22.39"],"have":["22.39"],"party":["22.40"],"program":["22.40"],"processing":["22.40"],"receive":["22.40"],"en":["22.41"],"cn":["22.41","26.41"],"hide":["22.43"],"pages":["22.46"],"according":["22.46"],"browsers":["22.47"],"support":["22.47"],"or":["22.49"],"htmlvideoelement":["22.49"],"example":["22.49"],"demo":["23.3"],"meta":["23.3"],"charset":["23.3"],"utf":["23.3","26.36"],"ref":["23.4"],"artref":["23.4"],"时会自动导入的":["23.6"],"param":["23.10"],"getinstance":["23.10"],"可以兼容到":["23.11"],"import":["23.11","25.2"],"plugin":["24.2","24.3","24.8","24.16"],"danmuku":["24.2","24.7","24.10","24.16"],"npm":["24.3"],"弹幕时间":["24.4"],"默认为当前播放器时间":["24.4"],"默认弹幕模式":["24.5"],"滚动":["24.5"],"顶部":["24.5"],"底部":["24.5"],"modes":["24.5"],"弹幕可见的模式":["24.5"],"fontsize":["24.5"],"danmu":["24.6","24.18"],"resolve":["24.6"],"settimeout":["24.6"],"libs":["24.8","24.16"],"uncompiled":["24.8","24.16"],"plugins":["24.14","24.18"],"artplayerplugindanmuku":["24.14","24.18"],"xml":["24.18"],"visible":["24.18"],"显示弹幕":["24.18"],"版本开始":["25.0"],"核心代码除了包含":["25.0"],"group":["25.2"],"高亮元素":["26.6"],"上":["26.6"],"类似":["26.11"],"css":["26.11"],"的":["26.11"],"fit":["26.11"],"里":["26.14","26.15","26.16","26.24"],"访问到播放器所需的":["26.26"],"layer":["26.28"],"画质地址":["26.32"],"预览图列数":["26.35"],"预览图宽度":["26.35"],"height":["26.35"],"预览图高度":["26.35"],"scale":["26.35"],"字幕样式":["26.36"],"字幕编码":["26.36"],"默认":["26.36"],"所以需要特别指明":["26.39"],"元素":["26.40"],"视频地址":["26.40"],"当前实例":["26.40"],"dom元素":["26.49"]},{"0":["13.25","19.5","24.4"],"1":["3.29","9.2","13.29","19.2"],"2":["3.29","9.5","13.29","19.5","26.3"],"3":["9.5","13.23"],"4":["9.1","21.1","22.17","22.33","22.48","23.10","26.5","26.7","26.8","26.9","26.13","26.17","26.21","26.24","26.25","26.32","26.33","26.37","26.39","26.41","26.44"],"5":["13.14","13.25","13.27"],"6":["2.41","5.38","5.39","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","23.10"],"7":["5.4","5.5","5.6","5.9","5.16","5.17","5.18","5.23","5.35","5.36","12.19","12.21","12.23","12.25","12.26","15.9","15.26","26.37"],"8":["5.8","5.14","5.24","5.25","5.27","5.37","12.17","15.1","15.8","15.13","15.20","15.24","15.27","15.28","15.29","15.31","15.32","15.33","15.37","22.36","23.3","26.36"],"9":["5.10","5.12","15.10","15.22"],"10":["5.7","5.37","7.3","7.4","12.2","12.6","12.18","15.7","15.11","15.37","17.3","17.4","19.5"],"11":["15.3","15.20","20.11"],"14":["26.32"],"17":["14.0"],"22":["9.8","19.8"],"25":["22.33","26.33"],"40":["3.7"],"100":["3.10"],"150":["9.3","19.3"],"300":["3.5","3.6"],"500":["3.8","3.9","3.17"],"1000":["13.15"],"3000":["13.13","13.16"],"实例":["0.0","5.0"],"artplayer":["0.1","0.3","0.5","0.6","0.8","0.9","0.10","0.12","0.14","1.1","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.17","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.19","5.20","5.21","5.24","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.37","5.40","5.42","5.43","9.1","9.4","10.4","10.5","10.6","10.7","10.13","10.16","11.6","12.2","12.6","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","13.5","13.8","13.9","13.17","13.22","13.28","13.29","13.30","15.2","15.21","15.26","15.34","15.37","15.40","15.42","15.43","19.4","20.2","22.4","22.38","23.2","25.1","26.10","26.19","26.33","26.38","26.39","26.45","26.48"],"container":["0.1","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.14","0.15","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","5.2","5.3","5.8","5.10","5.12","5.13","5.15","5.19","5.20","5.21","5.22","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.37","5.40","5.42","5.43","9.4","10.1","10.3","10.4","10.5","10.6","10.7","10.13","10.16","12.20","12.22","12.24","12.28","12.29","12.30","12.31","13.20","15.2","15.21","15.26","15.37","15.40","15.42","19.4","20.9","22.4","22.38","24.9","24.10","24.15","24.17","25.1","26.10","26.19","26.30","26.33","26.38","26.45","26.48"],"app":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.15","0.16","2.2","2.6","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.11","5.15","5.19","5.21","5.22","5.26","5.30","5.31","5.40","9.4","10.1","10.4","10.5","10.6","10.13","12.31","13.20","15.19","15.21","15.30","15.37","15.40","19.4","20.5","20.9","21.3","21.4","22.4","22.7","22.10","22.30","22.31","22.38","22.42","23.4","23.9","24.6","24.10","25.3","26.1","26.19","26.30","26.31","26.38","26.45"],"assets":["0.2","0.6","0.7","0.10","0.13","0.15","0.16","2.2","2.22","2.28","2.31","5.11","5.22","5.40","9.4","10.1","10.4","10.6","10.13","13.20","15.19","15.21","15.30","15.41","21.3","21.4","22.1","22.4","22.7","22.10","22.19","22.30","22.31","22.42","23.9","24.6","24.10","24.11","25.3","25.4","26.1","26.4","26.30","26.31"],"sample":["0.2","0.6","0.13","0.15","0.16","2.2","2.28","5.11","5.22","9.4","9.6","10.1","10.4","10.6","10.13","13.20","15.11","15.19","15.21","15.30","15.41","19.6","21.4","22.1","22.4","22.7","22.10","22.19","22.30","22.31","22.42","22.45","23.9","24.6","24.11","24.12","25.4","26.4","26.30","26.31"],"video":["0.2","0.13","0.15","0.16","5.11","7.4","8.4","9.4","9.6","10.4","10.6","10.13","13.20","15.19","15.21","15.41","17.4","18.4","19.6","21.4","22.1","22.7","22.10","22.19","22.28","22.30","22.31","22.42","22.45","22.46","22.49","23.9","24.6","24.11","24.12","25.4","26.4","26.28","26.29","26.31","26.42"],"mp4":["0.2","0.13","0.16","5.11","5.41","6.2","7.4","8.4","9.4","9.6","10.2","10.4","15.11","15.15","15.19","15.21","15.30","15.41","16.2","17.4","18.4","19.6","22.1","22.4","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.45","24.6","24.11","24.12","24.13","25.4","26.4","26.28","26.29","26.42"],"console":["0.2","0.4","1.6","7.2","10.2","11.6","15.15","17.2","22.34","26.34"],"info":["0.2","0.4","1.1","7.2","10.2","11.6","15.15","17.2","22.34","26.34"],"queryselector":["0.3","5.37","10.3","15.37","22.1","24.16","26.1"],"art":["0.3","0.8","0.9","0.11","0.12","0.14","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.5","3.6","3.7","3.30","5.1","5.2","5.3","5.5","5.6","5.7","5.8","5.9","5.13","5.14","5.16","5.17","5.18","5.20","5.23","5.24","5.25","5.27","5.28","5.29","5.31","5.32","5.33","5.34","5.42","5.43","9.1","10.4","10.5","10.6","10.7","10.13","10.16","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.39","12.40","12.41","15.1","15.2","15.3","15.7","15.9","15.13","15.22","15.26","15.28","15.29","15.31","15.32","15.33","15.34","15.42","15.43","19.4","22.4","22.34","22.38","22.48","24.7","24.9","24.10","24.15","24.17","25.2","26.5","26.7","26.10","26.17","26.32","26.33","26.39","26.48"],"new":["0.3","0.5","0.8","0.9","0.10","0.11","0.12","0.14","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.30","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.24","5.25","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.42","5.43","9.1","9.4","10.4","10.5","10.6","10.7","10.13","10.16","12.2","12.6","12.7","12.8","12.10","12.16","12.17","12.18","12.20","12.21","12.22","12.23","12.24","12.26","12.28","12.29","12.30","12.31","13.20","15.1","15.2","15.7","15.22","15.26","15.31","15.32","15.34","15.40","15.42","15.43","19.4","22.4","22.38","24.9","24.10","24.15","24.17","25.1","25.2","26.7","26.10","26.19","26.33","26.38","26.39","26.45","26.48"],"url":["0.6","0.7","0.9","0.10","0.13","0.15","0.16","2.2","2.18","2.22","2.24","2.28","2.29","2.30","2.31","5.19","5.22","5.30","5.40","8.4","9.4","10.1","10.4","10.6","10.13","13.20","15.19","15.21","15.30","15.40","18.4","19.4","20.9","21.3","21.4","22.1","22.4","22.7","22.10","22.30","22.31","22.40","22.42","23.9","24.6","24.10","24.11","25.3","25.4","26.1","26.4","26.30","26.31","26.38","26.45"],"js":["0.11","1.6","3.1","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","5.4","5.5","5.6","5.14","5.23","5.27","5.35","5.36","5.38","5.39","10.3","10.7","10.16","11.6","12.1","12.2","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.19","12.21","12.22","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","15.3","15.6","15.7","15.8","15.9","15.10","15.12","15.13","15.17","15.18","15.20","15.22","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.43","19.4","21.1","22.17","22.33","22.41","22.48","24.8","26.3","26.5","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.32","26.37","26.39","26.41","26.43","26.44","26.46","26.47"],"var":["0.11","1.1","2.41","3.5","3.6","3.7","3.17","3.30","5.1","5.5","5.6","5.7","5.8","5.9","5.10","5.12","5.14","5.16","5.17","5.18","5.20","5.23","5.24","5.25","5.27","5.35","5.36","5.37","5.39","5.43","9.1","10.3","10.4","10.6","10.7","10.13","10.16","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.32","12.33","12.34","12.35","12.36","12.38","12.39","12.40","12.41","13.30","15.1","15.3","15.7","15.8","15.9","15.13","15.20","15.22","15.24","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.37","15.42","15.43","19.4","21.1","22.4","22.33","22.38","22.48","24.7","24.15","24.16","24.17","25.2","26.3","26.5","26.7","26.17","26.24","26.32","26.33","26.39","26.48"],"function":["0.13","6.5","16.5","17.1","20.10","26.36"],"构造函数":["1.0"],"code":["1.11","9.5","10.3","12.1","13.2","13.3","13.4","13.6","13.7","13.10","13.11","13.12","13.13","13.14","13.16","13.18","13.19","13.21","13.23","13.26","13.28","13.31","13.32","13.33","15.5","15.6","15.10","15.12","15.14","15.16","15.17","15.18","15.22","15.23","15.25","15.35","15.36","15.39","19.1","20.11","21.2","22.3","22.6","22.8","22.9","22.13","22.17","22.20","22.22","22.23","22.24","22.27","22.32","22.33","22.37","22.39","22.41","23.11","26.6","26.11","26.14","26.15","26.16","26.26","26.35","26.40","26.49"],"once":["2.0"],"不必停下来进一步缓冲内容":["2.42"],"media":["2.46","2.47","12.43","12.58"],"已经加载完成":["2.46"],"操作完成":["2.56"],"操作开始":["2.57"],"agent":["2.58"],"的":["3.0"],"false":["3.3","13.31","20.5","23.5","24.5","24.14"],"add":["4.0","6.3","8.3","14.0","24.2"],"例如我想写一个在视频暂停后":["4.0"],"显示一个图片广告的插件":["4.0"],"on":["5.11","13.0","15.11","15.15","15.30"],"document":["5.37","10.3","15.37","24.16","26.1"],"default":["5.41","7.5","13.1","13.15","13.27","15.41","17.5","23.10"],"true":["5.41","7.5","9.6","15.4","15.41","17.5","19.6","22.4","22.29","22.45","24.5","26.4","26.29","26.36"],"html":["5.41","6.1","6.2","6.3","6.4","6.5","7.3","7.5","8.1","8.2","8.3","8.5","9.7","15.41","16.1","16.2","16.3","16.4","16.5","17.3","17.5","18.1","18.2","18.3","18.5","19.7","22.28","22.29","22.36","24.14","26.28","26.29","26.36"],"sd":["5.41","15.41"],"480p":["5.41"],"组件索引":["6.1","8.1"],"用于显示的优先级":["6.1","8.1"],"contextmenu":["6.2","6.3","16.2","16.3"],"name":["6.2","6.3","6.4","7.3","7.4","8.2","8.3","8.4","8.5","9.7","16.2","16.3","16.4","17.3","17.4","18.2","18.3","18.4","18.5","19.7","22.28","22.34","26.28","26.34"],"your":["6.2","6.3","6.4","6.5","7.3","16.2","16.3","16.4","16.5","17.3","22.45","26.42"],"menu":["6.2","6.3","6.4","6.5","16.2","16.3","16.4","16.5","22.14","22.15","22.16"],"click":["6.4","6.5","16.4","16.5","17.1","24.14"],"args":["6.5","16.5"],"组件的":["7.1"],"dom":["7.1","17.1","22.40","22.49"],"元素":["7.1"],"style":["7.1","8.2","8.3","8.5","17.1","18.2","18.3","18.5","19.2","22.28"],"object":["7.1","17.1"],"mounted":["7.2","17.2"],"subtitle":["7.2","7.5","17.2","17.5"],"button1":["7.3","7.4","17.3","17.4"],"index":["7.3","7.4","17.3","17.4","24.8"],"position":["7.3","15.19","17.3","24.13","24.14"],"left":["7.3","17.3"],"controls":["7.4","15.19","17.4","24.13","24.14"],"right":["7.5","15.19","17.5","24.14"],"selector":["7.5","17.5","22.29","26.29"],"01":["7.5","17.5","19.3"],"layers":["8.2","8.3","8.4","8.5","18.2","18.3","18.4","18.5"],"potser":["8.2","8.3","8.5","26.28"],"width":["8.2","8.3","8.5","9.3","9.8","18.2","18.3","18.5","19.3","19.8","22.28"],"100px":["8.2","8.3","8.5","18.2","18.3","18.5","22.28"],"src":["8.2","8.5","9.8","18.2","18.5","19.8"],"color":["9.2","19.2"],"red":["9.2","19.2"],"srt":["9.2","19.2"],"id":["9.2","19.2","22.45"],"yellow":["9.2","19.2"],"02":["9.2"],"setting":["9.4","9.6","19.6","22.29","26.29"],"max":["9.5","19.5"],"step":["9.5"],"div":["9.5","10.3","10.12","10.14","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.10","11.11","13.1","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.27","13.31","13.33","15.4","15.14","15.35","15.36","19.1","20.5","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.17","22.18","22.20","22.22","22.23","22.25","22.32","22.35","22.37","22.39","22.43","22.44","22.47","22.49","23.3","23.5","26.11","26.35"],"classname":["9.5","10.3","10.14","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.4","13.6","13.7","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.26","13.27","13.31","13.33","15.12","15.14","15.16","15.17","15.18","15.35","15.36","19.1","22.3","22.5","22.6","22.8","22.12","22.14","22.16","22.17","22.18","22.20","22.22","22.23","22.24","22.25","22.27","22.32","22.37","22.39","22.43","22.44","22.47","26.11","26.35","26.40"],"run":["9.5","10.3","11.1","11.2","11.3","11.4","11.5","11.8","11.9","11.10","11.12","13.2","13.3","13.4","13.6","13.7","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.26","13.27","13.31","13.32","13.33","15.5","15.10","15.12","15.14","15.16","15.17","15.18","15.23","15.35","15.36","15.39","19.1","22.3","22.5","22.6","22.8","22.12","22.14","22.16","22.17","22.18","22.20","22.22","22.23","22.24","22.25","22.27","22.32","22.37","22.39","22.43","22.47","26.11","26.26","26.35","26.40"],"settings":["9.7","19.7","22.15"],"slider":["9.7","19.7"],"tooltip":["9.7","19.7"],"5x":["9.7","19.7"],"icon":["9.7","19.7"],"img":["9.8","19.8"],"heigth":["9.8","19.8"],"state":["9.8","19.8"],"svg":["9.8","19.8"],"secondary":["10.0"],"attributes":["10.0"],"custom":["10.3"],"test":["10.4"],"foo":["10.4"],"bar":["10.4","22.18","22.20","22.43"],"const":["10.4","20.8","23.8"],"whether":["10.8","10.10","22.36"],"display":["10.8","10.15","16.1","18.1"],"all":["10.8","10.9","10.10","10.15"],"or":["10.8","12.46","12.48"],"not":["10.8","12.42","15.14"],"toggle":["10.8","10.9","10.10","10.15"],"of":["10.9","10.14","12.49"],"set":["10.10","22.2"],"options":["10.11"],"texttrack":["10.11"],"get":["10.11","20.4"],"track":["10.11"],"activecues":["10.11"],"currently":["10.11"],"items":["10.15"],"first":["11.0"],"level":["11.0"],"at":["11.1","22.21"],"the":["11.1","12.54","20.3"],"same":["11.1","15.38"],"time":["11.1","22.8","22.21"],"is":["12.42","12.44","13.1","13.15","13.23","13.25","22.25"],"enough":["12.42"],"value":["12.45","19.5"],"been":["12.46","12.50","12.51"],"completely":["12.46"],"loaded":["12.46","24.18"],"because":["12.47"],"data":["12.48","23.10"],"started":["12.52"],"following":["12.53"],"a":["12.53","22.21"],"rate":["12.55"],"frame":["12.56","12.57"],"fetch":["12.58"],"loading":["12.59"],"by":["12.60"],"stopped":["12.62"],"constructor":["13.0"],"property":["13.0"],"turned":["13.1"],"off":["13.1"],"long":["13.24"],"press":["13.24"],"acceleration":["13.24"],"effects":["13.33"],"primary":["15.0"],"destruction":["15.4"],"which":["15.4"],"defaults":["15.4"],"ready":["15.11","15.15","15.30"],"seek":["15.11"],"settimeout":["15.11"],"trigger":["15.14"],"additional":["15.14"],"events":["15.14"],"timeupdate":["15.35","15.36"],"event":["15.35","15.36"],"prevent":["15.38"],"errors":["15.38"],"due":["15.38"],"having":["15.38"],"priority":["16.1","18.1"],"element":["16.1","18.1","22.37","22.40","22.49"],"poster":["18.2","18.3","18.5","22.28"],"span":["19.2"],"min":["19.5"],"yarn":["20.1","23.1","24.2"],"npm":["20.2","23.2"],"dist":["20.2","20.11","23.2","23.11","24.3"],"warning":["20.3","22.45"],"player":["20.3"],"s":["20.3"],"size":["20.3","22.46"],"depends":["20.3"],"instance":["20.4"],"getinstance":["20.4","20.10"],"destroy":["20.5","23.5"],"ref":["20.5","23.5"],"automatically":["20.6","22.11"],"param":["20.10"],"properties":["20.10"],"import":["20.11","21.1","21.2"],"from":["20.11","21.2"],"group":["20.11","21.2","23.11"],"bash":["20.11","23.11"],"include":["21.0"],"other":["21.0"],"languages":["21.0"],"besides":["21.0"],"simplified":["21.0"],"chinese":["21.0"],"and":["21.0","22.14","22.15","22.16","22.46"],"english":["21.0"],"zhtw":["21.2","25.2"],"you":["22.1"],"may":["22.1"],"can":["22.2","22.26"],"asynchronously":["22.2"],"autoplayback":["22.3"],"muted":["22.4","26.4"],"it":["22.5","22.39"],"starts":["22.5"],"playing":["22.5","22.25"],"elements":["22.6"],"adjust":["22.11"],"to":["22.11","22.21","22.36"],"hide":["22.11"],"browser":["22.12"],"viewport":["22.12","22.46"],"context":["22.14","22.15","22.16"],"panel":["22.15"],"control":["22.18","22.43"],"description":["22.19"],"allowed":["22.21"],"play":["22.21","26.42"],"bottom":["22.22","22.23"],"mounts":["22.26"],"access":["22.26"],"setting01":["22.29","26.29"],"return":["22.34","23.5","23.10","26.34"],"height":["22.35"],"scale":["22.35"],"utf":["22.36"],"escape":["22.36","26.36"],"boolean":["22.36","26.36"],"tags":["22.36"],"correct":["22.39"],"so":["22.39"],"needs":["22.39"],"be":["22.39"],"specifically":["22.39"],"stated":["22.39"],"three":["22.40"],"parameters":["22.40"],"lang":["22.42","26.42"],"mobile":["22.44"],"devices":["22.44"],"this":["22.47"],"feature":["22.47"],"an":["22.49"],"existing":["22.49"],"body":["23.3"],"class":["23.3"],"属性":["23.10"],"export":["23.10"],"jsdelivr":["23.11"],"danmuku":["24.3","24.8"],"mode":["24.4"],"弹幕模式":["24.4"],"滚动":["24.4"],"弹幕字体大小":["24.5"],"antioverlap":["24.5"],"弹幕是否防重叠":["24.5"],"synchronousplayback":["24.5"],"是否同步播放速度":["24.5"],"mount":["24.5"],"undefined":["24.5"],"弹幕发射器挂载点":["24.5"],"默认为播放器控制栏中部":["24.5"],"heatmap":["24.5"],"plugins":["24.6","24.11","24.12","24.13"],"xml":["24.6","24.13","24.14"],"这是用户在输入框输入弹幕文本":["24.6"],"然后点击发送按钮后触发的函数":["24.6"],"artplayerplugindanmuku":["24.11","24.12","24.13"],"emitter":["24.14"],"重载":["24.14"],"danmu":["24.16"],"danmus":["24.18"],"加载弹幕":["24.18"],"length":["24.18"],"简体中文":["25.0"],"和":["25.0"],"英文":["25.0"],"有时候":["26.2"],"地址没那么快知道":["26.2"],"这时候你可以异步设置":["26.2"],"cover":["26.11"],"预览图缩放":["26.35"],"是否转义":["26.36"],"标签":["26.36"],"默认为":["26.36"],"onvttload":["26.36"],"用于修改":["26.36"]},{"0":["15.11","23.9"],"1":["3.25","9.8","19.8","24.4"],"2":["3.26","9.2","19.2","22.3","24.4"],"3":["3.28","13.28","19.5","26.1"],"4":["3.28","13.28","19.1","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.16","22.18","22.20","22.22","22.23","22.24","22.25","22.27","22.32","22.35","22.37","22.39","22.41","22.47","26.6","26.11","26.12","26.14","26.15","26.16","26.18","26.20","26.22","26.23","26.27","26.35","26.36","26.40","26.43","26.46","26.47","26.49"],"5":["3.23","3.29","9.8","13.29","19.8","22.7","23.9"],"6":["3.29","12.1","13.29","15.39","20.10","22.2","26.2"],"7":["15.5","15.6","15.16","15.17","15.18","15.23","15.35","15.36","22.37","26.26"],"8":["15.14","15.25","22.35","26.35","26.40"],"9":["15.12","22.28"],"10":["3.12","3.14","3.27","5.11","9.8","19.8"],"12":["24.13"],"14":["22.32"],"20":["3.11"],"22":["9.4"],"40":["13.7"],"50":["24.13"],"100":["13.10"],"300":["13.5","13.6"],"500":["3.21","13.8","13.9","13.17"],"512":["24.5"],"1000":["13.24"],"2000":["3.22","3.24","13.22"],"3000":["3.15","15.11"],"5000":["3.4","3.13","3.16"],"的":["0.0","0.4","1.0","5.0"],"url":["0.1","0.3","0.5","0.8","0.12","0.14","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.30","5.1","5.2","5.3","5.7","5.8","5.12","5.13","5.14","5.15","5.16","5.17","5.18","5.20","5.21","5.24","5.26","5.27","5.28","5.29","5.31","5.32","5.33","5.34","5.42","5.43","9.1","9.5","10.3","10.5","10.7","10.16","12.2","12.6","12.7","12.8","12.10","12.16","12.17","12.18","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.28","12.29","12.30","12.31","15.1","15.2","15.3","15.7","15.8","15.13","15.22","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.37","15.42","15.43","21.2","22.17","22.33","22.38","22.48","24.9","24.15","24.17","25.1","25.2","26.7","26.10","26.19","26.33","26.39","26.48"],"assets":["0.1","0.3","0.5","0.8","0.9","0.11","0.12","0.14","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.30","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.19","5.20","5.21","5.24","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.42","5.43","9.1","9.5","10.3","10.5","10.7","10.16","12.2","12.6","12.17","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.2","15.13","15.22","15.26","15.29","15.31","15.32","15.34","15.37","15.40","15.42","15.43","19.4","20.9","21.2","22.17","22.33","22.38","22.39","24.9","24.15","24.17","25.1","25.2","26.10","26.19","26.32","26.33","26.38","26.39","26.45","26.48"],"sample":["0.1","0.3","0.5","0.7","0.8","0.9","0.10","0.11","0.12","0.14","2.6","2.11","2.12","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.29","2.30","2.31","2.39","5.2","5.3","5.8","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.19","5.20","5.21","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.40","5.42","5.43","9.5","10.3","10.5","10.7","10.16","12.2","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.2","15.22","15.26","15.31","15.37","15.40","15.42","19.4","20.9","21.3","22.17","22.33","22.38","22.39","24.9","24.10","24.15","24.17","25.2","25.3","26.1","26.10","26.19","26.32","26.33","26.38","26.39","26.45","26.48"],"video":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.14","2.2","2.6","2.12","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","5.2","5.3","5.8","5.10","5.12","5.13","5.15","5.19","5.21","5.22","5.26","5.28","5.29","5.30","5.32","5.33","5.40","5.42","9.5","10.1","10.3","10.5","10.7","10.16","12.2","12.22","12.24","12.28","12.29","12.30","12.31","15.26","15.37","15.40","15.42","19.4","20.9","21.3","22.38","24.9","24.10","24.15","24.17","25.2","25.3","26.1","26.10","26.19","26.30","26.33","26.38","26.39","26.45"],"mp4":["0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.15","2.2","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.15","5.19","5.21","5.22","5.26","5.29","5.30","5.31","5.40","5.42","10.1","10.3","10.5","10.6","10.7","10.13","10.16","12.28","12.29","12.31","13.20","15.22","15.26","15.37","15.40","19.4","20.9","21.3","21.4","22.38","23.9","24.9","24.10","24.17","25.2","25.3","26.1","26.10","26.19","26.30","26.31","26.33","26.38","26.45"],"warning":["0.4","10.2","10.4","11.6","15.11","15.15","15.19","15.30","20.4","22.7","22.10","25.0"],"提示":["0.4"],"默认所有播放器实例都是共享同一个":["0.4"],"localstorage":["0.4"],"而且默认的":["0.4"],"是":["0.4"],"settings":["0.4","9.4","19.4"],"如果你想不同的播放器使用不同的":["0.4"],"console":["0.6","0.13","0.16","6.2","6.3","6.4","6.5","9.2","9.3","10.1","10.4","10.5","10.6","10.13","11.1","16.2","16.3","16.4","16.5","19.2","19.3","22.29"],"info":["0.6","0.13","0.16","1.6","6.2","6.3","6.4","6.5","9.2","9.3","10.1","10.4","10.6","10.13","11.1","16.2","16.3","16.4","16.5","19.2","19.3","22.29"],"play":["0.6","10.6","22.42","26.4"],"on":["0.7","0.8","0.9","0.10","2.2","2.22","5.30","5.40","7.5","8.5","9.8","10.0","10.13","11.0","15.0","15.40","17.5","18.5","19.8","20.3","21.0"],"ready":["0.9","0.10","2.2","5.11","5.40","7.5","10.13","17.5"],"artplayer":["0.11","1.6","2.41","5.4","5.5","5.6","5.16","5.23","5.25","5.35","5.36","5.38","5.39","9.5","10.3","10.9","10.15","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.3","13.4","13.6","13.7","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.26","13.27","13.31","13.32","13.33","15.1","15.3","15.6","15.7","15.8","15.9","15.10","15.12","15.13","15.17","15.18","15.20","15.22","15.23","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","19.1","19.5","21.1","22.17","22.24","22.26","22.32","22.33","22.39","22.41","22.48","26.3","26.5","26.7","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.24","26.25","26.32","26.35","26.37","26.41","26.44"],"container":["0.11","1.1","2.1","2.3","2.4","2.14","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.29","3.30","5.1","5.4","5.5","5.6","5.7","5.9","5.14","5.16","5.17","5.18","5.23","5.24","5.25","5.27","5.35","5.36","5.38","5.39","9.1","9.5","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.30","15.1","15.3","15.7","15.8","15.9","15.10","15.12","15.13","15.17","15.18","15.20","15.22","15.24","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.43","19.5","20.3","21.1","21.2","22.17","22.24","22.32","22.33","22.39","22.41","22.48","24.7","24.16","25.2","26.5","26.7","26.17","26.24","26.26","26.32","26.37","26.39","26.41"],"app":["0.11","0.12","0.14","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.30","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.16","5.17","5.18","5.20","5.24","5.25","5.27","5.28","5.29","5.32","5.33","5.34","5.37","5.42","5.43","9.1","9.5","10.3","10.7","10.16","12.2","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.39","12.40","12.41","13.30","15.1","15.2","15.3","15.7","15.8","15.9","15.10","15.12","15.13","15.20","15.22","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.42","15.43","21.2","22.17","22.33","22.39","22.48","23.3","23.5","24.7","24.9","24.15","24.16","24.17","25.1","25.2","26.7","26.10","26.17","26.24","26.26","26.32","26.33","26.39","26.48"],"hotkeyevent":["0.13","10.13"],"event":["0.13","9.2","9.3","10.13","12.46","17.1","19.3"],"click":["0.13","6.2","6.3","7.1","7.3","10.13","15.19","15.21","16.2","16.3","17.3","22.30","24.12"],"true":["0.15","2.28","3.1","3.20","3.31","3.33","7.2","9.4","17.2","19.4","22.10","22.36"],"flip":["0.15"],"playbackrate":["0.15"],"aspectratio":["0.15"],"function":["0.16","6.2","6.3","6.4","7.1","7.3","9.3","10.13","10.16","15.19","15.21","16.2","16.3","16.4","17.3","19.3","22.29","22.30","22.36","24.12","24.14","26.29"],"myplugin":["0.16","10.16"],"art":["1.1","3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.18","3.21","3.22","3.23","3.24","3.27","3.28","3.29","3.32","3.33","5.4","5.35","5.36","5.37","5.38","5.39","9.5","10.3","10.9","10.14","10.15","12.1","12.5","12.11","12.12","12.32","12.33","12.34","12.35","12.36","12.37","12.38","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.29","13.30","15.5","15.6","15.8","15.14","15.16","15.17","15.18","15.20","15.23","15.24","15.25","15.27","15.35","15.36","15.37","15.39","19.1","19.5","20.8","21.1","21.2","22.9","22.13","22.17","22.24","22.27","22.32","22.33","22.39","22.40","22.41","23.8","24.8","24.16","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.27","26.35","26.37","26.41","26.43","26.44","26.46","26.47","26.49"],"new":["1.1","3.3","3.6","3.7","3.8","3.9","3.10","3.11","3.17","3.22","3.28","3.29","3.33","5.4","5.5","5.6","5.23","5.35","5.36","5.37","5.38","5.39","9.5","10.3","10.9","10.15","12.1","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.19","12.25","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.8","13.9","13.17","13.29","13.30","15.3","15.5","15.6","15.8","15.9","15.10","15.12","15.13","15.14","15.16","15.17","15.18","15.20","15.23","15.24","15.25","15.27","15.28","15.29","15.33","15.37","15.39","19.1","19.5","21.1","21.2","22.9","22.13","22.17","22.24","22.32","22.33","22.39","22.41","22.48","24.7","24.8","24.16","26.3","26.5","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.27","26.32","26.35","26.37","26.41","26.43","26.44","26.46","26.47","26.49"],"js":["1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","3.2","10.8","10.9","10.10","10.12","10.14","10.15","11.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.5","15.14","15.16","15.23","15.35","15.36","15.39","19.1","20.2","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.24","22.25","22.27","22.32","22.35","22.37","22.39","22.43","22.44","22.47","23.2","24.3","26.6","26.11","26.35","26.36","26.40","26.49"],"手动触发事件":["2.0"],"subtitle":["2.28","2.29","2.30","2.31"],"或者部分加载完成":["2.46"],"则发送此事件":["2.46"],"已经到达结束点":["2.47"],"正在尝试获取媒体数据":["2.58"],"一级属性":["3.0"],"var":["3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.29","3.31","3.32","3.33","5.4","5.38","9.5","10.9","10.12","10.14","10.15","12.1","12.11","12.37","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.5","15.6","15.10","15.12","15.14","15.16","15.17","15.18","15.23","15.25","15.35","15.36","15.39","19.1","19.5","21.2","22.3","22.9","22.13","22.17","22.24","22.27","22.32","22.35","22.37","22.39","22.41","24.8","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.26","26.27","26.35","26.37","26.40","26.41","26.43","26.44","26.46","26.47","26.49"],"false":["3.18","3.19","3.32","6.5","13.3","16.5"],"adsplugin":["4.0","14.0"],"option":["4.0","14.0","20.4","23.4","24.18"],"layers":["4.0","14.0"],"ads":["4.0"],"html":["4.0","7.4","8.4","9.6","15.19","15.21","17.4","18.4","19.6","22.30","22.31","24.11","24.12","24.13","26.30","26.31"],"img":["4.0","9.4","9.7","19.7","22.38","26.38"],"style":["4.0","6.1","7.3","8.1","8.4","16.1","17.3","18.1","18.4","20.4","26.28"],"width":["4.0","8.4","9.4","9.7","18.4","19.7","24.5","26.28"],"100px":["4.0","8.4","18.4","26.28"],"src":["4.0","8.3","8.4","9.7","18.3","18.4","19.7","22.28","26.28"],"display":["4.0"],"none":["4.0"],"position":["4.0","5.19","7.4","8.2","8.3","8.5","15.21","17.4","18.2","18.3","18.5","22.28","22.31","24.11","24.12","26.28","26.31"],"absolute":["4.0","8.2","8.3","8.5","18.2","18.3","18.5","22.28","26.28"],"top":["4.0","8.2","8.3","8.5","18.2","18.3","18.5","22.28","26.28"],"20px":["4.0","22.28","26.28"],"right":["4.0","7.2","7.4","8.2","8.5","15.21","17.2","17.4","18.2","18.5","22.28","24.11","24.12","24.13"],"seek":["5.11"],"settimeout":["5.11","7.5","17.5","22.2"],"controls":["5.19","5.21","15.21","24.11","24.12"],"jpg":["5.22"],"hd":["5.41","15.41"],"720p":["5.41","15.41"],"element":["6.1","8.1"],"组件的":["6.1","8.1"],"dom":["6.1","8.1","9.3","16.1","18.1","19.3"],"元素":["6.1","8.1"],"args":["6.2","6.3","6.4","16.2","16.3","16.4","22.29","22.30","26.29"],"show":["6.5","9.6","9.8","16.4","16.5","19.6","19.8"],"组件样式对象":["7.1"],"组件点击事件":["7.1"],"mounted":["7.1","10.0","11.0","15.0","17.1"],"selector":["7.2","17.2"],"default":["7.2","10.4","17.2","20.10","21.4","25.4"],"span":["7.2","17.2"],"01":["7.2","17.2","22.29","26.29"],"button":["7.3","7.4","17.3","17.4"],"tooltip":["7.3","7.4","8.2","8.3","17.1","17.3","17.4","18.2","18.3","22.31"],"color":["7.3","17.3"],"red":["7.3","17.3"],"your":["7.4","15.30","17.4","21.0","22.30","22.31","26.30","26.31","26.45"],"02":["7.5","9.3","17.5","19.2","19.3","22.29","26.29"],"update":["7.5"],"the":["7.5","12.48","17.5","21.4","25.4"],"tip":["8.2","8.3","18.2","18.3"],"50px":["8.2","8.3","8.5","18.2","18.3","18.5"],"potser":["8.4"],"item":["9.2","9.3","19.3"],"onselect":["9.3","19.3","22.29","26.29"],"pip":["9.4","19.4"],"mode":["9.4","19.4"],"close":["9.4","19.4"],"heigth":["9.4","9.7","19.7"],"add":["9.6","20.1","23.1"],"slider":["9.6","19.6"],"state":["9.7","19.7"],"range":["9.8","19.8","24.13"],"to":["10.2","12.42","12.43","12.62","14.0","21.0","22.1"],"easily":["10.2"],"distinguish":["10.2"],"between":["10.2"],"by":["10.4","22.45"],"all":["10.4","13.0"],"zh":["10.6"],"cn":["10.6"],"div":["10.8","10.9","10.10","10.11","10.15","13.24","15.38","19.5","22.21","22.26","22.36","22.40","22.46","26.36"],"classname":["10.8","10.9","10.10","10.11","10.12","10.15","13.1","13.24","15.4","15.38","19.5","22.15","22.21","22.26","22.35","22.36","22.40","22.46","22.49","26.36"],"run":["10.8","10.9","10.10","10.11","10.12","10.14","10.15","11.7","11.11","13.1","13.24","15.4","15.38","19.5","22.15","22.21","22.26","22.35","22.36","22.40","22.44","22.46","22.49","26.36"],"code":["10.8","10.9","10.10","10.12","10.14","10.15","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.1","13.15","13.24","13.25","13.27","15.4","15.38","19.5","22.5","22.12","22.14","22.15","22.16","22.18","22.21","22.25","22.26","22.35","22.36","22.40","22.43","22.44","22.46","22.47","22.49","26.36"],"switch":["10.10","15.11","15.19"],"visibility":["10.10"],"active":["10.11"],"list":["10.11","11.6"],"cues":["10.11"],"full":["11.6"],"manually":["12.0"],"trigger":["12.0"],"data":["12.42","12.58","20.10"],"through":["12.42","12.43","22.26"],"of":["12.45","20.3","22.1"],"partially":["12.46"],"media":["12.47","12.49"],"resource":["12.48"],"type":["12.48","24.13"],"loaded":["12.50"],"paused":["12.51","14.0"],"pause":["12.53"],"or":["12.53"],"delay":["12.53"],"browser":["12.54"],"has":["12.55","12.59"],"skipping":["12.56","12.57"],"operation":["12.56","12.57"],"but":["12.58"],"currenttime":["12.60"],"due":["12.62"],"names":["13.0"],"are":["13.0"],"in":["13.0"],"devices":["13.20"],"a":["13.20","15.15"],"tap":["13.20"],"toggles":["13.20"],"for":["14.0"],"example":["14.0"],"i":["14.0","24.6"],"want":["14.0","22.10"],"write":["14.0"],"displays":["14.0"],"an":["14.0"],"image":["14.0"],"advertisement":["14.0"],"t":["15.11"],"and":["15.11"],"note":["15.15"],"some":["15.15"],"videos":["15.15"],"do":["15.15"],"not":["15.15"],"have":["15.15"],"resize":["15.30"],"class":["15.38"],"name":["15.38"],"480p":["15.41"],"object":["16.1","18.1","22.11"],"triggered":["17.1"],"after":["17.1"],"is":["17.1"],"poster":["18.4"],"setting":["19.4"],"step":["19.5","24.13"],"unpkg":["20.2","23.2","24.3"],"so":["20.3"],"import":["20.6","21.0"],"useref":["20.8","23.8"],"export":["20.10"],"return":["20.10"],"jsdelivr":["20.11"],"net":["20.11","23.11"],"https":["20.11","23.11"],"cdn":["20.11","23.11"],"npm":["20.11","23.11"],"you":["21.0","22.10"],"need":["21.0","22.1"],"required":["21.0"],"change":["21.4","25.4"],"initialize":["22.1"],"size":["22.1"],"like":["22.1"],"css":["22.1","22.11","26.1"],"this":["22.4","26.4"],"equivalent":["22.4"],"will":["22.7"],"cache":["22.7"],"muted":["22.10"],"if":["22.10","24.6"],"similar":["22.11"],"s":["22.11"],"fit":["22.11"],"increase":["22.19"],"volume":["22.19","23.9"],"decrease":["22.19"],"fast":["22.19"],"forward":["22.19"],"rewind":["22.19"],"opacity":["22.28"],"left":["22.31","26.31"],"something":["22.34","26.34"],"dosomething":["22.34","26.34"],"onvttload":["22.36"],"modify":["22.36"],"text":["22.36","24.6","24.12"],"loading":["22.38","26.38"],"address":["22.40"],"current":["22.40"],"instance":["22.40","23.4"],"modifying":["22.42"],"existing":["22.42"],"because":["22.45"],"player":["22.45"],"uses":["22.45"],"as":["22.45"],"key":["22.45"],"dimensions":["22.46"],"get":["23.4"],"getinstance":["23.4"],"d":["23.6"],"选项":["23.10"],"com":["24.3"],"默认":["24.4"],"顶部":["24.4"],"底部":["24.4"],"是否开启热力图":["24.5"],"当播放器宽度小于此值时":["24.5"],"弹幕发射器置于播放器底部":["24.5"],"points":["24.5"],"热力图数据":["24.5"],"filter":["24.5"],"弹幕载入前的过滤器":["24.5"],"只支持返回布尔值":["24.5"],"beforeemit":["24.5"],"弹幕发送前的过滤器":["24.5"],"支持返回":["24.5"],"你可以对弹幕做合法校验":["24.6"],"或者做存库处理":["24.6"],"当返回true后才表示把弹幕加入到弹幕队列":["24.6"],"async":["24.6"],"const":["24.6"],"isdirty":["24.6"],"fuck":["24.6"],"test":["24.6"],"plugins":["24.10"],"artplayerplugindanmuku":["24.10"],"xml":["24.11","24.12"],"隐藏弹幕":["24.11"],"发送弹幕":["24.12"],"弹幕大小":["24.13"],"input":["24.13"],"min":["24.13"],"max":["24.13"],"重新加载当前弹幕库":["24.14"],"切换":["24.14"],"error":["24.18"],"加载错误":["24.18"],"config":["24.18"],"配置变化":["24.18"],"外":["25.0"],"不再捆绑其它多国语言":["25.0"],"需要自行导入需要的语言":["25.0"],"lang":["25.3"],"language":["25.4"],"您可能需要初始化容器元素的大小":["26.1"],"如":["26.1"],"等同于":["26.4"],"document":["26.26"],"queryselector":["26.26"],"menu":["26.30"],"control":["26.31"],"文本的函数":["26.36"],"修改现有的语言":["26.42"],"id":["26.45"]},{"0":["5.11","20.9"],"1":["9.7","13.25","19.7","24.13"],"2":["13.26"],"3":["22.1"],"4":["22.15","22.21","22.36","22.40","22.43","22.44","22.46","22.49"],"5":["9.7","13.23","19.7","20.9"],"6":["15.38"],"7":["15.4","22.26"],"8":["12.0","22.40"],"9":["26.28"],"10":["9.7","13.12","13.14","13.27","19.7"],"11":["22.42","26.42"],"12":["22.36","26.36"],"20":["13.11"],"22":["9.5","9.6","19.4","19.6"],"25":["24.13"],"32":["0.13","10.13"],"60":["22.33","26.33"],"120":["26.33"],"150":["9.2","19.2"],"200":["24.5"],"404":["2.11","12.11"],"500":["13.21"],"1000":["22.2"],"2000":["13.24"],"3000":["5.11","13.15"],"5000":["13.4","13.13","13.16"],"二级属性":["0.0"],"mp4":["0.1","0.11","0.12","0.14","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.29","3.30","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.16","5.17","5.18","5.20","5.24","5.27","5.28","5.32","5.33","5.34","5.37","5.43","9.1","9.5","10.8","10.9","10.10","10.15","12.2","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.30","12.39","12.41","13.30","15.1","15.2","15.3","15.7","15.8","15.9","15.10","15.12","15.13","15.17","15.18","15.20","15.24","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.42","15.43","19.5","20.5","21.2","22.17","22.32","22.33","22.48","23.5","24.15","24.16","25.1","26.7","26.24","26.32","26.35","26.48"],"console":["0.1","0.3","0.5","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.2","5.8","5.13","5.14","5.15","5.22","5.26","5.27","5.28","5.29","5.31","5.32","5.33","5.40","7.3","8.2","8.3","10.3","10.16","13.2","15.26","15.31","15.37","15.40","17.3","18.2","18.3","22.28","22.30","22.31","26.28","26.29","26.30"],"info":["0.1","0.3","0.5","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","5.8","5.13","5.15","5.22","5.26","5.28","5.29","5.31","5.32","5.33","7.3","8.2","8.3","10.3","10.5","10.16","15.26","15.31","15.37","17.3","18.2","18.3","22.28","22.30","26.28","26.29","26.30"],"warning":["0.2","1.6","5.11","10.1","10.5","10.6","15.21","15.37","21.0","22.2","22.4","22.17","22.19","22.39","23.3","23.4","26.10","26.39","26.45","26.48"],"提示":["0.2","5.11","23.3","26.45"],"为了方便区别":["0.2"],"元素和普通对象":["0.2"],"播放器里的所有":["0.2"],"click":["0.3","5.19","5.21","6.1","8.1","8.2","8.3","10.3","15.37","16.1","18.1","18.2","18.3","22.28","22.31","24.10","24.11","26.28","26.30","26.31"],"event":["0.3","16.1","18.1","24.11"],"你可以修改":["0.4"],"即可":["0.4"],"zh":["0.6"],"cn":["0.6","21.4","25.4"],"your":["0.6","10.6","20.3","21.3","21.4","22.3","25.3","25.4","26.3"],"ready":["0.7","0.8","0.11","0.12","0.13","0.14","0.15","2.6","2.18","2.22","2.24","5.8","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.22","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.41","5.42","6.5","8.5","9.8","10.7","10.9","10.10","12.2","12.18","12.22","12.24","15.8","15.10","15.13","15.22","15.26","15.28","15.29","15.31","15.32","15.33","15.40","15.41","15.42","16.5","18.5","19.8"],"html":["0.8","0.9","0.10","5.19","5.21","14.0","24.10"],"some":["0.8","0.9","0.10","15.37"],"text":["0.8","0.9","0.10","17.1"],"position":["0.9","5.21","5.34","7.1","8.4","14.0","17.1","18.4","24.10"],"video":["0.11","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.28","3.29","3.30","5.1","5.5","5.6","5.7","5.9","5.14","5.16","5.17","5.18","5.20","5.23","5.24","5.25","5.27","5.34","5.37","5.43","9.1","10.8","10.9","10.10","10.15","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.38","12.39","12.40","12.41","13.5","15.20","15.27","15.28","15.29","15.33","15.34","15.43","19.5","20.5","21.2","22.17","22.24","22.32","22.33","22.35","22.41","22.48","23.5","24.7","24.16","25.1","26.7","26.17","26.24","26.32","26.35","26.48"],"on":["0.11","0.12","0.13","0.14","0.15","2.6","2.11","2.12","2.18","2.24","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.20","5.22","5.26","5.27","5.28","5.29","5.31","5.32","5.33","5.41","5.42","6.4","6.5","7.4","10.7","10.9","10.10","12.2","12.6","12.18","12.22","12.24","15.7","15.8","15.10","15.12","15.13","15.22","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.41","15.42","16.4","16.5","17.4","22.4"],"subtitleoffset":["0.15"],"return":["0.16","9.2","9.3","10.16","15.11","19.2","19.3","24.9","24.12"],"name":["0.16","10.16"],"something":["0.16"],"dosomething":["0.16"],"一级属性":["1.0","5.0"],"app":["1.1","3.3","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.22","3.23","3.28","3.29","3.33","5.4","5.5","5.6","5.23","5.35","5.36","5.38","5.39","10.8","10.9","10.10","10.12","10.14","10.15","12.1","12.3","12.4","12.5","12.11","12.14","12.32","12.33","12.34","12.35","12.36","12.37","12.38","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.5","15.6","15.14","15.16","15.17","15.18","15.23","15.24","15.25","15.35","15.36","15.39","19.1","19.5","21.1","22.9","22.13","22.24","22.26","22.32","22.35","22.36","22.37","22.41","24.8","26.5","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.27","26.35","26.36","26.37","26.40","26.41","26.43","26.44","26.46","26.47","26.49"],"url":["1.1","3.6","3.7","3.8","3.9","3.10","3.17","3.22","3.28","3.29","5.4","5.5","5.6","5.23","5.25","5.35","5.36","5.37","5.38","5.39","10.8","10.9","10.10","10.12","10.14","10.15","12.1","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.19","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.28","13.29","13.30","15.5","15.6","15.12","15.14","15.16","15.17","15.18","15.20","15.23","15.24","15.25","15.35","15.36","15.39","19.1","19.5","20.5","21.1","22.24","22.41","23.5","24.7","24.8","24.16","26.3","26.5","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.24","26.25","26.37","26.41","26.44","26.49"],"assets":["1.1","2.1","2.3","2.4","2.14","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","5.1","5.4","5.5","5.6","5.16","5.23","5.25","5.35","5.36","5.37","5.38","5.39","10.8","10.9","10.10","10.12","10.14","10.15","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.28","13.29","13.30","15.1","15.3","15.5","15.6","15.7","15.8","15.9","15.10","15.12","15.14","15.16","15.17","15.18","15.20","15.23","15.24","15.25","15.27","15.28","15.33","19.1","19.5","20.5","21.1","22.24","22.32","22.35","22.41","22.48","23.5","24.7","24.8","24.16","26.5","26.7","26.17","26.24","26.35","26.36","26.37","26.41"],"全部工具函数请参考以下地址":["1.6"],"js":["1.11","10.11","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.1","13.2","13.24","15.38","22.11","22.21","22.26","22.36","22.40","22.46","22.49"],"emit":["2.0","12.0"],"focus":["2.0","12.0"],"移除事件":["2.0"],"sample":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","3.30","5.1","5.5","5.6","5.7","5.9","5.16","5.23","5.24","5.25","5.34","5.35","5.36","5.37","5.38","9.1","10.8","10.9","10.10","10.12","10.14","10.15","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.29","13.30","15.1","15.3","15.7","15.8","15.9","15.10","15.12","15.13","15.14","15.17","15.18","15.20","15.24","15.27","15.28","15.29","15.32","15.33","15.34","15.43","19.1","19.5","20.5","21.1","21.2","22.24","22.32","22.35","22.41","22.48","23.5","24.7","24.16","25.1","26.5","26.7","26.17","26.24","26.35","26.36","26.37","26.41"],"true":["2.16","2.17","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.39","3.30","5.2","5.3","5.20","6.2","6.4","6.5","9.1","9.5","10.15","12.17","12.20","12.28","13.1","13.31","13.33","15.2","15.20","16.2","16.4","16.5","19.5","22.17","24.16","26.10","26.32","26.45"],"setting":["2.17","2.20","2.28","3.30","9.1","9.5","12.20","13.30","19.5"],"fullscreen":["2.22"],"srt":["2.28","2.29","2.30","2.31","12.31"],"并调用":["2.46"],"但数据意外未出现":["2.58"],"属性名字全部都是大写的形式":["3.0"],"未来容易发生变动":["3.0"],"new":["3.1","3.4","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","10.8","10.10","10.11","10.12","10.14","11.1","13.3","13.4","13.6","13.7","13.10","13.11","13.12","13.13","13.18","13.19","13.21","13.22","13.23","13.26","13.28","13.31","13.32","13.33","15.4","15.35","15.36","15.38","20.9","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.27","22.34","22.35","22.36","22.37","22.40","22.43","22.44","22.46","22.47","22.49","23.9","26.6","26.11","26.34","26.36","26.40"],"container":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","10.8","10.9","10.10","10.11","10.12","10.14","10.15","12.1","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.4","15.5","15.6","15.14","15.16","15.23","15.25","15.35","15.36","15.39","19.1","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.25","22.26","22.27","22.35","22.36","22.37","22.43","22.47","22.49","23.3","23.10","24.8","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.27","26.35","26.36","26.40","26.43","26.44","26.46","26.47","26.49"],"log":["3.2","5.40","15.40"],"art":["3.14","3.15","3.16","3.19","3.20","3.25","3.26","3.31","10.8","10.10","10.11","10.12","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.22","13.23","13.25","13.26","13.27","13.28","13.31","13.32","13.33","15.4","15.38","20.9","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.35","22.36","22.37","22.43","22.44","22.46","22.47","22.49","23.9","26.11","26.26","26.36"],"show":["4.0","6.2","6.3","6.4","14.0","16.2","16.3","22.28","22.30"],"block":["4.0","14.0"],"hide":["4.0","14.0"],"controls":["4.0","5.34","15.34","24.10"],"tooltip":["4.0","7.1","9.6","19.6","26.31"],"muted":["5.2","5.3","5.24","15.2","15.3","26.10"],"seek":["5.10","5.12"],"t":["5.11"],"right":["5.19","5.21","8.3","8.4","14.0","17.1","18.3","18.4","24.10","26.28"],"switch":["5.19"],"function":["5.19","5.21","6.1","8.1","8.2","8.3","16.1","18.1","18.2","18.3","22.28","22.31","24.9","24.11","24.13","26.28","26.30"],"theme":["5.40","15.40"],"settimeout":["5.41","6.5","8.5","9.8","10.13","15.41","16.5","18.5","19.8","26.2"],"subtitle":["5.43","12.29","12.30"],"object":["6.1","8.1"],"组件样式对象":["6.1","8.1"],"false":["6.2","6.3","6.4","9.4","13.18","13.19","13.32","16.2","16.3","16.4","19.4","22.30","24.6"],"update":["6.5","8.5","9.8","16.5","19.8"],"组件挂载后触发":["7.1"],"组件的提示文本":["7.1"],"yellow":["7.2","17.2"],"02":["7.2","17.2"],"onselect":["7.2","17.2"],"item":["7.2","9.4","17.2"],"dom":["7.2","17.2"],"args":["7.3","8.2","8.3","17.3","18.2","18.3","22.28","22.31","26.28","26.30"],"mounted":["7.3","8.2","8.3","17.3","18.2","18.3","24.13"],"style":["7.4","14.0","17.4","20.5","22.31","23.4","23.5","24.13","26.31"],"color":["7.4","17.4","22.31","24.4","26.31"],"red":["7.4","17.4"],"control":["7.5","17.1","17.5"],"by":["7.5","8.5","9.8","17.5","18.5","19.8","22.10"],"absolute":["8.4","14.0","18.4"],"top":["8.4","14.0","18.4"],"50px":["8.4","18.4"],"the":["8.5","9.8","18.5","19.8","22.10"],"quality":["9.2","19.2"],"1080p":["9.2","19.2"],"src":["9.4","14.0","19.4","22.38","26.38"],"state":["9.4","22.38","24.6","26.38"],"svg":["9.4","9.7","19.4","19.7"],"settings":["9.5","10.4","19.5"],"slider":["9.5"],"5x":["9.5","9.6","19.5","19.6"],"img":["9.5","9.6","14.0","19.4","19.6"],"width":["9.5","9.6","14.0","19.4","19.6","20.5","22.1","26.1"],"heigth":["9.5","19.4"],"icon":["9.6","19.6"],"range":["9.7","19.7"],"instance":["10.0"],"which":["10.0","11.0","15.0"],"reminder":["10.1"],"if":["10.1","10.4","15.37","20.11","22.45","24.11","24.12"],"you":["10.1","10.4","15.30","15.37"],"directly":["10.1"],"and":["10.2","10.4","12.46","17.1"],"plain":["10.2"],"objects":["10.2"],"in":["10.2"],"are":["10.2","15.15"],"mouseenter":["10.3"],"instances":["10.4"],"share":["10.4"],"same":["10.4","15.11"],"localstorage":["10.4"],"want":["10.4"],"different":["10.4"],"players":["10.4"],"use":["10.4","22.1"],"loading":["10.5","12.54"],"this":["10.5","22.39"],"using":["10.6"],"can":["10.6","22.39"],"only":["10.6","22.39"],"var":["10.8","10.10","10.11","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.38","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.26","22.34","22.36","22.40","22.43","22.44","22.46","22.47","22.49","26.11","26.34","26.36"],"artplayer":["10.8","10.10","10.11","10.12","10.14","11.1","13.1","13.24","15.4","15.5","15.14","15.16","15.35","15.36","15.38","15.39","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.25","22.27","22.34","22.35","22.36","22.37","22.43","22.44","22.47","22.49","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.27","26.34","26.36","26.40","26.43","26.46","26.47","26.49"],"code":["10.11","22.11"],"flip":["10.15"],"playbackrate":["10.15"],"aspectratio":["10.15"],"constructor":["11.0"],"please":["11.6"],"refer":["11.6"],"remove":["12.0"],"end":["12.42","12.43"],"without":["12.42","12.43"],"duration":["12.45"],"is":["12.46","12.48","12.54","15.30"],"sent":["12.46"],"reached":["12.47"],"not":["12.48","15.30","20.4"],"has":["12.49","12.56","12.57"],"due":["12.53","15.19","15.21","22.17"],"changed":["12.55"],"unexpectedly":["12.58"],"been":["12.59"],"attribute":["12.60"],"temporarily":["12.62"],"uppercase":["13.0"],"subject":["13.0"],"change":["13.0"],"defaults":["13.20"],"ads":["14.0"],"100px":["14.0"],"display":["14.0","24.13"],"none":["14.0"],"20px":["14.0"],"have":["15.11","20.3"],"functionality":["15.11"],"however":["15.11"],"method":["15.11"],"a":["15.11","20.3","21.0"],"promise":["15.11","24.5"],"such":["15.15"],"as":["15.15"],"that":["15.15"],"being":["15.15"],"live":["15.15"],"streamed":["15.15"],"or":["15.15","22.1"],"note":["15.19","22.2"],"to":["15.19","15.21"],"browser":["15.19","15.21","22.17"],"security":["15.19","15.21"],"mechanisms":["15.19","15.21"],"before":["15.19"],"triggering":["15.19"],"jpg":["15.22"],"json":["15.26"],"stringify":["15.26"],"but":["15.30","22.45"],"do":["15.30"],"know":["15.30"],"exact":["15.30"],"property":["15.30"],"tip":["15.37","20.3","20.11","22.19"],"need":["15.37"],"left":["17.1"],"pnpm":["20.1","23.1","24.2"],"com":["20.2","20.11","23.2","23.11"],"must":["20.3"],"responsive":["20.4"],"modifying":["20.4"],"https":["20.5","23.5"],"org":["20.5","23.5"],"600px":["20.5"],"height":["20.5","22.1","26.1"],"400px":["20.5","22.1","26.1"],"margin":["20.5"],"d":["20.6"],"null":["20.8","23.8"],"volume":["20.9"],"options":["20.10"],"option":["20.10","23.10"],"unpkg":["20.11","23.11"],"own":["21.0"],"when":["21.0","22.7"],"cannot":["21.0"],"be":["21.0"],"matched":["21.0"],"lang":["21.2","21.3","25.2"],"script":["21.2","25.2"],"i18n":["21.3","25.0","25.3"],"play":["21.4","22.19","25.4"],"300px":["22.1","26.1"],"support":["22.2"],"for":["22.2"],"three":["22.2"],"file":["22.2"],"formats":["22.2"],"size":["22.7"],"last":["22.7"],"upon":["22.10"],"entering":["22.10"],"cover":["22.11"],"div":["22.11"],"classname":["22.11"],"run":["22.11"],"space":["22.19"],"toggle":["22.19"],"pause":["22.19"],"these":["22.19"],"document":["22.26"],"queryselector":["22.26"],"setting02":["22.29","26.29"],"green":["22.31","26.31"],"one":["22.33","26.33"],"more":["22.33","26.33"],"chance":["22.33","26.33"],"gif":["22.38","26.38"],"recognition":["22.39"],"extensions":["22.39"],"player":["22.39"],"parse":["22.39"],"cache":["22.45"],"progress":["22.45"],"of":["22.45"],"播放器的尺寸依赖于容器":["23.3"],"的尺寸":["23.3"],"ts":["23.6"],"types":["23.10"],"const":["23.10"],"ffffff":["24.4"],"弹幕颜色":["24.4"],"默认为白色":["24.4"],"beforevisible":["24.5"],"弹幕显示前的过滤器":["24.5"],"visible":["24.5"],"弹幕层是否可见":["24.5"],"emitter":["24.5"],"是否开启弹幕发射器":["24.5"],"maxlength":["24.5"],"弹幕输入框最大长度":["24.5"],"await":["24.6"],"这里是所有弹幕的过滤器":["24.6"],"包含来自服务端的和来自用户输入的":["24.6"],"plugins":["24.9","24.15","24.16","24.17"],"artplayerplugindanmuku":["24.9","24.15","24.16","24.17"],"xml":["24.10"],"隐藏弹幕":["24.10"],"prompt":["24.12"],"请输入弹幕文本":["24.12"],"弹幕测试文本":["24.12"],"trim":["24.12"],"value":["24.13"],"flex":["24.13"],"alignitems":["24.13"],"center":["24.13"],"切换到新的弹幕库":["24.14"],"config":["24.14"],"v2":["24.14"],"fullscreenweb":["24.16"],"stop":["24.18"],"弹幕停止":["24.18"],"start":["24.18"],"弹幕开始":["24.18"],"当无法匹配到语言时":["25.0"],"会默认显示英文":["25.0"],"或者使用":["26.1"],"aspect":["26.1"],"热键":["26.19"],"描述":["26.19"],"增加音量":["26.19"],"降低音量":["26.19"],"innerhtml":["26.26"],"opacity":["26.28"],"sd":["26.32"],"ploading":["26.38"],"后缀的识别":["26.39"],"播放器只能解析这种后缀":["26.39"],"因为播放器默认使用":["26.45"]},{"0":["20.5","23.5"],"2":["5.28"],"4":["22.11"],"5":["5.7","5.8","5.14","15.7","26.7"],"8":["2.0"],"9":["5.29","22.1"],"10":["5.10","5.12","15.10","15.12"],"16":["5.29","15.29","22.1","24.12","26.1"],"22":["19.5"],"60":["22.35","24.5","26.35"],"120":["22.33"],"180":["22.33","26.33"],"200":["24.6"],"240":["26.33"],"360":["9.2"],"720":["9.2","19.2"],"1000":["0.8","0.9","0.10","0.15","10.8","10.9","24.5","26.2"],"1080":["9.2","19.2"],"5000":["0.13","10.13"],"比较少用":["0.0"],"warning":["0.1","0.5","0.6","0.7","0.8","5.15","5.19","5.21","5.26","5.30","5.37","10.3","10.7","10.9","10.13","15.26","20.5","22.28","22.29","22.30","22.31","22.38","22.41","22.48","26.2","26.4","26.7","26.17","26.19","26.30","26.31","26.38","26.41"],"提示":["0.1","5.15","5.19","5.21","5.30","26.2","26.7","26.10","26.17"],"假如直接修改这个":["0.1"],"元素都是以":["0.2"],"开头命名的":["0.2"],"这是所有":["0.2"],"元素的定义":["0.2"],"mouseenter":["0.3"],"mouseleave":["0.3","10.3"],"loading":["0.5","12.49"],"这是所有图标的定义":["0.5"],"types":["0.5","1.6","25.0","26.48"],"使用":["0.6","24.9"],"只能更新实例化之后的":["0.6"],"to":["0.7","11.6","22.2","22.30","22.31"],"play":["0.7","4.0","5.2","10.7","15.2","21.3","22.2","25.3"],"如果想马上隐藏":["0.7"],"settimeout":["0.8","0.9","0.10","0.12","0.13","0.14","0.15","5.2","5.3","5.7","5.10","5.12","5.20","6.4","7.4","8.4","9.7","10.8","10.9","10.10","10.15","15.2","15.7","15.10","15.12","16.4","17.4","18.4","19.7"],"false":["0.8","0.9","0.10","0.14","0.15","10.8","10.9","10.10","10.15","22.28","24.4","26.28","26.30"],"left":["0.9","7.1","10.9"],"true":["0.10","0.12","2.19","3.5","3.6","3.7","3.28","3.29","5.1","5.13","5.24","5.31","6.3","10.10","12.16","12.19","12.21","12.22","12.23","12.24","12.25","12.26","12.39","13.5","13.6","13.7","13.28","13.29","13.30","15.1","15.3","15.24","15.31","16.3","19.1","22.24","22.32","26.17","26.24"],"srt":["0.11","5.43","12.28","12.29","12.30","15.43"],"on":["0.16","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.8","3.9","3.10","3.17","5.1","5.2","5.3","5.4","5.5","5.6","5.16","5.23","5.24","5.25","5.35","5.36","5.43","8.4","9.7","10.8","10.11","10.12","10.14","10.15","12.1","12.3","12.4","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.17","12.19","12.20","12.21","12.23","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.8","13.9","13.10","13.17","15.1","15.2","15.3","15.5","15.6","15.9","15.14","15.16","15.17","15.18","15.20","15.21","15.23","15.24","15.25","15.35","15.36","15.43","18.4","19.7","24.15","24.17","26.4"],"非常少使用":["1.0"],"sample":["1.1","3.1","3.3","3.4","3.11","3.12","3.13","3.18","3.21","3.22","3.23","3.24","3.27","3.31","3.32","3.33","5.4","5.39","10.11","11.1","12.1","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.17","13.21","13.22","13.28","13.33","15.4","15.5","15.6","15.16","15.23","15.25","15.35","15.36","15.38","15.39","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.25","22.27","22.34","22.36","22.37","22.40","22.43","22.44","22.47","22.49","23.10","24.8","26.6","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.27","26.34","26.40","26.43","26.44","26.46","26.47","26.49"],"video":["1.1","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.21","3.22","3.23","3.24","3.31","3.33","5.4","5.38","10.11","10.12","10.14","11.1","12.1","12.37","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","15.4","15.23","15.38","19.1","20.10","21.1","22.9","22.27","23.10","24.8","26.5","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.27","26.36","26.37","26.41","26.43","26.44","26.46","26.47"],"mp4":["1.1","3.8","3.9","3.10","3.17","3.22","3.28","5.4","5.5","5.6","5.23","5.25","5.35","5.36","5.38","5.39","10.11","10.12","10.14","12.1","12.3","12.4","12.5","12.11","12.14","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.40","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.4","15.5","15.6","15.14","15.16","15.23","15.25","15.35","15.36","15.38","15.39","19.1","20.10","21.1","22.5","22.14","22.16","22.24","22.35","22.36","22.37","22.41","23.10","24.7","24.8","26.5","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.25","26.36","26.37","26.41","26.44","26.49"],"artplayer":["1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.2","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.2","22.11","22.21","22.40","22.46"],"d":["1.6"],"info":["1.11","2.12","5.14","5.27","5.37","5.38","9.4","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","15.8","15.13","15.14","15.22","15.27","15.28","15.29","15.32","15.33","19.4","20.5","22.31","23.5","24.17","26.31"],"const":["2.0","5.17","5.18","9.4","12.0","15.17","15.18","19.4","20.10","24.13"],"onready":["2.0","12.0"],"console":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","5.24","5.37","5.38","5.39","9.4","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.27","12.31","12.41","15.8","15.13","15.14","15.22","15.27","15.28","15.29","15.32","15.33","15.39","19.4","20.5","23.5","24.17","26.31"],"event":["2.5","2.7","2.8","2.9","2.10","2.12","2.13","2.22","2.41","5.37","9.4","12.5","12.7","12.8","12.9","12.10","12.12","12.13","12.22"],"reconnecttime":["2.11","12.11"],"state":["2.12","2.15","2.16","2.21","2.23","2.24","2.25","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","9.5","9.6","12.12","12.15","12.21","12.23","12.24","12.25","12.32","12.33","12.34","12.35","12.36","12.38","19.6"],"height":["2.18","19.5","23.5"],"datauri":["2.26","12.26"],"currenttime":["2.27","12.27"],"offset":["2.28"],"cues":["2.29","2.30","2.31","12.29","12.30","12.31"],"option":["2.31","12.31"],"load":["2.46","12.46"],"方法重新加载它":["2.46"],"基本上用不到":["3.0"],"app":["3.1","3.4","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.24","3.25","3.26","3.27","3.31","3.32","10.11","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.38","20.10","22.3","22.5","22.6","22.8","22.11","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.27","22.34","22.40","22.43","22.44","22.46","22.47","22.49","23.10","26.3","26.11","26.34"],"url":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.38","20.10","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.27","22.34","22.37","22.43","22.44","22.46","22.47","22.49","23.10","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.26","26.27","26.34","26.43","26.46","26.47"],"assets":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","10.11","11.1","13.3","13.4","13.8","13.9","13.10","13.11","13.12","13.13","13.17","13.21","13.22","13.23","13.31","13.32","13.33","15.4","15.35","15.36","15.38","15.39","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.27","22.34","22.36","22.37","22.40","22.43","22.44","22.46","22.47","22.49","23.10","26.3","26.6","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.26","26.27","26.34","26.40","26.43","26.44","26.46","26.47","26.49"],"loop":["3.5","3.6","3.7","13.5","13.6","13.7"],"flip":["3.5","3.6","3.7","13.5"],"dblclick":["3.17"],"setting":["3.28","3.29","12.17","12.28","13.28","13.29","19.1","24.13"],"playbackrate":["3.28","13.28"],"contextmenu":["3.28","3.29","3.30","13.29","13.30"],"aspectratio":["3.29","13.29"],"show":["3.29","3.30","9.7","13.30","19.7","24.11","24.18","26.28","26.30"],"click":["4.0","5.34","5.37","14.0","15.34"],"marginright":["4.0","14.0"],"比较常用":["5.0"],"muted":["5.1","15.1","15.24"],"ready":["5.2","5.3","5.5","5.6","5.7","5.9","5.16","5.20","5.23","5.24","5.25","6.4","7.4","8.4","9.7","10.8","10.11","10.12","10.14","10.15","12.0","12.6","15.2","15.3","15.7","15.9","15.12","15.14","15.16","15.17","15.18","15.20","15.24","15.27","16.4","17.4","18.4","19.7","24.17"],"seek":["5.7","15.7","15.10","15.12"],"switch":["5.11"],"和":["5.11","7.1","24.5"],"的功能是一样的":["5.11"],"只是":["5.11"],"有的视频是没有时长的":["5.15"],"async":["5.17","5.18","15.17","15.18"],"await":["5.17","5.18","15.17","15.18"],"t":["5.22"],"json":["5.26"],"stringify":["5.26"],"resize":["5.30","24.15"],"当你的容器只有宽度":["5.30"],"playsinline":["5.31","15.31","26.37"],"m3u8":["5.32","22.2","26.40"],"000":["5.33"],"right":["5.34","7.1","15.34"],"html":["5.34","10.8","10.9","10.10","15.34","20.1","23.1"],"green":["5.40","15.40"],"1080p":["5.41","15.41"],"png":["5.42","15.42","22.35","22.38","26.35","26.38"],"组件点击事件":["6.1","8.1"],"mounted":["6.1","8.1","16.1","18.1","22.28","26.28"],"组件挂载后触发":["6.1","8.1"],"get":["6.2","6.3","7.2","7.3","8.2","8.3","16.2","16.3","17.2","17.3","18.2","18.3"],"the":["6.2","6.3","6.4","6.5","7.2","7.3","7.4","8.2","8.3","8.4","9.7","16.2","16.3","16.4","16.5","17.2","17.3","17.4","18.2","18.3","18.4","19.7","22.19","22.30"],"element":["6.2","6.3","7.2","7.3","8.2","8.3","16.2","16.3","17.2","17.3","18.2","18.3"],"of":["6.2","6.3","7.2","7.3","8.2","8.3","12.53","15.37","16.2","16.3","17.2","17.3","18.2","18.3","22.38"],"by":["6.2","6.3","6.4","6.5","7.2","7.4","8.4","16.2","16.3","16.4","16.5","17.2","17.4","18.4","21.0"],"delete":["6.4","7.4","8.4","9.7"],"控制控制器出现的左右位置":["7.1"],"selector":["7.1","17.1"],"array":["7.1","17.1"],"return":["7.2","17.2"],"control":["7.2","7.3","7.4","17.2","17.3","17.4"],"200px":["8.5","18.5"],"720p":["9.2","19.2"],"360p":["9.2","19.2"],"nextstate":["9.4","19.4"],"src":["9.5","9.6","19.5","19.6"],"svg":["9.5","9.6","19.5","19.6"],"item":["9.5","19.4"],"heigth":["9.6","19.6"],"pip":["9.8","19.8"],"mode":["9.8","19.8"],"close":["9.8","19.8"],"are":["10.0","11.0","15.0"],"less":["10.0"],"commonly":["10.0","15.0"],"modify":["10.1","10.4","20.11"],"this":["10.1"],"object":["10.1"],"named":["10.2"],"starting":["10.2"],"with":["10.2"],"a":["10.2","12.48","15.21"],"here":["10.2"],"is":["10.2","10.5","16.1","18.1","22.7","22.45"],"definition":["10.2","10.5","22.38"],"if":["10.3","10.6","22.2","22.4","22.17"],"you":["10.3","10.6","20.3","22.45"],"need":["10.3","20.11","22.2","22.45"],"some":["10.3","10.8","10.9","10.10"],"only":["10.3","10.13","15.37","22.19"],"exist":["10.3","15.37"],"during":["10.3","15.37"],"lifecycle":["10.3"],"can":["10.4","15.11","20.3"],"accordingly":["10.4"],"after":["10.6","10.13","16.1","18.1","22.19"],"instantiation":["10.6"],"want":["10.6"],"before":["10.6"],"please":["10.6","20.11","22.29","22.30"],"immediately":["10.7"],"hide":["10.7","24.18"],"text":["10.8","10.9","10.10","24.7","24.9"],"position":["10.9","15.34"],"shortcut":["10.13"],"keys":["10.13"],"will":["10.13","20.4","22.19"],"work":["10.13","22.19"],"subtitleoffset":["10.15"],"something":["10.16"],"dosomething":["10.16"],"very":["11.0","15.30"],"rarely":["11.0"],"container":["11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.38","20.10","22.3","22.21","22.34","22.40","22.44","22.46","26.34"],"following":["11.6","20.11"],"address":["11.6","22.17"],"off":["12.0"],"fullscreen":["12.22"],"having":["12.42"],"stop":["12.42"],"for":["12.42","12.43","21.0","22.10","22.48"],"stopping":["12.43"],"content":["12.43"],"property":["12.45"],"changes":["12.45"],"method":["12.46"],"called":["12.46"],"end":["12.47"],"point":["12.47"],"supported":["12.48"],"finished":["12.49"],"lack":["12.53"],"resources":["12.54"],"completed":["12.56"],"started":["12.57"],"has":["12.58","12.60"],"not":["12.58"],"suspended":["12.59"],"changed":["12.60"],"missing":["12.62"],"future":["13.0"],"and":["13.0","20.11"],"new":["13.1","13.14","13.15","13.16","13.24","13.25","13.27","20.8","22.11","22.26","23.8","26.26"],"log":["13.2"],"art":["13.24","22.11","22.26"],"controls":["14.0"],"tooltip":["14.0"],"quite":["15.0"],"when":["15.11"],"it":["15.11","15.30","15.37"],"resolves":["15.11"],"indicates":["15.11"],"that":["15.11"],"played":["15.11"],"been":["15.15"],"fully":["15.15"],"decoded":["15.15"],"in":["15.15","20.4"],"which":["15.15"],"page":["15.19","22.10"],"must":["15.19","22.10"],"have":["15.19"],"had":["15.19"],"an":["15.19","17.1","22.4"],"user":["15.21"],"interaction":["15.21"],"e":["15.21"],"g":["15.21"],"useful":["15.30"],"as":["15.30","22.2","22.7"],"s":["15.30"],"lifespan":["15.37"],"triggered":["16.1","18.1"],"context":["16.4"],"controller":["17.1"],"objects":["17.1"],"selection":["17.1"],"list":["17.1"],"onselect":["17.1"],"img":["19.5"],"width":["19.5","23.5"],"see":["20.3"],"more":["20.3","22.41"],"examples":["20.3"],"use":["20.3"],"at":["20.3"],"directly":["20.4"],"60px":["20.5","23.5"],"auto":["20.5","23.5"],"non":["20.5"],"responsive":["20.5"],"ts":["20.6"],"current":["20.8","23.8"],"tip":["20.9","23.3","23.9","23.11"],"complete":["20.9"],"typescript":["20.9","23.9"],"support":["20.11"],"even":["20.11"],"older":["20.11"],"configuration":["20.11","22.28","22.30","22.31"],"then":["20.11","22.45"],"displayed":["21.0"],"default":["21.0"],"i18n":["21.0"],"usage":["21.0"],"lang":["21.1","25.1"],"window":["21.2","25.2"],"imported":["21.4","25.4"],"aspect":["22.1"],"ratio":["22.1","26.1"],"ogg":["22.2","26.2"],"webm":["22.2","26.2"],"other":["22.2"],"such":["22.2","22.7"],"or":["22.2"],"inside":["22.4"],"callback":["22.4"],"refers":["22.4"],"instance":["22.4"],"but":["22.4","22.39"],"arrow":["22.4"],"initialized":["22.7"],"next":["22.7"],"time":["22.7"],"refreshing":["22.7"],"be":["22.10"],"set":["22.10"],"var":["22.11"],"security":["22.17"],"mechanisms":["22.17"],"source":["22.17"],"player":["22.19"],"gains":["22.19"],"focus":["22.19"],"innerhtml":["22.26"],"component":["22.28","22.30","22.31"],"refer":["22.30","22.31"],"sd":["22.32"],"480p":["22.32","26.32"],"谁でもいいはずなのに":["22.33","26.33"],"夏の想い出がまわる":["22.33","26.33"],"all":["22.38"],"cannot":["22.39"],"zh":["22.42","26.42"],"cn":["22.42","26.42"],"same":["22.45"],"different":["22.45"],"reference":["22.48"],"syntax":["22.48"],"所以你的容器":["23.3"],"必须是有尺寸的":["23.3"],"以下链接可以看到更多的使用例子":["23.3"],"非响应式":["23.4"],"在":["23.4"],"600px":["23.5"],"400px":["23.5"],"margin":["23.5"],"全部":["23.9"],"定义":["23.9"],"volume":["23.10"],"假如你要兼容更古老的浏览器时":["23.11"],"border":["24.4"],"弹幕是否有描边":["24.4"],"默认为":["24.4"],"locktime":["24.5"],"输入框锁定时间":["24.5"],"theme":["24.5"],"dark":["24.5","24.16"],"弹幕主题":["24.5"],"支持":["24.5"],"length":["24.6"],"这是弹幕即将显示的时触发的函数":["24.6"],"当返回true后才表示可以马上发送到播放器里":["24.6"],"弹幕已经出现在播放器里":["24.6"],"你可以访问到弹幕的dom元素里":["24.6"],"plugins":["24.7","24.8"],"artplayerplugindanmuku":["24.7","24.8"],"promise":["24.9"],"resovle":["24.9"],"function":["24.10","26.31"],"target":["24.11"],"innertext":["24.11"],"else":["24.11"],"color":["24.12"],"math":["24.12"],"floor":["24.12"],"random":["24.12"],"0xffffff":["24.12"],"tostring":["24.12"],"queryselector":["24.13"],"addeventlistener":["24.13"],"追加":["24.14"],"追加新的弹幕库":["24.14"],"参数类型和option":["24.14"],"danmuku相同":["24.14"],"xml":["24.15","24.17"],"弹幕隐藏":["24.18"],"弹幕显示":["24.18"],"写法参考":["25.0","26.48"],"默认支持三种视频文件格式":["26.2"],"播放器会缓存最后一次音量的大小":["26.7"],"假如希望默认进入页面就能自动播放视频":["26.10"],"必需为":["26.10"],"视频快进":["26.19"],"视频快退":["26.19"],"space":["26.19"],"切换播放":["26.19"],"暂停":["26.19"],"subtitle":["26.24"],"组件配置":["26.30"],"args":["26.31"],"hd":["26.32"],"webkit":["26.37"],"全部图标的定义":["26.38"],"但无法解析这种后缀":["26.39"],"作为":["26.45"],"key":["26.45"],"来缓存播放进度的":["26.45"],"但假如你的同一个视频的":["26.45"]},{"0":["5.9","5.10","5.12","5.15","5.22","15.9","15.10","15.12","15.15","15.22","20.10","23.10"],"1":["5.43","9.6","15.43","19.6","24.7","24.9"],"2":["5.7","15.7","15.28"],"5":["5.5","5.6","9.6","15.5","15.6","15.8","15.14","19.6","20.10","23.10"],"9":["15.29","26.1"],"10":["5.42","9.6","15.42","19.6","22.35","26.35"],"60":["5.42","15.42"],"240":["22.33"],"300":["22.33","26.33"],"360":["19.2"],"404":["3.14","3.15","13.14","13.15"],"1000":["0.12","0.14","10.10","10.12","10.14","10.15"],"3000":["5.2","5.3","5.7","5.10","5.12","5.20","5.41","6.4","6.5","7.4","7.5","8.4","8.5","9.7","9.8","15.2","15.3","15.7","15.10","15.12","15.20","15.41","16.4","16.5","17.4","17.5","18.4","18.5","19.7","19.8"],"对象":["0.1"],"播放器不会马上做出响应":["0.1"],"types":["0.2","2.0","10.2","10.5","11.6","20.9","21.0","22.38","22.48","23.9","26.38"],"d":["0.2","0.5","2.0","10.2","10.5","11.6","12.0","21.0","22.38","22.48","25.0","26.38","26.48"],"ts":["0.2","0.5","1.6","2.0","10.2","10.5","11.6","12.0","21.0","22.38","22.48","25.0","26.38","26.48"],"warning":["0.3","0.9","0.10","0.13","0.15","2.0","10.8","10.10","10.15","12.0","22.1","22.35","22.42","23.5","26.1","26.28","26.29","26.35","26.42"],"提示":["0.3","0.13","5.26","5.37","26.1","26.4","26.19"],"假如你需要一些":["0.3","5.37"],"事件只存在于播放器的生命周期上时":["0.3","5.37"],"强烈建议使用这些函数":["0.3"],"以避免造成内存泄漏":["0.3","5.37"],"your":["0.4","5.16","10.4","15.16"],"假如想在实例化之前更新":["0.6"],"请使用基础选项的":["0.6"],"来更新":["0.6"],"的显示":["0.7"],"组件配置":["0.8","0.9","0.10","26.28","26.31"],"请参考以下地址":["0.8","0.9","0.10","0.15","26.28","26.29","26.30","26.31"],"component":["0.8","0.9","0.10","0.15","10.8","10.9","10.10","10.15","22.29","26.28","26.29","26.30","26.31"],"color":["0.11","10.11","22.36","26.36"],"red":["0.11","10.11"],"false":["0.12","5.20","9.8","10.12","10.14","15.20","19.8"],"只在播放器获得焦点后":["0.13","26.19"],"如点击了播放器后":["0.13","26.19"],"这些快捷键才会生效":["0.13","26.19"],"true":["0.14","3.11","3.12","3.13","3.21","3.22","3.23","3.24","5.23","10.12","10.14","13.11","13.12","13.13","13.21","13.22","13.23","13.24","15.13","15.23","22.8","22.9","22.11","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.25","22.26","22.37","22.43","22.44","22.46","22.47","24.12","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.22","26.23","26.25","26.26","26.37","26.43","26.44","26.46","26.47"],"设置面板":["0.15"],"html":["0.15","10.15","22.41","22.42","24.2","26.41","26.42"],"ready":["0.16","2.0","5.1","5.4","5.43","10.16","15.1","15.4","15.5","15.6","15.23","15.25","15.43"],"off":["2.0"],"全部事件请参考以下地址":["2.0"],"events":["2.0"],"info":["2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","5.17","5.18","5.24","5.35","5.36","5.39","9.5","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","15.17","15.18","15.24","15.35","15.36","15.38","15.39","19.5"],"console":["2.2","2.6","2.19","2.28","2.39","3.8","3.9","3.10","3.17","5.17","5.18","5.35","5.36","9.5","12.1","12.2","12.3","12.4","12.5","12.6","12.11","12.14","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.28","12.29","12.30","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","13.8","13.9","13.10","13.17","15.17","15.18","15.24","15.35","15.36","15.38","19.5"],"log":["2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.8","3.9","3.10","3.17","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.8","13.9","13.10","13.17"],"video":["3.1","3.3","3.4","3.16","3.18","3.19","3.20","3.25","3.26","3.27","3.32","13.3","13.4","13.11","13.12","13.13","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","22.3","22.6","22.8","22.11","22.12","22.18","22.20","22.21","22.22","22.23","22.25","22.26","22.34","22.43","22.47","26.3","26.11","26.26","26.34"],"mp4":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","22.3","22.6","22.8","22.9","22.11","22.12","22.13","22.15","22.18","22.20","22.21","22.22","22.23","22.25","22.26","22.27","22.34","22.43","22.44","22.46","22.47","22.49","26.3","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.26","26.27","26.34","26.43","26.46","26.47"],"playbackrate":["3.5","3.6","3.7","13.5","13.6","13.7"],"aspectratio":["3.5","3.6","3.7","13.5","13.6","13.7"],"autoplayback":["3.11","3.12","3.13","13.11","13.12","13.13"],"sample":["3.14","3.15","3.16","3.19","3.20","3.25","3.26","13.1","13.3","13.4","13.14","13.15","13.16","13.18","13.19","13.23","13.24","13.25","13.26","13.27","13.31","13.32","22.3","22.11","22.21","22.26","22.46","26.3","26.26"],"autoorientation":["3.21","13.21"],"show":["3.22","3.28","13.22","13.28","13.29"],"fastforward":["3.23","3.24","13.23","13.24"],"fullscreenweb":["3.31","13.31"],"miniprogressbar":["3.33","13.33"],"pause":["4.0","14.0"],"layer":["4.0","14.0"],"png":["4.0","14.0"],"t":["5.9","5.10","5.12","15.9","15.10","15.12","15.22"],"方法会返回":["5.11"],"promise":["5.11"],"当":["5.11"],"resolve":["5.11"],"时表示新地址是可以播放":["5.11"],"reject":["5.11"],"时表示新地址加载错误":["5.11"],"例如直播中的视频或者没被解码完成的视频":["5.15"],"这个时候获取的时长会是":["5.15"],"name":["5.16"],"由于浏览器安全机制":["5.19","5.21","26.17"],"触发窗口全屏前":["5.19"],"页面必须先存在交互":["5.19","5.21"],"例如用户点击过页面":["5.19","5.21"],"触发画中画前":["5.21"],"尺寸和坐标信息是通过":["5.26"],"getboundingclientrect":["5.26","15.26"],"获取的":["5.26"],"但不知道具体高度时":["5.30"],"这个属性很有用":["5.30"],"它能自动计算出视频的高度":["5.30"],"但你需要确定设置这个属性的时机":["5.30"],"强烈建议使用该函数":["5.37"],"4k":["5.41","15.41"],"number":["5.42","15.42","24.13"],"column":["5.42","15.42"],"tooltip":["6.1","8.1","16.1","18.1"],"组件的提示文本":["6.1","8.1"],"remove":["6.4","7.4","8.4","9.7","16.4","17.4","18.4","19.7"],"选择列表的对象数组":["7.1"],"onselect":["7.1"],"选择列表的元素被点击时触发的函数":["7.1"],"by":["7.3","8.2","8.3","9.7","17.3","18.2","18.3","19.7"],"left":["8.5","18.5","22.2"],"switchquality":["9.2","19.2"],"open":["9.4","19.4"],"return":["9.4","9.5","19.4","19.5"],"event":["9.5"],"x":["9.5","19.5"],"range":["9.6","19.6"],"switch":["9.8","19.8"],"used":["10.0","11.0","15.0","22.4"],"will":["10.1","15.15","20.5","22.4"],"not":["10.1","13.0","20.5","22.4"],"respond":["10.1"],"immediately":["10.1"],"of":["10.3","10.7","12.0"],"it":["10.3","12.46","20.11","22.7"],"strongly":["10.3"],"recommended":["10.3","15.37"],"use":["10.3","10.6","15.37","22.39"],"these":["10.3"],"functions":["10.3"],"avoid":["10.3","15.37"],"causing":["10.3","15.37"],"memory":["10.3","15.37"],"leaks":["10.3","15.37"],"from":["10.6","17.1"],"basic":["10.6"],"options":["10.6","22.1"],"for":["10.6","12.0","22.4"],"configuration":["10.8","10.9","10.10"],"please":["10.8","10.9","10.10","10.15","12.0","22.2","22.10","22.28"],"refer":["10.8","10.9","10.10","10.15","12.0","20.11","21.0","22.2","22.28","22.29"],"following":["10.8","10.9","10.10","10.15","12.0","20.3","22.28","22.29","22.30","22.31"],"address":["10.8","10.9","10.10","12.0","22.28","22.29","22.30","22.31"],"srt":["10.11","22.24","26.24"],"settimeout":["10.12","10.14","15.3","15.20"],"has":["10.13"],"gained":["10.13"],"focus":["10.13"],"e":["10.13","15.19"],"g":["10.13","15.19"],"clicking":["10.13","22.19"],"link":["10.15","20.3"],"on":["10.16","15.4","15.19","22.2","22.19","24.6"],"a":["12.0"],"full":["12.0"],"list":["12.0"],"state":["12.37","12.39"],"further":["12.42"],"buffering":["12.42","12.43"],"to":["12.46","15.30","22.28","22.29"],"reload":["12.46"],"format":["12.48"],"data":["12.53","12.62"],"appeared":["12.58"],"basically":["13.0"],"needed":["13.0"],"assets":["13.1","13.14","13.15","13.16","13.18","13.19","13.24","13.25","13.26","13.27","22.3","22.11","22.26"],"flip":["13.6","13.7"],"dblclick":["13.17"],"contextmenu":["13.28"],"play":["14.0"],"rejects":["15.11"],"there":["15.11"],"was":["15.11"],"an":["15.11"],"error":["15.11"],"loading":["15.11"],"case":["15.15"],"obtained":["15.15","15.26"],"be":["15.15"],"interaction":["15.19"],"user":["15.19"],"clicked":["15.19","17.1"],"page":["15.21","22.7"],"must":["15.21"],"occur":["15.21","22.17"],"before":["15.21"],"triggering":["15.21"],"coordinates":["15.26"],"are":["15.26","22.17"],"via":["15.26"],"need":["15.30"],"make":["15.30"],"sure":["15.30"],"m3u8":["15.32","22.40","26.2"],"000":["15.33"],"highly":["15.37"],"this":["15.37","22.7"],"text":["16.1","18.1"],"when":["17.1"],"item":["17.1","19.5"],"script":["20.1","23.1","24.2"],"packages":["20.3","20.9","23.3","23.9"],"template":["20.3","23.3"],"change":["20.4","20.5","24.13"],"the":["20.4","20.5","22.28","22.29","22.31"],"player":["20.4"],"in":["20.5"],"directly":["20.5"],"modifying":["20.5"],"definitions":["20.9"],"volume":["20.10"],"art8":["20.10","23.10"],"new":["20.10","23.10"],"yourself":["20.11"],"scripts":["20.11","23.11"],"documentation":["20.11"],"browserslist":["20.11","23.11"],"or":["21.1","25.1"],"tip":["22.1"],"among":["22.1"],"all":["22.1"],"only":["22.1"],"is":["22.1"],"mandatory":["22.1"],"flv":["22.2","26.2"],"third":["22.2"],"party":["22.2"],"libraries":["22.2"],"side":["22.2"],"point":["22.4"],"jpg":["22.5","26.5"],"ffad00":["22.6","26.6"],"read":["22.7","22.10"],"cached":["22.7"],"value":["22.7"],"more":["22.10","22.42"],"information":["22.10"],"policy":["22.10","26.10"],"changes":["22.10","26.10"],"url":["22.11","22.26"],"setting":["22.14","22.15","22.16","22.24","26.14","26.15","26.16","26.24"],"website":["22.17"],"cross":["22.17"],"origin":["22.17"],"failure":["22.17"],"may":["22.17"],"such":["22.19"],"as":["22.19"],"hd":["22.32"],"720p":["22.32","26.32"],"こんなとこにあるはずもないのに":["22.33","26.33"],"终わり":["22.33","26.33"],"online":["22.35"],"generation":["22.35"],"tool":["22.35","26.35"],"03a9f4":["22.36","26.36"],"font":["22.36","24.5","26.36"],"size":["22.36","24.5","26.36"],"30px":["22.36","26.36"],"webkit":["22.37"],"playsinline":["22.37"],"therefore":["22.39"],"if":["22.39"],"you":["22.39"],"best":["22.39"],"well":["22.39"],"settings":["22.41","22.42"],"start":["22.41","22.42","26.41","26.42"],"i18n":["22.41","26.41"],"tw":["22.42","26.42"],"identify":["22.45"],"unique":["22.45"],"document":["22.49","26.49"],"createelement":["22.49","26.49"],"里直接修改":["23.4","23.5"],"是不会改变播放器的":["23.4","23.5"],"非响应式":["23.5"],"在":["23.5"],"请修改以下配置然后自行构建":["23.11"],"构建配置":["23.11"],"build":["23.11"],"参考文档":["23.11"],"style":["24.4"],"弹幕自定义样式":["24.4"],"默认为空对象":["24.4"],"light":["24.5"],"只在自定义挂载时生效":["24.5"],"不透明度配置项":["24.5"],"弹幕字号配置项":["24.5"],"显示区域配置项":["24.5"],"弹幕速度配置项":["24.5"],"颜色列表配置项":["24.5"],"ref":["24.6"],"innerhtml":["24.6"],"ଘ":["24.6"],"੭ˊᵕˋ":["24.6"],"੭":["24.6"],"使用数组":["24.7"],"time":["24.7","24.9"],"异步返回":["24.9"],"显示弹幕":["24.10","24.11"],"hide":["24.11"],"border":["24.12"],"fontsize":["24.13"],"const":["24.14"],"target":["24.14"],"xml":["24.16"],"也可以手动挂载":["24.16"],"reset":["24.18"],"弹幕重置":["24.18"],"destroy":["24.18"],"弹幕销毁":["24.18"],"全部选项里":["26.1"],"只有":["26.1"],"是必填的":["26.1"],"如需要播放":["26.2"],"或者":["26.2"],"等其它格式":["26.2"],"请参考左侧的":["26.2"],"第三方库":["26.2"],"回调函数里的":["26.4"],"就是播放器实例":["26.4"],"但回调函数假如使用了箭头函数":["26.4"],"则不会指向播放器实例":["26.4"],"下次初始化时":["26.7"],"如刷新页面":["26.7"],"播放器会读取该缓存值":["26.7"],"更多信息请阅读":["26.10"],"假如视频源地址和网站是跨域的":["26.17"],"可能会出现截图失败":["26.17"],"在线生成预览图":["26.35"],"thumbnail":["26.35"],"所以假如你使用了":["26.39"],"最好同时要指明":["26.39"],"function":["26.40"],"更多的语言设置":["26.41","26.42"],"是不同的话":["26.45"],"那么你需要使用":["26.45"],"来标识视频的唯一":["26.45"]}]'},t={"0.0":{t:"# 高级属性\r",p:`这里的 高级属性 是指挂载在 实例 的 二级属性,比较少用 -`,l:"advanced/built-in.html",a:"高级属性"},"0.1":{t:"`option`\r",p:`播放器的选项 -<div className="run-code">▶ Run Code< ...`,l:"advanced/built-in.html#option",a:"option"},"0.2":{t:"`template`\r",p:`管理播放器所有的 DOM 元素 -<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#template",a:"template"},"0.3":{t:"`events`\r",p:"管理播放器所有的 DOM 事件,实质上是代理了 addEventListener 和 removeEventListener ...",l:"advanced/built-in.html#events",a:"events"},"0.4":{t:"`storage`\r",p:`管理播放器的本地存储 - -name 属性用于设置缓存的 key -set 方法用于设置缓存 -get 方法用于获取缓存 -del 方 ...`,l:"advanced/built-in.html#storage",a:"storage"},"0.5":{t:"`icons`\r",p:`管理播放器所有的 svg 图标 -<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#icons",a:"icons"},"0.6":{t:"`i18n`\r",p:`管理播放器的 i18n - -get 方法用于获取 i18n 的值 -update 方法用于更新 i18n 对象 - -<div ...`,l:"advanced/built-in.html#i18n",a:"i18n"},"0.7":{t:"`notice`\r",p:`管理播放器的提示语,只有一个 show 属性用于显示提示语 -<div className="run-code ...`,l:"advanced/built-in.html#notice",a:"notice"},"0.8":{t:"`layers`\r",p:`管理播放器的层 - -add 方法用于动态添加层 -remove 方法用于动态删除层 -update 方法用于动态更新层 -show ...`,l:"advanced/built-in.html#layers",a:"layers"},"0.9":{t:"`controls`\r",p:`管理播放器的控制器 - -add 方法用于动态添加控制器 -remove 方法用于动态删除控制器 -update 方法用于动态更新控 ...`,l:"advanced/built-in.html#controls",a:"controls"},"0.10":{t:"`contextmenu`\r",p:`管理播放器的右键菜单 - -add 方法用于动态添加菜单 -remove 方法用于动态删除菜单 -update 方法用于动态更新菜单 ...`,l:"advanced/built-in.html#contextmenu",a:"contextmenu"},"0.11":{t:"`subtitle`\r",p:`管理播放器的字幕功能 - -url 属性设置和返回当前字幕地址 -style 方法设置当前字幕的样式 -switch 方法设置当前字 ...`,l:"advanced/built-in.html#subtitle",a:"subtitle"},"0.12":{t:"`loading`\r",p:`管理播放器的加载层 - -show 属性用于设置是否显示加载层 -toggle 属性用于切换是否显示加载层 - -<div cl ...`,l:"advanced/built-in.html#loading",a:"loading"},"0.13":{t:"`hotkey`\r",p:`管理播放器的快捷键功能 - -add 方法用于添加快捷键 -remove 方法用于删除快捷键 - -<div className ...`,l:"advanced/built-in.html#hotkey",a:"hotkey"},"0.14":{t:"`mask`\r",p:`管理播放器的遮罩层 - -show 属性用于设置是否显示遮罩层 -toggle 属性用于切换是否显示遮罩层 - -<div cl ...`,l:"advanced/built-in.html#mask",a:"mask"},"0.15":{t:"`setting`\r",p:`管理播放器的设置面板 - -add 方法用于动态添加设置项 -remove 方法用于动态删除设置项 -update 方法用于动态更新 ...`,l:"advanced/built-in.html#setting",a:"setting"},"0.16":{t:"`plugins`\r",p:`管理播放器的插件功能,只有一个方法 add 用于动态添加插件 -<div className="run-cod ...`,l:"advanced/built-in.html#plugins",a:"plugins"},"1.0":{t:"# 静态属性\r",p:`这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用 -`,l:"advanced/class.html",a:"静态属性"},"1.1":{t:"`instances`\r",p:`返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性 -<div className=" ...`,l:"advanced/class.html#instances",a:"instances"},"1.2":{t:"`version`\r",p:`返回播放器的版本信息 -<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#version",a:"version"},"1.3":{t:"`env`\r",p:`返回播放器的环境变量 -<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#env",a:"env"},"1.4":{t:"`build`\r",p:`返回播放器的打包时间 -<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#build",a:"build"},"1.5":{t:"`config`\r",p:`返回视频的默认配置 -<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#config",a:"config"},"1.6":{t:"`utils`\r",p:`返回播放器的工具函数集合 -<div className="run-code">▶ Run C ...`,l:"advanced/class.html#utils",a:"utils"},"1.7":{t:"`scheme`\r",p:`返回播放器选项的校验方案 -<div className="run-code">▶ Run C ...`,l:"advanced/class.html#scheme",a:"scheme"},"1.8":{t:"`Emitter`\r",p:`返回事件分发器的构造函数 -<div className="run-code">▶ Run C ...`,l:"advanced/class.html#emitter",a:"emitter"},"1.9":{t:"`validator`\r",p:`返回选项的校验函数 -<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#validator",a:"validator"},"1.10":{t:"`kindOf`\r",p:`返回类型检测的函数工具 -<div className="run-code">▶ Run Co ...`,l:"advanced/class.html#kindof",a:"kindof"},"1.11":{t:"`html`\r",p:`返回播放器所需的 html 字符串 -<div className="run-code">▶ ...`,l:"advanced/class.html#html",a:"html"},"1.12":{t:"`option`\r",p:`返回播放器的默认选项 -<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#option",a:"option"},"2.0":{t:"# 实例事件\r",p:`播放器的事件分为两种,一种视频的 原生事件 (前缀 video:),另外一种是 自定义事件 -监听事件: -<div cl ...`,l:"advanced/event.html",a:"实例事件"},"2.1":{t:"`ready`\r",p:`当播放器首次可以播放器时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#ready",a:"ready"},"2.2":{t:"`restart`\r",p:`当播放器切换地址后并可以播放时触发 -<div className="run-code">▶ ...`,l:"advanced/event.html#restart",a:"restart"},"2.3":{t:"`pause`\r",p:`当播放器暂停时触发 -<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#pause",a:"pause"},"2.4":{t:"`play`\r",p:`当播放器播放时触发 -<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#play",a:"play"},"2.5":{t:"`hotkey`\r",p:`当播放器热键被按下时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#hotkey",a:"hotkey"},"2.6":{t:"`destroy`\r",p:`当播放器销毁时触发 -<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#destroy",a:"destroy"},"2.7":{t:"`focus`\r",p:`当播放器获得焦点时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#focus",a:"focus"},"2.8":{t:"`blur`\r",p:`当播放器失去焦点时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#blur",a:"blur"},"2.9":{t:"`dblclick`\r",p:`当播放器被双击时触发 -<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#dblclick",a:"dblclick"},"2.10":{t:"`click`\r",p:`当播放器被单击时触发 -<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#click",a:"click"},"2.11":{t:"`error`\r",p:`当播放器加载视频发生错误时触发 -<div className="run-code">▶ Ru ...`,l:"advanced/event.html#error",a:"error"},"2.12":{t:"`hover`\r",p:`当播放器被鼠标移出或者移入时触发 -<div className="run-code">▶ R ...`,l:"advanced/event.html#hover",a:"hover"},"2.13":{t:"`mousemove`\r",p:`当播放器被鼠标经过时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mousemove",a:"mousemove"},"2.14":{t:"`resize`\r",p:`当播放器尺寸变化时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#resize",a:"resize"},"2.15":{t:"`view`\r",p:`当播放器出现在视口时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#view",a:"view"},"2.16":{t:"`lock`\r",p:`在移动端,当锁定的状态发生变化时触发 -<div className="run-code">▶ ...`,l:"advanced/event.html#lock",a:"lock"},"2.17":{t:"`aspectRatio`\r",p:`当播放器长宽比变化时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#aspectratio",a:"aspectratio"},"2.18":{t:"`autoHeight`\r",p:`当播放器自动设置高度时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#autoheight",a:"autoheight"},"2.19":{t:"`autoSize`\r",p:`当播放器自动设置尺寸时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#autosize",a:"autosize"},"2.20":{t:"`flip`\r",p:`当播放器发生翻转时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#flip",a:"flip"},"2.21":{t:"`fullscreen`\r",p:`当播放器发生窗口全屏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreen",a:"fullscreen"},"2.22":{t:"`fullscreenError`\r",p:`当播放器发生窗口全屏错误时触发 -<div className="run-code">▶ Ru ...`,l:"advanced/event.html#fullscreenerror",a:"fullscreenerror"},"2.23":{t:"`fullscreenWeb`\r",p:`当播放器发生网页全屏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreenweb",a:"fullscreenweb"},"2.24":{t:"`mini`\r",p:`当播放器进入迷你模式时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#mini",a:"mini"},"2.25":{t:"`pip`\r",p:`当播放器进入画中画时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#pip",a:"pip"},"2.26":{t:"`screenshot`\r",p:`当播放器被截图时触发 -<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#screenshot",a:"screenshot"},"2.27":{t:"`seek`\r",p:`当播放器发生时间跳转时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#seek",a:"seek"},"2.28":{t:"`subtitleOffset`\r",p:`当播放器发生字幕偏移时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#subtitleoffset",a:"subtitleoffset"},"2.29":{t:"`subtitleBeforeUpdate`\r",p:`当字幕更新前触发 -<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitlebeforeupdate",a:"subtitlebeforeupdate"},"2.30":{t:"`subtitleAfterUpdate`\r",p:`当字幕更新后触发 -<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleafterupdate",a:"subtitleafterupdate"},"2.31":{t:"`subtitleLoad`\r",p:`当字幕加载时触发 -<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleload",a:"subtitleload"},"2.32":{t:"`info`\r",p:`当信息面板显示或隐藏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#info",a:"info"},"2.33":{t:"`layer`\r",p:`当自定义层显示或隐藏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#layer",a:"layer"},"2.34":{t:"`loading`\r",p:`当加载器显示或隐藏时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#loading",a:"loading"},"2.35":{t:"`mask`\r",p:`当遮罩层显示或隐藏时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mask",a:"mask"},"2.36":{t:"`subtitle`\r",p:`当字幕层显示或隐藏时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#subtitle",a:"subtitle"},"2.37":{t:"`contextmenu`\r",p:`当右键菜单显示或隐藏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#contextmenu",a:"contextmenu"},"2.38":{t:"`control`\r",p:`当控制器显示或隐藏时触发 -<div className="run-code">▶ Run C ...`,l:"advanced/event.html#control",a:"control"},"2.39":{t:"`setting`\r",p:`当设置面板显示或隐藏时触发 -<div className="run-code">▶ Run ...`,l:"advanced/event.html#setting",a:"setting"},"2.40":{t:"`muted`\r",p:`当静音的状态变化时触发 -<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#muted",a:"muted"},"2.41":{t:"`keydown`\r",p:`监听来自 document 的 keydown 事件 -<div className="run-code&qu ...`,l:"advanced/event.html#keydown",a:"keydown"},"2.42":{t:"`video:canplay`\r",p:`浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容 -`,l:"advanced/event.html#video-canplay",a:"video-canplay"},"2.43":{t:"`video:canplaythrough`\r",p:`浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束 -`,l:"advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"2.44":{t:"`video:complete`\r",p:`OfflineAudioContext 渲染完成 -`,l:"advanced/event.html#video-complete",a:"video-complete"},"2.45":{t:"`video:durationchange`\r",p:`duration 属性的值改变时触发 -`,l:"advanced/event.html#video-durationchange",a:"video-durationchange"},"2.46":{t:"`video:emptied`\r",p:"媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载 ...",l:"advanced/event.html#video-emptied",a:"video-emptied"},"2.47":{t:"`video:ended`\r",p:`视频停止播放,因为 media 已经到达结束点 -`,l:"advanced/event.html#video-ended",a:"video-ended"},"2.48":{t:"`video:error`\r",p:`获取媒体数据时出错,或者资源类型不是受支持的媒体格式 -`,l:"advanced/event.html#video-error",a:"video-error"},"2.49":{t:"`video:loadeddata`\r",p:`media 中的首帧已经完成加载 -`,l:"advanced/event.html#video-loadeddata",a:"video-loadeddata"},"2.50":{t:"`video:loadedmetadata`\r",p:`已加载元数据 -`,l:"advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"2.51":{t:"`video:pause`\r",p:`播放已暂停 -`,l:"advanced/event.html#video-pause",a:"video-pause"},"2.52":{t:"`video:play`\r",p:`播放已开始 -`,l:"advanced/event.html#video-play",a:"video-play"},"2.53":{t:"`video:playing`\r",p:`由于缺乏数据而暂停或延迟后,播放准备开始 -`,l:"advanced/event.html#video-playing",a:"video-playing"},"2.54":{t:"`video:progress`\r",p:`在浏览器加载资源时周期性触发 -`,l:"advanced/event.html#video-progress",a:"video-progress"},"2.55":{t:"`video:ratechange`\r",p:`播放速率发生变化 -`,l:"advanced/event.html#video-ratechange",a:"video-ratechange"},"2.56":{t:"`video:seeked`\r",p:`跳帧(seek)操作完成 -`,l:"advanced/event.html#video-seeked",a:"video-seeked"},"2.57":{t:"`video:seeking`\r",p:`跳帧(seek)操作开始 -`,l:"advanced/event.html#video-seeking",a:"video-seeking"},"2.58":{t:"`video:stalled`\r",p:`用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现 -`,l:"advanced/event.html#video-stalled",a:"video-stalled"},"2.59":{t:"`video:suspend`\r",p:`媒体数据加载已暂停 -`,l:"advanced/event.html#video-suspend",a:"video-suspend"},"2.60":{t:"`video:timeupdate`\r",p:`currentTime 属性指定的时间发生变化 -`,l:"advanced/event.html#video-timeupdate",a:"video-timeupdate"},"2.61":{t:"`video:volumechange`\r",p:`音量发生变化 -`,l:"advanced/event.html#video-volumechange",a:"video-volumechange"},"2.62":{t:"`video:waiting`\r",p:`由于暂时缺少数据,播放已停止 -`,l:"advanced/event.html#video-waiting",a:"video-waiting"},"3.0":{t:"# 全局属性\r",p:`这里的 全局属性 也是指挂载在 构造函数 的 一级属性,属性名字全部都是大写的形式,未来容易发生变动,基本上用不到 -`,l:"advanced/global.html",a:"全局属性"},"3.1":{t:"DEBUG\r",p:`是否开始 debug 模式,可以打印出视频全部的内置事件,默认关闭 -<div className="run- ...`,l:"advanced/global.html#debug",a:"debug"},"3.2":{t:"STYLE\r",p:`返回播放器样式文本 -<div className="run-code">▶ Run Code ...`,l:"advanced/global.html#style",a:"style"},"3.3":{t:"CONTEXTMENU\r",p:`是否开启右键菜单,默认开启 -<div className="run-code">▶ Run ...`,l:"advanced/global.html#contextmenu",a:"contextmenu"},"3.4":{t:"NOTICE_TIME\r",p:`提示信息的显示时长,单位为毫秒,默认为 2000 -<div className="run-code" ...`,l:"advanced/global.html#notice-time",a:"notice-time"},"3.5":{t:"SETTING_WIDTH\r",p:`设置面板的默认宽度,单位为像素,默认为 250 -<div className="run-code" ...`,l:"advanced/global.html#setting-width",a:"setting-width"},"3.6":{t:"SETTING_ITEM_WIDTH\r",p:`设置面板的设置项的默认宽度,单位为像素,默认为 200 -<div className="run-code&q ...`,l:"advanced/global.html#setting-item-width",a:"setting-item-width"},"3.7":{t:"SETTING_ITEM_HEIGHT\r",p:`设置面板的设置项的默认高度,单位为像素,默认为 35 -<div className="run-code&qu ...`,l:"advanced/global.html#setting-item-height",a:"setting-item-height"},"3.8":{t:"RESIZE_TIME\r",p:`resize 事件的节流时间,单位为毫秒,默认为 200 -<div className="run-code& ...`,l:"advanced/global.html#resize-time",a:"resize-time"},"3.9":{t:"SCROLL_TIME\r",p:`scroll 事件的节流时间,单位为毫秒,默认为 200 -<div className="run-code& ...`,l:"advanced/global.html#scroll-time",a:"scroll-time"},"3.10":{t:"SCROLL_GAP\r",p:`view 事件的边界容差距离,单位为像素,默认为 50 -<div className="run-code&q ...`,l:"advanced/global.html#scroll-gap",a:"scroll-gap"},"3.11":{t:"AUTO_PLAYBACK_MAX\r",p:`自动回放功能的最大记录数,默认为 10 -<div className="run-code"> ...`,l:"advanced/global.html#auto-playback-max",a:"auto-playback-max"},"3.12":{t:"AUTO_PLAYBACK_MIN\r",p:`自动回放功能的最小记录时长,单位为秒,默认为 5 -<div className="run-code" ...`,l:"advanced/global.html#auto-playback-min",a:"auto-playback-min"},"3.13":{t:"AUTO_PLAYBACK_TIMEOUT\r",p:`自动回放功能的隐藏延迟时长,单位为毫秒,默认为 3000 -<div className="run-code& ...`,l:"advanced/global.html#auto-playback-timeout",a:"auto-playback-timeout"},"3.14":{t:"RECONNECT_TIME_MAX\r",p:`发生连接错误时,自动连接的最大次数,默认为 5 -<div className="run-code" ...`,l:"advanced/global.html#reconnect-time-max",a:"reconnect-time-max"},"3.15":{t:"RECONNECT_SLEEP_TIME\r",p:`发生连接错误时,自动连接的延迟时间,单位为毫秒,默认为 1000 -<div className="run-c ...`,l:"advanced/global.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"3.16":{t:"CONTROL_HIDE_TIME\r",p:`底部控制栏的自动隐藏的延迟时间,单位为毫秒,默认为 3000 -<div className="run-cod ...`,l:"advanced/global.html#control-hide-time",a:"control-hide-time"},"3.17":{t:"DBCLICK_TIME\r",p:`双击事件的延迟事件,单位为毫秒,默认为 300 -<div className="run-code" ...`,l:"advanced/global.html#dbclick-time",a:"dbclick-time"},"3.18":{t:"DBCLICK_FULLSCREEN\r",p:`在桌面端,是否双击切换全屏,默认为 true -<div className="run-code"& ...`,l:"advanced/global.html#dbclick-fullscreen",a:"dbclick-fullscreen"},"3.19":{t:"MOBILE_DBCLICK_PLAY\r",p:`在移动端,是否双击切换播放暂停,默认为 true -<div className="run-code" ...`,l:"advanced/global.html#mobile-dbclick-play",a:"mobile-dbclick-play"},"3.20":{t:"MOBILE_CLICK_PLAY\r",p:`在移动端,是否单击切换播放暂停,默认为 false -<div className="run-code&quo ...`,l:"advanced/global.html#mobile-click-play",a:"mobile-click-play"},"3.21":{t:"AUTO_ORIENTATION_TIME\r",p:`在移动端,自动旋屏的延迟时间,单位为毫秒,默认为 200 -<div className="run-code& ...`,l:"advanced/global.html#auto-orientation-time",a:"auto-orientation-time"},"3.22":{t:"INFO_LOOP_TIME\r",p:`信息面板的刷新时间,单位为毫秒,默认为 1000 -<div className="run-code" ...`,l:"advanced/global.html#info-loop-time",a:"info-loop-time"},"3.23":{t:"FAST_FORWARD_VALUE\r",p:`在移动端,长按加速的速率倍数,默认为 3 -<div className="run-code"> ...`,l:"advanced/global.html#fast-forward-value",a:"fast-forward-value"},"3.24":{t:"FAST_FORWARD_TIME\r",p:`在移动端,长按加速的延迟时间,单位为毫秒,默认为 1000 -<div className="run-code ...`,l:"advanced/global.html#fast-forward-time",a:"fast-forward-time"},"3.25":{t:"TOUCH_MOVE_RATIO\r",p:`在移动端,左右滑动进度的速率倍数,默认为 0.5 -<div className="run-code" ...`,l:"advanced/global.html#touch-move-ratio",a:"touch-move-ratio"},"3.26":{t:"VOLUME_STEP\r",p:`快捷键调节音量的幅度比例,默认为 0.1 -<div className="run-code"> ...`,l:"advanced/global.html#volume-step",a:"volume-step"},"3.27":{t:"SEEK_STEP\r",p:`快捷键调节播放进度的幅度,单位为秒,默认为 5 -<div className="run-code" ...`,l:"advanced/global.html#seek-step",a:"seek-step"},"3.28":{t:"PLAYBACK_RATE\r",p:`内置播放速率的列表,默认为 [0.5, 0.75, 1, 1.25, 1.5, 2] -<div className=& ...`,l:"advanced/global.html#playback-rate",a:"playback-rate"},"3.29":{t:"ASPECT_RATIO\r",p:`内置视频长宽比的列表,默认为 ['default', '4:3', '16:9'] -<div className=&q ...`,l:"advanced/global.html#aspect-ratio",a:"aspect-ratio"},"3.30":{t:"FLIP\r",p:`内置视频翻转的列表,默认为 ['normal', 'horizontal', 'vertical'] -<div cla ...`,l:"advanced/global.html#flip",a:"flip"},"3.31":{t:"FULLSCREEN_WEB_IN_BODY\r",p:`网页全屏时,是否把播放器挂在在 body 元素下,默认为 false -<div className="run ...`,l:"advanced/global.html#fullscreen-web-in-body",a:"fullscreen-web-in-body"},"3.32":{t:"LOG_VERSION\r",p:`设置是否打印播放器版本,默认为 true -<div className="run-code"> ...`,l:"advanced/global.html#log-version",a:"log-version"},"3.33":{t:"USE_RAF\r",p:`设置是否使用 requestAnimationFrame ,默认为 false,目前主要用于进度条的平滑效果 -<div ...`,l:"advanced/global.html#use-raf",a:"use-raf"},"4.0":{t:"# 编写插件\r",p:`但你已经知道播放器的属性, 方法和事件后,再编写插件是非常简单的事 -可以在实例化的时候加载插件的函数 -<div cla ...`,l:"advanced/plugin.html",a:"编写插件"},"5.0":{t:"# 实例属性\r",p:`这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用 -`,l:"advanced/property.html",a:"实例属性"},"5.1":{t:"`play`\r",p:` -Type: Function - -播放视频 -<div className="run-code"&g ...`,l:"advanced/property.html#play",a:"play"},"5.2":{t:"`pause`\r",p:` -Type: Function - -暂停视频 -<div className="run-code"&g ...`,l:"advanced/property.html#pause",a:"pause"},"5.3":{t:"`toggle`\r",p:` -Type: Function - -切换视频的播放和暂停 -<div className="run-code&q ...`,l:"advanced/property.html#toggle",a:"toggle"},"5.4":{t:"`destroy`\r",p:` -Type: Function -Parameter: Boolean - -销毁播放器,接受一个参数表示是否销毁后同时移除播放器 ...`,l:"advanced/property.html#destroy",a:"destroy"},"5.5":{t:"`seek`\r",p:` -Type: Setter -Parameter: Number - -视频时间跳转,单位秒 -<div className= ...`,l:"advanced/property.html#seek",a:"seek"},"5.6":{t:"`forward`\r",p:` -Type: Setter -Parameter: Number - -视频时间快进,单位秒 -<div className= ...`,l:"advanced/property.html#forward",a:"forward"},"5.7":{t:"`backward`\r",p:` -Type: Setter -Parameter: Number - -视频时间快退,单位秒 -<div className= ...`,l:"advanced/property.html#backward",a:"backward"},"5.8":{t:"`volume`\r",p:` -Type: Setter/Getter -Parameter: Number - -设置和获取视频音量,范围在:[0, 1] -& ...`,l:"advanced/property.html#volume",a:"volume"},"5.9":{t:"`url`\r",p:` -Type: Setter/Getter -Parameter: String - -设置和获取视频地址 -<div clas ...`,l:"advanced/property.html#url",a:"url"},"5.10":{t:"`switch`\r",p:` -Type: Setter -Parameter: String - -设置视频地址,设置时和 art.url 类似,但会执行一些 ...`,l:"advanced/property.html#switch",a:"switch"},"5.11":{t:"`switchUrl`\r",p:` -Type: Function -Parameter: String - -设置视频地址,设置时和 art.url 类似,但会执行 ...`,l:"advanced/property.html#switchurl",a:"switchurl"},"5.12":{t:"`switchQuality`\r",p:` -Type: Function -Parameter: String - -设置视频画质地址,和 art.switchUrl 类似 ...`,l:"advanced/property.html#switchquality",a:"switchquality"},"5.13":{t:"`muted`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取视频是否静音 -<div c ...`,l:"advanced/property.html#muted",a:"muted"},"5.14":{t:"`currentTime`\r",p:` -Type: Setter/Getter -Parameter: Number - -设置和获取视频当前时间,设置时间时和 see ...`,l:"advanced/property.html#currenttime",a:"currenttime"},"5.15":{t:"`duration`\r",p:` -Type: Getter - -获取视频时长 -<div className="run-code"&g ...`,l:"advanced/property.html#duration",a:"duration"},"5.16":{t:"`screenshot`\r",p:` -Type: Function - -下载当前视频帧的截图, 可选参数为截图名字 -<div className=" ...`,l:"advanced/property.html#screenshot",a:"screenshot"},"5.17":{t:"`getDataURL`\r",p:` -Type: Function - -获取当前视频帧的截图的base64地址,返回的是一个 Promise -<div cl ...`,l:"advanced/property.html#getdataurl",a:"getdataurl"},"5.18":{t:"`getBlobUrl`\r",p:` -Type: Function - -获取当前视频帧的截图的blob地址,返回的是一个 Promise -<div clas ...`,l:"advanced/property.html#getbloburl",a:"getbloburl"},"5.19":{t:"`fullscreen`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取播放器窗口全屏 -<div ...`,l:"advanced/property.html#fullscreen",a:"fullscreen"},"5.20":{t:"`fullscreenWeb`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取播放器网页全屏 -<div ...`,l:"advanced/property.html#fullscreenweb",a:"fullscreenweb"},"5.21":{t:"`pip`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取播放器画中画模式 -<div ...`,l:"advanced/property.html#pip",a:"pip"},"5.22":{t:"`poster`\r",p:` -Type: Setter/Getter -Parameter: String - -设置和获取视频海报,只有在视频播放前才能看到 ...`,l:"advanced/property.html#poster",a:"poster"},"5.23":{t:"`mini`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -设置和获取播放器迷你模式 -<div ...`,l:"advanced/property.html#mini",a:"mini"},"5.24":{t:"`playing`\r",p:` -Type: Getter -Parameter: Boolean - -获取视频是否正在播放中 -<div classNam ...`,l:"advanced/property.html#playing",a:"playing"},"5.25":{t:"`autoSize`\r",p:` -Type: Function - -设置视频是否自适应尺寸 -<div className="run-code& ...`,l:"advanced/property.html#autosize",a:"autosize"},"5.26":{t:"`rect`\r",p:` -Type: Getter - -获取播放器的尺寸和坐标信息 -<div className="run-code& ...`,l:"advanced/property.html#rect",a:"rect"},"5.27":{t:"`flip`\r",p:` -Type: Setter/Getter -Parameter: String - -设置和获取播放器翻转,支持normal, ...`,l:"advanced/property.html#flip",a:"flip"},"5.28":{t:"`playbackRate`\r",p:` -Type: Setter/Getter -Parameter: Number - -设置和获取播放器播放速度 -<div c ...`,l:"advanced/property.html#playbackrate",a:"playbackrate"},"5.29":{t:"`aspectRatio`\r",p:` -Type: Setter/Getter -Parameter: String - -设置和获取播放器长宽比 -<div cl ...`,l:"advanced/property.html#aspectratio",a:"aspectratio"},"5.30":{t:"`autoHeight`\r",p:` -Type: Function - -当容器只有宽度,该属性可以自动计算出并设置视频的高度 -<div className= ...`,l:"advanced/property.html#autoheight",a:"autoheight"},"5.31":{t:"`attr`\r",p:` -Type: Function -Parameter: String - -动态获取和设置 video 元素的属性 -<div ...`,l:"advanced/property.html#attr",a:"attr"},"5.32":{t:"`type`\r",p:` -Type: Setter/Getter -Parameter: String - -动态获取和设置视频类型 -<div cl ...`,l:"advanced/property.html#type",a:"type"},"5.33":{t:"`theme`\r",p:` -Type: Setter/Getter -Parameter: String - -动态获取和设置播放器主题颜色 -<div ...`,l:"advanced/property.html#theme",a:"theme"},"5.34":{t:"`airplay`\r",p:` -Type: Function - -开启隔空播放 -<div className="run-code" ...`,l:"advanced/property.html#airplay",a:"airplay"},"5.35":{t:"`loaded`\r",p:` -Type: Getter - -视频缓存的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用 -&l ...`,l:"advanced/property.html#loaded",a:"loaded"},"5.36":{t:"`played`\r",p:` -Type: Getter - -视频播放的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用 -&l ...`,l:"advanced/property.html#played",a:"played"},"5.37":{t:"`proxy`\r",p:` -Type: Function - -DOM 事件的代理函数,实质上代理了 addEventListener 和 removeE ...`,l:"advanced/property.html#proxy",a:"proxy"},"5.38":{t:"`query`\r",p:` -Type: Function - -DOM 的查询函数,类似 document.querySelector,但被查询的对象局限 ...`,l:"advanced/property.html#query",a:"query"},"5.39":{t:"`video`\r",p:` -Type: Element - -快捷返回播放器的 video 元素 -<div className="run- ...`,l:"advanced/property.html#video",a:"video"},"5.40":{t:"`cssVar`\r",p:` -Type: Function - -动态获取或设置 css 变量 -<div className="run-co ...`,l:"advanced/property.html#cssvar",a:"cssvar"},"5.41":{t:"`quality`\r",p:` -Type: Setter -Parameter: Array - -动态设置画质列表 -<div className=&qu ...`,l:"advanced/property.html#quality",a:"quality"},"5.42":{t:"`thumbnails`\r",p:` -Type: Setter/Getter -Parameter: Object - -动态设置缩略图 -<div classN ...`,l:"advanced/property.html#thumbnails",a:"thumbnails"},"5.43":{t:"`subtitleOffset`\r",p:` -Type: Setter/Getter -Parameter: Number - -动态设置字幕偏移 -<div class ...`,l:"advanced/property.html#subtitleoffset",a:"subtitleoffset"},"6.0":{t:"# 右键菜单\r",p:"\r",l:"component/contextmenu.html",a:"右键菜单"},"6.1":{t:"配置\r",p:` - - -属性 -类型 -描述 - - - - -disable -Boolean -是否禁用组件 - - -name -String -组件唯一名称,用于 ...`,l:"component/contextmenu.html#配置",a:"配置"},"6.2":{t:"创建\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#创建",a:"创建"},"6.3":{t:"添加\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#添加",a:"添加"},"6.4":{t:"删除\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#删除",a:"删除"},"6.5":{t:"更新\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#更新",a:"更新"},"7.0":{t:"# 控制器\r",p:"\r",l:"component/controls.html",a:"控制器"},"7.1":{t:"配置\r",p:` - - -属性 -类型 -描述 - - - - -disable -Boolean -是否禁用组件 - - -name -String -组件唯一名称,用于 ...`,l:"component/controls.html#配置",a:"配置"},"7.2":{t:"创建\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#创建",a:"创建"},"7.3":{t:"添加\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#添加",a:"添加"},"7.4":{t:"删除\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#删除",a:"删除"},"7.5":{t:"更新\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#更新",a:"更新"},"8.0":{t:"# 业务层\r",p:"\r",l:"component/layers.html",a:"业务层"},"8.1":{t:"配置\r",p:` - - -属性 -类型 -描述 - - - - -disable -Boolean -是否禁用组件 - - -name -String -组件唯一名称,用于 ...`,l:"component/layers.html#配置",a:"配置"},"8.2":{t:"创建\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#创建",a:"创建"},"8.3":{t:"添加\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#添加",a:"添加"},"8.4":{t:"删除\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#删除",a:"删除"},"8.5":{t:"更新\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#更新",a:"更新"},"9.0":{t:"# 设置面板\r",p:"\r",l:"component/setting.html",a:"设置面板"},"9.1":{t:"内置\r",p:"须先打开设置面板,然后自带四个内置项:flip, playbackRate, aspectRatio, subtitleOf ...",l:"component/setting.html#内置",a:"内置"},"9.2":{t:"创建 - 选择列表\r",p:` - - -属性 -类型 -描述 - - - - -html -String, Element -元素的 DOM - - -icon -String, El ...`,l:"component/setting.html#创建-选择列表",a:"创建-选择列表"},"9.3":{t:"创建 - 列表嵌套\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#创建-列表嵌套",a:"创建-列表嵌套"},"9.4":{t:"创建 - 切换按钮\r",p:` - - -属性 -类型 -描述 - - - - -html -String, Element -元素的 DOM 元素 - - -icon -String, ...`,l:"component/setting.html#创建-切换按钮",a:"创建-切换按钮"},"9.5":{t:"创建 - 范围滑块\r",p:` - - -属性 -类型 -描述 - - - - -html -String, Element -元素的 DOM 元素 - - -icon -String, ...`,l:"component/setting.html#创建-范围滑块",a:"创建-范围滑块"},"9.6":{t:"添加\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#添加",a:"添加"},"9.7":{t:"删除\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#删除",a:"删除"},"9.8":{t:"更新\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#更新",a:"更新"},"10.0":{t:"# Advanced Properties\r",p:"The advanced properties here refer to the secondary attributes ...",l:"en/advanced/built-in.html",a:"advanced-properties"},"10.1":{t:"`option`\r",p:`Options for the player -<div className="run-code"& ...`,l:"en/advanced/built-in.html#option",a:"option"},"10.2":{t:"`template`\r",p:`Manages all of the DOM elements of the player -<div classNam ...`,l:"en/advanced/built-in.html#template",a:"template"},"10.3":{t:"`events`\r",p:"Manages all DOM events in the player, which is essentially a p ...",l:"en/advanced/built-in.html#events",a:"events"},"10.4":{t:"`storage`\r",p:`Manages the local storage of the player - -The name attribute is ...`,l:"en/advanced/built-in.html#storage",a:"storage"},"10.5":{t:"`icons`\r",p:`Manage all the svg icons of the player -<div className=" ...`,l:"en/advanced/built-in.html#icons",a:"icons"},"10.6":{t:"`i18n`\r",p:`Manage the player's i18n - -The get method is used to retrieve t ...`,l:"en/advanced/built-in.html#i18n",a:"i18n"},"10.7":{t:"`notice`\r",p:"Manage the player's notices, there's only one show property us ...",l:"en/advanced/built-in.html#notice",a:"notice"},"10.8":{t:"`layers`\r",p:`Manage the layers of the player - -The add method is used for dy ...`,l:"en/advanced/built-in.html#layers",a:"layers"},"10.9":{t:"`controls`\r",p:`Manage the player's controllers - -add method is used to dynamic ...`,l:"en/advanced/built-in.html#controls",a:"controls"},"10.10":{t:"`contextmenu`\r",p:`Manage the right-click context menu of the player - -The add met ...`,l:"en/advanced/built-in.html#contextmenu",a:"contextmenu"},"10.11":{t:"`subtitle`\r",p:`Manage the subtitle features of the player - -url property sets ...`,l:"en/advanced/built-in.html#subtitle",a:"subtitle"},"10.12":{t:"`loading`\r",p:`Manage the loading layer of the player - -show property is used ...`,l:"en/advanced/built-in.html#loading",a:"loading"},"10.13":{t:"`hotkey`\r",p:`Manage the hotkey functionality of the player - -The add method ...`,l:"en/advanced/built-in.html#hotkey",a:"hotkey"},"10.14":{t:"`mask`\r",p:`Manage the player's mask layer - -show property is used to set w ...`,l:"en/advanced/built-in.html#mask",a:"mask"},"10.15":{t:"`setting`\r",p:`Manage the player's settings panel - -add method is used to dyna ...`,l:"en/advanced/built-in.html#setting",a:"setting"},"10.16":{t:"`plugins`\r",p:"Manage the player's plugin features, with only one method add ...",l:"en/advanced/built-in.html#plugins",a:"plugins"},"11.0":{t:"# Static Properties\r",p:"Here, Static Properties refer to the first-level properties mo ...",l:"en/advanced/class.html",a:"static-properties"},"11.1":{t:"`instances`\r",p:"Returns an array of all player instances. You can use this pro ...",l:"en/advanced/class.html#instances",a:"instances"},"11.2":{t:"`version`\r",p:`Returns the version information of the player. -<div classNa ...`,l:"en/advanced/class.html#version",a:"version"},"11.3":{t:"`env`\r",p:`Returns the environment variables of the player. -<div class ...`,l:"en/advanced/class.html#env",a:"env"},"11.4":{t:"`build`\r",p:`Returns the build time of the player -<div className="r ...`,l:"en/advanced/class.html#build",a:"build"},"11.5":{t:"`config`\r",p:`Returns the default configuration of the video -<div classNa ...`,l:"en/advanced/class.html#config",a:"config"},"11.6":{t:"`utils`\r",p:`Returns a collection of utility functions for the player -<d ...`,l:"en/advanced/class.html#utils",a:"utils"},"11.7":{t:"`scheme`\r",p:`Returns the validation scheme for the player options -<div c ...`,l:"en/advanced/class.html#scheme",a:"scheme"},"11.8":{t:"`Emitter`\r",p:`Returns the constructor for the event dispatcher -<div class ...`,l:"en/advanced/class.html#emitter",a:"emitter"},"11.9":{t:"`validator`\r",p:`Returns the validation function for options -<div className= ...`,l:"en/advanced/class.html#validator",a:"validator"},"11.10":{t:"`kindOf`\r",p:`Returns the function tool for type checking -<div className= ...`,l:"en/advanced/class.html#kindof",a:"kindof"},"11.11":{t:"`html`\r",p:`Returns the html string required for the player -<div classN ...`,l:"en/advanced/class.html#html",a:"html"},"11.12":{t:"`option`\r",p:`Returns the player's default options -<div className="r ...`,l:"en/advanced/class.html#option",a:"option"},"12.0":{t:"# Example Events\r",p:"Player events are divided into two types, one is the video's n ...",l:"en/advanced/event.html",a:"example-events"},"12.1":{t:"`ready`\r",p:`Triggered when the player is able to play for the first time -& ...`,l:"en/advanced/event.html#ready",a:"ready"},"12.2":{t:"`restart`\r",p:"Triggered when the player switches the address and is able to ...",l:"en/advanced/event.html#restart",a:"restart"},"12.3":{t:"`pause`\r",p:`Triggered when the player is paused -<div className="ru ...`,l:"en/advanced/event.html#pause",a:"pause"},"12.4":{t:"`play`\r",p:`Triggered when the player starts playing -<div className=&qu ...`,l:"en/advanced/event.html#play",a:"play"},"12.5":{t:"`hotkey`\r",p:`Triggered when a hotkey on the player is pressed -<div class ...`,l:"en/advanced/event.html#hotkey",a:"hotkey"},"12.6":{t:"`destroy`\r",p:`Triggered when the player is destroyed -<div className=" ...`,l:"en/advanced/event.html#destroy",a:"destroy"},"12.7":{t:"`focus`\r",p:`Triggered when the player gains focus -<div className=" ...`,l:"en/advanced/event.html#focus",a:"focus"},"12.8":{t:"`blur`\r",p:`Triggered when the player loses focus -<div className=" ...`,l:"en/advanced/event.html#blur",a:"blur"},"12.9":{t:"`dblclick`\r",p:`Triggered when the player is double-clicked -<div className= ...`,l:"en/advanced/event.html#dblclick",a:"dblclick"},"12.10":{t:"`click`\r",p:`Triggered when the player is clicked -<div className="r ...`,l:"en/advanced/event.html#click",a:"click"},"12.11":{t:"`error`\r",p:"Triggered when an error occurs while the player is loading the ...",l:"en/advanced/event.html#error",a:"error"},"12.12":{t:"`hover`\r",p:"Triggered when the player is hovered or unhovered by the mouse ...",l:"en/advanced/event.html#hover",a:"hover"},"12.13":{t:"`mousemove`\r",p:`Triggered when the mouse moves over the player -<div classNa ...`,l:"en/advanced/event.html#mousemove",a:"mousemove"},"12.14":{t:"`resize`\r",p:`Triggered when the player size changes -<div className=" ...`,l:"en/advanced/event.html#resize",a:"resize"},"12.15":{t:"`view`\r",p:`Triggered when the player appears in the viewport -<div clas ...`,l:"en/advanced/event.html#view",a:"view"},"12.16":{t:"`lock`\r",p:`On mobile, triggered when the locked state changes -<div cla ...`,l:"en/advanced/event.html#lock",a:"lock"},"12.17":{t:"`aspectRatio`\r",p:`Triggered when the aspect ratio of the player changes -<div ...`,l:"en/advanced/event.html#aspectratio",a:"aspectratio"},"12.18":{t:"`autoHeight`\r",p:`Triggered when the player automatically sets the height -<di ...`,l:"en/advanced/event.html#autoheight",a:"autoheight"},"12.19":{t:"`autoSize`\r",p:`Triggered when the player automatically sets the size -<div ...`,l:"en/advanced/event.html#autosize",a:"autosize"},"12.20":{t:"`flip`\r",p:`Triggered when the player flips -<div className="run-co ...`,l:"en/advanced/event.html#flip",a:"flip"},"12.21":{t:"`fullscreen`\r",p:`Triggered when the player goes into full screen -<div classN ...`,l:"en/advanced/event.html#fullscreen",a:"fullscreen"},"12.22":{t:"`fullscreenError`\r",p:`Triggered when the player goes into full screen error -<div ...`,l:"en/advanced/event.html#fullscreenerror",a:"fullscreenerror"},"12.23":{t:"`fullscreenWeb`\r",p:`Triggered when the player enters web fullscreen -<div classN ...`,l:"en/advanced/event.html#fullscreenweb",a:"fullscreenweb"},"12.24":{t:"`mini`\r",p:`Triggered when the player enters mini mode -<div className=& ...`,l:"en/advanced/event.html#mini",a:"mini"},"12.25":{t:"`pip`\r",p:`Triggered when the player enters Picture-in-Picture mode -<d ...`,l:"en/advanced/event.html#pip",a:"pip"},"12.26":{t:"`screenshot`\r",p:`Triggered when the player takes a screenshot -<div className ...`,l:"en/advanced/event.html#screenshot",a:"screenshot"},"12.27":{t:"`seek`\r",p:`Triggered when the player jumps in time -<div className=&quo ...`,l:"en/advanced/event.html#seek",a:"seek"},"12.28":{t:"`subtitleOffset`\r",p:`Triggered when the subtitle offset occurs in the player -<di ...`,l:"en/advanced/event.html#subtitleoffset",a:"subtitleoffset"},"12.29":{t:"`subtitleBeforeUpdate`\r",p:`Triggered before subtitles are updated -<div className=" ...`,l:"en/advanced/event.html#subtitlebeforeupdate",a:"subtitlebeforeupdate"},"12.30":{t:"`subtitleAfterUpdate`\r",p:`Triggered when the subtitles are updated -<div className=&qu ...`,l:"en/advanced/event.html#subtitleafterupdate",a:"subtitleafterupdate"},"12.31":{t:"`subtitleLoad`\r",p:`Triggered when the subtitle loads -<div className="run- ...`,l:"en/advanced/event.html#subtitleload",a:"subtitleload"},"12.32":{t:"`info`\r",p:`Triggered when the information panel is shown or hidden -<di ...`,l:"en/advanced/event.html#info",a:"info"},"12.33":{t:"`layer`\r",p:`Triggered when a custom layer is shown or hidden -<div class ...`,l:"en/advanced/event.html#layer",a:"layer"},"12.34":{t:"`loading`\r",p:`Triggered when a loader is shown or hidden -<div className=& ...`,l:"en/advanced/event.html#loading",a:"loading"},"12.35":{t:"`mask`\r",p:`Triggered when a mask layer is shown or hidden -<div classNa ...`,l:"en/advanced/event.html#mask",a:"mask"},"12.36":{t:"`subtitle`\r",p:`Triggered when the subtitle layer is shown or hidden -<div c ...`,l:"en/advanced/event.html#subtitle",a:"subtitle"},"12.37":{t:"`contextmenu`\r",p:`Triggered when the right-click menu is shown or hidden -<div ...`,l:"en/advanced/event.html#contextmenu",a:"contextmenu"},"12.38":{t:"`control`\r",p:`Triggered when the controller is shown or hidden -<div class ...`,l:"en/advanced/event.html#control",a:"control"},"12.39":{t:"`setting`\r",p:`Triggered when the settings panel is shown or hidden -<div c ...`,l:"en/advanced/event.html#setting",a:"setting"},"12.40":{t:"`muted`\r",p:`Triggered when the muted state changes -<div className=" ...`,l:"en/advanced/event.html#muted",a:"muted"},"12.41":{t:"`keydown`\r",p:`Listen to the keydown event from document -<div className=&q ...`,l:"en/advanced/event.html#keydown",a:"keydown"},"12.42":{t:"`video:canplay`\r",p:"The browser can play the media file, but estimates there is no ...",l:"en/advanced/event.html#video-canplay",a:"video-canplay"},"12.43":{t:"`video:canplaythrough`\r",p:"The browser estimates it can play the media through to the end ...",l:"en/advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"12.44":{t:"`video:complete`\r",p:`OfflineAudioContext rendering is complete -`,l:"en/advanced/event.html#video-complete",a:"video-complete"},"12.45":{t:"`video:durationchange`\r",p:`Triggered when the value of the duration property changes -`,l:"en/advanced/event.html#video-durationchange",a:"video-durationchange"},"12.46":{t:"`video:emptied`\r",p:"The media content becomes empty; for example, when this media ...",l:"en/advanced/event.html#video-emptied",a:"video-emptied"},"12.47":{t:"`video:ended`\r",p:`The video has stopped because the media reached the end point -`,l:"en/advanced/event.html#video-ended",a:"video-ended"},"12.48":{t:"`video:error`\r",p:"An error occurred while fetching media data, or the resource t ...",l:"en/advanced/event.html#video-error",a:"video-error"},"12.49":{t:"`video:loadeddata`\r",p:`The first frame of the media has finished loading -`,l:"en/advanced/event.html#video-loadeddata",a:"video-loadeddata"},"12.50":{t:"`video:loadedmetadata`\r",p:`Metadata has been loaded -`,l:"en/advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"12.51":{t:"`video:pause`\r",p:`Playback has been paused -`,l:"en/advanced/event.html#video-pause",a:"video-pause"},"12.52":{t:"`video:play`\r",p:`Playback has started -`,l:"en/advanced/event.html#video-play",a:"video-play"},"12.53":{t:"`video:playing`\r",p:"Playback is ready to start following a pause or delay due to l ...",l:"en/advanced/event.html#video-playing",a:"video-playing"},"12.54":{t:"`video:progress`\r",p:`Periodically triggered while the browser is loading resources -`,l:"en/advanced/event.html#video-progress",a:"video-progress"},"12.55":{t:"`video:ratechange`\r",p:`The playback rate has changed -`,l:"en/advanced/event.html#video-ratechange",a:"video-ratechange"},"12.56":{t:"`video:seeked`\r",p:`A seek (frame skipping) operation has completed -`,l:"en/advanced/event.html#video-seeked",a:"video-seeked"},"12.57":{t:"`video:seeking`\r",p:`A seek (frame skipping) operation has started -`,l:"en/advanced/event.html#video-seeking",a:"video-seeking"},"12.58":{t:"`video:stalled`\r",p:"The user agent is trying to fetch media data, but the data une ...",l:"en/advanced/event.html#video-stalled",a:"video-stalled"},"12.59":{t:"`video:suspend`\r",p:`Media data loading has been suspended -`,l:"en/advanced/event.html#video-suspend",a:"video-suspend"},"12.60":{t:"`video:timeupdate`\r",p:`The time specified by the currentTime attribute has changed -`,l:"en/advanced/event.html#video-timeupdate",a:"video-timeupdate"},"12.61":{t:"`video:volumechange`\r",p:`Volume changed -`,l:"en/advanced/event.html#video-volumechange",a:"video-volumechange"},"12.62":{t:"`video:waiting`\r",p:`Playback has stopped due to temporarily missing data -`,l:"en/advanced/event.html#video-waiting",a:"video-waiting"},"13.0":{t:"# Global Attributes\r",p:"Here, Global Attributes refer to the first-level properties mo ...",l:"en/advanced/global.html",a:"global-attributes"},"13.1":{t:"DEBUG\r",p:"Whether to start debug mode, which can print out all built-in ...",l:"en/advanced/global.html#debug",a:"debug"},"13.2":{t:"STYLE\r",p:`Returns the player style text -<div className="run-code ...`,l:"en/advanced/global.html#style",a:"style"},"13.3":{t:"CONTEXTMENU\r",p:"Whether to enable the right-click context menu, enabled by def ...",l:"en/advanced/global.html#contextmenu",a:"contextmenu"},"13.4":{t:"NOTICE_TIME\r",p:"The display duration of the notification message, in milliseco ...",l:"en/advanced/global.html#notice-time",a:"notice-time"},"13.5":{t:"SETTING_WIDTH\r",p:"The default width of the settings panel, in pixels, defaults t ...",l:"en/advanced/global.html#setting-width",a:"setting-width"},"13.6":{t:"SETTING_ITEM_WIDTH\r",p:"Set the default width of the settings items in the panel, in p ...",l:"en/advanced/global.html#setting-item-width",a:"setting-item-width"},"13.7":{t:"SETTING_ITEM_HEIGHT\r",p:"Set the default height of the settings items in the panel, in ...",l:"en/advanced/global.html#setting-item-height",a:"setting-item-height"},"13.8":{t:"RESIZE_TIME\r",p:"Throttle time for the resize event, in milliseconds, defaults ...",l:"en/advanced/global.html#resize-time",a:"resize-time"},"13.9":{t:"SCROLL_TIME\r",p:"Throttle time for the scroll event, in milliseconds, defaults ...",l:"en/advanced/global.html#scroll-time",a:"scroll-time"},"13.10":{t:"SCROLL_GAP\r",p:"The boundary tolerance distance for the view event, in pixels, ...",l:"en/advanced/global.html#scroll-gap",a:"scroll-gap"},"13.11":{t:"AUTO_PLAYBACK_MAX\r",p:"The maximum number of records for the automatic playback featu ...",l:"en/advanced/global.html#auto-playback-max",a:"auto-playback-max"},"13.12":{t:"AUTO_PLAYBACK_MIN\r",p:"The minimum duration for the auto playback feature, in seconds ...",l:"en/advanced/global.html#auto-playback-min",a:"auto-playback-min"},"13.13":{t:"AUTO_PLAYBACK_TIMEOUT\r",p:"The delay duration for hiding the auto playback feature, in mi ...",l:"en/advanced/global.html#auto-playback-timeout",a:"auto-playback-timeout"},"13.14":{t:"RECONNECT_TIME_MAX\r",p:"The maximum number of automatic reconnection attempts when a c ...",l:"en/advanced/global.html#reconnect-time-max",a:"reconnect-time-max"},"13.15":{t:"RECONNECT_SLEEP_TIME\r",p:"The delay time for the automatic reconnection attempt when a c ...",l:"en/advanced/global.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"13.16":{t:"CONTROL_HIDE_TIME\r",p:`... -Auto-hide delay time for the bottom control bar, measured ...`,l:"en/advanced/global.html#control-hide-time",a:"control-hide-time"},"13.17":{t:"DBCLICK_TIME\r",p:"Double-click event delay time, measured in milliseconds, defau ...",l:"en/advanced/global.html#dbclick-time",a:"dbclick-time"},"13.18":{t:"DBCLICK_FULLSCREEN\r",p:"On desktop, whether to switch to fullscreen on double click, d ...",l:"en/advanced/global.html#dbclick-fullscreen",a:"dbclick-fullscreen"},"13.19":{t:"MOBILE_DBCLICK_PLAY\r",p:"On mobile, whether to toggle play/pause on double click, defau ...",l:"en/advanced/global.html#mobile-dbclick-play",a:"mobile-dbclick-play"},"13.20":{t:"MOBILE_CLICK_PLAY\r",p:"On mobile, whether to play/pause on single click, default is f ...",l:"en/advanced/global.html#mobile-click-play",a:"mobile-click-play"},"13.21":{t:"AUTO_ORIENTATION_TIME\r",p:"On mobile devices, the delay time for auto-rotation, in millis ...",l:"en/advanced/global.html#auto-orientation-time",a:"auto-orientation-time"},"13.22":{t:"INFO_LOOP_TIME\r",p:"Info panel refresh time, unit in milliseconds, default is 1000 ...",l:"en/advanced/global.html#info-loop-time",a:"info-loop-time"},"13.23":{t:"FAST_FORWARD_VALUE\r",p:"On mobile, the multiplier rate of the speed when long-pressing ...",l:"en/advanced/global.html#fast-forward-value",a:"fast-forward-value"},"13.24":{t:"FAST_FORWARD_TIME\r",p:"The time, in milliseconds, to fast-forward when double-tapped, ...",l:"en/advanced/global.html#fast-forward-time",a:"fast-forward-time"},"13.25":{t:"TOUCH_MOVE_RATIO\r",p:"On mobile, the ratio of the speed of sliding left and right to ...",l:"en/advanced/global.html#touch-move-ratio",a:"touch-move-ratio"},"13.26":{t:"VOLUME_STEP\r",p:"The step ratio of adjusting volume with shortcuts, default is ...",l:"en/advanced/global.html#volume-step",a:"volume-step"},"13.27":{t:"SEEK_STEP\r",p:"The increment by which the playback progress is adjusted via k ...",l:"en/advanced/global.html#seek-step",a:"seek-step"},"13.28":{t:"PLAYBACK_RATE\r",p:"The list of built-in playback speeds, by default [0.5, 0.75, 1 ...",l:"en/advanced/global.html#playback-rate",a:"playback-rate"},"13.29":{t:"ASPECT_RATIO\r",p:"Built-in list of video aspect ratios, default is ['default', ' ...",l:"en/advanced/global.html#aspect-ratio",a:"aspect-ratio"},"13.30":{t:"FLIP\r",p:"Built-in list of video flips, defaults to ['normal', 'horizont ...",l:"en/advanced/global.html#flip",a:"flip"},"13.31":{t:"FULLSCREEN_WEB_IN_BODY\r",p:"When in web fullscreen, whether to mount the player under the ...",l:"en/advanced/global.html#fullscreen-web-in-body",a:"fullscreen-web-in-body"},"13.32":{t:"LOG_VERSION\r",p:"Setting whether to print the player version, the default is tr ...",l:"en/advanced/global.html#log-version",a:"log-version"},"13.33":{t:"USE_RAF\r",p:"Setting whether to use requestAnimationFrame, the default is f ...",l:"en/advanced/global.html#use-raf",a:"use-raf"},"14.0":{t:"# Writing Plugins\r",p:"Once you know the player's properties, methods, and events, wr ...",l:"en/advanced/plugin.html",a:"writing-plugins"},"15.0":{t:"# Instance Properties\r",p:"Here, instance properties refer to the primary properties moun ...",l:"en/advanced/property.html",a:"instance-properties"},"15.1":{t:"`play`\r",p:` -Type: Function - -Play video -<div className="run-code&q ...`,l:"en/advanced/property.html#play",a:"play"},"15.2":{t:"`pause`\r",p:` -Type: Function - -Pause video -<div className="run-code& ...`,l:"en/advanced/property.html#pause",a:"pause"},"15.3":{t:"`toggle`\r",p:` -Type: Function - -Toggle the play and pause state of the video - ...`,l:"en/advanced/property.html#toggle",a:"toggle"},"15.4":{t:"`destroy`\r",p:` -Type: Function -Parameter: Boolean - -Destroy the player. Accept ...`,l:"en/advanced/property.html#destroy",a:"destroy"},"15.5":{t:"`seek`\r",p:` -Type: Setter -Parameter: Number - -Jump to a specific time in th ...`,l:"en/advanced/property.html#seek",a:"seek"},"15.6":{t:"`forward`\r",p:` -Type: Setter -Parameter: Number - -Fast forward the video time, ...`,l:"en/advanced/property.html#forward",a:"forward"},"15.7":{t:"`backward`\r",p:` -Type: Setter -Parameter: Number - -Video rewind time in seconds - ...`,l:"en/advanced/property.html#backward",a:"backward"},"15.8":{t:"`volume`\r",p:` -Type: Setter/Getter -Parameter: Number - -Sets and gets the vide ...`,l:"en/advanced/property.html#volume",a:"volume"},"15.9":{t:"`url`\r",p:` -Type: Setter/Getter -Parameter: String - -Set and retrieve the v ...`,l:"en/advanced/property.html#url",a:"url"},"15.10":{t:"`switch`\r",p:` -Type: Setter -Parameter: String - -Set the video address, which ...`,l:"en/advanced/property.html#switch",a:"switch"},"15.11":{t:"`switchUrl`\r",p:` -Type: Function -Parameter: String - -Set the video address, simi ...`,l:"en/advanced/property.html#switchurl",a:"switchurl"},"15.12":{t:"`switchQuality`\r",p:` -Type: Function -Parameter: String - -Set video quality address, ...`,l:"en/advanced/property.html#switchquality",a:"switchquality"},"15.13":{t:"`muted`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -Set and get whether t ...`,l:"en/advanced/property.html#muted",a:"muted"},"15.14":{t:"`currentTime`\r",p:` -Type: Setter/Getter -Parameter: Number - -Set and get the curren ...`,l:"en/advanced/property.html#currenttime",a:"currenttime"},"15.15":{t:"`duration`\r",p:` -Type: Getter - -Get the video duration -<div className=" ...`,l:"en/advanced/property.html#duration",a:"duration"},"15.16":{t:"`screenshot`\r",p:` -Type: Function - -Download a screenshot of the current video fr ...`,l:"en/advanced/property.html#screenshot",a:"screenshot"},"15.17":{t:"`getDataURL`\r",p:` -Type: Function - -Gets the base64 address of the screenshot of ...`,l:"en/advanced/property.html#getdataurl",a:"getdataurl"},"15.18":{t:"`getBlobUrl`\r",p:` -Type: Function - -Gets the blob address of the screenshot of th ...`,l:"en/advanced/property.html#getbloburl",a:"getbloburl"},"15.19":{t:"`fullscreen`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -Set and get the playe ...`,l:"en/advanced/property.html#fullscreen",a:"fullscreen"},"15.20":{t:"`fullscreenWeb`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -Set and get the playe ...`,l:"en/advanced/property.html#fullscreenweb",a:"fullscreenweb"},"15.21":{t:"`pip`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -Set and get the playe ...`,l:"en/advanced/property.html#pip",a:"pip"},"15.22":{t:"`poster`\r",p:` -Type: Setter/Getter -Parameter: String - -Set and get the video ...`,l:"en/advanced/property.html#poster",a:"poster"},"15.23":{t:"`mini`\r",p:` -Type: Setter/Getter -Parameter: Boolean - -Set and get the playe ...`,l:"en/advanced/property.html#mini",a:"mini"},"15.24":{t:"`playing`\r",p:` -Type: Getter -Parameter: Boolean - -Get whether the video is cur ...`,l:"en/advanced/property.html#playing",a:"playing"},"15.25":{t:"`autoSize`\r",p:` -Type: Function - -Sets whether the video should auto adjust its ...`,l:"en/advanced/property.html#autosize",a:"autosize"},"15.26":{t:"`rect`\r",p:` -Type: Getter - -Gets the size and position information of the p ...`,l:"en/advanced/property.html#rect",a:"rect"},"15.27":{t:"`flip`\r",p:` -Type: Setter/Getter -Parameter: String - -Set and get the player ...`,l:"en/advanced/property.html#flip",a:"flip"},"15.28":{t:"`playbackRate`\r",p:` -Type: Setter/Getter -Parameter: Number -Set and get the playbac ...`,l:"en/advanced/property.html#playbackrate",a:"playbackrate"},"15.29":{t:"`aspectRatio`\r",p:` -Type: Setter/Getter -Parameter: String - -Set and get the aspect ...`,l:"en/advanced/property.html#aspectratio",a:"aspectratio"},"15.30":{t:"`autoHeight`\r",p:` -Type: Function - -When the container has only width, this attri ...`,l:"en/advanced/property.html#autoheight",a:"autoheight"},"15.31":{t:"`attr`\r",p:` -Type: Function -Parameter: String - -Dynamically get and set the ...`,l:"en/advanced/property.html#attr",a:"attr"},"15.32":{t:"`type`\r",p:` -Type: Setter/Getter -Parameter: String - -Dynamically get and se ...`,l:"en/advanced/property.html#type",a:"type"},"15.33":{t:"`theme`\r",p:` -Type: Setter/Getter -Parameter: String - -Dynamically get and se ...`,l:"en/advanced/property.html#theme",a:"theme"},"15.34":{t:"`airplay`\r",p:` -Type: Function - -Activate airplay -<div className="run- ...`,l:"en/advanced/property.html#airplay",a:"airplay"},"15.35":{t:"`loaded`\r",p:` -Type: Getter - -The proportion of the video that is cached, ran ...`,l:"en/advanced/property.html#loaded",a:"loaded"},"15.36":{t:"`played`\r",p:` -Type: Getter - -The proportion of the video that has been playe ...`,l:"en/advanced/property.html#played",a:"played"},"15.37":{t:"`proxy`\r",p:` -Type: Function - -A proxy function for DOM events, which essent ...`,l:"en/advanced/property.html#proxy",a:"proxy"},"15.38":{t:"`query`\r",p:` -Type: Function - -DOM query function, similar to document.query ...`,l:"en/advanced/property.html#query",a:"query"},"15.39":{t:"`video`\r",p:` -Type: Element - -A shortcut to return the video element of the ...`,l:"en/advanced/property.html#video",a:"video"},"15.40":{t:"`cssVar`\r",p:` -Type: Function - -Dynamically getting or setting css variables - ...`,l:"en/advanced/property.html#cssvar",a:"cssvar"},"15.41":{t:"`quality`\r",p:` -Type: Setter -Parameter: Array - -Dynamically setting the list o ...`,l:"en/advanced/property.html#quality",a:"quality"},"15.42":{t:"`thumbnails`\r",p:` -Type: Setter/Getter -Parameter: Object - -Dynamically set thumbn ...`,l:"en/advanced/property.html#thumbnails",a:"thumbnails"},"15.43":{t:"`subtitleOffset`\r",p:` -Type: Setter/Getter -Parameter: Number - -Dynamically set subtit ...`,l:"en/advanced/property.html#subtitleoffset",a:"subtitleoffset"},"16.0":{t:"# Context Menu\r",p:"\r",l:"en/component/contextmenu.html",a:"context-menu"},"16.1":{t:"Configuration\r",p:` - - -Property -Type -Description - - - - -disable -Boolean -Whether to di ...`,l:"en/component/contextmenu.html#configuration",a:"configuration"},"16.2":{t:"Creation\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#creation",a:"creation"},"16.3":{t:"Add\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#add",a:"add"},"16.4":{t:"Delete\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#delete",a:"delete"},"16.5":{t:"Updates\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#updates",a:"updates"},"17.0":{t:"# Controller\r",p:"\r",l:"en/component/controls.html",a:"controller"},"17.1":{t:"Configuration\r",p:` - - -Property -Type -Description - - - - -disable -Boolean -Whether to di ...`,l:"en/component/controls.html#configuration",a:"configuration"},"17.2":{t:"Creation\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#creation",a:"creation"},"17.3":{t:"Adding\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#adding",a:"adding"},"17.4":{t:"Delete\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#delete",a:"delete"},"17.5":{t:"Update\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#update",a:"update"},"18.0":{t:"# Layer\r",p:"\r",l:"en/component/layers.html",a:"layer"},"18.1":{t:"Configuration\r",p:` - - -Property -Type -Description - - - - -disable -Boolean -Whether to di ...`,l:"en/component/layers.html#configuration",a:"configuration"},"18.2":{t:"Creation\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#creation",a:"creation"},"18.3":{t:"Add\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#add",a:"add"},"18.4":{t:"Delete\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#delete",a:"delete"},"18.5":{t:"Update\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#update",a:"update"},"19.0":{t:"# Settings Panel\r",p:"\r",l:"en/component/setting.html",a:"settings-panel"},"19.1":{t:"Built-in\r",p:"First, open the settings panel, and then it comes with four bu ...",l:"en/component/setting.html#built-in",a:"built-in"},"19.2":{t:"Create - Selection List\r",p:` - - -Property -Type -Description - - - - -html -String, Element -Item DOM ...`,l:"en/component/setting.html#create-selection-list",a:"create-selection-list"},"19.3":{t:"Creating - Nested Lists\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#creating-nested-lists",a:"creating-nested-lists"},"19.4":{t:"Create - Toggle Button\r",p:` - - -Property -Type -Description - - - - -html -String, Element -Element' ...`,l:"en/component/setting.html#create-toggle-button",a:"create-toggle-button"},"19.5":{t:"Create - Range Slider\r",p:` - - -Attribute -Type -Description - - - - -html -String, Element -The ele ...`,l:"en/component/setting.html#create-range-slider",a:"create-range-slider"},"19.6":{t:"Add\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#add",a:"add"},"19.7":{t:"Delete\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#delete",a:"delete"},"19.8":{t:"Updates\r",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#updates",a:"updates"},"20.0":{t:"# Installation and Usage\r",p:"\r",l:"en/index.html",a:"installation-and-usage"},"20.1":{t:"Installation\r",p:`::: code-group -npm install artplayer - -yarn add artplayer - -pnpm ...`,l:"en/index.html#installation",a:"installation"},"20.2":{t:"`CDN`\r",p:`::: code-group -https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"en/index.html#cdn",a:"cdn"},"20.3":{t:"Usage\r",p:`::: code-group -<html> - <head> - <title ...`,l:"en/index.html#usage",a:"usage"},"20.4":{t:"`Vue.js`\r",p:`::: code-group -<template> - <div ref="artRef&quo ...`,l:"en/index.html#vue-js",a:"vue-js"},"20.5":{t:"`React.js`\r",p:`::: code-group -import { useEffect, useRef } from 'react'; -impo ...`,l:"en/index.html#react-js",a:"react-js"},"20.6":{t:"TypeScript\r",p:`Importing Artplayer will automatically import artplayer.d.ts -`,l:"en/index.html#typescript",a:"typescript"},"20.7":{t:"Vue.js\r",p:` - -`,l:"en/index.html#vue-js",a:"vue-js"},"20.8":{t:"React.js\r",p:`import Artplayer from 'artplayer'; -const art = useRef<Artpl ...`,l:"en/index.html#react-js",a:"react-js"},"20.9":{t:"Option\r",p:`You can also use the option type -import Artplayer from 'artpla ...`,l:"en/index.html#option",a:"option"},"20.10":{t:"JavaScript\r",p:"Sometimes your js file may lose the TypeScript type hints, in ...",l:"en/index.html#javascript",a:"javascript"},"20.11":{t:"Ancient Browsers\r",p:"The production build of artplayer.js is only compatible with t ...",l:"en/index.html#ancient-browsers",a:"ancient-browsers"},"21.0":{t:"# Language Settings\r",p:`::: danger -Given the increasing number of bundled multilingual ...`,l:"en/start/i18n.html",a:"language-settings"},"21.1":{t:"Default Languages\r",p:"The default languages are: en, zh-cn, which do not require man ...",l:"en/start/i18n.html#default-languages",a:"default-languages"},"21.2":{t:"Importing Languages\r",p:"Language files before packaging are located in: artplayer/src/ ...",l:"en/start/i18n.html#importing-languages",a:"importing-languages"},"21.3":{t:"Add Language\r",p:`var art = new Artplayer({ - container: '.artplayer-app', - ...`,l:"en/start/i18n.html#add-language",a:"add-language"},"21.4":{t:"Modify Language\r",p:`import zhTw from 'artplayer/i18n/zh-tw.js'; - -var art = new Art ...`,l:"en/start/i18n.html#modify-language",a:"modify-language"},"22.0":{t:"# Basic Options\r",p:"\r",l:"en/start/option.html",a:"basic-options"},"22.1":{t:"`container`\r",p:` -Type: String, Element -Default: #artplayer - -The DOM container ...`,l:"en/start/option.html#container",a:"container"},"22.2":{t:"`url`\r",p:` -Type: String -Default: '' - -The video source address -<div cl ...`,l:"en/start/option.html#url",a:"url"},"22.3":{t:"`id`\r",p:` -Type: String -Default: '' - -The unique identifier of the player ...`,l:"en/start/option.html#id",a:"id"},"22.4":{t:"`onReady`\r",p:` -Type: Function -Default: undefined - -The constructor accepts a ...`,l:"en/start/option.html#onready",a:"onready"},"22.5":{t:"`poster`\r",p:` -Type: String -Default: '' - -The poster of the video, which only ...`,l:"en/start/option.html#poster",a:"poster"},"22.6":{t:"`theme`\r",p:` -Type: String -Default: #f00 - -Player theme color, currently use ...`,l:"en/start/option.html#theme",a:"theme"},"22.7":{t:"`volume`\r",p:` -Type: Number -Default: 0.7 - -The default volume of the player -& ...`,l:"en/start/option.html#volume",a:"volume"},"22.8":{t:"`isLive`\r",p:` -Type: Boolean -Default: false - -Use live mode, which will hide ...`,l:"en/start/option.html#islive",a:"islive"},"22.9":{t:"`muted`\r",p:` -Type: Boolean -Default: false - -Whether to mute by default -< ...`,l:"en/start/option.html#muted",a:"muted"},"22.10":{t:"`autoplay`\r",p:` -Type: Boolean -Default: false - -Whether to play automatically - - ...`,l:"en/start/option.html#autoplay",a:"autoplay"},"22.11":{t:"`autoSize`\r",p:` -Type: Boolean -Default: false - -The size of the player will by ...`,l:"en/start/option.html#autosize",a:"autosize"},"22.12":{t:"`autoMini`\r",p:` -Type: Boolean -Default: false - -Automatically enter mini mode w ...`,l:"en/start/option.html#automini",a:"automini"},"22.13":{t:"`loop`\r",p:` -Type: Boolean -Default: false - -Whether to loop the video -<d ...`,l:"en/start/option.html#loop",a:"loop"},"22.14":{t:"`flip`\r",p:` -Type: Boolean -Default: false - -Whether to show the video flip ...`,l:"en/start/option.html#flip",a:"flip"},"22.15":{t:"`playbackRate`\r",p:` -Type: Boolean -Default: false - -Whether to show the playback sp ...`,l:"en/start/option.html#playbackrate",a:"playbackrate"},"22.16":{t:"`aspectRatio`\r",p:` -Type: Boolean -Default: false - -Displays the video aspect ratio ...`,l:"en/start/option.html#aspectratio",a:"aspectratio"},"22.17":{t:"`screenshot`\r",p:` -Type: Boolean -Default: false - -Whether to show the screenshot ...`,l:"en/start/option.html#screenshot",a:"screenshot"},"22.18":{t:"`setting`\r",p:` -Type: Boolean -Default: false - -Display the toggle button for t ...`,l:"en/start/option.html#setting",a:"setting"},"22.19":{t:"`hotkey`\r",p:` -Type: Boolean -Default: true - -Whether to use hotkeys -<div c ...`,l:"en/start/option.html#hotkey",a:"hotkey"},"22.20":{t:"`pip`\r",p:` -Type: Boolean -Default: false -Show the Picture in Picture swit ...`,l:"en/start/option.html#pip",a:"pip"},"22.21":{t:"`mutex`\r",p:` -Type: Boolean -Default: true - -If there are multiple players on ...`,l:"en/start/option.html#mutex",a:"mutex"},"22.22":{t:"`fullscreen`\r",p:` -Type: Boolean -Default: false -Display the Window Fullscreen bu ...`,l:"en/start/option.html#fullscreen",a:"fullscreen"},"22.23":{t:"`fullscreenWeb`\r",p:` -Type: Boolean -Default: false - -Display the Web Fullscreen butt ...`,l:"en/start/option.html#fullscreenweb",a:"fullscreenweb"},"22.24":{t:"`subtitleOffset`\r",p:` - -Type: Boolean - - -Default: false - - -Subtitle time offset, the r ...`,l:"en/start/option.html#subtitleoffset",a:"subtitleoffset"},"22.25":{t:"`miniProgressBar`\r",p:` -Type: Boolean -Default: false - -Mini progress bar, only appears ...`,l:"en/start/option.html#miniprogressbar",a:"miniprogressbar"},"22.26":{t:"`useSSR`\r",p:` -Type: Boolean -Default: false - -Whether to use SSR (Server-Side ...`,l:"en/start/option.html#usessr",a:"usessr"},"22.27":{t:"`playsInline`\r",p:` -Type: Boolean -Default: true - -Whether to use playsInline mode ...`,l:"en/start/option.html#playsinline",a:"playsinline"},"22.28":{t:"`layers`\r",p:` -Type: Array -Default: [] - -Initializes custom layers -<div cl ...`,l:"en/start/option.html#layers",a:"layers"},"22.29":{t:"`settings`\r",p:` -Type: Array -Default: [] - -Initializes custom settings panel -&l ...`,l:"en/start/option.html#settings",a:"settings"},"22.30":{t:"`contextmenu`\r",p:` -Type: Array -Default: [] - -Initialize custom context menu -<d ...`,l:"en/start/option.html#contextmenu",a:"contextmenu"},"22.31":{t:"`controls`\r",p:` -Type: Array -Default: [] - -Initializes custom bottom control ba ...`,l:"en/start/option.html#controls",a:"controls"},"22.32":{t:"`quality`\r",p:` -Type: Array -Default: [] - -Whether to show the quality selectio ...`,l:"en/start/option.html#quality",a:"quality"},"22.33":{t:"`highlight`\r",p:` -Type: Array -Default: [] - -Show highlight information on the pr ...`,l:"en/start/option.html#highlight",a:"highlight"},"22.34":{t:"`plugins`\r",p:` -Type: Array -Default: [] - -Initialize custom plugins -<div cl ...`,l:"en/start/option.html#plugins",a:"plugins"},"22.35":{t:"`thumbnails`\r",p:` -Type: Object -Default: {} - -Set thumbnails on the progress bar - ...`,l:"en/start/option.html#thumbnails",a:"thumbnails"},"22.36":{t:"`subtitle`\r",p:` -Type: Object -Default: {} - -Set the video subtitles, supporting ...`,l:"en/start/option.html#subtitle",a:"subtitle"},"22.37":{t:"`moreVideoAttr`\r",p:` -Type: Object -Default: {'controls': false, 'preload': 'metadat ...`,l:"en/start/option.html#morevideoattr",a:"morevideoattr"},"22.38":{t:"`icons`\r",p:` -Type: Object -Default: {} - -Used to replace default icons, supp ...`,l:"en/start/option.html#icons",a:"icons"},"22.39":{t:"`type`\r",p:` -Type: String -Default: '' - -Used to specify the format of the v ...`,l:"en/start/option.html#type",a:"type"},"22.40":{t:"`customType`\r",p:` -Type: Object -Default: {} - -Matches the video's type to delegat ...`,l:"en/start/option.html#customtype",a:"customtype"},"22.41":{t:"`lang`\r",p:` -Type: String -Default: navigator.language.toLowerCase() - -Defau ...`,l:"en/start/option.html#lang",a:"lang"},"22.42":{t:"`i18n`\r",p:` -Type: Object -Default: {} - -Custom i18n configuration, which wi ...`,l:"en/start/option.html#i18n",a:"i18n"},"22.43":{t:"`lock`\r",p:` -Type: Boolean -Default: false - -Whether to display a lock butto ...`,l:"en/start/option.html#lock",a:"lock"},"22.44":{t:"`fastForward`\r",p:` -Type: Boolean -Default: false - -Whether to add fast forward fun ...`,l:"en/start/option.html#fastforward",a:"fastforward"},"22.45":{t:"`autoPlayback`\r",p:` -Type: Boolean -Default: false - -Whether to use the automatic pl ...`,l:"en/start/option.html#autoplayback",a:"autoplayback"},"22.46":{t:"`autoOrientation`\r",p:` -Type: Boolean -Default: false - -Whether to rotate the player on ...`,l:"en/start/option.html#autoorientation",a:"autoorientation"},"22.47":{t:"`airplay`\r",p:` -Type: Boolean -Default: false - -Whether to display the airplay ...`,l:"en/start/option.html#airplay",a:"airplay"},"22.48":{t:"`cssVar`\r",p:` -Type: Object -Default: {} - -Used to change built-in CSS variabl ...`,l:"en/start/option.html#cssvar",a:"cssvar"},"22.49":{t:"`proxy`\r",p:` -Type: function -Default: undefined - -The function can return a ...`,l:"en/start/option.html#proxy",a:"proxy"},"23.0":{t:"# 安装使用\r",p:"\r",l:"index.html",a:"安装使用"},"23.1":{t:"安装\r",p:`::: code-group -npm install artplayer - -yarn add artplayer - -pnpm ...`,l:"index.html#安装",a:"安装"},"23.2":{t:"`CDN`\r",p:`::: code-group -https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"index.html#cdn",a:"cdn"},"23.3":{t:"使用\r",p:`::: code-group -<html> - <head> - <title ...`,l:"index.html#使用",a:"使用"},"23.4":{t:"`Vue.js`\r",p:`::: code-group -<template> - <div ref="artRef&quo ...`,l:"index.html#vue-js",a:"vue-js"},"23.5":{t:"`React.js`\r",p:`::: code-group -import { useEffect, useRef } from 'react'; -impo ...`,l:"index.html#react-js",a:"react-js"},"23.6":{t:"TypeScript\r",p:`导入 Artplayer 时会自动导入的 artplayer.d.ts -`,l:"index.html#typescript",a:"typescript"},"23.7":{t:"Vue.js\r",p:` - -`,l:"index.html#vue-js",a:"vue-js"},"23.8":{t:"React.js\r",p:`import Artplayer from 'artplayer'; -const art = useRef<Artpl ...`,l:"index.html#react-js",a:"react-js"},"23.9":{t:"Option\r",p:`你也可以使用选项的类型 -import Artplayer from 'artplayer'; - -const option: ...`,l:"index.html#option",a:"option"},"23.10":{t:"JavaScript\r",p:`有时你的 js 文件会丢失 TypeScript 的类型提示,这时候你可以手动导入类型 -变量: -/** - * @type { ...`,l:"index.html#javascript",a:"javascript"},"23.11":{t:"古老的浏览器\r",p:`生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version -对于 ...`,l:"index.html#古老的浏览器",a:"古老的浏览器"},"24.0":{t:"# 弹幕库\r",p:"\r",l:"plugin/danmuku.html",a:"弹幕库"},"24.1":{t:"演示\r",p:`👉 查看完整演示 -`,l:"plugin/danmuku.html#演示",a:"演示"},"24.2":{t:"安装\r",p:`::: code-group -npm install artplayer-plugin-danmuku - -yarn add ...`,l:"plugin/danmuku.html#安装",a:"安装"},"24.3":{t:"CDN\r",p:`::: code-group -https://cdn.jsdelivr.net/npm/artplayer-plugin-d ...`,l:"plugin/danmuku.html#cdn",a:"cdn"},"24.4":{t:"弹幕结构\r",p:`每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数 -{ - t ...`,l:"plugin/danmuku.html#弹幕结构",a:"弹幕结构"},"24.5":{t:"全部选项\r",p:`只有danmuku是必须的参数,其余都是非必填 -{ - danmuku: [], // 弹幕数据 - speed: ...`,l:"plugin/danmuku.html#全部选项",a:"全部选项"},"24.6":{t:"生命周期\r",p:`来自用户输入的弹幕: -beforeEmit -> filter -> beforeVisible -> a ...`,l:"plugin/danmuku.html#生命周期",a:"生命周期"},"24.7":{t:"使用弹幕数组\r",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用弹幕数组",a:"使用弹幕数组"},"24.8":{t:"使用弹幕 XML\r",p:`弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致 -<div className="run-cod ...`,l:"plugin/danmuku.html#使用弹幕-xml",a:"使用弹幕-xml"},"24.9":{t:"使用异步返回\r",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用异步返回",a:"使用异步返回"},"24.10":{t:"`hide/show`\r",p:`通过方法 hide 和 show 进行隐藏或者显示弹幕 -<div className="run-code&q ...`,l:"plugin/danmuku.html#hide-show",a:"hide-show"},"24.11":{t:"`isHide`\r",p:`通过属性 isHide 判断当前弹幕是隐藏或者显示 -<div className="run-code&quo ...`,l:"plugin/danmuku.html#ishide",a:"ishide"},"24.12":{t:"`emit`\r",p:`通过方法 emit 发送一条实时弹幕 -<div className="run-code" data ...`,l:"plugin/danmuku.html#emit",a:"emit"},"24.13":{t:"`config`\r",p:`通过方法 config 实时改变弹幕配置 -<div className="run-code" da ...`,l:"plugin/danmuku.html#config",a:"config"},"24.14":{t:"`load`\r",p:`通过 load 方法可以重载弹幕库,或者切换新弹幕库,或者追加新的弹幕库 -<div className="r ...`,l:"plugin/danmuku.html#load",a:"load"},"24.15":{t:"`reset`\r",p:`用于清空当前显示的弹幕 -<div className="run-code" data-libs=& ...`,l:"plugin/danmuku.html#reset",a:"reset"},"24.16":{t:"`mount`\r",p:`在初始化弹幕插件的时候,是可以指定弹幕发射器的挂载位置的,默认是挂载在控制栏的中部,你也可以把它挂载在播放器以外的地方。 -当 ...`,l:"plugin/danmuku.html#mount",a:"mount"},"24.17":{t:"`option`\r",p:`用于获取当前弹幕配置 -<div className="run-code" data-libs=&q ...`,l:"plugin/danmuku.html#option",a:"option"},"24.18":{t:"事件\r",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#事件",a:"事件"},"25.0":{t:"# 语言设置\r",p:`::: danger -鉴于捆绑的多国语言越来越多, 从 5.1.0 版本开始, artplayer.js 核心代码除了包含 ...`,l:"start/i18n.html",a:"语言设置"},"25.1":{t:"默认语言\r",p:`默认语言有: en, zh-cn, 无需手动导入 -var art = new Artplayer({ - contain ...`,l:"start/i18n.html#默认语言",a:"默认语言"},"25.2":{t:"导入语言\r",p:`打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言 -打包后的语言文件存放于: a ...`,l:"start/i18n.html#导入语言",a:"导入语言"},"25.3":{t:"新增语言\r",p:`var art = new Artplayer({ - container: '.artplayer-app', - ...`,l:"start/i18n.html#新增语言",a:"新增语言"},"25.4":{t:"修改语言\r",p:`import zhTw from 'artplayer/i18n/zh-tw.js'; - -var art = new Art ...`,l:"start/i18n.html#修改语言",a:"修改语言"},"26.0":{t:"# 基础选项\r",p:"\r",l:"start/option.html",a:"基础选项"},"26.1":{t:"`container`\r",p:` -Type: String, Element -Default: #artplayer - -播放器挂载的 DOM 容器 -< ...`,l:"start/option.html#container",a:"container"},"26.2":{t:"`url`\r",p:` -Type: String -Default: '' - -视频源地址 -<div className="run-c ...`,l:"start/option.html#url",a:"url"},"26.3":{t:"`id`\r",p:` -Type: String -Default: '' - -播放器的唯一标识,目前只用于记忆播放 autoplayback -< ...`,l:"start/option.html#id",a:"id"},"26.4":{t:"`onReady`\r",p:` -Type: Function -Default: undefined - -构造函数接受一个函数作为第二个参数,播放器初始化成功 ...`,l:"start/option.html#onready",a:"onready"},"26.5":{t:"`poster`\r",p:` -Type: String -Default: '' - -视频的海报,只会出现在播放器初始化且未播放的状态下 -<div c ...`,l:"start/option.html#poster",a:"poster"},"26.6":{t:"`theme`\r",p:` -Type: String -Default: #f00 - -播放器主题颜色,目前用于 进度条 和 高亮元素 上 -<div ...`,l:"start/option.html#theme",a:"theme"},"26.7":{t:"`volume`\r",p:` -Type: Number -Default: 0.7 - -播放器的默认音量 -<div className="r ...`,l:"start/option.html#volume",a:"volume"},"26.8":{t:"`isLive`\r",p:` -Type: Boolean -Default: false - -使用直播模式,会隐藏进度条和播放时间 -<div clas ...`,l:"start/option.html#islive",a:"islive"},"26.9":{t:"`muted`\r",p:` -Type: Boolean -Default: false - -是否默认静音 -<div className=" ...`,l:"start/option.html#muted",a:"muted"},"26.10":{t:"`autoplay`\r",p:` -Type: Boolean -Default: false - -是否自动播放 -<div className=" ...`,l:"start/option.html#autoplay",a:"autoplay"},"26.11":{t:"`autoSize`\r",p:` -Type: Boolean -Default: false - -播放器的尺寸默认会填充整个 container 容器尺寸,所以 ...`,l:"start/option.html#autosize",a:"autosize"},"26.12":{t:"`autoMini`\r",p:` -Type: Boolean -Default: false - -当播放器滚动到浏览器视口以外时,自动进入 迷你播放 模式 -&l ...`,l:"start/option.html#automini",a:"automini"},"26.13":{t:"`loop`\r",p:` -Type: Boolean -Default: false - -是否循环播放 -<div className=" ...`,l:"start/option.html#loop",a:"loop"},"26.14":{t:"`flip`\r",p:` -Type: Boolean -Default: false - -是否显示视频翻转功能,目前只出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#flip",a:"flip"},"26.15":{t:"`playbackRate`\r",p:` -Type: Boolean -Default: false - -是否显示视频播放速度功能,会出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#playbackrate",a:"playbackrate"},"26.16":{t:"`aspectRatio`\r",p:` -Type: Boolean -Default: false - -是否显示视频长宽比功能,会出现在 设置面板 和 右键菜单 里 - ...`,l:"start/option.html#aspectratio",a:"aspectratio"},"26.17":{t:"`screenshot`\r",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示 视频截图 功能 -<div cla ...`,l:"start/option.html#screenshot",a:"screenshot"},"26.18":{t:"`setting`\r",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示 设置面板 的开关按钮 -<div ...`,l:"start/option.html#setting",a:"setting"},"26.19":{t:"`hotkey`\r",p:` -Type: Boolean -Default: true - -是否使用快捷键 -<div className=" ...`,l:"start/option.html#hotkey",a:"hotkey"},"26.20":{t:"`pip`\r",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示 画中画 的开关按钮 -<div c ...`,l:"start/option.html#pip",a:"pip"},"26.21":{t:"`mutex`\r",p:` -Type: Boolean -Default: true - -假如页面里同时存在多个播放器,是否只能让一个播放器播放 -< ...`,l:"start/option.html#mutex",a:"mutex"},"26.22":{t:"`fullscreen`\r",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示播放器 窗口全屏 按钮 -<div ...`,l:"start/option.html#fullscreen",a:"fullscreen"},"26.23":{t:"`fullscreenWeb`\r",p:` -Type: Boolean -Default: false - -是否在底部控制栏里显示播放器 网页全屏 按钮 -<div ...`,l:"start/option.html#fullscreenweb",a:"fullscreenweb"},"26.24":{t:"`subtitleOffset`\r",p:` -Type: Boolean -Default: false - -字幕时间偏移,范围在 [-5s, 5s],出现在 设置面板 里 ...`,l:"start/option.html#subtitleoffset",a:"subtitleoffset"},"26.25":{t:"`miniProgressBar`\r",p:` -Type: Boolean -Default: false - -迷你进度条,只在播放器失去焦点后且正在播放时出现 -<di ...`,l:"start/option.html#miniprogressbar",a:"miniprogressbar"},"26.26":{t:"`useSSR`\r",p:` -Type: Boolean -Default: false - -是否使用 SSR 挂载模式,假如你希望在播放器挂载前,就提前渲 ...`,l:"start/option.html#usessr",a:"usessr"},"26.27":{t:"`playsInline`\r",p:` -Type: Boolean -Default: true - -在移动端是否使用 playsInline 模式 -<div ...`,l:"start/option.html#playsinline",a:"playsinline"},"26.28":{t:"`layers`\r",p:` -Type: Array -Default: [] - -初始化自定义的 层 -<div className="ru ...`,l:"start/option.html#layers",a:"layers"},"26.29":{t:"`settings`\r",p:` -Type: Array -Default: [] - -初始化自定义的 设置面板 -<div className=" ...`,l:"start/option.html#settings",a:"settings"},"26.30":{t:"`contextmenu`\r",p:` -Type: Array -Default: [] - -初始化自定义的 右键菜单 -<div className=" ...`,l:"start/option.html#contextmenu",a:"contextmenu"},"26.31":{t:"`controls`\r",p:` -Type: Array -Default: [] - -初始化自定义的底部 控制栏 -<div className=&quo ...`,l:"start/option.html#controls",a:"controls"},"26.32":{t:"`quality`\r",p:` -Type: Array -Default: [] - -是否在底部控制栏里显示 画质选择 列表 - - - -属性 -类型 -描述 - - - - - ...`,l:"start/option.html#quality",a:"quality"},"26.33":{t:"`highlight`\r",p:` -Type: Array -Default: [] - -在进度条上显示 高亮信息 - - - -属性 -类型 -描述 - - - - -time -Nu ...`,l:"start/option.html#highlight",a:"highlight"},"26.34":{t:"`plugins`\r",p:` -Type: Array -Default: [] - -初始化自定义的 插件 -<div className="r ...`,l:"start/option.html#plugins",a:"plugins"},"26.35":{t:"`thumbnails`\r",p:` -Type: Object -Default: {} - -在进度条上设置 预览图 - - - -属性 -类型 -描述 - - - - -url -Str ...`,l:"start/option.html#thumbnails",a:"thumbnails"},"26.36":{t:"`subtitle`\r",p:` -Type: Object -Default: {} - -设置视频的字幕,支持字幕格式:vtt, srt, ass - - - -属性 - ...`,l:"start/option.html#subtitle",a:"subtitle"},"26.37":{t:"`moreVideoAttr`\r",p:` -Type: Object -Default: {'controls': false,'preload': 'metadata ...`,l:"start/option.html#morevideoattr",a:"morevideoattr"},"26.38":{t:"`icons`\r",p:` -Type: Object -Default: {} - -用于替换默认图标,支持 Html 字符串和 HTMLElement -& ...`,l:"start/option.html#icons",a:"icons"},"26.39":{t:"`type`\r",p:` -Type: String -Default: '' - -用于指明视频的格式,需要配合 customType 一起使用,默认视频 ...`,l:"start/option.html#type",a:"type"},"26.40":{t:"`customType`\r",p:` -Type: Object -Default: {} - -通过视频的 type 进行匹配,把视频解码权交给第三方程序进行处理,处 ...`,l:"start/option.html#customtype",a:"customtype"},"26.41":{t:"`lang`\r",p:` -Type: String -Default: navigator.language.toLowerCase() - -默认显示语 ...`,l:"start/option.html#lang",a:"lang"},"26.42":{t:"`i18n`\r",p:` -Type: Object -Default: {} - -自定义 i18n 配置,该配置会和自带的 i18n 进行深度合并 -新增 ...`,l:"start/option.html#i18n",a:"i18n"},"26.43":{t:"`lock`\r",p:` -Type: Boolean -Default: false - -是否在移动端显示一个 锁定按钮 ,用于隐藏底部 控制栏 -< ...`,l:"start/option.html#lock",a:"lock"},"26.44":{t:"`fastForward`\r",p:` -Type: Boolean -Default: false - -是否在移动端添加长按视频快进功能 -<div classN ...`,l:"start/option.html#fastforward",a:"fastforward"},"26.45":{t:"`autoPlayback`\r",p:` -Type: Boolean -Default: false - -是否使用自动 回放功能 -<div className=& ...`,l:"start/option.html#autoplayback",a:"autoplayback"},"26.46":{t:"`autoOrientation`\r",p:` -Type: Boolean -Default: false - -是否在移动端的网页全屏时,根据视频尺寸和视口尺寸,旋转播放器 - ...`,l:"start/option.html#autoorientation",a:"autoorientation"},"26.47":{t:"`airplay`\r",p:` -Type: Boolean -Default: false - -是否显示 airplay 按钮,当前只有部分浏览器支持该功能 - ...`,l:"start/option.html#airplay",a:"airplay"},"26.48":{t:"`cssVar`\r",p:` -Type: Object -Default: {} - -用于改变内置的css变量 -<div className=&quo ...`,l:"start/option.html#cssvar",a:"cssvar"},"26.49":{t:"`proxy`\r",p:` -Type: function -Default: undefined - -函数可以返回一个第三方的 HTMLCanvasEle ...`,l:"start/option.html#proxy",a:"proxy"}},n={previewLength:62,buttonLabel:"Search",placeholder:"Search docs",allow:[],ignore:[]},a={INDEX_DATA:e,PREVIEW_LOOKUP:t,Options:n};export{a as default}; diff --git a/docs/document/assets/chunks/virtual_search-data.z0DSvrjA.js b/docs/document/assets/chunks/virtual_search-data.z0DSvrjA.js new file mode 100644 index 000000000..5d0d73f6d --- /dev/null +++ b/docs/document/assets/chunks/virtual_search-data.z0DSvrjA.js @@ -0,0 +1,1364 @@ +const e={map:'[{"高级属性":["0.0"],"option":["0.1","1.12","10.1","11.12","20.9","23.9","24.17"],"template":["0.2","10.2"],"events":["0.3","10.3"],"storage":["0.4","10.4"],"icons":["0.5","10.5","22.38","26.38"],"i18n":["0.6","10.6","22.42","26.42"],"notice":["0.7","3.4","10.7","13.4"],"layers":["0.8","10.8","22.28","26.28"],"controls":["0.9","10.9","22.31","26.31"],"contextmenu":["0.10","2.37","3.3","10.10","12.37","13.3","22.30","26.30"],"subtitle":["0.11","2.36","10.11","12.36","22.36","26.36"],"loading":["0.12","2.34","10.12","12.34"],"hotkey":["0.13","2.5","10.13","12.5","22.19","26.19"],"mask":["0.14","2.35","10.14","12.35"],"setting":["0.15","2.39","3.5","3.6","3.7","10.15","12.39","13.5","13.6","13.7","22.18","26.18"],"plugins":["0.16","10.16","22.34","26.34"],"静态属性":["1.0"],"instances":["1.1","11.1"],"version":["1.2","11.2"],"env":["1.3","11.3"],"build":["1.4","11.4"],"config":["1.5","11.5","24.13"],"utils":["1.6","11.6"],"scheme":["1.7","11.7"],"emitter":["1.8","11.8"],"validator":["1.9","11.9"],"kindof":["1.10","11.10"],"html":["1.11","11.11"],"实例事件":["2.0"],"ready":["2.1","12.1"],"restart":["2.2","12.2"],"pause":["2.3","5.2","12.3","15.2"],"play":["2.4","5.1","12.4","15.1"],"destroy":["2.6","5.4","12.6","15.4"],"focus":["2.7","12.7"],"blur":["2.8","12.8"],"dblclick":["2.9","12.9"],"click":["2.10","12.10"],"error":["2.11","12.11"],"hover":["2.12","12.12"],"mousemove":["2.13","12.13"],"resize":["2.14","3.8","12.14","13.8"],"view":["2.15","12.15"],"lock":["2.16","12.16","22.43","26.43"],"aspectratio":["2.17","5.29","12.17","15.29","22.16","26.16"],"autoheight":["2.18","5.30","12.18","15.30"],"autosize":["2.19","5.25","12.19","15.25","22.11","26.11"],"flip":["2.20","3.30","5.27","12.20","13.30","15.27","22.14","26.14"],"fullscreen":["2.21","3.31","5.19","12.21","13.31","15.19","22.22","26.22"],"fullscreenerror":["2.22","12.22"],"fullscreenweb":["2.23","5.20","12.23","15.20","22.23","26.23"],"mini":["2.24","5.23","12.24","15.23"],"pip":["2.25","5.21","12.25","15.21","22.20","26.20"],"screenshot":["2.26","5.16","12.26","15.16","22.17","26.17"],"seek":["2.27","3.27","5.5","12.27","13.27","15.5"],"subtitleoffset":["2.28","5.43","12.28","15.43","22.24","26.24"],"subtitlebeforeupdate":["2.29","12.29"],"subtitleafterupdate":["2.30","12.30"],"subtitleload":["2.31","12.31"],"info":["2.32","3.22","12.32","13.22"],"layer":["2.33","12.33","18.0"],"control":["2.38","3.16","12.38","13.16"],"muted":["2.40","5.13","12.40","15.13","22.9","26.9"],"keydown":["2.41","12.41"],"video":["2.42","2.43","2.44","2.45","2.46","2.47","2.48","2.49","2.50","2.51","2.52","2.53","2.54","2.55","2.56","2.57","2.58","2.59","2.60","2.61","2.62","5.39","12.42","12.43","12.44","12.45","12.46","12.47","12.48","12.49","12.50","12.51","12.52","12.53","12.54","12.55","12.56","12.57","12.58","12.59","12.60","12.61","12.62","15.39"],"全局属性":["3.0"],"debug":["3.1","13.1"],"style":["3.2","13.2"],"scroll":["3.9","3.10","13.9","13.10"],"auto":["3.11","3.12","3.13","3.21","13.11","13.12","13.13","13.21"],"reconnect":["3.14","3.15","13.14","13.15"],"dbclick":["3.17","3.18","13.17","13.18"],"mobile":["3.19","3.20","13.19","13.20"],"fast":["3.23","3.24","13.23","13.24"],"touch":["3.25","13.25"],"volume":["3.26","5.8","13.26","15.8","22.7","26.7"],"playback":["3.28","13.28"],"aspect":["3.29","13.29"],"log":["3.32","13.32"],"use":["3.33","13.33"],"编写插件":["4.0"],"实例属性":["5.0"],"toggle":["5.3","15.3"],"forward":["5.6","15.6"],"backward":["5.7","15.7"],"url":["5.9","15.9","22.2","26.2"],"switch":["5.10","15.10"],"switchurl":["5.11","15.11"],"switchquality":["5.12","15.12"],"currenttime":["5.14","15.14"],"duration":["5.15","15.15"],"getdataurl":["5.17","15.17"],"getbloburl":["5.18","15.18"],"poster":["5.22","15.22","22.5","26.5"],"playing":["5.24","15.24"],"rect":["5.26","15.26"],"playbackrate":["5.28","15.28","22.15","26.15"],"attr":["5.31","15.31"],"type":["5.32","15.32","22.39","26.39"],"theme":["5.33","15.33","22.6","26.6"],"airplay":["5.34","15.34","22.48","26.48"],"loaded":["5.35","15.35"],"played":["5.36","15.36"],"proxy":["5.37","15.37","22.50","26.50"],"query":["5.38","15.38"],"cssvar":["5.40","15.40","22.49","26.49"],"quality":["5.41","15.41","22.32","26.32"],"thumbnails":["5.42","15.42","22.35","26.35"],"右键菜单":["6.0"],"配置":["6.1","7.1","8.1"],"创建":["6.2","7.2","8.2","9.2","9.3","9.4","9.5","9.6"],"添加":["6.3","7.3","8.3","9.7"],"删除":["6.4","7.4","8.4","9.8"],"更新":["6.5","7.5","8.5","9.9"],"控制器":["7.0"],"业务层":["8.0"],"设置面板":["9.0"],"内置":["9.1"],"advanced":["10.0"],"static":["11.0"],"example":["12.0"],"global":["13.0"],"writing":["14.0"],"instance":["15.0"],"context":["16.0"],"configuration":["16.1","17.1","18.1"],"creation":["16.2","17.2","18.2"],"add":["16.3","18.3","19.7","21.3"],"delete":["16.4","17.4","18.4","19.8"],"updates":["16.5","19.9"],"controller":["17.0"],"adding":["17.3"],"update":["17.5","18.5"],"settings":["19.0","22.29","26.29"],"built":["19.1"],"create":["19.2","19.3","19.5","19.6"],"creating":["19.4"],"installation":["20.0","20.1"],"cdn":["20.2","23.2","24.3"],"usage":["20.3"],"vue":["20.4","20.7","23.4","23.7"],"react":["20.5","20.8","23.5","23.8"],"typescript":["20.6","23.6"],"javascript":["20.10","23.10"],"ancient":["20.11"],"language":["21.0"],"default":["21.1"],"importing":["21.2"],"modify":["21.4"],"basic":["22.0"],"container":["22.1","26.1"],"id":["22.3","26.3"],"onready":["22.4","26.4"],"islive":["22.8","26.8"],"autoplay":["22.10","26.10"],"automini":["22.12","26.12"],"loop":["22.13","26.13"],"mutex":["22.21","26.21"],"miniprogressbar":["22.25","26.25"],"usessr":["22.26","26.26"],"playsinline":["22.27","26.27"],"highlight":["22.33","26.33"],"morevideoattr":["22.37","26.37"],"customtype":["22.40","26.40"],"lang":["22.41","26.41"],"gesture":["22.44","26.44"],"fastforward":["22.45","26.45"],"autoplayback":["22.46","26.46"],"autoorientation":["22.47","26.47"],"安装使用":["23.0"],"安装":["23.1","24.2"],"使用":["23.3"],"古老的浏览器":["23.11"],"弹幕库":["24.0"],"演示":["24.1"],"弹幕结构":["24.4"],"全部选项":["24.5"],"生命周期":["24.6"],"使用弹幕数组":["24.7"],"使用弹幕":["24.8"],"使用异步返回":["24.9"],"hide":["24.10"],"ishide":["24.11"],"emit":["24.12"],"load":["24.14"],"reset":["24.15"],"mount":["24.16"],"事件":["24.18"],"语言设置":["25.0"],"默认语言":["25.1"],"导入语言":["25.2"],"新增语言":["25.3"],"修改语言":["25.4"],"基础选项":["26.0"]},{"0":["3.28","5.35","5.36","22.7","26.7"],"1":["23.11","24.5"],"3":["3.29","23.9"],"4":["3.29","21.3","25.3"],"5":["3.28","8.2","18.2","24.5"],"7":["8.3","18.3","22.7"],"9":["25.3"],"10":["24.5"],"15":["4.0","14.0"],"21":["8.5","9.9","18.5","19.9"],"26":["7.5","17.5"],"27":["9.9","19.9"],"75":["3.28"],"250":["3.5"],"这里的":["0.0","1.0","3.0","5.0"],"播放器的选项":["0.1"],"div":["0.1","0.2","0.4","0.5","0.7","0.13","0.16","1.1","1.6","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.3","4.0","5.1","5.2","5.3","5.15","5.26","5.30","5.34","5.41","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","10.1","14.0","15.15","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.28","22.29","24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.28","26.29","26.30","26.31"],"classname":["0.1","0.2","0.16","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","4.0","5.41","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","14.0","15.15","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.28","22.29","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.28","26.29"],"run":["0.1","0.2","2.0","2.2","2.6","2.11","2.12","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","2.39","4.0","5.41","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","22.2","22.28","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.28","26.29"],"管理播放器所有的":["0.2","0.3","0.5"],"dom":["0.2","0.3","5.37","5.38","9.2","9.3","9.5","9.6","10.2","10.3","15.37","15.38","19.2","19.3","19.5","19.6","22.1","26.1"],"元素":["0.2","9.5","9.6"],"事件":["0.3","4.0"],"实质上是代理了":["0.3"],"addeventlistener":["0.3","5.37","10.3","15.37"],"和":["0.3","4.0","5.12","24.8","24.10","26.4"],"removeeventlistener":["0.3","10.3"],"当使用以下方法来处理事件":["0.3"],"播放器销毁时也会自动销毁该事件":["0.3"],"管理播放器的本地存储":["0.4"],"name":["0.4","4.0","10.4","17.1"],"属性用于设置缓存的":["0.4"],"key":["0.4","10.4"],"set":["0.4","10.4","13.6","13.7","15.10","15.11","15.12","15.13","15.14","15.19","15.20","15.21","15.22","15.27","15.28","15.29","22.35","22.36"],"方法用于设置缓存":["0.4"],"get":["0.4","0.6","10.6","15.14","15.15","15.19","15.21","15.22","15.24","15.31"],"方法用于获取缓存":["0.4"],"del":["0.4"],"方法用于删除缓存":["0.4"],"clear":["0.4"],"方法用于清空缓存":["0.4"],"svg":["0.5","10.5"],"图标":["0.5"],"管理播放器的":["0.6"],"方法用于获取":["0.6"],"的值":["0.6"],"update":["0.6","0.8","0.9","0.10","0.15"],"管理播放器的提示语":["0.7"],"只有一个":["0.7"],"show":["0.7","0.12","0.14","10.12","10.14","22.17","22.20","22.32","22.33","24.10"],"属性用于显示提示语":["0.7"],"管理播放器的层":["0.8"],"add":["0.8","0.9","0.10","0.13","0.15","0.16","10.8","10.9","10.10","10.13","10.15"],"方法用于动态添加层":["0.8"],"remove":["0.8","0.9","0.10","0.13","0.15"],"方法用于动态删除层":["0.8"],"管理播放器的控制器":["0.9"],"方法用于动态添加控制器":["0.9"],"方法用于动态删除控制器":["0.9"],"管理播放器的右键菜单":["0.10"],"方法用于动态添加菜单":["0.10"],"方法用于动态删除菜单":["0.10"],"方法用于动态更新菜单":["0.10"],"管理播放器的字幕功能":["0.11"],"url":["0.11","5.11","10.11"],"属性设置和返回当前字幕地址":["0.11"],"style":["0.11"],"方法设置当前字幕的样式":["0.11"],"switch":["0.11"],"管理播放器的加载层":["0.12"],"属性用于设置是否显示加载层":["0.12"],"toggle":["0.12","0.14","19.5"],"管理播放器的快捷键功能":["0.13"],"方法用于添加快捷键":["0.13"],"方法用于删除快捷键":["0.13"],"管理播放器的遮罩层":["0.14"],"属性用于设置是否显示遮罩层":["0.14"],"管理播放器的设置面板":["0.15"],"方法用于动态添加设置项":["0.15"],"方法用于动态删除设置项":["0.15"],"方法用于动态更新设置项":["0.15"],"管理播放器的插件功能":["0.16"],"只有一个方法":["0.16"],"用于动态添加插件":["0.16"],"返回全部播放器实例的数组":["1.1"],"假如你想同时管理多个播放器的时候":["1.1"],"可以用到该属性":["1.1"],"返回播放器的版本信息":["1.2"],"返回播放器的环境变量":["1.3"],"返回播放器的打包时间":["1.4"],"返回视频的默认配置":["1.5"],"返回播放器的工具函数集合":["1.6"],"返回播放器选项的校验方案":["1.7"],"返回事件分发器的构造函数":["1.8"],"返回选项的校验函数":["1.9"],"返回类型检测的函数工具":["1.10"],"返回播放器所需的":["1.11"],"返回播放器的默认选项":["1.12"],"播放器的事件分为两种":["2.0"],"一种视频的":["2.0"],"原生事件":["2.0"],"前缀":["2.0"],"video":["2.0","12.0","13.29","13.30","15.1","15.2","15.7","15.10","15.11","15.12","15.15","22.2","22.36","22.39","22.40"],"另外一种是":["2.0"],"自定义事件":["2.0"],"监听事件":["2.0"],"code":["2.0","2.2","2.28","4.0","6.2","6.3","6.4","6.5","7.2","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.4","9.7","9.8","9.9","14.0","16.2","16.3","16.4","16.5","17.2","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.4","19.7","19.8","19.9","20.1","20.2","20.3","20.4","20.5","22.2","22.28","23.1","23.2","23.3","23.4","23.5","24.2","24.3","24.6","24.7","24.9","24.11","24.12","24.13","24.14","24.15","24.17","24.18","26.2","26.28"],"js":["2.0","4.0","6.5","7.2","7.3","7.5","8.2","8.3","8.5","9.4","9.8","9.9","14.0","16.5","17.2","17.3","17.5","18.2","18.3","18.5","19.4","19.8","19.9","20.4","20.5","20.7","20.8","20.10","20.11","21.2","21.3","21.4","23.4","23.5","23.7","23.8","23.10","23.11","24.5","24.18","25.2","25.3","25.4"],"当播放器首次可以播放器时触发":["2.1"],"当播放器切换地址后并可以播放时触发":["2.2"],"当播放器暂停时触发":["2.3"],"当播放器播放时触发":["2.4"],"当播放器热键被按下时触发":["2.5"],"当播放器销毁时触发":["2.6"],"当播放器获得焦点时触发":["2.7"],"当播放器失去焦点时触发":["2.8"],"当播放器被双击时触发":["2.9"],"当播放器被单击时触发":["2.10"],"当播放器加载视频发生错误时触发":["2.11"],"当播放器被鼠标移出或者移入时触发":["2.12"],"当播放器被鼠标经过时触发":["2.13"],"当播放器尺寸变化时触发":["2.14"],"当播放器出现在视口时触发":["2.15"],"在移动端":["2.16","3.19","3.20","3.21","3.23","3.24","3.25"],"当锁定的状态发生变化时触发":["2.16"],"当播放器长宽比变化时触发":["2.17"],"当播放器自动设置高度时触发":["2.18"],"当播放器自动设置尺寸时触发":["2.19"],"当播放器发生翻转时触发":["2.20"],"当播放器发生窗口全屏时触发":["2.21"],"当播放器发生窗口全屏错误时触发":["2.22"],"当播放器发生网页全屏时触发":["2.23"],"当播放器进入迷你模式时触发":["2.24"],"当播放器进入画中画时触发":["2.25"],"当播放器被截图时触发":["2.26"],"当播放器发生时间跳转时触发":["2.27"],"当播放器发生字幕偏移时触发":["2.28"],"当字幕更新前触发":["2.29"],"当字幕更新后触发":["2.30"],"当字幕加载时触发":["2.31"],"当信息面板显示或隐藏时触发":["2.32"],"当自定义层显示或隐藏时触发":["2.33"],"当加载器显示或隐藏时触发":["2.34"],"当遮罩层显示或隐藏时触发":["2.35"],"当字幕层显示或隐藏时触发":["2.36"],"当右键菜单显示或隐藏时触发":["2.37"],"当控制器显示或隐藏时触发":["2.38"],"当设置面板显示或隐藏时触发":["2.39"],"当静音的状态变化时触发":["2.40"],"监听来自":["2.41"],"document":["2.41"],"的":["2.41"],"canplay":["2.42","12.42"],"canplaythrough":["2.43","12.43"],"complete":["2.44","12.44"],"durationchange":["2.45","12.45"],"emptied":["2.46","12.46"],"ended":["2.47","12.47"],"error":["2.48","12.48"],"loadeddata":["2.49","12.49"],"loadedmetadata":["2.50","12.50"],"pause":["2.51","12.51","13.20"],"play":["2.52","3.19","3.20","12.52","13.19","13.20","15.3","22.10"],"playing":["2.53","12.53"],"progress":["2.54","12.54","22.35"],"ratechange":["2.55","12.55"],"seeked":["2.56","12.56"],"seeking":["2.57","12.57"],"stalled":["2.58","12.58"],"suspend":["2.59","12.59"],"timeupdate":["2.60","12.60"],"volumechange":["2.61","12.61"],"waiting":["2.62","12.62"],"是否开始":["3.1"],"模式":["3.1"],"返回播放器样式文本":["3.2"],"是否开启右键菜单":["3.3"],"默认开启":["3.3"],"time":["3.4","3.8","3.9","3.14","3.15","3.16","3.17","3.21","3.22","3.24","13.4","13.8","13.9","13.14","13.15","13.16","13.17","13.21","13.22","13.24","22.24"],"提示信息的显示时长":["3.4"],"单位为毫秒":["3.4","3.8","3.9","3.13","3.16","3.17","3.22"],"width":["3.5","3.6","9.3","13.5","13.6","15.30"],"设置面板的默认宽度":["3.5"],"单位为像素":["3.5","3.6","3.7","3.10"],"默认为":["3.5","3.6","3.7","3.11","3.17","3.26","3.28","3.29","3.30","3.32","3.33"],"item":["3.6","3.7","13.6","13.7","19.2","19.3"],"设置面板的设置项的默认宽度":["3.6"],"height":["3.7","13.7"],"设置面板的设置项的默认高度":["3.7"],"事件的节流时间":["3.8","3.9"],"gap":["3.10","13.10"],"view":["3.10"],"事件的边界容差距离":["3.10"],"playback":["3.11","3.12","3.13","12.53","13.11","13.12","13.13","22.46"],"max":["3.11","3.14","13.11","13.14"],"自动回放功能的最大记录数":["3.11"],"min":["3.12","13.12"],"自动回放功能的最小记录时长":["3.12"],"单位为秒":["3.12","3.27"],"timeout":["3.13","13.13"],"自动回放功能的隐藏延迟时长":["3.13"],"发生连接错误时":["3.14","3.15"],"自动连接的最大次数":["3.14"],"sleep":["3.15","13.15"],"自动连接的延迟时间":["3.15"],"hide":["3.16","13.16"],"底部控制栏的自动隐藏的延迟时间":["3.16"],"双击事件的延迟事件":["3.17"],"fullscreen":["3.18","13.18"],"在桌面端":["3.18"],"是否双击切换全屏":["3.18"],"dbclick":["3.19","13.19"],"是否双击切换播放暂停":["3.19"],"click":["3.20","10.10","13.17","13.20"],"是否单击切换播放暂停":["3.20"],"orientation":["3.21","13.21"],"自动旋屏的延迟时间":["3.21"],"loop":["3.22","13.22"],"信息面板的刷新时间":["3.22"],"forward":["3.23","3.24","13.23","13.24"],"value":["3.23","13.23"],"长按加速的速率倍数":["3.23"],"长按加速的延迟时间":["3.24"],"move":["3.25","13.25"],"ratio":["3.25","3.29","12.17","13.25","13.26","13.29"],"左右滑动进度的速率倍数":["3.25"],"step":["3.26","3.27","13.26","13.27"],"快捷键调节音量的幅度比例":["3.26"],"快捷键调节播放进度的幅度":["3.27"],"rate":["3.28","13.28"],"内置播放速率的列表":["3.28"],"内置视频长宽比的列表":["3.29"],"default":["3.29","13.5","13.6","13.7","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.29","22.30","22.31","22.32","22.33","22.34","22.35","22.36","22.37","22.38","22.39","22.40","22.41","22.42","22.43","22.44","22.45","22.46","22.47","22.48","22.49","22.50","26.1","26.2","26.3","26.4","26.5","26.6","26.7","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.29","26.30","26.31","26.32","26.33","26.34","26.35","26.36","26.37","26.38","26.39","26.40","26.41","26.42","26.43","26.44","26.45","26.46","26.47","26.48","26.49","26.50"],"内置视频翻转的列表":["3.30"],"normal":["3.30"],"horizontal":["3.30"],"vertical":["3.30"],"web":["3.31","13.31"],"in":["3.31","10.3","13.24","13.28","13.29","13.30","13.31","19.1","21.2","22.39"],"body":["3.31","13.31"],"网页全屏时":["3.31"],"version":["3.32","13.32"],"设置是否打印播放器版本":["3.32"],"raf":["3.33","13.33"],"设置是否使用":["3.33"],"requestanimationframe":["3.33"],"但你已经知道播放器的":["4.0"],"属性":["4.0","6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.32","26.33","26.35","26.36"],"方法":["4.0"],"后":["4.0"],"再编写插件是非常简单的事":["4.0"],"可以在实例化的时候加载插件的函数":["4.0"],"function":["4.0","5.1","5.2","5.3","5.4","5.11","5.12","5.16","5.17","5.18","5.25","5.30","5.31","5.34","5.37","5.38","5.40","9.3","14.0","15.1","15.2","15.3","15.4","15.11","15.12","15.16","15.17","15.18","15.25","15.30","15.31","15.34","15.37","15.38","15.40","19.3","22.4","22.50","26.4","26.50"],"myplugin":["4.0"],"art":["4.0","5.11","7.2","15.11","17.2"],"console":["4.0"],"info":["4.0"],"return":["4.0"],"something":["4.0"],"type":["5.1","5.2","5.3","5.4","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.27","5.28","5.29","5.30","5.31","5.33","5.34","5.35","5.36","5.37","5.38","5.39","5.40","5.41","5.42","5.43","15.1","15.2","15.3","15.4","15.5","15.6","15.7","15.8","15.9","15.10","15.11","15.12","15.13","15.14","15.15","15.16","15.17","15.18","15.19","15.20","15.21","15.22","15.23","15.24","15.25","15.26","15.27","15.28","15.29","15.30","15.31","15.33","15.34","15.35","15.36","15.37","15.38","15.39","15.40","15.41","15.42","15.43","16.1","17.1","18.1","19.2","19.3","19.5","19.6","20.10","22.1","22.2","22.3","22.4","22.5","22.6","22.7","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.28","22.29","22.30","22.31","22.32","22.33","22.34","22.35","22.36","22.37","22.38","22.40","22.41","22.42","22.43","22.44","22.45","22.46","22.47","22.48","22.49","22.50","26.1","26.2","26.3","26.4","26.5","26.6","26.7","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.28","26.29","26.30","26.31","26.32","26.33","26.34","26.35","26.36","26.37","26.38","26.40","26.41","26.42","26.43","26.44","26.45","26.46","26.47","26.48","26.49","26.50"],"播放视频":["5.1"],"暂停视频":["5.2"],"切换视频的播放和暂停":["5.3"],"parameter":["5.4","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.19","5.20","5.21","5.22","5.23","5.24","5.27","5.28","5.29","5.31","5.32","5.33","5.41","5.42","5.43","15.4","15.5","15.6","15.7","15.8","15.9","15.10","15.11","15.12","15.13","15.14","15.19","15.20","15.21","15.22","15.23","15.24","15.27","15.28","15.29","15.31","15.32","15.33","15.41","15.42","15.43"],"boolean":["5.4","5.13","5.19","5.20","5.21","5.24","7.1","15.4","15.13","15.19","15.20","15.21","15.23","15.24","16.1","17.1","18.1","22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.19","22.20","22.21","22.22","22.23","22.24","22.25","22.26","22.27","22.43","22.44","22.45","22.46","22.47","22.48","26.8","26.9","26.10","26.11","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.19","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.43","26.44","26.45","26.46","26.47","26.48"],"setter":["5.5","5.6","5.7","5.8","5.9","5.10","5.13","5.14","5.19","5.20","5.21","5.22","5.23","5.27","5.28","5.29","5.32","5.33","5.41","5.42","5.43","15.5","15.6","15.7","15.8","15.9","15.10","15.13","15.14","15.19","15.20","15.21","15.22","15.23","15.27","15.28","15.29","15.32","15.33","15.41","15.42","15.43"],"number":["5.5","5.6","5.7","5.8","5.14","5.28","13.11","13.14","15.5","15.6","15.7","15.8","15.14","15.28","15.43","21.0","22.7","26.7"],"getter":["5.8","5.9","5.13","5.14","5.15","5.19","5.20","5.21","5.22","5.23","5.24","5.26","5.27","5.28","5.29","5.32","5.33","5.35","5.36","5.42","5.43","15.8","15.9","15.13","15.14","15.15","15.19","15.20","15.21","15.22","15.23","15.24","15.26","15.27","15.28","15.29","15.32","15.33","15.35","15.36","15.42","15.43"],"string":["5.10","5.11","5.12","5.22","5.27","5.29","5.31","5.32","5.33","9.2","9.3","9.5","9.6","15.9","15.10","15.11","15.12","15.22","15.27","15.29","15.31","15.32","15.33","17.1","19.2","19.3","19.5","19.6","22.1","22.2","22.3","22.5","22.6","22.39","22.41","26.1","26.2","26.3","26.5","26.6","26.39","26.41"],"设置视频地址":["5.10","5.11"],"设置时和":["5.10","5.11"],"设置视频画质地址":["5.12"],"获取视频时长":["5.15"],"下载当前视频帧的截图":["5.16"],"可选参数为截图名字":["5.16"],"获取当前视频帧的截图的":["5.17","5.18"],"base64":["5.17","15.17"],"地址":["5.17","5.18"],"blob":["5.18","15.18"],"设置和获取视频海报":["5.22"],"设置视频是否自适应尺寸":["5.25"],"获取播放器的尺寸和坐标信息":["5.26"],"当容器只有宽度":["5.30"],"该属性可以自动计算出并设置视频的高度":["5.30"],"动态获取和设置":["5.31"],"开启隔空播放":["5.34"],"视频缓存的比例":["5.35"],"范围是":["5.35","5.36"],"视频播放的比例":["5.36"],"事件的代理函数":["5.37"],"实质上代理了":["5.37"],"的查询函数":["5.38"],"element":["5.39","9.2","9.3","9.5","9.6","15.39","19.2","19.3","19.5","19.6","22.1","26.1"],"快捷返回播放器的":["5.39"],"动态获取或设置":["5.40"],"css":["5.40"],"变量":["5.40","23.10"],"array":["5.41","9.3","11.1","15.41","19.3","22.28","22.29","22.30","22.31","22.32","22.33","22.34","26.28","26.29","26.30","26.31","26.32","26.33","26.34"],"动态设置画质列表":["5.41"],"object":["5.42","15.42","22.35","22.36","22.37","22.38","22.40","22.42","22.49","26.35","26.36","26.37","26.38","26.40","26.42","26.49"],"类型":["6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.33","26.35","26.36"],"描述":["6.1","7.1","8.1","9.2","9.3","9.5","9.6","26.35"],"disable":["6.1","7.1","8.1","16.1","17.1","18.1"],"var":["7.2","9.4","17.2"],"new":["7.2","17.2"],"artplayer":["7.2","17.2","20.4","20.5","20.11","21.2","22.1","23.5","23.11","24.18","25.2","25.4","26.1"],"container":["7.2","15.30","17.2"],"须先打开设置面板":["9.1"],"然后自带四个内置项":["9.1"],"flip":["9.1"],"playbackrate":["9.1"],"按钮":["9.2"],"html":["9.2","9.3","9.5","9.6","19.2","19.3","19.5","19.6","20.3","23.3","26.38"],"元素的":["9.2","9.3","9.5","9.6"],"选择列表":["9.3"],"icon":["9.3","9.5","9.6","19.3","19.6"],"元素的图标":["9.3"],"selector":["9.3","19.3"],"元素列表":["9.3"],"onselect":["9.3","19.3"],"元素点击事件":["9.3"],"列表嵌套":["9.4"],"切换按钮":["9.5"],"范围滑块":["9.6"],"properties":["10.0","11.0","14.0","15.0"],"the":["10.0","10.1","10.2","10.3","10.4","10.5","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","12.0","12.1","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.30","12.31","12.32","12.36","12.37","12.38","12.39","12.40","12.41","12.42","12.43","12.46","12.58","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.14","13.15","13.23","13.24","13.25","13.26","13.27","13.28","14.0","15.3","15.4","15.10","15.11","15.15","15.17","15.18","15.19","15.26","15.30","15.35","15.36","15.41","17.1","19.1","19.6","20.9","20.10","20.11","21.0","21.1","22.1","22.2","22.3","22.4","22.5","22.7","22.11","22.17","22.32","22.33","22.35","22.36","22.39","22.40","22.46","22.50"],"options":["10.1","22.0"],"for":["10.1","10.3","10.8","13.8","13.9","15.37"],"player":["10.1","10.2","10.3","10.4","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16","11.1","12.0","12.1","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.12","12.14","12.15","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","14.0"],"manages":["10.2","10.3","10.4"],"all":["10.2","10.3","10.5","11.1"],"of":["10.2","10.4","10.8","10.10","10.11","10.12","10.13","11.1","11.6","13.5","13.28","13.29","13.30","15.35","15.36","15.41","20.11","21.0","22.5","22.11","22.39"],"elements":["10.2"],"which":["10.3","13.27","15.37","22.4","22.39","22.42"],"is":["10.3","10.4","10.6","10.8","10.9","10.10","10.13","10.15","12.0","12.1","12.12","14.0","20.11","22.39"],"essentially":["10.3","15.37"],"a":["10.3","10.15","11.6","12.5","12.33","12.34","12.35","15.16","15.37","15.39","22.4"],"proxy":["10.3"],"and":["10.3","10.11","14.0","15.14","15.19","15.21","15.22","15.26","20.0"],"local":["10.4"],"attribute":["10.4","15.30","19.6"],"used":["10.4","10.6","10.8","10.9","10.10","10.15","22.38","22.39","22.49"],"to":["10.4","10.6","10.9","10.15","12.41","13.1","13.3","13.20","13.24","13.32","13.33","15.11","15.38","16.1","17.1","18.1","22.10","22.15","22.17","22.19","22.26","22.32","22.38","22.39","22.46","22.47","22.49"],"cache":["10.4"],"method":["10.4","10.6","10.8","10.9","10.10","10.13","10.15"],"manage":["10.5","10.6","10.7","10.8","10.9","10.10","10.11","10.12","10.13","10.14","10.15","10.16"],"s":["10.6","10.7","10.9","10.14","10.15","10.16","12.0","14.0","19.5","19.6","22.40"],"notices":["10.7"],"there":["10.7"],"dynamically":["10.8","10.9","10.15","15.31","15.32","15.33","15.40","15.41"],"controllers":["10.9"],"right":["10.10","12.37"],"context":["10.10","22.30"],"menu":["10.10","16.0","22.30"],"features":["10.11","10.16"],"property":["10.11","10.14","16.1","17.1","18.1","19.2","19.3","19.5"],"sets":["10.11","15.8","15.25"],"layer":["10.12","10.14"],"functionality":["10.13"],"settings":["10.15","12.39","19.1","21.0"],"panel":["10.15","12.39","13.22","19.0","19.1","22.29"],"plugin":["10.16","14.0","24.18"],"with":["10.16","20.11"],"here":["11.0","13.0","15.0"],"returns":["11.1","11.2","11.3","11.4","11.5","11.6","11.7","11.8","11.9","11.10","11.11","11.12","13.2"],"an":["11.1","12.11","12.48"],"collection":["11.6"],"utility":["11.6"],"events":["12.0","14.0","15.37"],"are":["12.0","12.29","12.30","21.2"],"divided":["12.0"],"into":["12.0"],"two":["12.0"],"types":["12.0"],"one":["12.0"],"native":["12.0"],"prefix":["12.0"],"other":["12.0"],"custom":["12.0","12.33","22.28","22.29","22.30","22.31","22.34","22.42"],"triggered":["12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40"],"when":["12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","13.31","14.0","15.30"],"switches":["12.2"],"occurs":["12.11","12.28"],"mouse":["12.13"],"on":["12.16","13.18","13.19","13.20","13.21","13.23","13.25","22.33","22.35"],"mobile":["12.16","13.21","13.23","13.25"],"aspect":["12.17"],"automatically":["12.18","22.10","22.12"],"goes":["12.21","12.22"],"enters":["12.24","12.25"],"subtitle":["12.28","12.31","22.24"],"offset":["12.28"],"before":["12.29","21.2"],"subtitles":["12.29","12.30","22.36"],"updated":["12.29"],"loads":["12.31"],"information":["12.32","22.33"],"loader":["12.34"],"controller":["12.38"],"listen":["12.41"],"browser":["12.42"],"media":["12.46"],"content":["12.46"],"attributes":["13.0"],"whether":["13.1","13.3","13.18","13.19","13.20","13.32","13.33","15.25","16.1","17.1","18.1","22.10","22.14","22.15","22.17","22.19","22.26","22.32","22.43","22.45","22.46","22.47","22.48"],"start":["13.1"],"mode":["13.1"],"enable":["13.3"],"display":["13.4","22.18","22.22","22.23"],"duration":["13.4","13.12","13.13"],"throttle":["13.8","13.9"],"boundary":["13.10"],"tolerance":["13.10"],"distance":["13.10"],"maximum":["13.11","13.14"],"minimum":["13.12"],"delay":["13.13","13.15","13.16","13.17"],"auto":["13.16"],"double":["13.17"],"event":["13.17"],"desktop":["13.18"],"devices":["13.21"],"refresh":["13.22"],"milliseconds":["13.24"],"increment":["13.27"],"by":["13.27"],"list":["13.28","13.29","13.30","15.41","19.3"],"built":["13.28","13.29","13.30"],"flips":["13.30"],"setting":["13.32","13.33","15.11","15.40","15.41"],"plugins":["14.0"],"once":["14.0"],"you":["14.0","20.9"],"know":["14.0"],"methods":["14.0"],"very":["14.0"],"simple":["14.0"],"can":["14.0","15.30","20.9"],"load":["14.0"],"functions":["14.0"],"instantiated":["14.0"],"jump":["15.5"],"address":["15.11","15.17","15.18","22.2"],"similar":["15.11","15.38"],"quality":["15.12"],"download":["15.16"],"gets":["15.17","15.18","15.26"],"size":["15.26","22.11"],"has":["15.30"],"only":["15.30","20.11"],"this":["15.30"],"activate":["15.34"],"proportion":["15.35","15.36"],"proxies":["15.37"],"shortcut":["15.39"],"getting":["15.40"],"or":["15.40"],"description":["16.1","17.1","18.1","19.2","19.3","19.5","19.6"],"component":["17.1"],"first":["19.1"],"open":["19.1"],"button":["19.2","19.5"],"selection":["19.3","22.32"],"nested":["19.4"],"lists":["19.4"],"range":["19.6"],"slider":["19.6"],"group":["20.1","20.2","20.3","20.4","20.5","23.1","23.2","23.3","23.4","23.5","24.2","24.3"],"bash":["20.2","23.2","24.2","24.3"],"index":["20.3","23.3","24.18"],"head":["20.3"],"jsx":["20.5","20.8","23.5","23.8"],"import":["20.5","21.4","23.5","23.9","25.4"],"useeffect":["20.5","23.5"],"useref":["20.5","23.5"],"from":["20.5","21.4","23.5","25.4"],"importing":["20.6"],"also":["20.9"],"use":["20.9","22.8","22.19","22.26","22.46"],"sometimes":["20.10"],"your":["20.10"],"file":["20.10"],"may":["20.10"],"lose":["20.10"],"typescript":["20.10","23.10"],"hints":["20.10"],"browsers":["20.11"],"production":["20.11"],"build":["20.11"],"compatible":["20.11"],"danger":["21.0","25.0"],"given":["21.0"],"increasing":["21.0"],"bundled":["21.0"],"languages":["21.1","21.2"],"language":["21.2","21.3","21.4","22.41","26.41"],"files":["21.2"],"packaging":["21.2"],"located":["21.2"],"src":["21.2","25.2"],"i18n":["21.2","25.2"],"zhtw":["21.4","25.4"],"where":["22.1"],"source":["22.2"],"unique":["22.3"],"undefined":["22.4","22.50","26.4","26.50"],"constructor":["22.4"],"accepts":["22.4"],"as":["22.4"],"second":["22.4"],"argument":["22.4"],"f00":["22.6","26.6"],"false":["22.8","22.9","22.10","22.11","22.12","22.13","22.14","22.15","22.16","22.17","22.18","22.20","22.22","22.23","22.24","22.25","22.26","22.37","22.43","22.45","22.46","22.47","22.48","26.10","26.11","26.12","26.14","26.15","26.16","26.17","26.24","26.26","26.43","26.46","26.48"],"displays":["22.16"],"true":["22.19","22.21","22.27","22.44","26.19"],"hotkeys":["22.19"],"if":["22.21"],"mini":["22.25"],"ssr":["22.26","26.26"],"server":["22.26"],"initializes":["22.28","22.29","22.31"],"initialize":["22.30","22.34"],"bottom":["22.31"],"control":["22.31"],"bar":["22.35"],"supporting":["22.36"],"formats":["22.36"],"vtt":["22.36","26.36"],"srt":["22.36","26.36"],"controls":["22.37","26.37"],"preload":["22.37"],"replace":["22.38"],"specify":["22.39"],"format":["22.39"],"conjunction":["22.39"],"matches":["22.40"],"navigator":["22.41","26.41"],"configuration":["22.42"],"will":["22.42"],"be":["22.42"],"deeply":["22.42"],"merged":["22.42"],"automatic":["22.46"],"导入":["23.6"],"你也可以使用选项的类型":["23.9"],"ts":["23.9"],"有时你的":["23.10"],"文件会丢失":["23.10"],"的类型提示":["23.10"],"这时候你可以手动导入类型":["23.10"],"生产构建的":["23.11"],"只兼容最新一个主版本的":["23.11"],"chrome":["23.11"],"last":["23.11"],"查看完整演示":["24.1"],"jsdelivr":["24.3"],"每一个弹幕是一个对象":["24.4"],"多个弹幕组成的数组就是弹幕库":["24.4"],"通常只需要":["24.4"],"text":["24.4"],"只有":["24.5"],"danmuku":["24.5","24.18"],"是必须的参数":["24.5"],"其余都是非必填":["24.5"],"弹幕数据":["24.5"],"speed":["24.5"],"弹幕持续时间":["24.5"],"范围在":["24.5"],"margin":["24.5"],"来自用户输入的弹幕":["24.6"],"beforeemit":["24.6"],"filter":["24.6"],"beforevisible":["24.6"],"artplayerplugindanmuku":["24.6"],"visible":["24.6"],"来自服务器的弹幕":["24.6"],"xml":["24.8"],"弹幕":["24.8"],"文件":["24.8"],"data":["24.9","24.11","24.12","24.13","24.14","24.18"],"通过方法":["24.10","24.12","24.13"],"进行隐藏或者显示弹幕":["24.10"],"通过属性":["24.11"],"判断当前弹幕是隐藏或者显示":["24.11"],"发送一条实时弹幕":["24.12"],"libs":["24.12","24.13","24.14","24.18"],"实时改变弹幕配置":["24.13"],"uncompiled":["24.13","24.14","24.18"],"通过":["24.14"],"方法可以重载弹幕库":["24.14"],"或者切换新弹幕库":["24.14"],"或者追加新的弹幕库":["24.14"],"用于清空当前显示的弹幕":["24.15"],"在初始化弹幕插件的时候":["24.16"],"是可以指定弹幕发射器的挂载位置的":["24.16"],"默认是挂载在控制栏的中部":["24.16"],"你也可以把它挂载在播放器以外的地方":["24.16"],"当播放器全屏的时候":["24.16"],"发射器会自动回到控制栏的中部":["24.16"],"假如你挂载的地方是亮色的话":["24.16"],"建议把":["24.16"],"用于获取当前弹幕配置":["24.17"],"鉴于捆绑的多国语言越来越多":["25.0"],"从":["25.0"],"默认语言有":["25.1"],"en":["25.1"],"zh":["25.1"],"打包前的语言文件存放于":["25.2"],"欢迎来添加你的语言":["25.2"],"打包后的语言文件存放于":["25.2"],"dist":["25.2"],"播放器挂载的":["26.1"],"视频源地址":["26.2"],"播放器的唯一标识":["26.3"],"构造函数接受一个函数作为第二个参数":["26.4"],"播放器初始化成功且视频可以播放时触发":["26.4"],"ready":["26.4"],"视频的海报":["26.5"],"是否自动播放":["26.10"],"是否使用快捷键":["26.19"],"字幕时间偏移":["26.24"],"是否使用":["26.26"],"初始化自定义的":["26.28","26.29","26.30","26.34"],"层":["26.28"],"设置面板":["26.29"],"右键菜单":["26.30"],"初始化自定义的底部":["26.31"],"控制栏":["26.31"],"是否在底部控制栏里显示":["26.32"],"画质选择":["26.32"],"列表":["26.32"],"在进度条上显示":["26.33"],"高亮信息":["26.33"],"插件":["26.34"],"在进度条上设置":["26.35"],"预览图":["26.35"],"设置视频的字幕":["26.36"],"支持字幕格式":["26.36"],"ass":["26.36"],"用于替换默认图标":["26.38"],"支持":["26.38"],"用于指明视频的格式":["26.39"],"需要配合":["26.39"],"customtype":["26.39"],"通过视频的":["26.40"],"自定义":["26.42"],"配置":["26.42"],"该配置会和自带的":["26.42"],"进行深度合并":["26.42"],"新增你的语言":["26.42"],"是否使用自动":["26.46"],"回放功能":["26.46"],"用于改变内置的css变量":["26.49"]},{"0":["3.25","3.26","5.8","13.28","21.0","24.5","25.0"],"1":["3.26","3.28","5.8","5.35","5.36","13.28","20.11","21.0","23.10","25.0"],"2":["3.28","20.8","23.8"],"3":["3.23","13.29","20.9","22.2","23.10","26.2"],"4":["6.2","13.29","16.2","22.46","26.42"],"5":["3.12","3.14","3.25","3.27","13.28","21.0","22.28","22.29","25.0","26.28","26.29"],"6":["2.0","6.3","7.3","12.0","16.3","17.3"],"7":["15.15","26.7"],"8":["20.3"],"9":["3.29","9.7","13.29","19.7","21.3","26.42"],"10":["2.2","3.11","7.2","17.2"],"11":["2.28"],"13":["6.2","6.3","16.2","16.3"],"14":["9.7","19.7"],"16":["3.29","13.29"],"19":["5.41"],"21":["6.4","6.5","7.3","7.4","8.4","16.4","16.5","17.3","17.4","18.4"],"22":["8.2","8.3","9.8","18.2","18.3","19.8"],"23":["22.28","26.28"],"24":["6.5","16.5"],"25":["3.28","24.5"],"29":["5.41","8.5","18.5"],"34":["22.29","26.29"],"35":["3.7"],"40":["7.5","17.5"],"50":["3.10"],"75":["13.28"],"200":["3.6","3.8","3.9","3.21"],"300":["3.17"],"1000":["3.15","3.22","3.24"],"2000":["3.4"],"3000":["3.13","3.16"],"code":["0.1","0.2","0.4","0.5","0.6","0.7","0.12","0.13","0.14","0.15","0.16","1.1","1.6","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.3","3.5","3.6","3.7","3.17","3.29","3.30","5.1","5.2","5.3","5.11","5.13","5.15","5.16","5.19","5.20","5.21","5.22","5.24","5.25","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.40","5.41","5.42","9.3","10.1","10.2","12.0","12.20","12.29","12.30","12.31","13.20","15.1","15.2","15.11","15.15","15.19","15.34","15.40","15.41","19.3","22.1","22.7","22.10","22.19","22.29","22.30","22.31","22.34","22.42","22.46","24.10","24.16","25.2","26.1","26.4","26.10","26.19","26.29","26.30","26.31","26.34","26.38","26.42","26.46","26.49"],"js":["0.2","0.4","0.13","0.16","2.2","2.18","2.22","2.24","2.28","2.29","2.30","2.31","5.41","6.2","6.3","6.4","7.4","8.4","9.3","9.6","9.7","10.2","12.0","15.15","15.41","16.2","16.3","16.4","17.4","18.4","19.3","19.7","22.1","22.2","22.19","22.28","22.29","22.46","24.4","24.6","24.11","24.12","24.13","24.14","25.1","26.2","26.4","26.28","26.29","26.31","26.42"],"var":["0.2","0.4","2.0","4.0","5.41","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.2","8.3","8.4","8.5","9.3","9.7","9.8","9.9","10.2","12.0","14.0","15.15","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.2","18.3","18.4","18.5","19.3","19.4","19.7","19.8","19.9","21.3","22.2","22.28","22.29","24.13","24.14","24.18","25.3","25.4","26.2","26.28","26.29"],"proxy":["0.3"],"方法用于代理":["0.3"],"hover":["0.3"],"方法用于代理自定义的":["0.3"],"div":["0.3","0.6","0.8","0.9","0.10","0.12","0.14","0.15","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","2.41","3.1","3.2","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.17","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.29","3.30","3.32","3.33","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.14","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.27","5.28","5.29","5.31","5.32","5.33","5.37","5.39","5.40","5.42","5.43","9.1","9.3","10.2","10.5","11.6","12.0","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.34","12.38","12.39","12.40","12.41","13.20","13.30","15.1","15.2","15.7","15.11","15.19","15.21","15.26","15.30","15.34","15.40","15.41","15.42","15.43","19.3","20.4","22.1","22.7","22.10","22.19","22.30","22.31","22.34","22.38","22.42","22.46","23.4","24.8","24.16","26.1","26.3","26.4","26.5","26.7","26.8","26.9","26.10","26.13","26.17","26.19","26.21","26.25","26.34","26.38","26.42","26.44","26.45","26.46","26.49"],"classname":["0.4","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.13","0.14","0.15","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8","1.9","1.10","1.12","2.41","3.1","3.2","3.3","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.16","3.17","3.18","3.19","3.20","3.22","3.23","3.26","3.27","3.29","3.30","3.32","3.33","5.1","5.2","5.3","5.5","5.6","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.23","5.24","5.25","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.39","5.40","5.42","5.43","9.1","9.3","10.1","10.2","10.5","12.0","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.14","12.16","12.18","12.20","12.21","12.22","12.23","12.24","12.26","12.27","12.28","12.29","12.30","12.31","12.40","12.41","13.20","15.1","15.2","15.11","15.19","15.21","15.26","15.30","15.34","15.40","15.41","15.42","19.3","22.1","22.7","22.10","22.19","22.30","22.31","22.34","22.38","22.42","22.46","24.8","24.10","24.16","26.1","26.3","26.4","26.5","26.7","26.9","26.10","26.13","26.17","26.19","26.30","26.31","26.34","26.38","26.42","26.44","26.45","26.46","26.49"],"run":["0.4","0.5","0.6","0.7","0.10","0.12","0.13","0.14","0.15","0.16","1.1","1.6","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.3","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.17","3.22","3.29","3.30","3.32","5.1","5.2","5.3","5.7","5.9","5.11","5.13","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.24","5.25","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.40","5.42","5.43","9.1","9.3","10.1","10.2","10.5","12.0","12.6","12.7","12.8","12.10","12.20","12.24","12.28","12.29","12.30","12.31","13.20","15.1","15.2","15.11","15.15","15.19","15.21","15.30","15.34","15.40","15.41","19.3","22.1","22.7","22.10","22.19","22.29","22.30","22.31","22.34","22.42","22.46","24.8","24.10","24.16","26.1","26.4","26.5","26.7","26.10","26.19","26.30","26.31","26.34","26.38","26.42","26.46","26.49"],"art":["0.4","2.0","5.10","5.12","5.41","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.2","8.3","8.5","9.3","9.4","9.7","9.8","9.9","12.0","14.0","15.10","15.12","15.15","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.2","18.3","18.5","19.3","19.4","19.7","19.8","19.9","20.5","21.3","22.2","23.10","24.14","24.18","25.3","26.2"],"new":["0.4","2.0","4.0","6.2","6.3","6.4","6.5","7.3","7.4","7.5","8.3","9.3","9.4","9.7","9.8","9.9","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","18.3","19.3","19.4","19.7","19.8","19.9","20.5","22.2","24.14","24.18","25.3","26.2"],"artplayer":["0.4","2.0","4.0","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.4","9.8","9.9","12.0","14.0","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.4","19.8","19.9","20.3","20.6","21.4","22.2","23.3","23.4","23.6","23.9","23.10","24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17","26.2"],"container":["0.4","2.0","4.0","6.4","6.5","7.3","7.5","9.3","9.4","9.8","9.9","12.0","14.0","16.4","16.5","17.3","17.5","19.4","19.8","19.9","22.2","22.11","24.18","26.11"],"方法用于更新":["0.6"],"对象":["0.6"],"方法用于动态更新层":["0.8"],"show":["0.8","0.9","0.10","0.15","10.7","22.14","22.15"],"属性用于设置是否显示全部层":["0.8"],"toggle":["0.8","0.9","0.10","0.15","13.19","22.18"],"方法用于切换是否显示全部层":["0.8"],"方法用于动态更新控制器":["0.9"],"属性用于设置是否显示全部控制器":["0.9"],"方法用于切换是否显示全部控制器":["0.9"],"属性用于设置是否显示全部菜单":["0.10"],"方法用于切换是否显示全部菜单":["0.10"],"方法设置当前字幕地址和选项":["0.11"],"texttrack":["0.11"],"获取当前字幕轨":["0.11"],"activecues":["0.11"],"获取当前活跃的字幕列表":["0.11"],"cues":["0.11"],"属性用于切换是否显示加载层":["0.12"],"属性用于切换是否显示遮罩层":["0.14"],"属性用于设置是否显示全部设置项":["0.15"],"方法用于切换是否显示全部设置项":["0.15"],"字符串":["1.11"],"app":["2.0","4.0","7.2","7.5","9.3","9.4","9.8","9.9","12.0","14.0","17.2","17.5","19.4","19.8","19.9","22.2","24.18"],"url":["2.0","4.0","5.10","7.2","7.5","9.4","9.9","12.0","14.0","15.10","15.11","17.2","17.5","19.4","19.9","22.35","22.36","24.18","26.35","26.36"],"assets":["2.0","4.0","7.2","8.2","8.3","8.4","8.5","9.4","9.9","12.0","14.0","17.2","18.2","18.3","18.4","18.5","19.4","19.9","22.2","22.28","24.18","26.28"],"sample":["2.0","4.0","7.2","8.2","8.3","8.4","8.5","9.4","9.9","14.0","17.2","18.2","18.3","18.4","18.5","19.4","19.9","22.2","22.28","24.18","26.28"],"mp4":["2.0","4.0","7.2","14.0","17.2","24.18"],"on":["2.0","4.0","12.5","14.0","22.21","22.22","22.23","22.47"],"canplay":["2.0"],"事件":["2.41"],"浏览器可以播放媒体文件了":["2.42"],"浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束":["2.43"],"offlineaudiocontext":["2.44","12.44"],"duration":["2.45"],"媒体内容变为空":["2.46"],"例如":["2.46"],"视频停止播放":["2.47"],"获取媒体数据时出错":["2.48"],"media":["2.49","12.42","12.59"],"已加载元数据":["2.50"],"播放已暂停":["2.51"],"播放已开始":["2.52"],"由于缺乏数据而暂停或延迟后":["2.53"],"在浏览器加载资源时周期性触发":["2.54"],"播放速率发生变化":["2.55"],"跳帧":["2.56","2.57"],"用户代理":["2.58"],"媒体数据加载已暂停":["2.59"],"currenttime":["2.60"],"音量发生变化":["2.61"],"由于暂时缺少数据":["2.62"],"可以打印出视频全部的内置事件":["3.1"],"默认关闭":["3.1"],"默认为":["3.4","3.8","3.9","3.10","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.27","3.31","5.4"],"单位为毫秒":["3.15","3.21","3.24"],"true":["3.18","3.19","3.32","5.4","26.21","26.27","26.44"],"false":["3.20","3.31","3.33","13.20","13.33","26.8","26.9","26.13","26.18","26.20","26.22","26.23","26.25","26.37","26.45","26.47"],"是否把播放器挂在在":["3.31"],"元素下":["3.31"],"目前主要用于进度条的平滑效果":["3.33"],"dosomething":["4.0","14.0"],"video":["4.0","5.31","5.35","5.36","7.2","9.4","9.9","14.0","15.3","15.6","15.8","15.9","15.13","15.14","15.16","15.17","15.18","15.22","15.24","15.25","15.30","15.31","15.32","15.35","15.36","17.2","19.4","19.9","22.4","22.5","22.14","22.16","22.37","24.18","26.40"],"plugins":["4.0"],"ready":["4.0","12.53","14.0","22.4"],"可以在实例化之后再加载插件的函数":["4.0"],"销毁播放器":["5.4"],"接受一个参数表示是否销毁后同时移除播放器的":["5.4"],"html":["5.4","22.38","26.26","26.32"],"视频时间跳转":["5.5"],"单位秒":["5.5","5.6","5.7","26.33"],"视频时间快进":["5.6"],"视频时间快退":["5.7"],"设置和获取视频音量":["5.8"],"范围在":["5.8","26.24"],"string":["5.9","6.1","7.1","8.1","11.11","16.1","18.1","22.35","22.36","26.32","26.33","26.35","26.36"],"设置和获取视频地址":["5.9"],"类似":["5.10","5.11","5.12","5.14","5.38"],"但会执行一些优化操作":["5.10","5.11"],"switchurl":["5.12","15.12"],"但会带上之前的播放进度":["5.12"],"设置和获取视频是否静音":["5.13"],"设置和获取视频当前时间":["5.14"],"设置时间时和":["5.14"],"seek":["5.14"],"但它不会触发额外的事件":["5.14"],"返回的是一个":["5.17","5.18"],"promise":["5.17","5.18"],"设置和获取播放器窗口全屏":["5.19"],"设置和获取播放器网页全屏":["5.20"],"设置和获取播放器画中画模式":["5.21"],"只有在视频播放前才能看到海报效果":["5.22"],"boolean":["5.23","6.1","8.1","9.5","19.5","26.32"],"设置和获取播放器迷你模式":["5.23"],"获取视频是否正在播放中":["5.24"],"设置和获取播放器翻转":["5.27"],"支持":["5.27"],"normal":["5.27","13.30"],"horizontal":["5.27","13.30"],"vertical":["5.27","13.30"],"设置和获取播放器播放速度":["5.28"],"设置和获取播放器长宽比":["5.29"],"元素的属性":["5.31"],"动态获取和设置视频类型":["5.32"],"动态获取和设置播放器主题颜色":["5.33"],"常配合":["5.35","5.36"],"timeupdate":["5.35","5.36"],"事件使用":["5.35","5.36"],"和":["5.37","26.6","26.14","26.15","26.16"],"removeeventlistener":["5.37","15.37"],"当使用":["5.37"],"来处理事件":["5.37"],"播放器销毁时也会自动销毁该事件":["5.37"],"document":["5.38","12.41","15.38"],"queryselector":["5.38","15.38"],"但被查询的对象局限于当前播放器内":["5.38"],"可以避免同类名的错误":["5.38"],"元素":["5.39"],"动态设置缩略图":["5.42"],"number":["5.43","9.2","9.3","17.1","19.3","22.33","22.35","26.33","26.35"],"动态设置字幕偏移":["5.43"],"是否禁用组件":["6.1","7.1","8.1"],"name":["6.1","7.1","7.2","8.1","14.0","16.1","17.2","18.1","22.36","26.36"],"组件唯一名称":["7.1"],"用于标记类名":["7.1"],"index":["7.1","7.2","17.1","17.2","24.6","24.9","24.11","24.12","24.13","24.14"],"controls":["7.2","17.2"],"your":["7.2","17.2","21.2","22.42"],"button":["7.2","17.2","22.17","22.18","22.22","22.23","22.43","22.48"],"img":["8.2","8.3","8.4","8.5","18.2","18.3","18.4","18.5","22.28","26.28"],"layer":["8.2","8.3","8.4","8.5","12.35","12.36","18.2","18.3","18.4","18.5","22.28"],"png":["8.2","8.3","8.5","18.2","18.3","18.5"],"aspectratio":["9.1"],"subtitleoffset":["9.1"],"icon":["9.2","19.2","19.5"],"元素的图标":["9.2","9.5","9.6"],"onclick":["9.2","19.2"],"function":["9.2","9.5","9.6","11.9","11.10","19.2","19.6","20.5","22.45","23.5","24.6"],"元素点击事件":["9.2"],"width":["9.2","19.2","19.3"],"列表宽度":["9.3"],"tooltip":["9.3","9.5","9.6","19.3"],"提示文本":["9.3","9.6"],"switch":["9.5","13.18","19.5","22.20"],"按钮默认状态":["9.5"],"onswitch":["9.5"],"按钮切换事件":["9.5"],"range":["9.6","22.24"],"array":["9.6","19.6"],"默认状态数组":["9.6"],"onrange":["9.6","19.6"],"完成时触发的事件":["9.6"],"onchange":["9.6"],"变化时触发的事件":["9.6"],"here":["10.0"],"when":["10.3","11.1","13.14","13.15","13.23","13.24","15.37","22.4","22.5","22.12","22.25"],"using":["10.3","15.37"],"following":["10.3"],"methods":["10.3"],"to":["10.3","10.7","10.10","10.12","10.13","10.14","10.16","12.0","12.1","12.2","13.0","13.5","13.18","13.19","13.30","13.31","15.5","15.10","15.12","15.37","15.39","21.2","22.4","22.9","22.13","22.14","22.27","22.40","22.43","22.44","22.45","22.48"],"handle":["10.3","15.37"],"event":["10.3","12.41","13.8","13.9","13.10","15.37","19.2","19.3","19.6"],"will":["10.3","15.11","15.37","22.8","22.11","22.17"],"also":["10.3"],"be":["10.3","15.11"],"automatically":["10.3","12.19","15.30","15.37"],"destroyed":["10.3","12.6"],"get":["10.4","15.13","15.20","15.23","15.27","15.28","15.29","15.32","15.33"],"del":["10.4"],"of":["10.5","10.6","11.2","11.3","11.4","11.5","12.17","13.4","13.6","13.7","13.11","13.14","13.23","13.25","13.26","15.3","15.14","15.16","15.17","15.18","15.26","15.28","15.29","15.30","15.31","16.1","17.1","18.1","22.3","22.7","22.15"],"player":["10.5","11.6","11.12","12.5","12.11","12.13","12.17","12.28","13.2","13.31","13.32","15.4","15.19","15.20","15.21","15.23","15.26","15.27","15.33","20.5","22.1","22.3","22.4","22.6","22.7","22.11","22.47","23.5"],"retrieve":["10.6","15.9"],"value":["10.6"],"update":["10.6","10.8","10.9","10.15"],"only":["10.7","10.16","15.22","22.5","22.25"],"one":["10.7","10.16"],"property":["10.7","10.12","11.1","22.32","22.33","22.35","22.36"],"used":["10.7","10.12","10.13","10.14","22.6"],"display":["10.7","10.12","10.14","22.41","22.43","22.48"],"adding":["10.8"],"remove":["10.8","10.9","10.10","10.13","10.15"],"removing":["10.8"],"dynamically":["10.10","10.16","15.42","15.43"],"items":["10.10","13.6","13.7"],"returns":["10.11"],"current":["10.11","15.14","15.16","15.17","15.18"],"address":["10.11","12.2","15.9","15.10","15.12"],"style":["10.11"],"method":["10.11","10.16"],"is":["10.12","10.14","12.2","12.3","12.5","12.6","12.9","12.10","12.11","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.53","13.20","13.24","13.27","13.29","13.33","15.10","15.13","15.22","15.24","15.35","22.4","22.24"],"set":["10.12","10.14","15.9","15.23","15.30","15.31","15.32","15.33","15.42","15.43"],"whether":["10.12","10.14","13.31","15.4","15.13","15.24","22.9","22.13","22.27","22.44"],"a":["10.13","12.26","12.56","12.57","15.4","15.5","22.40","22.43","22.50"],"item":["10.15"],"add":["10.16","21.2","22.42","22.45"],"refer":["11.0","13.0"],"you":["11.1","20.10","20.11","21.2","22.26"],"can":["11.1","12.42","13.1","20.10","22.50"],"use":["11.1","22.27"],"this":["11.1","20.10"],"information":["11.2","15.26"],"environment":["11.3"],"variables":["11.3","15.40","20.10","22.49"],"time":["11.4","12.27","15.5","15.6","15.7","15.14","22.33","26.33"],"default":["11.5","13.17","13.20","13.22","13.24","13.28","13.29","13.33","19.5","19.6","20.5","23.5"],"configuration":["11.5"],"functions":["11.6"],"for":["11.6","11.7","11.8","11.10","12.1","12.46","13.10","13.11","13.12","13.13","13.15","13.16","13.21","17.1","20.11","22.18"],"the":["11.6","12.5","12.11","12.47","12.49","12.55","12.60","13.0","13.16","13.21","13.31","13.32","13.33","15.6","15.8","15.9","15.13","15.14","15.16","15.20","15.21","15.22","15.23","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.38","15.39","16.1","18.1","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.24","22.42","22.47","22.48"],"validation":["11.7","11.9"],"constructor":["11.8"],"tool":["11.10"],"required":["11.11"],"s":["11.12","15.33"],"listening":["12.0"],"able":["12.1","12.2"],"play":["12.1","12.2","12.42","22.4"],"and":["12.2","15.3","15.8","15.9","15.13","15.20","15.23","15.27","15.28","15.29","15.30","15.31","15.32","15.33","15.37","19.1","22.4","22.17","22.38"],"paused":["12.3"],"starts":["12.4"],"playing":["12.4"],"pressed":["12.5"],"gains":["12.7"],"loses":["12.8"],"focus":["12.8"],"double":["12.9","13.24"],"clicked":["12.9","12.10"],"while":["12.11"],"loading":["12.11"],"hovered":["12.12"],"or":["12.12","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"unhovered":["12.12"],"by":["12.12","13.28","22.9","22.11","22.39"],"moves":["12.13"],"over":["12.13"],"size":["12.14","12.19"],"changes":["12.14","12.16","12.17","12.40"],"appears":["12.15","22.5","22.25"],"in":["12.15","12.25","12.27","12.28","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.12","13.17","13.22","15.5","15.7","15.21","20.10","22.17","22.20","22.32","22.42","22.49"],"viewport":["12.15"],"locked":["12.16"],"state":["12.16","12.40","15.3","19.5","19.6"],"sets":["12.18","12.19"],"height":["12.18","15.30"],"flips":["12.20"],"into":["12.21","12.22"],"full":["12.21","12.22"],"screen":["12.21","12.22"],"error":["12.22"],"enters":["12.23"],"web":["12.23","15.20","22.23","22.47"],"fullscreen":["12.23","22.23"],"mode":["12.24","12.25","15.21","22.8","22.12","22.26","22.27","24.5"],"picture":["12.25","15.21","22.20"],"takes":["12.26"],"jumps":["12.27"],"updated":["12.30"],"panel":["12.32","13.5","13.6","13.7"],"shown":["12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39"],"hidden":["12.32","12.33","12.34","12.35","12.36","12.38","12.39"],"click":["12.37","13.3","19.2","19.3"],"menu":["12.37","13.3"],"from":["12.41","15.35","15.36","21.0","23.9","25.2"],"browser":["12.43"],"estimates":["12.43"],"triggered":["12.45","19.6","22.4"],"becomes":["12.46"],"empty":["12.46"],"example":["12.46"],"occurred":["12.48"],"metadata":["12.50","22.37","26.37"],"playback":["12.51","12.52","12.62","13.27","15.28","22.15"],"periodically":["12.54"],"user":["12.58"],"agent":["12.58"],"volume":["12.61"],"which":["13.1","15.8","15.10","22.5","22.8"],"print":["13.1","13.32"],"out":["13.1"],"all":["13.1"],"built":["13.1","22.42","22.49"],"right":["13.3"],"context":["13.3","22.17"],"notification":["13.4"],"message":["13.4"],"settings":["13.5","13.6","13.7"],"pixels":["13.5","13.10"],"defaults":["13.5","13.8","13.9","13.30"],"milliseconds":["13.8","13.9","13.17","13.22"],"view":["13.10"],"records":["13.11"],"automatic":["13.11","13.14","13.15"],"feature":["13.12","13.13","22.14","22.15","22.16","22.46"],"hiding":["13.13"],"reconnection":["13.14","13.15"],"attempts":["13.14"],"attempt":["13.15"],"bottom":["13.16","22.32"],"measured":["13.17"],"pause":["13.19","15.3"],"single":["13.20"],"delay":["13.21"],"rotation":["13.21"],"unit":["13.22"],"multiplier":["13.23"],"rate":["13.23"],"speed":["13.23","13.25","15.28","22.15"],"tapped":["13.24"],"sliding":["13.25"],"adjusting":["13.26"],"with":["13.26","19.1","22.39","22.42"],"shortcuts":["13.26"],"progress":["13.27","22.25","22.33"],"adjusted":["13.27"],"via":["13.27"],"speeds":["13.28"],"ratios":["13.29"],"mount":["13.31","22.26"],"requestanimationframe":["13.33"],"currently":["13.33","15.24","22.3","22.6","22.41"],"myplugin":["14.0"],"console":["14.0"],"info":["14.0"],"return":["14.0","15.39","22.50"],"something":["14.0"],"accepts":["15.4"],"indicating":["15.4"],"specific":["15.5"],"fast":["15.6","22.45"],"rewind":["15.7"],"seconds":["15.7"],"gets":["15.8"],"ranges":["15.8"],"similar":["15.10","15.12"],"but":["15.11","15.12","15.38"],"some":["15.11"],"optimization":["15.11"],"operations":["15.11"],"executed":["15.11"],"it":["15.12","19.1","22.16","22.17"],"setting":["15.14"],"frame":["15.16"],"optional":["15.16"],"screenshot":["15.17","15.18"],"window":["15.19","22.22"],"page":["15.20"],"effect":["15.22"],"visible":["15.22"],"should":["15.25"],"auto":["15.25"],"adjust":["15.25"],"position":["15.26"],"supports":["15.27","22.38","22.41"],"aspect":["15.29","22.16"],"ratio":["15.29","22.16"],"calculate":["15.30"],"attributes":["15.31","22.37"],"that":["15.35","15.36"],"cached":["15.35"],"ranging":["15.35","15.36"],"has":["15.36"],"been":["15.36"],"object":["15.38"],"being":["15.38"],"queried":["15.38"],"css":["15.40","22.49"],"qualities":["15.41"],"subtitle":["15.43"],"offset":["15.43","22.24"],"component":["16.1","18.1"],"unique":["16.1","17.1","18.1"],"class":["17.1"],"identification":["17.1"],"then":["19.1"],"comes":["19.1"],"four":["19.1"],"text":["19.3","26.33"],"upon":["19.6"],"usage":["20.0"],"bash":["20.1","23.1"],"npm":["20.1","23.1","24.2"],"jsdelivr":["20.2","23.2"],"net":["20.2","23.2","24.3"],"https":["20.2","23.2","24.3"],"title":["20.3","23.3"],"demo":["20.3"],"meta":["20.3"],"charset":["20.3"],"utf":["20.3"],"template":["20.4","23.4"],"ref":["20.4"],"artref":["20.4","20.5","23.5"],"export":["20.5","23.5"],"option":["20.5","23.5"],"getinstance":["20.5","23.5"],"rest":["20.5","23.5"],"const":["20.5","23.5","23.9"],"import":["20.8","20.9","20.10","23.8","23.10","25.2"],"type":["20.9","23.10"],"ts":["20.9","26.39"],"case":["20.10"],"manually":["20.10"],"types":["20.10"],"latest":["20.11"],"major":["20.11"],"version":["20.11","21.0","23.11"],"chrome":["20.11"],"last":["20.11"],"multilingual":["21.0"],"packs":["21.0"],"starting":["21.0"],"are":["21.1","22.21"],"en":["21.1","26.41"],"zh":["21.1","21.4","25.4","26.41"],"cn":["21.1","25.1"],"welcome":["21.2"],"packaged":["21.2"],"at":["21.2"],"i18n":["21.4","25.4"],"tw":["21.4","25.4"],"mounts":["22.1"],"identifier":["22.3"],"successfully":["22.4"],"initialized":["22.4"],"color":["22.6","24.5"],"live":["22.8"],"hide":["22.8"],"mute":["22.9"],"fill":["22.11"],"entire":["22.11"],"enter":["22.12"],"mini":["22.12"],"appear":["22.17"],"toolbar":["22.17"],"there":["22.21"],"multiple":["22.21"],"players":["22.21"],"5s":["22.24","26.24"],"bar":["22.25","22.31","22.32","22.33"],"side":["22.26"],"rendering":["22.26"],"useful":["22.26"],"if":["22.26"],"want":["22.26"],"list":["22.32"],"control":["22.32"],"description":["22.32","22.33","22.35","22.36"],"thumbnail":["22.35"],"ass":["22.36"],"additional":["22.37"],"these":["22.37"],"strings":["22.38"],"htmlelement":["22.38","26.38"],"customtype":["22.39"],"same":["22.39"],"as":["22.39"],"file":["22.39"],"extension":["22.39"],"delegate":["22.40"],"decoding":["22.40"],"third":["22.40","22.50"],"tolowercase":["22.41","26.41"],"language":["22.42"],"enable":["22.44"],"events":["22.44"],"forward":["22.45"],"rotate":["22.47"],"mobile":["22.47"],"change":["22.49"],"party":["22.50"],"htmlcanvaselement":["22.50","26.50"],"head":["23.3"],"let":["23.10"],"null":["23.10"],"参数":["23.10"],"对于古老的浏览器":["23.11"],"可以使用":["23.11"],"legacy":["23.11"],"文件":["23.11"],"install":["24.2"],"就可以发送一个弹幕":["24.4"],"其余都是非必要参数":["24.4"],"弹幕文本":["24.4"],"弹幕上下边距":["24.5"],"支持像素数字和百分比":["24.5"],"opacity":["24.5"],"弹幕透明度":["24.5"],"ffffff":["24.5"],"默认弹幕颜色":["24.5"],"可以被单独弹幕项覆盖":["24.5"],"data":["24.6","24.7","24.10","24.15","24.17"],"libs":["24.6","24.7","24.9","24.10","24.11","24.15","24.17"],"uncompiled":["24.6","24.7","24.9","24.10","24.11","24.12","24.15","24.17"],"plugin":["24.6","24.7","24.9","24.10","24.11","24.12","24.13","24.14","24.15","24.17"],"danmuku":["24.6","24.9","24.11","24.12","24.13","24.14","24.15","24.17"],"保存到数据库":["24.6"],"savedanmu":["24.6"],"bilibili":["24.8"],"网站的弹幕格式一致":["24.8"],"theme":["24.16"],"设置成":["24.16"],"light":["24.16"],"否则会看不清":["24.16"],"无需手动导入":["25.1"],"group":["25.2"],"id":["25.2"],"容器":["26.1"],"目前只用于记忆播放":["26.3"],"autoplayback":["26.3"],"事件一样":["26.4"],"只会出现在播放器初始化且未播放的状态下":["26.5"],"播放器主题颜色":["26.6"],"目前用于":["26.6"],"进度条":["26.6"],"播放器的默认音量":["26.7"],"使用直播模式":["26.8"],"会隐藏进度条和播放时间":["26.8"],"是否默认静音":["26.9"],"播放器的尺寸默认会填充整个":["26.11"],"容器尺寸":["26.11"],"所以经常出现黑边":["26.11"],"该值能自动调整播放器尺寸以隐藏黑边":["26.11"],"当播放器滚动到浏览器视口以外时":["26.12"],"自动进入":["26.12"],"迷你播放":["26.12"],"模式":["26.12","26.27"],"是否循环播放":["26.13"],"是否显示视频翻转功能":["26.14"],"目前只出现在":["26.14"],"设置面板":["26.14","26.15","26.16","26.18","26.24"],"右键菜单":["26.14","26.15","26.16"],"是否显示视频播放速度功能":["26.15"],"会出现在":["26.15","26.16"],"是否显示视频长宽比功能":["26.16"],"是否在底部控制栏里显示":["26.17","26.18","26.20"],"视频截图":["26.17"],"功能":["26.17"],"的开关按钮":["26.18","26.20"],"画中画":["26.20"],"假如页面里同时存在多个播放器":["26.21"],"是否只能让一个播放器播放":["26.21"],"是否在底部控制栏里显示播放器":["26.22","26.23"],"窗口全屏":["26.22"],"按钮":["26.22","26.23","26.48"],"网页全屏":["26.23"],"出现在":["26.24"],"迷你进度条":["26.25"],"只在播放器失去焦点后且正在播放时出现":["26.25"],"挂载模式":["26.26"],"假如你希望在播放器挂载前":["26.26"],"就提前渲染好播放器所需的":["26.26"],"时有用":["26.26"],"你可以通过":["26.26"],"在移动端是否使用":["26.27"],"类型":["26.32"],"描述":["26.32","26.33","26.36"],"默认画质":["26.32"],"画质名字":["26.32"],"高亮时间":["26.33"],"高亮文本":["26.33"],"预览图地址":["26.35"],"预览图数量":["26.35"],"column":["26.35"],"字幕名字":["26.36"],"字幕地址":["26.36"],"字幕类型":["26.36"],"可选":["26.36"],"preload":["26.37"],"更多视频属性":["26.37"],"这些属性将直接写入视频元素里":["26.37"],"字符串和":["26.38"],"一起使用":["26.39"],"默认视频的格式就是视频地址的后缀":["26.39"],"如":["26.39"],"m3u8":["26.39"],"mkv":["26.39"],"但有时候视频地地址没有正确的后缀":["26.39"],"进行匹配":["26.40"],"把视频解码权交给第三方程序进行处理":["26.40"],"处理的函数能接收三个参数":["26.40"],"视频":["26.40"],"dom":["26.40"],"默认显示语言":["26.41"],"目前支持":["26.41"],"是否在移动端显示一个":["26.43"],"锁定按钮":["26.43"],"用于隐藏底部":["26.43"],"控制栏":["26.43"],"是否在移动端启用视频元素上的手势事件":["26.44"],"是否在移动端添加长按视频快进功能":["26.45"],"是否在移动端的网页全屏时":["26.47"],"根据视频尺寸和视口尺寸":["26.47"],"旋转播放器":["26.47"],"是否显示":["26.48"],"当前只有部分浏览器支持该功能":["26.48"],"函数可以返回一个第三方的":["26.50"],"或者":["26.50"],"htmlvideoelement":["26.50"],"例如可以代理一个已经存在的":["26.50"]},{"0":["9.6","13.26","15.8","15.35","15.36"],"1":["9.6","13.26","15.8","15.35","15.36","19.6","20.10"],"2":["13.28","22.1","24.5","26.1"],"3":["20.7","20.10","23.7"],"4":["22.7","22.10","22.19","22.30","22.31","22.38","22.42","25.1","26.10","26.19","26.30","26.31","26.38","26.46","26.49"],"5":["9.6","13.12","19.6","22.46","26.46"],"6":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40"],"7":["2.19","2.21","2.23","2.25","2.26","5.15","5.26","5.30","15.30","22.4","22.38","26.4","26.38"],"8":["2.17","2.20","5.1","5.13","5.20","5.28","5.29","5.31","5.32","5.33","5.40","12.20","15.40"],"9":["2.29","2.30","2.31","5.11","5.19","5.21","5.22","5.34","12.29","12.30","12.31","15.11","15.19","15.21","15.34","22.4","22.42","26.4"],"10":["2.6","2.18","2.24","7.5","9.6","12.24","13.11","13.24","17.5","24.4"],"11":["5.2","5.3","5.20","5.30","12.28","15.2","15.30","23.11"],"12":["22.30","26.30"],"15":["22.34","26.34"],"16":["22.31","26.31"],"17":["4.0"],"19":["15.41"],"25":["13.28"],"29":["15.41"],"35":["13.7"],"50":["13.10"],"200":["13.6","13.8","13.9","13.21"],"250":["9.3","13.5","19.3"],"300":["13.17"],"1000":["13.22","24.6"],"2000":["13.4"],"是指挂载在":["0.0","1.0","5.0"],"js":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.14","0.15","1.1","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.3","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","3.30","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.11","5.12","5.13","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.22","5.24","5.25","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.37","5.40","5.42","5.43","9.1","9.5","10.1","10.4","10.5","10.6","10.13","12.6","12.18","12.20","12.24","12.28","12.29","12.30","12.31","13.20","15.1","15.2","15.11","15.19","15.21","15.26","15.30","15.34","15.40","15.42","19.6","21.0","22.4","22.7","22.10","22.30","22.31","22.34","22.38","22.42","24.7","24.9","24.10","24.15","24.16","24.17","25.0","26.1","26.7","26.10","26.19","26.30","26.33","26.34","26.38","26.46","26.49"],"var":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.13","0.14","0.15","0.16","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","5.2","5.3","5.11","5.13","5.15","5.19","5.21","5.22","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.40","5.42","9.5","10.1","10.5","12.29","12.30","12.31","13.20","15.2","15.11","15.19","15.21","15.30","15.40","15.41","21.4","22.1","22.7","22.10","22.19","22.30","22.31","22.42","22.46","24.6","24.9","24.10","24.11","24.12","25.1","26.1","26.4","26.10","26.19","26.30","26.31","26.38","26.42","26.46"],"art":["0.1","0.2","0.5","0.6","0.7","0.10","0.13","0.15","0.16","2.2","2.6","2.11","2.12","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","2.39","5.15","5.19","5.21","5.22","5.26","5.30","5.40","8.4","9.5","10.1","10.2","12.31","13.20","15.19","15.21","15.30","15.40","15.41","18.4","20.10","21.4","22.1","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.46","23.5","24.6","24.11","24.12","24.13","25.1","25.4","26.1","26.4","26.19","26.28","26.29","26.30","26.31","26.34","26.38","26.40","26.42","26.46"],"new":["0.1","0.2","0.6","0.7","0.13","0.15","0.16","2.2","2.6","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.11","5.22","5.40","5.41","8.2","8.4","8.5","10.1","10.2","15.11","15.15","15.19","15.21","15.30","15.41","18.2","18.4","18.5","21.3","21.4","22.1","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.46","23.5","24.6","24.11","24.12","24.13","25.4","26.1","26.4","26.28","26.29","26.30","26.31","26.42"],"artplayer":["0.2","0.7","0.13","0.15","0.16","2.2","2.22","2.24","2.28","2.29","2.30","2.31","3.5","3.6","3.7","3.29","3.30","5.11","5.22","5.41","8.2","8.3","8.4","8.5","9.7","10.1","10.2","13.20","15.11","15.15","15.19","15.30","15.41","18.2","18.3","18.4","18.5","19.3","19.7","20.1","20.8","20.9","20.10","21.0","21.3","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.46","23.1","23.8","24.2","24.3","24.8","24.16","25.0","25.3","26.4","26.26","26.28","26.29","26.30","26.31","26.42"],"container":["0.2","0.3","0.13","0.16","2.2","2.28","5.11","5.41","6.2","6.3","7.4","8.2","8.3","8.4","8.5","9.7","10.2","15.11","15.15","15.19","15.41","16.2","16.3","17.4","18.2","18.3","18.4","18.5","19.3","19.7","20.5","21.3","21.4","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.46","23.5","23.9","24.6","24.11","24.12","24.13","24.14","25.3","25.4","26.2","26.4","26.28","26.29","26.31","26.42"],"app":["0.2","0.4","0.13","5.41","6.2","6.3","6.4","6.5","7.3","7.4","8.2","8.3","8.4","8.5","9.7","10.2","15.11","15.15","15.41","16.2","16.3","16.4","16.5","17.3","17.4","18.2","18.3","18.4","18.5","19.3","19.7","20.3","20.4","22.1","22.19","22.28","22.29","22.46","24.11","24.12","24.13","24.14","25.4","26.2","26.4","26.28","26.29","26.42"],"url":["0.2","0.4","5.41","6.2","6.3","6.4","6.5","7.3","7.4","8.2","8.3","8.5","9.3","9.7","9.8","10.2","15.15","15.41","16.2","16.3","16.4","16.5","17.3","17.4","18.2","18.3","18.5","19.3","19.7","19.8","22.19","22.28","22.29","22.32","22.39","22.46","24.12","24.13","24.14","26.28","26.29","26.32","26.40","26.42"],"classname":["0.3","0.11","1.11","3.15","3.21","3.24","3.25","3.28","3.31","5.4","5.14","5.27","5.35","5.36","5.37","5.38","9.2","9.5","10.4","10.6","10.7","10.13","10.16","11.6","12.1","12.2","12.5","12.11","12.12","12.13","12.15","12.17","12.19","12.25","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","13.2","13.3","13.5","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","13.32","15.3","15.5","15.6","15.7","15.8","15.9","15.10","15.13","15.20","15.22","15.23","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.39","15.43","19.2","19.5","22.4","22.9","22.13","22.33","22.41","22.49","26.6","26.8","26.12","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.32","26.33","26.37","26.39","26.41","26.43","26.47","26.48","26.50"],"run":["0.3","0.8","0.9","0.11","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.1","3.2","3.4","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.33","5.4","5.5","5.6","5.8","5.10","5.12","5.14","5.23","5.27","5.35","5.36","5.37","5.38","5.39","9.2","9.5","10.4","10.6","10.7","10.13","10.16","11.6","12.1","12.2","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.22","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","15.3","15.6","15.7","15.8","15.9","15.13","15.20","15.22","15.24","15.25","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.42","15.43","19.2","19.5","22.4","22.9","22.13","22.33","22.38","22.41","22.49","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.27","26.32","26.33","26.37","26.39","26.41","26.43","26.44","26.45","26.47","26.48","26.50"],"code":["0.3","0.8","0.9","0.10","0.11","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","2.41","3.1","3.2","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","5.4","5.5","5.6","5.7","5.8","5.9","5.10","5.12","5.14","5.17","5.18","5.23","5.27","5.35","5.36","5.37","5.38","5.39","5.43","9.1","9.2","9.5","10.4","10.5","10.6","10.7","10.13","10.16","11.6","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.8","13.9","13.17","13.22","13.29","13.30","15.3","15.7","15.8","15.9","15.13","15.20","15.21","15.24","15.26","15.27","15.28","15.29","15.30","15.31","15.32","15.33","15.37","15.42","15.43","19.5","21.0","21.2","22.4","22.38","22.49","24.8","26.3","26.5","26.7","26.8","26.9","26.12","26.13","26.17","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.27","26.32","26.33","26.37","26.39","26.41","26.43","26.44","26.45","26.47","26.48"],"document":["0.3","22.1"],"assets":["0.4","5.41","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.7","9.8","10.2","15.11","15.15","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.3","19.7","19.8","22.29","22.46","24.12","24.13","24.14","26.2","26.29","26.42"],"sample":["0.4","5.41","6.2","6.3","6.4","6.5","7.3","7.4","7.5","9.3","9.8","10.2","12.0","15.15","16.2","16.3","16.4","16.5","17.3","17.4","17.5","19.3","19.8","22.29","24.13","24.14","26.2","26.29","26.42"],"video":["0.4","5.41","6.2","6.3","6.4","6.5","7.3","7.5","8.2","8.3","8.5","9.3","9.8","10.2","11.5","12.11","13.1","15.5","16.2","16.3","16.4","16.5","17.3","17.5","18.2","18.3","18.5","19.3","19.8","22.13","22.15","22.29","22.44","22.45","24.13","24.14","26.2","26.50"],"mp4":["0.4","6.3","6.4","6.5","7.3","7.5","8.2","8.3","8.5","9.3","9.4","9.8","9.9","12.0","16.3","16.4","16.5","17.3","17.5","18.2","18.3","18.5","19.3","19.4","19.8","19.9","22.2","24.14","26.2"],"test":["0.4"],"foo":["0.4"],"bar":["0.4","13.16","13.33","22.6","22.8","22.17","22.22","22.23"],"const":["0.4","9.6","19.6","20.9"],"获取整体的字幕列表":["0.11"],"div":["0.11","3.31","5.4","5.35","5.36","5.38","9.2","9.5","10.4","10.6","10.7","10.13","10.16","11.9","11.12","12.1","12.2","12.5","12.11","12.12","12.32","12.33","12.35","12.36","12.37","13.2","13.3","13.4","13.5","13.6","13.7","13.8","13.9","13.10","13.11","13.17","13.22","13.26","13.28","13.29","13.32","15.3","15.5","15.6","15.8","15.9","15.10","15.12","15.13","15.16","15.17","15.18","15.20","15.22","15.23","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.39","19.2","19.5","20.3","22.4","22.9","22.13","22.24","22.27","22.33","22.41","22.49","26.6","26.12","26.14","26.15","26.16","26.18","26.20","26.22","26.23","26.24","26.26","26.27","26.32","26.33","26.37","26.39","26.40","26.41","26.43","26.47","26.48","26.50"],"console":["1.1","2.0","12.0","24.18"],"info":["2.0","12.0","24.18"],"只监听一次事件":["2.0"],"但估计没有足够的数据来支撑播放到结束":["2.42"],"渲染完成":["2.44"],"属性的值改变时触发":["2.45"],"当这个":["2.46"],"因为":["2.47"],"或者资源类型不是受支持的媒体格式":["2.48"],"中的首帧已经完成加载":["2.49"],"播放准备开始":["2.53"],"seek":["2.56","2.57","12.56","12.57","13.25","15.14"],"user":["2.58"],"属性指定的时间发生变化":["2.60"],"播放已停止":["2.62"],"也是指挂载在":["3.0"],"构造函数":["3.0"],"组件唯一名称":["6.1","8.1"],"用于标记类名":["6.1","8.1"],"index":["6.1","7.5","8.1","16.1","17.5","18.1","24.7","24.10","24.15","24.16","24.17"],"number":["6.1","7.1","8.1","16.1","18.1","19.2"],"contextmenu":["6.4","6.5","16.4","16.5"],"name":["6.5","7.5","9.9","15.16","16.5","17.5","19.9","22.32"],"组件索引":["7.1"],"用于显示的优先级":["7.1"],"html":["7.1","7.2","9.4","9.9","15.4","17.1","17.2","19.4","19.9","22.26","22.32"],"element":["7.1","13.31","15.31","17.1"],"position":["7.2","7.5","17.2","17.5"],"left":["7.2","13.25","17.2"],"tooltip":["7.2","9.2","9.9","17.2","19.2","19.5","19.6","19.9"],"style":["7.2","9.3","17.2","22.36","26.36"],"color":["7.2","15.33","17.2"],"red":["7.2","17.2"],"click":["7.2","13.18","13.19","17.2"],"function":["7.2","17.2","19.5","22.17","22.34","22.40","23.10","26.34"],"args":["7.2","17.2"],"controls":["7.3","7.5","17.3","17.5"],"add":["7.3","17.3"],"button1":["7.5","17.5"],"png":["8.4","18.4","22.28","26.28"],"列表宽度":["9.2"],"提示文本":["9.2","9.5"],"setting":["9.3","9.4","9.8","9.9","19.3","19.4","19.8","19.9"],"true":["9.3","9.4","9.8","9.9","13.18","13.19","13.20","13.32","19.3","19.4","19.8","19.9","24.6"],"settings":["9.3","9.4","9.9","19.3","19.4","19.9","22.14","22.16","22.18","22.24"],"subtitle":["9.3","19.3"],"01":["9.3","9.4","19.3"],"default":["9.3","11.12","13.3","13.10","13.11","13.12","13.13","13.14","13.16","13.18","13.19","13.23","13.25","13.26","13.32","19.3"],"span":["9.3"],"multi":["9.4","19.4"],"level":["9.4","13.0","19.4"],"selector":["9.4","19.4"],"value":["9.6","22.11"],"min":["9.6"],"flip":["9.8","19.1","19.8"],"slider":["9.9","19.9"],"5x":["9.9","19.9"],"icon":["9.9","19.9"],"refer":["10.0","15.0"],"to":["10.0","10.8","11.0","11.1","12.53","12.58","13.4","13.8","13.9","13.21","13.25","15.0","15.4","15.14","20.11"],"method":["10.3"],"used":["10.3","13.33","15.35","15.36","16.1","17.1","18.1","22.3"],"hover":["10.3"],"delete":["10.4"],"clear":["10.4"],"object":["10.6","26.11"],"updating":["10.8"],"show":["10.8","10.9","10.10","10.15"],"property":["10.8","10.9","10.15"],"set":["10.8","10.9","10.15"],"whether":["10.9","10.15"],"display":["10.9","17.1","22.17"],"update":["10.10"],"attribute":["10.10","10.12"],"switch":["10.11"],"toggle":["10.12","10.14"],"the":["11.0","12.45","13.1","15.0","15.5","15.12","22.8","22.25","22.26","22.37","22.43","22.45"],"want":["11.1"],"manage":["11.1"],"multiple":["11.1"],"players":["11.1"],"player":["11.2","11.3","11.4","11.7","11.11","15.28","15.29","15.37","15.38","15.39","22.5","22.12","22.21","22.25","22.26"],"options":["11.7","11.9","11.12","22.36"],"event":["11.8","12.0","19.5","22.4"],"dispatcher":["11.8"],"for":["11.9","11.11","13.23","13.33","16.1","18.1","22.3","22.6","22.40","22.50"],"type":["11.10"],"checking":["11.10"],"on":["12.0","13.24","19.6","22.20","22.27","22.43","22.44","22.45","24.18"],"canplay":["12.0"],"listen":["12.0"],"an":["12.0"],"only":["12.0","22.3","22.14","22.21","22.48"],"once":["12.0"],"first":["12.1","12.49","13.0"],"time":["12.1","12.60","24.4"],"mouse":["12.12"],"hidden":["12.37"],"file":["12.42","20.11"],"but":["12.42","15.10","15.14"],"estimates":["12.42"],"there":["12.42"],"it":["12.43","15.14","22.15","22.50"],"can":["12.43","15.38","20.11","22.11","22.40"],"play":["12.43"],"rendering":["12.44"],"when":["12.45","12.46"],"this":["12.46","22.11"],"has":["12.46","12.47","12.50","12.51","12.52","12.62"],"stopped":["12.47"],"while":["12.48","12.54","14.0"],"fetching":["12.48"],"media":["12.48"],"frame":["12.49","15.17","15.18"],"start":["12.53"],"triggered":["12.54"],"playback":["12.55","15.12","22.3","22.8"],"is":["12.58","13.6","13.7","13.10","13.11","13.14","13.16","13.17","13.18","13.19","13.22","13.26","13.32","15.14","15.16","15.37","15.38","22.2","22.5"],"trying":["12.58"],"data":["12.59","24.8","24.16"],"specified":["12.60"],"changed":["12.61"],"properties":["13.0"],"mounted":["13.0"],"in":["13.1","13.13","13.15","13.16","13.21","13.27","15.6","22.2","22.11","22.14","22.15","22.16","22.18","22.24","22.33","22.47"],"events":["13.1"],"of":["13.1","13.12","13.13","13.24","14.0","15.39","22.12","22.35"],"by":["13.1","13.3","22.45"],"text":["13.2","14.0","19.2","19.5","19.6","22.33"],"enabled":["13.3"],"milliseconds":["13.4","13.13","13.15","13.16","13.21"],"defaults":["13.4","13.21","13.31"],"pixels":["13.6","13.7"],"feature":["13.11"],"seconds":["13.12","13.27","15.5","15.6","22.33"],"with":["13.12","13.13","15.35","15.36","22.3"],"a":["13.12","13.13","13.14","13.15","14.0","15.17","15.18"],"connection":["13.14","13.15"],"error":["13.14","13.15"],"occurs":["13.14","13.15"],"measured":["13.16"],"double":["13.18","13.19"],"long":["13.23","22.45"],"pressing":["13.23","22.45"],"mobile":["13.24","22.27","22.43","22.44"],"delay":["13.24"],"and":["13.25","22.5","22.6","22.8","22.25"],"right":["13.25"],"keyboard":["13.27"],"shortcuts":["13.27"],"under":["13.31"],"mainly":["13.33"],"smooth":["13.33"],"progress":["13.33","15.12","22.6","22.8"],"here":["14.0"],"translation":["14.0"],"provided":["14.0"],"into":["14.0","22.37"],"english":["14.0"],"preserving":["14.0"],"markdown":["14.0"],"formatting":["14.0"],"that":["14.0"],"allows":["14.0"],"loading":["14.0"],"after":["14.0","15.4"],"instantiation":["14.0"],"remove":["15.4"],"s":["15.4","15.23","17.1","22.26"],"from":["15.8","20.8","20.9","21.2","23.8","23.11"],"performs":["15.10"],"some":["15.10","22.48"],"optimization":["15.10"],"operations":["15.10"],"will":["15.12","20.6","21.0","22.15","22.16","22.37"],"carry":["15.12"],"over":["15.12"],"previous":["15.12"],"similar":["15.14","22.4"],"does":["15.14","22.39"],"parameter":["15.16"],"which":["15.17","15.18","15.38","20.11","21.1","22.2","22.11"],"returns":["15.17","15.18"],"promise":["15.17","15.18","24.6"],"full":["15.20","22.47"],"screen":["15.20","22.47"],"before":["15.22","22.5","22.26"],"starts":["15.22"],"playing":["15.22"],"mode":["15.23"],"its":["15.25"],"size":["15.25"],"normal":["15.27"],"horizontal":["15.27"],"vertical":["15.27"],"commonly":["15.35","15.36"],"be":["15.37","22.21","22.37"],"destroyed":["15.37"],"limited":["15.38"],"within":["15.38"],"current":["15.38","20.5","23.5"],"marking":["16.1","18.1"],"class":["16.1","18.1","20.3"],"priority":["17.1"],"items":["19.1"],"playbackrate":["19.1"],"aspectratio":["19.1"],"subtitleoffset":["19.1"],"list":["19.2"],"onswitch":["19.5"],"completion":["19.6"],"onchange":["19.6"],"change":["19.6"],"install":["20.1","23.1"],"body":["20.3"],"if":["20.5","23.5"],"typeof":["20.5","23.5"],"return":["20.5","24.6"],"let":["20.10"],"null":["20.10"],"parameters":["20.10"],"use":["20.11"],"legacy":["20.11"],"up":["20.11"],"ie":["20.11","23.11"],"core":["21.0"],"no":["21.0"],"longer":["21.0"],"do":["21.1"],"not":["21.1","22.2","22.39"],"require":["21.1"],"manual":["21.1"],"dist":["21.2"],"group":["21.2"],"import":["21.2","23.11"],"id":["21.2"],"sometimes":["22.2","22.39"],"known":["22.2"],"so":["22.2"],"quickly":["22.2"],"case":["22.2"],"you":["22.2"],"remembering":["22.3"],"initialized":["22.5"],"highlight":["22.6"],"often":["22.11"],"results":["22.11"],"black":["22.11"],"bars":["22.11"],"scrolls":["22.12"],"out":["22.12"],"currently":["22.14","22.48"],"available":["22.14"],"panel":["22.14","22.16","22.18","22.24"],"appear":["22.15","22.16"],"menu":["22.17"],"bottom":["22.17","22.18","22.20","22.43"],"control":["22.17","22.20","22.22","22.23"],"button":["22.20"],"page":["22.21"],"should":["22.21"],"one":["22.21"],"at":["22.22","22.23"],"appearing":["22.24"],"loses":["22.25"],"focus":["22.25"],"pre":["22.26"],"render":["22.26"],"required":["22.26"],"devices":["22.27"],"boolean":["22.32"],"string":["22.32","22.33"],"myplugin":["22.34","26.34"],"column":["22.35"],"columns":["22.35"],"width":["22.35","26.35"],"encoding":["22.36","26.36"],"directly":["22.37"],"written":["22.37"],"such":["22.39"],"m3u8":["22.39"],"mkv":["22.39"],"ts":["22.39"],"however":["22.39"],"have":["22.39"],"party":["22.40"],"program":["22.40"],"processing":["22.40"],"receive":["22.40"],"en":["22.41"],"zh":["22.41","25.2"],"cn":["22.41","26.41"],"hide":["22.43"],"elements":["22.44"],"pages":["22.47"],"according":["22.47"],"browsers":["22.48"],"support":["22.48"],"or":["22.50"],"htmlvideoelement":["22.50"],"example":["22.50"],"demo":["23.3"],"meta":["23.3"],"charset":["23.3"],"utf":["23.3","26.36"],"ref":["23.4"],"artref":["23.4"],"时会自动导入的":["23.6"],"param":["23.10"],"getinstance":["23.10"],"可以兼容到":["23.11"],"plugin":["24.2","24.3","24.8","24.16"],"danmuku":["24.2","24.7","24.10","24.16"],"npm":["24.3"],"弹幕时间":["24.4"],"默认为当前播放器时间":["24.4"],"默认弹幕模式":["24.5"],"滚动":["24.5"],"顶部":["24.5"],"底部":["24.5"],"modes":["24.5"],"弹幕可见的模式":["24.5"],"fontsize":["24.5"],"danmu":["24.6","24.18"],"resolve":["24.6"],"settimeout":["24.6"],"libs":["24.8","24.16"],"uncompiled":["24.8","24.16"],"plugins":["24.14","24.18"],"artplayerplugindanmuku":["24.14","24.18"],"xml":["24.18"],"visible":["24.18"],"显示弹幕":["24.18"],"版本开始":["25.0"],"核心代码除了包含":["25.0"],"zhtw":["25.2"],"tw":["25.2"],"高亮元素":["26.6"],"上":["26.6"],"类似":["26.11"],"css":["26.11"],"的":["26.11"],"fit":["26.11"],"里":["26.14","26.15","26.16","26.24"],"访问到播放器所需的":["26.26"],"layer":["26.28"],"画质地址":["26.32"],"预览图列数":["26.35"],"预览图宽度":["26.35"],"height":["26.35"],"预览图高度":["26.35"],"scale":["26.35"],"字幕样式":["26.36"],"字幕编码":["26.36"],"默认":["26.36"],"所以需要特别指明":["26.39"],"元素":["26.40"],"视频地址":["26.40"],"当前实例":["26.40"],"dom元素":["26.50"]},{"0":["13.25","19.6","24.4"],"1":["3.29","9.3","13.29","19.3"],"2":["3.29","9.6","13.29","19.6","26.3"],"3":["9.6","13.23"],"4":["9.1","21.1","22.17","22.33","22.49","23.10","26.5","26.7","26.8","26.9","26.13","26.17","26.21","26.24","26.25","26.32","26.33","26.37","26.39","26.41","26.44","26.45"],"5":["13.14","13.25","13.27"],"6":["2.41","5.38","5.39","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","23.10"],"7":["5.4","5.5","5.6","5.9","5.16","5.17","5.18","5.23","5.35","5.36","12.19","12.21","12.23","12.25","12.26","15.9","15.26","26.37"],"8":["5.8","5.14","5.24","5.25","5.27","5.37","12.17","15.1","15.8","15.13","15.20","15.24","15.27","15.28","15.29","15.31","15.32","15.33","15.37","22.36","23.3","26.36"],"9":["5.10","5.12","15.10","15.22"],"10":["5.7","5.37","7.3","7.4","12.2","12.6","12.18","15.7","15.11","15.37","17.3","17.4","19.6"],"11":["15.3","15.20","20.11"],"14":["26.32"],"17":["14.0"],"22":["9.9","19.9"],"25":["22.33","26.33"],"40":["3.7"],"100":["3.10"],"150":["9.4","19.4"],"300":["3.5","3.6"],"500":["3.8","3.9","3.17"],"1000":["13.15"],"3000":["13.13","13.16"],"实例":["0.0","5.0"],"artplayer":["0.1","0.3","0.5","0.6","0.8","0.9","0.10","0.12","0.14","1.1","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.17","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.19","5.20","5.21","5.24","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.37","5.40","5.42","5.43","9.1","9.2","9.5","10.4","10.5","10.6","10.7","10.13","10.16","11.6","12.2","12.6","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","13.5","13.8","13.9","13.17","13.22","13.28","13.29","13.30","15.2","15.21","15.26","15.34","15.37","15.40","15.42","15.43","19.2","19.5","20.2","22.4","22.38","23.2","25.1","26.10","26.19","26.33","26.38","26.39","26.46","26.49"],"container":["0.1","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.14","0.15","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","5.2","5.3","5.8","5.10","5.12","5.13","5.15","5.19","5.20","5.21","5.22","5.26","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.37","5.40","5.42","5.43","9.2","9.5","10.1","10.3","10.4","10.5","10.6","10.7","10.13","10.16","12.20","12.22","12.24","12.28","12.29","12.30","12.31","13.20","15.2","15.21","15.26","15.37","15.40","15.42","19.5","20.9","22.4","22.38","24.9","24.10","24.15","24.17","25.1","25.2","26.10","26.19","26.30","26.33","26.38","26.46","26.49"],"app":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.15","0.16","2.2","2.6","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.11","5.15","5.19","5.21","5.22","5.26","5.30","5.31","5.40","9.5","10.1","10.4","10.5","10.6","10.13","12.31","13.20","15.19","15.21","15.30","15.37","15.40","19.5","20.5","20.9","21.3","21.4","22.4","22.7","22.10","22.30","22.31","22.38","22.42","23.4","23.9","24.6","24.10","25.2","25.3","26.1","26.19","26.30","26.31","26.38","26.46"],"assets":["0.2","0.6","0.7","0.10","0.13","0.15","0.16","2.2","2.22","2.28","2.31","5.11","5.22","5.40","9.5","10.1","10.4","10.6","10.13","13.20","15.19","15.21","15.30","15.41","21.3","21.4","22.1","22.4","22.7","22.10","22.19","22.30","22.31","22.42","23.9","24.6","24.10","24.11","25.2","25.3","25.4","26.1","26.4","26.30","26.31"],"sample":["0.2","0.6","0.13","0.15","0.16","2.2","2.28","5.11","5.22","9.5","9.7","10.1","10.4","10.6","10.13","13.20","15.11","15.19","15.21","15.30","15.41","19.7","21.4","22.1","22.4","22.7","22.10","22.19","22.30","22.31","22.42","22.46","23.9","24.6","24.11","24.12","25.2","25.4","26.4","26.30","26.31"],"video":["0.2","0.13","0.15","0.16","5.11","7.4","8.4","9.5","9.7","10.4","10.6","10.13","13.20","15.19","15.21","15.41","17.4","18.4","19.7","21.4","22.1","22.7","22.10","22.19","22.28","22.30","22.31","22.42","22.46","22.47","22.50","23.9","24.6","24.11","24.12","25.4","26.4","26.28","26.29","26.31","26.42"],"mp4":["0.2","0.13","0.16","5.11","5.41","6.2","7.4","8.4","9.5","9.7","10.2","10.4","15.11","15.15","15.19","15.21","15.30","15.41","16.2","17.4","18.4","19.7","22.1","22.4","22.7","22.10","22.19","22.28","22.29","22.30","22.31","22.42","22.46","24.6","24.11","24.12","24.13","25.4","26.4","26.28","26.29","26.42"],"console":["0.2","0.4","1.6","7.2","10.2","11.6","15.15","17.2","22.34","26.34"],"info":["0.2","0.4","1.1","7.2","10.2","11.6","15.15","17.2","22.34","26.34"],"queryselector":["0.3","5.37","10.3","15.37","22.1","24.16","26.1"],"art":["0.3","0.8","0.9","0.11","0.12","0.14","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.5","3.6","3.7","3.30","5.1","5.2","5.3","5.5","5.6","5.7","5.8","5.9","5.13","5.14","5.16","5.17","5.18","5.20","5.23","5.24","5.25","5.27","5.28","5.29","5.31","5.32","5.33","5.34","5.42","5.43","9.1","9.2","10.4","10.5","10.6","10.7","10.13","10.16","12.2","12.3","12.4","12.6","12.7","12.8","12.9","12.10","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.39","12.40","12.41","15.1","15.2","15.3","15.7","15.9","15.13","15.22","15.26","15.28","15.29","15.31","15.32","15.33","15.34","15.42","15.43","19.2","19.5","22.4","22.34","22.38","22.49","24.7","24.9","24.10","24.15","24.17","25.2","26.5","26.7","26.10","26.17","26.32","26.33","26.39","26.49"],"new":["0.3","0.5","0.8","0.9","0.10","0.11","0.12","0.14","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.30","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.15","5.16","5.17","5.18","5.19","5.20","5.21","5.24","5.25","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.42","5.43","9.1","9.2","9.5","10.4","10.5","10.6","10.7","10.13","10.16","12.2","12.6","12.7","12.8","12.10","12.16","12.17","12.18","12.20","12.21","12.22","12.23","12.24","12.26","12.28","12.29","12.30","12.31","13.20","15.1","15.2","15.7","15.22","15.26","15.31","15.32","15.34","15.40","15.42","15.43","19.2","19.5","22.4","22.38","24.9","24.10","24.15","24.17","25.1","25.2","26.7","26.10","26.19","26.33","26.38","26.39","26.46","26.49"],"url":["0.6","0.7","0.9","0.10","0.13","0.15","0.16","2.2","2.18","2.22","2.24","2.28","2.29","2.30","2.31","5.19","5.22","5.30","5.40","8.4","9.5","10.1","10.4","10.6","10.13","13.20","15.19","15.21","15.30","15.40","18.4","19.5","20.9","21.3","21.4","22.1","22.4","22.7","22.10","22.30","22.31","22.40","22.42","23.9","24.6","24.10","24.11","25.2","25.3","25.4","26.1","26.4","26.30","26.31","26.38","26.46"],"js":["0.11","1.6","3.1","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","5.4","5.5","5.6","5.14","5.23","5.27","5.35","5.36","5.38","5.39","9.2","10.3","10.7","10.16","11.6","12.1","12.2","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.19","12.21","12.22","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","13.30","15.3","15.6","15.7","15.8","15.9","15.10","15.12","15.13","15.17","15.18","15.20","15.22","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","15.37","15.43","19.2","19.5","21.1","22.17","22.33","22.41","22.49","24.8","26.3","26.5","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.26","26.27","26.32","26.37","26.39","26.41","26.43","26.44","26.45","26.47","26.48"],"var":["0.11","1.1","2.41","3.5","3.6","3.7","3.17","3.30","5.1","5.5","5.6","5.7","5.8","5.9","5.10","5.12","5.14","5.16","5.17","5.18","5.20","5.23","5.24","5.25","5.27","5.35","5.36","5.37","5.39","5.43","9.1","9.2","10.3","10.4","10.6","10.7","10.13","10.16","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.32","12.33","12.34","12.35","12.36","12.38","12.39","12.40","12.41","13.30","15.1","15.3","15.7","15.8","15.9","15.13","15.20","15.22","15.24","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.37","15.42","15.43","19.2","19.5","21.1","21.2","22.4","22.33","22.38","22.49","24.7","24.15","24.16","24.17","25.2","26.3","26.5","26.7","26.17","26.24","26.32","26.33","26.39","26.49"],"function":["0.13","6.5","16.5","17.1","20.10","26.36"],"构造函数":["1.0"],"code":["1.11","9.6","10.3","12.1","13.2","13.3","13.4","13.6","13.7","13.10","13.11","13.12","13.13","13.14","13.16","13.18","13.19","13.21","13.23","13.26","13.28","13.31","13.32","13.33","15.5","15.6","15.10","15.12","15.14","15.16","15.17","15.18","15.22","15.23","15.25","15.35","15.36","15.39","19.1","19.2","20.11","22.3","22.6","22.8","22.9","22.13","22.17","22.20","22.22","22.23","22.24","22.27","22.32","22.33","22.37","22.39","22.41","22.44","23.11","26.6","26.11","26.14","26.15","26.16","26.26","26.35","26.40","26.50"],"once":["2.0"],"不必停下来进一步缓冲内容":["2.42"],"media":["2.46","2.47","12.43","12.58"],"已经加载完成":["2.46"],"操作完成":["2.56"],"操作开始":["2.57"],"agent":["2.58"],"的":["3.0"],"false":["3.3","13.31","20.5","23.5","24.5","24.14"],"add":["4.0","6.3","8.3","14.0","24.2"],"例如我想写一个在视频暂停后":["4.0"],"显示一个图片广告的插件":["4.0"],"on":["5.11","13.0","15.11","15.15","15.30"],"document":["5.37","10.3","15.37","24.16","26.1"],"default":["5.41","7.5","13.1","13.15","13.27","15.41","17.5","23.10"],"true":["5.41","7.5","9.7","15.4","15.41","17.5","19.7","22.4","22.29","22.46","24.5","26.4","26.29","26.36"],"html":["5.41","6.1","6.2","6.3","6.4","6.5","7.3","7.5","8.1","8.2","8.3","8.5","9.8","15.41","16.1","16.2","16.3","16.4","16.5","17.3","17.5","18.1","18.2","18.3","18.5","19.8","22.28","22.29","22.36","24.14","26.28","26.29","26.36"],"sd":["5.41","15.41"],"480p":["5.41"],"组件索引":["6.1","8.1"],"用于显示的优先级":["6.1","8.1"],"contextmenu":["6.2","6.3","16.2","16.3"],"name":["6.2","6.3","6.4","7.3","7.4","8.2","8.3","8.4","8.5","9.8","16.2","16.3","16.4","17.3","17.4","18.2","18.3","18.4","18.5","19.8","22.28","22.34","26.28","26.34"],"your":["6.2","6.3","6.4","6.5","7.3","16.2","16.3","16.4","16.5","17.3","22.46","26.42"],"menu":["6.2","6.3","6.4","6.5","16.2","16.3","16.4","16.5","22.14","22.15","22.16"],"click":["6.4","6.5","16.4","16.5","17.1","24.14"],"args":["6.5","16.5"],"组件的":["7.1"],"dom":["7.1","17.1","22.40","22.50"],"元素":["7.1"],"style":["7.1","8.2","8.3","8.5","17.1","18.2","18.3","18.5","19.3","22.28"],"object":["7.1","17.1"],"mounted":["7.2","17.2"],"subtitle":["7.2","7.5","17.2","17.5"],"button1":["7.3","7.4","17.3","17.4"],"index":["7.3","7.4","17.3","17.4","24.8"],"position":["7.3","15.19","17.3","24.13","24.14"],"left":["7.3","17.3"],"controls":["7.4","15.19","17.4","24.13","24.14"],"right":["7.5","15.19","17.5","24.14"],"selector":["7.5","17.5","22.29","26.29"],"01":["7.5","17.5","19.4"],"layers":["8.2","8.3","8.4","8.5","18.2","18.3","18.4","18.5"],"potser":["8.2","8.3","8.5","26.28"],"width":["8.2","8.3","8.5","9.4","9.9","18.2","18.3","18.5","19.4","19.9","22.28"],"100px":["8.2","8.3","8.5","18.2","18.3","18.5","22.28"],"src":["8.2","8.5","9.9","18.2","18.5","19.9"],"color":["9.3","19.3"],"red":["9.3","19.3"],"srt":["9.3","19.3"],"id":["9.3","19.3","22.46"],"yellow":["9.3","19.3"],"02":["9.3"],"setting":["9.5","9.7","19.7","22.29","26.29"],"max":["9.6","19.6"],"step":["9.6"],"div":["9.6","10.3","10.12","10.14","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.10","11.11","13.1","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.27","13.31","13.33","15.4","15.14","15.35","15.36","19.1","20.5","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.17","22.18","22.20","22.22","22.23","22.25","22.32","22.35","22.37","22.39","22.43","22.44","22.45","22.48","22.50","23.3","23.5","26.11","26.35"],"classname":["9.6","10.3","10.14","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.4","13.6","13.7","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.26","13.27","13.31","13.33","15.12","15.14","15.16","15.17","15.18","15.35","15.36","19.1","22.3","22.5","22.6","22.8","22.12","22.14","22.16","22.17","22.18","22.20","22.22","22.23","22.24","22.25","22.27","22.32","22.37","22.39","22.43","22.44","22.45","22.48","26.11","26.35","26.40"],"run":["9.6","10.3","11.1","11.2","11.3","11.4","11.5","11.8","11.9","11.10","11.12","13.2","13.3","13.4","13.6","13.7","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.26","13.27","13.31","13.32","13.33","15.5","15.10","15.12","15.14","15.16","15.17","15.18","15.23","15.35","15.36","15.39","19.1","22.3","22.5","22.6","22.8","22.12","22.14","22.16","22.17","22.18","22.20","22.22","22.23","22.24","22.25","22.27","22.32","22.37","22.39","22.43","22.44","22.48","26.11","26.26","26.35","26.40"],"settings":["9.8","19.8","22.15"],"slider":["9.8","19.8"],"tooltip":["9.8","19.8"],"5x":["9.8","19.8"],"icon":["9.8","19.8"],"img":["9.9","19.9"],"heigth":["9.9","19.9"],"state":["9.9","19.9"],"svg":["9.9","19.9"],"secondary":["10.0"],"attributes":["10.0"],"custom":["10.3"],"test":["10.4"],"foo":["10.4"],"bar":["10.4","22.18","22.20","22.43"],"const":["10.4","20.8","23.8"],"whether":["10.8","10.10","22.36"],"display":["10.8","10.15","16.1","18.1"],"all":["10.8","10.9","10.10","10.15"],"or":["10.8","12.46","12.48"],"not":["10.8","12.42","15.14"],"toggle":["10.8","10.9","10.10","10.15"],"of":["10.9","10.14","12.49"],"set":["10.10","22.2"],"options":["10.11"],"texttrack":["10.11"],"get":["10.11","20.4"],"track":["10.11"],"activecues":["10.11"],"currently":["10.11"],"items":["10.15"],"first":["11.0"],"level":["11.0"],"at":["11.1","22.21"],"the":["11.1","12.54","20.3"],"same":["11.1","15.38"],"time":["11.1","22.8","22.21"],"is":["12.42","12.44","13.1","13.15","13.23","13.25","22.25"],"enough":["12.42"],"value":["12.45","19.6"],"been":["12.46","12.50","12.51"],"completely":["12.46"],"loaded":["12.46","24.18"],"because":["12.47"],"data":["12.48","23.10"],"started":["12.52"],"following":["12.53"],"a":["12.53","22.21"],"rate":["12.55"],"frame":["12.56","12.57"],"fetch":["12.58"],"loading":["12.59"],"by":["12.60"],"stopped":["12.62"],"constructor":["13.0"],"property":["13.0"],"turned":["13.1"],"off":["13.1"],"long":["13.24"],"press":["13.24"],"acceleration":["13.24"],"effects":["13.33"],"primary":["15.0"],"destruction":["15.4"],"which":["15.4"],"defaults":["15.4"],"ready":["15.11","15.15","15.30"],"seek":["15.11"],"settimeout":["15.11"],"trigger":["15.14"],"additional":["15.14"],"events":["15.14"],"timeupdate":["15.35","15.36"],"event":["15.35","15.36"],"prevent":["15.38"],"errors":["15.38"],"due":["15.38"],"having":["15.38"],"priority":["16.1","18.1"],"element":["16.1","18.1","22.37","22.40","22.50"],"poster":["18.2","18.3","18.5","22.28"],"span":["19.3"],"min":["19.6"],"yarn":["20.1","23.1","24.2"],"npm":["20.2","23.2"],"dist":["20.2","20.11","23.2","23.11","24.3"],"warning":["20.3","22.46"],"player":["20.3"],"s":["20.3"],"size":["20.3","22.47"],"depends":["20.3"],"instance":["20.4"],"getinstance":["20.4","20.10"],"destroy":["20.5","23.5"],"ref":["20.5","23.5"],"automatically":["20.6","22.11"],"param":["20.10"],"properties":["20.10"],"import":["20.11","21.1"],"from":["20.11"],"group":["20.11","23.11"],"bash":["20.11","23.11"],"include":["21.0"],"other":["21.0"],"languages":["21.0"],"besides":["21.0"],"simplified":["21.0"],"chinese":["21.0"],"and":["21.0","22.14","22.15","22.16","22.47"],"english":["21.0"],"zhtw":["21.2"],"zh":["21.2"],"tw":["21.2"],"you":["22.1"],"may":["22.1"],"can":["22.2","22.26"],"asynchronously":["22.2"],"autoplayback":["22.3"],"muted":["22.4","26.4"],"it":["22.5","22.39"],"starts":["22.5"],"playing":["22.5","22.25"],"elements":["22.6"],"adjust":["22.11"],"to":["22.11","22.21","22.36"],"hide":["22.11"],"browser":["22.12"],"viewport":["22.12","22.47"],"context":["22.14","22.15","22.16"],"panel":["22.15"],"control":["22.18","22.43"],"description":["22.19"],"allowed":["22.21"],"play":["22.21","26.42"],"bottom":["22.22","22.23"],"mounts":["22.26"],"access":["22.26"],"setting01":["22.29","26.29"],"return":["22.34","23.5","23.10","26.34"],"height":["22.35"],"scale":["22.35"],"utf":["22.36"],"escape":["22.36","26.36"],"boolean":["22.36","26.36"],"tags":["22.36"],"correct":["22.39"],"so":["22.39"],"needs":["22.39"],"be":["22.39"],"specifically":["22.39"],"stated":["22.39"],"three":["22.40"],"parameters":["22.40"],"lang":["22.42","26.42"],"devices":["22.44","22.45"],"mobile":["22.45"],"this":["22.48"],"feature":["22.48"],"an":["22.50"],"existing":["22.50"],"body":["23.3"],"class":["23.3"],"属性":["23.10"],"export":["23.10"],"jsdelivr":["23.11"],"danmuku":["24.3","24.8"],"mode":["24.4"],"弹幕模式":["24.4"],"滚动":["24.4"],"弹幕字体大小":["24.5"],"antioverlap":["24.5"],"弹幕是否防重叠":["24.5"],"synchronousplayback":["24.5"],"是否同步播放速度":["24.5"],"mount":["24.5"],"undefined":["24.5"],"弹幕发射器挂载点":["24.5"],"默认为播放器控制栏中部":["24.5"],"heatmap":["24.5"],"plugins":["24.6","24.11","24.12","24.13"],"xml":["24.6","24.13","24.14"],"这是用户在输入框输入弹幕文本":["24.6"],"然后点击发送按钮后触发的函数":["24.6"],"artplayerplugindanmuku":["24.11","24.12","24.13"],"emitter":["24.14"],"重载":["24.14"],"danmu":["24.16"],"danmus":["24.18"],"加载弹幕":["24.18"],"length":["24.18"],"简体中文":["25.0"],"和":["25.0"],"英文":["25.0"],"有时候":["26.2"],"地址没那么快知道":["26.2"],"这时候你可以异步设置":["26.2"],"cover":["26.11"],"预览图缩放":["26.35"],"是否转义":["26.36"],"标签":["26.36"],"默认为":["26.36"],"onvttload":["26.36"],"用于修改":["26.36"]},{"0":["15.11","23.9"],"1":["3.25","9.9","19.9","24.4"],"2":["3.26","9.3","19.3","22.3","24.4"],"3":["3.28","13.28","19.6","26.1"],"4":["3.28","13.28","19.1","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.16","22.18","22.20","22.22","22.23","22.24","22.25","22.27","22.32","22.35","22.37","22.39","22.41","22.44","22.48","26.6","26.11","26.12","26.14","26.15","26.16","26.18","26.20","26.22","26.23","26.27","26.35","26.36","26.40","26.43","26.47","26.48","26.50"],"5":["3.23","3.29","9.9","13.29","19.9","22.7","23.9"],"6":["3.29","12.1","13.29","15.39","20.10","22.2","26.2"],"7":["15.5","15.6","15.16","15.17","15.18","15.23","15.35","15.36","22.37","26.26"],"8":["15.14","15.25","22.35","26.35","26.40"],"9":["15.12","22.28"],"10":["3.12","3.14","3.27","5.11","9.9","19.9"],"12":["24.13"],"14":["22.32"],"20":["3.11"],"22":["9.5"],"40":["13.7"],"50":["24.13"],"100":["13.10"],"300":["13.5","13.6"],"500":["3.21","13.8","13.9","13.17"],"512":["24.5"],"1000":["13.24"],"2000":["3.22","3.24","13.22"],"3000":["3.15","15.11"],"5000":["3.4","3.13","3.16"],"的":["0.0","0.4","1.0","5.0"],"url":["0.1","0.3","0.5","0.8","0.12","0.14","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.30","5.1","5.2","5.3","5.7","5.8","5.12","5.13","5.14","5.15","5.16","5.17","5.18","5.20","5.21","5.24","5.26","5.27","5.28","5.29","5.31","5.32","5.33","5.34","5.42","5.43","9.1","9.2","9.6","10.3","10.5","10.7","10.16","12.2","12.6","12.7","12.8","12.10","12.16","12.17","12.18","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.28","12.29","12.30","12.31","15.1","15.2","15.3","15.7","15.8","15.13","15.22","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.37","15.42","15.43","19.2","21.2","22.17","22.33","22.38","22.49","24.9","24.15","24.17","25.1","26.7","26.10","26.19","26.33","26.39","26.49"],"assets":["0.1","0.3","0.5","0.8","0.9","0.11","0.12","0.14","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","3.30","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.19","5.20","5.21","5.24","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.34","5.42","5.43","9.1","9.2","9.6","10.3","10.5","10.7","10.16","12.2","12.6","12.17","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.2","15.13","15.22","15.26","15.29","15.31","15.32","15.34","15.37","15.40","15.42","15.43","19.2","19.5","20.9","21.2","22.17","22.33","22.38","22.39","24.9","24.15","24.17","25.1","26.10","26.19","26.32","26.33","26.38","26.39","26.46","26.49"],"sample":["0.1","0.3","0.5","0.7","0.8","0.9","0.10","0.11","0.12","0.14","2.6","2.11","2.12","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.29","2.30","2.31","2.39","5.2","5.3","5.8","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.19","5.20","5.21","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.40","5.42","5.43","9.2","9.6","10.3","10.5","10.7","10.16","12.2","12.18","12.20","12.22","12.24","12.28","12.29","12.30","12.31","15.2","15.22","15.26","15.31","15.37","15.40","15.42","19.2","19.5","20.9","21.2","21.3","22.17","22.33","22.38","22.39","24.9","24.10","24.15","24.17","25.3","26.1","26.10","26.19","26.32","26.33","26.38","26.39","26.46","26.49"],"video":["0.1","0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.12","0.14","2.2","2.6","2.12","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.28","2.29","2.30","2.31","5.2","5.3","5.8","5.10","5.12","5.13","5.15","5.19","5.21","5.22","5.26","5.28","5.29","5.30","5.32","5.33","5.40","5.42","9.2","9.6","10.1","10.3","10.5","10.7","10.16","12.2","12.22","12.24","12.28","12.29","12.30","12.31","15.26","15.37","15.40","15.42","19.2","19.5","20.9","21.2","21.3","22.38","24.9","24.10","24.15","24.17","25.2","25.3","26.1","26.10","26.19","26.30","26.33","26.38","26.39","26.46"],"mp4":["0.3","0.5","0.6","0.7","0.8","0.9","0.10","0.15","2.2","2.17","2.18","2.20","2.22","2.24","2.28","2.29","2.30","2.31","5.15","5.19","5.21","5.22","5.26","5.29","5.30","5.31","5.40","5.42","9.2","10.1","10.3","10.5","10.6","10.7","10.13","10.16","12.28","12.29","12.31","13.20","15.22","15.26","15.37","15.40","19.2","19.5","20.9","21.2","21.3","21.4","22.38","23.9","24.9","24.10","24.17","25.2","25.3","26.1","26.10","26.19","26.30","26.31","26.33","26.38","26.46"],"warning":["0.4","10.2","10.4","11.6","15.11","15.15","15.19","15.30","20.4","22.7","22.10","25.0"],"提示":["0.4"],"默认所有播放器实例都是共享同一个":["0.4"],"localstorage":["0.4"],"而且默认的":["0.4"],"是":["0.4"],"settings":["0.4","9.2","9.5","19.5"],"如果你想不同的播放器使用不同的":["0.4"],"console":["0.6","0.13","0.16","6.2","6.3","6.4","6.5","9.3","9.4","10.1","10.4","10.5","10.6","10.13","11.1","16.2","16.3","16.4","16.5","19.3","19.4","22.29"],"info":["0.6","0.13","0.16","1.6","6.2","6.3","6.4","6.5","9.3","9.4","10.1","10.4","10.6","10.13","11.1","16.2","16.3","16.4","16.5","19.3","19.4","22.29"],"play":["0.6","10.6","22.42","26.4"],"on":["0.7","0.8","0.9","0.10","2.2","2.22","5.30","5.40","7.5","8.5","9.9","10.0","10.13","11.0","15.0","15.40","17.5","18.5","19.9","20.3","21.0"],"ready":["0.9","0.10","2.2","5.11","5.40","7.5","10.13","17.5"],"artplayer":["0.11","1.6","2.41","5.4","5.5","5.6","5.16","5.23","5.25","5.35","5.36","5.38","5.39","9.6","10.3","10.9","10.15","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.3","13.4","13.6","13.7","13.10","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.26","13.27","13.31","13.32","13.33","15.1","15.3","15.6","15.7","15.8","15.9","15.10","15.12","15.13","15.17","15.18","15.20","15.22","15.23","15.24","15.25","15.27","15.28","15.29","15.31","15.32","15.33","19.1","19.6","21.1","22.17","22.24","22.26","22.32","22.33","22.39","22.41","22.49","26.3","26.5","26.7","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.24","26.25","26.32","26.35","26.37","26.41","26.44","26.45"],"container":["0.11","1.1","2.1","2.3","2.4","2.14","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.29","3.30","5.1","5.4","5.5","5.6","5.7","5.9","5.14","5.16","5.17","5.18","5.23","5.24","5.25","5.27","5.35","5.36","5.38","5.39","9.1","9.6","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.30","15.1","15.3","15.7","15.8","15.9","15.10","15.12","15.13","15.17","15.18","15.20","15.22","15.24","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.43","19.2","19.6","20.3","21.1","21.2","22.17","22.24","22.32","22.33","22.39","22.41","22.49","24.7","24.16","26.5","26.7","26.17","26.24","26.26","26.32","26.37","26.39","26.41"],"app":["0.11","0.12","0.14","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.30","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.16","5.17","5.18","5.20","5.24","5.25","5.27","5.28","5.29","5.32","5.33","5.34","5.37","5.42","5.43","9.1","9.2","9.6","10.3","10.7","10.16","12.2","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.39","12.40","12.41","13.30","15.1","15.2","15.3","15.7","15.8","15.9","15.10","15.12","15.13","15.20","15.22","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.42","15.43","19.2","21.2","22.17","22.33","22.39","22.49","23.3","23.5","24.7","24.9","24.15","24.16","24.17","25.1","26.7","26.10","26.17","26.24","26.26","26.32","26.33","26.39","26.49"],"hotkeyevent":["0.13","10.13"],"event":["0.13","9.3","9.4","10.13","12.46","17.1","19.4"],"click":["0.13","6.2","6.3","7.1","7.3","10.13","15.19","15.21","16.2","16.3","17.3","22.30","24.12"],"true":["0.15","2.28","3.1","3.20","3.31","3.33","7.2","9.2","9.5","17.2","19.2","19.5","22.10","22.36"],"flip":["0.15"],"playbackrate":["0.15"],"aspectratio":["0.15"],"function":["0.16","6.2","6.3","6.4","7.1","7.3","9.4","10.13","10.16","15.19","15.21","16.2","16.3","16.4","17.3","19.4","22.29","22.30","22.36","24.12","24.14","26.29"],"myplugin":["0.16","10.16"],"art":["1.1","3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.18","3.21","3.22","3.23","3.24","3.27","3.28","3.29","3.32","3.33","5.4","5.35","5.36","5.37","5.38","5.39","9.6","10.3","10.9","10.14","10.15","12.1","12.5","12.11","12.12","12.32","12.33","12.34","12.35","12.36","12.37","12.38","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.29","13.30","15.5","15.6","15.8","15.14","15.16","15.17","15.18","15.20","15.23","15.24","15.25","15.27","15.35","15.36","15.37","15.39","19.1","19.6","20.8","21.1","21.2","22.9","22.13","22.17","22.24","22.27","22.32","22.33","22.39","22.40","22.41","23.8","24.8","24.16","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.27","26.35","26.37","26.41","26.43","26.44","26.45","26.47","26.48","26.50"],"new":["1.1","3.3","3.6","3.7","3.8","3.9","3.10","3.11","3.17","3.22","3.28","3.29","3.33","5.4","5.5","5.6","5.23","5.35","5.36","5.37","5.38","5.39","9.6","10.3","10.9","10.15","12.1","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.19","12.25","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.8","13.9","13.17","13.29","13.30","15.3","15.5","15.6","15.8","15.9","15.10","15.12","15.13","15.14","15.16","15.17","15.18","15.20","15.23","15.24","15.25","15.27","15.28","15.29","15.33","15.37","15.39","19.1","19.6","21.1","21.2","22.9","22.13","22.17","22.24","22.32","22.33","22.39","22.41","22.49","24.7","24.8","24.16","26.3","26.5","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.17","26.18","26.20","26.21","26.22","26.23","26.24","26.25","26.27","26.32","26.35","26.37","26.41","26.43","26.44","26.45","26.47","26.48","26.50"],"js":["1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","3.2","10.8","10.9","10.10","10.12","10.14","10.15","11.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.5","15.14","15.16","15.23","15.35","15.36","15.39","19.1","20.2","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.24","22.25","22.27","22.32","22.35","22.37","22.39","22.43","22.44","22.45","22.48","23.2","24.3","26.6","26.11","26.35","26.36","26.40","26.50"],"手动触发事件":["2.0"],"subtitle":["2.28","2.29","2.30","2.31"],"或者部分加载完成":["2.46"],"则发送此事件":["2.46"],"已经到达结束点":["2.47"],"正在尝试获取媒体数据":["2.58"],"一级属性":["3.0"],"var":["3.1","3.3","3.4","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.29","3.31","3.32","3.33","5.4","5.38","9.6","10.9","10.12","10.14","10.15","12.1","12.11","12.37","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.5","15.6","15.10","15.12","15.14","15.16","15.17","15.18","15.23","15.25","15.35","15.36","15.39","19.1","19.6","22.3","22.9","22.13","22.17","22.24","22.27","22.32","22.35","22.37","22.39","22.41","24.8","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.26","26.27","26.35","26.37","26.40","26.41","26.43","26.44","26.45","26.47","26.48","26.50"],"false":["3.18","3.19","3.32","6.5","13.3","16.5"],"adsplugin":["4.0","14.0"],"option":["4.0","14.0","20.4","23.4","24.18"],"layers":["4.0","14.0"],"ads":["4.0"],"html":["4.0","7.4","8.4","9.7","15.19","15.21","17.4","18.4","19.7","22.30","22.31","24.11","24.12","24.13","26.30","26.31"],"img":["4.0","9.5","9.8","19.8","22.38","26.38"],"style":["4.0","6.1","7.3","8.1","8.4","16.1","17.3","18.1","18.4","20.4","26.28"],"width":["4.0","8.4","9.5","9.8","18.4","19.8","24.5","26.28"],"100px":["4.0","8.4","18.4","26.28"],"src":["4.0","8.3","8.4","9.8","18.3","18.4","19.8","22.28","26.28"],"display":["4.0"],"none":["4.0"],"position":["4.0","5.19","7.4","8.2","8.3","8.5","15.21","17.4","18.2","18.3","18.5","22.28","22.31","24.11","24.12","26.28","26.31"],"absolute":["4.0","8.2","8.3","8.5","18.2","18.3","18.5","22.28","26.28"],"top":["4.0","8.2","8.3","8.5","18.2","18.3","18.5","22.28","26.28"],"20px":["4.0","22.28","26.28"],"right":["4.0","7.2","7.4","8.2","8.5","15.21","17.2","17.4","18.2","18.5","22.28","24.11","24.12","24.13"],"seek":["5.11"],"settimeout":["5.11","7.5","17.5","22.2"],"controls":["5.19","5.21","15.21","24.11","24.12"],"jpg":["5.22"],"hd":["5.41","15.41"],"720p":["5.41","15.41"],"element":["6.1","8.1"],"组件的":["6.1","8.1"],"dom":["6.1","8.1","9.4","16.1","18.1","19.4"],"元素":["6.1","8.1"],"args":["6.2","6.3","6.4","16.2","16.3","16.4","22.29","22.30","26.29"],"show":["6.5","9.7","9.9","16.4","16.5","19.7","19.9"],"组件样式对象":["7.1"],"组件点击事件":["7.1"],"mounted":["7.1","10.0","11.0","15.0","17.1"],"selector":["7.2","17.2"],"default":["7.2","10.4","17.2","20.10","21.4","25.4"],"span":["7.2","17.2"],"01":["7.2","17.2","22.29","26.29"],"button":["7.3","7.4","17.3","17.4"],"tooltip":["7.3","7.4","8.2","8.3","17.1","17.3","17.4","18.2","18.3","22.31"],"color":["7.3","17.3"],"red":["7.3","17.3"],"your":["7.4","15.30","17.4","21.0","22.30","22.31","26.30","26.31","26.46"],"02":["7.5","9.4","17.5","19.3","19.4","22.29","26.29"],"update":["7.5"],"the":["7.5","12.48","17.5","21.4","25.4"],"tip":["8.2","8.3","18.2","18.3"],"50px":["8.2","8.3","8.5","18.2","18.3","18.5"],"potser":["8.4"],"setting":["9.2","19.2","19.5"],"item":["9.3","9.4","19.4"],"onselect":["9.4","19.4","22.29","26.29"],"pip":["9.5","19.5"],"mode":["9.5","19.5"],"close":["9.5","19.5"],"heigth":["9.5","9.8","19.8"],"add":["9.7","20.1","23.1"],"slider":["9.7","19.7"],"state":["9.8","19.8"],"range":["9.9","19.9","24.13"],"to":["10.2","12.42","12.43","12.62","14.0","21.0","22.1"],"easily":["10.2"],"distinguish":["10.2"],"between":["10.2"],"by":["10.4","22.46"],"all":["10.4","13.0"],"zh":["10.6"],"cn":["10.6"],"div":["10.8","10.9","10.10","10.11","10.15","13.24","15.38","19.6","22.21","22.26","22.36","22.40","22.47","26.36"],"classname":["10.8","10.9","10.10","10.11","10.12","10.15","13.1","13.24","15.4","15.38","19.6","22.15","22.21","22.26","22.35","22.36","22.40","22.47","22.50","26.36"],"run":["10.8","10.9","10.10","10.11","10.12","10.14","10.15","11.7","11.11","13.1","13.24","15.4","15.38","19.6","22.15","22.21","22.26","22.35","22.36","22.40","22.45","22.47","22.50","26.36"],"code":["10.8","10.9","10.10","10.12","10.14","10.15","11.1","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.1","13.15","13.24","13.25","13.27","15.4","15.38","19.6","22.5","22.12","22.14","22.15","22.16","22.18","22.21","22.25","22.26","22.35","22.36","22.40","22.43","22.45","22.47","22.48","22.50","26.36"],"switch":["10.10","15.11","15.19"],"visibility":["10.10"],"active":["10.11"],"list":["10.11","11.6"],"cues":["10.11"],"full":["11.6"],"manually":["12.0"],"trigger":["12.0"],"data":["12.42","12.58","20.10"],"through":["12.42","12.43","22.26"],"of":["12.45","20.3","22.1"],"partially":["12.46"],"media":["12.47","12.49"],"resource":["12.48"],"type":["12.48","24.13"],"loaded":["12.50"],"paused":["12.51","14.0"],"pause":["12.53"],"or":["12.53"],"delay":["12.53"],"browser":["12.54"],"has":["12.55","12.59"],"skipping":["12.56","12.57"],"operation":["12.56","12.57"],"but":["12.58"],"due":["12.62"],"names":["13.0"],"are":["13.0"],"in":["13.0"],"devices":["13.20"],"a":["13.20","15.15"],"tap":["13.20"],"toggles":["13.20"],"for":["14.0"],"example":["14.0"],"i":["14.0","24.6"],"want":["14.0","22.10"],"write":["14.0"],"displays":["14.0"],"an":["14.0"],"image":["14.0"],"advertisement":["14.0"],"t":["15.11"],"and":["15.11"],"note":["15.15"],"some":["15.15"],"videos":["15.15"],"do":["15.15"],"not":["15.15"],"have":["15.15"],"resize":["15.30"],"class":["15.38"],"name":["15.38"],"480p":["15.41"],"object":["16.1","18.1","22.11"],"triggered":["17.1"],"after":["17.1"],"is":["17.1"],"poster":["18.4"],"step":["19.6","24.13"],"unpkg":["20.2","23.2","24.3"],"so":["20.3"],"import":["20.6","21.0"],"useref":["20.8","23.8"],"export":["20.10"],"return":["20.10"],"jsdelivr":["20.11"],"net":["20.11","23.11"],"https":["20.11","23.11"],"cdn":["20.11","23.11"],"npm":["20.11","23.11"],"you":["21.0","22.10"],"need":["21.0","22.1"],"required":["21.0"],"change":["21.4","25.4"],"initialize":["22.1"],"size":["22.1"],"like":["22.1"],"css":["22.1","22.11","26.1"],"this":["22.4","26.4"],"equivalent":["22.4"],"will":["22.7"],"cache":["22.7"],"muted":["22.10"],"if":["22.10","24.6"],"similar":["22.11"],"s":["22.11"],"fit":["22.11"],"increase":["22.19"],"volume":["22.19","23.9"],"decrease":["22.19"],"fast":["22.19"],"forward":["22.19"],"rewind":["22.19"],"opacity":["22.28"],"left":["22.31","26.31"],"something":["22.34","26.34"],"dosomething":["22.34","26.34"],"onvttload":["22.36"],"modify":["22.36"],"text":["22.36","24.6","24.12"],"loading":["22.38","26.38"],"address":["22.40"],"current":["22.40"],"instance":["22.40","23.4"],"modifying":["22.42"],"existing":["22.42"],"because":["22.46"],"player":["22.46"],"uses":["22.46"],"as":["22.46"],"key":["22.46"],"dimensions":["22.47"],"get":["23.4"],"getinstance":["23.4"],"d":["23.6"],"选项":["23.10"],"com":["24.3"],"默认":["24.4"],"顶部":["24.4"],"底部":["24.4"],"是否开启热力图":["24.5"],"当播放器宽度小于此值时":["24.5"],"弹幕发射器置于播放器底部":["24.5"],"points":["24.5"],"热力图数据":["24.5"],"filter":["24.5"],"弹幕载入前的过滤器":["24.5"],"只支持返回布尔值":["24.5"],"beforeemit":["24.5"],"弹幕发送前的过滤器":["24.5"],"支持返回":["24.5"],"你可以对弹幕做合法校验":["24.6"],"或者做存库处理":["24.6"],"当返回true后才表示把弹幕加入到弹幕队列":["24.6"],"async":["24.6"],"const":["24.6"],"isdirty":["24.6"],"fuck":["24.6"],"test":["24.6"],"plugins":["24.10"],"artplayerplugindanmuku":["24.10"],"xml":["24.11","24.12"],"隐藏弹幕":["24.11"],"发送弹幕":["24.12"],"弹幕大小":["24.13"],"input":["24.13"],"min":["24.13"],"max":["24.13"],"重新加载当前弹幕库":["24.14"],"切换":["24.14"],"error":["24.18"],"加载错误":["24.18"],"config":["24.18"],"配置变化":["24.18"],"外":["25.0"],"不再捆绑其它多国语言":["25.0"],"需要自行导入需要的语言":["25.0"],"lang":["25.2","25.3"],"language":["25.4"],"您可能需要初始化容器元素的大小":["26.1"],"如":["26.1"],"等同于":["26.4"],"document":["26.26"],"queryselector":["26.26"],"menu":["26.30"],"control":["26.31"],"文本的函数":["26.36"],"修改现有的语言":["26.42"],"id":["26.46"]},{"0":["5.11","20.9"],"1":["9.8","13.25","19.8","24.13"],"2":["13.26"],"3":["22.1"],"4":["22.15","22.21","22.36","22.40","22.43","22.45","22.47","22.50"],"5":["9.8","13.23","19.8","20.9"],"6":["15.38"],"7":["15.4","22.26"],"8":["12.0","22.40"],"9":["26.28"],"10":["9.8","13.12","13.14","13.27","19.8"],"11":["22.42","26.42"],"12":["22.36","26.36"],"20":["13.11"],"22":["9.2","9.6","9.7","19.2","19.5","19.7"],"25":["24.13"],"32":["0.13","10.13"],"60":["22.33","26.33"],"120":["26.33"],"150":["9.3","19.3"],"200":["24.5"],"404":["2.11","12.11"],"500":["13.21"],"1000":["22.2"],"2000":["13.24"],"3000":["5.11","13.15"],"5000":["13.4","13.13","13.16"],"二级属性":["0.0"],"mp4":["0.1","0.11","0.12","0.14","2.1","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.19","2.21","2.23","2.25","2.26","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.29","3.30","5.1","5.2","5.3","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.16","5.17","5.18","5.20","5.24","5.27","5.28","5.32","5.33","5.34","5.37","5.43","9.1","9.6","10.8","10.9","10.10","10.15","12.2","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.30","12.39","12.41","13.30","15.1","15.2","15.3","15.7","15.8","15.9","15.10","15.12","15.13","15.17","15.18","15.20","15.24","15.27","15.28","15.29","15.31","15.32","15.33","15.34","15.42","15.43","19.6","20.5","22.17","22.32","22.33","22.49","23.5","24.15","24.16","25.1","26.7","26.24","26.32","26.35","26.49"],"console":["0.1","0.3","0.5","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.2","5.8","5.13","5.14","5.15","5.22","5.26","5.27","5.28","5.29","5.31","5.32","5.33","5.40","7.3","8.2","8.3","10.3","10.16","13.2","15.26","15.31","15.37","15.40","17.3","18.2","18.3","22.28","22.30","22.31","26.28","26.29","26.30"],"info":["0.1","0.3","0.5","1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.12","5.8","5.13","5.15","5.22","5.26","5.28","5.29","5.31","5.32","5.33","7.3","8.2","8.3","10.3","10.5","10.16","15.26","15.31","15.37","17.3","18.2","18.3","22.28","22.30","26.28","26.29","26.30"],"warning":["0.2","1.6","5.11","10.1","10.5","10.6","15.21","15.37","21.0","22.2","22.4","22.17","22.19","22.39","23.3","23.4","26.10","26.39","26.46","26.49"],"提示":["0.2","5.11","23.3","26.46"],"为了方便区别":["0.2"],"元素和普通对象":["0.2"],"播放器里的所有":["0.2"],"click":["0.3","5.19","5.21","6.1","8.1","8.2","8.3","10.3","15.37","16.1","18.1","18.2","18.3","22.28","22.31","24.10","24.11","26.28","26.30","26.31"],"event":["0.3","16.1","18.1","24.11"],"你可以修改":["0.4"],"即可":["0.4"],"zh":["0.6"],"cn":["0.6","21.4","25.4"],"your":["0.6","10.6","20.3","21.3","21.4","22.3","25.3","25.4","26.3"],"ready":["0.7","0.8","0.11","0.12","0.13","0.14","0.15","2.6","2.18","2.22","2.24","5.8","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.22","5.26","5.27","5.28","5.29","5.30","5.31","5.32","5.33","5.41","5.42","6.5","8.5","9.9","10.7","10.9","10.10","12.2","12.18","12.22","12.24","15.8","15.10","15.13","15.22","15.26","15.28","15.29","15.31","15.32","15.33","15.40","15.41","15.42","16.5","18.5","19.9"],"html":["0.8","0.9","0.10","5.19","5.21","14.0","24.10"],"some":["0.8","0.9","0.10","15.37"],"text":["0.8","0.9","0.10","17.1"],"position":["0.9","5.21","5.34","7.1","8.4","14.0","17.1","18.4","24.10"],"video":["0.11","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.5","3.6","3.7","3.28","3.29","3.30","5.1","5.5","5.6","5.7","5.9","5.14","5.16","5.17","5.18","5.20","5.23","5.24","5.25","5.27","5.34","5.37","5.43","9.1","10.8","10.9","10.10","10.15","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.38","12.39","12.40","12.41","13.5","15.20","15.27","15.28","15.29","15.33","15.34","15.43","19.6","20.5","22.17","22.24","22.32","22.33","22.35","22.41","22.49","23.5","24.7","24.16","25.1","26.7","26.17","26.24","26.32","26.35","26.49"],"on":["0.11","0.12","0.13","0.14","0.15","2.6","2.11","2.12","2.18","2.24","5.7","5.8","5.9","5.10","5.12","5.13","5.14","5.15","5.17","5.18","5.20","5.22","5.26","5.27","5.28","5.29","5.31","5.32","5.33","5.41","5.42","6.4","6.5","7.4","10.7","10.9","10.10","12.2","12.6","12.18","12.22","12.24","15.7","15.8","15.10","15.12","15.13","15.22","15.26","15.27","15.28","15.29","15.31","15.32","15.33","15.41","15.42","16.4","16.5","17.4","22.4"],"subtitleoffset":["0.15"],"return":["0.16","9.3","9.4","10.16","15.11","19.3","19.4","24.9","24.12"],"name":["0.16","10.16"],"something":["0.16"],"dosomething":["0.16"],"一级属性":["1.0","5.0"],"app":["1.1","3.3","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.22","3.23","3.28","3.29","3.33","5.4","5.5","5.6","5.23","5.35","5.36","5.38","5.39","10.8","10.9","10.10","10.12","10.14","10.15","12.1","12.3","12.4","12.5","12.11","12.14","12.32","12.33","12.34","12.35","12.36","12.37","12.38","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.5","15.6","15.14","15.16","15.17","15.18","15.23","15.24","15.25","15.35","15.36","15.39","19.1","19.6","21.1","22.9","22.13","22.24","22.26","22.32","22.35","22.36","22.37","22.41","24.8","26.5","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.27","26.35","26.36","26.37","26.40","26.41","26.43","26.44","26.45","26.47","26.48","26.50"],"url":["1.1","3.6","3.7","3.8","3.9","3.10","3.17","3.22","3.28","3.29","5.4","5.5","5.6","5.23","5.25","5.35","5.36","5.37","5.38","5.39","10.8","10.9","10.10","10.12","10.14","10.15","12.1","12.3","12.4","12.5","12.9","12.11","12.12","12.13","12.14","12.15","12.19","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.28","13.29","13.30","15.5","15.6","15.12","15.14","15.16","15.17","15.18","15.20","15.23","15.24","15.25","15.35","15.36","15.39","19.1","19.6","20.5","21.1","22.24","22.41","23.5","24.7","24.8","24.16","26.3","26.5","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.24","26.25","26.37","26.41","26.44","26.45","26.50"],"assets":["1.1","2.1","2.3","2.4","2.14","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","5.1","5.4","5.5","5.6","5.16","5.23","5.25","5.35","5.36","5.37","5.38","5.39","10.8","10.9","10.10","10.12","10.14","10.15","12.1","12.3","12.4","12.5","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.6","13.7","13.28","13.29","13.30","15.1","15.3","15.5","15.6","15.7","15.8","15.9","15.10","15.12","15.14","15.16","15.17","15.18","15.20","15.23","15.24","15.25","15.27","15.28","15.33","19.1","19.6","20.5","21.1","22.24","22.32","22.35","22.41","22.49","23.5","24.7","24.8","24.16","26.5","26.7","26.17","26.24","26.35","26.36","26.37","26.41"],"全部工具函数请参考以下地址":["1.6"],"js":["1.11","10.11","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.1","13.2","13.24","15.38","22.11","22.21","22.26","22.36","22.40","22.47","22.50"],"emit":["2.0","12.0"],"focus":["2.0","12.0"],"移除事件":["2.0"],"sample":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.19","2.27","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","3.5","3.6","3.7","3.8","3.9","3.10","3.17","3.28","3.29","3.30","5.1","5.5","5.6","5.7","5.9","5.16","5.23","5.24","5.25","5.34","5.35","5.36","5.37","5.38","9.1","10.8","10.9","10.10","10.12","10.14","10.15","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.19","12.21","12.23","12.25","12.26","12.27","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.5","13.29","13.30","15.1","15.3","15.7","15.8","15.9","15.10","15.12","15.13","15.14","15.17","15.18","15.20","15.24","15.27","15.28","15.29","15.32","15.33","15.34","15.43","19.1","19.6","20.5","21.1","22.24","22.32","22.35","22.41","22.49","23.5","24.7","24.16","25.1","26.5","26.7","26.17","26.24","26.35","26.36","26.37","26.41"],"true":["2.16","2.17","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.39","3.30","5.2","5.3","5.20","6.2","6.4","6.5","9.1","9.6","10.15","12.17","12.20","12.28","13.1","13.31","13.33","15.2","15.20","16.2","16.4","16.5","19.6","22.17","24.16","26.10","26.32","26.46"],"setting":["2.17","2.20","2.28","3.30","9.1","9.6","12.20","13.30","19.6"],"fullscreen":["2.22"],"srt":["2.28","2.29","2.30","2.31","12.31"],"并调用":["2.46"],"但数据意外未出现":["2.58"],"属性名字全部都是大写的形式":["3.0"],"未来容易发生变动":["3.0"],"new":["3.1","3.4","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","10.8","10.10","10.11","10.12","10.14","11.1","13.3","13.4","13.6","13.7","13.10","13.11","13.12","13.13","13.18","13.19","13.21","13.22","13.23","13.26","13.28","13.31","13.32","13.33","15.4","15.35","15.36","15.38","20.9","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.27","22.34","22.35","22.36","22.37","22.40","22.43","22.44","22.45","22.47","22.48","22.50","23.9","26.6","26.11","26.34","26.36","26.40"],"container":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.28","3.31","3.32","3.33","10.8","10.9","10.10","10.11","10.12","10.14","10.15","12.1","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.4","15.5","15.6","15.14","15.16","15.23","15.25","15.35","15.36","15.39","19.1","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.25","22.26","22.27","22.35","22.36","22.37","22.43","22.44","22.48","22.50","23.3","23.10","24.8","26.3","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.27","26.35","26.36","26.40","26.43","26.44","26.45","26.47","26.48","26.50"],"log":["3.2","5.40","15.40"],"art":["3.14","3.15","3.16","3.19","3.20","3.25","3.26","3.31","10.8","10.10","10.11","10.12","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.22","13.23","13.25","13.26","13.27","13.28","13.31","13.32","13.33","15.4","15.38","20.9","22.3","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.35","22.36","22.37","22.43","22.44","22.45","22.47","22.48","22.50","23.9","26.11","26.26","26.36"],"show":["4.0","6.2","6.3","6.4","14.0","16.2","16.3","22.28","22.30"],"block":["4.0","14.0"],"hide":["4.0","14.0"],"controls":["4.0","5.34","15.34","24.10"],"tooltip":["4.0","7.1","9.7","19.7","26.31"],"muted":["5.2","5.3","5.24","15.2","15.3","26.10"],"seek":["5.10","5.12"],"t":["5.11"],"right":["5.19","5.21","8.3","8.4","14.0","17.1","18.3","18.4","24.10","26.28"],"switch":["5.19"],"function":["5.19","5.21","6.1","8.1","8.2","8.3","16.1","18.1","18.2","18.3","22.28","22.31","24.9","24.11","24.13","26.28","26.30"],"theme":["5.40","15.40"],"settimeout":["5.41","6.5","8.5","9.9","10.13","15.41","16.5","18.5","19.9","26.2"],"subtitle":["5.43","12.29","12.30"],"object":["6.1","8.1"],"组件样式对象":["6.1","8.1"],"false":["6.2","6.3","6.4","9.5","13.18","13.19","13.32","16.2","16.3","16.4","19.5","22.30","24.6"],"update":["6.5","8.5","9.9","16.5","19.9"],"组件挂载后触发":["7.1"],"组件的提示文本":["7.1"],"yellow":["7.2","17.2"],"02":["7.2","17.2"],"onselect":["7.2","17.2"],"item":["7.2","9.5","17.2"],"dom":["7.2","17.2"],"args":["7.3","8.2","8.3","17.3","18.2","18.3","22.28","22.31","26.28","26.30"],"mounted":["7.3","8.2","8.3","17.3","18.2","18.3","24.13"],"style":["7.4","14.0","17.4","20.5","22.31","23.4","23.5","24.13","26.31"],"color":["7.4","17.4","22.31","24.4","26.31"],"red":["7.4","17.4"],"control":["7.5","17.1","17.5"],"by":["7.5","8.5","9.9","17.5","18.5","19.9","22.10"],"absolute":["8.4","14.0","18.4"],"top":["8.4","14.0","18.4"],"50px":["8.4","18.4"],"the":["8.5","9.9","18.5","19.9","22.10"],"button":["9.2"],"img":["9.2","9.6","9.7","14.0","19.2","19.5","19.7"],"heigth":["9.2","9.6","19.2","19.5"],"src":["9.2","9.5","14.0","19.2","19.5","22.38","26.38"],"quality":["9.3","19.3"],"1080p":["9.3","19.3"],"state":["9.5","22.38","24.6","26.38"],"svg":["9.5","9.8","19.5","19.8"],"settings":["9.6","10.4","19.2","19.6"],"slider":["9.6"],"5x":["9.6","9.7","19.6","19.7"],"width":["9.6","9.7","14.0","19.5","19.7","20.5","22.1","26.1"],"icon":["9.7","19.7"],"range":["9.8","19.8"],"instance":["10.0"],"which":["10.0","11.0","15.0"],"reminder":["10.1"],"if":["10.1","10.4","15.37","20.11","22.46","24.11","24.12"],"you":["10.1","10.4","15.30","15.37"],"directly":["10.1"],"and":["10.2","10.4","12.46","17.1"],"plain":["10.2"],"objects":["10.2"],"in":["10.2"],"are":["10.2","15.15"],"mouseenter":["10.3"],"instances":["10.4"],"share":["10.4"],"same":["10.4","15.11"],"localstorage":["10.4"],"want":["10.4"],"different":["10.4"],"players":["10.4"],"use":["10.4","22.1"],"loading":["10.5","12.54"],"this":["10.5","22.39"],"using":["10.6"],"can":["10.6","22.39"],"only":["10.6","22.39"],"var":["10.8","10.10","10.11","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.38","22.5","22.6","22.8","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.26","22.34","22.36","22.40","22.43","22.44","22.45","22.47","22.48","22.50","26.11","26.34","26.36"],"artplayer":["10.8","10.10","10.11","10.12","10.14","11.1","13.1","13.24","15.4","15.5","15.14","15.16","15.35","15.36","15.38","15.39","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.25","22.27","22.34","22.35","22.36","22.37","22.43","22.44","22.45","22.48","22.50","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.27","26.34","26.36","26.40","26.43","26.47","26.48","26.50"],"code":["10.11","22.11"],"flip":["10.15"],"playbackrate":["10.15"],"aspectratio":["10.15"],"constructor":["11.0"],"please":["11.6"],"refer":["11.6"],"remove":["12.0"],"end":["12.42","12.43"],"without":["12.42","12.43"],"duration":["12.45"],"is":["12.46","12.48","12.54","15.30"],"sent":["12.46"],"reached":["12.47"],"not":["12.48","15.30","20.4"],"has":["12.49","12.56","12.57"],"due":["12.53","15.19","15.21","22.17"],"changed":["12.55"],"unexpectedly":["12.58"],"been":["12.59"],"currenttime":["12.60"],"attribute":["12.60"],"temporarily":["12.62"],"uppercase":["13.0"],"subject":["13.0"],"change":["13.0"],"defaults":["13.20"],"ads":["14.0"],"100px":["14.0"],"display":["14.0","24.13"],"none":["14.0"],"20px":["14.0"],"have":["15.11","20.3"],"functionality":["15.11"],"however":["15.11"],"method":["15.11"],"a":["15.11","20.3","21.0"],"promise":["15.11","24.5"],"such":["15.15"],"as":["15.15"],"that":["15.15"],"being":["15.15"],"live":["15.15"],"streamed":["15.15"],"or":["15.15","22.1"],"note":["15.19","22.2"],"to":["15.19","15.21"],"browser":["15.19","15.21","22.17"],"security":["15.19","15.21"],"mechanisms":["15.19","15.21"],"before":["15.19"],"triggering":["15.19"],"jpg":["15.22"],"json":["15.26"],"stringify":["15.26"],"but":["15.30","22.46"],"do":["15.30"],"know":["15.30"],"exact":["15.30"],"property":["15.30"],"tip":["15.37","20.3","20.11","22.19"],"need":["15.37"],"left":["17.1"],"pnpm":["20.1","23.1","24.2"],"com":["20.2","20.11","23.2","23.11"],"must":["20.3"],"responsive":["20.4"],"modifying":["20.4"],"https":["20.5","23.5"],"org":["20.5","23.5"],"600px":["20.5"],"height":["20.5","22.1","26.1"],"400px":["20.5","22.1","26.1"],"margin":["20.5"],"d":["20.6"],"null":["20.8","23.8"],"volume":["20.9"],"options":["20.10"],"option":["20.10","23.10"],"unpkg":["20.11","23.11"],"own":["21.0"],"when":["21.0","22.7"],"cannot":["21.0"],"be":["21.0"],"matched":["21.0"],"lang":["21.2","21.3"],"script":["21.2","25.2"],"i18n":["21.3","25.0","25.3"],"play":["21.4","22.19","25.4"],"300px":["22.1","26.1"],"support":["22.2"],"for":["22.2"],"three":["22.2"],"file":["22.2"],"formats":["22.2"],"size":["22.7"],"last":["22.7"],"upon":["22.10"],"entering":["22.10"],"cover":["22.11"],"div":["22.11"],"classname":["22.11"],"run":["22.11"],"space":["22.19"],"toggle":["22.19"],"pause":["22.19"],"these":["22.19"],"document":["22.26"],"queryselector":["22.26"],"setting02":["22.29","26.29"],"green":["22.31","26.31"],"one":["22.33","26.33"],"more":["22.33","26.33"],"chance":["22.33","26.33"],"gif":["22.38","26.38"],"recognition":["22.39"],"extensions":["22.39"],"player":["22.39"],"parse":["22.39"],"cache":["22.46"],"progress":["22.46"],"of":["22.46"],"播放器的尺寸依赖于容器":["23.3"],"的尺寸":["23.3"],"ts":["23.6"],"types":["23.10"],"const":["23.10"],"ffffff":["24.4"],"弹幕颜色":["24.4"],"默认为白色":["24.4"],"beforevisible":["24.5"],"弹幕显示前的过滤器":["24.5"],"visible":["24.5"],"弹幕层是否可见":["24.5"],"emitter":["24.5"],"是否开启弹幕发射器":["24.5"],"maxlength":["24.5"],"弹幕输入框最大长度":["24.5"],"await":["24.6"],"这里是所有弹幕的过滤器":["24.6"],"包含来自服务端的和来自用户输入的":["24.6"],"plugins":["24.9","24.15","24.16","24.17"],"artplayerplugindanmuku":["24.9","24.15","24.16","24.17"],"xml":["24.10"],"隐藏弹幕":["24.10"],"prompt":["24.12"],"请输入弹幕文本":["24.12"],"弹幕测试文本":["24.12"],"trim":["24.12"],"value":["24.13"],"flex":["24.13"],"alignitems":["24.13"],"center":["24.13"],"切换到新的弹幕库":["24.14"],"config":["24.14"],"v2":["24.14"],"fullscreenweb":["24.16"],"stop":["24.18"],"弹幕停止":["24.18"],"start":["24.18"],"弹幕开始":["24.18"],"当无法匹配到语言时":["25.0"],"会默认显示英文":["25.0"],"或者使用":["26.1"],"aspect":["26.1"],"热键":["26.19"],"描述":["26.19"],"增加音量":["26.19"],"降低音量":["26.19"],"innerhtml":["26.26"],"opacity":["26.28"],"sd":["26.32"],"ploading":["26.38"],"后缀的识别":["26.39"],"播放器只能解析这种后缀":["26.39"],"因为播放器默认使用":["26.46"]},{"0":["20.5","23.5"],"2":["5.28"],"4":["22.11"],"5":["5.7","5.8","5.14","15.7","26.7"],"8":["2.0"],"9":["5.29","22.1"],"10":["5.10","5.12","15.10","15.12"],"16":["5.29","15.29","22.1","24.12","26.1"],"22":["19.6"],"60":["22.35","24.5","26.35"],"120":["22.33"],"180":["22.33","26.33"],"200":["24.6"],"240":["26.33"],"360":["9.3"],"720":["9.3","19.3"],"1000":["0.8","0.9","0.10","0.15","10.8","10.9","24.5","26.2"],"1080":["9.3","19.3"],"5000":["0.13","10.13"],"比较少用":["0.0"],"warning":["0.1","0.5","0.6","0.7","0.8","5.15","5.19","5.21","5.26","5.30","5.37","10.3","10.7","10.9","10.13","15.26","20.5","22.28","22.29","22.30","22.31","22.38","22.41","22.49","26.2","26.4","26.7","26.17","26.19","26.30","26.31","26.38","26.41"],"提示":["0.1","5.15","5.19","5.21","5.30","26.2","26.7","26.10","26.17"],"假如直接修改这个":["0.1"],"元素都是以":["0.2"],"开头命名的":["0.2"],"这是所有":["0.2"],"元素的定义":["0.2"],"mouseenter":["0.3"],"mouseleave":["0.3","10.3"],"loading":["0.5","12.49"],"这是所有图标的定义":["0.5"],"types":["0.5","1.6","25.0","26.49"],"使用":["0.6","24.9"],"只能更新实例化之后的":["0.6"],"to":["0.7","11.6","22.2","22.30","22.31"],"play":["0.7","4.0","5.2","10.7","15.2","21.3","22.2","25.3"],"如果想马上隐藏":["0.7"],"settimeout":["0.8","0.9","0.10","0.12","0.13","0.14","0.15","5.2","5.3","5.7","5.10","5.12","5.20","6.4","7.4","8.4","9.8","10.8","10.9","10.10","10.15","15.2","15.7","15.10","15.12","16.4","17.4","18.4","19.8"],"false":["0.8","0.9","0.10","0.14","0.15","10.8","10.9","10.10","10.15","22.28","24.4","26.28","26.30"],"left":["0.9","7.1","10.9"],"true":["0.10","0.12","2.19","3.5","3.6","3.7","3.28","3.29","5.1","5.13","5.24","5.31","6.3","10.10","12.16","12.19","12.21","12.22","12.23","12.24","12.25","12.26","12.39","13.5","13.6","13.7","13.28","13.29","13.30","15.1","15.3","15.24","15.31","16.3","19.1","22.24","22.32","26.17","26.24"],"srt":["0.11","5.43","12.28","12.29","12.30","15.43"],"on":["0.16","2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.13","2.14","2.15","2.16","2.17","2.19","2.20","2.21","2.23","2.25","2.26","2.27","2.28","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.8","3.9","3.10","3.17","5.1","5.2","5.3","5.4","5.5","5.6","5.16","5.23","5.24","5.25","5.35","5.36","5.43","8.4","9.8","10.8","10.11","10.12","10.14","10.15","12.1","12.3","12.4","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.17","12.19","12.20","12.21","12.23","12.25","12.26","12.27","12.28","12.29","12.30","12.31","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.8","13.9","13.10","13.17","15.1","15.2","15.3","15.5","15.6","15.9","15.14","15.16","15.17","15.18","15.20","15.21","15.23","15.24","15.25","15.35","15.36","15.43","18.4","19.8","24.15","24.17","26.4"],"非常少使用":["1.0"],"sample":["1.1","3.1","3.3","3.4","3.11","3.12","3.13","3.18","3.21","3.22","3.23","3.24","3.27","3.31","3.32","3.33","5.4","5.39","10.11","11.1","12.1","13.6","13.7","13.8","13.9","13.10","13.11","13.12","13.13","13.17","13.21","13.22","13.28","13.33","15.4","15.5","15.6","15.16","15.23","15.25","15.35","15.36","15.38","15.39","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.25","22.27","22.34","22.36","22.37","22.40","22.43","22.44","22.45","22.48","22.50","23.10","24.8","26.6","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.27","26.34","26.40","26.43","26.44","26.45","26.47","26.48","26.50"],"video":["1.1","3.8","3.9","3.10","3.11","3.12","3.13","3.17","3.21","3.22","3.23","3.24","3.31","3.33","5.4","5.38","10.11","10.12","10.14","11.1","12.1","12.37","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","15.4","15.23","15.38","19.1","20.10","21.1","22.9","22.27","23.10","24.8","26.5","26.6","26.8","26.9","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.27","26.36","26.37","26.41","26.43","26.44","26.45","26.47","26.48"],"mp4":["1.1","3.8","3.9","3.10","3.17","3.22","3.28","5.4","5.5","5.6","5.23","5.25","5.35","5.36","5.38","5.39","10.11","10.12","10.14","12.1","12.3","12.4","12.5","12.11","12.14","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.40","13.5","13.6","13.7","13.8","13.9","13.10","13.17","13.22","13.28","13.29","15.4","15.5","15.6","15.14","15.16","15.23","15.25","15.35","15.36","15.38","15.39","19.1","20.10","21.1","22.5","22.14","22.16","22.24","22.35","22.36","22.37","22.41","23.10","24.7","24.8","26.5","26.8","26.9","26.13","26.14","26.15","26.16","26.17","26.21","26.25","26.36","26.37","26.41","26.44","26.45","26.50"],"artplayer":["1.2","1.3","1.4","1.5","1.7","1.8","1.9","1.10","1.11","1.12","3.2","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","13.2","22.11","22.21","22.40","22.47"],"d":["1.6"],"info":["1.11","2.12","5.14","5.27","5.37","5.38","9.5","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","15.8","15.13","15.14","15.22","15.27","15.28","15.29","15.32","15.33","19.5","20.5","22.31","23.5","24.17","26.31"],"const":["2.0","5.17","5.18","9.5","12.0","15.17","15.18","19.5","20.10","24.13"],"onready":["2.0","12.0"],"console":["2.1","2.3","2.4","2.5","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.29","2.30","2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.40","2.41","5.24","5.37","5.38","5.39","9.5","11.2","11.3","11.4","11.5","11.7","11.8","11.9","11.10","11.11","11.12","12.7","12.8","12.9","12.10","12.12","12.13","12.15","12.27","12.31","12.41","15.8","15.13","15.14","15.22","15.27","15.28","15.29","15.32","15.33","15.39","19.5","20.5","23.5","24.17","26.31"],"event":["2.5","2.7","2.8","2.9","2.10","2.12","2.13","2.22","2.41","5.37","9.2","9.5","12.5","12.7","12.8","12.9","12.10","12.12","12.13","12.22"],"reconnecttime":["2.11","12.11"],"state":["2.12","2.15","2.16","2.21","2.23","2.24","2.25","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","9.2","9.6","9.7","12.12","12.15","12.21","12.23","12.24","12.25","12.32","12.33","12.34","12.35","12.36","12.38","19.2","19.7"],"height":["2.18","19.6","23.5"],"datauri":["2.26","12.26"],"currenttime":["2.27","12.27"],"offset":["2.28"],"cues":["2.29","2.30","2.31","12.29","12.30","12.31"],"option":["2.31","12.31"],"load":["2.46","12.46"],"方法重新加载它":["2.46"],"基本上用不到":["3.0"],"app":["3.1","3.4","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.24","3.25","3.26","3.27","3.31","3.32","10.11","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.38","20.10","22.3","22.5","22.6","22.8","22.11","22.12","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.27","22.34","22.40","22.43","22.44","22.45","22.47","22.48","22.50","23.10","26.3","26.11","26.34"],"url":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.22","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.4","15.38","20.10","22.3","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.27","22.34","22.37","22.43","22.44","22.45","22.47","22.48","22.50","23.10","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.26","26.27","26.34","26.43","26.47","26.48"],"assets":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.22","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","10.11","11.1","13.3","13.4","13.8","13.9","13.10","13.11","13.12","13.13","13.17","13.21","13.22","13.23","13.31","13.32","13.33","15.4","15.35","15.36","15.38","15.39","20.10","22.5","22.6","22.8","22.9","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.21","22.22","22.23","22.25","22.27","22.34","22.36","22.37","22.40","22.43","22.44","22.45","22.47","22.48","22.50","23.10","26.3","26.6","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.21","26.22","26.23","26.25","26.26","26.27","26.34","26.40","26.43","26.44","26.45","26.47","26.48","26.50"],"loop":["3.5","3.6","3.7","13.5","13.6","13.7"],"flip":["3.5","3.6","3.7","13.5"],"dblclick":["3.17"],"setting":["3.28","3.29","12.17","12.28","13.28","13.29","19.1","24.13"],"playbackrate":["3.28","13.28"],"contextmenu":["3.28","3.29","3.30","13.29","13.30"],"aspectratio":["3.29","13.29"],"show":["3.29","3.30","9.8","13.30","19.8","24.11","24.18","26.28","26.30"],"click":["4.0","5.34","5.37","14.0","15.34"],"marginright":["4.0","14.0"],"比较常用":["5.0"],"muted":["5.1","15.1","15.24"],"ready":["5.2","5.3","5.5","5.6","5.7","5.9","5.16","5.20","5.23","5.24","5.25","6.4","7.4","8.4","9.8","10.8","10.11","10.12","10.14","10.15","12.0","12.6","15.2","15.3","15.7","15.9","15.12","15.14","15.16","15.17","15.18","15.20","15.24","15.27","16.4","17.4","18.4","19.8","24.17"],"seek":["5.7","15.7","15.10","15.12"],"switch":["5.11"],"和":["5.11","7.1","24.5"],"的功能是一样的":["5.11"],"只是":["5.11"],"有的视频是没有时长的":["5.15"],"async":["5.17","5.18","15.17","15.18"],"await":["5.17","5.18","15.17","15.18"],"t":["5.22"],"json":["5.26"],"stringify":["5.26"],"resize":["5.30","24.15"],"当你的容器只有宽度":["5.30"],"playsinline":["5.31","15.31","26.37"],"m3u8":["5.32","22.2","26.40"],"000":["5.33"],"right":["5.34","7.1","15.34"],"html":["5.34","10.8","10.9","10.10","15.34","20.1","23.1"],"green":["5.40","15.40"],"1080p":["5.41","15.41"],"png":["5.42","15.42","22.35","22.38","26.35","26.38"],"组件点击事件":["6.1","8.1"],"mounted":["6.1","8.1","16.1","18.1","22.28","26.28"],"组件挂载后触发":["6.1","8.1"],"get":["6.2","6.3","7.2","7.3","8.2","8.3","16.2","16.3","17.2","17.3","18.2","18.3"],"the":["6.2","6.3","6.4","6.5","7.2","7.3","7.4","8.2","8.3","8.4","9.8","16.2","16.3","16.4","16.5","17.2","17.3","17.4","18.2","18.3","18.4","19.8","22.19","22.30"],"element":["6.2","6.3","7.2","7.3","8.2","8.3","16.2","16.3","17.2","17.3","18.2","18.3"],"of":["6.2","6.3","7.2","7.3","8.2","8.3","12.53","15.37","16.2","16.3","17.2","17.3","18.2","18.3","22.38"],"by":["6.2","6.3","6.4","6.5","7.2","7.4","8.4","16.2","16.3","16.4","16.5","17.2","17.4","18.4","21.0"],"delete":["6.4","7.4","8.4","9.8"],"控制控制器出现的左右位置":["7.1"],"selector":["7.1","17.1"],"array":["7.1","17.1"],"return":["7.2","17.2"],"control":["7.2","7.3","7.4","17.2","17.3","17.4"],"200px":["8.5","18.5"],"svg":["9.2","9.6","9.7","19.2","19.6","19.7"],"item":["9.2","9.6","19.5"],"720p":["9.3","19.3"],"360p":["9.3","19.3"],"nextstate":["9.5","19.5"],"src":["9.6","9.7","19.6","19.7"],"heigth":["9.7","19.7"],"pip":["9.9","19.9"],"mode":["9.9","19.9"],"close":["9.9","19.9"],"are":["10.0","11.0","15.0"],"less":["10.0"],"commonly":["10.0","15.0"],"modify":["10.1","10.4","20.11"],"this":["10.1"],"object":["10.1"],"named":["10.2"],"starting":["10.2"],"with":["10.2"],"a":["10.2","12.48","15.21"],"here":["10.2"],"is":["10.2","10.5","16.1","18.1","22.7","22.46"],"definition":["10.2","10.5","22.38"],"if":["10.3","10.6","22.2","22.4","22.17"],"you":["10.3","10.6","20.3","22.46"],"need":["10.3","20.11","22.2","22.46"],"some":["10.3","10.8","10.9","10.10"],"only":["10.3","10.13","15.37","22.19"],"exist":["10.3","15.37"],"during":["10.3","15.37"],"lifecycle":["10.3"],"can":["10.4","15.11","20.3"],"accordingly":["10.4"],"after":["10.6","10.13","16.1","18.1","22.19"],"instantiation":["10.6"],"want":["10.6"],"before":["10.6"],"please":["10.6","20.11","22.29","22.30"],"immediately":["10.7"],"hide":["10.7","24.18"],"text":["10.8","10.9","10.10","24.7","24.9"],"position":["10.9","15.34"],"shortcut":["10.13"],"keys":["10.13"],"will":["10.13","20.4","22.19"],"work":["10.13","22.19"],"subtitleoffset":["10.15"],"something":["10.16"],"dosomething":["10.16"],"very":["11.0","15.30"],"rarely":["11.0"],"container":["11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","15.38","20.10","22.3","22.21","22.34","22.40","22.45","22.47","26.34"],"following":["11.6","20.11"],"address":["11.6","22.17"],"off":["12.0"],"fullscreen":["12.22"],"having":["12.42"],"stop":["12.42"],"for":["12.42","12.43","21.0","22.10","22.49"],"stopping":["12.43"],"content":["12.43"],"property":["12.45"],"changes":["12.45"],"method":["12.46"],"called":["12.46"],"end":["12.47"],"point":["12.47"],"supported":["12.48"],"finished":["12.49"],"lack":["12.53"],"resources":["12.54"],"completed":["12.56"],"started":["12.57"],"has":["12.58","12.60"],"not":["12.58"],"suspended":["12.59"],"missing":["12.62"],"future":["13.0"],"and":["13.0","20.11"],"new":["13.1","13.14","13.15","13.16","13.24","13.25","13.27","20.8","22.11","22.26","23.8","26.26"],"log":["13.2"],"art":["13.24","22.11","22.26"],"controls":["14.0"],"tooltip":["14.0"],"quite":["15.0"],"when":["15.11"],"it":["15.11","15.30","15.37"],"resolves":["15.11"],"indicates":["15.11"],"that":["15.11"],"played":["15.11"],"been":["15.15"],"fully":["15.15"],"decoded":["15.15"],"in":["15.15","20.4"],"which":["15.15"],"page":["15.19","22.10"],"must":["15.19","22.10"],"have":["15.19"],"had":["15.19"],"an":["15.19","17.1","22.4"],"user":["15.21"],"interaction":["15.21"],"e":["15.21"],"g":["15.21"],"useful":["15.30"],"as":["15.30","22.2","22.7"],"s":["15.30"],"lifespan":["15.37"],"triggered":["16.1","18.1"],"context":["16.4"],"controller":["17.1"],"objects":["17.1"],"selection":["17.1"],"list":["17.1"],"onselect":["17.1"],"img":["19.6"],"width":["19.6","23.5"],"see":["20.3"],"more":["20.3","22.41"],"examples":["20.3"],"use":["20.3"],"at":["20.3"],"directly":["20.4"],"60px":["20.5","23.5"],"auto":["20.5","23.5"],"non":["20.5"],"responsive":["20.5"],"ts":["20.6"],"current":["20.8","23.8"],"tip":["20.9","23.3","23.9","23.11"],"complete":["20.9"],"typescript":["20.9","23.9"],"support":["20.11"],"even":["20.11"],"older":["20.11"],"configuration":["20.11","22.28","22.30","22.31"],"then":["20.11","22.46"],"displayed":["21.0"],"default":["21.0"],"i18n":["21.0"],"usage":["21.0"],"lang":["21.1","25.1"],"window":["21.2","25.2"],"imported":["21.4","25.4"],"aspect":["22.1"],"ratio":["22.1","26.1"],"ogg":["22.2","26.2"],"webm":["22.2","26.2"],"other":["22.2"],"such":["22.2","22.7"],"or":["22.2"],"inside":["22.4"],"callback":["22.4"],"refers":["22.4"],"instance":["22.4"],"but":["22.4","22.39"],"arrow":["22.4"],"initialized":["22.7"],"next":["22.7"],"time":["22.7"],"refreshing":["22.7"],"be":["22.10"],"set":["22.10"],"var":["22.11"],"security":["22.17"],"mechanisms":["22.17"],"source":["22.17"],"player":["22.19"],"gains":["22.19"],"focus":["22.19"],"innerhtml":["22.26"],"component":["22.28","22.30","22.31"],"refer":["22.30","22.31"],"sd":["22.32"],"480p":["22.32","26.32"],"谁でもいいはずなのに":["22.33","26.33"],"夏の想い出がまわる":["22.33","26.33"],"all":["22.38"],"cannot":["22.39"],"zh":["22.42","26.42"],"cn":["22.42","26.42"],"same":["22.46"],"different":["22.46"],"reference":["22.49"],"syntax":["22.49"],"所以你的容器":["23.3"],"必须是有尺寸的":["23.3"],"以下链接可以看到更多的使用例子":["23.3"],"非响应式":["23.4"],"在":["23.4"],"600px":["23.5"],"400px":["23.5"],"margin":["23.5"],"全部":["23.9"],"定义":["23.9"],"volume":["23.10"],"假如你要兼容更古老的浏览器时":["23.11"],"border":["24.4"],"弹幕是否有描边":["24.4"],"默认为":["24.4"],"locktime":["24.5"],"输入框锁定时间":["24.5"],"theme":["24.5"],"dark":["24.5","24.16"],"弹幕主题":["24.5"],"支持":["24.5"],"length":["24.6"],"这是弹幕即将显示的时触发的函数":["24.6"],"当返回true后才表示可以马上发送到播放器里":["24.6"],"弹幕已经出现在播放器里":["24.6"],"你可以访问到弹幕的dom元素里":["24.6"],"plugins":["24.7","24.8"],"artplayerplugindanmuku":["24.7","24.8"],"promise":["24.9"],"resovle":["24.9"],"function":["24.10","26.31"],"target":["24.11"],"innertext":["24.11"],"else":["24.11"],"color":["24.12"],"math":["24.12"],"floor":["24.12"],"random":["24.12"],"0xffffff":["24.12"],"tostring":["24.12"],"queryselector":["24.13"],"addeventlistener":["24.13"],"追加":["24.14"],"追加新的弹幕库":["24.14"],"参数类型和option":["24.14"],"danmuku相同":["24.14"],"xml":["24.15","24.17"],"弹幕隐藏":["24.18"],"弹幕显示":["24.18"],"写法参考":["25.0","26.49"],"默认支持三种视频文件格式":["26.2"],"播放器会缓存最后一次音量的大小":["26.7"],"假如希望默认进入页面就能自动播放视频":["26.10"],"必需为":["26.10"],"视频快进":["26.19"],"视频快退":["26.19"],"space":["26.19"],"切换播放":["26.19"],"暂停":["26.19"],"subtitle":["26.24"],"组件配置":["26.30"],"args":["26.31"],"hd":["26.32"],"webkit":["26.37"],"全部图标的定义":["26.38"],"但无法解析这种后缀":["26.39"],"作为":["26.46"],"key":["26.46"],"来缓存播放进度的":["26.46"],"但假如你的同一个视频的":["26.46"]},{"0":["5.9","5.10","5.12","5.15","5.22","15.9","15.10","15.12","15.15","15.22","20.10","23.10"],"1":["5.43","9.7","15.43","19.7","24.7","24.9"],"2":["5.7","15.7","15.28"],"5":["5.5","5.6","9.7","15.5","15.6","15.8","15.14","19.7","20.10","23.10"],"9":["15.29","26.1"],"10":["5.42","9.7","15.42","19.7","22.35","26.35"],"60":["5.42","15.42"],"240":["22.33"],"300":["22.33","26.33"],"360":["19.3"],"404":["3.14","3.15","13.14","13.15"],"1000":["0.12","0.14","10.10","10.12","10.14","10.15"],"3000":["5.2","5.3","5.7","5.10","5.12","5.20","5.41","6.4","6.5","7.4","7.5","8.4","8.5","9.8","9.9","15.2","15.3","15.7","15.10","15.12","15.20","15.41","16.4","16.5","17.4","17.5","18.4","18.5","19.8","19.9"],"对象":["0.1"],"播放器不会马上做出响应":["0.1"],"types":["0.2","2.0","10.2","10.5","11.6","20.9","21.0","22.38","22.49","23.9","26.38"],"d":["0.2","0.5","2.0","10.2","10.5","11.6","12.0","21.0","22.38","22.49","25.0","26.38","26.49"],"ts":["0.2","0.5","1.6","2.0","10.2","10.5","11.6","12.0","21.0","22.38","22.49","25.0","26.38","26.49"],"warning":["0.3","0.9","0.10","0.13","0.15","2.0","10.8","10.10","10.15","12.0","22.1","22.35","22.42","23.5","26.1","26.28","26.29","26.35","26.42"],"提示":["0.3","0.13","5.26","5.37","26.1","26.4","26.19"],"假如你需要一些":["0.3","5.37"],"事件只存在于播放器的生命周期上时":["0.3","5.37"],"强烈建议使用这些函数":["0.3"],"以避免造成内存泄漏":["0.3","5.37"],"your":["0.4","5.16","10.4","15.16"],"假如想在实例化之前更新":["0.6"],"请使用基础选项的":["0.6"],"来更新":["0.6"],"的显示":["0.7"],"组件配置":["0.8","0.9","0.10","26.28","26.31"],"请参考以下地址":["0.8","0.9","0.10","0.15","26.28","26.29","26.30","26.31"],"component":["0.8","0.9","0.10","0.15","10.8","10.9","10.10","10.15","22.29","26.28","26.29","26.30","26.31"],"color":["0.11","10.11","22.36","26.36"],"red":["0.11","10.11"],"false":["0.12","5.20","9.9","10.12","10.14","15.20","19.9","22.44","26.44"],"只在播放器获得焦点后":["0.13","26.19"],"如点击了播放器后":["0.13","26.19"],"这些快捷键才会生效":["0.13","26.19"],"true":["0.14","3.11","3.12","3.13","3.21","3.22","3.23","3.24","5.23","10.12","10.14","13.11","13.12","13.13","13.21","13.22","13.23","13.24","15.13","15.23","22.8","22.9","22.11","22.12","22.13","22.14","22.15","22.16","22.18","22.20","22.22","22.23","22.25","22.26","22.37","22.43","22.45","22.47","22.48","24.12","26.8","26.9","26.11","26.12","26.13","26.14","26.15","26.16","26.18","26.20","26.22","26.23","26.25","26.26","26.37","26.43","26.45","26.47","26.48"],"设置面板":["0.15"],"html":["0.15","10.15","22.41","22.42","24.2","26.41","26.42"],"ready":["0.16","2.0","5.1","5.4","5.43","10.16","15.1","15.4","15.5","15.6","15.23","15.25","15.43"],"off":["2.0"],"全部事件请参考以下地址":["2.0"],"events":["2.0"],"info":["2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","2.31","5.17","5.18","5.24","5.35","5.36","5.39","9.2","9.6","12.1","12.2","12.3","12.4","12.5","12.6","12.7","12.8","12.9","12.10","12.11","12.12","12.13","12.14","12.15","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.27","12.28","12.29","12.30","12.31","15.17","15.18","15.24","15.35","15.36","15.38","15.39","19.2","19.6"],"console":["2.2","2.6","2.19","2.28","2.39","3.8","3.9","3.10","3.17","5.17","5.18","5.35","5.36","9.2","9.6","12.1","12.2","12.3","12.4","12.5","12.6","12.11","12.14","12.16","12.17","12.18","12.19","12.20","12.21","12.22","12.23","12.24","12.25","12.26","12.28","12.29","12.30","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","13.8","13.9","13.10","13.17","15.17","15.18","15.24","15.35","15.36","15.38","19.2","19.6"],"log":["2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","3.8","3.9","3.10","3.17","12.32","12.33","12.34","12.35","12.36","12.37","12.38","12.39","12.40","12.41","13.8","13.9","13.10","13.17"],"video":["3.1","3.3","3.4","3.16","3.18","3.19","3.20","3.25","3.26","3.27","3.32","13.3","13.4","13.11","13.12","13.13","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","22.3","22.6","22.8","22.11","22.12","22.18","22.20","22.21","22.22","22.23","22.25","22.26","22.34","22.43","22.48","26.3","26.11","26.26","26.34"],"mp4":["3.1","3.3","3.4","3.11","3.12","3.13","3.14","3.15","3.16","3.18","3.19","3.20","3.21","3.23","3.24","3.25","3.26","3.27","3.31","3.32","3.33","11.1","13.1","13.3","13.4","13.11","13.12","13.13","13.14","13.15","13.16","13.18","13.19","13.21","13.23","13.24","13.25","13.26","13.27","13.31","13.32","13.33","22.3","22.6","22.8","22.9","22.11","22.12","22.13","22.15","22.18","22.20","22.21","22.22","22.23","22.25","22.26","22.27","22.34","22.43","22.44","22.45","22.47","22.48","22.50","26.3","26.6","26.11","26.12","26.18","26.20","26.22","26.23","26.26","26.27","26.34","26.43","26.47","26.48"],"playbackrate":["3.5","3.6","3.7","13.5","13.6","13.7"],"aspectratio":["3.5","3.6","3.7","13.5","13.6","13.7"],"autoplayback":["3.11","3.12","3.13","13.11","13.12","13.13"],"sample":["3.14","3.15","3.16","3.19","3.20","3.25","3.26","13.1","13.3","13.4","13.14","13.15","13.16","13.18","13.19","13.23","13.24","13.25","13.26","13.27","13.31","13.32","22.3","22.11","22.21","22.26","22.47","26.3","26.26"],"autoorientation":["3.21","13.21"],"show":["3.22","3.28","13.22","13.28","13.29"],"fastforward":["3.23","3.24","13.23","13.24"],"fullscreenweb":["3.31","13.31"],"miniprogressbar":["3.33","13.33"],"pause":["4.0","14.0"],"layer":["4.0","14.0"],"png":["4.0","14.0"],"t":["5.9","5.10","5.12","15.9","15.10","15.12","15.22"],"方法会返回":["5.11"],"promise":["5.11"],"当":["5.11"],"resolve":["5.11"],"时表示新地址是可以播放":["5.11"],"reject":["5.11"],"时表示新地址加载错误":["5.11"],"例如直播中的视频或者没被解码完成的视频":["5.15"],"这个时候获取的时长会是":["5.15"],"name":["5.16"],"由于浏览器安全机制":["5.19","5.21","26.17"],"触发窗口全屏前":["5.19"],"页面必须先存在交互":["5.19","5.21"],"例如用户点击过页面":["5.19","5.21"],"触发画中画前":["5.21"],"尺寸和坐标信息是通过":["5.26"],"getboundingclientrect":["5.26","15.26"],"获取的":["5.26"],"但不知道具体高度时":["5.30"],"这个属性很有用":["5.30"],"它能自动计算出视频的高度":["5.30"],"但你需要确定设置这个属性的时机":["5.30"],"强烈建议使用该函数":["5.37"],"4k":["5.41","15.41"],"number":["5.42","15.42","24.13"],"column":["5.42","15.42"],"tooltip":["6.1","8.1","16.1","18.1"],"组件的提示文本":["6.1","8.1"],"remove":["6.4","7.4","8.4","9.8","16.4","17.4","18.4","19.8"],"选择列表的对象数组":["7.1"],"onselect":["7.1"],"选择列表的元素被点击时触发的函数":["7.1"],"by":["7.3","8.2","8.3","9.8","17.3","18.2","18.3","19.8"],"left":["8.5","18.5","22.2"],"return":["9.2","9.5","9.6","19.2","19.5","19.6"],"switchquality":["9.3","19.3"],"open":["9.5","19.5"],"event":["9.6"],"x":["9.6","19.6"],"range":["9.7","19.7"],"switch":["9.9","19.9"],"used":["10.0","11.0","15.0","22.4"],"will":["10.1","15.15","20.5","22.4"],"not":["10.1","13.0","20.5","22.4"],"respond":["10.1"],"immediately":["10.1"],"of":["10.3","10.7","12.0"],"it":["10.3","12.46","20.11","22.7"],"strongly":["10.3"],"recommended":["10.3","15.37"],"use":["10.3","10.6","15.37","22.39"],"these":["10.3"],"functions":["10.3"],"avoid":["10.3","15.37"],"causing":["10.3","15.37"],"memory":["10.3","15.37"],"leaks":["10.3","15.37"],"from":["10.6","17.1"],"basic":["10.6"],"options":["10.6","22.1"],"for":["10.6","12.0","22.4"],"configuration":["10.8","10.9","10.10"],"please":["10.8","10.9","10.10","10.15","12.0","22.2","22.10","22.28"],"refer":["10.8","10.9","10.10","10.15","12.0","20.11","21.0","22.2","22.28","22.29"],"following":["10.8","10.9","10.10","10.15","12.0","20.3","22.28","22.29","22.30","22.31"],"address":["10.8","10.9","10.10","12.0","22.28","22.29","22.30","22.31"],"srt":["10.11","22.24","26.24"],"settimeout":["10.12","10.14","15.3","15.20"],"has":["10.13"],"gained":["10.13"],"focus":["10.13"],"e":["10.13","15.19"],"g":["10.13","15.19"],"clicking":["10.13","22.19"],"link":["10.15","20.3"],"on":["10.16","15.4","15.19","22.2","22.19","24.6"],"a":["12.0"],"full":["12.0"],"list":["12.0"],"state":["12.37","12.39"],"further":["12.42"],"buffering":["12.42","12.43"],"to":["12.46","15.30","22.28","22.29"],"reload":["12.46"],"format":["12.48"],"data":["12.53","12.62"],"appeared":["12.58"],"changed":["12.60"],"basically":["13.0"],"needed":["13.0"],"assets":["13.1","13.14","13.15","13.16","13.18","13.19","13.24","13.25","13.26","13.27","22.3","22.11","22.26"],"flip":["13.6","13.7"],"dblclick":["13.17"],"contextmenu":["13.28"],"play":["14.0"],"rejects":["15.11"],"there":["15.11"],"was":["15.11"],"an":["15.11"],"error":["15.11"],"loading":["15.11"],"case":["15.15"],"obtained":["15.15","15.26"],"be":["15.15"],"interaction":["15.19"],"user":["15.19"],"clicked":["15.19","17.1"],"page":["15.21","22.7"],"must":["15.21"],"occur":["15.21","22.17"],"before":["15.21"],"triggering":["15.21"],"coordinates":["15.26"],"are":["15.26","22.17"],"via":["15.26"],"need":["15.30"],"make":["15.30"],"sure":["15.30"],"m3u8":["15.32","22.40","26.2"],"000":["15.33"],"highly":["15.37"],"this":["15.37","22.7"],"text":["16.1","18.1"],"when":["17.1"],"item":["17.1","19.6"],"script":["20.1","23.1","24.2"],"packages":["20.3","20.9","23.3","23.9"],"template":["20.3","23.3"],"change":["20.4","20.5","24.13"],"the":["20.4","20.5","22.28","22.29","22.31"],"player":["20.4"],"in":["20.5"],"directly":["20.5"],"modifying":["20.5"],"definitions":["20.9"],"volume":["20.10"],"art8":["20.10","23.10"],"new":["20.10","23.10"],"yourself":["20.11"],"scripts":["20.11","23.11"],"documentation":["20.11"],"browserslist":["20.11","23.11"],"or":["21.1","25.1"],"tip":["22.1"],"among":["22.1"],"all":["22.1"],"only":["22.1"],"is":["22.1"],"mandatory":["22.1"],"flv":["22.2","26.2"],"third":["22.2"],"party":["22.2"],"libraries":["22.2"],"side":["22.2"],"point":["22.4"],"jpg":["22.5","26.5"],"ffad00":["22.6","26.6"],"read":["22.7","22.10"],"cached":["22.7"],"value":["22.7"],"more":["22.10","22.42"],"information":["22.10"],"policy":["22.10","26.10"],"changes":["22.10","26.10"],"url":["22.11","22.26"],"setting":["22.14","22.15","22.16","22.24","26.14","26.15","26.16","26.24"],"website":["22.17"],"cross":["22.17"],"origin":["22.17"],"failure":["22.17"],"may":["22.17"],"such":["22.19"],"as":["22.19"],"hd":["22.32"],"720p":["22.32","26.32"],"こんなとこにあるはずもないのに":["22.33","26.33"],"终わり":["22.33","26.33"],"online":["22.35"],"generation":["22.35"],"tool":["22.35","26.35"],"03a9f4":["22.36","26.36"],"font":["22.36","24.5","26.36"],"size":["22.36","24.5","26.36"],"30px":["22.36","26.36"],"webkit":["22.37"],"playsinline":["22.37"],"therefore":["22.39"],"if":["22.39"],"you":["22.39"],"best":["22.39"],"well":["22.39"],"settings":["22.41","22.42"],"start":["22.41","22.42","26.41","26.42"],"i18n":["22.41","26.41"],"tw":["22.42","26.42"],"identify":["22.46"],"unique":["22.46"],"document":["22.50","26.50"],"createelement":["22.50","26.50"],"里直接修改":["23.4","23.5"],"是不会改变播放器的":["23.4","23.5"],"非响应式":["23.5"],"在":["23.5"],"请修改以下配置然后自行构建":["23.11"],"构建配置":["23.11"],"build":["23.11"],"参考文档":["23.11"],"style":["24.4"],"弹幕自定义样式":["24.4"],"默认为空对象":["24.4"],"light":["24.5"],"只在自定义挂载时生效":["24.5"],"不透明度配置项":["24.5"],"弹幕字号配置项":["24.5"],"显示区域配置项":["24.5"],"弹幕速度配置项":["24.5"],"颜色列表配置项":["24.5"],"ref":["24.6"],"innerhtml":["24.6"],"ଘ":["24.6"],"੭ˊᵕˋ":["24.6"],"੭":["24.6"],"使用数组":["24.7"],"time":["24.7","24.9"],"异步返回":["24.9"],"显示弹幕":["24.10","24.11"],"hide":["24.11"],"border":["24.12"],"fontsize":["24.13"],"const":["24.14"],"target":["24.14"],"xml":["24.16"],"也可以手动挂载":["24.16"],"reset":["24.18"],"弹幕重置":["24.18"],"destroy":["24.18"],"弹幕销毁":["24.18"],"全部选项里":["26.1"],"只有":["26.1"],"是必填的":["26.1"],"如需要播放":["26.2"],"或者":["26.2"],"等其它格式":["26.2"],"请参考左侧的":["26.2"],"第三方库":["26.2"],"回调函数里的":["26.4"],"就是播放器实例":["26.4"],"但回调函数假如使用了箭头函数":["26.4"],"则不会指向播放器实例":["26.4"],"下次初始化时":["26.7"],"如刷新页面":["26.7"],"播放器会读取该缓存值":["26.7"],"更多信息请阅读":["26.10"],"假如视频源地址和网站是跨域的":["26.17"],"可能会出现截图失败":["26.17"],"在线生成预览图":["26.35"],"thumbnail":["26.35"],"所以假如你使用了":["26.39"],"最好同时要指明":["26.39"],"function":["26.40"],"更多的语言设置":["26.41","26.42"],"是不同的话":["26.46"],"那么你需要使用":["26.46"],"来标识视频的唯一":["26.46"]}]'},t={"0.0":{t:"# 高级属性",p:`这里的 高级属性 是指挂载在 实例 的 二级属性,比较少用 +`,l:"advanced/built-in.html",a:"高级属性"},"0.1":{t:"`option`",p:`播放器的选项 +<div className="run-code">▶ Run Code< ...`,l:"advanced/built-in.html#option",a:"option"},"0.2":{t:"`template`",p:`管理播放器所有的 DOM 元素 +<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#template",a:"template"},"0.3":{t:"`events`",p:"管理播放器所有的 DOM 事件,实质上是代理了 addEventListener 和 removeEventListener ...",l:"advanced/built-in.html#events",a:"events"},"0.4":{t:"`storage`",p:`管理播放器的本地存储 + +name 属性用于设置缓存的 key +set 方法用于设置缓存 +get 方法用于获取缓存 +del 方 ...`,l:"advanced/built-in.html#storage",a:"storage"},"0.5":{t:"`icons`",p:`管理播放器所有的 svg 图标 +<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#icons",a:"icons"},"0.6":{t:"`i18n`",p:`管理播放器的 i18n + +get 方法用于获取 i18n 的值 +update 方法用于更新 i18n 对象 + +<div ...`,l:"advanced/built-in.html#i18n",a:"i18n"},"0.7":{t:"`notice`",p:`管理播放器的提示语,只有一个 show 属性用于显示提示语 +<div className="run-code ...`,l:"advanced/built-in.html#notice",a:"notice"},"0.8":{t:"`layers`",p:`管理播放器的层 + +add 方法用于动态添加层 +remove 方法用于动态删除层 +update 方法用于动态更新层 +show ...`,l:"advanced/built-in.html#layers",a:"layers"},"0.9":{t:"`controls`",p:`管理播放器的控制器 + +add 方法用于动态添加控制器 +remove 方法用于动态删除控制器 +update 方法用于动态更新控 ...`,l:"advanced/built-in.html#controls",a:"controls"},"0.10":{t:"`contextmenu`",p:`管理播放器的右键菜单 + +add 方法用于动态添加菜单 +remove 方法用于动态删除菜单 +update 方法用于动态更新菜单 ...`,l:"advanced/built-in.html#contextmenu",a:"contextmenu"},"0.11":{t:"`subtitle`",p:`管理播放器的字幕功能 + +url 属性设置和返回当前字幕地址 +style 方法设置当前字幕的样式 +switch 方法设置当前字 ...`,l:"advanced/built-in.html#subtitle",a:"subtitle"},"0.12":{t:"`loading`",p:`管理播放器的加载层 + +show 属性用于设置是否显示加载层 +toggle 属性用于切换是否显示加载层 + +<div cl ...`,l:"advanced/built-in.html#loading",a:"loading"},"0.13":{t:"`hotkey`",p:`管理播放器的快捷键功能 + +add 方法用于添加快捷键 +remove 方法用于删除快捷键 + +<div className ...`,l:"advanced/built-in.html#hotkey",a:"hotkey"},"0.14":{t:"`mask`",p:`管理播放器的遮罩层 + +show 属性用于设置是否显示遮罩层 +toggle 属性用于切换是否显示遮罩层 + +<div cl ...`,l:"advanced/built-in.html#mask",a:"mask"},"0.15":{t:"`setting`",p:`管理播放器的设置面板 + +add 方法用于动态添加设置项 +remove 方法用于动态删除设置项 +update 方法用于动态更新 ...`,l:"advanced/built-in.html#setting",a:"setting"},"0.16":{t:"`plugins`",p:`管理播放器的插件功能,只有一个方法 add 用于动态添加插件 +<div className="run-cod ...`,l:"advanced/built-in.html#plugins",a:"plugins"},"1.0":{t:"# 静态属性",p:`这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用 +`,l:"advanced/class.html",a:"静态属性"},"1.1":{t:"`instances`",p:`返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性 +<div className=" ...`,l:"advanced/class.html#instances",a:"instances"},"1.2":{t:"`version`",p:`返回播放器的版本信息 +<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#version",a:"version"},"1.3":{t:"`env`",p:`返回播放器的环境变量 +<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#env",a:"env"},"1.4":{t:"`build`",p:`返回播放器的打包时间 +<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#build",a:"build"},"1.5":{t:"`config`",p:`返回视频的默认配置 +<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#config",a:"config"},"1.6":{t:"`utils`",p:`返回播放器的工具函数集合 +<div className="run-code">▶ Run C ...`,l:"advanced/class.html#utils",a:"utils"},"1.7":{t:"`scheme`",p:`返回播放器选项的校验方案 +<div className="run-code">▶ Run C ...`,l:"advanced/class.html#scheme",a:"scheme"},"1.8":{t:"`Emitter`",p:`返回事件分发器的构造函数 +<div className="run-code">▶ Run C ...`,l:"advanced/class.html#emitter",a:"emitter"},"1.9":{t:"`validator`",p:`返回选项的校验函数 +<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#validator",a:"validator"},"1.10":{t:"`kindOf`",p:`返回类型检测的函数工具 +<div className="run-code">▶ Run Co ...`,l:"advanced/class.html#kindof",a:"kindof"},"1.11":{t:"`html`",p:`返回播放器所需的 html 字符串 +<div className="run-code">▶ ...`,l:"advanced/class.html#html",a:"html"},"1.12":{t:"`option`",p:`返回播放器的默认选项 +<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#option",a:"option"},"2.0":{t:"# 实例事件",p:`播放器的事件分为两种,一种视频的 原生事件 (前缀 video:),另外一种是 自定义事件 +监听事件: +<div cl ...`,l:"advanced/event.html",a:"实例事件"},"2.1":{t:"`ready`",p:`当播放器首次可以播放器时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#ready",a:"ready"},"2.2":{t:"`restart`",p:`当播放器切换地址后并可以播放时触发 +<div className="run-code">▶ ...`,l:"advanced/event.html#restart",a:"restart"},"2.3":{t:"`pause`",p:`当播放器暂停时触发 +<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#pause",a:"pause"},"2.4":{t:"`play`",p:`当播放器播放时触发 +<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#play",a:"play"},"2.5":{t:"`hotkey`",p:`当播放器热键被按下时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#hotkey",a:"hotkey"},"2.6":{t:"`destroy`",p:`当播放器销毁时触发 +<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#destroy",a:"destroy"},"2.7":{t:"`focus`",p:`当播放器获得焦点时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#focus",a:"focus"},"2.8":{t:"`blur`",p:`当播放器失去焦点时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#blur",a:"blur"},"2.9":{t:"`dblclick`",p:`当播放器被双击时触发 +<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#dblclick",a:"dblclick"},"2.10":{t:"`click`",p:`当播放器被单击时触发 +<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#click",a:"click"},"2.11":{t:"`error`",p:`当播放器加载视频发生错误时触发 +<div className="run-code">▶ Ru ...`,l:"advanced/event.html#error",a:"error"},"2.12":{t:"`hover`",p:`当播放器被鼠标移出或者移入时触发 +<div className="run-code">▶ R ...`,l:"advanced/event.html#hover",a:"hover"},"2.13":{t:"`mousemove`",p:`当播放器被鼠标经过时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mousemove",a:"mousemove"},"2.14":{t:"`resize`",p:`当播放器尺寸变化时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#resize",a:"resize"},"2.15":{t:"`view`",p:`当播放器出现在视口时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#view",a:"view"},"2.16":{t:"`lock`",p:`在移动端,当锁定的状态发生变化时触发 +<div className="run-code">▶ ...`,l:"advanced/event.html#lock",a:"lock"},"2.17":{t:"`aspectRatio`",p:`当播放器长宽比变化时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#aspectratio",a:"aspectratio"},"2.18":{t:"`autoHeight`",p:`当播放器自动设置高度时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#autoheight",a:"autoheight"},"2.19":{t:"`autoSize`",p:`当播放器自动设置尺寸时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#autosize",a:"autosize"},"2.20":{t:"`flip`",p:`当播放器发生翻转时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#flip",a:"flip"},"2.21":{t:"`fullscreen`",p:`当播放器发生窗口全屏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreen",a:"fullscreen"},"2.22":{t:"`fullscreenError`",p:`当播放器发生窗口全屏错误时触发 +<div className="run-code">▶ Ru ...`,l:"advanced/event.html#fullscreenerror",a:"fullscreenerror"},"2.23":{t:"`fullscreenWeb`",p:`当播放器发生网页全屏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreenweb",a:"fullscreenweb"},"2.24":{t:"`mini`",p:`当播放器进入迷你模式时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#mini",a:"mini"},"2.25":{t:"`pip`",p:`当播放器进入画中画时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#pip",a:"pip"},"2.26":{t:"`screenshot`",p:`当播放器被截图时触发 +<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#screenshot",a:"screenshot"},"2.27":{t:"`seek`",p:`当播放器发生时间跳转时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#seek",a:"seek"},"2.28":{t:"`subtitleOffset`",p:`当播放器发生字幕偏移时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#subtitleoffset",a:"subtitleoffset"},"2.29":{t:"`subtitleBeforeUpdate`",p:`当字幕更新前触发 +<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitlebeforeupdate",a:"subtitlebeforeupdate"},"2.30":{t:"`subtitleAfterUpdate`",p:`当字幕更新后触发 +<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleafterupdate",a:"subtitleafterupdate"},"2.31":{t:"`subtitleLoad`",p:`当字幕加载时触发 +<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleload",a:"subtitleload"},"2.32":{t:"`info`",p:`当信息面板显示或隐藏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#info",a:"info"},"2.33":{t:"`layer`",p:`当自定义层显示或隐藏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#layer",a:"layer"},"2.34":{t:"`loading`",p:`当加载器显示或隐藏时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#loading",a:"loading"},"2.35":{t:"`mask`",p:`当遮罩层显示或隐藏时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mask",a:"mask"},"2.36":{t:"`subtitle`",p:`当字幕层显示或隐藏时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#subtitle",a:"subtitle"},"2.37":{t:"`contextmenu`",p:`当右键菜单显示或隐藏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#contextmenu",a:"contextmenu"},"2.38":{t:"`control`",p:`当控制器显示或隐藏时触发 +<div className="run-code">▶ Run C ...`,l:"advanced/event.html#control",a:"control"},"2.39":{t:"`setting`",p:`当设置面板显示或隐藏时触发 +<div className="run-code">▶ Run ...`,l:"advanced/event.html#setting",a:"setting"},"2.40":{t:"`muted`",p:`当静音的状态变化时触发 +<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#muted",a:"muted"},"2.41":{t:"`keydown`",p:`监听来自 document 的 keydown 事件 +<div className="run-code&qu ...`,l:"advanced/event.html#keydown",a:"keydown"},"2.42":{t:"`video:canplay`",p:`浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容 +`,l:"advanced/event.html#video-canplay",a:"video-canplay"},"2.43":{t:"`video:canplaythrough`",p:`浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束 +`,l:"advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"2.44":{t:"`video:complete`",p:`OfflineAudioContext 渲染完成 +`,l:"advanced/event.html#video-complete",a:"video-complete"},"2.45":{t:"`video:durationchange`",p:`duration 属性的值改变时触发 +`,l:"advanced/event.html#video-durationchange",a:"video-durationchange"},"2.46":{t:"`video:emptied`",p:"媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载 ...",l:"advanced/event.html#video-emptied",a:"video-emptied"},"2.47":{t:"`video:ended`",p:`视频停止播放,因为 media 已经到达结束点 +`,l:"advanced/event.html#video-ended",a:"video-ended"},"2.48":{t:"`video:error`",p:`获取媒体数据时出错,或者资源类型不是受支持的媒体格式 +`,l:"advanced/event.html#video-error",a:"video-error"},"2.49":{t:"`video:loadeddata`",p:`media 中的首帧已经完成加载 +`,l:"advanced/event.html#video-loadeddata",a:"video-loadeddata"},"2.50":{t:"`video:loadedmetadata`",p:`已加载元数据 +`,l:"advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"2.51":{t:"`video:pause`",p:`播放已暂停 +`,l:"advanced/event.html#video-pause",a:"video-pause"},"2.52":{t:"`video:play`",p:`播放已开始 +`,l:"advanced/event.html#video-play",a:"video-play"},"2.53":{t:"`video:playing`",p:`由于缺乏数据而暂停或延迟后,播放准备开始 +`,l:"advanced/event.html#video-playing",a:"video-playing"},"2.54":{t:"`video:progress`",p:`在浏览器加载资源时周期性触发 +`,l:"advanced/event.html#video-progress",a:"video-progress"},"2.55":{t:"`video:ratechange`",p:`播放速率发生变化 +`,l:"advanced/event.html#video-ratechange",a:"video-ratechange"},"2.56":{t:"`video:seeked`",p:`跳帧(seek)操作完成 +`,l:"advanced/event.html#video-seeked",a:"video-seeked"},"2.57":{t:"`video:seeking`",p:`跳帧(seek)操作开始 +`,l:"advanced/event.html#video-seeking",a:"video-seeking"},"2.58":{t:"`video:stalled`",p:`用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现 +`,l:"advanced/event.html#video-stalled",a:"video-stalled"},"2.59":{t:"`video:suspend`",p:`媒体数据加载已暂停 +`,l:"advanced/event.html#video-suspend",a:"video-suspend"},"2.60":{t:"`video:timeupdate`",p:`currentTime 属性指定的时间发生变化 +`,l:"advanced/event.html#video-timeupdate",a:"video-timeupdate"},"2.61":{t:"`video:volumechange`",p:`音量发生变化 +`,l:"advanced/event.html#video-volumechange",a:"video-volumechange"},"2.62":{t:"`video:waiting`",p:`由于暂时缺少数据,播放已停止 +`,l:"advanced/event.html#video-waiting",a:"video-waiting"},"3.0":{t:"# 全局属性",p:`这里的 全局属性 也是指挂载在 构造函数 的 一级属性,属性名字全部都是大写的形式,未来容易发生变动,基本上用不到 +`,l:"advanced/global.html",a:"全局属性"},"3.1":{t:"DEBUG",p:`是否开始 debug 模式,可以打印出视频全部的内置事件,默认关闭 +<div className="run- ...`,l:"advanced/global.html#debug",a:"debug"},"3.2":{t:"STYLE",p:`返回播放器样式文本 +<div className="run-code">▶ Run Code ...`,l:"advanced/global.html#style",a:"style"},"3.3":{t:"CONTEXTMENU",p:`是否开启右键菜单,默认开启 +<div className="run-code">▶ Run ...`,l:"advanced/global.html#contextmenu",a:"contextmenu"},"3.4":{t:"NOTICE_TIME",p:`提示信息的显示时长,单位为毫秒,默认为 2000 +<div className="run-code" ...`,l:"advanced/global.html#notice-time",a:"notice-time"},"3.5":{t:"SETTING_WIDTH",p:`设置面板的默认宽度,单位为像素,默认为 250 +<div className="run-code" ...`,l:"advanced/global.html#setting-width",a:"setting-width"},"3.6":{t:"SETTING_ITEM_WIDTH",p:`设置面板的设置项的默认宽度,单位为像素,默认为 200 +<div className="run-code&q ...`,l:"advanced/global.html#setting-item-width",a:"setting-item-width"},"3.7":{t:"SETTING_ITEM_HEIGHT",p:`设置面板的设置项的默认高度,单位为像素,默认为 35 +<div className="run-code&qu ...`,l:"advanced/global.html#setting-item-height",a:"setting-item-height"},"3.8":{t:"RESIZE_TIME",p:`resize 事件的节流时间,单位为毫秒,默认为 200 +<div className="run-code& ...`,l:"advanced/global.html#resize-time",a:"resize-time"},"3.9":{t:"SCROLL_TIME",p:`scroll 事件的节流时间,单位为毫秒,默认为 200 +<div className="run-code& ...`,l:"advanced/global.html#scroll-time",a:"scroll-time"},"3.10":{t:"SCROLL_GAP",p:`view 事件的边界容差距离,单位为像素,默认为 50 +<div className="run-code&q ...`,l:"advanced/global.html#scroll-gap",a:"scroll-gap"},"3.11":{t:"AUTO_PLAYBACK_MAX",p:`自动回放功能的最大记录数,默认为 10 +<div className="run-code"> ...`,l:"advanced/global.html#auto-playback-max",a:"auto-playback-max"},"3.12":{t:"AUTO_PLAYBACK_MIN",p:`自动回放功能的最小记录时长,单位为秒,默认为 5 +<div className="run-code" ...`,l:"advanced/global.html#auto-playback-min",a:"auto-playback-min"},"3.13":{t:"AUTO_PLAYBACK_TIMEOUT",p:`自动回放功能的隐藏延迟时长,单位为毫秒,默认为 3000 +<div className="run-code& ...`,l:"advanced/global.html#auto-playback-timeout",a:"auto-playback-timeout"},"3.14":{t:"RECONNECT_TIME_MAX",p:`发生连接错误时,自动连接的最大次数,默认为 5 +<div className="run-code" ...`,l:"advanced/global.html#reconnect-time-max",a:"reconnect-time-max"},"3.15":{t:"RECONNECT_SLEEP_TIME",p:`发生连接错误时,自动连接的延迟时间,单位为毫秒,默认为 1000 +<div className="run-c ...`,l:"advanced/global.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"3.16":{t:"CONTROL_HIDE_TIME",p:`底部控制栏的自动隐藏的延迟时间,单位为毫秒,默认为 3000 +<div className="run-cod ...`,l:"advanced/global.html#control-hide-time",a:"control-hide-time"},"3.17":{t:"DBCLICK_TIME",p:`双击事件的延迟事件,单位为毫秒,默认为 300 +<div className="run-code" ...`,l:"advanced/global.html#dbclick-time",a:"dbclick-time"},"3.18":{t:"DBCLICK_FULLSCREEN",p:`在桌面端,是否双击切换全屏,默认为 true +<div className="run-code"& ...`,l:"advanced/global.html#dbclick-fullscreen",a:"dbclick-fullscreen"},"3.19":{t:"MOBILE_DBCLICK_PLAY",p:`在移动端,是否双击切换播放暂停,默认为 true +<div className="run-code" ...`,l:"advanced/global.html#mobile-dbclick-play",a:"mobile-dbclick-play"},"3.20":{t:"MOBILE_CLICK_PLAY",p:`在移动端,是否单击切换播放暂停,默认为 false +<div className="run-code&quo ...`,l:"advanced/global.html#mobile-click-play",a:"mobile-click-play"},"3.21":{t:"AUTO_ORIENTATION_TIME",p:`在移动端,自动旋屏的延迟时间,单位为毫秒,默认为 200 +<div className="run-code& ...`,l:"advanced/global.html#auto-orientation-time",a:"auto-orientation-time"},"3.22":{t:"INFO_LOOP_TIME",p:`信息面板的刷新时间,单位为毫秒,默认为 1000 +<div className="run-code" ...`,l:"advanced/global.html#info-loop-time",a:"info-loop-time"},"3.23":{t:"FAST_FORWARD_VALUE",p:`在移动端,长按加速的速率倍数,默认为 3 +<div className="run-code"> ...`,l:"advanced/global.html#fast-forward-value",a:"fast-forward-value"},"3.24":{t:"FAST_FORWARD_TIME",p:`在移动端,长按加速的延迟时间,单位为毫秒,默认为 1000 +<div className="run-code ...`,l:"advanced/global.html#fast-forward-time",a:"fast-forward-time"},"3.25":{t:"TOUCH_MOVE_RATIO",p:`在移动端,左右滑动进度的速率倍数,默认为 0.5 +<div className="run-code" ...`,l:"advanced/global.html#touch-move-ratio",a:"touch-move-ratio"},"3.26":{t:"VOLUME_STEP",p:`快捷键调节音量的幅度比例,默认为 0.1 +<div className="run-code"> ...`,l:"advanced/global.html#volume-step",a:"volume-step"},"3.27":{t:"SEEK_STEP",p:`快捷键调节播放进度的幅度,单位为秒,默认为 5 +<div className="run-code" ...`,l:"advanced/global.html#seek-step",a:"seek-step"},"3.28":{t:"PLAYBACK_RATE",p:`内置播放速率的列表,默认为 [0.5, 0.75, 1, 1.25, 1.5, 2] +<div className=& ...`,l:"advanced/global.html#playback-rate",a:"playback-rate"},"3.29":{t:"ASPECT_RATIO",p:`内置视频长宽比的列表,默认为 ['default', '4:3', '16:9'] +<div className=&q ...`,l:"advanced/global.html#aspect-ratio",a:"aspect-ratio"},"3.30":{t:"FLIP",p:`内置视频翻转的列表,默认为 ['normal', 'horizontal', 'vertical'] +<div cla ...`,l:"advanced/global.html#flip",a:"flip"},"3.31":{t:"FULLSCREEN_WEB_IN_BODY",p:`网页全屏时,是否把播放器挂在在 body 元素下,默认为 false +<div className="run ...`,l:"advanced/global.html#fullscreen-web-in-body",a:"fullscreen-web-in-body"},"3.32":{t:"LOG_VERSION",p:`设置是否打印播放器版本,默认为 true +<div className="run-code"> ...`,l:"advanced/global.html#log-version",a:"log-version"},"3.33":{t:"USE_RAF",p:`设置是否使用 requestAnimationFrame ,默认为 false,目前主要用于进度条的平滑效果 +<div ...`,l:"advanced/global.html#use-raf",a:"use-raf"},"4.0":{t:"# 编写插件",p:`但你已经知道播放器的属性, 方法和事件后,再编写插件是非常简单的事 +可以在实例化的时候加载插件的函数 +<div cla ...`,l:"advanced/plugin.html",a:"编写插件"},"5.0":{t:"# 实例属性",p:`这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用 +`,l:"advanced/property.html",a:"实例属性"},"5.1":{t:"`play`",p:` +Type: Function + +播放视频 +<div className="run-code"&g ...`,l:"advanced/property.html#play",a:"play"},"5.2":{t:"`pause`",p:` +Type: Function + +暂停视频 +<div className="run-code"&g ...`,l:"advanced/property.html#pause",a:"pause"},"5.3":{t:"`toggle`",p:` +Type: Function + +切换视频的播放和暂停 +<div className="run-code&q ...`,l:"advanced/property.html#toggle",a:"toggle"},"5.4":{t:"`destroy`",p:` +Type: Function +Parameter: Boolean + +销毁播放器,接受一个参数表示是否销毁后同时移除播放器 ...`,l:"advanced/property.html#destroy",a:"destroy"},"5.5":{t:"`seek`",p:` +Type: Setter +Parameter: Number + +视频时间跳转,单位秒 +<div className= ...`,l:"advanced/property.html#seek",a:"seek"},"5.6":{t:"`forward`",p:` +Type: Setter +Parameter: Number + +视频时间快进,单位秒 +<div className= ...`,l:"advanced/property.html#forward",a:"forward"},"5.7":{t:"`backward`",p:` +Type: Setter +Parameter: Number + +视频时间快退,单位秒 +<div className= ...`,l:"advanced/property.html#backward",a:"backward"},"5.8":{t:"`volume`",p:` +Type: Setter/Getter +Parameter: Number + +设置和获取视频音量,范围在:[0, 1] +& ...`,l:"advanced/property.html#volume",a:"volume"},"5.9":{t:"`url`",p:` +Type: Setter/Getter +Parameter: String + +设置和获取视频地址 +<div clas ...`,l:"advanced/property.html#url",a:"url"},"5.10":{t:"`switch`",p:` +Type: Setter +Parameter: String + +设置视频地址,设置时和 art.url 类似,但会执行一些 ...`,l:"advanced/property.html#switch",a:"switch"},"5.11":{t:"`switchUrl`",p:` +Type: Function +Parameter: String + +设置视频地址,设置时和 art.url 类似,但会执行 ...`,l:"advanced/property.html#switchurl",a:"switchurl"},"5.12":{t:"`switchQuality`",p:` +Type: Function +Parameter: String + +设置视频画质地址,和 art.switchUrl 类似 ...`,l:"advanced/property.html#switchquality",a:"switchquality"},"5.13":{t:"`muted`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取视频是否静音 +<div c ...`,l:"advanced/property.html#muted",a:"muted"},"5.14":{t:"`currentTime`",p:` +Type: Setter/Getter +Parameter: Number + +设置和获取视频当前时间,设置时间时和 see ...`,l:"advanced/property.html#currenttime",a:"currenttime"},"5.15":{t:"`duration`",p:` +Type: Getter + +获取视频时长 +<div className="run-code"&g ...`,l:"advanced/property.html#duration",a:"duration"},"5.16":{t:"`screenshot`",p:` +Type: Function + +下载当前视频帧的截图, 可选参数为截图名字 +<div className=" ...`,l:"advanced/property.html#screenshot",a:"screenshot"},"5.17":{t:"`getDataURL`",p:` +Type: Function + +获取当前视频帧的截图的base64地址,返回的是一个 Promise +<div cl ...`,l:"advanced/property.html#getdataurl",a:"getdataurl"},"5.18":{t:"`getBlobUrl`",p:` +Type: Function + +获取当前视频帧的截图的blob地址,返回的是一个 Promise +<div clas ...`,l:"advanced/property.html#getbloburl",a:"getbloburl"},"5.19":{t:"`fullscreen`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取播放器窗口全屏 +<div ...`,l:"advanced/property.html#fullscreen",a:"fullscreen"},"5.20":{t:"`fullscreenWeb`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取播放器网页全屏 +<div ...`,l:"advanced/property.html#fullscreenweb",a:"fullscreenweb"},"5.21":{t:"`pip`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取播放器画中画模式 +<div ...`,l:"advanced/property.html#pip",a:"pip"},"5.22":{t:"`poster`",p:` +Type: Setter/Getter +Parameter: String + +设置和获取视频海报,只有在视频播放前才能看到 ...`,l:"advanced/property.html#poster",a:"poster"},"5.23":{t:"`mini`",p:` +Type: Setter/Getter +Parameter: Boolean + +设置和获取播放器迷你模式 +<div ...`,l:"advanced/property.html#mini",a:"mini"},"5.24":{t:"`playing`",p:` +Type: Getter +Parameter: Boolean + +获取视频是否正在播放中 +<div classNam ...`,l:"advanced/property.html#playing",a:"playing"},"5.25":{t:"`autoSize`",p:` +Type: Function + +设置视频是否自适应尺寸 +<div className="run-code& ...`,l:"advanced/property.html#autosize",a:"autosize"},"5.26":{t:"`rect`",p:` +Type: Getter + +获取播放器的尺寸和坐标信息 +<div className="run-code& ...`,l:"advanced/property.html#rect",a:"rect"},"5.27":{t:"`flip`",p:` +Type: Setter/Getter +Parameter: String + +设置和获取播放器翻转,支持normal, ...`,l:"advanced/property.html#flip",a:"flip"},"5.28":{t:"`playbackRate`",p:` +Type: Setter/Getter +Parameter: Number + +设置和获取播放器播放速度 +<div c ...`,l:"advanced/property.html#playbackrate",a:"playbackrate"},"5.29":{t:"`aspectRatio`",p:` +Type: Setter/Getter +Parameter: String + +设置和获取播放器长宽比 +<div cl ...`,l:"advanced/property.html#aspectratio",a:"aspectratio"},"5.30":{t:"`autoHeight`",p:` +Type: Function + +当容器只有宽度,该属性可以自动计算出并设置视频的高度 +<div className= ...`,l:"advanced/property.html#autoheight",a:"autoheight"},"5.31":{t:"`attr`",p:` +Type: Function +Parameter: String + +动态获取和设置 video 元素的属性 +<div ...`,l:"advanced/property.html#attr",a:"attr"},"5.32":{t:"`type`",p:` +Type: Setter/Getter +Parameter: String + +动态获取和设置视频类型 +<div cl ...`,l:"advanced/property.html#type",a:"type"},"5.33":{t:"`theme`",p:` +Type: Setter/Getter +Parameter: String + +动态获取和设置播放器主题颜色 +<div ...`,l:"advanced/property.html#theme",a:"theme"},"5.34":{t:"`airplay`",p:` +Type: Function + +开启隔空播放 +<div className="run-code" ...`,l:"advanced/property.html#airplay",a:"airplay"},"5.35":{t:"`loaded`",p:` +Type: Getter + +视频缓存的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用 +&l ...`,l:"advanced/property.html#loaded",a:"loaded"},"5.36":{t:"`played`",p:` +Type: Getter + +视频播放的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用 +&l ...`,l:"advanced/property.html#played",a:"played"},"5.37":{t:"`proxy`",p:` +Type: Function + +DOM 事件的代理函数,实质上代理了 addEventListener 和 removeE ...`,l:"advanced/property.html#proxy",a:"proxy"},"5.38":{t:"`query`",p:` +Type: Function + +DOM 的查询函数,类似 document.querySelector,但被查询的对象局限 ...`,l:"advanced/property.html#query",a:"query"},"5.39":{t:"`video`",p:` +Type: Element + +快捷返回播放器的 video 元素 +<div className="run- ...`,l:"advanced/property.html#video",a:"video"},"5.40":{t:"`cssVar`",p:` +Type: Function + +动态获取或设置 css 变量 +<div className="run-co ...`,l:"advanced/property.html#cssvar",a:"cssvar"},"5.41":{t:"`quality`",p:` +Type: Setter +Parameter: Array + +动态设置画质列表 +<div className=&qu ...`,l:"advanced/property.html#quality",a:"quality"},"5.42":{t:"`thumbnails`",p:` +Type: Setter/Getter +Parameter: Object + +动态设置缩略图 +<div classN ...`,l:"advanced/property.html#thumbnails",a:"thumbnails"},"5.43":{t:"`subtitleOffset`",p:` +Type: Setter/Getter +Parameter: Number + +动态设置字幕偏移 +<div class ...`,l:"advanced/property.html#subtitleoffset",a:"subtitleoffset"},"6.0":{t:"# 右键菜单",p:"",l:"component/contextmenu.html",a:"右键菜单"},"6.1":{t:"配置",p:` + + +属性 +类型 +描述 + + + + +disable +Boolean +是否禁用组件 + + +name +String +组件唯一名称,用于 ...`,l:"component/contextmenu.html#配置",a:"配置"},"6.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#创建",a:"创建"},"6.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#添加",a:"添加"},"6.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#删除",a:"删除"},"6.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/contextmenu.html#更新",a:"更新"},"7.0":{t:"# 控制器",p:"",l:"component/controls.html",a:"控制器"},"7.1":{t:"配置",p:` + + +属性 +类型 +描述 + + + + +disable +Boolean +是否禁用组件 + + +name +String +组件唯一名称,用于 ...`,l:"component/controls.html#配置",a:"配置"},"7.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#创建",a:"创建"},"7.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#添加",a:"添加"},"7.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#删除",a:"删除"},"7.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/controls.html#更新",a:"更新"},"8.0":{t:"# 业务层",p:"",l:"component/layers.html",a:"业务层"},"8.1":{t:"配置",p:` + + +属性 +类型 +描述 + + + + +disable +Boolean +是否禁用组件 + + +name +String +组件唯一名称,用于 ...`,l:"component/layers.html#配置",a:"配置"},"8.2":{t:"创建",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#创建",a:"创建"},"8.3":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#添加",a:"添加"},"8.4":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#删除",a:"删除"},"8.5":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/layers.html#更新",a:"更新"},"9.0":{t:"# 设置面板",p:"",l:"component/setting.html",a:"设置面板"},"9.1":{t:"内置",p:"须先打开设置面板,然后自带四个内置项:flip, playbackRate, aspectRatio, subtitleOf ...",l:"component/setting.html#内置",a:"内置"},"9.2":{t:"创建 - 按钮",p:` + + +属性 +类型 +描述 + + + + +html +String, Element +元素的 DOM + + +icon +String, El ...`,l:"component/setting.html#创建-按钮",a:"创建-按钮"},"9.3":{t:"创建 - 选择列表",p:` + + +属性 +类型 +描述 + + + + +html +String, Element +元素的 DOM + + +icon +String, El ...`,l:"component/setting.html#创建-选择列表",a:"创建-选择列表"},"9.4":{t:"创建 - 列表嵌套",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#创建-列表嵌套",a:"创建-列表嵌套"},"9.5":{t:"创建 - 切换按钮",p:` + + +属性 +类型 +描述 + + + + +html +String, Element +元素的 DOM 元素 + + +icon +String, ...`,l:"component/setting.html#创建-切换按钮",a:"创建-切换按钮"},"9.6":{t:"创建 - 范围滑块",p:` + + +属性 +类型 +描述 + + + + +html +String, Element +元素的 DOM 元素 + + +icon +String, ...`,l:"component/setting.html#创建-范围滑块",a:"创建-范围滑块"},"9.7":{t:"添加",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#添加",a:"添加"},"9.8":{t:"删除",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#删除",a:"删除"},"9.9":{t:"更新",p:"<div className="run-code">▶ Run Code</div&g ...",l:"component/setting.html#更新",a:"更新"},"10.0":{t:"# Advanced Properties",p:"The advanced properties here refer to the secondary attributes ...",l:"en/advanced/built-in.html",a:"advanced-properties"},"10.1":{t:"`option`",p:`Options for the player +<div className="run-code"& ...`,l:"en/advanced/built-in.html#option",a:"option"},"10.2":{t:"`template`",p:`Manages all of the DOM elements of the player +<div classNam ...`,l:"en/advanced/built-in.html#template",a:"template"},"10.3":{t:"`events`",p:"Manages all DOM events in the player, which is essentially a p ...",l:"en/advanced/built-in.html#events",a:"events"},"10.4":{t:"`storage`",p:`Manages the local storage of the player + +The name attribute is ...`,l:"en/advanced/built-in.html#storage",a:"storage"},"10.5":{t:"`icons`",p:`Manage all the svg icons of the player +<div className=" ...`,l:"en/advanced/built-in.html#icons",a:"icons"},"10.6":{t:"`i18n`",p:`Manage the player's i18n + +The get method is used to retrieve t ...`,l:"en/advanced/built-in.html#i18n",a:"i18n"},"10.7":{t:"`notice`",p:"Manage the player's notices, there's only one show property us ...",l:"en/advanced/built-in.html#notice",a:"notice"},"10.8":{t:"`layers`",p:`Manage the layers of the player + +The add method is used for dy ...`,l:"en/advanced/built-in.html#layers",a:"layers"},"10.9":{t:"`controls`",p:`Manage the player's controllers + +add method is used to dynamic ...`,l:"en/advanced/built-in.html#controls",a:"controls"},"10.10":{t:"`contextmenu`",p:`Manage the right-click context menu of the player + +The add met ...`,l:"en/advanced/built-in.html#contextmenu",a:"contextmenu"},"10.11":{t:"`subtitle`",p:`Manage the subtitle features of the player + +url property sets ...`,l:"en/advanced/built-in.html#subtitle",a:"subtitle"},"10.12":{t:"`loading`",p:`Manage the loading layer of the player + +show property is used ...`,l:"en/advanced/built-in.html#loading",a:"loading"},"10.13":{t:"`hotkey`",p:`Manage the hotkey functionality of the player + +The add method ...`,l:"en/advanced/built-in.html#hotkey",a:"hotkey"},"10.14":{t:"`mask`",p:`Manage the player's mask layer + +show property is used to set w ...`,l:"en/advanced/built-in.html#mask",a:"mask"},"10.15":{t:"`setting`",p:`Manage the player's settings panel + +add method is used to dyna ...`,l:"en/advanced/built-in.html#setting",a:"setting"},"10.16":{t:"`plugins`",p:"Manage the player's plugin features, with only one method add ...",l:"en/advanced/built-in.html#plugins",a:"plugins"},"11.0":{t:"# Static Properties",p:"Here, Static Properties refer to the first-level properties mo ...",l:"en/advanced/class.html",a:"static-properties"},"11.1":{t:"`instances`",p:"Returns an array of all player instances. You can use this pro ...",l:"en/advanced/class.html#instances",a:"instances"},"11.2":{t:"`version`",p:`Returns the version information of the player. +<div classNa ...`,l:"en/advanced/class.html#version",a:"version"},"11.3":{t:"`env`",p:`Returns the environment variables of the player. +<div class ...`,l:"en/advanced/class.html#env",a:"env"},"11.4":{t:"`build`",p:`Returns the build time of the player +<div className="r ...`,l:"en/advanced/class.html#build",a:"build"},"11.5":{t:"`config`",p:`Returns the default configuration of the video +<div classNa ...`,l:"en/advanced/class.html#config",a:"config"},"11.6":{t:"`utils`",p:`Returns a collection of utility functions for the player +<d ...`,l:"en/advanced/class.html#utils",a:"utils"},"11.7":{t:"`scheme`",p:`Returns the validation scheme for the player options +<div c ...`,l:"en/advanced/class.html#scheme",a:"scheme"},"11.8":{t:"`Emitter`",p:`Returns the constructor for the event dispatcher +<div class ...`,l:"en/advanced/class.html#emitter",a:"emitter"},"11.9":{t:"`validator`",p:`Returns the validation function for options +<div className= ...`,l:"en/advanced/class.html#validator",a:"validator"},"11.10":{t:"`kindOf`",p:`Returns the function tool for type checking +<div className= ...`,l:"en/advanced/class.html#kindof",a:"kindof"},"11.11":{t:"`html`",p:`Returns the html string required for the player +<div classN ...`,l:"en/advanced/class.html#html",a:"html"},"11.12":{t:"`option`",p:`Returns the player's default options +<div className="r ...`,l:"en/advanced/class.html#option",a:"option"},"12.0":{t:"# Example Events",p:"Player events are divided into two types, one is the video's n ...",l:"en/advanced/event.html",a:"example-events"},"12.1":{t:"`ready`",p:`Triggered when the player is able to play for the first time +& ...`,l:"en/advanced/event.html#ready",a:"ready"},"12.2":{t:"`restart`",p:"Triggered when the player switches the address and is able to ...",l:"en/advanced/event.html#restart",a:"restart"},"12.3":{t:"`pause`",p:`Triggered when the player is paused +<div className="ru ...`,l:"en/advanced/event.html#pause",a:"pause"},"12.4":{t:"`play`",p:`Triggered when the player starts playing +<div className=&qu ...`,l:"en/advanced/event.html#play",a:"play"},"12.5":{t:"`hotkey`",p:`Triggered when a hotkey on the player is pressed +<div class ...`,l:"en/advanced/event.html#hotkey",a:"hotkey"},"12.6":{t:"`destroy`",p:`Triggered when the player is destroyed +<div className=" ...`,l:"en/advanced/event.html#destroy",a:"destroy"},"12.7":{t:"`focus`",p:`Triggered when the player gains focus +<div className=" ...`,l:"en/advanced/event.html#focus",a:"focus"},"12.8":{t:"`blur`",p:`Triggered when the player loses focus +<div className=" ...`,l:"en/advanced/event.html#blur",a:"blur"},"12.9":{t:"`dblclick`",p:`Triggered when the player is double-clicked +<div className= ...`,l:"en/advanced/event.html#dblclick",a:"dblclick"},"12.10":{t:"`click`",p:`Triggered when the player is clicked +<div className="r ...`,l:"en/advanced/event.html#click",a:"click"},"12.11":{t:"`error`",p:"Triggered when an error occurs while the player is loading the ...",l:"en/advanced/event.html#error",a:"error"},"12.12":{t:"`hover`",p:"Triggered when the player is hovered or unhovered by the mouse ...",l:"en/advanced/event.html#hover",a:"hover"},"12.13":{t:"`mousemove`",p:`Triggered when the mouse moves over the player +<div classNa ...`,l:"en/advanced/event.html#mousemove",a:"mousemove"},"12.14":{t:"`resize`",p:`Triggered when the player size changes +<div className=" ...`,l:"en/advanced/event.html#resize",a:"resize"},"12.15":{t:"`view`",p:`Triggered when the player appears in the viewport +<div clas ...`,l:"en/advanced/event.html#view",a:"view"},"12.16":{t:"`lock`",p:`On mobile, triggered when the locked state changes +<div cla ...`,l:"en/advanced/event.html#lock",a:"lock"},"12.17":{t:"`aspectRatio`",p:`Triggered when the aspect ratio of the player changes +<div ...`,l:"en/advanced/event.html#aspectratio",a:"aspectratio"},"12.18":{t:"`autoHeight`",p:`Triggered when the player automatically sets the height +<di ...`,l:"en/advanced/event.html#autoheight",a:"autoheight"},"12.19":{t:"`autoSize`",p:`Triggered when the player automatically sets the size +<div ...`,l:"en/advanced/event.html#autosize",a:"autosize"},"12.20":{t:"`flip`",p:`Triggered when the player flips +<div className="run-co ...`,l:"en/advanced/event.html#flip",a:"flip"},"12.21":{t:"`fullscreen`",p:`Triggered when the player goes into full screen +<div classN ...`,l:"en/advanced/event.html#fullscreen",a:"fullscreen"},"12.22":{t:"`fullscreenError`",p:`Triggered when the player goes into full screen error +<div ...`,l:"en/advanced/event.html#fullscreenerror",a:"fullscreenerror"},"12.23":{t:"`fullscreenWeb`",p:`Triggered when the player enters web fullscreen +<div classN ...`,l:"en/advanced/event.html#fullscreenweb",a:"fullscreenweb"},"12.24":{t:"`mini`",p:`Triggered when the player enters mini mode +<div className=& ...`,l:"en/advanced/event.html#mini",a:"mini"},"12.25":{t:"`pip`",p:`Triggered when the player enters Picture-in-Picture mode +<d ...`,l:"en/advanced/event.html#pip",a:"pip"},"12.26":{t:"`screenshot`",p:`Triggered when the player takes a screenshot +<div className ...`,l:"en/advanced/event.html#screenshot",a:"screenshot"},"12.27":{t:"`seek`",p:`Triggered when the player jumps in time +<div className=&quo ...`,l:"en/advanced/event.html#seek",a:"seek"},"12.28":{t:"`subtitleOffset`",p:`Triggered when the subtitle offset occurs in the player +<di ...`,l:"en/advanced/event.html#subtitleoffset",a:"subtitleoffset"},"12.29":{t:"`subtitleBeforeUpdate`",p:`Triggered before subtitles are updated +<div className=" ...`,l:"en/advanced/event.html#subtitlebeforeupdate",a:"subtitlebeforeupdate"},"12.30":{t:"`subtitleAfterUpdate`",p:`Triggered when the subtitles are updated +<div className=&qu ...`,l:"en/advanced/event.html#subtitleafterupdate",a:"subtitleafterupdate"},"12.31":{t:"`subtitleLoad`",p:`Triggered when the subtitle loads +<div className="run- ...`,l:"en/advanced/event.html#subtitleload",a:"subtitleload"},"12.32":{t:"`info`",p:`Triggered when the information panel is shown or hidden +<di ...`,l:"en/advanced/event.html#info",a:"info"},"12.33":{t:"`layer`",p:`Triggered when a custom layer is shown or hidden +<div class ...`,l:"en/advanced/event.html#layer",a:"layer"},"12.34":{t:"`loading`",p:`Triggered when a loader is shown or hidden +<div className=& ...`,l:"en/advanced/event.html#loading",a:"loading"},"12.35":{t:"`mask`",p:`Triggered when a mask layer is shown or hidden +<div classNa ...`,l:"en/advanced/event.html#mask",a:"mask"},"12.36":{t:"`subtitle`",p:`Triggered when the subtitle layer is shown or hidden +<div c ...`,l:"en/advanced/event.html#subtitle",a:"subtitle"},"12.37":{t:"`contextmenu`",p:`Triggered when the right-click menu is shown or hidden +<div ...`,l:"en/advanced/event.html#contextmenu",a:"contextmenu"},"12.38":{t:"`control`",p:`Triggered when the controller is shown or hidden +<div class ...`,l:"en/advanced/event.html#control",a:"control"},"12.39":{t:"`setting`",p:`Triggered when the settings panel is shown or hidden +<div c ...`,l:"en/advanced/event.html#setting",a:"setting"},"12.40":{t:"`muted`",p:`Triggered when the muted state changes +<div className=" ...`,l:"en/advanced/event.html#muted",a:"muted"},"12.41":{t:"`keydown`",p:`Listen to the keydown event from document +<div className=&q ...`,l:"en/advanced/event.html#keydown",a:"keydown"},"12.42":{t:"`video:canplay`",p:"The browser can play the media file, but estimates there is no ...",l:"en/advanced/event.html#video-canplay",a:"video-canplay"},"12.43":{t:"`video:canplaythrough`",p:"The browser estimates it can play the media through to the end ...",l:"en/advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"12.44":{t:"`video:complete`",p:`OfflineAudioContext rendering is complete +`,l:"en/advanced/event.html#video-complete",a:"video-complete"},"12.45":{t:"`video:durationchange`",p:`Triggered when the value of the duration property changes +`,l:"en/advanced/event.html#video-durationchange",a:"video-durationchange"},"12.46":{t:"`video:emptied`",p:"The media content becomes empty; for example, when this media ...",l:"en/advanced/event.html#video-emptied",a:"video-emptied"},"12.47":{t:"`video:ended`",p:`The video has stopped because the media reached the end point +`,l:"en/advanced/event.html#video-ended",a:"video-ended"},"12.48":{t:"`video:error`",p:"An error occurred while fetching media data, or the resource t ...",l:"en/advanced/event.html#video-error",a:"video-error"},"12.49":{t:"`video:loadeddata`",p:`The first frame of the media has finished loading +`,l:"en/advanced/event.html#video-loadeddata",a:"video-loadeddata"},"12.50":{t:"`video:loadedmetadata`",p:`Metadata has been loaded +`,l:"en/advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"12.51":{t:"`video:pause`",p:`Playback has been paused +`,l:"en/advanced/event.html#video-pause",a:"video-pause"},"12.52":{t:"`video:play`",p:`Playback has started +`,l:"en/advanced/event.html#video-play",a:"video-play"},"12.53":{t:"`video:playing`",p:"Playback is ready to start following a pause or delay due to l ...",l:"en/advanced/event.html#video-playing",a:"video-playing"},"12.54":{t:"`video:progress`",p:`Periodically triggered while the browser is loading resources +`,l:"en/advanced/event.html#video-progress",a:"video-progress"},"12.55":{t:"`video:ratechange`",p:`The playback rate has changed +`,l:"en/advanced/event.html#video-ratechange",a:"video-ratechange"},"12.56":{t:"`video:seeked`",p:`A seek (frame skipping) operation has completed +`,l:"en/advanced/event.html#video-seeked",a:"video-seeked"},"12.57":{t:"`video:seeking`",p:`A seek (frame skipping) operation has started +`,l:"en/advanced/event.html#video-seeking",a:"video-seeking"},"12.58":{t:"`video:stalled`",p:"The user agent is trying to fetch media data, but the data une ...",l:"en/advanced/event.html#video-stalled",a:"video-stalled"},"12.59":{t:"`video:suspend`",p:`Media data loading has been suspended +`,l:"en/advanced/event.html#video-suspend",a:"video-suspend"},"12.60":{t:"`video:timeupdate`",p:`The time specified by the currentTime attribute has changed +`,l:"en/advanced/event.html#video-timeupdate",a:"video-timeupdate"},"12.61":{t:"`video:volumechange`",p:`Volume changed +`,l:"en/advanced/event.html#video-volumechange",a:"video-volumechange"},"12.62":{t:"`video:waiting`",p:`Playback has stopped due to temporarily missing data +`,l:"en/advanced/event.html#video-waiting",a:"video-waiting"},"13.0":{t:"# Global Attributes",p:"Here, Global Attributes refer to the first-level properties mo ...",l:"en/advanced/global.html",a:"global-attributes"},"13.1":{t:"DEBUG",p:"Whether to start debug mode, which can print out all built-in ...",l:"en/advanced/global.html#debug",a:"debug"},"13.2":{t:"STYLE",p:`Returns the player style text +<div className="run-code ...`,l:"en/advanced/global.html#style",a:"style"},"13.3":{t:"CONTEXTMENU",p:"Whether to enable the right-click context menu, enabled by def ...",l:"en/advanced/global.html#contextmenu",a:"contextmenu"},"13.4":{t:"NOTICE_TIME",p:"The display duration of the notification message, in milliseco ...",l:"en/advanced/global.html#notice-time",a:"notice-time"},"13.5":{t:"SETTING_WIDTH",p:"The default width of the settings panel, in pixels, defaults t ...",l:"en/advanced/global.html#setting-width",a:"setting-width"},"13.6":{t:"SETTING_ITEM_WIDTH",p:"Set the default width of the settings items in the panel, in p ...",l:"en/advanced/global.html#setting-item-width",a:"setting-item-width"},"13.7":{t:"SETTING_ITEM_HEIGHT",p:"Set the default height of the settings items in the panel, in ...",l:"en/advanced/global.html#setting-item-height",a:"setting-item-height"},"13.8":{t:"RESIZE_TIME",p:"Throttle time for the resize event, in milliseconds, defaults ...",l:"en/advanced/global.html#resize-time",a:"resize-time"},"13.9":{t:"SCROLL_TIME",p:"Throttle time for the scroll event, in milliseconds, defaults ...",l:"en/advanced/global.html#scroll-time",a:"scroll-time"},"13.10":{t:"SCROLL_GAP",p:"The boundary tolerance distance for the view event, in pixels, ...",l:"en/advanced/global.html#scroll-gap",a:"scroll-gap"},"13.11":{t:"AUTO_PLAYBACK_MAX",p:"The maximum number of records for the automatic playback featu ...",l:"en/advanced/global.html#auto-playback-max",a:"auto-playback-max"},"13.12":{t:"AUTO_PLAYBACK_MIN",p:"The minimum duration for the auto playback feature, in seconds ...",l:"en/advanced/global.html#auto-playback-min",a:"auto-playback-min"},"13.13":{t:"AUTO_PLAYBACK_TIMEOUT",p:"The delay duration for hiding the auto playback feature, in mi ...",l:"en/advanced/global.html#auto-playback-timeout",a:"auto-playback-timeout"},"13.14":{t:"RECONNECT_TIME_MAX",p:"The maximum number of automatic reconnection attempts when a c ...",l:"en/advanced/global.html#reconnect-time-max",a:"reconnect-time-max"},"13.15":{t:"RECONNECT_SLEEP_TIME",p:"The delay time for the automatic reconnection attempt when a c ...",l:"en/advanced/global.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"13.16":{t:"CONTROL_HIDE_TIME",p:`... +Auto-hide delay time for the bottom control bar, measured ...`,l:"en/advanced/global.html#control-hide-time",a:"control-hide-time"},"13.17":{t:"DBCLICK_TIME",p:"Double-click event delay time, measured in milliseconds, defau ...",l:"en/advanced/global.html#dbclick-time",a:"dbclick-time"},"13.18":{t:"DBCLICK_FULLSCREEN",p:"On desktop, whether to switch to fullscreen on double click, d ...",l:"en/advanced/global.html#dbclick-fullscreen",a:"dbclick-fullscreen"},"13.19":{t:"MOBILE_DBCLICK_PLAY",p:"On mobile, whether to toggle play/pause on double click, defau ...",l:"en/advanced/global.html#mobile-dbclick-play",a:"mobile-dbclick-play"},"13.20":{t:"MOBILE_CLICK_PLAY",p:"On mobile, whether to play/pause on single click, default is f ...",l:"en/advanced/global.html#mobile-click-play",a:"mobile-click-play"},"13.21":{t:"AUTO_ORIENTATION_TIME",p:"On mobile devices, the delay time for auto-rotation, in millis ...",l:"en/advanced/global.html#auto-orientation-time",a:"auto-orientation-time"},"13.22":{t:"INFO_LOOP_TIME",p:"Info panel refresh time, unit in milliseconds, default is 1000 ...",l:"en/advanced/global.html#info-loop-time",a:"info-loop-time"},"13.23":{t:"FAST_FORWARD_VALUE",p:"On mobile, the multiplier rate of the speed when long-pressing ...",l:"en/advanced/global.html#fast-forward-value",a:"fast-forward-value"},"13.24":{t:"FAST_FORWARD_TIME",p:"The time, in milliseconds, to fast-forward when double-tapped, ...",l:"en/advanced/global.html#fast-forward-time",a:"fast-forward-time"},"13.25":{t:"TOUCH_MOVE_RATIO",p:"On mobile, the ratio of the speed of sliding left and right to ...",l:"en/advanced/global.html#touch-move-ratio",a:"touch-move-ratio"},"13.26":{t:"VOLUME_STEP",p:"The step ratio of adjusting volume with shortcuts, default is ...",l:"en/advanced/global.html#volume-step",a:"volume-step"},"13.27":{t:"SEEK_STEP",p:"The increment by which the playback progress is adjusted via k ...",l:"en/advanced/global.html#seek-step",a:"seek-step"},"13.28":{t:"PLAYBACK_RATE",p:"The list of built-in playback speeds, by default [0.5, 0.75, 1 ...",l:"en/advanced/global.html#playback-rate",a:"playback-rate"},"13.29":{t:"ASPECT_RATIO",p:"Built-in list of video aspect ratios, default is ['default', ' ...",l:"en/advanced/global.html#aspect-ratio",a:"aspect-ratio"},"13.30":{t:"FLIP",p:"Built-in list of video flips, defaults to ['normal', 'horizont ...",l:"en/advanced/global.html#flip",a:"flip"},"13.31":{t:"FULLSCREEN_WEB_IN_BODY",p:"When in web fullscreen, whether to mount the player under the ...",l:"en/advanced/global.html#fullscreen-web-in-body",a:"fullscreen-web-in-body"},"13.32":{t:"LOG_VERSION",p:"Setting whether to print the player version, the default is tr ...",l:"en/advanced/global.html#log-version",a:"log-version"},"13.33":{t:"USE_RAF",p:"Setting whether to use requestAnimationFrame, the default is f ...",l:"en/advanced/global.html#use-raf",a:"use-raf"},"14.0":{t:"# Writing Plugins",p:"Once you know the player's properties, methods, and events, wr ...",l:"en/advanced/plugin.html",a:"writing-plugins"},"15.0":{t:"# Instance Properties",p:"Here, instance properties refer to the primary properties moun ...",l:"en/advanced/property.html",a:"instance-properties"},"15.1":{t:"`play`",p:` +Type: Function + +Play video +<div className="run-code&q ...`,l:"en/advanced/property.html#play",a:"play"},"15.2":{t:"`pause`",p:` +Type: Function + +Pause video +<div className="run-code& ...`,l:"en/advanced/property.html#pause",a:"pause"},"15.3":{t:"`toggle`",p:` +Type: Function + +Toggle the play and pause state of the video + ...`,l:"en/advanced/property.html#toggle",a:"toggle"},"15.4":{t:"`destroy`",p:` +Type: Function +Parameter: Boolean + +Destroy the player. Accept ...`,l:"en/advanced/property.html#destroy",a:"destroy"},"15.5":{t:"`seek`",p:` +Type: Setter +Parameter: Number + +Jump to a specific time in th ...`,l:"en/advanced/property.html#seek",a:"seek"},"15.6":{t:"`forward`",p:` +Type: Setter +Parameter: Number + +Fast forward the video time, ...`,l:"en/advanced/property.html#forward",a:"forward"},"15.7":{t:"`backward`",p:` +Type: Setter +Parameter: Number + +Video rewind time in seconds + ...`,l:"en/advanced/property.html#backward",a:"backward"},"15.8":{t:"`volume`",p:` +Type: Setter/Getter +Parameter: Number + +Sets and gets the vide ...`,l:"en/advanced/property.html#volume",a:"volume"},"15.9":{t:"`url`",p:` +Type: Setter/Getter +Parameter: String + +Set and retrieve the v ...`,l:"en/advanced/property.html#url",a:"url"},"15.10":{t:"`switch`",p:` +Type: Setter +Parameter: String + +Set the video address, which ...`,l:"en/advanced/property.html#switch",a:"switch"},"15.11":{t:"`switchUrl`",p:` +Type: Function +Parameter: String + +Set the video address, simi ...`,l:"en/advanced/property.html#switchurl",a:"switchurl"},"15.12":{t:"`switchQuality`",p:` +Type: Function +Parameter: String + +Set video quality address, ...`,l:"en/advanced/property.html#switchquality",a:"switchquality"},"15.13":{t:"`muted`",p:` +Type: Setter/Getter +Parameter: Boolean + +Set and get whether t ...`,l:"en/advanced/property.html#muted",a:"muted"},"15.14":{t:"`currentTime`",p:` +Type: Setter/Getter +Parameter: Number + +Set and get the curren ...`,l:"en/advanced/property.html#currenttime",a:"currenttime"},"15.15":{t:"`duration`",p:` +Type: Getter + +Get the video duration +<div className=" ...`,l:"en/advanced/property.html#duration",a:"duration"},"15.16":{t:"`screenshot`",p:` +Type: Function + +Download a screenshot of the current video fr ...`,l:"en/advanced/property.html#screenshot",a:"screenshot"},"15.17":{t:"`getDataURL`",p:` +Type: Function + +Gets the base64 address of the screenshot of ...`,l:"en/advanced/property.html#getdataurl",a:"getdataurl"},"15.18":{t:"`getBlobUrl`",p:` +Type: Function + +Gets the blob address of the screenshot of th ...`,l:"en/advanced/property.html#getbloburl",a:"getbloburl"},"15.19":{t:"`fullscreen`",p:` +Type: Setter/Getter +Parameter: Boolean + +Set and get the playe ...`,l:"en/advanced/property.html#fullscreen",a:"fullscreen"},"15.20":{t:"`fullscreenWeb`",p:` +Type: Setter/Getter +Parameter: Boolean + +Set and get the playe ...`,l:"en/advanced/property.html#fullscreenweb",a:"fullscreenweb"},"15.21":{t:"`pip`",p:` +Type: Setter/Getter +Parameter: Boolean + +Set and get the playe ...`,l:"en/advanced/property.html#pip",a:"pip"},"15.22":{t:"`poster`",p:` +Type: Setter/Getter +Parameter: String + +Set and get the video ...`,l:"en/advanced/property.html#poster",a:"poster"},"15.23":{t:"`mini`",p:` +Type: Setter/Getter +Parameter: Boolean + +Set and get the playe ...`,l:"en/advanced/property.html#mini",a:"mini"},"15.24":{t:"`playing`",p:` +Type: Getter +Parameter: Boolean + +Get whether the video is cur ...`,l:"en/advanced/property.html#playing",a:"playing"},"15.25":{t:"`autoSize`",p:` +Type: Function + +Sets whether the video should auto adjust its ...`,l:"en/advanced/property.html#autosize",a:"autosize"},"15.26":{t:"`rect`",p:` +Type: Getter + +Gets the size and position information of the p ...`,l:"en/advanced/property.html#rect",a:"rect"},"15.27":{t:"`flip`",p:` +Type: Setter/Getter +Parameter: String + +Set and get the player ...`,l:"en/advanced/property.html#flip",a:"flip"},"15.28":{t:"`playbackRate`",p:` +Type: Setter/Getter +Parameter: Number +Set and get the playbac ...`,l:"en/advanced/property.html#playbackrate",a:"playbackrate"},"15.29":{t:"`aspectRatio`",p:` +Type: Setter/Getter +Parameter: String + +Set and get the aspect ...`,l:"en/advanced/property.html#aspectratio",a:"aspectratio"},"15.30":{t:"`autoHeight`",p:` +Type: Function + +When the container has only width, this attri ...`,l:"en/advanced/property.html#autoheight",a:"autoheight"},"15.31":{t:"`attr`",p:` +Type: Function +Parameter: String + +Dynamically get and set the ...`,l:"en/advanced/property.html#attr",a:"attr"},"15.32":{t:"`type`",p:` +Type: Setter/Getter +Parameter: String + +Dynamically get and se ...`,l:"en/advanced/property.html#type",a:"type"},"15.33":{t:"`theme`",p:` +Type: Setter/Getter +Parameter: String + +Dynamically get and se ...`,l:"en/advanced/property.html#theme",a:"theme"},"15.34":{t:"`airplay`",p:` +Type: Function + +Activate airplay +<div className="run- ...`,l:"en/advanced/property.html#airplay",a:"airplay"},"15.35":{t:"`loaded`",p:` +Type: Getter + +The proportion of the video that is cached, ran ...`,l:"en/advanced/property.html#loaded",a:"loaded"},"15.36":{t:"`played`",p:` +Type: Getter + +The proportion of the video that has been playe ...`,l:"en/advanced/property.html#played",a:"played"},"15.37":{t:"`proxy`",p:` +Type: Function + +A proxy function for DOM events, which essent ...`,l:"en/advanced/property.html#proxy",a:"proxy"},"15.38":{t:"`query`",p:` +Type: Function + +DOM query function, similar to document.query ...`,l:"en/advanced/property.html#query",a:"query"},"15.39":{t:"`video`",p:` +Type: Element + +A shortcut to return the video element of the ...`,l:"en/advanced/property.html#video",a:"video"},"15.40":{t:"`cssVar`",p:` +Type: Function + +Dynamically getting or setting css variables + ...`,l:"en/advanced/property.html#cssvar",a:"cssvar"},"15.41":{t:"`quality`",p:` +Type: Setter +Parameter: Array + +Dynamically setting the list o ...`,l:"en/advanced/property.html#quality",a:"quality"},"15.42":{t:"`thumbnails`",p:` +Type: Setter/Getter +Parameter: Object + +Dynamically set thumbn ...`,l:"en/advanced/property.html#thumbnails",a:"thumbnails"},"15.43":{t:"`subtitleOffset`",p:` +Type: Setter/Getter +Parameter: Number + +Dynamically set subtit ...`,l:"en/advanced/property.html#subtitleoffset",a:"subtitleoffset"},"16.0":{t:"# Context Menu",p:"",l:"en/component/contextmenu.html",a:"context-menu"},"16.1":{t:"Configuration",p:` + + +Property +Type +Description + + + + +disable +Boolean +Whether to di ...`,l:"en/component/contextmenu.html#configuration",a:"configuration"},"16.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#creation",a:"creation"},"16.3":{t:"Add",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#add",a:"add"},"16.4":{t:"Delete",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#delete",a:"delete"},"16.5":{t:"Updates",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/contextmenu.html#updates",a:"updates"},"17.0":{t:"# Controller",p:"",l:"en/component/controls.html",a:"controller"},"17.1":{t:"Configuration",p:` + + +Property +Type +Description + + + + +disable +Boolean +Whether to di ...`,l:"en/component/controls.html#configuration",a:"configuration"},"17.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#creation",a:"creation"},"17.3":{t:"Adding",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#adding",a:"adding"},"17.4":{t:"Delete",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#delete",a:"delete"},"17.5":{t:"Update",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/controls.html#update",a:"update"},"18.0":{t:"# Layer",p:"",l:"en/component/layers.html",a:"layer"},"18.1":{t:"Configuration",p:` + + +Property +Type +Description + + + + +disable +Boolean +Whether to di ...`,l:"en/component/layers.html#configuration",a:"configuration"},"18.2":{t:"Creation",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#creation",a:"creation"},"18.3":{t:"Add",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#add",a:"add"},"18.4":{t:"Delete",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#delete",a:"delete"},"18.5":{t:"Update",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/layers.html#update",a:"update"},"19.0":{t:"# Settings Panel",p:"",l:"en/component/setting.html",a:"settings-panel"},"19.1":{t:"Built-in",p:"First, open the settings panel, and then it comes with four bu ...",l:"en/component/setting.html#built-in",a:"built-in"},"19.2":{t:"Create - Button",p:` + + +Property +Type +Description + + + + +html +String, Element +Item DOM ...`,l:"en/component/setting.html#create-button",a:"create-button"},"19.3":{t:"Create - Selection List",p:` + + +Property +Type +Description + + + + +html +String, Element +Item DOM ...`,l:"en/component/setting.html#create-selection-list",a:"create-selection-list"},"19.4":{t:"Creating - Nested Lists",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#creating-nested-lists",a:"creating-nested-lists"},"19.5":{t:"Create - Toggle Button",p:` + + +Property +Type +Description + + + + +html +String, Element +Element' ...`,l:"en/component/setting.html#create-toggle-button",a:"create-toggle-button"},"19.6":{t:"Create - Range Slider",p:` + + +Attribute +Type +Description + + + + +html +String, Element +The ele ...`,l:"en/component/setting.html#create-range-slider",a:"create-range-slider"},"19.7":{t:"Add",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#add",a:"add"},"19.8":{t:"Delete",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#delete",a:"delete"},"19.9":{t:"Updates",p:"<div className="run-code">▶ Run Code</div&g ...",l:"en/component/setting.html#updates",a:"updates"},"20.0":{t:"# Installation and Usage",p:"",l:"en/index.html",a:"installation-and-usage"},"20.1":{t:"Installation",p:`::: code-group +npm install artplayer + +yarn add artplayer + +pnpm ...`,l:"en/index.html#installation",a:"installation"},"20.2":{t:"`CDN`",p:`::: code-group +https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"en/index.html#cdn",a:"cdn"},"20.3":{t:"Usage",p:`::: code-group +<html> + <head> + <title ...`,l:"en/index.html#usage",a:"usage"},"20.4":{t:"`Vue.js`",p:`::: code-group +<template> + <div ref="artRef&quo ...`,l:"en/index.html#vue-js",a:"vue-js"},"20.5":{t:"`React.js`",p:`::: code-group +import { useEffect, useRef } from 'react'; +impo ...`,l:"en/index.html#react-js",a:"react-js"},"20.6":{t:"TypeScript",p:`Importing Artplayer will automatically import artplayer.d.ts +`,l:"en/index.html#typescript",a:"typescript"},"20.7":{t:"Vue.js",p:` + +`,l:"en/index.html#vue-js",a:"vue-js"},"20.8":{t:"React.js",p:`import Artplayer from 'artplayer'; +const art = useRef<Artpl ...`,l:"en/index.html#react-js",a:"react-js"},"20.9":{t:"Option",p:`You can also use the option type +import Artplayer from 'artpla ...`,l:"en/index.html#option",a:"option"},"20.10":{t:"JavaScript",p:"Sometimes your js file may lose the TypeScript type hints, in ...",l:"en/index.html#javascript",a:"javascript"},"20.11":{t:"Ancient Browsers",p:"The production build of artplayer.js is only compatible with t ...",l:"en/index.html#ancient-browsers",a:"ancient-browsers"},"21.0":{t:"# Language Settings",p:`::: danger +Given the increasing number of bundled multilingual ...`,l:"en/start/i18n.html",a:"language-settings"},"21.1":{t:"Default Languages",p:"The default languages are: en, zh-cn, which do not require man ...",l:"en/start/i18n.html#default-languages",a:"default-languages"},"21.2":{t:"Importing Languages",p:"Language files before packaging are located in: artplayer/src/ ...",l:"en/start/i18n.html#importing-languages",a:"importing-languages"},"21.3":{t:"Add Language",p:`var art = new Artplayer({ + container: '.artplayer-app', + ...`,l:"en/start/i18n.html#add-language",a:"add-language"},"21.4":{t:"Modify Language",p:`import zhTw from 'artplayer/i18n/zh-tw.js'; + +var art = new Art ...`,l:"en/start/i18n.html#modify-language",a:"modify-language"},"22.0":{t:"# Basic Options",p:"",l:"en/start/option.html",a:"basic-options"},"22.1":{t:"`container`",p:` +Type: String, Element +Default: #artplayer + +The DOM container ...`,l:"en/start/option.html#container",a:"container"},"22.2":{t:"`url`",p:` +Type: String +Default: '' + +The video source address +<div cl ...`,l:"en/start/option.html#url",a:"url"},"22.3":{t:"`id`",p:` +Type: String +Default: '' + +The unique identifier of the player ...`,l:"en/start/option.html#id",a:"id"},"22.4":{t:"`onReady`",p:` +Type: Function +Default: undefined + +The constructor accepts a ...`,l:"en/start/option.html#onready",a:"onready"},"22.5":{t:"`poster`",p:` +Type: String +Default: '' + +The poster of the video, which only ...`,l:"en/start/option.html#poster",a:"poster"},"22.6":{t:"`theme`",p:` +Type: String +Default: #f00 + +Player theme color, currently use ...`,l:"en/start/option.html#theme",a:"theme"},"22.7":{t:"`volume`",p:` +Type: Number +Default: 0.7 + +The default volume of the player +& ...`,l:"en/start/option.html#volume",a:"volume"},"22.8":{t:"`isLive`",p:` +Type: Boolean +Default: false + +Use live mode, which will hide ...`,l:"en/start/option.html#islive",a:"islive"},"22.9":{t:"`muted`",p:` +Type: Boolean +Default: false + +Whether to mute by default +< ...`,l:"en/start/option.html#muted",a:"muted"},"22.10":{t:"`autoplay`",p:` +Type: Boolean +Default: false + +Whether to play automatically + + ...`,l:"en/start/option.html#autoplay",a:"autoplay"},"22.11":{t:"`autoSize`",p:` +Type: Boolean +Default: false + +The size of the player will by ...`,l:"en/start/option.html#autosize",a:"autosize"},"22.12":{t:"`autoMini`",p:` +Type: Boolean +Default: false + +Automatically enter mini mode w ...`,l:"en/start/option.html#automini",a:"automini"},"22.13":{t:"`loop`",p:` +Type: Boolean +Default: false + +Whether to loop the video +<d ...`,l:"en/start/option.html#loop",a:"loop"},"22.14":{t:"`flip`",p:` +Type: Boolean +Default: false + +Whether to show the video flip ...`,l:"en/start/option.html#flip",a:"flip"},"22.15":{t:"`playbackRate`",p:` +Type: Boolean +Default: false + +Whether to show the playback sp ...`,l:"en/start/option.html#playbackrate",a:"playbackrate"},"22.16":{t:"`aspectRatio`",p:` +Type: Boolean +Default: false + +Displays the video aspect ratio ...`,l:"en/start/option.html#aspectratio",a:"aspectratio"},"22.17":{t:"`screenshot`",p:` +Type: Boolean +Default: false + +Whether to show the screenshot ...`,l:"en/start/option.html#screenshot",a:"screenshot"},"22.18":{t:"`setting`",p:` +Type: Boolean +Default: false + +Display the toggle button for t ...`,l:"en/start/option.html#setting",a:"setting"},"22.19":{t:"`hotkey`",p:` +Type: Boolean +Default: true + +Whether to use hotkeys +<div c ...`,l:"en/start/option.html#hotkey",a:"hotkey"},"22.20":{t:"`pip`",p:` +Type: Boolean +Default: false +Show the Picture in Picture swit ...`,l:"en/start/option.html#pip",a:"pip"},"22.21":{t:"`mutex`",p:` +Type: Boolean +Default: true + +If there are multiple players on ...`,l:"en/start/option.html#mutex",a:"mutex"},"22.22":{t:"`fullscreen`",p:` +Type: Boolean +Default: false +Display the Window Fullscreen bu ...`,l:"en/start/option.html#fullscreen",a:"fullscreen"},"22.23":{t:"`fullscreenWeb`",p:` +Type: Boolean +Default: false + +Display the Web Fullscreen butt ...`,l:"en/start/option.html#fullscreenweb",a:"fullscreenweb"},"22.24":{t:"`subtitleOffset`",p:` + +Type: Boolean + + +Default: false + + +Subtitle time offset, the r ...`,l:"en/start/option.html#subtitleoffset",a:"subtitleoffset"},"22.25":{t:"`miniProgressBar`",p:` +Type: Boolean +Default: false + +Mini progress bar, only appears ...`,l:"en/start/option.html#miniprogressbar",a:"miniprogressbar"},"22.26":{t:"`useSSR`",p:` +Type: Boolean +Default: false + +Whether to use SSR (Server-Side ...`,l:"en/start/option.html#usessr",a:"usessr"},"22.27":{t:"`playsInline`",p:` +Type: Boolean +Default: true + +Whether to use playsInline mode ...`,l:"en/start/option.html#playsinline",a:"playsinline"},"22.28":{t:"`layers`",p:` +Type: Array +Default: [] + +Initializes custom layers +<div cl ...`,l:"en/start/option.html#layers",a:"layers"},"22.29":{t:"`settings`",p:` +Type: Array +Default: [] + +Initializes custom settings panel +&l ...`,l:"en/start/option.html#settings",a:"settings"},"22.30":{t:"`contextmenu`",p:` +Type: Array +Default: [] + +Initialize custom context menu +<d ...`,l:"en/start/option.html#contextmenu",a:"contextmenu"},"22.31":{t:"`controls`",p:` +Type: Array +Default: [] + +Initializes custom bottom control ba ...`,l:"en/start/option.html#controls",a:"controls"},"22.32":{t:"`quality`",p:` +Type: Array +Default: [] + +Whether to show the quality selectio ...`,l:"en/start/option.html#quality",a:"quality"},"22.33":{t:"`highlight`",p:` +Type: Array +Default: [] + +Show highlight information on the pr ...`,l:"en/start/option.html#highlight",a:"highlight"},"22.34":{t:"`plugins`",p:` +Type: Array +Default: [] + +Initialize custom plugins +<div cl ...`,l:"en/start/option.html#plugins",a:"plugins"},"22.35":{t:"`thumbnails`",p:` +Type: Object +Default: {} + +Set thumbnails on the progress bar + ...`,l:"en/start/option.html#thumbnails",a:"thumbnails"},"22.36":{t:"`subtitle`",p:` +Type: Object +Default: {} + +Set the video subtitles, supporting ...`,l:"en/start/option.html#subtitle",a:"subtitle"},"22.37":{t:"`moreVideoAttr`",p:` +Type: Object +Default: {'controls': false, 'preload': 'metadat ...`,l:"en/start/option.html#morevideoattr",a:"morevideoattr"},"22.38":{t:"`icons`",p:` +Type: Object +Default: {} + +Used to replace default icons, supp ...`,l:"en/start/option.html#icons",a:"icons"},"22.39":{t:"`type`",p:` +Type: String +Default: '' + +Used to specify the format of the v ...`,l:"en/start/option.html#type",a:"type"},"22.40":{t:"`customType`",p:` +Type: Object +Default: {} + +Matches the video's type to delegat ...`,l:"en/start/option.html#customtype",a:"customtype"},"22.41":{t:"`lang`",p:` +Type: String +Default: navigator.language.toLowerCase() + +Defau ...`,l:"en/start/option.html#lang",a:"lang"},"22.42":{t:"`i18n`",p:` +Type: Object +Default: {} + +Custom i18n configuration, which wi ...`,l:"en/start/option.html#i18n",a:"i18n"},"22.43":{t:"`lock`",p:` +Type: Boolean +Default: false + +Whether to display a lock butto ...`,l:"en/start/option.html#lock",a:"lock"},"22.44":{t:"`gesture`",p:` +Type: Boolean +Default: true + +Whether to enable gesture events ...`,l:"en/start/option.html#gesture",a:"gesture"},"22.45":{t:"`fastForward`",p:` +Type: Boolean +Default: false + +Whether to add fast forward fun ...`,l:"en/start/option.html#fastforward",a:"fastforward"},"22.46":{t:"`autoPlayback`",p:` +Type: Boolean +Default: false + +Whether to use the automatic pl ...`,l:"en/start/option.html#autoplayback",a:"autoplayback"},"22.47":{t:"`autoOrientation`",p:` +Type: Boolean +Default: false + +Whether to rotate the player on ...`,l:"en/start/option.html#autoorientation",a:"autoorientation"},"22.48":{t:"`airplay`",p:` +Type: Boolean +Default: false + +Whether to display the airplay ...`,l:"en/start/option.html#airplay",a:"airplay"},"22.49":{t:"`cssVar`",p:` +Type: Object +Default: {} + +Used to change built-in CSS variabl ...`,l:"en/start/option.html#cssvar",a:"cssvar"},"22.50":{t:"`proxy`",p:` +Type: function +Default: undefined + +The function can return a ...`,l:"en/start/option.html#proxy",a:"proxy"},"23.0":{t:"# 安装使用",p:"",l:"index.html",a:"安装使用"},"23.1":{t:"安装",p:`::: code-group +npm install artplayer + +yarn add artplayer + +pnpm ...`,l:"index.html#安装",a:"安装"},"23.2":{t:"`CDN`",p:`::: code-group +https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"index.html#cdn",a:"cdn"},"23.3":{t:"使用",p:`::: code-group +<html> + <head> + <title ...`,l:"index.html#使用",a:"使用"},"23.4":{t:"`Vue.js`",p:`::: code-group +<template> + <div ref="artRef&quo ...`,l:"index.html#vue-js",a:"vue-js"},"23.5":{t:"`React.js`",p:`::: code-group +import { useEffect, useRef } from 'react'; +impo ...`,l:"index.html#react-js",a:"react-js"},"23.6":{t:"TypeScript",p:`导入 Artplayer 时会自动导入的 artplayer.d.ts +`,l:"index.html#typescript",a:"typescript"},"23.7":{t:"Vue.js",p:` + +`,l:"index.html#vue-js",a:"vue-js"},"23.8":{t:"React.js",p:`import Artplayer from 'artplayer'; +const art = useRef<Artpl ...`,l:"index.html#react-js",a:"react-js"},"23.9":{t:"Option",p:`你也可以使用选项的类型 +import Artplayer from 'artplayer'; + +const option: ...`,l:"index.html#option",a:"option"},"23.10":{t:"JavaScript",p:`有时你的 js 文件会丢失 TypeScript 的类型提示,这时候你可以手动导入类型 +变量: +/** + * @type { ...`,l:"index.html#javascript",a:"javascript"},"23.11":{t:"古老的浏览器",p:`生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version +对于 ...`,l:"index.html#古老的浏览器",a:"古老的浏览器"},"24.0":{t:"# 弹幕库",p:"",l:"plugin/danmuku.html",a:"弹幕库"},"24.1":{t:"演示",p:`👉 查看完整演示 +`,l:"plugin/danmuku.html#演示",a:"演示"},"24.2":{t:"安装",p:`::: code-group +npm install artplayer-plugin-danmuku + +yarn add ...`,l:"plugin/danmuku.html#安装",a:"安装"},"24.3":{t:"CDN",p:`::: code-group +https://cdn.jsdelivr.net/npm/artplayer-plugin-d ...`,l:"plugin/danmuku.html#cdn",a:"cdn"},"24.4":{t:"弹幕结构",p:`每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数 +{ + t ...`,l:"plugin/danmuku.html#弹幕结构",a:"弹幕结构"},"24.5":{t:"全部选项",p:`只有danmuku是必须的参数,其余都是非必填 +{ + danmuku: [], // 弹幕数据 + speed: ...`,l:"plugin/danmuku.html#全部选项",a:"全部选项"},"24.6":{t:"生命周期",p:`来自用户输入的弹幕: +beforeEmit -> filter -> beforeVisible -> a ...`,l:"plugin/danmuku.html#生命周期",a:"生命周期"},"24.7":{t:"使用弹幕数组",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用弹幕数组",a:"使用弹幕数组"},"24.8":{t:"使用弹幕 XML",p:`弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致 +<div className="run-cod ...`,l:"plugin/danmuku.html#使用弹幕-xml",a:"使用弹幕-xml"},"24.9":{t:"使用异步返回",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用异步返回",a:"使用异步返回"},"24.10":{t:"`hide/show`",p:`通过方法 hide 和 show 进行隐藏或者显示弹幕 +<div className="run-code&q ...`,l:"plugin/danmuku.html#hide-show",a:"hide-show"},"24.11":{t:"`isHide`",p:`通过属性 isHide 判断当前弹幕是隐藏或者显示 +<div className="run-code&quo ...`,l:"plugin/danmuku.html#ishide",a:"ishide"},"24.12":{t:"`emit`",p:`通过方法 emit 发送一条实时弹幕 +<div className="run-code" data ...`,l:"plugin/danmuku.html#emit",a:"emit"},"24.13":{t:"`config`",p:`通过方法 config 实时改变弹幕配置 +<div className="run-code" da ...`,l:"plugin/danmuku.html#config",a:"config"},"24.14":{t:"`load`",p:`通过 load 方法可以重载弹幕库,或者切换新弹幕库,或者追加新的弹幕库 +<div className="r ...`,l:"plugin/danmuku.html#load",a:"load"},"24.15":{t:"`reset`",p:`用于清空当前显示的弹幕 +<div className="run-code" data-libs=& ...`,l:"plugin/danmuku.html#reset",a:"reset"},"24.16":{t:"`mount`",p:`在初始化弹幕插件的时候,是可以指定弹幕发射器的挂载位置的,默认是挂载在控制栏的中部,你也可以把它挂载在播放器以外的地方。 +当 ...`,l:"plugin/danmuku.html#mount",a:"mount"},"24.17":{t:"`option`",p:`用于获取当前弹幕配置 +<div className="run-code" data-libs=&q ...`,l:"plugin/danmuku.html#option",a:"option"},"24.18":{t:"事件",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#事件",a:"事件"},"25.0":{t:"# 语言设置",p:`::: danger +鉴于捆绑的多国语言越来越多, 从 5.1.0 版本开始, artplayer.js 核心代码除了包含 ...`,l:"start/i18n.html",a:"语言设置"},"25.1":{t:"默认语言",p:`默认语言有: en, zh-cn, 无需手动导入 +var art = new Artplayer({ + contain ...`,l:"start/i18n.html#默认语言",a:"默认语言"},"25.2":{t:"导入语言",p:`打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言 +打包后的语言文件存放于: a ...`,l:"start/i18n.html#导入语言",a:"导入语言"},"25.3":{t:"新增语言",p:`var art = new Artplayer({ + container: '.artplayer-app', + ...`,l:"start/i18n.html#新增语言",a:"新增语言"},"25.4":{t:"修改语言",p:`import zhTw from 'artplayer/i18n/zh-tw.js'; + +var art = new Art ...`,l:"start/i18n.html#修改语言",a:"修改语言"},"26.0":{t:"# 基础选项",p:"",l:"start/option.html",a:"基础选项"},"26.1":{t:"`container`",p:` +Type: String, Element +Default: #artplayer + +播放器挂载的 DOM 容器 +< ...`,l:"start/option.html#container",a:"container"},"26.2":{t:"`url`",p:` +Type: String +Default: '' + +视频源地址 +<div className="run-c ...`,l:"start/option.html#url",a:"url"},"26.3":{t:"`id`",p:` +Type: String +Default: '' + +播放器的唯一标识,目前只用于记忆播放 autoplayback +< ...`,l:"start/option.html#id",a:"id"},"26.4":{t:"`onReady`",p:` +Type: Function +Default: undefined + +构造函数接受一个函数作为第二个参数,播放器初始化成功 ...`,l:"start/option.html#onready",a:"onready"},"26.5":{t:"`poster`",p:` +Type: String +Default: '' + +视频的海报,只会出现在播放器初始化且未播放的状态下 +<div c ...`,l:"start/option.html#poster",a:"poster"},"26.6":{t:"`theme`",p:` +Type: String +Default: #f00 + +播放器主题颜色,目前用于 进度条 和 高亮元素 上 +<div ...`,l:"start/option.html#theme",a:"theme"},"26.7":{t:"`volume`",p:` +Type: Number +Default: 0.7 + +播放器的默认音量 +<div className="r ...`,l:"start/option.html#volume",a:"volume"},"26.8":{t:"`isLive`",p:` +Type: Boolean +Default: false + +使用直播模式,会隐藏进度条和播放时间 +<div clas ...`,l:"start/option.html#islive",a:"islive"},"26.9":{t:"`muted`",p:` +Type: Boolean +Default: false + +是否默认静音 +<div className=" ...`,l:"start/option.html#muted",a:"muted"},"26.10":{t:"`autoplay`",p:` +Type: Boolean +Default: false + +是否自动播放 +<div className=" ...`,l:"start/option.html#autoplay",a:"autoplay"},"26.11":{t:"`autoSize`",p:` +Type: Boolean +Default: false + +播放器的尺寸默认会填充整个 container 容器尺寸,所以 ...`,l:"start/option.html#autosize",a:"autosize"},"26.12":{t:"`autoMini`",p:` +Type: Boolean +Default: false + +当播放器滚动到浏览器视口以外时,自动进入 迷你播放 模式 +&l ...`,l:"start/option.html#automini",a:"automini"},"26.13":{t:"`loop`",p:` +Type: Boolean +Default: false + +是否循环播放 +<div className=" ...`,l:"start/option.html#loop",a:"loop"},"26.14":{t:"`flip`",p:` +Type: Boolean +Default: false + +是否显示视频翻转功能,目前只出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#flip",a:"flip"},"26.15":{t:"`playbackRate`",p:` +Type: Boolean +Default: false + +是否显示视频播放速度功能,会出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#playbackrate",a:"playbackrate"},"26.16":{t:"`aspectRatio`",p:` +Type: Boolean +Default: false + +是否显示视频长宽比功能,会出现在 设置面板 和 右键菜单 里 + ...`,l:"start/option.html#aspectratio",a:"aspectratio"},"26.17":{t:"`screenshot`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示 视频截图 功能 +<div cla ...`,l:"start/option.html#screenshot",a:"screenshot"},"26.18":{t:"`setting`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示 设置面板 的开关按钮 +<div ...`,l:"start/option.html#setting",a:"setting"},"26.19":{t:"`hotkey`",p:` +Type: Boolean +Default: true + +是否使用快捷键 +<div className=" ...`,l:"start/option.html#hotkey",a:"hotkey"},"26.20":{t:"`pip`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示 画中画 的开关按钮 +<div c ...`,l:"start/option.html#pip",a:"pip"},"26.21":{t:"`mutex`",p:` +Type: Boolean +Default: true + +假如页面里同时存在多个播放器,是否只能让一个播放器播放 +< ...`,l:"start/option.html#mutex",a:"mutex"},"26.22":{t:"`fullscreen`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示播放器 窗口全屏 按钮 +<div ...`,l:"start/option.html#fullscreen",a:"fullscreen"},"26.23":{t:"`fullscreenWeb`",p:` +Type: Boolean +Default: false + +是否在底部控制栏里显示播放器 网页全屏 按钮 +<div ...`,l:"start/option.html#fullscreenweb",a:"fullscreenweb"},"26.24":{t:"`subtitleOffset`",p:` +Type: Boolean +Default: false + +字幕时间偏移,范围在 [-5s, 5s],出现在 设置面板 里 ...`,l:"start/option.html#subtitleoffset",a:"subtitleoffset"},"26.25":{t:"`miniProgressBar`",p:` +Type: Boolean +Default: false + +迷你进度条,只在播放器失去焦点后且正在播放时出现 +<di ...`,l:"start/option.html#miniprogressbar",a:"miniprogressbar"},"26.26":{t:"`useSSR`",p:` +Type: Boolean +Default: false + +是否使用 SSR 挂载模式,假如你希望在播放器挂载前,就提前渲 ...`,l:"start/option.html#usessr",a:"usessr"},"26.27":{t:"`playsInline`",p:` +Type: Boolean +Default: true + +在移动端是否使用 playsInline 模式 +<div ...`,l:"start/option.html#playsinline",a:"playsinline"},"26.28":{t:"`layers`",p:` +Type: Array +Default: [] + +初始化自定义的 层 +<div className="ru ...`,l:"start/option.html#layers",a:"layers"},"26.29":{t:"`settings`",p:` +Type: Array +Default: [] + +初始化自定义的 设置面板 +<div className=" ...`,l:"start/option.html#settings",a:"settings"},"26.30":{t:"`contextmenu`",p:` +Type: Array +Default: [] + +初始化自定义的 右键菜单 +<div className=" ...`,l:"start/option.html#contextmenu",a:"contextmenu"},"26.31":{t:"`controls`",p:` +Type: Array +Default: [] + +初始化自定义的底部 控制栏 +<div className=&quo ...`,l:"start/option.html#controls",a:"controls"},"26.32":{t:"`quality`",p:` +Type: Array +Default: [] + +是否在底部控制栏里显示 画质选择 列表 + + + +属性 +类型 +描述 + + + + + ...`,l:"start/option.html#quality",a:"quality"},"26.33":{t:"`highlight`",p:` +Type: Array +Default: [] + +在进度条上显示 高亮信息 + + + +属性 +类型 +描述 + + + + +time +Nu ...`,l:"start/option.html#highlight",a:"highlight"},"26.34":{t:"`plugins`",p:` +Type: Array +Default: [] + +初始化自定义的 插件 +<div className="r ...`,l:"start/option.html#plugins",a:"plugins"},"26.35":{t:"`thumbnails`",p:` +Type: Object +Default: {} + +在进度条上设置 预览图 + + + +属性 +类型 +描述 + + + + +url +Str ...`,l:"start/option.html#thumbnails",a:"thumbnails"},"26.36":{t:"`subtitle`",p:` +Type: Object +Default: {} + +设置视频的字幕,支持字幕格式:vtt, srt, ass + + + +属性 + ...`,l:"start/option.html#subtitle",a:"subtitle"},"26.37":{t:"`moreVideoAttr`",p:` +Type: Object +Default: {'controls': false,'preload': 'metadata ...`,l:"start/option.html#morevideoattr",a:"morevideoattr"},"26.38":{t:"`icons`",p:` +Type: Object +Default: {} + +用于替换默认图标,支持 Html 字符串和 HTMLElement +& ...`,l:"start/option.html#icons",a:"icons"},"26.39":{t:"`type`",p:` +Type: String +Default: '' + +用于指明视频的格式,需要配合 customType 一起使用,默认视频 ...`,l:"start/option.html#type",a:"type"},"26.40":{t:"`customType`",p:` +Type: Object +Default: {} + +通过视频的 type 进行匹配,把视频解码权交给第三方程序进行处理,处 ...`,l:"start/option.html#customtype",a:"customtype"},"26.41":{t:"`lang`",p:` +Type: String +Default: navigator.language.toLowerCase() + +默认显示语 ...`,l:"start/option.html#lang",a:"lang"},"26.42":{t:"`i18n`",p:` +Type: Object +Default: {} + +自定义 i18n 配置,该配置会和自带的 i18n 进行深度合并 +新增 ...`,l:"start/option.html#i18n",a:"i18n"},"26.43":{t:"`lock`",p:` +Type: Boolean +Default: false + +是否在移动端显示一个 锁定按钮 ,用于隐藏底部 控制栏 +< ...`,l:"start/option.html#lock",a:"lock"},"26.44":{t:"`gesture`",p:` +Type: Boolean +Default: true + +是否在移动端启用视频元素上的手势事件 +<div class ...`,l:"start/option.html#gesture",a:"gesture"},"26.45":{t:"`fastForward`",p:` +Type: Boolean +Default: false + +是否在移动端添加长按视频快进功能 +<div classN ...`,l:"start/option.html#fastforward",a:"fastforward"},"26.46":{t:"`autoPlayback`",p:` +Type: Boolean +Default: false + +是否使用自动 回放功能 +<div className=& ...`,l:"start/option.html#autoplayback",a:"autoplayback"},"26.47":{t:"`autoOrientation`",p:` +Type: Boolean +Default: false + +是否在移动端的网页全屏时,根据视频尺寸和视口尺寸,旋转播放器 + ...`,l:"start/option.html#autoorientation",a:"autoorientation"},"26.48":{t:"`airplay`",p:` +Type: Boolean +Default: false + +是否显示 airplay 按钮,当前只有部分浏览器支持该功能 + ...`,l:"start/option.html#airplay",a:"airplay"},"26.49":{t:"`cssVar`",p:` +Type: Object +Default: {} + +用于改变内置的css变量 +<div className=&quo ...`,l:"start/option.html#cssvar",a:"cssvar"},"26.50":{t:"`proxy`",p:` +Type: function +Default: undefined + +函数可以返回一个第三方的 HTMLCanvasEle ...`,l:"start/option.html#proxy",a:"proxy"}},n={previewLength:62,buttonLabel:"Search",placeholder:"Search docs",allow:[],ignore:[]},a={INDEX_DATA:e,PREVIEW_LOOKUP:t,Options:n};export{a as default}; diff --git a/docs/document/assets/component_contextmenu.md.-4hZtk2p.lean.js b/docs/document/assets/component_contextmenu.md.-4hZtk2p.lean.js deleted file mode 100644 index 889f31653..000000000 --- a/docs/document/assets/component_contextmenu.md.-4hZtk2p.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const B=JSON.parse('{"title":"右键菜单","description":"","frontmatter":{},"headers":[],"relativePath":"component/contextmenu.md","filePath":"component/contextmenu.md","lastUpdated":1682229030000}'),p={name:"component/contextmenu.md"},e=s("",4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",2),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",2),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",2),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s("",1),y=[e,h,t,k,r,E,d,c,g];function o(b,u,m,F,_,C){return l(),n("div",null,y)}const D=a(p,[["render",o]]);export{B as __pageData,D as default}; diff --git a/docs/document/assets/component_contextmenu.md.-4hZtk2p.js b/docs/document/assets/component_contextmenu.md.-d4adzZb.js similarity index 82% rename from docs/document/assets/component_contextmenu.md.-4hZtk2p.js rename to docs/document/assets/component_contextmenu.md.-d4adzZb.js index 74f460e7d..85306bd63 100644 --- a/docs/document/assets/component_contextmenu.md.-4hZtk2p.js +++ b/docs/document/assets/component_contextmenu.md.-d4adzZb.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const B=JSON.parse('{"title":"右键菜单","description":"","frontmatter":{},"headers":[],"relativePath":"component/contextmenu.md","filePath":"component/contextmenu.md","lastUpdated":1682229030000}'),p={name:"component/contextmenu.md"},e=s('

右键菜单 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本

创建 ​

',4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"右键菜单","description":"","frontmatter":{},"headers":[],"relativePath":"component/contextmenu.md","filePath":"component/contextmenu.md","lastUpdated":1682229030000}'),e={name:"component/contextmenu.md"};function h(t,a,k,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s('

右键菜单 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本

创建 ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -16,7 +16,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 art.contextmenu.show = true;
 
 // Get the Element of contextmenu by name
-console.info(art.contextmenu['your-menu']);

添加 ​

`,2),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s(`
js
var art = new Artplayer({
+console.info(art.contextmenu['your-menu']);

添加 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -33,7 +33,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 art.contextmenu.show = true;
 
 // Get the Element of contextmenu by name
-console.info(art.contextmenu['your-menu']);

删除 ​

`,2),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var art = new Artplayer({
+console.info(art.contextmenu['your-menu']);

删除 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -55,7 +55,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         // Delete the contextmenu by name
         art.contextmenu.remove('your-menu')
     }, 3000);
-});

更新 ​

`,2),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s(`
js
var art = new Artplayer({
+});

更新 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -80,4 +80,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             html: 'Your New Menu',
         })
     }, 3000);
-});
`,1),y=[e,h,t,k,r,E,d,c,g];function o(b,u,m,F,_,C){return l(),n("div",null,y)}const D=a(p,[["render",o]]);export{B as __pageData,D as default}; +});
`,1)]))}const y=n(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/component_contextmenu.md.-d4adzZb.lean.js b/docs/document/assets/component_contextmenu.md.-d4adzZb.lean.js new file mode 100644 index 000000000..1e6edaab0 --- /dev/null +++ b/docs/document/assets/component_contextmenu.md.-d4adzZb.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"右键菜单","description":"","frontmatter":{},"headers":[],"relativePath":"component/contextmenu.md","filePath":"component/contextmenu.md","lastUpdated":1682229030000}'),e={name:"component/contextmenu.md"};function h(t,a,k,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/component_controls.md.DQKRBMXp.lean.js b/docs/document/assets/component_controls.md.DQKRBMXp.lean.js deleted file mode 100644 index cc33c4308..000000000 --- a/docs/document/assets/component_controls.md.DQKRBMXp.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const A=JSON.parse('{"title":"控制器","description":"","frontmatter":{},"headers":[],"relativePath":"component/controls.md","filePath":"component/controls.md","lastUpdated":1682233868000}'),p={name:"component/controls.md"},h=s("",4),t=i("div",{className:"run-code"},"▶ Run Code",-1),e=s("",2),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s("",2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",2),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s("",1),y=[h,t,e,k,E,r,d,c,g];function b(o,F,u,m,C,B){return l(),n("div",null,y)}const v=a(p,[["render",b]]);export{A as __pageData,v as default}; diff --git a/docs/document/assets/component_controls.md.DQKRBMXp.js b/docs/document/assets/component_controls.md.DZNfg7M_.js similarity index 86% rename from docs/document/assets/component_controls.md.DQKRBMXp.js rename to docs/document/assets/component_controls.md.DZNfg7M_.js index ebbf04112..674cf81ed 100644 --- a/docs/document/assets/component_controls.md.DQKRBMXp.js +++ b/docs/document/assets/component_controls.md.DZNfg7M_.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const A=JSON.parse('{"title":"控制器","description":"","frontmatter":{},"headers":[],"relativePath":"component/controls.md","filePath":"component/controls.md","lastUpdated":1682233868000}'),p={name:"component/controls.md"},h=s('

控制器 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本
positionStringleft 和 right 控制控制器出现的左右位置
selectorArray选择列表的对象数组
onSelectFunction选择列表的元素被点击时触发的函数

创建 ​

',4),t=i("div",{className:"run-code"},"▶ Run Code",-1),e=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"控制器","description":"","frontmatter":{},"headers":[],"relativePath":"component/controls.md","filePath":"component/controls.md","lastUpdated":1682233868000}'),h={name:"component/controls.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

控制器 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本
positionStringleft 和 right 控制控制器出现的左右位置
selectorArray选择列表的对象数组
onSelectFunction选择列表的元素被点击时触发的函数

创建 ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -41,7 +41,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 // Get the Element of control by name
 console.info(art.controls['your-button']);
-console.info(art.controls['subtitle']);

添加 ​

`,2),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s(`
js
var art = new Artplayer({
+console.info(art.controls['subtitle']);

添加 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -64,7 +64,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 // Get the Element of control by name
-console.info(art.controls['button1']);

删除 ​

`,2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var art = new Artplayer({
+console.info(art.controls['button1']);

删除 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -86,7 +86,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         // Delete the control by name
         art.controls.remove('button1');
     }, 3000);
-});

更新 ​

`,2),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s(`
js
var art = new Artplayer({
+});

更新 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -127,4 +127,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             ],
         });
     }, 3000);
-});
`,1),y=[h,t,e,k,E,r,d,c,g];function b(o,F,u,m,C,B){return l(),n("div",null,y)}const v=a(p,[["render",b]]);export{A as __pageData,v as default}; +});
`,1)]))}const y=n(h,[["render",e]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/component_controls.md.DZNfg7M_.lean.js b/docs/document/assets/component_controls.md.DZNfg7M_.lean.js new file mode 100644 index 000000000..19d31cad0 --- /dev/null +++ b/docs/document/assets/component_controls.md.DZNfg7M_.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"控制器","description":"","frontmatter":{},"headers":[],"relativePath":"component/controls.md","filePath":"component/controls.md","lastUpdated":1682233868000}'),h={name:"component/controls.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(h,[["render",e]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/component_layers.md.C9che3XP.js b/docs/document/assets/component_layers.md.BYX-1Wvu.js similarity index 86% rename from docs/document/assets/component_layers.md.C9che3XP.js rename to docs/document/assets/component_layers.md.BYX-1Wvu.js index a76e9e46f..a9502907b 100644 --- a/docs/document/assets/component_layers.md.C9che3XP.js +++ b/docs/document/assets/component_layers.md.BYX-1Wvu.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const A=JSON.parse('{"title":"业务层","description":"","frontmatter":{},"headers":[],"relativePath":"component/layers.md","filePath":"component/layers.md","lastUpdated":1682229030000}'),p={name:"component/layers.md"},h=s('

业务层 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本

创建 ​

',4),e=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js
var img = '/assets/sample/layer.png';
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"业务层","description":"","frontmatter":{},"headers":[],"relativePath":"component/layers.md","filePath":"component/layers.md","lastUpdated":1682229030000}'),h={name:"component/layers.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

业务层 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本

创建 ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -23,7 +23,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 // Get the Element of layer by name
-console.info(art.layers['potser']);

添加 ​

`,2),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s(`
js
var img = '/assets/sample/layer.png';
+console.info(art.layers['potser']);

添加 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -47,7 +47,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 // Get the Element of layer by name
-console.info(art.layers['potser']);

删除 ​

`,2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var img = '/assets/sample/layer.png';
+console.info(art.layers['potser']);

删除 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -69,7 +69,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         // Delete the layer by name
         art.layers.remove('potser');
     }, 3000);
-});

更新 ​

`,2),g=i("div",{className:"run-code"},"▶ Run Code",-1),c=s(`
js
var img = '/assets/sample/layer.png';
+});

更新 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -99,4 +99,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         });
     }, 3000);
-});
`,1),y=[h,e,t,k,E,r,d,g,c];function b(o,F,u,m,C,_){return l(),n("div",null,y)}const D=a(p,[["render",b]]);export{A as __pageData,D as default}; +});
`,1)]))}const y=n(h,[["render",e]]);export{c as __pageData,y as default}; diff --git a/docs/document/assets/component_layers.md.BYX-1Wvu.lean.js b/docs/document/assets/component_layers.md.BYX-1Wvu.lean.js new file mode 100644 index 000000000..0b343d395 --- /dev/null +++ b/docs/document/assets/component_layers.md.BYX-1Wvu.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"业务层","description":"","frontmatter":{},"headers":[],"relativePath":"component/layers.md","filePath":"component/layers.md","lastUpdated":1682229030000}'),h={name:"component/layers.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(h,[["render",e]]);export{c as __pageData,y as default}; diff --git a/docs/document/assets/component_layers.md.C9che3XP.lean.js b/docs/document/assets/component_layers.md.C9che3XP.lean.js deleted file mode 100644 index 72f8a820a..000000000 --- a/docs/document/assets/component_layers.md.C9che3XP.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const A=JSON.parse('{"title":"业务层","description":"","frontmatter":{},"headers":[],"relativePath":"component/layers.md","filePath":"component/layers.md","lastUpdated":1682229030000}'),p={name:"component/layers.md"},h=s("",4),e=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",2),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s("",2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",2),g=i("div",{className:"run-code"},"▶ Run Code",-1),c=s("",1),y=[h,e,t,k,E,r,d,g,c];function b(o,F,u,m,C,_){return l(),n("div",null,y)}const D=a(p,[["render",b]]);export{A as __pageData,D as default}; diff --git a/docs/document/assets/component_setting.md.DotXGGKu.js b/docs/document/assets/component_setting.md.B_SkzqZZ.js similarity index 84% rename from docs/document/assets/component_setting.md.DotXGGKu.js rename to docs/document/assets/component_setting.md.B_SkzqZZ.js index 93cd4059d..751c5d684 100644 --- a/docs/document/assets/component_setting.md.DotXGGKu.js +++ b/docs/document/assets/component_setting.md.B_SkzqZZ.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const P=JSON.parse('{"title":"设置面板","description":"","frontmatter":{},"headers":[],"relativePath":"component/setting.md","filePath":"component/setting.md","lastUpdated":1729403782000}'),p={name:"component/setting.md"},h=s('

设置面板 ​

内置 ​

须先打开设置面板,然后自带四个内置项:flip, playbackRate, aspectRatio, subtitleOffset

',3),t=i("div",{className:"run-code"},"▶ Run Code",-1),e=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"设置面板","description":"","frontmatter":{},"headers":[],"relativePath":"component/setting.md","filePath":"component/setting.md","lastUpdated":1745114138000}'),t={name:"component/setting.md"};function h(e,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

设置面板 ​

内置 ​

须先打开设置面板,然后自带四个内置项:flip, playbackRate, aspectRatio, subtitleOffset

',3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 	setting: true,
@@ -6,7 +6,22 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     playbackRate: true,
     aspectRatio: true,
     subtitleOffset: true,
-});

创建 - 选择列表 ​

属性类型描述
htmlString, Element元素的 DOM
iconString, Element元素的图标
selectorArray元素列表
onSelectFunction元素点击事件
widthNumber列表宽度
tooltipString提示文本
`,3),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s(`
js
var art = new Artplayer({
+});

创建 - 按钮 ​

属性类型描述
htmlString, Element元素的 DOM
iconString, Element元素的图标
onClickFunction元素点击事件
widthNumber列表宽度
tooltipString提示文本
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+    setting: true,
+    settings: [
+        {
+            html: 'Button',
+            icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
+            tooltip: 'tooltip',
+			onClick(item, $dom, event) {
+                console.info(item, $dom, event);
+				return 'new tooltip'
+			}
+        },
+    ],
+});

创建 - 选择列表 ​

属性类型描述
htmlString, Element元素的 DOM
iconString, Element元素的图标
selectorArray元素列表
onSelectFunction元素点击事件
widthNumber列表宽度
tooltipString提示文本
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -58,7 +73,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

创建 - 列表嵌套 ​

`,2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var art = new Artplayer({
+});

创建 - 列表嵌套 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -101,7 +116,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             ],
         },
     ],
-});

创建 - 切换按钮 ​

属性类型描述
htmlString, Element元素的 DOM 元素
iconString, Element元素的图标
switchBoolean按钮默认状态
onSwitchFunction按钮切换事件
tooltipString提示文本
`,3),g=i("div",{className:"run-code"},"▶ Run Code",-1),c=s(`
js
var art = new Artplayer({
+});

创建 - 切换按钮 ​

属性类型描述
htmlString, Element元素的 DOM 元素
iconString, Element元素的图标
switchBoolean按钮默认状态
onSwitchFunction按钮切换事件
tooltipString提示文本
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -124,7 +139,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 const value = range[0];
 const min = range[1];
 const max = range[2];
-const step = range[3];
`,4),y=i("div",{className:"run-code"},"▶ Run Code",-1),b=s(`
js
var art = new Artplayer({
+const step = range[3];
`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -140,7 +155,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

添加 ​

`,2),o=i("div",{className:"run-code"},"▶ Run Code",-1),F=s(`
js
var art = new Artplayer({
+});

添加 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -153,7 +168,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     tooltip: '5x',
     icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
     range: [5, 1, 10, 1],
-});

删除 ​

`,2),u=i("div",{className:"run-code"},"▶ Run Code",-1),m=s(`
js
var art = new Artplayer({
+});

删除 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -176,7 +191,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         // Delete the setting by name
         art.setting.remove('slider');
     }, 3000);
-});

更新 ​

`,2),C=i("div",{className:"run-code"},"▶ Run Code",-1),B=s(`
js
var art = new Artplayer({
+});

更新 ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -204,4 +219,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             switch: false,
         });
     }, 3000);
-});
`,1),_=[h,t,e,k,E,r,d,g,c,y,b,o,F,u,m,C,B];function A(v,D,S,q,T,f){return l(),n("div",null,_)}const x=a(p,[["render",A]]);export{P as __pageData,x as default}; +});
`,1)]))}const y=n(t,[["render",h]]);export{c as __pageData,y as default}; diff --git a/docs/document/assets/component_setting.md.B_SkzqZZ.lean.js b/docs/document/assets/component_setting.md.B_SkzqZZ.lean.js new file mode 100644 index 000000000..f67053dd9 --- /dev/null +++ b/docs/document/assets/component_setting.md.B_SkzqZZ.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"设置面板","description":"","frontmatter":{},"headers":[],"relativePath":"component/setting.md","filePath":"component/setting.md","lastUpdated":1745114138000}'),t={name:"component/setting.md"};function h(e,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(t,[["render",h]]);export{c as __pageData,y as default}; diff --git a/docs/document/assets/component_setting.md.DotXGGKu.lean.js b/docs/document/assets/component_setting.md.DotXGGKu.lean.js deleted file mode 100644 index b6d0a9f82..000000000 --- a/docs/document/assets/component_setting.md.DotXGGKu.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const P=JSON.parse('{"title":"设置面板","description":"","frontmatter":{},"headers":[],"relativePath":"component/setting.md","filePath":"component/setting.md","lastUpdated":1729403782000}'),p={name:"component/setting.md"},h=s("",3),t=i("div",{className:"run-code"},"▶ Run Code",-1),e=s("",3),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s("",2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",3),g=i("div",{className:"run-code"},"▶ Run Code",-1),c=s("",4),y=i("div",{className:"run-code"},"▶ Run Code",-1),b=s("",2),o=i("div",{className:"run-code"},"▶ Run Code",-1),F=s("",2),u=i("div",{className:"run-code"},"▶ Run Code",-1),m=s("",2),C=i("div",{className:"run-code"},"▶ Run Code",-1),B=s("",1),_=[h,t,e,k,E,r,d,g,c,y,b,o,F,u,m,C,B];function A(v,D,S,q,T,f){return l(),n("div",null,_)}const x=a(p,[["render",A]]);export{P as __pageData,x as default}; diff --git a/docs/document/assets/en_advanced_built-in.md.C8MvISE7.lean.js b/docs/document/assets/en_advanced_built-in.md.C8MvISE7.lean.js deleted file mode 100644 index dbebdb862..000000000 --- a/docs/document/assets/en_advanced_built-in.md.C8MvISE7.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const K=JSON.parse('{"title":"Advanced Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/built-in.md","filePath":"en/advanced/built-in.md","lastUpdated":1726997712000}'),l={name:"en/advanced/built-in.md"},p=s("",4),t=i("div",{className:"run-code"},"▶ Run Code",-1),h=s("",4),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",5),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",5),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s("",2),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s("",3),u=i("div",{className:"run-code"},"▶ Run Code",-1),b=s("",5),m=i("div",{className:"run-code"},"▶ Run Code",-1),F=s("",4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s("",5),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s("",5),B=i("div",{className:"run-code"},"▶ Run Code",-1),T=s("",5),f=i("div",{className:"run-code"},"▶ Run Code",-1),D=s("",5),w=i("div",{className:"run-code"},"▶ Run Code",-1),P=s("",4),S=i("div",{className:"run-code"},"▶ Run Code",-1),x=s("",4),I=i("div",{className:"run-code"},"▶ Run Code",-1),N=s("",5),R=i("div",{className:"run-code"},"▶ Run Code",-1),V=s("",4),j=i("div",{className:"run-code"},"▶ Run Code",-1),q=s("",4),M=i("div",{className:"run-code"},"▶ Run Code",-1),O=s("",1),W=[p,t,h,k,r,E,d,c,o,g,y,u,b,m,F,_,C,v,A,B,T,f,D,w,P,S,x,I,N,R,V,j,q,M,O];function $(G,z,L,U,H,J){return e(),n("div",null,W)}const Q=a(l,[["render",$]]);export{K as __pageData,Q as default}; diff --git a/docs/document/assets/en_advanced_built-in.md.C8MvISE7.js b/docs/document/assets/en_advanced_built-in.md.TNSAz5Xl.js similarity index 84% rename from docs/document/assets/en_advanced_built-in.md.C8MvISE7.js rename to docs/document/assets/en_advanced_built-in.md.TNSAz5Xl.js index 7d3ad2186..19dbc1a1a 100644 --- a/docs/document/assets/en_advanced_built-in.md.C8MvISE7.js +++ b/docs/document/assets/en_advanced_built-in.md.TNSAz5Xl.js @@ -1,15 +1,15 @@ -import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const K=JSON.parse('{"title":"Advanced Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/built-in.md","filePath":"en/advanced/built-in.md","lastUpdated":1726997712000}'),l={name:"en/advanced/built-in.md"},p=s('

Advanced Properties ​

The advanced properties here refer to the secondary attributes mounted on the instance, which are less commonly used

option ​

Options for the player

',4),t=i("div",{className:"run-code"},"▶ Run Code",-1),h=s(`
js
var art = new Artplayer({
+import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const o=JSON.parse('{"title":"Advanced Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/built-in.md","filePath":"en/advanced/built-in.md","lastUpdated":1726997712000}'),p={name:"en/advanced/built-in.md"};function t(h,a,k,r,E,d){return l(),e("div",null,a[0]||(a[0]=[s('

Advanced Properties ​

The advanced properties here refer to the secondary attributes mounted on the instance, which are less commonly used

option ​

Options for the player

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-console.info(art.option);

Reminder

If you directly modify this option object, the player will not respond immediately.

template ​

Manages all of the DOM elements of the player

`,4),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s(`
js
var art = new Artplayer({
+console.info(art.option);

Reminder

If you directly modify this option object, the player will not respond immediately.

template ​

Manages all of the DOM elements of the player

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 console.info(art.template);
-console.info(art.template.$video);

Warning

To easily distinguish between DOM elements and plain objects, all DOM elements in the player are named starting with a $

Here is the definition of all DOM elements: artplayer/types/template.d.ts

events ​

Manages all DOM events in the player, which is essentially a proxy for addEventListener and removeEventListener. When using the following methods to handle events, the event will also be automatically destroyed when the player is destroyed.

  • The proxy method is used to proxy DOM events
  • The hover method is used to proxy custom hover events
`,5),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var container = document.querySelector('.artplayer-app');
+console.info(art.template.$video);

Warning

To easily distinguish between DOM elements and plain objects, all DOM elements in the player are named starting with a $

Here is the definition of all DOM elements: artplayer/types/template.d.ts

events ​

Manages all DOM events in the player, which is essentially a proxy for addEventListener and removeEventListener. When using the following methods to handle events, the event will also be automatically destroyed when the player is destroyed.

  • The proxy method is used to proxy DOM events
  • The hover method is used to proxy custom hover events
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var container = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
     container: container,
@@ -24,7 +24,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info('mouseenter', event);
 }, (event) => {
     console.info('mouseleave', event);
-});

Warning

If you need some DOM events to only exist during the lifecycle of the player, it is strongly recommended to use these functions to avoid causing memory leaks

storage ​

Manages the local storage of the player

  • The name attribute is used to set the cache key
  • The set method is used to set the cache
  • The get method is used to get the cache
  • The del method is used to delete the cache
  • The clear method is used to clear the cache
`,5),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s(`
js
var art = new Artplayer({
+});

Warning

If you need some DOM events to only exist during the lifecycle of the player, it is strongly recommended to use these functions to avoid causing memory leaks

storage ​

Manages the local storage of the player

  • The name attribute is used to set the cache key
  • The set method is used to set the cache
  • The get method is used to get the cache
  • The del method is used to delete the cache
  • The clear method is used to clear the cache
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -33,18 +33,18 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 const test = art.storage.get('test');
 console.info(test);
 art.storage.del('test');
-art.storage.clear();

Warning

By default, all player instances share the same localStorage, and the default key is artplayer_settings

If you want different players to use different localStorage, you can modify art.storage.name accordingly

`,2),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s(`
js
var art = new Artplayer({
+art.storage.clear();

Warning

By default, all player instances share the same localStorage, and the default key is artplayer_settings

If you want different players to use different localStorage, you can modify art.storage.name accordingly

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.storage.name = 'your-storage-key';
-art.storage.set('test', { foo: 'bar' });

icons ​

Manage all the svg icons of the player

`,3),u=i("div",{className:"run-code"},"▶ Run Code",-1),b=s(`
js
var art = new Artplayer({
+art.storage.set('test', { foo: 'bar' });

icons ​

Manage all the svg icons of the player

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-console.info(art.icons.loading);

This is the definition of all icons:

artplayer/types/icons.d.ts

i18n ​

Manage the player's i18n

  • The get method is used to retrieve the value of i18n
  • The update method is used to update the i18n object
`,5),m=i("div",{className:"run-code"},"▶ Run Code",-1),F=s(`
js
var art = new Artplayer({
+console.info(art.icons.loading);

This is the definition of all icons:

artplayer/types/icons.d.ts

i18n ​

Manage the player's i18n

  • The get method is used to retrieve the value of i18n
  • The update method is used to update the i18n object
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -55,14 +55,14 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     'zh-cn': {
         Play: 'Your Play'
     }
-});

WARNING

Using art.i18n.update can only update i18n after instantiation. If you want to update i18n before instantiation, please use the i18n from the basic options for the update.

notice ​

Manage the player's notices, there's only one show property used to display notices.

`,4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s(`
js
var art = new Artplayer({
+});

WARNING

Using art.i18n.update can only update i18n after instantiation. If you want to update i18n before instantiation, please use the i18n from the basic options for the update.

notice ​

Manage the player's notices, there's only one show property used to display notices.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.notice.show = 'Video Ready To Play';
-})

WARNING

To immediately hide the display of notice: art.notice.show = '';

layers ​

Manage the layers of the player

  • The add method is used for dynamically adding layers
  • The remove method is used for dynamically removing layers
  • The update method is used for dynamically updating layers
  • The show property is used to set whether to display all layers or not
  • The toggle method is used to toggle the display of all layers
`,5),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s(`
js
var art = new Artplayer({
+})

WARNING

To immediately hide the display of notice: art.notice.show = '';

layers ​

Manage the layers of the player

  • The add method is used for dynamically adding layers
  • The remove method is used for dynamically removing layers
  • The update method is used for dynamically updating layers
  • The show property is used to set whether to display all layers or not
  • The toggle method is used to toggle the display of all layers
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -75,7 +75,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.layers.show = false;
 	}, 1000);
-});

Component configuration Please refer to the following address:

/component/layers.html

controls ​

Manage the player's controllers

  • add method is used to dynamically add controllers
  • remove method is used to dynamically remove controllers
  • update method is used to dynamically update controllers
  • show property is used to set whether to display all controllers
  • toggle method is used to toggle the display of all controllers
`,5),B=i("div",{className:"run-code"},"▶ Run Code",-1),T=s(`
js
var art = new Artplayer({
+});

Component configuration Please refer to the following address:

/component/layers.html

controls ​

Manage the player's controllers

  • add method is used to dynamically add controllers
  • remove method is used to dynamically remove controllers
  • update method is used to dynamically update controllers
  • show property is used to set whether to display all controllers
  • toggle method is used to toggle the display of all controllers
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -89,7 +89,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.controls.show = false;
 	}, 1000);
-});

Component Configuration Please refer to the following address:

/component/controls.html

contextmenu ​

Manage the right-click context menu of the player

  • The add method is used to dynamically add menu items
  • The remove method is used to dynamically remove menu items
  • The update method is used to dynamically update menu items
  • The show attribute is used to set whether to show all menu items
  • The toggle method is used to switch the visibility of all menu items
`,5),f=i("div",{className:"run-code"},"▶ Run Code",-1),D=s(`
js
var art = new Artplayer({
+});

Component Configuration Please refer to the following address:

/component/controls.html

contextmenu ​

Manage the right-click context menu of the player

  • The add method is used to dynamically add menu items
  • The remove method is used to dynamically remove menu items
  • The update method is used to dynamically update menu items
  • The show attribute is used to set whether to show all menu items
  • The toggle method is used to switch the visibility of all menu items
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -103,7 +103,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.contextmenu.show = false;
     }, 1000);
-});

Component Configuration Please refer to the following address:

/component/contextmenu.html

subtitle ​

Manage the subtitle features of the player

  • url property sets and returns the current subtitle address
  • style method sets the style of the current subtitle
  • switch method sets the current subtitle address and options
  • textTrack Get the current subtitle track
  • activeCues Get the currently active subtitle list
  • cues Get the the subtitle list
`,5),w=i("div",{className:"run-code"},"▶ Run Code",-1),P=s(`
js
var art = new Artplayer({
+});

Component Configuration Please refer to the following address:

/component/contextmenu.html

subtitle ​

Manage the subtitle features of the player

  • url property sets and returns the current subtitle address
  • style method sets the style of the current subtitle
  • switch method sets the current subtitle address and options
  • textTrack Get the current subtitle track
  • activeCues Get the currently active subtitle list
  • cues Get the the subtitle list
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -113,7 +113,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     art.subtitle.style({
         color: 'red',
     });
-});

loading ​

Manage the loading layer of the player

  • show property is used to set whether to display the loading layer
  • The toggle attribute is used to toggle the display of the loading layer
`,4),S=i("div",{className:"run-code"},"▶ Run Code",-1),x=s(`
js
var art = new Artplayer({
+});

loading ​

Manage the loading layer of the player

  • show property is used to set whether to display the loading layer
  • The toggle attribute is used to toggle the display of the loading layer
`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -123,7 +123,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.loading.show = false;
 	}, 1000);
-});

hotkey ​

Manage the hotkey functionality of the player

  • The add method is used to add a hotkey
  • The remove method is used to remove a hotkey
`,4),I=i("div",{className:"run-code"},"▶ Run Code",-1),N=s(`
js
var art = new Artplayer({
+});

hotkey ​

Manage the hotkey functionality of the player

  • The add method is used to add a hotkey
  • The remove method is used to remove a hotkey
`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -137,7 +137,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
 		art.hotkey.remove(32, hotkeyEvent);
 	}, 5000);
-});

Warning

Shortcut keys will only work after the player has gained focus (e.g., after clicking on the player).

mask ​

Manage the player's mask layer

  • show property is used to set whether to display the mask layer
  • toggle property is used to toggle the display of the mask layer
`,5),R=i("div",{className:"run-code"},"▶ Run Code",-1),V=s(`
js
var art = new Artplayer({
+});

Warning

Shortcut keys will only work after the player has gained focus (e.g., after clicking on the player).

mask ​

Manage the player's mask layer

  • show property is used to set whether to display the mask layer
  • toggle property is used to toggle the display of the mask layer
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -147,7 +147,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.mask.show = true;
     }, 1000);
-});

setting ​

Manage the player's settings panel

  • add method is used to dynamically add a setting item
  • remove method is used to dynamically remove a setting item
  • update method is used to dynamically update a setting item
  • show property is used to set whether to display all the setting items
  • toggle method is used to toggle whether to display all the setting items
`,4),j=i("div",{className:"run-code"},"▶ Run Code",-1),q=s(`
js
var art = new Artplayer({
+});

setting ​

Manage the player's settings panel

  • add method is used to dynamically add a setting item
  • remove method is used to dynamically remove a setting item
  • update method is used to dynamically update a setting item
  • show property is used to set whether to display all the setting items
  • toggle method is used to toggle whether to display all the setting items
`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -162,7 +162,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 	setTimeout(() => {
 		art.setting.show = false;
 	}, 1000);
-});

Settings Panel Please refer to the following link

/component/setting.html

plugins ​

Manage the player's plugin features, with only one method add to dynamically add plugins

`,4),M=i("div",{className:"run-code"},"▶ Run Code",-1),O=s(`
js
var art = new Artplayer({
+});

Settings Panel Please refer to the following link

/component/setting.html

plugins ​

Manage the player's plugin features, with only one method add to dynamically add plugins

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -180,4 +180,4 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     art.plugins.add(myPlugin);
-});
`,1),W=[p,t,h,k,r,E,d,c,o,g,y,u,b,m,F,_,C,v,A,B,T,f,D,w,P,S,x,I,N,R,V,j,q,M,O];function $(G,z,L,U,H,J){return e(),n("div",null,W)}const Q=a(l,[["render",$]]);export{K as __pageData,Q as default}; +});
`,1)]))}const g=n(p,[["render",t]]);export{o as __pageData,g as default}; diff --git a/docs/document/assets/en_advanced_built-in.md.TNSAz5Xl.lean.js b/docs/document/assets/en_advanced_built-in.md.TNSAz5Xl.lean.js new file mode 100644 index 000000000..dc947d809 --- /dev/null +++ b/docs/document/assets/en_advanced_built-in.md.TNSAz5Xl.lean.js @@ -0,0 +1 @@ +import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const o=JSON.parse('{"title":"Advanced Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/built-in.md","filePath":"en/advanced/built-in.md","lastUpdated":1726997712000}'),p={name:"en/advanced/built-in.md"};function t(h,a,k,r,E,d){return l(),e("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const g=n(p,[["render",t]]);export{o as __pageData,g as default}; diff --git a/docs/document/assets/en_advanced_class.md.CWL182-9.js b/docs/document/assets/en_advanced_class.md.CWL182-9.js deleted file mode 100644 index 69471d163..000000000 --- a/docs/document/assets/en_advanced_class.md.CWL182-9.js +++ /dev/null @@ -1,8 +0,0 @@ -import{_ as e,c as i,o as n,a7 as s,j as a}from"./chunks/framework.DHbvjPBJ.js";const $=JSON.parse('{"title":"Static Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/class.md","filePath":"en/advanced/class.md","lastUpdated":1700976201000}'),t={name:"en/advanced/class.md"},l=s('

Static Properties ​

Here, Static Properties refer to the first-level properties mounted on the constructor, which are very rarely used.

instances ​

Returns an array of all player instances. You can use this property when you want to manage multiple players at the same time.

',4),r=a("div",{className:"run-code"},"▶ Run Code",-1),o=s(`
js
console.info([...Artplayer.instances]);
-
-var art = new Artplayer({
-    container: '.artplayer-app',
-    url: '/assets/sample/video.mp4',
-});
-
-console.info([...Artplayer.instances]);

version ​

Returns the version information of the player.

`,3),p=a("div",{className:"run-code"},"▶ Run Code",-1),d=s('
js
console.info(Artplayer.version);

env ​

Returns the environment variables of the player.

',3),h=a("div",{className:"run-code"},"▶ Run Code",-1),c=s('
js
console.info(Artplayer.env);

build ​

Returns the build time of the player

',3),k=a("div",{className:"run-code"},"▶ Run Code",-1),_=s('
js
console.info(Artplayer.build);

config ​

Returns the default configuration of the video

',3),u=a("div",{className:"run-code"},"▶ Run Code",-1),b=s('
js
console.info(Artplayer.config);

utils ​

Returns a collection of utility functions for the player

',3),E=a("div",{className:"run-code"},"▶ Run Code",-1),m=s('
js
console.info(Artplayer.utils);

For the full list of utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme ​

Returns the validation scheme for the player options

',4),g=a("div",{className:"run-code"},"▶ Run Code",-1),v=s('
js
console.info(Artplayer.scheme);

Emitter ​

Returns the constructor for the event dispatcher

',3),y=a("div",{className:"run-code"},"▶ Run Code",-1),C=s('
js
console.info(Artplayer.Emitter);

validator ​

Returns the validation function for options

',3),T=a("div",{className:"run-code"},"▶ Run Code",-1),f=s('
js
console.info(Artplayer.validator);

kindOf ​

Returns the function tool for type checking

',3),A=a("div",{className:"run-code"},"▶ Run Code",-1),P=s('
js
console.info(Artplayer.kindOf);

html ​

Returns the html string required for the player

',3),S=a("div",{className:"run-code"},"▶ Run Code",-1),F=s('
js
console.info(Artplayer.html);

option ​

Returns the player's default options

',3),R=a("div",{className:"run-code"},"▶ Run Code",-1),x=s('
js
console.info(Artplayer.option);
',1),N=[l,r,o,p,d,h,c,k,_,u,b,E,m,g,v,y,C,T,f,A,P,S,F,R,x];function V(q,I,j,w,B,D){return n(),i("div",null,N)}const z=e(t,[["render",V]]);export{$ as __pageData,z as default}; diff --git a/docs/document/assets/en_advanced_class.md.CWL182-9.lean.js b/docs/document/assets/en_advanced_class.md.CWL182-9.lean.js deleted file mode 100644 index 8c19f8745..000000000 --- a/docs/document/assets/en_advanced_class.md.CWL182-9.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as i,o as n,a7 as s,j as a}from"./chunks/framework.DHbvjPBJ.js";const $=JSON.parse('{"title":"Static Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/class.md","filePath":"en/advanced/class.md","lastUpdated":1700976201000}'),t={name:"en/advanced/class.md"},l=s("",4),r=a("div",{className:"run-code"},"▶ Run Code",-1),o=s("",3),p=a("div",{className:"run-code"},"▶ Run Code",-1),d=s("",3),h=a("div",{className:"run-code"},"▶ Run Code",-1),c=s("",3),k=a("div",{className:"run-code"},"▶ Run Code",-1),_=s("",3),u=a("div",{className:"run-code"},"▶ Run Code",-1),b=s("",3),E=a("div",{className:"run-code"},"▶ Run Code",-1),m=s("",4),g=a("div",{className:"run-code"},"▶ Run Code",-1),v=s("",3),y=a("div",{className:"run-code"},"▶ Run Code",-1),C=s("",3),T=a("div",{className:"run-code"},"▶ Run Code",-1),f=s("",3),A=a("div",{className:"run-code"},"▶ Run Code",-1),P=s("",3),S=a("div",{className:"run-code"},"▶ Run Code",-1),F=s("",3),R=a("div",{className:"run-code"},"▶ Run Code",-1),x=s("",1),N=[l,r,o,p,d,h,c,k,_,u,b,E,m,g,v,y,C,T,f,A,P,S,F,R,x];function V(q,I,j,w,B,D){return n(),i("div",null,N)}const z=e(t,[["render",V]]);export{$ as __pageData,z as default}; diff --git a/docs/document/assets/en_advanced_class.md.g5hMOwKP.js b/docs/document/assets/en_advanced_class.md.g5hMOwKP.js new file mode 100644 index 000000000..f6bb34faf --- /dev/null +++ b/docs/document/assets/en_advanced_class.md.g5hMOwKP.js @@ -0,0 +1,8 @@ +import{_ as i,c as n,o as t,ak as s,j as a}from"./chunks/framework.CIzAx-5p.js";const u=JSON.parse('{"title":"Static Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/class.md","filePath":"en/advanced/class.md","lastUpdated":1700976201000}'),l={name:"en/advanced/class.md"};function r(p,e,d,h,o,c){return t(),n("div",null,e[0]||(e[0]=[s('

Static Properties ​

Here, Static Properties refer to the first-level properties mounted on the constructor, which are very rarely used.

instances ​

Returns an array of all player instances. You can use this property when you want to manage multiple players at the same time.

',4),a("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
console.info([...Artplayer.instances]);
+
+var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+});
+
+console.info([...Artplayer.instances]);

version ​

Returns the version information of the player.

`,3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.version);

env ​

Returns the environment variables of the player.

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.env);

build ​

Returns the build time of the player

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.build);

config ​

Returns the default configuration of the video

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.config);

utils ​

Returns a collection of utility functions for the player

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.utils);

For the full list of utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme ​

Returns the validation scheme for the player options

',4),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.scheme);

Emitter ​

Returns the constructor for the event dispatcher

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.Emitter);

validator ​

Returns the validation function for options

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.validator);

kindOf ​

Returns the function tool for type checking

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.kindOf);

html ​

Returns the html string required for the player

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.html);

option ​

Returns the player's default options

',3),a("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.info(Artplayer.option);
',1)]))}const _=i(l,[["render",r]]);export{u as __pageData,_ as default}; diff --git a/docs/document/assets/en_advanced_class.md.g5hMOwKP.lean.js b/docs/document/assets/en_advanced_class.md.g5hMOwKP.lean.js new file mode 100644 index 000000000..c0ce8d817 --- /dev/null +++ b/docs/document/assets/en_advanced_class.md.g5hMOwKP.lean.js @@ -0,0 +1 @@ +import{_ as i,c as n,o as t,ak as s,j as a}from"./chunks/framework.CIzAx-5p.js";const u=JSON.parse('{"title":"Static Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/class.md","filePath":"en/advanced/class.md","lastUpdated":1700976201000}'),l={name:"en/advanced/class.md"};function r(p,e,d,h,o,c){return t(),n("div",null,e[0]||(e[0]=[s("",4),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",4),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",3),a("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const _=i(l,[["render",r]]);export{u as __pageData,_ as default}; diff --git a/docs/document/assets/en_advanced_event.md.BY6ISfQM.lean.js b/docs/document/assets/en_advanced_event.md.BY6ISfQM.lean.js deleted file mode 100644 index 27461b20f..000000000 --- a/docs/document/assets/en_advanced_event.md.BY6ISfQM.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js";const ii=JSON.parse('{"title":"Example Events","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/event.md","filePath":"en/advanced/event.md","lastUpdated":1729435465000}'),p={name:"en/advanced/event.md"},h=s("h1",{id:"example-events",tabindex:"-1"},[a("Example Events "),s("a",{class:"header-anchor",href:"#example-events","aria-label":'Permalink to "Example Events"'},"​")],-1),t=s("p",null,[a("Player events are divided into two types, one is the video's "),s("code",null,"native events"),a(" (prefix "),s("code",null,"video:"),a("), the other is "),s("code",null,"custom events")],-1),k=s("p",null,"Listening to events:",-1),r=s("div",{className:"run-code"},"▶ Run Code",-1),E=i("",2),d=s("div",{className:"run-code"},"▶ Run Code",-1),c=i("",2),g=s("div",{className:"run-code"},"▶ Run Code",-1),o=i("",2),y=s("div",{className:"run-code"},"▶ Run Code",-1),b=i("",4),u=s("div",{className:"run-code"},"▶ Run Code",-1),F=i("",3),m=s("div",{className:"run-code"},"▶ Run Code",-1),_=i("",3),v=s("div",{className:"run-code"},"▶ Run Code",-1),C=i("",3),A=s("div",{className:"run-code"},"▶ Run Code",-1),B=i("",3),T=s("div",{className:"run-code"},"▶ Run Code",-1),D=i("",3),f=s("div",{className:"run-code"},"▶ Run Code",-1),w=i("",3),P=s("div",{className:"run-code"},"▶ Run Code",-1),S=i("",3),x=s("div",{className:"run-code"},"▶ Run Code",-1),q=i("",3),R=s("div",{className:"run-code"},"▶ Run Code",-1),N=i("",3),V=s("div",{className:"run-code"},"▶ Run Code",-1),j=i("",3),I=s("div",{className:"run-code"},"▶ Run Code",-1),z=i("",3),U=s("div",{className:"run-code"},"▶ Run Code",-1),O=i("",3),L=s("div",{className:"run-code"},"▶ Run Code",-1),H=i("",3),W=s("div",{className:"run-code"},"▶ Run Code",-1),$=i("",3),M=s("div",{className:"run-code"},"▶ Run Code",-1),J=i("",3),G=s("div",{className:"run-code"},"▶ Run Code",-1),K=i("",3),Q=s("div",{className:"run-code"},"▶ Run Code",-1),X=i("",3),Y=s("div",{className:"run-code"},"▶ Run Code",-1),Z=i("",3),ss=s("div",{className:"run-code"},"▶ Run Code",-1),is=i("",3),as=s("div",{className:"run-code"},"▶ Run Code",-1),ns=i("",3),es=s("div",{className:"run-code"},"▶ Run Code",-1),ls=i("",3),ps=s("div",{className:"run-code"},"▶ Run Code",-1),hs=i("",3),ts=s("div",{className:"run-code"},"▶ Run Code",-1),ks=i("",3),rs=s("div",{className:"run-code"},"▶ Run Code",-1),Es=i("",3),ds=s("div",{className:"run-code"},"▶ Run Code",-1),cs=i("",3),gs=s("div",{className:"run-code"},"▶ Run Code",-1),os=i("",3),ys=s("div",{className:"run-code"},"▶ Run Code",-1),bs=i("",3),us=s("div",{className:"run-code"},"▶ Run Code",-1),Fs=i("",3),ms=s("div",{className:"run-code"},"▶ Run Code",-1),_s=i("",3),vs=s("div",{className:"run-code"},"▶ Run Code",-1),Cs=i("",3),As=s("div",{className:"run-code"},"▶ Run Code",-1),Bs=i("",3),Ts=s("div",{className:"run-code"},"▶ Run Code",-1),Ds=i("",3),fs=s("div",{className:"run-code"},"▶ Run Code",-1),ws=i("",3),Ps=s("div",{className:"run-code"},"▶ Run Code",-1),Ss=i("",3),xs=s("div",{className:"run-code"},"▶ Run Code",-1),qs=i("",3),Rs=s("div",{className:"run-code"},"▶ Run Code",-1),Ns=i("",3),Vs=s("div",{className:"run-code"},"▶ Run Code",-1),js=i("",3),Is=s("div",{className:"run-code"},"▶ Run Code",-1),zs=i("",3),Us=s("div",{className:"run-code"},"▶ Run Code",-1),Os=i("",3),Ls=s("div",{className:"run-code"},"▶ Run Code",-1),Hs=i("",3),Ws=s("div",{className:"run-code"},"▶ Run Code",-1),$s=i("",43),Ms=[h,t,k,r,E,d,c,g,o,y,b,u,F,m,_,v,C,A,B,T,D,f,w,P,S,x,q,R,N,V,j,I,z,U,O,L,H,W,$,M,J,G,K,Q,X,Y,Z,ss,is,as,ns,es,ls,ps,hs,ts,ks,rs,Es,ds,cs,gs,os,ys,bs,us,Fs,ms,_s,vs,Cs,As,Bs,Ts,Ds,fs,ws,Ps,Ss,xs,qs,Rs,Ns,Vs,js,Is,zs,Us,Os,Ls,Hs,Ws,$s];function Js(Gs,Ks,Qs,Xs,Ys,Zs){return l(),e("div",null,Ms)}const ai=n(p,[["render",Js]]);export{ii as __pageData,ai as default}; diff --git a/docs/document/assets/en_advanced_event.md.BY6ISfQM.js b/docs/document/assets/en_advanced_event.md.rzb3kj1q.js similarity index 81% rename from docs/document/assets/en_advanced_event.md.BY6ISfQM.js rename to docs/document/assets/en_advanced_event.md.rzb3kj1q.js index 5fb0a1cad..4b7c34bbb 100644 --- a/docs/document/assets/en_advanced_event.md.BY6ISfQM.js +++ b/docs/document/assets/en_advanced_event.md.rzb3kj1q.js @@ -1,23 +1,23 @@ -import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js";const ii=JSON.parse('{"title":"Example Events","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/event.md","filePath":"en/advanced/event.md","lastUpdated":1729435465000}'),p={name:"en/advanced/event.md"},h=s("h1",{id:"example-events",tabindex:"-1"},[a("Example Events "),s("a",{class:"header-anchor",href:"#example-events","aria-label":'Permalink to "Example Events"'},"​")],-1),t=s("p",null,[a("Player events are divided into two types, one is the video's "),s("code",null,"native events"),a(" (prefix "),s("code",null,"video:"),a("), the other is "),s("code",null,"custom events")],-1),k=s("p",null,"Listening to events:",-1),r=s("div",{className:"run-code"},"▶ Run Code",-1),E=i(`
js
var art = new Artplayer({
+import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"Example Events","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/event.md","filePath":"en/advanced/event.md","lastUpdated":1729435465000}'),h={name:"en/advanced/event.md"};function t(k,n,r,E,d,g){return p(),l("div",null,n[0]||(n[0]=[s("h1",{id:"example-events",tabindex:"-1"},[a("Example Events "),s("a",{class:"header-anchor",href:"#example-events","aria-label":'Permalink to "Example Events"'},"​")],-1),s("p",null,[a("Player events are divided into two types, one is the video's "),s("code",null,"native events"),a(" (prefix "),s("code",null,"video:"),a("), the other is "),s("code",null,"custom events")],-1),s("p",null,"Listening to events:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:canplay', () => {
     console.info('video:canplay');
-});

Listen to an event only once:

`,2),d=s("div",{className:"run-code"},"▶ Run Code",-1),c=i(`
js
var art = new Artplayer({
+});

Listen to an event only once:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.once('video:canplay', () => {
     console.info('video:canplay');
-});

Manually trigger an event:

`,2),g=s("div",{className:"run-code"},"▶ Run Code",-1),o=i(`
js
var art = new Artplayer({
+});

Manually trigger an event:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-art.emit('focus');

Remove an event:

`,2),y=s("div",{className:"run-code"},"▶ Run Code",-1),b=i(`
js
var art = new Artplayer({
+art.emit('focus');

Remove an event:

`,2),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -27,14 +27,14 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
     art.off('ready', onReady);
 }
 
-art.on('ready', onReady);

For a full list of events, please refer to the following address:

artplayer/types/events.d.ts

ready ​

Triggered when the player is able to play for the first time

`,4),u=s("div",{className:"run-code"},"▶ Run Code",-1),F=i(`
js
var art = new Artplayer({
+art.on('ready', onReady);

For a full list of events, please refer to the following address:

artplayer/types/events.d.ts

ready ​

Triggered when the player is able to play for the first time

`,4),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info('ready');
-});

restart ​

Triggered when the player switches the address and is able to play

`,3),m=s("div",{className:"run-code"},"▶ Run Code",-1),_=i(`
js
var art = new Artplayer({
+});

restart ​

Triggered when the player switches the address and is able to play

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -45,28 +45,28 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('restart', (url) => {
     console.info('restart', url);
-});

pause ​

Triggered when the player is paused

`,3),v=s("div",{className:"run-code"},"▶ Run Code",-1),C=i(`
js
var art = new Artplayer({
+});

pause ​

Triggered when the player is paused

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('pause', () => {
     console.info('pause');
-});

play ​

Triggered when the player starts playing

`,3),A=s("div",{className:"run-code"},"▶ Run Code",-1),B=i(`
js
var art = new Artplayer({
+});

play ​

Triggered when the player starts playing

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('play', () => {
     console.info('play');
-});

hotkey ​

Triggered when a hotkey on the player is pressed

`,3),T=s("div",{className:"run-code"},"▶ Run Code",-1),D=i(`
js
var art = new Artplayer({
+});

hotkey ​

Triggered when a hotkey on the player is pressed

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('hotkey', (event) => {
     console.info('hotkey', event);
-});

destroy ​

Triggered when the player is destroyed

`,3),f=s("div",{className:"run-code"},"▶ Run Code",-1),w=i(`
js
var art = new Artplayer({
+});

destroy ​

Triggered when the player is destroyed

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -77,70 +77,70 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('destroy', () => {
     console.info('destroy');
-});

focus ​

Triggered when the player gains focus

`,3),P=s("div",{className:"run-code"},"▶ Run Code",-1),S=i(`
js
var art = new Artplayer({
+});

focus ​

Triggered when the player gains focus

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('focus', (event) => {
     console.info('focus', event);
-});

blur ​

Triggered when the player loses focus

`,3),x=s("div",{className:"run-code"},"▶ Run Code",-1),q=i(`
js
var art = new Artplayer({
+});

blur ​

Triggered when the player loses focus

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('blur', (event) => {
     console.info('blur', event);
-});

dblclick ​

Triggered when the player is double-clicked

`,3),R=s("div",{className:"run-code"},"▶ Run Code",-1),N=i(`
js
var art = new Artplayer({
+});

dblclick ​

Triggered when the player is double-clicked

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('dblclick', (event) => {
     console.info('dblclick', event);
-});

click ​

Triggered when the player is clicked

`,3),V=s("div",{className:"run-code"},"▶ Run Code",-1),j=i(`
js
var art = new Artplayer({
+});

click ​

Triggered when the player is clicked

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('click', (event) => {
     console.info('click', event);
-});

error ​

Triggered when an error occurs while the player is loading the video

`,3),I=s("div",{className:"run-code"},"▶ Run Code",-1),z=i(`
js
var art = new Artplayer({
+});

error ​

Triggered when an error occurs while the player is loading the video

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
 });
 
 art.on('error', (error, reconnectTime) => {
     console.info(error, reconnectTime);
-});

hover ​

Triggered when the player is hovered or unhovered by the mouse

`,3),U=s("div",{className:"run-code"},"▶ Run Code",-1),O=i(`
js
var art = new Artplayer({
+});

hover ​

Triggered when the player is hovered or unhovered by the mouse

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('hover', (state, event) => {
     console.info('hover', state, event);
-});

mousemove ​

Triggered when the mouse moves over the player

`,3),L=s("div",{className:"run-code"},"▶ Run Code",-1),H=i(`
js
var art = new Artplayer({
+});

mousemove ​

Triggered when the mouse moves over the player

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('mousemove', (event) => {
     console.info('mousemove', event);
-});

resize ​

Triggered when the player size changes

`,3),W=s("div",{className:"run-code"},"▶ Run Code",-1),$=i(`
js
var art = new Artplayer({
+});

resize ​

Triggered when the player size changes

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('resize', () => {
     console.info('resize');
-});

view ​

Triggered when the player appears in the viewport

`,3),M=s("div",{className:"run-code"},"▶ Run Code",-1),J=i(`
js
var art = new Artplayer({
+});

view ​

Triggered when the player appears in the viewport

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('view', (state) => {
     console.info('view', state);
-});

lock ​

On mobile, triggered when the locked state changes

`,3),G=s("div",{className:"run-code"},"▶ Run Code",-1),K=i(`
js
var art = new Artplayer({
+});

lock ​

On mobile, triggered when the locked state changes

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lock: true,
@@ -148,7 +148,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('lock', (state) => {
     console.info('lock', state);
-});

aspectRatio ​

Triggered when the aspect ratio of the player changes

`,3),Q=s("div",{className:"run-code"},"▶ Run Code",-1),X=i(`
js
var art = new Artplayer({
+});

aspectRatio ​

Triggered when the aspect ratio of the player changes

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     aspectRatio: true,
@@ -157,7 +157,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('aspectRatio', (aspectRatio) => {
     console.info('aspectRatio', aspectRatio);
-});

autoHeight ​

Triggered when the player automatically sets the height

`,3),Y=s("div",{className:"run-code"},"▶ Run Code",-1),Z=i(`
js
var art = new Artplayer({
+});

autoHeight ​

Triggered when the player automatically sets the height

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -168,7 +168,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('autoHeight', (height) => {
     console.info('autoHeight', height);
-});

autoSize ​

Triggered when the player automatically sets the size

`,3),ss=s("div",{className:"run-code"},"▶ Run Code",-1),is=i(`
js
var art = new Artplayer({
+});

autoSize ​

Triggered when the player automatically sets the size

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
@@ -176,7 +176,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('autoSize', () => {
     console.info('autoSize');
-});

flip ​

Triggered when the player flips

`,3),as=s("div",{className:"run-code"},"▶ Run Code",-1),ns=i(`
js
var art = new Artplayer({
+});

flip ​

Triggered when the player flips

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     flip: true,
@@ -185,7 +185,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('flip', (flip) => {
     console.info('flip', flip);
-});

fullscreen ​

Triggered when the player goes into full screen

`,3),es=s("div",{className:"run-code"},"▶ Run Code",-1),ls=i(`
js
var art = new Artplayer({
+});

fullscreen ​

Triggered when the player goes into full screen

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
@@ -193,7 +193,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('fullscreen', (state) => {
     console.info('fullscreen', state);
-});

fullscreenError ​

Triggered when the player goes into full screen error

`,3),ps=s("div",{className:"run-code"},"▶ Run Code",-1),hs=i(`
js
var art = new Artplayer({
+});

fullscreenError ​

Triggered when the player goes into full screen error

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -204,7 +204,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('fullscreenError', (event) => {
     console.info('fullscreenError', event);
-});

fullscreenWeb ​

Triggered when the player enters web fullscreen

`,3),ts=s("div",{className:"run-code"},"▶ Run Code",-1),ks=i(`
js
var art = new Artplayer({
+});

fullscreenWeb ​

Triggered when the player enters web fullscreen

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
@@ -212,7 +212,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('fullscreenWeb', (state) => {
     console.info('fullscreenWeb', state);
-});

mini ​

Triggered when the player enters mini mode

`,3),rs=s("div",{className:"run-code"},"▶ Run Code",-1),Es=i(`
js
var art = new Artplayer({
+});

mini ​

Triggered when the player enters mini mode

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -223,7 +223,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('mini', (state) => {
     console.info('mini', state);
-});

pip ​

Triggered when the player enters Picture-in-Picture mode

`,3),ds=s("div",{className:"run-code"},"▶ Run Code",-1),cs=i(`
js
var art = new Artplayer({
+});

pip ​

Triggered when the player enters Picture-in-Picture mode

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     pip: true,
@@ -231,7 +231,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('pip', (state) => {
     console.info('pip', state);
-});

screenshot ​

Triggered when the player takes a screenshot

`,3),gs=s("div",{className:"run-code"},"▶ Run Code",-1),os=i(`
js
var art = new Artplayer({
+});

screenshot ​

Triggered when the player takes a screenshot

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     screenshot: true,
@@ -239,14 +239,14 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('screenshot', (dataUri) => {
     console.info('screenshot', dataUri);
-});

seek ​

Triggered when the player jumps in time

`,3),ys=s("div",{className:"run-code"},"▶ Run Code",-1),bs=i(`
js
var art = new Artplayer({
+});

seek ​

Triggered when the player jumps in time

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('seek', (currentTime) => {
     console.info('seek', currentTime);
-});

subtitleOffset ​

Triggered when the subtitle offset occurs in the player

`,3),us=s("div",{className:"run-code"},"▶ Run Code",-1),Fs=i(`
js
var art = new Artplayer({
+});

subtitleOffset ​

Triggered when the subtitle offset occurs in the player

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitleOffset: true,
@@ -258,7 +258,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('subtitleOffset', (offset) => {
     console.info('subtitleOffset', offset);
-});

subtitleBeforeUpdate ​

Triggered before subtitles are updated

`,3),ms=s("div",{className:"run-code"},"▶ Run Code",-1),_s=i(`
js
var art = new Artplayer({
+});

subtitleBeforeUpdate ​

Triggered before subtitles are updated

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -268,7 +268,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('subtitleBeforeUpdate', (cues) => {
     console.info('subtitleBeforeUpdate', cues);
-});

subtitleAfterUpdate ​

Triggered when the subtitles are updated

`,3),vs=s("div",{className:"run-code"},"▶ Run Code",-1),Cs=i(`
js
var art = new Artplayer({
+});

subtitleAfterUpdate ​

Triggered when the subtitles are updated

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -278,7 +278,7 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('subtitleAfterUpdate', (cues) => {
     console.info('subtitleAfterUpdate', cues);
-});

subtitleLoad ​

Triggered when the subtitle loads

`,3),As=s("div",{className:"run-code"},"▶ Run Code",-1),Bs=i(`
js
var art = new Artplayer({
+});

subtitleLoad ​

Triggered when the subtitle loads

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -288,56 +288,56 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('subtitleLoad', (option, cues) => {
     console.info('subtitleLoad', cues, option);
-});

info ​

Triggered when the information panel is shown or hidden

`,3),Ts=s("div",{className:"run-code"},"▶ Run Code",-1),Ds=i(`
js
var art = new Artplayer({
+});

info ​

Triggered when the information panel is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('info', (state) => {
     console.log(state);
-});

layer ​

Triggered when a custom layer is shown or hidden

`,3),fs=s("div",{className:"run-code"},"▶ Run Code",-1),ws=i(`
js
var art = new Artplayer({
+});

layer ​

Triggered when a custom layer is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('layer', (state) => {
     console.log(state);
-});

loading ​

Triggered when a loader is shown or hidden

`,3),Ps=s("div",{className:"run-code"},"▶ Run Code",-1),Ss=i(`
js
var art = new Artplayer({
+});

loading ​

Triggered when a loader is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('loading', (state) => {
     console.log(state);
-});

mask ​

Triggered when a mask layer is shown or hidden

`,3),xs=s("div",{className:"run-code"},"▶ Run Code",-1),qs=i(`
js
var art = new Artplayer({
+});

mask ​

Triggered when a mask layer is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('mask', (state) => {
     console.log(state);
-});

subtitle ​

Triggered when the subtitle layer is shown or hidden

`,3),Rs=s("div",{className:"run-code"},"▶ Run Code",-1),Ns=i(`
js
var art = new Artplayer({
+});

subtitle ​

Triggered when the subtitle layer is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('subtitle', (state) => {
     console.log(state);
-});

contextmenu ​

Triggered when the right-click menu is shown or hidden

`,3),Vs=s("div",{className:"run-code"},"▶ Run Code",-1),js=i(`
js
var art = new Artplayer({
+});

contextmenu ​

Triggered when the right-click menu is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('contextmenu', (state) => {
     console.log(state);
-});

control ​

Triggered when the controller is shown or hidden

`,3),Is=s("div",{className:"run-code"},"▶ Run Code",-1),zs=i(`
js
var art = new Artplayer({
+});

control ​

Triggered when the controller is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('control', (state) => {
     console.log(state);
-});

setting ​

Triggered when the settings panel is shown or hidden

`,3),Us=s("div",{className:"run-code"},"▶ Run Code",-1),Os=i(`
js
var art = new Artplayer({
+});

setting ​

Triggered when the settings panel is shown or hidden

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -345,11 +345,11 @@ import{_ as n,c as e,o as l,j as s,a,a7 as i}from"./chunks/framework.DHbvjPBJ.js
 
 art.on('setting', (state) => {
     console.log(state);
-});

muted ​

Triggered when the muted state changes

`,3),Ls=s("div",{className:"run-code"},"▶ Run Code",-1),Hs=i(`
js
var art = new Artplayer({
+});

muted ​

Triggered when the muted state changes

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('muted', (state) => {
     console.log(state);
-});

keydown ​

Listen to the keydown event from document

`,3),Ws=s("div",{className:"run-code"},"▶ Run Code",-1),$s=i('
js
var art = new Artplayer({\n    container: '.artplayer-app',\n    url: '/assets/sample/video.mp4',\n});\n\nart.on('keydown', (event) => {\n    console.log(event.code);\n});

video:canplay ​

The browser can play the media file, but estimates there is not enough data to play through to the end without having to stop for further buffering

video:canplaythrough ​

The browser estimates it can play the media through to the end without stopping for content buffering

video:complete ​

OfflineAudioContext rendering is complete

video:durationchange ​

Triggered when the value of the duration property changes

video:emptied ​

The media content becomes empty; for example, when this media has been completely loaded (or partially loaded), this event is sent and the load() method is called to reload it

video:ended ​

The video has stopped because the media reached the end point

video:error ​

An error occurred while fetching media data, or the resource type is not a supported media format

video:loadeddata ​

The first frame of the media has finished loading

video:loadedmetadata ​

Metadata has been loaded

video:pause ​

Playback has been paused

video:play ​

Playback has started

video:playing ​

Playback is ready to start following a pause or delay due to lack of data

video:progress ​

Periodically triggered while the browser is loading resources

video:ratechange ​

The playback rate has changed

video:seeked ​

A seek (frame skipping) operation has completed

video:seeking ​

A seek (frame skipping) operation has started

video:stalled ​

The user agent is trying to fetch media data, but the data unexpectedly has not appeared

video:suspend ​

Media data loading has been suspended

video:timeupdate ​

The time specified by the currentTime attribute has changed

video:volumechange ​

Volume changed

video:waiting ​

Playback has stopped due to temporarily missing data

',43),Ms=[h,t,k,r,E,d,c,g,o,y,b,u,F,m,_,v,C,A,B,T,D,f,w,P,S,x,q,R,N,V,j,I,z,U,O,L,H,W,$,M,J,G,K,Q,X,Y,Z,ss,is,as,ns,es,ls,ps,hs,ts,ks,rs,Es,ds,cs,gs,os,ys,bs,us,Fs,ms,_s,vs,Cs,As,Bs,Ts,Ds,fs,ws,Ps,Ss,xs,qs,Rs,Ns,Vs,js,Is,zs,Us,Os,Ls,Hs,Ws,$s];function Js(Gs,Ks,Qs,Xs,Ys,Zs){return l(),e("div",null,Ms)}const ai=n(p,[["render",Js]]);export{ii as __pageData,ai as default}; +});

keydown ​

Listen to the keydown event from document

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),i('
js
var art = new Artplayer({\n    container: '.artplayer-app',\n    url: '/assets/sample/video.mp4',\n});\n\nart.on('keydown', (event) => {\n    console.log(event.code);\n});

video:canplay ​

The browser can play the media file, but estimates there is not enough data to play through to the end without having to stop for further buffering

video:canplaythrough ​

The browser estimates it can play the media through to the end without stopping for content buffering

video:complete ​

OfflineAudioContext rendering is complete

video:durationchange ​

Triggered when the value of the duration property changes

video:emptied ​

The media content becomes empty; for example, when this media has been completely loaded (or partially loaded), this event is sent and the load() method is called to reload it

video:ended ​

The video has stopped because the media reached the end point

video:error ​

An error occurred while fetching media data, or the resource type is not a supported media format

video:loadeddata ​

The first frame of the media has finished loading

video:loadedmetadata ​

Metadata has been loaded

video:pause ​

Playback has been paused

video:play ​

Playback has started

video:playing ​

Playback is ready to start following a pause or delay due to lack of data

video:progress ​

Periodically triggered while the browser is loading resources

video:ratechange ​

The playback rate has changed

video:seeked ​

A seek (frame skipping) operation has completed

video:seeking ​

A seek (frame skipping) operation has started

video:stalled ​

The user agent is trying to fetch media data, but the data unexpectedly has not appeared

video:suspend ​

Media data loading has been suspended

video:timeupdate ​

The time specified by the currentTime attribute has changed

video:volumechange ​

Volume changed

video:waiting ​

Playback has stopped due to temporarily missing data

',43)]))}const o=e(h,[["render",t]]);export{y as __pageData,o as default}; diff --git a/docs/document/assets/en_advanced_event.md.rzb3kj1q.lean.js b/docs/document/assets/en_advanced_event.md.rzb3kj1q.lean.js new file mode 100644 index 000000000..49521b106 --- /dev/null +++ b/docs/document/assets/en_advanced_event.md.rzb3kj1q.lean.js @@ -0,0 +1 @@ +import{_ as e,c as l,o as p,j as s,ak as i,a}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"Example Events","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/event.md","filePath":"en/advanced/event.md","lastUpdated":1729435465000}'),h={name:"en/advanced/event.md"};function t(k,n,r,E,d,g){return p(),l("div",null,n[0]||(n[0]=[s("h1",{id:"example-events",tabindex:"-1"},[a("Example Events "),s("a",{class:"header-anchor",href:"#example-events","aria-label":'Permalink to "Example Events"'},"​")],-1),s("p",null,[a("Player events are divided into two types, one is the video's "),s("code",null,"native events"),a(" (prefix "),s("code",null,"video:"),a("), the other is "),s("code",null,"custom events")],-1),s("p",null,"Listening to events:",-1),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",2),s("div",{className:"run-code"},"▶ Run Code",-1),i("",4),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",3),s("div",{className:"run-code"},"▶ Run Code",-1),i("",43)]))}const o=e(h,[["render",t]]);export{y as __pageData,o as default}; diff --git a/docs/document/assets/en_advanced_global.md.BryBJDhD.lean.js b/docs/document/assets/en_advanced_global.md.BryBJDhD.lean.js deleted file mode 100644 index f7c150bb8..000000000 --- a/docs/document/assets/en_advanced_global.md.BryBJDhD.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const fs=JSON.parse('{"title":"Global Attributes","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/global.md","filePath":"en/advanced/global.md","lastUpdated":1718941442000}'),e={name:"en/advanced/global.md"},p=s("",4),t=i("div",{className:"run-code"},"▶ Run Code",-1),h=s("",3),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",3),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",3),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s("",3),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s("",3),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s("",3),F=i("div",{className:"run-code"},"▶ Run Code",-1),_=s("",3),m=i("div",{className:"run-code"},"▶ Run Code",-1),C=s("",3),A=i("div",{className:"run-code"},"▶ Run Code",-1),v=s("",3),T=i("div",{className:"run-code"},"▶ Run Code",-1),B=s("",3),D=i("div",{className:"run-code"},"▶ Run Code",-1),I=s("",3),S=i("div",{className:"run-code"},"▶ Run Code",-1),f=s("",3),P=i("div",{className:"run-code"},"▶ Run Code",-1),R=s("",3),N=i("div",{className:"run-code"},"▶ Run Code",-1),w=s("",3),O=i("div",{className:"run-code"},"▶ Run Code",-1),x=s("",4),L=i("div",{className:"run-code"},"▶ Run Code",-1),V=s("",3),j=i("div",{className:"run-code"},"▶ Run Code",-1),q=s("",3),M=i("div",{className:"run-code"},"▶ Run Code",-1),U=s("",3),K=i("div",{className:"run-code"},"▶ Run Code",-1),G=s("",3),Y=i("div",{className:"run-code"},"▶ Run Code",-1),H=s("",2),W=i("div",{className:"run-code"},"▶ Run Code",-1),X=s("",3),z=i("div",{className:"run-code"},"▶ Run Code",-1),$=s("",3),Z=i("div",{className:"run-code"},"▶ Run Code",-1),J=s("",3),Q=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s("",3),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s("",3),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s("",3),es=i("div",{className:"run-code"},"▶ Run Code",-1),ps=s("",3),ts=i("div",{className:"run-code"},"▶ Run Code",-1),hs=s("",3),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s("",3),Es=i("div",{className:"run-code"},"▶ Run Code",-1),ds=s("",3),cs=i("div",{className:"run-code"},"▶ Run Code",-1),os=s("",3),gs=i("div",{className:"run-code"},"▶ Run Code",-1),ys=s("",3),bs=i("div",{className:"run-code"},"▶ Run Code",-1),us=s("",3),Fs=i("div",{className:"run-code"},"▶ Run Code",-1),_s=s("",1),ms=[p,t,h,k,r,E,d,c,o,g,y,b,u,F,_,m,C,A,v,T,B,D,I,S,f,P,R,N,w,O,x,L,V,j,q,M,U,K,G,Y,H,W,X,z,$,Z,J,Q,ss,is,as,ns,ls,es,ps,ts,hs,ks,rs,Es,ds,cs,os,gs,ys,bs,us,Fs,_s];function Cs(As,vs,Ts,Bs,Ds,Is){return l(),n("div",null,ms)}const Ps=a(e,[["render",Cs]]);export{fs as __pageData,Ps as default}; diff --git a/docs/document/assets/en_advanced_global.md.BryBJDhD.js b/docs/document/assets/en_advanced_global.md.CeJCRiyy.js similarity index 77% rename from docs/document/assets/en_advanced_global.md.BryBJDhD.js rename to docs/document/assets/en_advanced_global.md.CeJCRiyy.js index dca2806c8..340c34957 100644 --- a/docs/document/assets/en_advanced_global.md.BryBJDhD.js +++ b/docs/document/assets/en_advanced_global.md.CeJCRiyy.js @@ -1,19 +1,19 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const fs=JSON.parse('{"title":"Global Attributes","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/global.md","filePath":"en/advanced/global.md","lastUpdated":1718941442000}'),e={name:"en/advanced/global.md"},p=s('

Global Attributes ​

Here, Global Attributes refer to the first-level properties mounted on the constructor. Property names are all in uppercase, subject to change in the future and basically not needed.

DEBUG ​

Whether to start debug mode, which can print out all built-in events of the video by default is turned off.

',4),t=i("div",{className:"run-code"},"▶ Run Code",-1),h=s(`
js
Artplayer.DEBUG = true;
+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Global Attributes","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/global.md","filePath":"en/advanced/global.md","lastUpdated":1718941442000}'),p={name:"en/advanced/global.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Global Attributes ​

Here, Global Attributes refer to the first-level properties mounted on the constructor. Property names are all in uppercase, subject to change in the future and basically not needed.

DEBUG ​

Whether to start debug mode, which can print out all built-in events of the video by default is turned off.

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DEBUG = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

STYLE ​

Returns the player style text

`,3),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s('
js
console.log(Artplayer.STYLE);

CONTEXTMENU ​

Whether to enable the right-click context menu, enabled by default.

',3),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
Artplayer.CONTEXTMENU = false;
+});

STYLE ​

Returns the player style text

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s('
js
console.log(Artplayer.STYLE);

CONTEXTMENU ​

Whether to enable the right-click context menu, enabled by default.

',3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.CONTEXTMENU = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

NOTICE_TIME ​

The display duration of the notification message, in milliseconds, defaults to 2000

`,3),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s(`
js
Artplayer.NOTICE_TIME = 5000;
+});

NOTICE_TIME ​

The display duration of the notification message, in milliseconds, defaults to 2000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.NOTICE_TIME = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

SETTING_WIDTH ​

The default width of the settings panel, in pixels, defaults to 250

`,3),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s(`
js
Artplayer.SETTING_WIDTH = 300;
+});

SETTING_WIDTH ​

The default width of the settings panel, in pixels, defaults to 250

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_WIDTH = 300;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -23,7 +23,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

SETTING_ITEM_WIDTH ​

Set the default width of the settings items in the panel, in pixels, the default is 200.

`,3),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s(`
js
Artplayer.SETTING_ITEM_WIDTH = 300;
+});

SETTING_ITEM_WIDTH ​

Set the default width of the settings items in the panel, in pixels, the default is 200.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_ITEM_WIDTH = 300;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -33,7 +33,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

SETTING_ITEM_HEIGHT ​

Set the default height of the settings items in the panel, in pixels, the default is 35.

`,3),F=i("div",{className:"run-code"},"▶ Run Code",-1),_=s(`
js
Artplayer.SETTING_ITEM_HEIGHT = 40;
+});

SETTING_ITEM_HEIGHT ​

Set the default height of the settings items in the panel, in pixels, the default is 35.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SETTING_ITEM_HEIGHT = 40;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -43,7 +43,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     flip: true,
     playbackRate: true,
     aspectRatio: true,
-});

RESIZE_TIME ​

Throttle time for the resize event, in milliseconds, defaults to 200

`,3),m=i("div",{className:"run-code"},"▶ Run Code",-1),C=s(`
js
Artplayer.RESIZE_TIME = 500;
+});

RESIZE_TIME ​

Throttle time for the resize event, in milliseconds, defaults to 200

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.RESIZE_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -52,7 +52,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('resize', () => {
     console.log('resize');
-});

SCROLL_TIME ​

Throttle time for the scroll event, in milliseconds, defaults to 200

`,3),A=i("div",{className:"run-code"},"▶ Run Code",-1),v=s(`
js
Artplayer.SCROLL_TIME = 500;
+});

SCROLL_TIME ​

Throttle time for the scroll event, in milliseconds, defaults to 200

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SCROLL_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -61,7 +61,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('scroll', () => {
     console.log('scroll');
-});

SCROLL_GAP ​

The boundary tolerance distance for the view event, in pixels, default is 50

`,3),T=i("div",{className:"run-code"},"▶ Run Code",-1),B=s(`
js
Artplayer.SCROLL_GAP = 100;
+});

SCROLL_GAP ​

The boundary tolerance distance for the view event, in pixels, default is 50

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SCROLL_GAP = 100;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -70,40 +70,40 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('scroll', () => {
     console.log('scroll');
-});

AUTO_PLAYBACK_MAX ​

The maximum number of records for the automatic playback feature, default is 10

`,3),D=i("div",{className:"run-code"},"▶ Run Code",-1),I=s(`
js
Artplayer.AUTO_PLAYBACK_MAX = 20;
+});

AUTO_PLAYBACK_MAX ​

The maximum number of records for the automatic playback feature, default is 10

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_PLAYBACK_MAX = 20;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoPlayback: true,
-});

AUTO_PLAYBACK_MIN ​

The minimum duration for the auto playback feature, in seconds, with a default of 5.

`,3),S=i("div",{className:"run-code"},"▶ Run Code",-1),f=s(`
js
Artplayer.AUTO_PLAYBACK_MIN = 10;
+});

AUTO_PLAYBACK_MIN ​

The minimum duration for the auto playback feature, in seconds, with a default of 5.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_PLAYBACK_MIN = 10;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoPlayback: true,
-});

AUTO_PLAYBACK_TIMEOUT ​

The delay duration for hiding the auto playback feature, in milliseconds, with a default of 3000.

`,3),P=i("div",{className:"run-code"},"▶ Run Code",-1),R=s(`
js
Artplayer.AUTO_PLAYBACK_TIMEOUT = 5000;
+});

AUTO_PLAYBACK_TIMEOUT ​

The delay duration for hiding the auto playback feature, in milliseconds, with a default of 3000.

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_PLAYBACK_TIMEOUT = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoPlayback: true,
-});

RECONNECT_TIME_MAX ​

The maximum number of automatic reconnection attempts when a connection error occurs, default is 5

`,3),N=i("div",{className:"run-code"},"▶ Run Code",-1),w=s(`
js
Artplayer.RECONNECT_TIME_MAX = 10;
+});

RECONNECT_TIME_MAX ​

The maximum number of automatic reconnection attempts when a connection error occurs, default is 5

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.RECONNECT_TIME_MAX = 10;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
-});

RECONNECT_SLEEP_TIME ​

The delay time for the automatic reconnection attempt when a connection error occurs, in milliseconds, default is 1000

`,3),O=i("div",{className:"run-code"},"▶ Run Code",-1),x=s(`
js
Artplayer.RECONNECT_SLEEP_TIME = 3000;
+});

RECONNECT_SLEEP_TIME ​

The delay time for the automatic reconnection attempt when a connection error occurs, in milliseconds, default is 1000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.RECONNECT_SLEEP_TIME = 3000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/404.mp4',
-});

CONTROL_HIDE_TIME ​

...

Auto-hide delay time for the bottom control bar, measured in milliseconds, default is 3000

`,4),L=i("div",{className:"run-code"},"▶ Run Code",-1),V=s(`
js
Artplayer.CONTROL_HIDE_TIME = 5000;
+});

CONTROL_HIDE_TIME ​

...

Auto-hide delay time for the bottom control bar, measured in milliseconds, default is 3000

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.CONTROL_HIDE_TIME = 5000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

DBCLICK_TIME ​

Double-click event delay time, measured in milliseconds, default is 300

`,3),j=i("div",{className:"run-code"},"▶ Run Code",-1),q=s(`
js
Artplayer.DBCLICK_TIME = 500;
+});

DBCLICK_TIME ​

Double-click event delay time, measured in milliseconds, default is 300

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DBCLICK_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -112,67 +112,67 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('dblclick', () => {
     console.log('dblclick');
-});

DBCLICK_FULLSCREEN ​

On desktop, whether to switch to fullscreen on double click, default is true

`,3),M=i("div",{className:"run-code"},"▶ Run Code",-1),U=s(`
js
Artplayer.DBCLICK_FULLSCREEN = false;
+});

DBCLICK_FULLSCREEN ​

On desktop, whether to switch to fullscreen on double click, default is true

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.DBCLICK_FULLSCREEN = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

MOBILE_DBCLICK_PLAY ​

On mobile, whether to toggle play/pause on double click, default is true

`,3),K=i("div",{className:"run-code"},"▶ Run Code",-1),G=s(`
js
Artplayer.MOBILE_DBCLICK_PLAY = false;
+});

MOBILE_DBCLICK_PLAY ​

On mobile, whether to toggle play/pause on double click, default is true

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_DBCLICK_PLAY = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

MOBILE_CLICK_PLAY ​

On mobile, whether to play/pause on single click, default is false

`,3),Y=i("div",{className:"run-code"},"▶ Run Code",-1),H=s(`
js
Artplayer.MOBILE_CLICK_PLAY = true;
+});

MOBILE_CLICK_PLAY ​

On mobile, whether to play/pause on single click, default is false

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_CLICK_PLAY = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

On mobile devices, whether a tap toggles play/pause, defaults to false

`,2),W=i("div",{className:"run-code"},"▶ Run Code",-1),X=s(`
js
Artplayer.MOBILE_CLICK_PLAY = true;
+});

On mobile devices, whether a tap toggles play/pause, defaults to false

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.MOBILE_CLICK_PLAY = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

AUTO_ORIENTATION_TIME ​

On mobile devices, the delay time for auto-rotation, in milliseconds, defaults to 200

`,3),z=i("div",{className:"run-code"},"▶ Run Code",-1),$=s(`
js
Artplayer.AUTO_ORIENTATION_TIME = 500;
+});

AUTO_ORIENTATION_TIME ​

On mobile devices, the delay time for auto-rotation, in milliseconds, defaults to 200

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.AUTO_ORIENTATION_TIME = 500;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoOrientation: true,
-});

INFO_LOOP_TIME ​

Info panel refresh time, unit in milliseconds, default is 1000

`,3),Z=i("div",{className:"run-code"},"▶ Run Code",-1),J=s(`
js
Artplayer.INFO_LOOP_TIME = 2000;
+});

INFO_LOOP_TIME ​

Info panel refresh time, unit in milliseconds, default is 1000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.INFO_LOOP_TIME = 2000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-art.info.show = true;

FAST_FORWARD_VALUE ​

On mobile, the multiplier rate of the speed when long-pressing for fast-forward, default is 3

`,3),Q=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s(`
js
Artplayer.FAST_FORWARD_VALUE = 5;
+art.info.show = true;

FAST_FORWARD_VALUE ​

On mobile, the multiplier rate of the speed when long-pressing for fast-forward, default is 3

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FAST_FORWARD_VALUE = 5;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

FAST_FORWARD_TIME ​

The time, in milliseconds, to fast-forward when double-tapped, default is 10 On mobile, the delay time of the long-press acceleration, in milliseconds, default is 1000

`,3),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s(`
js
Artplayer.FAST_FORWARD_TIME = 2000;
+});

FAST_FORWARD_TIME ​

The time, in milliseconds, to fast-forward when double-tapped, default is 10 On mobile, the delay time of the long-press acceleration, in milliseconds, default is 1000

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FAST_FORWARD_TIME = 2000;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

TOUCH_MOVE_RATIO ​

On mobile, the ratio of the speed of sliding left and right to seek, default is 0.5

`,3),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s(`
js
Artplayer.TOUCH_MOVE_RATIO = 1;
+});

TOUCH_MOVE_RATIO ​

On mobile, the ratio of the speed of sliding left and right to seek, default is 0.5

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.TOUCH_MOVE_RATIO = 1;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

VOLUME_STEP ​

The step ratio of adjusting volume with shortcuts, default is 0.1

`,3),es=i("div",{className:"run-code"},"▶ Run Code",-1),ps=s(`
js
Artplayer.VOLUME_STEP = 0.2;
+});

VOLUME_STEP ​

The step ratio of adjusting volume with shortcuts, default is 0.1

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.VOLUME_STEP = 0.2;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

SEEK_STEP ​

The increment by which the playback progress is adjusted via keyboard shortcuts, in seconds, the default is 5

`,3),ts=i("div",{className:"run-code"},"▶ Run Code",-1),hs=s(`
js
Artplayer.SEEK_STEP = 10;
+});

SEEK_STEP ​

The increment by which the playback progress is adjusted via keyboard shortcuts, in seconds, the default is 5

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.SEEK_STEP = 10;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

PLAYBACK_RATE ​

The list of built-in playback speeds, by default [0.5, 0.75, 1, 1.25, 1.5, 2]

`,3),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s(`
js
Artplayer.PLAYBACK_RATE = [0.5, 1, 2, 3, 4, 5];
+});

PLAYBACK_RATE ​

The list of built-in playback speeds, by default [0.5, 0.75, 1, 1.25, 1.5, 2]

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.PLAYBACK_RATE = [0.5, 1, 2, 3, 4, 5];
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -182,7 +182,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

ASPECT_RATIO ​

Built-in list of video aspect ratios, default is ['default', '4:3', '16:9']

`,3),Es=i("div",{className:"run-code"},"▶ Run Code",-1),ds=s(`
js
Artplayer.ASPECT_RATIO = ['default', '1:1', '2:1', '4:3', '6:5'];
+art.setting.show = true;

ASPECT_RATIO ​

Built-in list of video aspect ratios, default is ['default', '4:3', '16:9']

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.ASPECT_RATIO = ['default', '1:1', '2:1', '4:3', '6:5'];
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -192,7 +192,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

FLIP ​

Built-in list of video flips, defaults to ['normal', 'horizontal', 'vertical']

`,3),cs=i("div",{className:"run-code"},"▶ Run Code",-1),os=s(`
js
Artplayer.FLIP = ['normal', 'horizontal'];
+art.setting.show = true;

FLIP ​

Built-in list of video flips, defaults to ['normal', 'horizontal', 'vertical']

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FLIP = ['normal', 'horizontal'];
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -202,21 +202,21 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 art.contextmenu.show = true;
-art.setting.show = true;

FULLSCREEN_WEB_IN_BODY ​

When in web fullscreen, whether to mount the player under the body element, defaults to false

`,3),gs=i("div",{className:"run-code"},"▶ Run Code",-1),ys=s(`
js
Artplayer.FULLSCREEN_WEB_IN_BODY = true;
+art.setting.show = true;

FULLSCREEN_WEB_IN_BODY ​

When in web fullscreen, whether to mount the player under the body element, defaults to false

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.FULLSCREEN_WEB_IN_BODY = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
-});

LOG_VERSION ​

Setting whether to print the player version, the default is true

`,3),bs=i("div",{className:"run-code"},"▶ Run Code",-1),us=s(`
js
Artplayer.LOG_VERSION = false;
+});

LOG_VERSION ​

Setting whether to print the player version, the default is true

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.LOG_VERSION = false;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

USE_RAF ​

Setting whether to use requestAnimationFrame, the default is false, currently mainly used for smooth progress bar effects

`,3),Fs=i("div",{className:"run-code"},"▶ Run Code",-1),_s=s(`
js
Artplayer.USE_RAF = true;
+});

USE_RAF ​

Setting whether to use requestAnimationFrame, the default is false, currently mainly used for smooth progress bar effects

`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
Artplayer.USE_RAF = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});
`,1),ms=[p,t,h,k,r,E,d,c,o,g,y,b,u,F,_,m,C,A,v,T,B,D,I,S,f,P,R,N,w,O,x,L,V,j,q,M,U,K,G,Y,H,W,X,z,$,Z,J,Q,ss,is,as,ns,ls,es,ps,ts,hs,ks,rs,Es,ds,cs,os,gs,ys,bs,us,Fs,_s];function Cs(As,vs,Ts,Bs,Ds,Is){return l(),n("div",null,ms)}const Ps=a(e,[["render",Cs]]);export{fs as __pageData,Ps as default}; +});
`,1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/en_advanced_global.md.CeJCRiyy.lean.js b/docs/document/assets/en_advanced_global.md.CeJCRiyy.lean.js new file mode 100644 index 000000000..9668e4a7a --- /dev/null +++ b/docs/document/assets/en_advanced_global.md.CeJCRiyy.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Global Attributes","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/global.md","filePath":"en/advanced/global.md","lastUpdated":1718941442000}'),p={name:"en/advanced/global.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/en_advanced_plugin.md.CK2r-NOO.js b/docs/document/assets/en_advanced_plugin.md.BS5dhI7P.js similarity index 92% rename from docs/document/assets/en_advanced_plugin.md.CK2r-NOO.js rename to docs/document/assets/en_advanced_plugin.md.BS5dhI7P.js index 9749991a2..f2e4f3691 100644 --- a/docs/document/assets/en_advanced_plugin.md.CK2r-NOO.js +++ b/docs/document/assets/en_advanced_plugin.md.BS5dhI7P.js @@ -1,4 +1,4 @@ -import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjPBJ.js";const _=JSON.parse('{"title":"Writing Plugins","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/plugin.md","filePath":"en/advanced/plugin.md","lastUpdated":1700976201000}'),h={name:"en/advanced/plugin.md"},e=s("h1",{id:"writing-plugins",tabindex:"-1"},[i("Writing Plugins "),s("a",{class:"header-anchor",href:"#writing-plugins","aria-label":'Permalink to "Writing Plugins"'},"​")],-1),k=s("p",null,[i("Once you know the player's "),s("code",null,"properties"),i(", "),s("code",null,"methods"),i(", and "),s("code",null,"events"),i(", writing plugins is very simple.")],-1),t=s("p",null,"You can load the plugin functions when instantiated.",-1),E=s("div",{className:"run-code"},"▶ Run Code",-1),r=a(`
js
function myPlugin(art) {
+import{_ as l,c as p,o as h,j as s,ak as n,a as i}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"Writing Plugins","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/plugin.md","filePath":"en/advanced/plugin.md","lastUpdated":1700976201000}'),e={name:"en/advanced/plugin.md"};function k(t,a,E,r,d,g){return h(),p("div",null,a[0]||(a[0]=[s("h1",{id:"writing-plugins",tabindex:"-1"},[i("Writing Plugins "),s("a",{class:"header-anchor",href:"#writing-plugins","aria-label":'Permalink to "Writing Plugins"'},"​")],-1),s("p",null,[i("Once you know the player's "),s("code",null,"properties"),i(", "),s("code",null,"methods"),i(", and "),s("code",null,"events"),i(", writing plugins is very simple.")],-1),s("p",null,"You can load the plugin functions when instantiated.",-1),s("div",{className:"run-code"},"▶ Run Code",-1),n(`
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -17,7 +17,7 @@ import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjP
 
 art.on('ready', () => {
     console.info(art.plugins.myPlugin);
-});

Here's the translation of the provided text into English while preserving the Markdown formatting:

A function that allows loading plugins after instantiation

`,3),d=s("div",{className:"run-code"},"▶ Run Code",-1),g=a(`
js
function myPlugin(art) {
+});

Here's the translation of the provided text into English while preserving the Markdown formatting:

A function that allows loading plugins after instantiation

`,3),s("div",{className:"run-code"},"▶ Run Code",-1),n(`
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -96,4 +96,4 @@ import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjP
             url: '/assets/sample/layer.png'
         })
     ],
-});
`,3),c=[e,k,t,E,r,d,g];function y(b,u,F,o,m,C){return p(),l("div",null,c)}const A=n(h,[["render",y]]);export{_ as __pageData,A as default}; +});
`,3)]))}const b=l(e,[["render",k]]);export{y as __pageData,b as default}; diff --git a/docs/document/assets/en_advanced_plugin.md.BS5dhI7P.lean.js b/docs/document/assets/en_advanced_plugin.md.BS5dhI7P.lean.js new file mode 100644 index 000000000..0b5552609 --- /dev/null +++ b/docs/document/assets/en_advanced_plugin.md.BS5dhI7P.lean.js @@ -0,0 +1 @@ +import{_ as l,c as p,o as h,j as s,ak as n,a as i}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"Writing Plugins","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/plugin.md","filePath":"en/advanced/plugin.md","lastUpdated":1700976201000}'),e={name:"en/advanced/plugin.md"};function k(t,a,E,r,d,g){return h(),p("div",null,a[0]||(a[0]=[s("h1",{id:"writing-plugins",tabindex:"-1"},[i("Writing Plugins "),s("a",{class:"header-anchor",href:"#writing-plugins","aria-label":'Permalink to "Writing Plugins"'},"​")],-1),s("p",null,[i("Once you know the player's "),s("code",null,"properties"),i(", "),s("code",null,"methods"),i(", and "),s("code",null,"events"),i(", writing plugins is very simple.")],-1),s("p",null,"You can load the plugin functions when instantiated.",-1),s("div",{className:"run-code"},"▶ Run Code",-1),n("",3),s("div",{className:"run-code"},"▶ Run Code",-1),n("",3)]))}const b=l(e,[["render",k]]);export{y as __pageData,b as default}; diff --git a/docs/document/assets/en_advanced_plugin.md.CK2r-NOO.lean.js b/docs/document/assets/en_advanced_plugin.md.CK2r-NOO.lean.js deleted file mode 100644 index 55aabd151..000000000 --- a/docs/document/assets/en_advanced_plugin.md.CK2r-NOO.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as n,c as l,o as p,j as s,a as i,a7 as a}from"./chunks/framework.DHbvjPBJ.js";const _=JSON.parse('{"title":"Writing Plugins","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/plugin.md","filePath":"en/advanced/plugin.md","lastUpdated":1700976201000}'),h={name:"en/advanced/plugin.md"},e=s("h1",{id:"writing-plugins",tabindex:"-1"},[i("Writing Plugins "),s("a",{class:"header-anchor",href:"#writing-plugins","aria-label":'Permalink to "Writing Plugins"'},"​")],-1),k=s("p",null,[i("Once you know the player's "),s("code",null,"properties"),i(", "),s("code",null,"methods"),i(", and "),s("code",null,"events"),i(", writing plugins is very simple.")],-1),t=s("p",null,"You can load the plugin functions when instantiated.",-1),E=s("div",{className:"run-code"},"▶ Run Code",-1),r=a("",3),d=s("div",{className:"run-code"},"▶ Run Code",-1),g=a("",3),c=[e,k,t,E,r,d,g];function y(b,u,F,o,m,C){return p(),l("div",null,c)}const A=n(h,[["render",y]]);export{_ as __pageData,A as default}; diff --git a/docs/document/assets/en_advanced_property.md.CM0QsujK.lean.js b/docs/document/assets/en_advanced_property.md.CM0QsujK.lean.js deleted file mode 100644 index dcbf86b92..000000000 --- a/docs/document/assets/en_advanced_property.md.CM0QsujK.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const Ms=JSON.parse('{"title":"Instance Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/property.md","filePath":"en/advanced/property.md","lastUpdated":1726306667000}'),e={name:"en/advanced/property.md"},p=s("",5),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",4),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",4),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",4),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s("",4),o=i("div",{className:"run-code"},"▶ Run Code",-1),y=s("",4),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s("",4),F=i("div",{className:"run-code"},"▶ Run Code",-1),m=s("",4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s("",4),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s("",4),B=i("div",{className:"run-code"},"▶ Run Code",-1),T=s("",4),D=i("div",{className:"run-code"},"▶ Run Code",-1),S=s("",5),f=i("div",{className:"run-code"},"▶ Run Code",-1),P=s("",4),w=i("div",{className:"run-code"},"▶ Run Code",-1),q=s("",4),x=i("div",{className:"run-code"},"▶ Run Code",-1),R=s("",4),N=i("div",{className:"run-code"},"▶ Run Code",-1),I=s("",5),V=i("div",{className:"run-code"},"▶ Run Code",-1),j=s("",4),G=i("div",{className:"run-code"},"▶ Run Code",-1),z=s("",4),U=i("div",{className:"run-code"},"▶ Run Code",-1),W=s("",4),O=i("div",{className:"run-code"},"▶ Run Code",-1),H=s("",5),L=i("div",{className:"run-code"},"▶ Run Code",-1),$=s("",4),J=i("div",{className:"run-code"},"▶ Run Code",-1),M=s("",5),Q=i("div",{className:"run-code"},"▶ Run Code",-1),K=s("",4),X=i("div",{className:"run-code"},"▶ Run Code",-1),Y=s("",4),Z=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s("",4),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s("",4),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s("",5),es=i("div",{className:"run-code"},"▶ Run Code",-1),ps=s("",3),hs=i("div",{className:"run-code"},"▶ Run Code",-1),ts=s("",4),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s("",4),Es=i("div",{className:"run-code"},"▶ Run Code",-1),ds=s("",5),cs=i("div",{className:"run-code"},"▶ Run Code",-1),gs=s("",4),os=i("div",{className:"run-code"},"▶ Run Code",-1),ys=s("",4),bs=i("div",{className:"run-code"},"▶ Run Code",-1),us=s("",4),Fs=i("div",{className:"run-code"},"▶ Run Code",-1),ms=s("",4),_s=i("div",{className:"run-code"},"▶ Run Code",-1),Cs=s("",4),vs=i("div",{className:"run-code"},"▶ Run Code",-1),As=s("",4),Bs=i("div",{className:"run-code"},"▶ Run Code",-1),Ts=s("",5),Ds=i("div",{className:"run-code"},"▶ Run Code",-1),Ss=s("",4),fs=i("div",{className:"run-code"},"▶ Run Code",-1),Ps=s("",4),ws=i("div",{className:"run-code"},"▶ Run Code",-1),qs=s("",4),xs=i("div",{className:"run-code"},"▶ Run Code",-1),Rs=s("",4),Ns=i("div",{className:"run-code"},"▶ Run Code",-1),Is=s("",4),Vs=i("div",{className:"run-code"},"▶ Run Code",-1),js=s("",1),Gs=[p,h,t,k,r,E,d,c,g,o,y,b,u,F,m,_,C,v,A,B,T,D,S,f,P,w,q,x,R,N,I,V,j,G,z,U,W,O,H,L,$,J,M,Q,K,X,Y,Z,ss,is,as,ns,ls,es,ps,hs,ts,ks,rs,Es,ds,cs,gs,os,ys,bs,us,Fs,ms,_s,Cs,vs,As,Bs,Ts,Ds,Ss,fs,Ps,ws,qs,xs,Rs,Ns,Is,Vs,js];function zs(Us,Ws,Os,Hs,Ls,$s){return l(),n("div",null,Gs)}const Qs=a(e,[["render",zs]]);export{Ms as __pageData,Qs as default}; diff --git a/docs/document/assets/en_advanced_property.md.CM0QsujK.js b/docs/document/assets/en_advanced_property.md.DT7zAMKq.js similarity index 84% rename from docs/document/assets/en_advanced_property.md.CM0QsujK.js rename to docs/document/assets/en_advanced_property.md.DT7zAMKq.js index 95e7a4e88..510eac5f6 100644 --- a/docs/document/assets/en_advanced_property.md.CM0QsujK.js +++ b/docs/document/assets/en_advanced_property.md.DT7zAMKq.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const Ms=JSON.parse('{"title":"Instance Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/property.md","filePath":"en/advanced/property.md","lastUpdated":1726306667000}'),e={name:"en/advanced/property.md"},p=s('

Instance Properties ​

Here, instance properties refer to the primary properties mounted on the instance, which are quite commonly used.

play ​

  • Type: Function

Play video

',5),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js

+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Instance Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/property.md","filePath":"en/advanced/property.md","lastUpdated":1726306667000}'),p={name:"en/advanced/property.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Instance Properties ​

Here, instance properties refer to the primary properties mounted on the instance, which are quite commonly used.

play ​

  • Type: Function

Play video

',5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js

 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -7,7 +7,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     art.play();
-});

pause ​

  • Type: Function

Pause video

`,4),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s(`
js
var art = new Artplayer({
+});

pause ​

  • Type: Function

Pause video

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -19,7 +19,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.pause();
     }, 3000);
-});

toggle ​

  • Type: Function

Toggle the play and pause state of the video

`,4),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var art = new Artplayer({
+});

toggle ​

  • Type: Function

Toggle the play and pause state of the video

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -31,28 +31,28 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.toggle();
     }, 3000);
-});

destroy ​

  • Type: Function
  • Parameter: Boolean

Destroy the player. Accepts a parameter indicating whether to remove the player's html after destruction, which defaults to true

`,4),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s(`
js
var art = new Artplayer({
+});

destroy ​

  • Type: Function
  • Parameter: Boolean

Destroy the player. Accepts a parameter indicating whether to remove the player's html after destruction, which defaults to true

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.destroy();
-});

seek ​

  • Type: Setter
  • Parameter: Number

Jump to a specific time in the video, in seconds.

`,4),o=i("div",{className:"run-code"},"▶ Run Code",-1),y=s(`
js
var art = new Artplayer({
+});

seek ​

  • Type: Setter
  • Parameter: Number

Jump to a specific time in the video, in seconds.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.seek = 5;
-});

forward ​

  • Type: Setter
  • Parameter: Number

Fast forward the video time, in seconds.

`,4),b=i("div",{className:"run-code"},"▶ Run Code",-1),u=s(`
js
var art = new Artplayer({
+});

forward ​

  • Type: Setter
  • Parameter: Number

Fast forward the video time, in seconds.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.forward = 5;
-});

backward ​

  • Type: Setter
  • Parameter: Number

Video rewind time in seconds

`,4),F=i("div",{className:"run-code"},"▶ Run Code",-1),m=s(`
js
var art = new Artplayer({
+});

backward ​

  • Type: Setter
  • Parameter: Number

Video rewind time in seconds

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -63,7 +63,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.backward = 2;
     }, 3000);
-});

volume ​

  • Type: Setter/Getter
  • Parameter: Number

Sets and gets the video volume, which ranges from [0, 1]

`,4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s(`
js
var art = new Artplayer({
+});

volume ​

  • Type: Setter/Getter
  • Parameter: Number

Sets and gets the video volume, which ranges from [0, 1]

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -72,14 +72,14 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.volume);
     art.volume = 0.5;
     console.info(art.volume);
-});

url ​

  • Type: Setter/Getter
  • Parameter: String

Set and retrieve the video address

`,4),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s(`
js
var art = new Artplayer({
+});

url ​

  • Type: Setter/Getter
  • Parameter: String

Set and retrieve the video address

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.url = '/assets/sample/video.mp4?t=0';
-});

switch ​

  • Type: Setter
  • Parameter: String

Set the video address, which is similar to art.url, but performs some optimization operations

`,4),B=i("div",{className:"run-code"},"▶ Run Code",-1),T=s(`
js
var art = new Artplayer({
+});

switch ​

  • Type: Setter
  • Parameter: String

Set the video address, which is similar to art.url, but performs some optimization operations

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -89,7 +89,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.switch = '/assets/sample/video.mp4?t=0';
     }, 3000);
-});

switchUrl ​

  • Type: Function
  • Parameter: String

Set the video address, similar to setting art.url, but some optimization operations will be executed.

`,4),D=i("div",{className:"run-code"},"▶ Run Code",-1),S=s(`
js
var art = new Artplayer({
+});

switchUrl ​

  • Type: Function
  • Parameter: String

Set the video address, similar to setting art.url, but some optimization operations will be executed.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -99,7 +99,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.switchUrl('/assets/sample/video.mp4?t=0');
     }, 3000);
-});

Warning

art.switch and art.switchUrl have the same functionality. However, the art.switchUrl method will return a Promise. When it resolves, it indicates that the new address can be played; when it rejects, it indicates there was an error loading the new address.

switchQuality ​

  • Type: Function
  • Parameter: String

Set video quality address, similar to art.switchUrl, but it will carry over the previous playback progress.

`,5),f=i("div",{className:"run-code"},"▶ Run Code",-1),P=s(`
js
var art = new Artplayer({
+});

Warning

art.switch and art.switchUrl have the same functionality. However, the art.switchUrl method will return a Promise. When it resolves, it indicates that the new address can be played; when it rejects, it indicates there was an error loading the new address.

switchQuality ​

  • Type: Function
  • Parameter: String

Set video quality address, similar to art.switchUrl, but it will carry over the previous playback progress.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -109,7 +109,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.switchQuality('/assets/sample/video.mp4?t=0');
     }, 3000);
-});

muted ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get whether the video is muted.

`,4),w=i("div",{className:"run-code"},"▶ Run Code",-1),q=s(`
js
var art = new Artplayer({
+});

muted ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get whether the video is muted.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -118,7 +118,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.muted);
     art.muted = true;
     console.info(art.muted);
-});

currentTime ​

  • Type: Setter/Getter
  • Parameter: Number

Set and get the current time of the video. Setting the time is similar to seek, but it does not trigger additional events.

`,4),x=i("div",{className:"run-code"},"▶ Run Code",-1),R=s(`
js
var art = new Artplayer({
+});

currentTime ​

  • Type: Setter/Getter
  • Parameter: Number

Set and get the current time of the video. Setting the time is similar to seek, but it does not trigger additional events.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -127,21 +127,21 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.currentTime);
     art.currentTime = 5;
     console.info(art.currentTime);
-});

duration ​

  • Type: Getter

Get the video duration

`,4),N=i("div",{className:"run-code"},"▶ Run Code",-1),I=s(`
js
var art = new Artplayer({
+});

duration ​

  • Type: Getter

Get the video duration

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info(art.duration);
-});

Note

Some videos do not have a duration, such as videos that are being live streamed or videos that have not been fully decoded, in which case the obtained duration will be 0

screenshot ​

  • Type: Function

Download a screenshot of the current video frame, optional parameter is the screenshot name

`,5),V=i("div",{className:"run-code"},"▶ Run Code",-1),j=s(`
js
var art = new Artplayer({
+});

Note

Some videos do not have a duration, such as videos that are being live streamed or videos that have not been fully decoded, in which case the obtained duration will be 0

screenshot ​

  • Type: Function

Download a screenshot of the current video frame, optional parameter is the screenshot name

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.screenshot('your-name');
-});

getDataURL ​

  • Type: Function

Gets the base64 address of the screenshot of the current video frame, which returns a Promise.

`,4),G=i("div",{className:"run-code"},"▶ Run Code",-1),z=s(`
js
var art = new Artplayer({
+});

getDataURL ​

  • Type: Function

Gets the base64 address of the screenshot of the current video frame, which returns a Promise.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -149,7 +149,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 art.on('ready', async () => {
     const url = await art.getDataURL();
     console.info(url)
-});

getBlobUrl ​

  • Type: Function

Gets the blob address of the screenshot of the current video frame, which returns a Promise.

`,4),U=i("div",{className:"run-code"},"▶ Run Code",-1),W=s(`
js
var art = new Artplayer({
+});

getBlobUrl ​

  • Type: Function

Gets the blob address of the screenshot of the current video frame, which returns a Promise.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -157,7 +157,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 art.on('ready', async () => {
     const url = await art.getBlobUrl();
     console.info(url);
-});

fullscreen ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get the player window fullscreen

`,4),O=i("div",{className:"run-code"},"▶ Run Code",-1),H=s(`
js
var art = new Artplayer({
+});

fullscreen ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get the player window fullscreen

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -169,7 +169,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

Note

Due to browser security mechanisms, before triggering the window to fullscreen, the page must have had an interaction (e.g. user clicked on the page).

fullscreenWeb ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get the player web page full screen

`,5),L=i("div",{className:"run-code"},"▶ Run Code",-1),$=s(`
js
var art = new Artplayer({
+});

Note

Due to browser security mechanisms, before triggering the window to fullscreen, the page must have had an interaction (e.g. user clicked on the page).

fullscreenWeb ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get the player web page full screen

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
@@ -181,7 +181,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     setTimeout(() => {
         art.fullscreenWeb = false;
     }, 3000);
-});

pip ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get the player picture-in-picture mode

`,4),J=i("div",{className:"run-code"},"▶ Run Code",-1),M=s(`
js
var art = new Artplayer({
+});

pip ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get the player picture-in-picture mode

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -193,7 +193,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

Warning

Due to browser security mechanisms, user interaction (e.g., a user click on the page) must occur before triggering picture-in-picture.

poster ​

  • Type: Setter/Getter
  • Parameter: String

Set and get the video poster, the poster effect is visible only before the video starts playing.

`,5),Q=i("div",{className:"run-code"},"▶ Run Code",-1),K=s(`
js
var art = new Artplayer({
+});

Warning

Due to browser security mechanisms, user interaction (e.g., a user click on the page) must occur before triggering picture-in-picture.

poster ​

  • Type: Setter/Getter
  • Parameter: String

Set and get the video poster, the poster effect is visible only before the video starts playing.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     poster: '/assets/sample/poster.jpg',
@@ -203,14 +203,14 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.poster);
     art.poster = '/assets/sample/poster.jpg?t=0';
     console.info(art.poster);
-});

mini ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get the player's mini mode

`,4),X=i("div",{className:"run-code"},"▶ Run Code",-1),Y=s(`
js
var art = new Artplayer({
+});

mini ​

  • Type: Setter/Getter
  • Parameter: Boolean

Set and get the player's mini mode

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.mini = true;
-});

playing ​

  • Type: Getter
  • Parameter: Boolean

Get whether the video is currently playing

`,4),Z=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s(`
js
var art = new Artplayer({
+});

playing ​

  • Type: Getter
  • Parameter: Boolean

Get whether the video is currently playing

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
@@ -218,21 +218,21 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     console.info(art.playing);
-});

autoSize ​

  • Type: Function

Sets whether the video should auto adjust its size

`,4),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s(`
js
var art = new Artplayer({
+});

autoSize ​

  • Type: Function

Sets whether the video should auto adjust its size

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     art.autoSize();
-});

rect ​

  • Type: Getter

Gets the size and position information of the player

`,4),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s(`
js
var art = new Artplayer({
+});

rect ​

  • Type: Getter

Gets the size and position information of the player

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('ready', () => {
     console.info(JSON.stringify(art.rect));
-});

Warning

The size and coordinates are obtained via getBoundingClientRect

flip ​

  • Type: Setter/Getter
  • Parameter: String

Set and get the player flip, supports normal, horizontal, vertical

`,5),es=i("div",{className:"run-code"},"▶ Run Code",-1),ps=s(`
js
var art = new Artplayer({
+});

Warning

The size and coordinates are obtained via getBoundingClientRect

flip ​

  • Type: Setter/Getter
  • Parameter: String

Set and get the player flip, supports normal, horizontal, vertical

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -241,7 +241,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.flip);
     art.flip = 'horizontal';
     console.info(art.flip);
-});

playbackRate ​

  • Type: Setter/Getter
  • Parameter: Number Set and get the playback speed of the player
`,3),hs=i("div",{className:"run-code"},"▶ Run Code",-1),ts=s(`
js
var art = new Artplayer({
+});

playbackRate ​

  • Type: Setter/Getter
  • Parameter: Number Set and get the playback speed of the player
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -250,7 +250,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.playbackRate);
     art.playbackRate = 2;
     console.info(art.playbackRate);
-});

aspectRatio ​

  • Type: Setter/Getter
  • Parameter: String

Set and get the aspect ratio of the player

`,4),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s(`
js
var art = new Artplayer({
+});

aspectRatio ​

  • Type: Setter/Getter
  • Parameter: String

Set and get the aspect ratio of the player

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -259,7 +259,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.aspectRatio);
     art.aspectRatio = '16:9';
     console.info(art.aspectRatio);
-});

autoHeight ​

  • Type: Function

When the container has only width, this attribute can automatically calculate and set the height of the video

`,4),Es=i("div",{className:"run-code"},"▶ Run Code",-1),ds=s(`
js
var art = new Artplayer({
+});

autoHeight ​

  • Type: Function

When the container has only width, this attribute can automatically calculate and set the height of the video

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -270,7 +270,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('resize', () => {
     art.autoHeight();
-});

Warning

When your container has only width but you do not know the exact height, this property is very useful as it can automatically calculate the video's height, but you need to make sure when to set this property.

attr ​

  • Type: Function
  • Parameter: String

Dynamically get and set the attributes of the video element

`,5),cs=i("div",{className:"run-code"},"▶ Run Code",-1),gs=s(`
js
var art = new Artplayer({
+});

Warning

When your container has only width but you do not know the exact height, this property is very useful as it can automatically calculate the video's height, but you need to make sure when to set this property.

attr ​

  • Type: Function
  • Parameter: String

Dynamically get and set the attributes of the video element

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -279,7 +279,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.attr('playsInline'));
     art.attr('playsInline', true);
     console.info(art.attr('playsInline'));
-});

type ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically get and set the video type

`,4),os=i("div",{className:"run-code"},"▶ Run Code",-1),ys=s(`
js
var art = new Artplayer({
+});

type ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically get and set the video type

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -288,7 +288,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.type);
     art.type = 'm3u8';
     console.info(art.type);
-});

theme ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically get and set the player's theme color

`,4),bs=i("div",{className:"run-code"},"▶ Run Code",-1),us=s(`
js
var art = new Artplayer({
+});

theme ​

  • Type: Setter/Getter
  • Parameter: String

Dynamically get and set the player's theme color

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -297,7 +297,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.info(art.theme);
     art.theme = '#000';
     console.info(art.theme);
-});

airplay ​

  • Type: Function

Activate airplay

`,4),Fs=i("div",{className:"run-code"},"▶ Run Code",-1),ms=s(`
js
var art = new Artplayer({
+});

airplay ​

  • Type: Function

Activate airplay

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -309,21 +309,21 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

loaded ​

  • Type: Getter

The proportion of the video that is cached, ranging from [0, 1], commonly used with the video:timeupdate event.

`,4),_s=i("div",{className:"run-code"},"▶ Run Code",-1),Cs=s(`
js
var art = new Artplayer({
+});

loaded ​

  • Type: Getter

The proportion of the video that is cached, ranging from [0, 1], commonly used with the video:timeupdate event.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.loaded);
-});

played ​

  • Type: Getter

The proportion of the video that has been played, ranging from [0, 1], commonly used with the video:timeupdate event.

`,4),vs=i("div",{className:"run-code"},"▶ Run Code",-1),As=s(`
js
var art = new Artplayer({
+});

played ​

  • Type: Getter

The proportion of the video that has been played, ranging from [0, 1], commonly used with the video:timeupdate event.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
 art.on('video:timeupdate', () => {
     console.info(art.played);
-});

proxy ​

  • Type: Function

A proxy function for DOM events, which essentially proxies addEventListener and removeEventListener. When using proxy to handle events, the event will automatically be destroyed when the player is destroyed.

`,4),Bs=i("div",{className:"run-code"},"▶ Run Code",-1),Ts=s(`
js
var container = document.querySelector('.artplayer-app');
+});

proxy ​

  • Type: Function

A proxy function for DOM events, which essentially proxies addEventListener and removeEventListener. When using proxy to handle events, the event will automatically be destroyed when the player is destroyed.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var container = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
 	container: container,
@@ -332,17 +332,17 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.proxy(container, 'click', event => {
 	console.info(event);
-});

Tip

If you need some DOM events to exist only during the lifespan of the player, it is highly recommended to use this function to avoid causing memory leaks.

query ​

  • Type: Function

DOM query function, similar to document.querySelector, but the object being queried is limited within the current player, which can prevent errors due to having the same class name.

`,5),Ds=i("div",{className:"run-code"},"▶ Run Code",-1),Ss=s(`
js
var art = new Artplayer({
+});

Tip

If you need some DOM events to exist only during the lifespan of the player, it is highly recommended to use this function to avoid causing memory leaks.

query ​

  • Type: Function

DOM query function, similar to document.querySelector, but the object being queried is limited within the current player, which can prevent errors due to having the same class name.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
 
-console.info(art.query('.art-video'));

video ​

  • Type: Element

A shortcut to return the video element of the player.

`,4),fs=i("div",{className:"run-code"},"▶ Run Code",-1),Ps=s(`
js
var art = new Artplayer({
+console.info(art.query('.art-video'));

video ​

  • Type: Element

A shortcut to return the video element of the player.

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
 
-console.info(art.video);

cssVar ​

  • Type: Function

Dynamically getting or setting css variables

`,4),ws=i("div",{className:"run-code"},"▶ Run Code",-1),qs=s(`
js
var art = new Artplayer({
+console.info(art.video);

cssVar ​

  • Type: Function

Dynamically getting or setting css variables

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -351,7 +351,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     console.log(art.cssVar('--art-theme'));
     art.cssVar('--art-theme', 'green');
     console.log(art.cssVar('--art-theme'));
-});

quality ​

  • Type: Setter
  • Parameter: Array

Dynamically setting the list of qualities

`,4),xs=i("div",{className:"run-code"},"▶ Run Code",-1),Rs=s(`
js
var art = new Artplayer({
+});

quality ​

  • Type: Setter
  • Parameter: Array

Dynamically setting the list of qualities

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 	quality: [
@@ -381,7 +381,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 			},
 		];
 	}, 3000);
-})

thumbnails ​

  • Type: Setter/Getter
  • Parameter: Object

Dynamically set thumbnails

`,4),Ns=i("div",{className:"run-code"},"▶ Run Code",-1),Is=s(`
js
var art = new Artplayer({
+})

thumbnails ​

  • Type: Setter/Getter
  • Parameter: Object

Dynamically set thumbnails

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
 });
@@ -392,7 +392,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         number: 60,
         column: 10,
     };
-});

subtitleOffset ​

  • Type: Setter/Getter
  • Parameter: Number

Dynamically set subtitle offset

`,4),Vs=i("div",{className:"run-code"},"▶ Run Code",-1),js=s(`
js
var art = new Artplayer({
+});

subtitleOffset ​

  • Type: Setter/Getter
  • Parameter: Number

Dynamically set subtitle offset

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
 	container: '.artplayer-app',
 	url: '/assets/sample/video.mp4',
     subtitle: {
@@ -402,4 +402,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     art.subtitleOffset = 1;
-});
`,1),Gs=[p,h,t,k,r,E,d,c,g,o,y,b,u,F,m,_,C,v,A,B,T,D,S,f,P,w,q,x,R,N,I,V,j,G,z,U,W,O,H,L,$,J,M,Q,K,X,Y,Z,ss,is,as,ns,ls,es,ps,hs,ts,ks,rs,Es,ds,cs,gs,os,ys,bs,us,Fs,ms,_s,Cs,vs,As,Bs,Ts,Ds,Ss,fs,Ps,ws,qs,xs,Rs,Ns,Is,Vs,js];function zs(Us,Ws,Os,Hs,Ls,$s){return l(),n("div",null,Gs)}const Qs=a(e,[["render",zs]]);export{Ms as __pageData,Qs as default}; +});
`,1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/en_advanced_property.md.DT7zAMKq.lean.js b/docs/document/assets/en_advanced_property.md.DT7zAMKq.lean.js new file mode 100644 index 000000000..3598d111e --- /dev/null +++ b/docs/document/assets/en_advanced_property.md.DT7zAMKq.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Instance Properties","description":"","frontmatter":{},"headers":[],"relativePath":"en/advanced/property.md","filePath":"en/advanced/property.md","lastUpdated":1726306667000}'),p={name:"en/advanced/property.md"};function h(t,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(p,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/en_component_contextmenu.md.B4StaLLI.lean.js b/docs/document/assets/en_component_contextmenu.md.B4StaLLI.lean.js deleted file mode 100644 index 65c694e73..000000000 --- a/docs/document/assets/en_component_contextmenu.md.B4StaLLI.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const B=JSON.parse('{"title":"Context Menu","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/contextmenu.md","filePath":"en/component/contextmenu.md","lastUpdated":1700976201000}'),e={name:"en/component/contextmenu.md"},p=s("",4),t=i("div",{className:"run-code"},"▶ Run Code",-1),h=s("",2),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",2),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",2),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s("",1),o=[p,t,h,k,r,E,d,c,g];function y(u,b,m,F,C,_){return l(),n("div",null,o)}const D=a(e,[["render",y]]);export{B as __pageData,D as default}; diff --git a/docs/document/assets/en_component_contextmenu.md.B4StaLLI.js b/docs/document/assets/en_component_contextmenu.md.CSeB35ob.js similarity index 81% rename from docs/document/assets/en_component_contextmenu.md.B4StaLLI.js rename to docs/document/assets/en_component_contextmenu.md.CSeB35ob.js index 9c6f917c5..bcd47f40b 100644 --- a/docs/document/assets/en_component_contextmenu.md.B4StaLLI.js +++ b/docs/document/assets/en_component_contextmenu.md.CSeB35ob.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const B=JSON.parse('{"title":"Context Menu","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/contextmenu.md","filePath":"en/component/contextmenu.md","lastUpdated":1700976201000}'),e={name:"en/component/contextmenu.md"},p=s('

Context Menu ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique name of the component, used for marking the class name
indexNumberComponent index, used for display priority
htmlString, ElementThe DOM element of the component
styleObjectStyle object for the component
clickFunctionClick event for the component
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component

Creation ​

',4),t=i("div",{className:"run-code"},"▶ Run Code",-1),h=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Context Menu","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/contextmenu.md","filePath":"en/component/contextmenu.md","lastUpdated":1700976201000}'),p={name:"en/component/contextmenu.md"};function t(h,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s('

Context Menu ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique name of the component, used for marking the class name
indexNumberComponent index, used for display priority
htmlString, ElementThe DOM element of the component
styleObjectStyle object for the component
clickFunctionClick event for the component
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -16,7 +16,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 art.contextmenu.show = true;
 
 // Get the Element of contextmenu by name
-console.info(art.contextmenu['your-menu']);

Add ​

`,2),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s(`
js
var art = new Artplayer({
+console.info(art.contextmenu['your-menu']);

Add ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -33,7 +33,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 art.contextmenu.show = true;
 
 // Get the Element of contextmenu by name
-console.info(art.contextmenu['your-menu']);

Delete ​

`,2),E=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var art = new Artplayer({
+console.info(art.contextmenu['your-menu']);

Delete ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -55,7 +55,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         // Delete the context menu by name
         art.contextmenu.remove('your-menu')
     }, 3000);
-});

Updates ​

`,2),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s(`
js
var art = new Artplayer({
+});

Updates ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -80,4 +80,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             html: 'Your New Menu',
         })
     }, 3000);
-});
`,1),o=[p,t,h,k,r,E,d,c,g];function y(u,b,m,F,C,_){return l(),n("div",null,o)}const D=a(e,[["render",y]]);export{B as __pageData,D as default}; +});
`,1)]))}const o=n(p,[["render",t]]);export{g as __pageData,o as default}; diff --git a/docs/document/assets/en_component_contextmenu.md.CSeB35ob.lean.js b/docs/document/assets/en_component_contextmenu.md.CSeB35ob.lean.js new file mode 100644 index 000000000..2743b052e --- /dev/null +++ b/docs/document/assets/en_component_contextmenu.md.CSeB35ob.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Context Menu","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/contextmenu.md","filePath":"en/component/contextmenu.md","lastUpdated":1700976201000}'),p={name:"en/component/contextmenu.md"};function t(h,a,k,r,E,d){return e(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const o=n(p,[["render",t]]);export{g as __pageData,o as default}; diff --git a/docs/document/assets/en_component_controls.md.C7L6lFR8.lean.js b/docs/document/assets/en_component_controls.md.C7L6lFR8.lean.js deleted file mode 100644 index ee88d8243..000000000 --- a/docs/document/assets/en_component_controls.md.C7L6lFR8.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const A=JSON.parse('{"title":"Controller","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/controls.md","filePath":"en/component/controls.md","lastUpdated":1700976201000}'),p={name:"en/component/controls.md"},e=s("",4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",2),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s("",2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",2),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s("",1),o=[e,h,t,k,E,r,d,c,g];function y(b,u,F,m,C,B){return l(),n("div",null,o)}const f=a(p,[["render",y]]);export{A as __pageData,f as default}; diff --git a/docs/document/assets/en_component_controls.md.C7L6lFR8.js b/docs/document/assets/en_component_controls.md.CamUOgKQ.js similarity index 86% rename from docs/document/assets/en_component_controls.md.C7L6lFR8.js rename to docs/document/assets/en_component_controls.md.CamUOgKQ.js index 80963ebcb..9c0b13c75 100644 --- a/docs/document/assets/en_component_controls.md.C7L6lFR8.js +++ b/docs/document/assets/en_component_controls.md.CamUOgKQ.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const A=JSON.parse('{"title":"Controller","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/controls.md","filePath":"en/component/controls.md","lastUpdated":1700976201000}'),p={name:"en/component/controls.md"},e=s('

Controller ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringThe unique name of the component for class identification
indexNumberThe index of the component, used for display priority
htmlString, ElementThe component's DOM element
styleObjectThe style object for the component
clickFunctionComponent click event
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component
positionStringleft and right control the position of the controller
selectorArrayAn array of objects for the selection list
onSelectFunctionFunction triggered when an item from the selection list is clicked

Creation ​

',4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Controller","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/controls.md","filePath":"en/component/controls.md","lastUpdated":1700976201000}'),e={name:"en/component/controls.md"};function h(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Controller ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringThe unique name of the component for class identification
indexNumberThe index of the component, used for display priority
htmlString, ElementThe component's DOM element
styleObjectThe style object for the component
clickFunctionComponent click event
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component
positionStringleft and right control the position of the controller
selectorArrayAn array of objects for the selection list
onSelectFunctionFunction triggered when an item from the selection list is clicked

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -41,7 +41,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 // Get the Element of control by name
 console.info(art.controls['your-button']);
-console.info(art.controls['subtitle']);

Adding ​

`,2),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s(`
js
var art = new Artplayer({
+console.info(art.controls['subtitle']);

Adding ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -64,7 +64,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 // Get the Element of control by name
-console.info(art.controls['button1']);

Delete ​

`,2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var art = new Artplayer({
+console.info(art.controls['button1']);

Delete ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -86,7 +86,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         // Delete the control by name
         art.controls.remove('button1');
     }, 3000);
-});

Update ​

`,2),c=i("div",{className:"run-code"},"▶ Run Code",-1),g=s(`
js
var art = new Artplayer({
+});

Update ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -127,4 +127,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             ],
         });
     }, 3000);
-});
`,1),o=[e,h,t,k,E,r,d,c,g];function y(b,u,F,m,C,B){return l(),n("div",null,o)}const f=a(p,[["render",y]]);export{A as __pageData,f as default}; +});
`,1)]))}const y=n(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/en_component_controls.md.CamUOgKQ.lean.js b/docs/document/assets/en_component_controls.md.CamUOgKQ.lean.js new file mode 100644 index 000000000..cde53e355 --- /dev/null +++ b/docs/document/assets/en_component_controls.md.CamUOgKQ.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Controller","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/controls.md","filePath":"en/component/controls.md","lastUpdated":1700976201000}'),e={name:"en/component/controls.md"};function h(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(e,[["render",h]]);export{g as __pageData,y as default}; diff --git a/docs/document/assets/en_component_layers.md.B0OnEPFl.lean.js b/docs/document/assets/en_component_layers.md.B0OnEPFl.lean.js deleted file mode 100644 index 236fcb002..000000000 --- a/docs/document/assets/en_component_layers.md.B0OnEPFl.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const A=JSON.parse('{"title":"Layer","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/layers.md","filePath":"en/component/layers.md","lastUpdated":1700976201000}'),p={name:"en/component/layers.md"},h=s("",4),e=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",2),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s("",2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",2),g=i("div",{className:"run-code"},"▶ Run Code",-1),c=s("",1),y=[h,e,t,k,E,r,d,g,c];function o(b,F,u,m,C,_){return l(),n("div",null,y)}const D=a(p,[["render",o]]);export{A as __pageData,D as default}; diff --git a/docs/document/assets/en_component_layers.md.B0OnEPFl.js b/docs/document/assets/en_component_layers.md.BtuRSWO9.js similarity index 86% rename from docs/document/assets/en_component_layers.md.B0OnEPFl.js rename to docs/document/assets/en_component_layers.md.BtuRSWO9.js index c22fcbda6..d2fefa6fc 100644 --- a/docs/document/assets/en_component_layers.md.B0OnEPFl.js +++ b/docs/document/assets/en_component_layers.md.BtuRSWO9.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const A=JSON.parse('{"title":"Layer","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/layers.md","filePath":"en/component/layers.md","lastUpdated":1700976201000}'),p={name:"en/component/layers.md"},h=s('

Layer ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique name of the component, used for marking class name
indexNumberComponent index, used for display priority
htmlString, ElementThe DOM element of the component
styleObjectStyle object for the component
clickFunctionClick event for the component
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component

Creation ​

',4),e=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js
var img = '/assets/sample/layer.png';
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"Layer","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/layers.md","filePath":"en/component/layers.md","lastUpdated":1700976201000}'),h={name:"en/component/layers.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Layer ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique name of the component, used for marking class name
indexNumberComponent index, used for display priority
htmlString, ElementThe DOM element of the component
styleObjectStyle object for the component
clickFunctionClick event for the component
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component

Creation ​

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -23,7 +23,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 // Get the Element of layer by name
-console.info(art.layers['poster']);

Add ​

`,2),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s(`
js
var img = '/assets/sample/layer.png';
+console.info(art.layers['poster']);

Add ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -47,7 +47,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 // Get the Element of layer by name
-console.info(art.layers['poster']);

Delete ​

`,2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var img = '/assets/sample/layer.png';
+console.info(art.layers['poster']);

Delete ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -69,7 +69,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         // Delete the layer by name
         art.layers.remove('poster');
     }, 3000);
-});

Update ​

`,2),g=i("div",{className:"run-code"},"▶ Run Code",-1),c=s(`
js
var img = '/assets/sample/layer.png';
+});

Update ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -99,4 +99,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         });
     }, 3000);
-});
`,1),y=[h,e,t,k,E,r,d,g,c];function o(b,F,u,m,C,_){return l(),n("div",null,y)}const D=a(p,[["render",o]]);export{A as __pageData,D as default}; +});
`,1)]))}const y=n(h,[["render",e]]);export{c as __pageData,y as default}; diff --git a/docs/document/assets/en_component_layers.md.BtuRSWO9.lean.js b/docs/document/assets/en_component_layers.md.BtuRSWO9.lean.js new file mode 100644 index 000000000..1515f347e --- /dev/null +++ b/docs/document/assets/en_component_layers.md.BtuRSWO9.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"Layer","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/layers.md","filePath":"en/component/layers.md","lastUpdated":1700976201000}'),h={name:"en/component/layers.md"};function e(t,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(h,[["render",e]]);export{c as __pageData,y as default}; diff --git a/docs/document/assets/en_component_setting.md.DzbjefWf.js b/docs/document/assets/en_component_setting.md.DHxmIQKF.js similarity index 82% rename from docs/document/assets/en_component_setting.md.DzbjefWf.js rename to docs/document/assets/en_component_setting.md.DHxmIQKF.js index f82719d0b..3f2cc2674 100644 --- a/docs/document/assets/en_component_setting.md.DzbjefWf.js +++ b/docs/document/assets/en_component_setting.md.DHxmIQKF.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const w=JSON.parse('{"title":"Settings Panel","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/setting.md","filePath":"en/component/setting.md","lastUpdated":1729412494000}'),p={name:"en/component/setting.md"},t=s('

Settings Panel ​

Built-in ​

First, open the settings panel, and then it comes with four built-in items: flip, playbackRate, aspectRatio, subtitleOffset

',3),e=i("div",{className:"run-code"},"▶ Run Code",-1),h=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"Settings Panel","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/setting.md","filePath":"en/component/setting.md","lastUpdated":1745114138000}'),t={name:"en/component/setting.md"};function e(h,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s('

Settings Panel ​

Built-in ​

First, open the settings panel, and then it comes with four built-in items: flip, playbackRate, aspectRatio, subtitleOffset

',3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -6,7 +6,22 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     playbackRate: true,
     aspectRatio: true,
     subtitleOffset: true,
-});

Create - Selection List ​

PropertyTypeDescription
htmlString, ElementItem DOM
iconString, ElementItem Icon
selectorArrayItem selector
onSelectFunctionClick event
widthNumberList Width
tooltipStringTooltip text
`,3),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s(`
js
var art = new Artplayer({
+});

Create - Button ​

PropertyTypeDescription
htmlString, ElementItem DOM
iconString, ElementItem Icon
onClickFunctionClick event
widthNumberList Width
tooltipStringTooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+    setting: true,
+    settings: [
+        {
+            html: 'Button',
+            icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
+            tooltip: 'tooltip',
+			onClick(item, $dom, event) {
+                console.info(item, $dom, event);
+				return 'new tooltip'
+			}
+        },
+    ],
+});

Create - Selection List ​

PropertyTypeDescription
htmlString, ElementItem DOM
iconString, ElementItem Icon
selectorArrayItem selector
onSelectFunctionClick event
widthNumberList Width
tooltipStringTooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -58,7 +73,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

Creating - Nested Lists ​

`,2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s(`
js
var art = new Artplayer({
+});

Creating - Nested Lists ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -101,7 +116,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             ],
         },
     ],
-});

Create - Toggle Button ​

PropertyTypeDescription
htmlString, ElementElement's DOM element
iconString, ElementElement's icon
switchBooleanButton's default state
onSwitchFunctionButton toggle event
tooltipStringTooltip text
`,3),g=i("div",{className:"run-code"},"▶ Run Code",-1),c=s(`
js
var art = new Artplayer({
+});

Create - Toggle Button ​

PropertyTypeDescription
htmlString, ElementElement's DOM element
iconString, ElementElement's icon
switchBooleanButton's default state
onSwitchFunctionButton toggle event
tooltipStringTooltip text
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -124,7 +139,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 const value = range[0];
 const min = range[1];
 const max = range[2];
-const step = range[3];
`,4),y=i("div",{className:"run-code"},"▶ Run Code",-1),b=s(`
js
var art = new Artplayer({
+const step = range[3];
`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -140,7 +155,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

Add ​

`,2),o=i("div",{className:"run-code"},"▶ Run Code",-1),F=s(`
js
var art = new Artplayer({
+});

Add ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -153,7 +168,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     tooltip: '5x',
     icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
     range: [5, 1, 10, 1],
-});

Delete ​

`,2),u=i("div",{className:"run-code"},"▶ Run Code",-1),m=s(`
js
var art = new Artplayer({
+});

Delete ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -176,7 +191,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         // Delete the setting by name
         art.setting.remove('slider');
     }, 3000);
-});

Updates ​

`,2),C=i("div",{className:"run-code"},"▶ Run Code",-1),B=s(`
js
var art = new Artplayer({
+});

Updates ​

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -204,4 +219,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             switch: false,
         });
     }, 3000);
-});
`,1),_=[t,e,h,k,E,r,d,g,c,y,b,o,F,u,m,C,B];function A(v,D,S,T,q,f){return l(),n("div",null,_)}const x=a(p,[["render",A]]);export{w as __pageData,x as default}; +});
`,1)]))}const y=n(t,[["render",e]]);export{c as __pageData,y as default}; diff --git a/docs/document/assets/en_component_setting.md.DHxmIQKF.lean.js b/docs/document/assets/en_component_setting.md.DHxmIQKF.lean.js new file mode 100644 index 000000000..5fc26ce77 --- /dev/null +++ b/docs/document/assets/en_component_setting.md.DHxmIQKF.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"Settings Panel","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/setting.md","filePath":"en/component/setting.md","lastUpdated":1745114138000}'),t={name:"en/component/setting.md"};function e(h,a,k,E,r,d){return p(),l("div",null,a[0]||(a[0]=[s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const y=n(t,[["render",e]]);export{c as __pageData,y as default}; diff --git a/docs/document/assets/en_component_setting.md.DzbjefWf.lean.js b/docs/document/assets/en_component_setting.md.DzbjefWf.lean.js deleted file mode 100644 index 5e07286f3..000000000 --- a/docs/document/assets/en_component_setting.md.DzbjefWf.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const w=JSON.parse('{"title":"Settings Panel","description":"","frontmatter":{},"headers":[],"relativePath":"en/component/setting.md","filePath":"en/component/setting.md","lastUpdated":1729412494000}'),p={name:"en/component/setting.md"},t=s("",3),e=i("div",{className:"run-code"},"▶ Run Code",-1),h=s("",3),k=i("div",{className:"run-code"},"▶ Run Code",-1),E=s("",2),r=i("div",{className:"run-code"},"▶ Run Code",-1),d=s("",3),g=i("div",{className:"run-code"},"▶ Run Code",-1),c=s("",4),y=i("div",{className:"run-code"},"▶ Run Code",-1),b=s("",2),o=i("div",{className:"run-code"},"▶ Run Code",-1),F=s("",2),u=i("div",{className:"run-code"},"▶ Run Code",-1),m=s("",2),C=i("div",{className:"run-code"},"▶ Run Code",-1),B=s("",1),_=[t,e,h,k,E,r,d,g,c,y,b,o,F,u,m,C,B];function A(v,D,S,T,q,f){return l(),n("div",null,_)}const x=a(p,[["render",A]]);export{w as __pageData,x as default}; diff --git a/docs/document/assets/en_index.md.DJnDZ3oN.js b/docs/document/assets/en_index.md.C5Q5CphE.js similarity index 87% rename from docs/document/assets/en_index.md.DJnDZ3oN.js rename to docs/document/assets/en_index.md.C5Q5CphE.js index f703571d1..0b5ff2ce7 100644 --- a/docs/document/assets/en_index.md.DJnDZ3oN.js +++ b/docs/document/assets/en_index.md.C5Q5CphE.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y=JSON.parse('{"title":"Installation and Usage","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1718551600000}'),l={name:"en/index.md"},p=n(`

Installation and Usage ​

Installation ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Usage ​

html
<html>
+import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"Installation and Usage","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1718551600000}'),p={name:"en/index.md"};function e(t,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l(`

Installation and Usage ​

Installation ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Usage ​

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -19,7 +19,7 @@ import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y
           });
         </script>
     </body>
-</html>

Warning

The player's size depends on the size of the container container, so your container container must have a size.

You can see more examples of use at the following link

/packages/artplayer-template

Vue.js ​

vue
<template>
+</html>

Warning

The player's size depends on the size of the container container, so your container container must have a size.

You can see more examples of use at the following link

/packages/artplayer-template

Vue.js ​

vue
<template>
   <div ref="artRef"></div>
 </template>
 
@@ -83,7 +83,7 @@ import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y
     },
   },
 };
-</script>

Artplayer Not Responsive:

Modifying option directly in Vue.js will not change the player

React.js ​

jsx
import { useEffect, useRef } from 'react';
+</script>

Artplayer Not Responsive:

Modifying option directly in Vue.js will not change the player

React.js ​

jsx
import { useEffect, useRef } from 'react';
 import Artplayer from 'artplayer';
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -171,4 +171,4 @@ import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

Ancient Browsers ​

The production build of artplayer.js is only compatible with the latest major version of Chrome: last 1 Chrome version

For ancient browsers, you can use the artplayer.legacy.js file, which is compatible up to: IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you need to support even older browsers, please modify the following configuration and then build it yourself:

Build configuration: scripts/build.js

Refer to documentation: browserslist

`,41),e=[p];function t(h,k,r,E,d,c){return a(),i("div",null,e)}const b=s(l,[["render",t]]);export{y as __pageData,b as default}; +const art8 = new Artplayer(option);

Ancient Browsers ​

The production build of artplayer.js is only compatible with the latest major version of Chrome: last 1 Chrome version

For ancient browsers, you can use the artplayer.legacy.js file, which is compatible up to: IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you need to support even older browsers, please modify the following configuration and then build it yourself:

Build configuration: scripts/build.js

Refer to documentation: browserslist

`,41)]))}const g=i(p,[["render",e]]);export{c as __pageData,g as default}; diff --git a/docs/document/assets/en_index.md.C5Q5CphE.lean.js b/docs/document/assets/en_index.md.C5Q5CphE.lean.js new file mode 100644 index 000000000..788ffb218 --- /dev/null +++ b/docs/document/assets/en_index.md.C5Q5CphE.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"Installation and Usage","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1718551600000}'),p={name:"en/index.md"};function e(t,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l("",41)]))}const g=i(p,[["render",e]]);export{c as __pageData,g as default}; diff --git a/docs/document/assets/en_index.md.DJnDZ3oN.lean.js b/docs/document/assets/en_index.md.DJnDZ3oN.lean.js deleted file mode 100644 index 60f81b172..000000000 --- a/docs/document/assets/en_index.md.DJnDZ3oN.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y=JSON.parse('{"title":"Installation and Usage","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1718551600000}'),l={name:"en/index.md"},p=n("",41),e=[p];function t(h,k,r,E,d,c){return a(),i("div",null,e)}const b=s(l,[["render",t]]);export{y as __pageData,b as default}; diff --git a/docs/document/assets/en_start_i18n.md.BI37jYR8.lean.js b/docs/document/assets/en_start_i18n.md.BI37jYR8.lean.js deleted file mode 100644 index 4c2ab3b0b..000000000 --- a/docs/document/assets/en_start_i18n.md.BI37jYR8.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const o=JSON.parse('{"title":"Language Settings","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/i18n.md","filePath":"en/start/i18n.md","lastUpdated":1726497675000}'),l={name:"en/start/i18n.md"},e=n("",14),p=[e];function t(h,r,k,d,E,g){return i(),a("div",null,p)}const y=s(l,[["render",t]]);export{o as __pageData,y as default}; diff --git a/docs/document/assets/en_start_i18n.md.BI37jYR8.js b/docs/document/assets/en_start_i18n.md.DdodGftR.js similarity index 81% rename from docs/document/assets/en_start_i18n.md.BI37jYR8.js rename to docs/document/assets/en_start_i18n.md.DdodGftR.js index a50478440..6af128a71 100644 --- a/docs/document/assets/en_start_i18n.md.BI37jYR8.js +++ b/docs/document/assets/en_start_i18n.md.DdodGftR.js @@ -1,8 +1,8 @@ -import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const o=JSON.parse('{"title":"Language Settings","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/i18n.md","filePath":"en/start/i18n.md","lastUpdated":1726497675000}'),l={name:"en/start/i18n.md"},e=n(`

Language Settings ​

DANGER

Given the increasing number of bundled multilingual packs, starting from version 5.1.0, the core code of artplayer.js will no longer include other languages besides Simplified Chinese and English. You need to import the required languages on your own.

WARNING

When a language cannot be matched, English will be displayed by default. For i18n usage, refer to: artplayer/types/i18n.d.ts

Default Languages ​

The default languages are: en, zh-cn, which do not require manual import.

js
var art = new Artplayer({
+import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Language Settings","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/i18n.md","filePath":"en/start/i18n.md","lastUpdated":1745114138000}'),e={name:"en/start/i18n.md"};function p(t,s,h,r,k,E){return n(),i("div",null,s[0]||(s[0]=[l(`

Language Settings ​

DANGER

Given the increasing number of bundled multilingual packs, starting from version 5.1.0, the core code of artplayer.js will no longer include other languages besides Simplified Chinese and English. You need to import the required languages on your own.

WARNING

When a language cannot be matched, English will be displayed by default. For i18n usage, refer to: artplayer/types/i18n.d.ts

Default Languages ​

The default languages are: en, zh-cn, which do not require manual import.

js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

Importing Languages ​

Language files before packaging are located in: artplayer/src/i18n/*.js. You are welcome to add your language. Packaged language files are located at: artplayer/dist/i18n/*.js

Manually imported languages include: cs, es, fa, fr, id, pl, ru, ar, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
+});

Importing Languages ​

Language files before packaging are located in: artplayer/src/i18n/*.js. You are welcome to add your language. Packaged language files are located at: artplayer/dist/i18n/*.js

js
import id from 'artplayer/dist/i18n/id.js';
 import zhTw from 'artplayer/dist/i18n/zh-tw.js';
 
 var art = new Artplayer({
@@ -49,4 +49,4 @@ import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const o
             Play: 'Your Play'
         },
     },
-});
`,14),p=[e];function t(h,r,k,d,E,g){return i(),a("div",null,p)}const y=s(l,[["render",t]]);export{o as __pageData,y as default}; +});
`,13)]))}const c=a(e,[["render",p]]);export{g as __pageData,c as default}; diff --git a/docs/document/assets/en_start_i18n.md.DdodGftR.lean.js b/docs/document/assets/en_start_i18n.md.DdodGftR.lean.js new file mode 100644 index 000000000..adcec7a24 --- /dev/null +++ b/docs/document/assets/en_start_i18n.md.DdodGftR.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"Language Settings","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/i18n.md","filePath":"en/start/i18n.md","lastUpdated":1745114138000}'),e={name:"en/start/i18n.md"};function p(t,s,h,r,k,E){return n(),i("div",null,s[0]||(s[0]=[l("",13)]))}const c=a(e,[["render",p]]);export{g as __pageData,c as default}; diff --git a/docs/document/assets/en_start_option.md.DLSwtP6A.lean.js b/docs/document/assets/en_start_option.md.DLSwtP6A.lean.js deleted file mode 100644 index 17c11d2b7..000000000 --- a/docs/document/assets/en_start_option.md.DLSwtP6A.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const ki=JSON.parse('{"title":"Basic Options","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/option.md","filePath":"en/start/option.md","lastUpdated":1730001001000}'),l={name:"en/start/option.md"},p=s("",4),t=i("div",{className:"run-code"},"▶ Run Code",-1),h=s("",9),r=i("div",{className:"run-code"},"▶ Run Code",-1),k=s("",2),d=i("div",{className:"run-code"},"▶ Run Code",-1),E=s("",5),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s("",4),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s("",7),u=i("div",{className:"run-code"},"▶ Run Code",-1),b=s("",4),m=i("div",{className:"run-code"},"▶ Run Code",-1),F=s("",4),_=i("div",{className:"run-code"},"▶ Run Code",-1),v=s("",5),C=i("div",{className:"run-code"},"▶ Run Code",-1),A=s("",4),T=i("div",{className:"run-code"},"▶ Run Code",-1),B=s("",6),f=i("div",{className:"run-code"},"▶ Run Code",-1),D=s("",5),S=i("div",{className:"run-code"},"▶ Run Code",-1),w=s("",4),P=i("div",{className:"run-code"},"▶ Run Code",-1),x=s("",4),R=i("div",{className:"run-code"},"▶ Run Code",-1),q=s("",4),V=i("div",{className:"run-code"},"▶ Run Code",-1),j=s("",4),I=i("div",{className:"run-code"},"▶ Run Code",-1),N=s("",4),W=i("div",{className:"run-code"},"▶ Run Code",-1),z=s("",4),O=i("div",{className:"run-code"},"▶ Run Code",-1),M=s("",5),L=i("div",{className:"run-code"},"▶ Run Code",-1),H=s("",4),U=i("div",{className:"run-code"},"▶ Run Code",-1),$=s("",5),Y=i("div",{className:"run-code"},"▶ Run Code",-1),Q=s("",4),J=i("div",{className:"run-code"},"▶ Run Code",-1),G=s("",3),K=i("div",{className:"run-code"},"▶ Run Code",-1),X=s("",4),Z=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s("",4),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s("",4),ns=i("div",{className:"run-code"},"▶ Run Code",-1),es=s("",5),ls=i("div",{className:"run-code"},"▶ Run Code",-1),ps=s("",4),ts=i("div",{className:"run-code"},"▶ Run Code",-1),hs=s("",4),rs=i("div",{className:"run-code"},"▶ Run Code",-1),ks=s("",5),ds=i("div",{className:"run-code"},"▶ Run Code",-1),Es=s("",5),cs=i("div",{className:"run-code"},"▶ Run Code",-1),os=s("",5),gs=i("div",{className:"run-code"},"▶ Run Code",-1),ys=s("",6),us=i("div",{className:"run-code"},"▶ Run Code",-1),bs=s("",5),ms=i("div",{className:"run-code"},"▶ Run Code",-1),Fs=s("",4),_s=i("div",{className:"run-code"},"▶ Run Code",-1),vs=s("",5),Cs=i("div",{className:"run-code"},"▶ Run Code",-1),As=s("",6),Ts=i("div",{className:"run-code"},"▶ Run Code",-1),Bs=s("",4),fs=i("div",{className:"run-code"},"▶ Run Code",-1),Ds=s("",4),Ss=i("div",{className:"run-code"},"▶ Run Code",-1),ws=s("",5),Ps=i("div",{className:"run-code"},"▶ Run Code",-1),xs=s("",6),Rs=i("div",{className:"run-code"},"▶ Run Code",-1),qs=s("",4),Vs=i("div",{className:"run-code"},"▶ Run Code",-1),js=s("",6),Is=i("div",{className:"run-code"},"▶ Run Code",-1),Ns=s("",2),Ws=i("div",{className:"run-code"},"▶ Run Code",-1),zs=s("",5),Os=i("div",{className:"run-code"},"▶ Run Code",-1),Ms=s("",4),Ls=i("div",{className:"run-code"},"▶ Run Code",-1),Hs=s("",4),Us=i("div",{className:"run-code"},"▶ Run Code",-1),$s=s("",5),Ys=i("div",{className:"run-code"},"▶ Run Code",-1),Qs=s("",4),Js=i("div",{className:"run-code"},"▶ Run Code",-1),Gs=s("",4),Ks=i("div",{className:"run-code"},"▶ Run Code",-1),Xs=s("",5),Zs=i("div",{className:"run-code"},"▶ Run Code",-1),si=s("",1),ii=[p,t,h,r,k,d,E,c,o,g,y,u,b,m,F,_,v,C,A,T,B,f,D,S,w,P,x,R,q,V,j,I,N,W,z,O,M,L,H,U,$,Y,Q,J,G,K,X,Z,ss,is,as,ns,es,ls,ps,ts,hs,rs,ks,ds,Es,cs,os,gs,ys,us,bs,ms,Fs,_s,vs,Cs,As,Ts,Bs,fs,Ds,Ss,ws,Ps,xs,Rs,qs,Vs,js,Is,Ns,Ws,zs,Os,Ms,Ls,Hs,Us,$s,Ys,Qs,Js,Gs,Ks,Xs,Zs,si];function ai(ni,ei,li,pi,ti,hi){return e(),n("div",null,ii)}const di=a(l,[["render",ai]]);export{ki as __pageData,di as default}; diff --git a/docs/document/assets/en_start_option.md.DLSwtP6A.js b/docs/document/assets/en_start_option.md.WkjoTmIK.js similarity index 81% rename from docs/document/assets/en_start_option.md.DLSwtP6A.js rename to docs/document/assets/en_start_option.md.WkjoTmIK.js index 01f55d36e..67ee5ba2f 100644 --- a/docs/document/assets/en_start_option.md.DLSwtP6A.js +++ b/docs/document/assets/en_start_option.md.WkjoTmIK.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const ki=JSON.parse('{"title":"Basic Options","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/option.md","filePath":"en/start/option.md","lastUpdated":1730001001000}'),l={name:"en/start/option.md"},p=s('

Basic Options ​

container ​

  • Type: String, Element
  • Default: #artplayer

The DOM container where the player mounts

',4),t=i("div",{className:"run-code"},"▶ Run Code",-1),h=s(`
js
var art = new Artplayer({
+import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const o=JSON.parse('{"title":"Basic Options","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/option.md","filePath":"en/start/option.md","lastUpdated":1742615709000}'),p={name:"en/start/option.md"};function t(h,a,r,k,d,E){return l(),e("div",null,a[0]||(a[0]=[s('

Basic Options ​

container ​

  • Type: String, Element
  • Default: #artplayer

The DOM container where the player mounts

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app', 
     // container: document.querySelector('.artplayer-app'),
     url: '/assets/sample/video.mp4',
@@ -7,20 +7,20 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     height: 300px;
 }

Or use aspect-ratio:

css
.artplayer-app {
     aspect-ratio: 16/9;
-}

Tip

Among all options, only container is mandatory.

url ​

  • Type: String
  • Default: ''

The video source address

`,9),r=i("div",{className:"run-code"},"▶ Run Code",-1),k=s(`
js
var art = new Artplayer({
+}

Tip

Among all options, only container is mandatory.

url ​

  • Type: String
  • Default: ''

The video source address

`,9),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

Sometimes the url is not known so quickly, in which case you can set the url asynchronously.

`,2),d=i("div",{className:"run-code"},"▶ Run Code",-1),E=s(`
js
var art = new Artplayer({
+});

Sometimes the url is not known so quickly, in which case you can set the url asynchronously.

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
 });
 
 setTimeout(() => {
     art.url = '/assets/sample/video.mp4';
-}, 1000);

Note

The default support is for three video file formats: .mp4, .ogg, .webm.

If you need to play other formats such as .m3u8 or .flv, please refer to the Third-party Libraries on the left side.

id ​

  • Type: String
  • Default: ''

The unique identifier of the player, currently used only for remembering playback with autoplayback

`,5),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s(`
js
var art = new Artplayer({
+}, 1000);

Note

The default support is for three video file formats: .mp4, .ogg, .webm.

If you need to play other formats such as .m3u8 or .flv, please refer to the Third-party Libraries on the left side.

id ​

  • Type: String
  • Default: ''

The unique identifier of the player, currently used only for remembering playback with autoplayback

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     id: 'your-url-id',
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

onReady ​

  • Type: Function
  • Default: undefined

The constructor accepts a function as the second argument, which is triggered when the player is successfully initialized and the video is ready to play, similar to the ready event

`,4),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s(`
js
var art = new Artplayer(
+});

onReady ​

  • Type: Function
  • Default: undefined

The constructor accepts a function as the second argument, which is triggered when the player is successfully initialized and the video is ready to play, similar to the ready event

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer(
     {
         container: '.artplayer-app',
         url: '/assets/sample/video.mp4',
@@ -37,87 +37,87 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     art.play();
-});

Warning

The this inside the callback function refers to the player instance, but if an arrow function is used for the callback, this will not point to the player instance.

poster ​

  • Type: String
  • Default: ''

The poster of the video, which only appears when the player is initialized and before it starts playing.

`,7),u=i("div",{className:"run-code"},"▶ Run Code",-1),b=s(`
js
var art = new Artplayer({
+});

Warning

The this inside the callback function refers to the player instance, but if an arrow function is used for the callback, this will not point to the player instance.

poster ​

  • Type: String
  • Default: ''

The poster of the video, which only appears when the player is initialized and before it starts playing.

`,7),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     poster: '/assets/sample/poster.jpg',
-});

theme ​

  • Type: String
  • Default: #f00

Player theme color, currently used for progress bar and highlight elements

`,4),m=i("div",{className:"run-code"},"▶ Run Code",-1),F=s(`
js
var art = new Artplayer({
+});

theme ​

  • Type: String
  • Default: #f00

Player theme color, currently used for progress bar and highlight elements

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     theme: '#ffad00',
-});

volume ​

  • Type: Number
  • Default: 0.7

The default volume of the player

`,4),_=i("div",{className:"run-code"},"▶ Run Code",-1),v=s(`
js
var art = new Artplayer({
+});

volume ​

  • Type: Number
  • Default: 0.7

The default volume of the player

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     volume: 0.5,
-});

Warning

The player will cache the size of the last volume. When the player is initialized next time (such as refreshing the page), it will read this cached value.

isLive ​

  • Type: Boolean
  • Default: false

Use live mode, which will hide the progress bar and playback time

`,5),C=i("div",{className:"run-code"},"▶ Run Code",-1),A=s(`
js
var art = new Artplayer({
+});

Warning

The player will cache the size of the last volume. When the player is initialized next time (such as refreshing the page), it will read this cached value.

isLive ​

  • Type: Boolean
  • Default: false

Use live mode, which will hide the progress bar and playback time

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     isLive: true,
-});

muted ​

  • Type: Boolean
  • Default: false

Whether to mute by default

`,4),T=i("div",{className:"run-code"},"▶ Run Code",-1),B=s(`
js
var art = new Artplayer({
+});

muted ​

  • Type: Boolean
  • Default: false

Whether to mute by default

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
-});

autoplay ​

  • Type: Boolean
  • Default: false

Whether to play automatically

  • Default: false

Autoplay

`,6),f=i("div",{className:"run-code"},"▶ Run Code",-1),D=s(`
js
var art = new Artplayer({
+});

autoplay ​

  • Type: Boolean
  • Default: false

Whether to play automatically

  • Default: false

Autoplay

`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoplay: true,
     muted: true,
-});

Warning

If you want the video to autoplay by default upon entering the page, muted must be set to true. For more information, please read Autoplay Policy Changes

autoSize ​

  • Type: Boolean
  • Default: false

The size of the player will by default fill the entire container, which often results in black bars. This value can automatically adjust the player size to hide the black bars, similar to css's object-fit: cover;

`,5),S=i("div",{className:"run-code"},"▶ Run Code",-1),w=s(`
js
var art = new Artplayer({
+});

Warning

If you want the video to autoplay by default upon entering the page, muted must be set to true. For more information, please read Autoplay Policy Changes

autoSize ​

  • Type: Boolean
  • Default: false

The size of the player will by default fill the entire container, which often results in black bars. This value can automatically adjust the player size to hide the black bars, similar to css's object-fit: cover;

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
-});

autoMini ​

  • Type: Boolean
  • Default: false

Automatically enter mini mode when the player scrolls out of the browser viewport

`,4),P=i("div",{className:"run-code"},"▶ Run Code",-1),x=s(`
js
var art = new Artplayer({
+});

autoMini ​

  • Type: Boolean
  • Default: false

Automatically enter mini mode when the player scrolls out of the browser viewport

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoMini: true,
-});

loop ​

  • Type: Boolean
  • Default: false

Whether to loop the video

`,4),R=i("div",{className:"run-code"},"▶ Run Code",-1),q=s(`
js
var art = new Artplayer({
+});

loop ​

  • Type: Boolean
  • Default: false

Whether to loop the video

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     loop: true,
-});

flip ​

  • Type: Boolean
  • Default: false

Whether to show the video flip feature, currently only available in Settings Panel and Context Menu

`,4),V=i("div",{className:"run-code"},"▶ Run Code",-1),j=s(`
js
var art = new Artplayer({
+});

flip ​

  • Type: Boolean
  • Default: false

Whether to show the video flip feature, currently only available in Settings Panel and Context Menu

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     flip: true,
     setting: true,
-});

playbackRate ​

  • Type: Boolean
  • Default: false

Whether to show the playback speed feature of the video, it will appear in Settings Panel and Context Menu

`,4),I=i("div",{className:"run-code"},"▶ Run Code",-1),N=s(`
js
var art = new Artplayer({
+});

playbackRate ​

  • Type: Boolean
  • Default: false

Whether to show the playback speed feature of the video, it will appear in Settings Panel and Context Menu

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     playbackRate: true,
     setting: true,
-});

aspectRatio ​

  • Type: Boolean
  • Default: false

Displays the video aspect ratio feature, it will appear in the Settings Panel and Context Menu

`,4),W=i("div",{className:"run-code"},"▶ Run Code",-1),z=s(`
js
var art = new Artplayer({
+});

aspectRatio ​

  • Type: Boolean
  • Default: false

Displays the video aspect ratio feature, it will appear in the Settings Panel and Context Menu

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     aspectRatio: true,
     setting: true,
-});

screenshot ​

  • Type: Boolean
  • Default: false

Whether to show the screenshot button, it will appear in the toolbar and context menu Display Screenshot function in the bottom control bar

`,4),O=i("div",{className:"run-code"},"▶ Run Code",-1),M=s(`
js
var art = new Artplayer({
+});

screenshot ​

  • Type: Boolean
  • Default: false

Whether to show the screenshot button, it will appear in the toolbar and context menu Display Screenshot function in the bottom control bar

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     screenshot: true,
-});

Warning

Due to browser security mechanisms, if the video source address and the website are cross-origin, screenshot failure may occur

setting ​

  • Type: Boolean
  • Default: false

Display the toggle button for the Settings Panel in the bottom control bar

`,5),L=i("div",{className:"run-code"},"▶ Run Code",-1),H=s(`
js
var art = new Artplayer({
+});

Warning

Due to browser security mechanisms, if the video source address and the website are cross-origin, screenshot failure may occur

setting ​

  • Type: Boolean
  • Default: false

Display the toggle button for the Settings Panel in the bottom control bar

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
-});

hotkey ​

  • Type: Boolean
  • Default: true

Whether to use hotkeys

`,4),U=i("div",{className:"run-code"},"▶ Run Code",-1),$=s(`
js
var art = new Artplayer({
+});

hotkey ​

  • Type: Boolean
  • Default: true

Whether to use hotkeys

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     hotkey: true,
-});
HotkeyDescription
↑Increase volume
↓Decrease volume
←Fast forward video
→Rewind video
spaceToggle play/pause

Tip

These hotkeys will only work after the player gains focus (such as after clicking on the player).

pip ​

  • Type: Boolean
  • Default: false Show the Picture in Picture switch button on the bottom control bar
`,5),Y=i("div",{className:"run-code"},"▶ Run Code",-1),Q=s(`
js
var art = new Artplayer({
+});
HotkeyDescription
↑Increase volume
↓Decrease volume
←Fast forward video
→Rewind video
spaceToggle play/pause

Tip

These hotkeys will only work after the player gains focus (such as after clicking on the player).

pip ​

  • Type: Boolean
  • Default: false Show the Picture in Picture switch button on the bottom control bar
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     pip: true,
-});

mutex ​

  • Type: Boolean
  • Default: true

If there are multiple players on the page, should only one player be allowed to play at a time

`,4),J=i("div",{className:"run-code"},"▶ Run Code",-1),G=s(`
js
var art = new Artplayer({
+});

mutex ​

  • Type: Boolean
  • Default: true

If there are multiple players on the page, should only one player be allowed to play at a time

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     mutex: true,
-});

fullscreen ​

  • Type: Boolean
  • Default: false Display the Window Fullscreen button on the control bar at the bottom
`,3),K=i("div",{className:"run-code"},"▶ Run Code",-1),X=s(`
js
var art = new Artplayer({
+});

fullscreen ​

  • Type: Boolean
  • Default: false Display the Window Fullscreen button on the control bar at the bottom
`,3),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
-});

fullscreenWeb ​

  • Type: Boolean
  • Default: false

Display the Web Fullscreen button on the control bar at the bottom

`,4),Z=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s(`
js
var art = new Artplayer({
+});

fullscreenWeb ​

  • Type: Boolean
  • Default: false

Display the Web Fullscreen button on the control bar at the bottom

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
-});

subtitleOffset ​

  • Type: Boolean

  • Default: false

Subtitle time offset, the range is [-5s, 5s], appearing in the Settings panel

`,4),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s(`
js
var art = new Artplayer({
+});

subtitleOffset ​

  • Type: Boolean

  • Default: false

Subtitle time offset, the range is [-5s, 5s], appearing in the Settings panel

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitleOffset: true,
@@ -125,22 +125,22 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         url: '/assets/sample/subtitle.srt',
     },
     setting: true,
-});

miniProgressBar ​

  • Type: Boolean
  • Default: false

Mini progress bar, only appears when the player loses focus and is playing

`,4),ns=i("div",{className:"run-code"},"▶ Run Code",-1),es=s(`
js
var art = new Artplayer({
+});

miniProgressBar ​

  • Type: Boolean
  • Default: false

Mini progress bar, only appears when the player loses focus and is playing

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});

useSSR ​

  • Type: Boolean
  • Default: false

Whether to use SSR (Server-Side Rendering) mount mode, useful if you want to pre-render the player's required HTML before the player mounts

You can access the player's required HTML through Artplayer.html

`,5),ls=i("div",{className:"run-code"},"▶ Run Code",-1),ps=s(`
js
var $container = document.querySelector('.artplayer-app');
+});

useSSR ​

  • Type: Boolean
  • Default: false

Whether to use SSR (Server-Side Rendering) mount mode, useful if you want to pre-render the player's required HTML before the player mounts

You can access the player's required HTML through Artplayer.html

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var $container = document.querySelector('.artplayer-app');
 $container.innerHTML = Artplayer.html;
 
 var art = new Artplayer({
     container: $container,
     url: '/assets/sample/video.mp4',
     useSSR: true,
-});

playsInline ​

  • Type: Boolean
  • Default: true

Whether to use playsInline mode on mobile devices

`,4),ts=i("div",{className:"run-code"},"▶ Run Code",-1),hs=s(`
js
var art = new Artplayer({
+});

playsInline ​

  • Type: Boolean
  • Default: true

Whether to use playsInline mode on mobile devices

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     playsInline: true,
-});

layers ​

  • Type: Array
  • Default: []

Initializes custom layers

`,4),rs=i("div",{className:"run-code"},"▶ Run Code",-1),ks=s(`
js
var img = '/assets/sample/layer.png';
+});

layers ​

  • Type: Array
  • Default: []

Initializes custom layers

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -163,7 +163,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

Component Configuration Please refer to the following address:

/component/layers.html

settings ​

  • Type: Array
  • Default: []

Initializes custom settings panel

`,5),ds=i("div",{className:"run-code"},"▶ Run Code",-1),Es=s(`
js
var art = new Artplayer({
+});

Component Configuration Please refer to the following address:

/component/layers.html

settings ​

  • Type: Array
  • Default: []

Initializes custom settings panel

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -197,7 +197,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

Settings Panel Please refer to the following address

/component/setting.html

contextmenu ​

  • Type: Array
  • Default: []

Initialize custom context menu

`,5),cs=i("div",{className:"run-code"},"▶ Run Code",-1),os=s(`
js
var art = new Artplayer({
+});

Settings Panel Please refer to the following address

/component/setting.html

contextmenu ​

  • Type: Array
  • Default: []

Initialize custom context menu

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -209,7 +209,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

Component Configuration Please refer to the following address:

/component/contextmenu.html- Type:

controls ​

  • Type: Array
  • Default: []

Initializes custom bottom control bar

`,5),gs=i("div",{className:"run-code"},"▶ Run Code",-1),ys=s(`
js
var art = new Artplayer({
+});

Component Configuration Please refer to the following address:

/component/contextmenu.html- Type:

controls ​

  • Type: Array
  • Default: []

Initializes custom bottom control bar

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -225,7 +225,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

Component Configuration Refer to the following address:

/component/controls.html

quality ​

  • Type: Array
  • Default: []

Whether to show the quality selection list in the bottom control bar

PropertyTypeDescription
defaultBooleanDefault quality
htmlStringQuality name
urlStringQuality URL
`,6),us=i("div",{className:"run-code"},"▶ Run Code",-1),bs=s(`
js
var art = new Artplayer({
+});

Component Configuration Refer to the following address:

/component/controls.html

quality ​

  • Type: Array
  • Default: []

Whether to show the quality selection list in the bottom control bar

PropertyTypeDescription
defaultBooleanDefault quality
htmlStringQuality name
urlStringQuality URL
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     quality: [
@@ -239,7 +239,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             url: '/assets/sample/video.mp4',
         },
     ],
-});

highlight ​

  • Type: Array
  • Default: []

Show highlight information on the progress bar

PropertyTypeDescription
timeNumberHighlight time (in seconds)
textStringHighlight text
`,5),ms=i("div",{className:"run-code"},"▶ Run Code",-1),Fs=s(`
js
var art = new Artplayer({
+});

highlight ​

  • Type: Array
  • Default: []

Show highlight information on the progress bar

PropertyTypeDescription
timeNumberHighlight time (in seconds)
textStringHighlight text
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     highlight: [
@@ -264,7 +264,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             text: '--终わり--',
         },
     ],
-});

plugins ​

  • Type: Array
  • Default: []

Initialize custom plugins

`,4),_s=i("div",{className:"run-code"},"▶ Run Code",-1),vs=s(`
js
function myPlugin(art) {
+});

plugins ​

  • Type: Array
  • Default: []

Initialize custom plugins

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -279,7 +279,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [myPlugin],
-});

thumbnails ​

  • Type: Object
  • Default: {}

Set thumbnails on the progress bar

PropertyTypeDescription
urlStringThumbnail URL
numberNumberNumber of thumbnails
columnNumberColumns of thumbnails
widthNumberThumbnail width
heightNumberThumbnail height
scaleNumberThumbnail scale
`,5),Cs=i("div",{className:"run-code"},"▶ Run Code",-1),As=s(`
js
var art = new Artplayer({
+});

thumbnails ​

  • Type: Object
  • Default: {}

Set thumbnails on the progress bar

PropertyTypeDescription
urlStringThumbnail URL
numberNumberNumber of thumbnails
columnNumberColumns of thumbnails
widthNumberThumbnail width
heightNumberThumbnail height
scaleNumberThumbnail scale
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     thumbnails: {
@@ -287,7 +287,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         number: 60,
         column: 10,
     },
-});

Online thumbnail generation

artplayer-tool-thumbnail

subtitle ​

  • Type: Object
  • Default: {}

Set the video subtitles, supporting subtitle formats: vtt, srt, ass

PropertyTypeDescription
nameStringSubtitle name
urlStringSubtitle URL
typeStringSubtitle type, options: vtt, srt, ass
styleObjectSubtitle style
encodingStringSubtitle encoding, default utf-8
escapeBooleanWhether to escape html tags, default true
onVttLoadFunctionFunction to modify vtt text
`,6),Ts=i("div",{className:"run-code"},"▶ Run Code",-1),Bs=s(`
js
var art = new Artplayer({
+});

Online thumbnail generation

artplayer-tool-thumbnail

subtitle ​

  • Type: Object
  • Default: {}

Set the video subtitles, supporting subtitle formats: vtt, srt, ass

PropertyTypeDescription
nameStringSubtitle name
urlStringSubtitle URL
typeStringSubtitle type, options: vtt, srt, ass
styleObjectSubtitle style
encodingStringSubtitle encoding, default utf-8
escapeBooleanWhether to escape html tags, default true
onVttLoadFunctionFunction to modify vtt text
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -300,25 +300,25 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             'font-size': '30px',
         },
     },
-});

moreVideoAttr ​

  • Type: Object
  • Default: {'controls': false, 'preload': 'metadata'}

Additional video attributes, these attributes will be directly written into the video element

`,4),fs=i("div",{className:"run-code"},"▶ Run Code",-1),Ds=s(`
js
var art = new Artplayer({
+});

moreVideoAttr ​

  • Type: Object
  • Default: {'controls': false, 'preload': 'metadata'}

Additional video attributes, these attributes will be directly written into the video element

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     moreVideoAttr: {
         'webkit-playsinline': true,
         playsInline: true,
     },
-});

icons ​

  • Type: Object
  • Default: {}

Used to replace default icons, supports Html strings and HTMLElement

`,4),Ss=i("div",{className:"run-code"},"▶ Run Code",-1),ws=s(`
js
var art = new Artplayer({
+});

icons ​

  • Type: Object
  • Default: {}

Used to replace default icons, supports Html strings and HTMLElement

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     icons: {
         loading: '<img src="/assets/img/loading.gif">',
         state: '<img src="/assets/img/state.png">',
     },
-});

Definition of all icons

artplayer/types/icons.d.ts

type ​

  • Type: String
  • Default: ''

Used to specify the format of the video, which is used in conjunction with customType. By default, the video format is the same as the file extension of the video URL (such as .m3u8, .mkv, .ts). However, sometimes the video URL does not have the correct file extension, so it needs to be specifically stated.

`,5),Ps=i("div",{className:"run-code"},"▶ Run Code",-1),xs=s(`
js
var art = new Artplayer({
+});

Definition of all icons

artplayer/types/icons.d.ts

type ​

  • Type: String
  • Default: ''

Used to specify the format of the video, which is used in conjunction with customType. By default, the video format is the same as the file extension of the video URL (such as .m3u8, .mkv, .ts). However, sometimes the video URL does not have the correct file extension, so it needs to be specifically stated.

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.m3u8',
     type: 'm3u8',
-});

Recognition of file extensions

The player can only parse this type of file extension: /assets/sample/video.m3u8

But it cannot parse this type of file extension: /assets/sample/video?type=m3u8

Therefore, if you use customType, it is best to specify type as well

customType ​

  • Type: Object
  • Default: {}

Matches the video's type to delegate the video decoding to a third-party program for processing. The processing function can receive three parameters:

  • video: Video DOM element
  • url: Video address
  • art: Current instance
`,6),Rs=i("div",{className:"run-code"},"▶ Run Code",-1),qs=s(`
js
var art = new Artplayer({
+});

Recognition of file extensions

The player can only parse this type of file extension: /assets/sample/video.m3u8

But it cannot parse this type of file extension: /assets/sample/video?type=m3u8

Therefore, if you use customType, it is best to specify type as well

customType ​

  • Type: Object
  • Default: {}

Matches the video's type to delegate the video decoding to a third-party program for processing. The processing function can receive three parameters:

  • video: Video DOM element
  • url: Video address
  • art: Current instance
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.m3u8',
     customType: {
@@ -326,11 +326,11 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             //
         },
     },
-});

lang ​

  • Type: String
  • Default: navigator.language.toLowerCase()

Default display language, currently supports: en, zh-cn

`,4),Vs=i("div",{className:"run-code"},"▶ Run Code",-1),js=s(`
js
var art = new Artplayer({
+});

lang ​

  • Type: String
  • Default: navigator.language.toLowerCase()

Default display language, currently supports: en, zh-cn

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'en',
-});

More language settings

/start/i18n.html

i18n ​

  • Type: Object
  • Default: {}

Custom i18n configuration, which will be deeply merged with the built-in i18n

Add your language:

`,6),Is=i("div",{className:"run-code"},"▶ Run Code",-1),Ns=s(`
js
var art = new Artplayer({
+});

More language settings

/start/i18n.html

i18n ​

  • Type: Object
  • Default: {}

Custom i18n configuration, which will be deeply merged with the built-in i18n

Add your language:

`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'your-lang',
@@ -339,7 +339,7 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             Play: 'Your Play'
         },
     },
-});

Modifying the existing language

`,2),Ws=i("div",{className:"run-code"},"▶ Run Code",-1),zs=s(`
js
var art = new Artplayer({
+});

Modifying the existing language

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     i18n: {
@@ -350,35 +350,39 @@ import{_ as a,c as n,o as e,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             Play: 'Your Play'
         },
     },
-});

More language settings

/start/i18n.html

lock ​

  • Type: Boolean
  • Default: false

Whether to display a lock button on mobile to hide the bottom control bar

`,5),Os=i("div",{className:"run-code"},"▶ Run Code",-1),Ms=s(`
js
var art = new Artplayer({
+});

More language settings

/start/i18n.html

lock ​

  • Type: Boolean
  • Default: false

Whether to display a lock button on mobile to hide the bottom control bar

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lock: true,
-});

fastForward ​

  • Type: Boolean
  • Default: false

Whether to add fast forward function by long pressing on the video on mobile devices

`,4),Ls=i("div",{className:"run-code"},"▶ Run Code",-1),Hs=s(`
js
var art = new Artplayer({
+});

gesture ​

  • Type: Boolean
  • Default: true

Whether to enable gesture events on video elements on mobile devices

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+    gesture: false,
+});

fastForward ​

  • Type: Boolean
  • Default: false

Whether to add fast forward function by long pressing on the video on mobile devices

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

autoPlayback ​

  • Type: Boolean
  • Default: false

Whether to use the automatic playback feature

`,4),Us=i("div",{className:"run-code"},"▶ Run Code",-1),$s=s(`
js
var art = new Artplayer({
+});

autoPlayback ​

  • Type: Boolean
  • Default: false

Whether to use the automatic playback feature

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     id: 'your-url-id',
     autoPlayback: true,
-});

Warning

Because the player by default uses url as the key to cache the playback progress

But if the url of the same video is different, then you need to use id to identify the unique key of the video

autoOrientation ​

  • Type: Boolean
  • Default: false

Whether to rotate the player on mobile web pages in full screen according to the video size and the viewport dimensions

`,5),Ys=i("div",{className:"run-code"},"▶ Run Code",-1),Qs=s(`
js
var art = new Artplayer({
+});

Warning

Because the player by default uses url as the key to cache the playback progress

But if the url of the same video is different, then you need to use id to identify the unique key of the video

autoOrientation ​

  • Type: Boolean
  • Default: false

Whether to rotate the player on mobile web pages in full screen according to the video size and the viewport dimensions

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoOrientation: true,
-});

airplay ​

  • Type: Boolean
  • Default: false

Whether to display the airplay button, currently only some browsers support this feature

`,4),Js=i("div",{className:"run-code"},"▶ Run Code",-1),Gs=s(`
js
var art = new Artplayer({
+});

airplay ​

  • Type: Boolean
  • Default: false

Whether to display the airplay button, currently only some browsers support this feature

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     airplay: true,
-});

cssVar ​

  • Type: Object
  • Default: {}

Used to change built-in CSS variables

`,4),Ks=i("div",{className:"run-code"},"▶ Run Code",-1),Xs=s(`
js
var art = new Artplayer({
+});

cssVar ​

  • Type: Object
  • Default: {}

Used to change built-in CSS variables

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     cssVar: {
         //
     },
-});

Reference for cssVar syntax

artplayer/types/cssVar.d.ts

proxy ​

  • Type: function
  • Default: undefined

The function can return a third-party HTMLCanvasElement or HTMLVideoElement, for example, it can proxy an existing video DOM element

`,5),Zs=i("div",{className:"run-code"},"▶ Run Code",-1),si=s(`
js
var art = new Artplayer({
+});

Reference for cssVar syntax

artplayer/types/cssVar.d.ts

proxy ​

  • Type: function
  • Default: undefined

The function can return a third-party HTMLCanvasElement or HTMLVideoElement, for example, it can proxy an existing video DOM element

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     proxy: () => document.createElement('video')
-});
`,1),ii=[p,t,h,r,k,d,E,c,o,g,y,u,b,m,F,_,v,C,A,T,B,f,D,S,w,P,x,R,q,V,j,I,N,W,z,O,M,L,H,U,$,Y,Q,J,G,K,X,Z,ss,is,as,ns,es,ls,ps,ts,hs,rs,ks,ds,Es,cs,os,gs,ys,us,bs,ms,Fs,_s,vs,Cs,As,Ts,Bs,fs,Ds,Ss,ws,Ps,xs,Rs,qs,Vs,js,Is,Ns,Ws,zs,Os,Ms,Ls,Hs,Us,$s,Ys,Qs,Js,Gs,Ks,Xs,Zs,si];function ai(ni,ei,li,pi,ti,hi){return e(),n("div",null,ii)}const di=a(l,[["render",ai]]);export{ki as __pageData,di as default}; +});
`,1)]))}const g=n(p,[["render",t]]);export{o as __pageData,g as default}; diff --git a/docs/document/assets/en_start_option.md.WkjoTmIK.lean.js b/docs/document/assets/en_start_option.md.WkjoTmIK.lean.js new file mode 100644 index 000000000..3f81d53fb --- /dev/null +++ b/docs/document/assets/en_start_option.md.WkjoTmIK.lean.js @@ -0,0 +1 @@ +import{_ as n,c as e,o as l,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const o=JSON.parse('{"title":"Basic Options","description":"","frontmatter":{},"headers":[],"relativePath":"en/start/option.md","filePath":"en/start/option.md","lastUpdated":1742615709000}'),p={name:"en/start/option.md"};function t(h,a,r,k,d,E){return l(),e("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",9),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",7),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",3),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const g=n(p,[["render",t]]);export{o as __pageData,g as default}; diff --git a/docs/document/assets/index.md.13DkGx_-.lean.js b/docs/document/assets/index.md.13DkGx_-.lean.js deleted file mode 100644 index 4d7912a9d..000000000 --- a/docs/document/assets/index.md.13DkGx_-.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1718551600000}'),l={name:"index.md"},p=n("",41),e=[p];function t(h,k,r,E,d,c){return a(),i("div",null,e)}const b=s(l,[["render",t]]);export{y as __pageData,b as default}; diff --git a/docs/document/assets/index.md.13DkGx_-.js b/docs/document/assets/index.md.D3g3xAoX.js similarity index 85% rename from docs/document/assets/index.md.13DkGx_-.js rename to docs/document/assets/index.md.D3g3xAoX.js index 6a2955f7e..47529b36d 100644 --- a/docs/document/assets/index.md.13DkGx_-.js +++ b/docs/document/assets/index.md.D3g3xAoX.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1718551600000}'),l={name:"index.md"},p=n(`

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

html
<html>
+import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1718551600000}'),p={name:"index.md"};function e(t,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l(`

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -19,7 +19,7 @@ import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y
           });
         </script>
     </body>
-</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/packages/artplayer-template

Vue.js ​

vue
<template>
+</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/packages/artplayer-template

Vue.js ​

vue
<template>
   <div ref="artRef"></div>
 </template>
 
@@ -55,7 +55,7 @@ import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y
   },
 };
 </script>
vue
<template>
-  <Artplayer @get-instance="getInstance" :option="option" :style="style" />
+  <Artplayer @get-instance="getInstance" :option="option" :style="style" />
 </template>
 
 <script>
@@ -83,7 +83,7 @@ import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y
     },
   },
 };
-</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import { useEffect, useRef } from 'react';
+</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import { useEffect, useRef } from 'react';
 import Artplayer from 'artplayer';
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -171,4 +171,4 @@ import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

`,41),e=[p];function t(h,k,r,E,d,c){return a(),i("div",null,e)}const b=s(l,[["render",t]]);export{y as __pageData,b as default}; +const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

`,41)]))}const g=i(p,[["render",e]]);export{c as __pageData,g as default}; diff --git a/docs/document/assets/index.md.D3g3xAoX.lean.js b/docs/document/assets/index.md.D3g3xAoX.lean.js new file mode 100644 index 000000000..71475b048 --- /dev/null +++ b/docs/document/assets/index.md.D3g3xAoX.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ak as l}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1718551600000}'),p={name:"index.md"};function e(t,s,h,k,r,E){return n(),a("div",null,s[0]||(s[0]=[l("",41)]))}const g=i(p,[["render",e]]);export{c as __pageData,g as default}; diff --git a/docs/document/assets/plugin_danmuku.md.2scAzaGY.lean.js b/docs/document/assets/plugin_danmuku.md.2scAzaGY.lean.js deleted file mode 100644 index df7cc95ba..000000000 --- a/docs/document/assets/plugin_danmuku.md.2scAzaGY.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const L=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1734270991000}'),p={name:"plugin/danmuku.md"},h=s("",18),e=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),k=s("",2),t=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),r=s("",3),E=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),d=s("",2),g=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),c=s("",3),y=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),u=s("",3),b=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),F=s("",3),m=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),o=s("",3),C=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),B=s("",3),A=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),D=s("",3),_=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),v=s("",3),f=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),P=s("",3),x=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),T=s("",2),S=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),q=s("",1),j=[h,e,k,t,r,E,d,g,c,y,u,b,F,m,o,C,B,A,D,_,v,f,P,x,T,S,q];function w(V,I,N,R,$,M){return l(),n("div",null,j)}const H=a(p,[["render",w]]);export{L as __pageData,H as default}; diff --git a/docs/document/assets/plugin_danmuku.md.2scAzaGY.js b/docs/document/assets/plugin_danmuku.md.DbxWAnMR.js similarity index 85% rename from docs/document/assets/plugin_danmuku.md.2scAzaGY.js rename to docs/document/assets/plugin_danmuku.md.DbxWAnMR.js index ddd49244c..38649a5e9 100644 --- a/docs/document/assets/plugin_danmuku.md.2scAzaGY.js +++ b/docs/document/assets/plugin_danmuku.md.DbxWAnMR.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const L=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1734270991000}'),p={name:"plugin/danmuku.md"},h=s(`

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

弹幕结构 ​

每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数

js
{
+import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1734270991000}'),h={name:"plugin/danmuku.md"};function e(k,a,t,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s(`

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

弹幕结构 ​

每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数

js
{
     text: '', // 弹幕文本
     time: 10, // 弹幕时间, 默认为当前播放器时间
     mode: 0, // 弹幕模式: 0: 滚动(默认),1: 顶部,2: 底部
@@ -33,7 +33,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     MARGIN: {}, // 显示区域配置项
     SPEED: {}, // 弹幕速度配置项
     COLOR: [], // 颜色列表配置项
-}

生命周期 ​

来自用户输入的弹幕:

beforeEmit -> filter -> beforeVisible -> artplayerPluginDanmuku:visible

来自服务器的弹幕:

filter -> beforeVisible -> artplayerPluginDanmuku:visible

`,18),e=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),k=s(`
js
// 保存到数据库
+}

生命周期 ​

来自用户输入的弹幕:

beforeEmit -> filter -> beforeVisible -> artplayerPluginDanmuku:visible

来自服务器的弹幕:

filter -> beforeVisible -> artplayerPluginDanmuku:visible

`,18),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
// 保存到数据库
 function saveDanmu(danmu) {
     return new Promise(resolve => {
         setTimeout(() => {
@@ -79,7 +79,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 // 弹幕已经出现在播放器里,你可以访问到弹幕的dom元素里
 art.on('artplayerPluginDanmuku:visible', danmu => {
     danmu.$ref.innerHTML = 'ଘ(੭ˊᵕˋ)੭: ' + danmu.$ref.innerHTML;
-})

使用弹幕数组 ​

`,2),t=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),r=s(`
js
var art = new Artplayer({
+})

使用弹幕数组 ​

`,2),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -92,7 +92,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             ],
         }),
     ],
-});

使用弹幕 XML ​

弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致

`,3),E=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),d=s(`
js
var art = new Artplayer({
+});

使用弹幕 XML ​

弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -100,7 +100,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             danmuku: '/assets/sample/danmuku.xml',
         }),
     ],
-});

使用异步返回 ​

`,2),g=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),c=s(`
js
var art = new Artplayer({
+});

使用异步返回 ​

`,2),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -117,7 +117,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         }),
     ],
-});

hide/show ​

通过方法 hide 和 show 进行隐藏或者显示弹幕

`,3),y=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),u=s(`
js
var art = new Artplayer({
+});

hide/show ​

通过方法 hide 和 show 进行隐藏或者显示弹幕

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -141,7 +141,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

isHide ​

通过属性 isHide 判断当前弹幕是隐藏或者显示

`,3),b=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),F=s(`
js
var art = new Artplayer({
+});

isHide ​

通过属性 isHide 判断当前弹幕是隐藏或者显示

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -164,7 +164,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

emit ​

通过方法 emit 发送一条实时弹幕

`,3),m=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),o=s(`
js
var art = new Artplayer({
+});

emit ​

通过方法 emit 发送一条实时弹幕

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -188,7 +188,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

config ​

通过方法 config 实时改变弹幕配置

`,3),C=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),B=s(`
js
var art = new Artplayer({
+});

config ​

通过方法 config 实时改变弹幕配置

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -214,7 +214,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

load ​

通过 load 方法可以重载弹幕库,或者切换新弹幕库,或者追加新的弹幕库

`,3),A=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),D=s(`
js
var art = new Artplayer({
+});

load ​

通过 load 方法可以重载弹幕库,或者切换新弹幕库,或者追加新的弹幕库

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -253,7 +253,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

reset ​

用于清空当前显示的弹幕

`,3),_=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),v=s(`
js
var art = new Artplayer({
+});

reset ​

用于清空当前显示的弹幕

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -265,7 +265,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('resize', () => {
     art.plugins.artplayerPluginDanmuku.reset();
-});

mount ​

在初始化弹幕插件的时候,是可以指定弹幕发射器的挂载位置的,默认是挂载在控制栏的中部,你也可以把它挂载在播放器以外的地方。 当播放器全屏的时候,发射器会自动回到控制栏的中部。假如你挂载的地方是亮色的话,建议把 theme 设置成 light,否则会看不清。

`,3),f=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),P=s(`
js
var $danmu = document.querySelector('.artplayer-app');
+});

mount ​

在初始化弹幕插件的时候,是可以指定弹幕发射器的挂载位置的,默认是挂载在控制栏的中部,你也可以把它挂载在播放器以外的地方。 当播放器全屏的时候,发射器会自动回到控制栏的中部。假如你挂载的地方是亮色的话,建议把 theme 设置成 light,否则会看不清。

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var $danmu = document.querySelector('.artplayer-app');
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -281,7 +281,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 });
 
 // 也可以手动挂载
-// art.plugins.artplayerPluginDanmuku.mount($danmu);

option ​

用于获取当前弹幕配置

`,3),x=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),T=s(`
js
var art = new Artplayer({
+// art.plugins.artplayerPluginDanmuku.mount($danmu);

option ​

用于获取当前弹幕配置

`,3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -293,7 +293,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     console.info(art.plugins.artplayerPluginDanmuku.option);
-});

事件 ​

`,2),S=i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),q=s(`
js
var art = new Artplayer({
+});

事件 ​

`,2),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [
@@ -341,4 +341,4 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('artplayerPluginDanmuku:destroy', () => {
     console.info('弹幕销毁');
-});
`,1),j=[h,e,k,t,r,E,d,g,c,y,u,b,F,m,o,C,B,A,D,_,v,f,P,x,T,S,q];function w(V,I,N,R,$,M){return l(),n("div",null,j)}const H=a(p,[["render",w]]);export{L as __pageData,H as default}; +});
`,1)]))}const c=n(h,[["render",e]]);export{y as __pageData,c as default}; diff --git a/docs/document/assets/plugin_danmuku.md.DbxWAnMR.lean.js b/docs/document/assets/plugin_danmuku.md.DbxWAnMR.lean.js new file mode 100644 index 000000000..6020615e3 --- /dev/null +++ b/docs/document/assets/plugin_danmuku.md.DbxWAnMR.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as p,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const y=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1734270991000}'),h={name:"plugin/danmuku.md"};function e(k,a,t,r,E,d){return p(),l("div",null,a[0]||(a[0]=[s("",18),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",2),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",2),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",3),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",2),i("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),s("",1)]))}const c=n(h,[["render",e]]);export{y as __pageData,c as default}; diff --git a/docs/document/assets/start_i18n.md.MhBE-9Zy.lean.js b/docs/document/assets/start_i18n.md.MhBE-9Zy.lean.js deleted file mode 100644 index 3330b23c4..000000000 --- a/docs/document/assets/start_i18n.md.MhBE-9Zy.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y=JSON.parse('{"title":"语言设置","description":"","frontmatter":{},"headers":[],"relativePath":"start/i18n.md","filePath":"start/i18n.md","lastUpdated":1726497675000}'),l={name:"start/i18n.md"},p=n("",15),e=[p];function h(t,k,r,E,d,c){return i(),a("div",null,e)}const b=s(l,[["render",h]]);export{y as __pageData,b as default}; diff --git a/docs/document/assets/start_i18n.md.MhBE-9Zy.js b/docs/document/assets/start_i18n.md.pF9oCBr8.js similarity index 82% rename from docs/document/assets/start_i18n.md.MhBE-9Zy.js rename to docs/document/assets/start_i18n.md.pF9oCBr8.js index b9bf1a775..2ac32a2ce 100644 --- a/docs/document/assets/start_i18n.md.MhBE-9Zy.js +++ b/docs/document/assets/start_i18n.md.pF9oCBr8.js @@ -1,8 +1,8 @@ -import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y=JSON.parse('{"title":"语言设置","description":"","frontmatter":{},"headers":[],"relativePath":"start/i18n.md","filePath":"start/i18n.md","lastUpdated":1726497675000}'),l={name:"start/i18n.md"},p=n(`

语言设置 ​

DANGER

鉴于捆绑的多国语言越来越多, 从 5.1.0 版本开始, artplayer.js 核心代码除了包含 简体中文 和 英文 外, 不再捆绑其它多国语言, 需要自行导入需要的语言。

WARNING

当无法匹配到语言时, 会默认显示英文, i18n 写法参考: artplayer/types/i18n.d.ts

默认语言 ​

默认语言有: en, zh-cn, 无需手动导入

js
var art = new Artplayer({
+import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"语言设置","description":"","frontmatter":{},"headers":[],"relativePath":"start/i18n.md","filePath":"start/i18n.md","lastUpdated":1745114138000}'),p={name:"start/i18n.md"};function e(h,s,t,k,r,E){return n(),i("div",null,s[0]||(s[0]=[l(`

语言设置 ​

DANGER

鉴于捆绑的多国语言越来越多, 从 5.1.0 版本开始, artplayer.js 核心代码除了包含 简体中文 和 英文 外, 不再捆绑其它多国语言, 需要自行导入需要的语言。

WARNING

当无法匹配到语言时, 会默认显示英文, i18n 写法参考: artplayer/types/i18n.d.ts

默认语言 ​

默认语言有: en, zh-cn, 无需手动导入

js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

手动导入的语言有: cs, es, fa, fr, id, pl, ru, ar, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
+});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

js
import id from 'artplayer/dist/i18n/id.js';
 import zhTw from 'artplayer/dist/i18n/zh-tw.js';
 
 var art = new Artplayer({
@@ -49,4 +49,4 @@ import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.DHbvjPBJ.js";const y
             Play: 'Your Play'
         },
     },
-});
`,15),e=[p];function h(t,k,r,E,d,c){return i(),a("div",null,e)}const b=s(l,[["render",h]]);export{y as __pageData,b as default}; +});
`,14)]))}const g=a(p,[["render",e]]);export{c as __pageData,g as default}; diff --git a/docs/document/assets/start_i18n.md.pF9oCBr8.lean.js b/docs/document/assets/start_i18n.md.pF9oCBr8.lean.js new file mode 100644 index 000000000..000a7e6bb --- /dev/null +++ b/docs/document/assets/start_i18n.md.pF9oCBr8.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as n,ak as l}from"./chunks/framework.CIzAx-5p.js";const c=JSON.parse('{"title":"语言设置","description":"","frontmatter":{},"headers":[],"relativePath":"start/i18n.md","filePath":"start/i18n.md","lastUpdated":1745114138000}'),p={name:"start/i18n.md"};function e(h,s,t,k,r,E){return n(),i("div",null,s[0]||(s[0]=[l("",14)]))}const g=a(p,[["render",e]]);export{c as __pageData,g as default}; diff --git a/docs/document/assets/start_option.md.Cxa3QDj_.lean.js b/docs/document/assets/start_option.md.Cxa3QDj_.lean.js deleted file mode 100644 index ebf2f0751..000000000 --- a/docs/document/assets/start_option.md.Cxa3QDj_.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const ri=JSON.parse('{"title":"基础选项","description":"","frontmatter":{},"headers":[],"relativePath":"start/option.md","filePath":"start/option.md","lastUpdated":1730001001000}'),e={name:"start/option.md"},p=s("",4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s("",9),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s("",2),d=i("div",{className:"run-code"},"▶ Run Code",-1),E=s("",5),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s("",4),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s("",7),u=i("div",{className:"run-code"},"▶ Run Code",-1),b=s("",4),m=i("div",{className:"run-code"},"▶ Run Code",-1),F=s("",4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s("",5),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s("",4),T=i("div",{className:"run-code"},"▶ Run Code",-1),B=s("",4),D=i("div",{className:"run-code"},"▶ Run Code",-1),f=s("",5),S=i("div",{className:"run-code"},"▶ Run Code",-1),P=s("",4),x=i("div",{className:"run-code"},"▶ Run Code",-1),w=s("",4),V=i("div",{className:"run-code"},"▶ Run Code",-1),j=s("",4),R=i("div",{className:"run-code"},"▶ Run Code",-1),q=s("",4),N=i("div",{className:"run-code"},"▶ Run Code",-1),I=s("",4),O=i("div",{className:"run-code"},"▶ Run Code",-1),z=s("",4),L=i("div",{className:"run-code"},"▶ Run Code",-1),M=s("",5),H=i("div",{className:"run-code"},"▶ Run Code",-1),$=s("",4),Y=i("div",{className:"run-code"},"▶ Run Code",-1),W=s("",6),J=i("div",{className:"run-code"},"▶ Run Code",-1),U=s("",4),G=i("div",{className:"run-code"},"▶ Run Code",-1),K=s("",4),Q=i("div",{className:"run-code"},"▶ Run Code",-1),X=s("",4),Z=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s("",4),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s("",4),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s("",5),es=i("div",{className:"run-code"},"▶ Run Code",-1),ps=s("",4),hs=i("div",{className:"run-code"},"▶ Run Code",-1),ts=s("",4),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s("",5),ds=i("div",{className:"run-code"},"▶ Run Code",-1),Es=s("",5),cs=i("div",{className:"run-code"},"▶ Run Code",-1),os=s("",5),gs=i("div",{className:"run-code"},"▶ Run Code",-1),ys=s("",6),us=i("div",{className:"run-code"},"▶ Run Code",-1),bs=s("",5),ms=i("div",{className:"run-code"},"▶ Run Code",-1),Fs=s("",4),_s=i("div",{className:"run-code"},"▶ Run Code",-1),Cs=s("",5),vs=i("div",{className:"run-code"},"▶ Run Code",-1),As=s("",6),Ts=i("div",{className:"run-code"},"▶ Run Code",-1),Bs=s("",4),Ds=i("div",{className:"run-code"},"▶ Run Code",-1),fs=s("",4),Ss=i("div",{className:"run-code"},"▶ Run Code",-1),Ps=s("",5),xs=i("div",{className:"run-code"},"▶ Run Code",-1),ws=s("",6),Vs=i("div",{className:"run-code"},"▶ Run Code",-1),js=s("",4),Rs=i("div",{className:"run-code"},"▶ Run Code",-1),qs=s("",6),Ns=i("div",{className:"run-code"},"▶ Run Code",-1),Is=s("",2),Os=i("div",{className:"run-code"},"▶ Run Code",-1),zs=s("",5),Ls=i("div",{className:"run-code"},"▶ Run Code",-1),Ms=s("",4),Hs=i("div",{className:"run-code"},"▶ Run Code",-1),$s=s("",4),Ys=i("div",{className:"run-code"},"▶ Run Code",-1),Ws=s("",5),Js=i("div",{className:"run-code"},"▶ Run Code",-1),Us=s("",4),Gs=i("div",{className:"run-code"},"▶ Run Code",-1),Ks=s("",4),Qs=i("div",{className:"run-code"},"▶ Run Code",-1),Xs=s("",5),Zs=i("div",{className:"run-code"},"▶ Run Code",-1),si=s("",1),ii=[p,h,t,k,r,d,E,c,o,g,y,u,b,m,F,_,C,v,A,T,B,D,f,S,P,x,w,V,j,R,q,N,I,O,z,L,M,H,$,Y,W,J,U,G,K,Q,X,Z,ss,is,as,ns,ls,es,ps,hs,ts,ks,rs,ds,Es,cs,os,gs,ys,us,bs,ms,Fs,_s,Cs,vs,As,Ts,Bs,Ds,fs,Ss,Ps,xs,ws,Vs,js,Rs,qs,Ns,Is,Os,zs,Ls,Ms,Hs,$s,Ys,Ws,Js,Us,Gs,Ks,Qs,Xs,Zs,si];function ai(ni,li,ei,pi,hi,ti){return l(),n("div",null,ii)}const di=a(e,[["render",ai]]);export{ri as __pageData,di as default}; diff --git a/docs/document/assets/start_option.md.Cxa3QDj_.js b/docs/document/assets/start_option.md.VVl3BaRC.js similarity index 83% rename from docs/document/assets/start_option.md.Cxa3QDj_.js rename to docs/document/assets/start_option.md.VVl3BaRC.js index d215d9484..5538a9126 100644 --- a/docs/document/assets/start_option.md.Cxa3QDj_.js +++ b/docs/document/assets/start_option.md.VVl3BaRC.js @@ -1,4 +1,4 @@ -import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";const ri=JSON.parse('{"title":"基础选项","description":"","frontmatter":{},"headers":[],"relativePath":"start/option.md","filePath":"start/option.md","lastUpdated":1730001001000}'),e={name:"start/option.md"},p=s('

基础选项 ​

container ​

  • Type: String, Element
  • Default: #artplayer

播放器挂载的 DOM 容器

',4),h=i("div",{className:"run-code"},"▶ Run Code",-1),t=s(`
js
var art = new Artplayer({
+import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"基础选项","description":"","frontmatter":{},"headers":[],"relativePath":"start/option.md","filePath":"start/option.md","lastUpdated":1742615709000}'),p={name:"start/option.md"};function h(t,a,k,r,d,E){return e(),l("div",null,a[0]||(a[0]=[s('

基础选项 ​

container ​

  • Type: String, Element
  • Default: #artplayer

播放器挂载的 DOM 容器

',4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app', 
     // container: document.querySelector('.artplayer-app'),
     url: '/assets/sample/video.mp4',
@@ -7,20 +7,20 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     height: 300px;
 }

或者使用 aspect-ratio:

css
.artplayer-app {
     aspect-ratio: 16/9;
-}

提示

全部选项里,只有 container 是必填的

url ​

  • Type: String
  • Default: ''

视频源地址

`,9),k=i("div",{className:"run-code"},"▶ Run Code",-1),r=s(`
js
var art = new Artplayer({
+}

提示

全部选项里,只有 container 是必填的

url ​

  • Type: String
  • Default: ''

视频源地址

`,9),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

有时候 url 地址没那么快知道,这时候你可以异步设置 url

`,2),d=i("div",{className:"run-code"},"▶ Run Code",-1),E=s(`
js
var art = new Artplayer({
+});

有时候 url 地址没那么快知道,这时候你可以异步设置 url

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
 });
 
 setTimeout(() => {
     art.url = '/assets/sample/video.mp4';
-}, 1000);

提示

默认支持三种视频文件格式:.mp4, .ogg, .webm

如需要播放 .m3u8 或者 .flv 等其它格式,请参考左侧的 第三方库

id ​

  • Type: String
  • Default: ''

播放器的唯一标识,目前只用于记忆播放 autoplayback

`,5),c=i("div",{className:"run-code"},"▶ Run Code",-1),o=s(`
js
var art = new Artplayer({
+}, 1000);

提示

默认支持三种视频文件格式:.mp4, .ogg, .webm

如需要播放 .m3u8 或者 .flv 等其它格式,请参考左侧的 第三方库

id ​

  • Type: String
  • Default: ''

播放器的唯一标识,目前只用于记忆播放 autoplayback

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     id: 'your-url-id',
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
-});

onReady ​

  • Type: Function
  • Default: undefined

构造函数接受一个函数作为第二个参数,播放器初始化成功且视频可以播放时触发,和ready事件一样

`,4),g=i("div",{className:"run-code"},"▶ Run Code",-1),y=s(`
js
var art = new Artplayer(
+});

onReady ​

  • Type: Function
  • Default: undefined

构造函数接受一个函数作为第二个参数,播放器初始化成功且视频可以播放时触发,和ready事件一样

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer(
     {
         container: '.artplayer-app',
         url: '/assets/sample/video.mp4',
@@ -37,87 +37,87 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
 
 art.on('ready', () => {
     art.play();
-});

提示

回调函数里的this就是播放器实例,但回调函数假如使用了箭头函数,this则不会指向播放器实例

poster ​

  • Type: String
  • Default: ''

视频的海报,只会出现在播放器初始化且未播放的状态下

`,7),u=i("div",{className:"run-code"},"▶ Run Code",-1),b=s(`
js
var art = new Artplayer({
+});

提示

回调函数里的this就是播放器实例,但回调函数假如使用了箭头函数,this则不会指向播放器实例

poster ​

  • Type: String
  • Default: ''

视频的海报,只会出现在播放器初始化且未播放的状态下

`,7),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     poster: '/assets/sample/poster.jpg',
-});

theme ​

  • Type: String
  • Default: #f00

播放器主题颜色,目前用于 进度条 和 高亮元素 上

`,4),m=i("div",{className:"run-code"},"▶ Run Code",-1),F=s(`
js
var art = new Artplayer({
+});

theme ​

  • Type: String
  • Default: #f00

播放器主题颜色,目前用于 进度条 和 高亮元素 上

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     theme: '#ffad00',
-});

volume ​

  • Type: Number
  • Default: 0.7

播放器的默认音量

`,4),_=i("div",{className:"run-code"},"▶ Run Code",-1),C=s(`
js
var art = new Artplayer({
+});

volume ​

  • Type: Number
  • Default: 0.7

播放器的默认音量

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     volume: 0.5,
-});

提示

播放器会缓存最后一次音量的大小,下次初始化时(如刷新页面)播放器会读取该缓存值

isLive ​

  • Type: Boolean
  • Default: false

使用直播模式,会隐藏进度条和播放时间

`,5),v=i("div",{className:"run-code"},"▶ Run Code",-1),A=s(`
js
var art = new Artplayer({
+});

提示

播放器会缓存最后一次音量的大小,下次初始化时(如刷新页面)播放器会读取该缓存值

isLive ​

  • Type: Boolean
  • Default: false

使用直播模式,会隐藏进度条和播放时间

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     isLive: true,
-});

muted ​

  • Type: Boolean
  • Default: false

是否默认静音

`,4),T=i("div",{className:"run-code"},"▶ Run Code",-1),B=s(`
js
var art = new Artplayer({
+});

muted ​

  • Type: Boolean
  • Default: false

是否默认静音

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     muted: true,
-});

autoplay ​

  • Type: Boolean
  • Default: false

是否自动播放

`,4),D=i("div",{className:"run-code"},"▶ Run Code",-1),f=s(`
js
var art = new Artplayer({
+});

autoplay ​

  • Type: Boolean
  • Default: false

是否自动播放

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoplay: true,
     muted: true,
-});

提示

假如希望默认进入页面就能自动播放视频,muted 必需为 true,更多信息请阅读 Autoplay Policy Changes

autoSize ​

  • Type: Boolean
  • Default: false

播放器的尺寸默认会填充整个 container 容器尺寸,所以经常出现黑边,该值能自动调整播放器尺寸以隐藏黑边,类似 css 的 object-fit: cover;

`,5),S=i("div",{className:"run-code"},"▶ Run Code",-1),P=s(`
js
var art = new Artplayer({
+});

提示

假如希望默认进入页面就能自动播放视频,muted 必需为 true,更多信息请阅读 Autoplay Policy Changes

autoSize ​

  • Type: Boolean
  • Default: false

播放器的尺寸默认会填充整个 container 容器尺寸,所以经常出现黑边,该值能自动调整播放器尺寸以隐藏黑边,类似 css 的 object-fit: cover;

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
-});

autoMini ​

  • Type: Boolean
  • Default: false

当播放器滚动到浏览器视口以外时,自动进入 迷你播放 模式

`,4),x=i("div",{className:"run-code"},"▶ Run Code",-1),w=s(`
js
var art = new Artplayer({
+});

autoMini ​

  • Type: Boolean
  • Default: false

当播放器滚动到浏览器视口以外时,自动进入 迷你播放 模式

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoMini: true,
-});

loop ​

  • Type: Boolean
  • Default: false

是否循环播放

`,4),V=i("div",{className:"run-code"},"▶ Run Code",-1),j=s(`
js
var art = new Artplayer({
+});

loop ​

  • Type: Boolean
  • Default: false

是否循环播放

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     loop: true,
-});

flip ​

  • Type: Boolean
  • Default: false

是否显示视频翻转功能,目前只出现在 设置面板 和 右键菜单 里

`,4),R=i("div",{className:"run-code"},"▶ Run Code",-1),q=s(`
js
var art = new Artplayer({
+});

flip ​

  • Type: Boolean
  • Default: false

是否显示视频翻转功能,目前只出现在 设置面板 和 右键菜单 里

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     flip: true,
     setting: true,
-});

playbackRate ​

  • Type: Boolean
  • Default: false

是否显示视频播放速度功能,会出现在 设置面板 和 右键菜单 里

`,4),N=i("div",{className:"run-code"},"▶ Run Code",-1),I=s(`
js
var art = new Artplayer({
+});

playbackRate ​

  • Type: Boolean
  • Default: false

是否显示视频播放速度功能,会出现在 设置面板 和 右键菜单 里

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     playbackRate: true,
     setting: true,
-});

aspectRatio ​

  • Type: Boolean
  • Default: false

是否显示视频长宽比功能,会出现在 设置面板 和 右键菜单 里

`,4),O=i("div",{className:"run-code"},"▶ Run Code",-1),z=s(`
js
var art = new Artplayer({
+});

aspectRatio ​

  • Type: Boolean
  • Default: false

是否显示视频长宽比功能,会出现在 设置面板 和 右键菜单 里

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     aspectRatio: true,
     setting: true,
-});

screenshot ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示 视频截图 功能

`,4),L=i("div",{className:"run-code"},"▶ Run Code",-1),M=s(`
js
var art = new Artplayer({
+});

screenshot ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示 视频截图 功能

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     screenshot: true,
-});

提示

由于浏览器安全机制,假如视频源地址和网站是跨域的,可能会出现截图失败

setting ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示 设置面板 的开关按钮

`,5),H=i("div",{className:"run-code"},"▶ Run Code",-1),$=s(`
js
var art = new Artplayer({
+});

提示

由于浏览器安全机制,假如视频源地址和网站是跨域的,可能会出现截图失败

setting ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示 设置面板 的开关按钮

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
-});

hotkey ​

  • Type: Boolean
  • Default: true

是否使用快捷键

`,4),Y=i("div",{className:"run-code"},"▶ Run Code",-1),W=s(`
js
var art = new Artplayer({
+});

hotkey ​

  • Type: Boolean
  • Default: true

是否使用快捷键

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     hotkey: true,
-});
热键描述
↑增加音量
↓降低音量
←视频快进
→视频快退
space切换播放/暂停

提示

只在播放器获得焦点后(如点击了播放器后),这些快捷键才会生效

pip ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示 画中画 的开关按钮

`,6),J=i("div",{className:"run-code"},"▶ Run Code",-1),U=s(`
js
var art = new Artplayer({
+});
热键描述
↑增加音量
↓降低音量
←视频快进
→视频快退
space切换播放/暂停

提示

只在播放器获得焦点后(如点击了播放器后),这些快捷键才会生效

pip ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示 画中画 的开关按钮

`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     pip: true,
-});

mutex ​

  • Type: Boolean
  • Default: true

假如页面里同时存在多个播放器,是否只能让一个播放器播放

`,4),G=i("div",{className:"run-code"},"▶ Run Code",-1),K=s(`
js
var art = new Artplayer({
+});

mutex ​

  • Type: Boolean
  • Default: true

假如页面里同时存在多个播放器,是否只能让一个播放器播放

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     mutex: true,
-});

fullscreen ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示播放器 窗口全屏 按钮

`,4),Q=i("div",{className:"run-code"},"▶ Run Code",-1),X=s(`
js
var art = new Artplayer({
+});

fullscreen ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示播放器 窗口全屏 按钮

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
-});

fullscreenWeb ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示播放器 网页全屏 按钮

`,4),Z=i("div",{className:"run-code"},"▶ Run Code",-1),ss=s(`
js
var art = new Artplayer({
+});

fullscreenWeb ​

  • Type: Boolean
  • Default: false

是否在底部控制栏里显示播放器 网页全屏 按钮

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreenWeb: true,
-});

subtitleOffset ​

  • Type: Boolean
  • Default: false

字幕时间偏移,范围在 [-5s, 5s],出现在 设置面板 里

`,4),is=i("div",{className:"run-code"},"▶ Run Code",-1),as=s(`
js
var art = new Artplayer({
+});

subtitleOffset ​

  • Type: Boolean
  • Default: false

字幕时间偏移,范围在 [-5s, 5s],出现在 设置面板 里

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitleOffset: true,
@@ -125,22 +125,22 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         url: '/assets/sample/subtitle.srt',
     },
     setting: true,
-});

miniProgressBar ​

  • Type: Boolean
  • Default: false

迷你进度条,只在播放器失去焦点后且正在播放时出现

`,4),ns=i("div",{className:"run-code"},"▶ Run Code",-1),ls=s(`
js
var art = new Artplayer({
+});

miniProgressBar ​

  • Type: Boolean
  • Default: false

迷你进度条,只在播放器失去焦点后且正在播放时出现

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});

useSSR ​

  • Type: Boolean
  • Default: false

是否使用 SSR 挂载模式,假如你希望在播放器挂载前,就提前渲染好播放器所需的 HTML 时有用

你可以通过 Artplayer.html 访问到播放器所需的 HTML

`,5),es=i("div",{className:"run-code"},"▶ Run Code",-1),ps=s(`
js
var $container = document.querySelector('.artplayer-app');
+});

useSSR ​

  • Type: Boolean
  • Default: false

是否使用 SSR 挂载模式,假如你希望在播放器挂载前,就提前渲染好播放器所需的 HTML 时有用

你可以通过 Artplayer.html 访问到播放器所需的 HTML

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var $container = document.querySelector('.artplayer-app');
 $container.innerHTML = Artplayer.html;
 
 var art = new Artplayer({
     container: $container,
     url: '/assets/sample/video.mp4',
     useSSR: true,
-});

playsInline ​

  • Type: Boolean
  • Default: true

在移动端是否使用 playsInline 模式

`,4),hs=i("div",{className:"run-code"},"▶ Run Code",-1),ts=s(`
js
var art = new Artplayer({
+});

playsInline ​

  • Type: Boolean
  • Default: true

在移动端是否使用 playsInline 模式

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     playsInline: true,
-});

layers ​

  • Type: Array
  • Default: []

初始化自定义的 层

`,4),ks=i("div",{className:"run-code"},"▶ Run Code",-1),rs=s(`
js
var img = '/assets/sample/layer.png';
+});

layers ​

  • Type: Array
  • Default: []

初始化自定义的 层

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -163,7 +163,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

组件配置 请参考以下地址:

/component/layers.html

settings ​

  • Type: Array
  • Default: []

初始化自定义的 设置面板

`,5),ds=i("div",{className:"run-code"},"▶ Run Code",-1),Es=s(`
js
var art = new Artplayer({
+});

组件配置 请参考以下地址:

/component/layers.html

settings ​

  • Type: Array
  • Default: []

初始化自定义的 设置面板

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -197,7 +197,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

设置面板 请参考以下地址

/component/setting.html

contextmenu ​

  • Type: Array
  • Default: []

初始化自定义的 右键菜单

`,5),cs=i("div",{className:"run-code"},"▶ Run Code",-1),os=s(`
js
var art = new Artplayer({
+});

设置面板 请参考以下地址

/component/setting.html

contextmenu ​

  • Type: Array
  • Default: []

初始化自定义的 右键菜单

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -209,7 +209,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

组件配置 请参考以下地址:

/component/contextmenu.html- Type:

controls ​

  • Type: Array
  • Default: []

初始化自定义的底部 控制栏

`,5),gs=i("div",{className:"run-code"},"▶ Run Code",-1),ys=s(`
js
var art = new Artplayer({
+});

组件配置 请参考以下地址:

/component/contextmenu.html- Type:

controls ​

  • Type: Array
  • Default: []

初始化自定义的底部 控制栏

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -225,7 +225,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             },
         },
     ],
-});

组件配置 请参考以下地址:

/component/controls.html

quality ​

  • Type: Array
  • Default: []

是否在底部控制栏里显示 画质选择 列表

属性类型描述
defaultBoolean默认画质
htmlString画质名字
urlString画质地址
`,6),us=i("div",{className:"run-code"},"▶ Run Code",-1),bs=s(`
js
var art = new Artplayer({
+});

组件配置 请参考以下地址:

/component/controls.html

quality ​

  • Type: Array
  • Default: []

是否在底部控制栏里显示 画质选择 列表

属性类型描述
defaultBoolean默认画质
htmlString画质名字
urlString画质地址
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     quality: [
@@ -239,7 +239,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             url: '/assets/sample/video.mp4',
         },
     ],
-});

highlight ​

  • Type: Array
  • Default: []

在进度条上显示 高亮信息

属性类型描述
timeNumber高亮时间(单位秒)
textString高亮文本
`,5),ms=i("div",{className:"run-code"},"▶ Run Code",-1),Fs=s(`
js
var art = new Artplayer({
+});

highlight ​

  • Type: Array
  • Default: []

在进度条上显示 高亮信息

属性类型描述
timeNumber高亮时间(单位秒)
textString高亮文本
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     highlight: [
@@ -264,7 +264,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             text: '--终わり--',
         },
     ],
-});

plugins ​

  • Type: Array
  • Default: []

初始化自定义的 插件

`,4),_s=i("div",{className:"run-code"},"▶ Run Code",-1),Cs=s(`
js
function myPlugin(art) {
+});

plugins ​

  • Type: Array
  • Default: []

初始化自定义的 插件

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -279,7 +279,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     plugins: [myPlugin],
-});

thumbnails ​

  • Type: Object
  • Default: {}

在进度条上设置 预览图

属性类型描述
urlString预览图地址
numberNumber预览图数量
columnNumber预览图列数
widthNumber预览图宽度
heightNumber预览图高度
scaleNumber预览图缩放
`,5),vs=i("div",{className:"run-code"},"▶ Run Code",-1),As=s(`
js
var art = new Artplayer({
+});

thumbnails ​

  • Type: Object
  • Default: {}

在进度条上设置 预览图

属性类型描述
urlString预览图地址
numberNumber预览图数量
columnNumber预览图列数
widthNumber预览图宽度
heightNumber预览图高度
scaleNumber预览图缩放
`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     thumbnails: {
@@ -287,7 +287,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
         number: 60,
         column: 10,
     },
-});

在线生成预览图

artplayer-tool-thumbnail

subtitle ​

  • Type: Object
  • Default: {}

设置视频的字幕,支持字幕格式:vtt, srt, ass

属性类型描述
nameString字幕名字
urlString字幕地址
typeString字幕类型,可选 vtt, srt, ass
styleObject字幕样式
encodingString字幕编码,默认 utf-8
escapeBoolean是否转义 html 标签,默认为 true
onVttLoadFunction用于修改 vtt 文本的函数
`,6),Ts=i("div",{className:"run-code"},"▶ Run Code",-1),Bs=s(`
js
var art = new Artplayer({
+});

在线生成预览图

artplayer-tool-thumbnail

subtitle ​

  • Type: Object
  • Default: {}

设置视频的字幕,支持字幕格式:vtt, srt, ass

属性类型描述
nameString字幕名字
urlString字幕地址
typeString字幕类型,可选 vtt, srt, ass
styleObject字幕样式
encodingString字幕编码,默认 utf-8
escapeBoolean是否转义 html 标签,默认为 true
onVttLoadFunction用于修改 vtt 文本的函数
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     subtitle: {
@@ -300,25 +300,25 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             'font-size': '30px',
         },
     },
-});

moreVideoAttr ​

  • Type: Object
  • Default: {'controls': false,'preload': 'metadata'}

更多视频属性,这些属性将直接写入视频元素里

`,4),Ds=i("div",{className:"run-code"},"▶ Run Code",-1),fs=s(`
js
var art = new Artplayer({
+});

moreVideoAttr ​

  • Type: Object
  • Default: {'controls': false,'preload': 'metadata'}

更多视频属性,这些属性将直接写入视频元素里

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     moreVideoAttr: {
         'webkit-playsinline': true,
         playsInline: true,
     },
-});

icons ​

  • Type: Object
  • Default: {}

用于替换默认图标,支持 Html 字符串和 HTMLElement

`,4),Ss=i("div",{className:"run-code"},"▶ Run Code",-1),Ps=s(`
js
var art = new Artplayer({
+});

icons ​

  • Type: Object
  • Default: {}

用于替换默认图标,支持 Html 字符串和 HTMLElement

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     icons: {
         loading: '<img src="/assets/img/ploading.gif">',
         state: '<img src="/assets/img/state.png">',
     },
-});

全部图标的定义

artplayer/types/icons.d.ts

type ​

  • Type: String
  • Default: ''

用于指明视频的格式,需要配合 customType 一起使用,默认视频的格式就是视频地址的后缀(如 .m3u8, .mkv, .ts),但有时候视频地地址没有正确的后缀,所以需要特别指明

`,5),xs=i("div",{className:"run-code"},"▶ Run Code",-1),ws=s(`
js
var art = new Artplayer({
+});

全部图标的定义

artplayer/types/icons.d.ts

type ​

  • Type: String
  • Default: ''

用于指明视频的格式,需要配合 customType 一起使用,默认视频的格式就是视频地址的后缀(如 .m3u8, .mkv, .ts),但有时候视频地地址没有正确的后缀,所以需要特别指明

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.m3u8',
     type: 'm3u8',
-});

后缀的识别

播放器只能解析这种后缀:/assets/sample/video.m3u8

但无法解析这种后缀:/assets/sample/video?type=m3u8

所以假如你使用了 customType,最好同时要指明 type

customType ​

  • Type: Object
  • Default: {}

通过视频的 type 进行匹配,把视频解码权交给第三方程序进行处理,处理的函数能接收三个参数

  • video : 视频 DOM 元素
  • url : 视频地址
  • art : 当前实例
`,6),Vs=i("div",{className:"run-code"},"▶ Run Code",-1),js=s(`
js
var art = new Artplayer({
+});

后缀的识别

播放器只能解析这种后缀:/assets/sample/video.m3u8

但无法解析这种后缀:/assets/sample/video?type=m3u8

所以假如你使用了 customType,最好同时要指明 type

customType ​

  • Type: Object
  • Default: {}

通过视频的 type 进行匹配,把视频解码权交给第三方程序进行处理,处理的函数能接收三个参数

  • video : 视频 DOM 元素
  • url : 视频地址
  • art : 当前实例
`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.m3u8',
     customType: {
@@ -326,11 +326,11 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             //
         },
     },
-});

lang ​

  • Type: String
  • Default: navigator.language.toLowerCase()

默认显示语言,目前支持:en, zh-cn

`,4),Rs=i("div",{className:"run-code"},"▶ Run Code",-1),qs=s(`
js
var art = new Artplayer({
+});

lang ​

  • Type: String
  • Default: navigator.language.toLowerCase()

默认显示语言,目前支持:en, zh-cn

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'en',
-});

更多的语言设置

/start/i18n.html

i18n ​

  • Type: Object
  • Default: {}

自定义 i18n 配置,该配置会和自带的 i18n 进行深度合并

新增你的语言:

`,6),Ns=i("div",{className:"run-code"},"▶ Run Code",-1),Is=s(`
js
var art = new Artplayer({
+});

更多的语言设置

/start/i18n.html

i18n ​

  • Type: Object
  • Default: {}

自定义 i18n 配置,该配置会和自带的 i18n 进行深度合并

新增你的语言:

`,6),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'your-lang',
@@ -339,7 +339,7 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             Play: 'Your Play'
         },
     },
-});

修改现有的语言

`,2),Os=i("div",{className:"run-code"},"▶ Run Code",-1),zs=s(`
js
var art = new Artplayer({
+});

修改现有的语言

`,2),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     i18n: {
@@ -350,35 +350,39 @@ import{_ as a,c as n,o as l,a7 as s,j as i}from"./chunks/framework.DHbvjPBJ.js";
             Play: 'Your Play'
         },
     },
-});

更多的语言设置

/start/i18n.html

lock ​

  • Type: Boolean
  • Default: false

是否在移动端显示一个 锁定按钮 ,用于隐藏底部 控制栏

`,5),Ls=i("div",{className:"run-code"},"▶ Run Code",-1),Ms=s(`
js
var art = new Artplayer({
+});

更多的语言设置

/start/i18n.html

lock ​

  • Type: Boolean
  • Default: false

是否在移动端显示一个 锁定按钮 ,用于隐藏底部 控制栏

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lock: true,
-});

fastForward ​

  • Type: Boolean
  • Default: false

是否在移动端添加长按视频快进功能

`,4),Hs=i("div",{className:"run-code"},"▶ Run Code",-1),$s=s(`
js
var art = new Artplayer({
+});

gesture ​

  • Type: Boolean
  • Default: true

是否在移动端启用视频元素上的手势事件

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+    gesture: false,
+});

fastForward ​

  • Type: Boolean
  • Default: false

是否在移动端添加长按视频快进功能

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fastForward: true,
-});

autoPlayback ​

  • Type: Boolean
  • Default: false

是否使用自动 回放功能

`,4),Ys=i("div",{className:"run-code"},"▶ Run Code",-1),Ws=s(`
js
var art = new Artplayer({
+});

autoPlayback ​

  • Type: Boolean
  • Default: false

是否使用自动 回放功能

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     id: 'your-url-id',
     autoPlayback: true,
-});

提示

因为播放器默认使用 url 作为 key 来缓存播放进度的

但假如你的同一个视频的 url 是不同的话,那么你需要使用 id 来标识视频的唯一 key

autoOrientation ​

  • Type: Boolean
  • Default: false

是否在移动端的网页全屏时,根据视频尺寸和视口尺寸,旋转播放器

`,5),Js=i("div",{className:"run-code"},"▶ Run Code",-1),Us=s(`
js
var art = new Artplayer({
+});

提示

因为播放器默认使用 url 作为 key 来缓存播放进度的

但假如你的同一个视频的 url 是不同的话,那么你需要使用 id 来标识视频的唯一 key

autoOrientation ​

  • Type: Boolean
  • Default: false

是否在移动端的网页全屏时,根据视频尺寸和视口尺寸,旋转播放器

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoOrientation: true,
-});

airplay ​

  • Type: Boolean
  • Default: false

是否显示 airplay 按钮,当前只有部分浏览器支持该功能

`,4),Gs=i("div",{className:"run-code"},"▶ Run Code",-1),Ks=s(`
js
var art = new Artplayer({
+});

airplay ​

  • Type: Boolean
  • Default: false

是否显示 airplay 按钮,当前只有部分浏览器支持该功能

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     airplay: true,
-});

cssVar ​

  • Type: Object
  • Default: {}

用于改变内置的css变量

`,4),Qs=i("div",{className:"run-code"},"▶ Run Code",-1),Xs=s(`
js
var art = new Artplayer({
+});

cssVar ​

  • Type: Object
  • Default: {}

用于改变内置的css变量

`,4),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     cssVar: {
         //
     },
-});

proxy ​

  • Type: function
  • Default: undefined

函数可以返回一个第三方的 HTMLCanvasElement 或者 HTMLVideoElement,例如可以代理一个已经存在的 video dom元素

`,5),Zs=i("div",{className:"run-code"},"▶ Run Code",-1),si=s(`
js
var art = new Artplayer({
+});

proxy ​

  • Type: function
  • Default: undefined

函数可以返回一个第三方的 HTMLCanvasElement 或者 HTMLVideoElement,例如可以代理一个已经存在的 video dom元素

`,5),i("div",{className:"run-code"},"▶ Run Code",-1),s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     proxy: () => document.createElement('video')
-});
`,1),ii=[p,h,t,k,r,d,E,c,o,g,y,u,b,m,F,_,C,v,A,T,B,D,f,S,P,x,w,V,j,R,q,N,I,O,z,L,M,H,$,Y,W,J,U,G,K,Q,X,Z,ss,is,as,ns,ls,es,ps,hs,ts,ks,rs,ds,Es,cs,os,gs,ys,us,bs,ms,Fs,_s,Cs,vs,As,Ts,Bs,Ds,fs,Ss,Ps,xs,ws,Vs,js,Rs,qs,Ns,Is,Os,zs,Ls,Ms,Hs,$s,Ys,Ws,Js,Us,Gs,Ks,Qs,Xs,Zs,si];function ai(ni,li,ei,pi,hi,ti){return l(),n("div",null,ii)}const di=a(e,[["render",ai]]);export{ri as __pageData,di as default}; +});
`,1)]))}const o=n(p,[["render",h]]);export{g as __pageData,o as default}; diff --git a/docs/document/assets/start_option.md.VVl3BaRC.lean.js b/docs/document/assets/start_option.md.VVl3BaRC.lean.js new file mode 100644 index 000000000..685e6249c --- /dev/null +++ b/docs/document/assets/start_option.md.VVl3BaRC.lean.js @@ -0,0 +1 @@ +import{_ as n,c as l,o as e,ak as s,j as i}from"./chunks/framework.CIzAx-5p.js";const g=JSON.parse('{"title":"基础选项","description":"","frontmatter":{},"headers":[],"relativePath":"start/option.md","filePath":"start/option.md","lastUpdated":1742615709000}'),p={name:"start/option.md"};function h(t,a,k,r,d,E){return e(),l("div",null,a[0]||(a[0]=[s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",9),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",7),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",6),i("div",{className:"run-code"},"▶ Run Code",-1),s("",2),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",4),i("div",{className:"run-code"},"▶ Run Code",-1),s("",5),i("div",{className:"run-code"},"▶ Run Code",-1),s("",1)]))}const o=n(p,[["render",h]]);export{g as __pageData,o as default}; diff --git a/docs/document/assets/style.BCFi8ev9.css b/docs/document/assets/style.BCFi8ev9.css deleted file mode 100644 index 43615510b..000000000 --- a/docs/document/assets/style.BCFi8ev9.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Heiti SC", "Microsoft YaHei", "DengXian", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.vpi-social-discord{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z'/%3E%3C/svg%3E")}.vpi-social-facebook{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z'/%3E%3C/svg%3E")}.vpi-social-github{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}.vpi-social-instagram{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.874 5.874 0 0 0-2.124 1.388 5.878 5.878 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076.008 8.354-.005 8.764.001 12.023c.007 3.259.021 3.667.083 4.947.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.872 5.872 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063 3.257-.007 3.668-.021 4.947-.082 1.28-.06 2.147-.265 2.91-.563a5.881 5.881 0 0 0 2.123-1.388 5.881 5.881 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.892 5.892 0 0 0-1.387-2.123 5.857 5.857 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0 8.718.008 8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.736 3.736 0 0 1-1.382-.895 3.695 3.695 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.705 3.705 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895.421.42.681.817.9 1.378.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.705 3.705 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079-3.204.007-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008'/%3E%3C/svg%3E")}.vpi-social-linkedin{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E")}.vpi-social-mastodon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E")}.vpi-social-npm{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z'/%3E%3C/svg%3E")}.vpi-social-slack{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E")}.vpi-social-twitter,.vpi-social-x{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E")}.vpi-social-youtube{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s}.vp-doc blockquote>p{margin:0;font-size:16px;color:var(--vp-c-text-2);transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-b2600058]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-b2600058],.VPBackdrop.fade-leave-to[data-v-b2600058]{opacity:0}.VPBackdrop.fade-leave-active[data-v-b2600058]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-b2600058]{display:none}}.NotFound[data-v-93fd8736]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-93fd8736]{padding:96px 32px 168px}}.code[data-v-93fd8736]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-93fd8736]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-93fd8736]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-93fd8736]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-93fd8736]{padding-top:20px}.link[data-v-93fd8736]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-93fd8736]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-da421f78]{position:relative;z-index:1}.nested[data-v-da421f78]{padding-right:16px;padding-left:16px}.outline-link[data-v-da421f78]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-da421f78]:hover,.outline-link.active[data-v-da421f78]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-da421f78]{padding-left:13px}.VPDocAsideOutline[data-v-dfbd9fb8]{display:none}.VPDocAsideOutline.has-outline[data-v-dfbd9fb8]{display:block}.content[data-v-dfbd9fb8]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-dfbd9fb8]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-dfbd9fb8]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-79cae1a0]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-79cae1a0]{flex-grow:1}.VPDocAside[data-v-79cae1a0] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-79cae1a0] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-79cae1a0] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-5be60f87]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-5be60f87]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-0ce50de1]{margin-top:64px}.edit-info[data-v-0ce50de1]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-0ce50de1]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-0ce50de1]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-0ce50de1]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-0ce50de1]{margin-right:8px}.prev-next[data-v-0ce50de1]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-0ce50de1]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-0ce50de1]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-0ce50de1]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-0ce50de1]{margin-left:auto;text-align:right}.desc[data-v-0ce50de1]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-0ce50de1]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-ef3a4dda]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-ef3a4dda]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-ef3a4dda]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-ef3a4dda]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-ef3a4dda]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-ef3a4dda]{display:flex;justify-content:center}.VPDoc .aside[data-v-ef3a4dda]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-ef3a4dda]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-ef3a4dda]{max-width:1104px}}.container[data-v-ef3a4dda]{margin:0 auto;width:100%}.aside[data-v-ef3a4dda]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-ef3a4dda]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-ef3a4dda]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-ef3a4dda]::-webkit-scrollbar{display:none}.aside-curtain[data-v-ef3a4dda]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-ef3a4dda]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-ef3a4dda]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-ef3a4dda]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-ef3a4dda]{order:1;margin:0;min-width:640px}}.content-container[data-v-ef3a4dda]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-ef3a4dda]{max-width:688px}.VPButton[data-v-877bb349]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-877bb349]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-877bb349]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-877bb349]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-877bb349]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-877bb349]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-877bb349]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-877bb349]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-877bb349]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-877bb349]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-877bb349]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-877bb349]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-877bb349]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-4d414b82]{display:none}.dark .VPImage.light[data-v-4d414b82]{display:none}.VPHero[data-v-e244e0a0]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-e244e0a0]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-e244e0a0]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-e244e0a0]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-e244e0a0]{flex-direction:row}}.main[data-v-e244e0a0]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-e244e0a0]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-e244e0a0]{text-align:left}}@media (min-width: 960px){.main[data-v-e244e0a0]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-e244e0a0]{max-width:592px}}.name[data-v-e244e0a0],.text[data-v-e244e0a0]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-e244e0a0],.VPHero.has-image .text[data-v-e244e0a0]{margin:0 auto}.name[data-v-e244e0a0]{color:var(--vp-home-hero-name-color)}.clip[data-v-e244e0a0]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-e244e0a0],.text[data-v-e244e0a0]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-e244e0a0],.text[data-v-e244e0a0]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-e244e0a0],.VPHero.has-image .text[data-v-e244e0a0]{margin:0}}.tagline[data-v-e244e0a0]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-e244e0a0]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-e244e0a0]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-e244e0a0]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-e244e0a0]{margin:0}}.actions[data-v-e244e0a0]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-e244e0a0]{justify-content:center}@media (min-width: 640px){.actions[data-v-e244e0a0]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-e244e0a0]{justify-content:flex-start}}.action[data-v-e244e0a0]{flex-shrink:0;padding:6px}.image[data-v-e244e0a0]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-e244e0a0]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-e244e0a0]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-e244e0a0]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-e244e0a0]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-e244e0a0]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-e244e0a0]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-e244e0a0]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-e244e0a0]{width:320px;height:320px}}[data-v-e244e0a0] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-e244e0a0] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-e244e0a0] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-95001937]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-95001937]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-95001937]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-95001937]>.VPImage{margin-bottom:20px}.icon[data-v-95001937]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-95001937]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-95001937]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-95001937]{padding-top:8px}.link-text-value[data-v-95001937]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-95001937]{margin-left:6px}.VPFeatures[data-v-1da4ff3d]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-1da4ff3d]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-1da4ff3d]{padding:0 64px}}.container[data-v-1da4ff3d]{margin:0 auto;max-width:1152px}.items[data-v-1da4ff3d]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-1da4ff3d]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-1da4ff3d],.item.grid-4[data-v-1da4ff3d],.item.grid-6[data-v-1da4ff3d]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-1da4ff3d],.item.grid-4[data-v-1da4ff3d]{width:50%}.item.grid-3[data-v-1da4ff3d],.item.grid-6[data-v-1da4ff3d]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-1da4ff3d]{width:25%}}.container[data-v-2498cc33]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-2498cc33]{padding:0 48px}}@media (min-width: 960px){.container[data-v-2498cc33]{width:100%;padding:0 64px}}.vp-doc[data-v-2498cc33] .VPHomeSponsors,.vp-doc[data-v-2498cc33] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-2498cc33] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-2498cc33] .VPHomeSponsors a,.vp-doc[data-v-2498cc33] .VPTeamPage a{text-decoration:none}.VPHome[data-v-95a6a92c]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-95a6a92c]{margin-bottom:128px}}.VPContent[data-v-d2aef184]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-d2aef184]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-d2aef184]{margin:0}@media (min-width: 960px){.VPContent[data-v-d2aef184]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-d2aef184]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-d2aef184]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-e3157d6d]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-e3157d6d]{display:none}.VPFooter[data-v-e3157d6d] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-e3157d6d] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-e3157d6d]{padding:32px}}.container[data-v-e3157d6d]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-e3157d6d],.copyright[data-v-e3157d6d]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-d1de893e]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-d1de893e]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-d1de893e]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-d1de893e]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-d1de893e]{color:var(--vp-c-text-1)}.icon[data-v-d1de893e]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-d1de893e]{font-size:14px}.icon[data-v-d1de893e]{font-size:16px}}.open>.icon[data-v-d1de893e]{transform:rotate(90deg)}.items[data-v-d1de893e]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-d1de893e]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-d1de893e]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-d1de893e]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-d1de893e]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-d1de893e]{transition:all .2s ease-out}.flyout-leave-active[data-v-d1de893e]{transition:all .15s ease-in}.flyout-enter-from[data-v-d1de893e],.flyout-leave-to[data-v-d1de893e]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-9d8129cc]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-9d8129cc]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-9d8129cc]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-9d8129cc]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-9d8129cc]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-9d8129cc]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-9d8129cc]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-9d8129cc]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-9d8129cc]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-9d8129cc]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-9d8129cc]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-9d8129cc]{display:none}}.menu-icon[data-v-9d8129cc]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-9d8129cc]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-9d8129cc]{padding:12px 32px 11px}}.VPSwitch[data-v-7012e5dd]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-7012e5dd]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-7012e5dd]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-7012e5dd]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-7012e5dd] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-7012e5dd] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-bfa23729]{opacity:1}.moon[data-v-bfa23729],.dark .sun[data-v-bfa23729]{opacity:0}.dark .moon[data-v-bfa23729]{opacity:1}.dark .VPSwitchAppearance[data-v-bfa23729] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-f774fc1d]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-f774fc1d]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-71c5411b]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-71c5411b]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-71c5411b]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-71c5411b]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-2bec9359]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-2bec9359]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-2bec9359]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-2bec9359]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-7bffa9cd]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-7bffa9cd] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-7bffa9cd] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-7bffa9cd] .group:last-child{padding-bottom:0}.VPMenu[data-v-7bffa9cd] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-7bffa9cd] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-7bffa9cd] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-7bffa9cd] .action{padding-left:24px}.VPFlyout[data-v-8fd20e7d]{position:relative}.VPFlyout[data-v-8fd20e7d]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-8fd20e7d]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-8fd20e7d]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-8fd20e7d]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-8fd20e7d]{color:var(--vp-c-brand-2)}.VPFlyout:hover .menu[data-v-8fd20e7d],.button[aria-expanded=true]+.menu[data-v-8fd20e7d]{opacity:1;visibility:visible;transform:translateY(0)}.button[aria-expanded=false]+.menu[data-v-8fd20e7d]{opacity:0;visibility:hidden;transform:translateY(0)}.button[data-v-8fd20e7d]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-8fd20e7d]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-8fd20e7d]{margin-right:0;font-size:16px}.text-icon[data-v-8fd20e7d]{margin-left:4px;font-size:14px}.icon[data-v-8fd20e7d]{font-size:20px;transition:fill .25s}.menu[data-v-8fd20e7d]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-50151957]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-50151957]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-50151957]>svg,.VPSocialLink[data-v-50151957]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-f2234a39]{display:flex;justify-content:center}.VPNavBarExtra[data-v-ca99dad5]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-ca99dad5]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-ca99dad5]{display:none}}.trans-title[data-v-ca99dad5]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-ca99dad5],.item.social-links[data-v-ca99dad5]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-ca99dad5]{min-width:176px}.appearance-action[data-v-ca99dad5]{margin-right:-2px}.social-links-list[data-v-ca99dad5]{margin:-4px -8px}.VPNavBarHamburger[data-v-670493dd]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-670493dd]{display:none}}.container[data-v-670493dd]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-670493dd]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-670493dd]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-670493dd]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-670493dd]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-670493dd]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-670493dd]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-670493dd],.VPNavBarHamburger.active:hover .middle[data-v-670493dd],.VPNavBarHamburger.active:hover .bottom[data-v-670493dd]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-670493dd],.middle[data-v-670493dd],.bottom[data-v-670493dd]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-670493dd]{top:0;left:0;transform:translate(0)}.middle[data-v-670493dd]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-670493dd]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-2b93b872]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-2b93b872],.VPNavBarMenuLink[data-v-2b93b872]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-c6c3e6d4]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-c6c3e6d4]{display:flex}}.VPPluginSearch-flex-logo{width:80px;margin-left:calc(100% - 90px);padding-bottom:10px}.VPPluginSearch-search-list{padding:1rem;max-height:calc(100vh - 230px);overflow-x:auto}.VPPluginSearch-search-item-icon{font-family:none;align-self:center;padding:0 1rem 0 0;font-size:x-large}.VPPluginSearch-search-list>div{color:var(--vp-c-brand-dark);font-weight:700}.VPPluginSearch-search-item{padding:.25rem 1rem;margin:8px 0 0;border:solid 1px;border-radius:6px;display:flex;border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.VPPluginSearch-search-item p{margin:0;font-size:smaller;color:var(--c-text-light-3)}a.link-focused .VPPluginSearch-search-item,.VPPluginSearch-search-item:hover{color:#fff;background:var(--vp-local-search-highlight-bg)}a.link-focused .VPPluginSearch-search-item,.VPPluginSearch-search-item:hover>p{color:#fff}.VPNavBarSearch{display:flex;align-items:center;padding-left:16px}.DocSearch-MagnifierLabel{margin:16px;color:var(--c-brand-light);stroke-width:2px}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#58565636;border:solid 1px var(--c-brand-light);color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;width:80%;margin:8px;padding:8px;border-radius:6px}.dark .DocSearch-Input{color:var(--vp-c-text-1)}.VPPluginSearch-modal-back{left:0;right:0;top:0;bottom:0;background:#545454b3;position:fixed;z-index:65}.dark .VPPluginSearch-modal{background-color:#242424}.VPPluginSearch-modal{background-color:#f9f9f9;border-radius:6px;box-shadow:none;flex-direction:column;margin:80px auto auto;max-width:560px;position:relative}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}@media (max-width: 768px){.VPPluginSearch-modal{max-width:100%;border-radius:0}}.dark .DocSearch-Form{background-color:var(--vt-c-bg-mute)}.DocSearch-Form{background-color:#fff;border:1px solid var(--vt-c-brand);padding:6px}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Button-Key{align-items:center;background:var(--c-brand-light);border-radius:3px;box-shadow:var(--c-brand);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding-bottom:2px;position:relative;top:-1px;width:20px}body.dark .DocSearch-Button:hover{box-shadow:none}.DocSearch{--docsearch-primary-color: var(--vt-c-brand);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vt-c-text-1);--docsearch-muted-color: #ebebeb99;--docsearch-searchbox-shadow: none;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vt-c-bg-soft);--docsearch-footer-background: var(--vt-c-bg)}.dark .DocSearch{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: #ebebeb99;--docsearch-hit-background: #2f2f2f;--docsearch-hit-color: #ebebeb99;--docsearch-hit-shadow: none}.dark .DocSearch-Footer{border-top:1px solid var(--vt-c-divider)}.DocSearch-Form{background-color:#fff;border:1px solid var(--vt-c-brand)}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;width:48px;height:55px;background:transparent;border:none}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;width:100%}}.DocSearch-MagnifierLabel{color:var(--vp-c-brand-dark)}.DocSearch-Button .DocSearch-Search-Icon{transition:color .5s;fill:currentColor;width:18px;height:18px;position:relative}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:10px;width:15px;height:15px}}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vt-c-text-1)}.DocSearch-Button-Placeholder{transition:color .5s;font-size:13px;font-weight:500;color:#6669;display:none;padding:0 10px 0 0}@media (min-width: 960px){.DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vt-c-text-1)}.DocSearch-Button .DocSearch-Button-Key{margin-top:2px;border:1px solid var(--vt-c-divider);border-right:none;border-radius:4px 0 0 4px;display:none;padding-left:6px;height:22px;line-height:22px;transition:color .5s,border-color .5s;min-width:0}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vt-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button:hover .DocSearch-Button-Key{color:var(--vt-c-brand-light)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Key{display:inline-block}}.DocSearch-Button-Key{font-size:12px;font-weight:500;height:20px;margin:0;width:auto;color:var(--vt-c-text-3);transition:color .5s;display:inline-block;padding:0 1px}.VPPluginSearch-search-group{color:var(--vp-c-brand-1)}.VPNavBarSocialLinks[data-v-08b35e6f]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-08b35e6f]{display:flex;align-items:center}}.title[data-v-dbe614b8]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-dbe614b8]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-dbe614b8]{border-bottom-color:var(--vp-c-divider)}}[data-v-dbe614b8] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-dac637f3]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-dac637f3]{display:flex;align-items:center}}.title[data-v-dac637f3]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-48384a78]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .5s}.VPNavBar[data-v-48384a78]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-48384a78]:not(.home){background-color:transparent}.VPNavBar[data-v-48384a78]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-48384a78]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-48384a78]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-48384a78]{padding:0}}.container[data-v-48384a78]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-48384a78],.container>.content[data-v-48384a78]{pointer-events:none}.container[data-v-48384a78] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-48384a78]{max-width:100%}}.title[data-v-48384a78]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-48384a78]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-48384a78]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-48384a78]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-48384a78]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-48384a78]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-48384a78]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-48384a78]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-48384a78]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-48384a78]{column-gap:.5rem}}.menu+.translations[data-v-48384a78]:before,.menu+.appearance[data-v-48384a78]:before,.menu+.social-links[data-v-48384a78]:before,.translations+.appearance[data-v-48384a78]:before,.appearance+.social-links[data-v-48384a78]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-48384a78]:before,.translations+.appearance[data-v-48384a78]:before{margin-right:16px}.appearance+.social-links[data-v-48384a78]:before{margin-left:16px}.social-links[data-v-48384a78]{margin-right:-8px}.divider[data-v-48384a78]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-48384a78]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-48384a78]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-48384a78]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-48384a78]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-48384a78]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-48384a78]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-2836e9a8]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-2836e9a8]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-077287e8]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-077287e8]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-ed7bb82d]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-ed7bb82d]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-836cddb8]{display:block}.title[data-v-836cddb8]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-43fd4ddf]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-43fd4ddf]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-43fd4ddf]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-43fd4ddf]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-43fd4ddf]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-43fd4ddf]{transform:rotate(45deg)}.button[data-v-43fd4ddf]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-43fd4ddf]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-43fd4ddf]{transition:transform .25s}.group[data-v-43fd4ddf]:first-child{padding-top:0}.group+.group[data-v-43fd4ddf],.group+.item[data-v-43fd4ddf]{padding-top:4px}.VPNavScreenTranslations[data-v-0d43316b]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-0d43316b]{height:auto}.title[data-v-0d43316b]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-0d43316b]{font-size:16px}.icon.lang[data-v-0d43316b]{margin-right:8px}.icon.chevron[data-v-0d43316b]{margin-left:4px}.list[data-v-0d43316b]{padding:4px 0 0 24px}.link[data-v-0d43316b]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-5f4e75ae]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 1px);right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .5s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-5f4e75ae],.VPNavScreen.fade-leave-active[data-v-5f4e75ae]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-5f4e75ae],.VPNavScreen.fade-leave-active .container[data-v-5f4e75ae]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-5f4e75ae],.VPNavScreen.fade-leave-to[data-v-5f4e75ae]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-5f4e75ae],.VPNavScreen.fade-leave-to .container[data-v-5f4e75ae]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-5f4e75ae]{display:none}}.container[data-v-5f4e75ae]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-5f4e75ae],.menu+.appearance[data-v-5f4e75ae],.translations+.appearance[data-v-5f4e75ae]{margin-top:24px}.menu+.social-links[data-v-5f4e75ae]{margin-top:16px}.appearance+.social-links[data-v-5f4e75ae]{margin-top:16px}.VPNav[data-v-a46e73f0]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-a46e73f0]{position:fixed}}.VPSidebarItem.level-0[data-v-f2cc49b6]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-f2cc49b6]{padding-bottom:10px}.item[data-v-f2cc49b6]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-f2cc49b6]{cursor:pointer}.indicator[data-v-f2cc49b6]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-f2cc49b6],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-f2cc49b6],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-f2cc49b6],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-f2cc49b6]{background-color:var(--vp-c-brand-1)}.link[data-v-f2cc49b6]{display:flex;align-items:center;flex-grow:1}.text[data-v-f2cc49b6]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-f2cc49b6]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-f2cc49b6],.VPSidebarItem.level-2 .text[data-v-f2cc49b6],.VPSidebarItem.level-3 .text[data-v-f2cc49b6],.VPSidebarItem.level-4 .text[data-v-f2cc49b6],.VPSidebarItem.level-5 .text[data-v-f2cc49b6]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-f2cc49b6],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-f2cc49b6],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-f2cc49b6],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-f2cc49b6],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-f2cc49b6],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-f2cc49b6]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-f2cc49b6],.VPSidebarItem.level-1.has-active>.item>.text[data-v-f2cc49b6],.VPSidebarItem.level-2.has-active>.item>.text[data-v-f2cc49b6],.VPSidebarItem.level-3.has-active>.item>.text[data-v-f2cc49b6],.VPSidebarItem.level-4.has-active>.item>.text[data-v-f2cc49b6],.VPSidebarItem.level-5.has-active>.item>.text[data-v-f2cc49b6],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-f2cc49b6],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-f2cc49b6],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-f2cc49b6],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-f2cc49b6],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-f2cc49b6],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-f2cc49b6]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-f2cc49b6],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-f2cc49b6],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-f2cc49b6],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-f2cc49b6],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-f2cc49b6],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-f2cc49b6]{color:var(--vp-c-brand-1)}.caret[data-v-f2cc49b6]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-f2cc49b6]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-f2cc49b6]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-f2cc49b6]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-f2cc49b6]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-f2cc49b6],.VPSidebarItem.level-2 .items[data-v-f2cc49b6],.VPSidebarItem.level-3 .items[data-v-f2cc49b6],.VPSidebarItem.level-4 .items[data-v-f2cc49b6],.VPSidebarItem.level-5 .items[data-v-f2cc49b6]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-f2cc49b6]{display:none}.VPSidebar[data-v-2667f5e2]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-2667f5e2]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-2667f5e2]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-2667f5e2]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-2667f5e2]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-2667f5e2]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-2667f5e2]{outline:0}.group+.group[data-v-2667f5e2]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-2667f5e2]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSkipLink[data-v-b22defb4]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-b22defb4]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-b22defb4]{top:14px;left:16px}}.Layout[data-v-c4daae71]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-b272d7e5]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-b272d7e5]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-b272d7e5]{margin:128px 0}}.VPHomeSponsors[data-v-b272d7e5]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-b272d7e5]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-b272d7e5]{padding:0 64px}}.container[data-v-b272d7e5]{margin:0 auto;max-width:1152px}.love[data-v-b272d7e5]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-b272d7e5]{display:inline-block}.message[data-v-b272d7e5]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-b272d7e5]{padding-top:32px}.action[data-v-b272d7e5]{padding-top:40px;text-align:center}.VPTeamPage[data-v-de6c58d7]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-de6c58d7]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-de6c58d7-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-de6c58d7-s],.VPTeamMembers+.VPTeamPageSection[data-v-de6c58d7-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-de6c58d7-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-de6c58d7-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-de6c58d7-s],.VPTeamMembers+.VPTeamPageSection[data-v-de6c58d7-s]{margin-top:96px}}.VPTeamMembers[data-v-de6c58d7-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-de6c58d7-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-de6c58d7-s]{padding:0 64px}}.VPTeamPageTitle[data-v-6ce551d6]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-6ce551d6]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-6ce551d6]{padding:80px 64px 48px}}.title[data-v-6ce551d6]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-6ce551d6]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-6ce551d6]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-6ce551d6]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-1ac32f26]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-1ac32f26]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-1ac32f26]{padding:0 64px}}.title[data-v-1ac32f26]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-1ac32f26]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-1ac32f26]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-1ac32f26]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-1ac32f26]{padding-top:40px}.VPTeamMembersItem[data-v-af8dff8e]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-af8dff8e]{padding:32px}.VPTeamMembersItem.small .data[data-v-af8dff8e]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-af8dff8e]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-af8dff8e]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-af8dff8e]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-af8dff8e]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-af8dff8e]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-af8dff8e]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-af8dff8e]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-af8dff8e]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-af8dff8e]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-af8dff8e]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-af8dff8e]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-af8dff8e]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-af8dff8e]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-af8dff8e]{text-align:center}.avatar[data-v-af8dff8e]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-af8dff8e]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-af8dff8e]{margin:0;font-weight:600}.affiliation[data-v-af8dff8e]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-af8dff8e]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-af8dff8e]:hover{color:var(--vp-c-brand-1)}.desc[data-v-af8dff8e]{margin:0 auto}.desc[data-v-af8dff8e] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-af8dff8e]{display:flex;justify-content:center;height:56px}.sp-link[data-v-af8dff8e]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-af8dff8e]:hover,.sp .sp-link.link[data-v-af8dff8e]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-af8dff8e]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-3ca0e3f5]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-3ca0e3f5]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-3ca0e3f5]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-3ca0e3f5]{max-width:876px}.VPTeamMembers.medium .container[data-v-3ca0e3f5]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-3ca0e3f5]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-3ca0e3f5]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-3ca0e3f5]{max-width:760px}.container[data-v-3ca0e3f5]{display:grid;gap:24px;margin:0 auto;max-width:1152px} diff --git a/docs/document/assets/style.BFaiTuR6.css b/docs/document/assets/style.BFaiTuR6.css new file mode 100644 index 000000000..6fee6e5e0 --- /dev/null +++ b/docs/document/assets/style.BFaiTuR6.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/document/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: #3c3c43;--vp-c-text-2: #67676c;--vp-c-text-3: #929295}.dark{--vp-c-text-1: #dfdfd6;--vp-c-text-2: #98989f;--vp-c-text-3: #6a6a71}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:lang(es),:lang(pt){--vp-code-copy-copied-text-content: "Copiado"}:lang(fa){--vp-code-copy-copied-text-content: "کپی شد"}:lang(ko){--vp-code-copy-copied-text-content: "복사됨"}:lang(ru){--vp-code-copy-copied-text-content: "Скопировано"}:lang(zh){--vp-code-copy-copied-text-content: "已复制"}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc h4{margin:24px 0 0;letter-spacing:-.01em;line-height:24px;font-size:18px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s;color:var(--vp-c-text-2)}.vp-doc blockquote>p{margin:0;font-size:16px;transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code,.vp-doc h4>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;-webkit-user-select:none;user-select:none;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(:is(.no-icon,svg a,:has(img,svg))):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(:is(.no-icon,svg a,:has(img,svg))):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-b2600058]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-b2600058],.VPBackdrop.fade-leave-to[data-v-b2600058]{opacity:0}.VPBackdrop.fade-leave-active[data-v-b2600058]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-b2600058]{display:none}}.NotFound[data-v-93fd8736]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-93fd8736]{padding:96px 32px 168px}}.code[data-v-93fd8736]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-93fd8736]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-93fd8736]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-93fd8736]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-93fd8736]{padding-top:20px}.link[data-v-93fd8736]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-93fd8736]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-da421f78]{position:relative;z-index:1}.nested[data-v-da421f78]{padding-right:16px;padding-left:16px}.outline-link[data-v-da421f78]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-da421f78]:hover,.outline-link.active[data-v-da421f78]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-da421f78]{padding-left:13px}.VPDocAsideOutline[data-v-dfbd9fb8]{display:none}.VPDocAsideOutline.has-outline[data-v-dfbd9fb8]{display:block}.content[data-v-dfbd9fb8]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-dfbd9fb8]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-dfbd9fb8]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-79cae1a0]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-79cae1a0]{flex-grow:1}.VPDocAside[data-v-79cae1a0] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-79cae1a0] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-79cae1a0] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-e95db471]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-e95db471]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-07d71ff1]{margin-top:64px}.edit-info[data-v-07d71ff1]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-07d71ff1]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-07d71ff1]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-07d71ff1]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-07d71ff1]{margin-right:8px}.prev-next[data-v-07d71ff1]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-07d71ff1]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-07d71ff1]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-07d71ff1]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-07d71ff1]{margin-left:auto;text-align:right}.desc[data-v-07d71ff1]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-07d71ff1]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-ef3a4dda]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-ef3a4dda]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-ef3a4dda]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-ef3a4dda]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-ef3a4dda]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-ef3a4dda]{display:flex;justify-content:center}.VPDoc .aside[data-v-ef3a4dda]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-ef3a4dda]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-ef3a4dda]{max-width:1104px}}.container[data-v-ef3a4dda]{margin:0 auto;width:100%}.aside[data-v-ef3a4dda]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-ef3a4dda]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-ef3a4dda]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-ef3a4dda]::-webkit-scrollbar{display:none}.aside-curtain[data-v-ef3a4dda]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-ef3a4dda]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-ef3a4dda]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-ef3a4dda]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-ef3a4dda]{order:1;margin:0;min-width:640px}}.content-container[data-v-ef3a4dda]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-ef3a4dda]{max-width:688px}.VPButton[data-v-b20c43c2]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-b20c43c2]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-b20c43c2]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-b20c43c2]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-b20c43c2]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-b20c43c2]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-b20c43c2]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-b20c43c2]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-b20c43c2]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-b20c43c2]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-b20c43c2]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-b20c43c2]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-b20c43c2]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-4d414b82]{display:none}.dark .VPImage.light[data-v-4d414b82]{display:none}.VPHero[data-v-d266baba]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-d266baba]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-d266baba]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-d266baba]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-d266baba]{flex-direction:row}}.main[data-v-d266baba]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-d266baba]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-d266baba]{text-align:left}}@media (min-width: 960px){.main[data-v-d266baba]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-d266baba]{max-width:592px}}.heading[data-v-d266baba]{display:flex;flex-direction:column}.name[data-v-d266baba],.text[data-v-d266baba]{width:fit-content;max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-d266baba],.VPHero.has-image .text[data-v-d266baba]{margin:0 auto}.name[data-v-d266baba]{color:var(--vp-home-hero-name-color)}.clip[data-v-d266baba]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-d266baba],.text[data-v-d266baba]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-d266baba],.text[data-v-d266baba]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-d266baba],.VPHero.has-image .text[data-v-d266baba]{margin:0}}.tagline[data-v-d266baba]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-d266baba]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-d266baba]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-d266baba]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-d266baba]{margin:0}}.actions[data-v-d266baba]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-d266baba]{justify-content:center}@media (min-width: 640px){.actions[data-v-d266baba]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-d266baba]{justify-content:flex-start}}.action[data-v-d266baba]{flex-shrink:0;padding:6px}.image[data-v-d266baba]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-d266baba]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-d266baba]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-d266baba]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-d266baba]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-d266baba]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-d266baba]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-d266baba]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-d266baba]{width:320px;height:320px}}[data-v-d266baba] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-d266baba] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-d266baba] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-95001937]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-95001937]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-95001937]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-95001937]>.VPImage{margin-bottom:20px}.icon[data-v-95001937]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-95001937]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-95001937]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-95001937]{padding-top:8px}.link-text-value[data-v-95001937]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-95001937]{margin-left:6px}.VPFeatures[data-v-1da4ff3d]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-1da4ff3d]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-1da4ff3d]{padding:0 64px}}.container[data-v-1da4ff3d]{margin:0 auto;max-width:1152px}.items[data-v-1da4ff3d]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-1da4ff3d]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-1da4ff3d],.item.grid-4[data-v-1da4ff3d],.item.grid-6[data-v-1da4ff3d]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-1da4ff3d],.item.grid-4[data-v-1da4ff3d]{width:50%}.item.grid-3[data-v-1da4ff3d],.item.grid-6[data-v-1da4ff3d]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-1da4ff3d]{width:25%}}.container[data-v-2498cc33]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-2498cc33]{padding:0 48px}}@media (min-width: 960px){.container[data-v-2498cc33]{width:100%;padding:0 64px}}.vp-doc[data-v-2498cc33] .VPHomeSponsors,.vp-doc[data-v-2498cc33] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-2498cc33] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-2498cc33] .VPHomeSponsors a,.vp-doc[data-v-2498cc33] .VPTeamPage a{text-decoration:none}.VPHome[data-v-8b59c434]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-8b59c434]{margin-bottom:128px}}.VPContent[data-v-d2aef184]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-d2aef184]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-d2aef184]{margin:0}@media (min-width: 960px){.VPContent[data-v-d2aef184]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-d2aef184]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-d2aef184]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-e3157d6d]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-e3157d6d]{display:none}.VPFooter[data-v-e3157d6d] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-e3157d6d] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-e3157d6d]{padding:32px}}.container[data-v-e3157d6d]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-e3157d6d],.copyright[data-v-e3157d6d]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-d61422fe]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-d61422fe]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-d61422fe]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-d61422fe]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-d61422fe]{color:var(--vp-c-text-1)}.icon[data-v-d61422fe]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-d61422fe]{font-size:14px}.icon[data-v-d61422fe]{font-size:16px}}.open>.icon[data-v-d61422fe]{transform:rotate(90deg)}.items[data-v-d61422fe]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-d61422fe]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-d61422fe]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-d61422fe]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-d61422fe]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-d61422fe]{transition:all .2s ease-out}.flyout-leave-active[data-v-d61422fe]{transition:all .15s ease-in}.flyout-enter-from[data-v-d61422fe],.flyout-leave-to[data-v-d61422fe]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-9d8129cc]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-9d8129cc]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-9d8129cc]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-9d8129cc]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-9d8129cc]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-9d8129cc]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-9d8129cc]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-9d8129cc]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-9d8129cc]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-9d8129cc]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-9d8129cc]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-9d8129cc]{display:none}}.menu-icon[data-v-9d8129cc]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-9d8129cc]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-9d8129cc]{padding:12px 32px 11px}}.VPSwitch[data-v-7012e5dd]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-7012e5dd]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-7012e5dd]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-7012e5dd]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-7012e5dd] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-7012e5dd] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-fa1daf57]{opacity:1}.moon[data-v-fa1daf57],.dark .sun[data-v-fa1daf57]{opacity:0}.dark .moon[data-v-fa1daf57]{opacity:1}.dark .VPSwitchAppearance[data-v-fa1daf57] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-123fcb2f]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-123fcb2f]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-65e4a6b1]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-65e4a6b1]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-65e4a6b1]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-65e4a6b1]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-2bec9359]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-2bec9359]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-2bec9359]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-2bec9359]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-39eca401]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-39eca401] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-39eca401] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-39eca401] .group:last-child{padding-bottom:0}.VPMenu[data-v-39eca401] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-39eca401] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-39eca401] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-39eca401] .action{padding-left:24px}.VPFlyout[data-v-40e55da0]{position:relative}.VPFlyout[data-v-40e55da0]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-40e55da0]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-40e55da0]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-40e55da0]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-40e55da0]{color:var(--vp-c-brand-2)}.button[aria-expanded=false]+.menu[data-v-40e55da0]{opacity:0;visibility:hidden;transform:translateY(0)}.VPFlyout:hover .menu[data-v-40e55da0],.button[aria-expanded=true]+.menu[data-v-40e55da0]{opacity:1;visibility:visible;transform:translateY(0)}.button[data-v-40e55da0]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-40e55da0]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-40e55da0]{margin-right:0;font-size:16px}.text-icon[data-v-40e55da0]{margin-left:4px;font-size:14px}.icon[data-v-40e55da0]{font-size:20px;transition:fill .25s}.menu[data-v-40e55da0]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-fbf39218]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-fbf39218]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-fbf39218]>svg,.VPSocialLink[data-v-fbf39218]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-f2234a39]{display:flex;justify-content:center}.VPNavBarExtra[data-v-0c845e5d]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-0c845e5d]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-0c845e5d]{display:none}}.trans-title[data-v-0c845e5d]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-0c845e5d],.item.social-links[data-v-0c845e5d]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-0c845e5d]{min-width:176px}.appearance-action[data-v-0c845e5d]{margin-right:-2px}.social-links-list[data-v-0c845e5d]{margin:-4px -8px}.VPNavBarHamburger[data-v-670493dd]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-670493dd]{display:none}}.container[data-v-670493dd]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-670493dd]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-670493dd]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-670493dd]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-670493dd]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-670493dd]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-670493dd]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-670493dd],.VPNavBarHamburger.active:hover .middle[data-v-670493dd],.VPNavBarHamburger.active:hover .bottom[data-v-670493dd]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-670493dd],.middle[data-v-670493dd],.bottom[data-v-670493dd]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-670493dd]{top:0;left:0;transform:translate(0)}.middle[data-v-670493dd]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-670493dd]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-8dbce4d0]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-8dbce4d0],.VPNavBarMenuLink[data-v-8dbce4d0]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-5bacfe89]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-5bacfe89]{display:flex}}.VPPluginSearch-flex-logo{width:80px;margin-left:calc(100% - 90px);padding-bottom:10px}.VPPluginSearch-search-list{padding:1rem;max-height:calc(100vh - 230px);overflow-x:auto}.VPPluginSearch-search-item-icon{font-family:none;align-self:center;padding:0 1rem 0 0;font-size:x-large}.VPPluginSearch-search-list>div{color:var(--vp-c-brand-dark);font-weight:700}.VPPluginSearch-search-item{padding:.25rem 1rem;margin:8px 0 0;border:solid 1px;border-radius:6px;display:flex;border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.VPPluginSearch-search-item p{margin:0;font-size:smaller;color:var(--c-text-light-3)}a.link-focused .VPPluginSearch-search-item,.VPPluginSearch-search-item:hover{color:#fff;background:var(--vp-local-search-highlight-bg)}a.link-focused .VPPluginSearch-search-item,.VPPluginSearch-search-item:hover>p{color:#fff}.VPNavBarSearch{display:flex;align-items:center;padding-left:16px}.DocSearch-MagnifierLabel{margin:16px;color:var(--c-brand-light);stroke-width:2px}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#58565636;border:solid 1px var(--c-brand-light);color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;width:80%;margin:8px;padding:8px;border-radius:6px}.dark .DocSearch-Input{color:var(--vp-c-text-1)}.VPPluginSearch-modal-back{left:0;right:0;top:0;bottom:0;background:#545454b3;position:fixed;z-index:65}.dark .VPPluginSearch-modal{background-color:#242424}.VPPluginSearch-modal{background-color:#f9f9f9;border-radius:6px;box-shadow:none;flex-direction:column;margin:80px auto auto;max-width:560px;position:relative}@media (max-width: 768px){.VPPluginSearch-modal{max-width:100%;border-radius:0}}.dark .DocSearch-Form{background-color:var(--vt-c-bg-mute)}.DocSearch-Form{background-color:#fff;border:1px solid var(--vt-c-brand);padding:6px}.DocSearch-Button-Key{align-items:center;background:var(--c-brand-light);border-radius:3px;box-shadow:var(--c-brand);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding-bottom:2px;position:relative;top:-1px;width:20px}body.dark .DocSearch-Button:hover{box-shadow:none}.DocSearch{--docsearch-primary-color: var(--vt-c-brand);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vt-c-text-1);--docsearch-muted-color: #ebebeb99;--docsearch-searchbox-shadow: none;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vt-c-bg-soft);--docsearch-footer-background: var(--vt-c-bg)}.dark .DocSearch{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: #ebebeb99;--docsearch-hit-background: #2f2f2f;--docsearch-hit-color: #ebebeb99;--docsearch-hit-shadow: none}.dark .DocSearch-Footer{border-top:1px solid var(--vt-c-divider)}.DocSearch-Form{background-color:#fff;border:1px solid var(--vt-c-brand)}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;width:48px;height:55px;background:transparent;border:none}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;width:100%}}.DocSearch-MagnifierLabel{color:var(--vp-c-brand-dark)}.DocSearch-Button .DocSearch-Search-Icon{transition:color .5s;fill:currentColor;width:18px;height:18px;position:relative}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:10px;width:15px;height:15px}}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vt-c-text-1)}.DocSearch-Button-Placeholder{transition:color .5s;font-size:13px;font-weight:500;color:#6669;display:none;padding:0 10px 0 0}@media (min-width: 960px){.DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vt-c-text-1)}.DocSearch-Button .DocSearch-Button-Key{margin-top:2px;border:1px solid var(--vt-c-divider);border-right:none;border-radius:4px 0 0 4px;display:none;padding-left:6px;height:22px;line-height:22px;transition:color .5s,border-color .5s;min-width:0}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vt-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button:hover .DocSearch-Button-Key{color:var(--vt-c-brand-light)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Key{display:inline-block}}.DocSearch-Button-Key{font-size:12px;font-weight:500;height:20px;margin:0;width:auto;color:var(--vt-c-text-3);transition:color .5s;display:inline-block;padding:0 1px}.VPPluginSearch-search-group{color:var(--vp-c-brand-1)}.VPNavBarSocialLinks[data-v-08b35e6f]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-08b35e6f]{display:flex;align-items:center}}.title[data-v-5622a072]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-5622a072]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-5622a072]{border-bottom-color:var(--vp-c-divider)}}[data-v-5622a072] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-dac637f3]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-dac637f3]{display:flex;align-items:center}}.title[data-v-dac637f3]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-bb7529ee]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .25s}.VPNavBar.screen-open[data-v-bb7529ee]{transition:none;background-color:var(--vp-nav-bg-color);border-bottom:1px solid var(--vp-c-divider)}.VPNavBar[data-v-bb7529ee]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-bb7529ee]:not(.home){background-color:transparent}.VPNavBar[data-v-bb7529ee]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-bb7529ee]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-bb7529ee]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-bb7529ee]{padding:0}}.container[data-v-bb7529ee]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-bb7529ee],.container>.content[data-v-bb7529ee]{pointer-events:none}.container[data-v-bb7529ee] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-bb7529ee]{max-width:100%}}.title[data-v-bb7529ee]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-bb7529ee]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-bb7529ee]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-bb7529ee]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-bb7529ee]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-bb7529ee]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-bb7529ee]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-bb7529ee]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-bb7529ee]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-bb7529ee]{column-gap:.5rem}}.menu+.translations[data-v-bb7529ee]:before,.menu+.appearance[data-v-bb7529ee]:before,.menu+.social-links[data-v-bb7529ee]:before,.translations+.appearance[data-v-bb7529ee]:before,.appearance+.social-links[data-v-bb7529ee]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-bb7529ee]:before,.translations+.appearance[data-v-bb7529ee]:before{margin-right:16px}.appearance+.social-links[data-v-bb7529ee]:before{margin-left:16px}.social-links[data-v-bb7529ee]{margin-right:-8px}.divider[data-v-bb7529ee]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-bb7529ee]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-bb7529ee]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-bb7529ee]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-bb7529ee]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-bb7529ee]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-bb7529ee]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-774971f8]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-774971f8]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-29871565]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-29871565]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-581896e9]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-581896e9]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-836cddb8]{display:block}.title[data-v-836cddb8]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-a8d3502a]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-a8d3502a]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-a8d3502a]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-a8d3502a]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-a8d3502a]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-a8d3502a]{transform:rotate(45deg)}.button[data-v-a8d3502a]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-a8d3502a]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-a8d3502a]{transition:transform .25s}.group[data-v-a8d3502a]:first-child{padding-top:0}.group+.group[data-v-a8d3502a],.group+.item[data-v-a8d3502a]{padding-top:4px}.VPNavScreenTranslations[data-v-0d43316b]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-0d43316b]{height:auto}.title[data-v-0d43316b]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-0d43316b]{font-size:16px}.icon.lang[data-v-0d43316b]{margin-right:8px}.icon.chevron[data-v-0d43316b]{margin-left:4px}.list[data-v-0d43316b]{padding:4px 0 0 24px}.link[data-v-0d43316b]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-34fa79a7]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px));right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .25s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-34fa79a7],.VPNavScreen.fade-leave-active[data-v-34fa79a7]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-34fa79a7],.VPNavScreen.fade-leave-active .container[data-v-34fa79a7]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-34fa79a7],.VPNavScreen.fade-leave-to[data-v-34fa79a7]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-34fa79a7],.VPNavScreen.fade-leave-to .container[data-v-34fa79a7]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-34fa79a7]{display:none}}.container[data-v-34fa79a7]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-34fa79a7],.menu+.appearance[data-v-34fa79a7],.translations+.appearance[data-v-34fa79a7]{margin-top:24px}.menu+.social-links[data-v-34fa79a7]{margin-top:16px}.appearance+.social-links[data-v-34fa79a7]{margin-top:16px}.VPNav[data-v-a46e73f0]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-a46e73f0]{position:fixed}}.VPSidebarItem.level-0[data-v-2e0476bc]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-2e0476bc]{padding-bottom:10px}.item[data-v-2e0476bc]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-2e0476bc]{cursor:pointer}.indicator[data-v-2e0476bc]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-2e0476bc],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-2e0476bc],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-2e0476bc],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-2e0476bc]{background-color:var(--vp-c-brand-1)}.link[data-v-2e0476bc]{display:flex;align-items:center;flex-grow:1}.text[data-v-2e0476bc]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-2e0476bc]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-2e0476bc],.VPSidebarItem.level-2 .text[data-v-2e0476bc],.VPSidebarItem.level-3 .text[data-v-2e0476bc],.VPSidebarItem.level-4 .text[data-v-2e0476bc],.VPSidebarItem.level-5 .text[data-v-2e0476bc]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-2e0476bc],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-2e0476bc],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-2e0476bc],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-2e0476bc],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-2e0476bc],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-2e0476bc]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-2e0476bc],.VPSidebarItem.level-1.has-active>.item>.text[data-v-2e0476bc],.VPSidebarItem.level-2.has-active>.item>.text[data-v-2e0476bc],.VPSidebarItem.level-3.has-active>.item>.text[data-v-2e0476bc],.VPSidebarItem.level-4.has-active>.item>.text[data-v-2e0476bc],.VPSidebarItem.level-5.has-active>.item>.text[data-v-2e0476bc],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-2e0476bc],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-2e0476bc],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-2e0476bc],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-2e0476bc],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-2e0476bc],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-2e0476bc]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-2e0476bc],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-2e0476bc],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-2e0476bc],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-2e0476bc],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-2e0476bc],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-2e0476bc]{color:var(--vp-c-brand-1)}.caret[data-v-2e0476bc]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-2e0476bc]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-2e0476bc]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-2e0476bc]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-2e0476bc]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-2e0476bc],.VPSidebarItem.level-2 .items[data-v-2e0476bc],.VPSidebarItem.level-3 .items[data-v-2e0476bc],.VPSidebarItem.level-4 .items[data-v-2e0476bc],.VPSidebarItem.level-5 .items[data-v-2e0476bc]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-2e0476bc]{display:none}.no-transition[data-v-ec086cd5] .caret-icon{transition:none}.group+.group[data-v-ec086cd5]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-ec086cd5]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSidebar[data-v-12a40e3d]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-12a40e3d]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-12a40e3d]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-12a40e3d]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-12a40e3d]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-12a40e3d]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-12a40e3d]{outline:0}.VPSkipLink[data-v-17ad389b]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-17ad389b]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-17ad389b]{top:14px;left:16px}}.Layout[data-v-c4daae71]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-b272d7e5]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-b272d7e5]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-b272d7e5]{margin:128px 0}}.VPHomeSponsors[data-v-b272d7e5]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-b272d7e5]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-b272d7e5]{padding:0 64px}}.container[data-v-b272d7e5]{margin:0 auto;max-width:1152px}.love[data-v-b272d7e5]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-b272d7e5]{display:inline-block}.message[data-v-b272d7e5]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-b272d7e5]{padding-top:32px}.action[data-v-b272d7e5]{padding-top:40px;text-align:center}/*! @docsearch/css 3.8.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow);transform:translate3d(0,1px,0)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPTeamMembersItem[data-v-af8dff8e]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-af8dff8e]{padding:32px}.VPTeamMembersItem.small .data[data-v-af8dff8e]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-af8dff8e]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-af8dff8e]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-af8dff8e]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-af8dff8e]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-af8dff8e]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-af8dff8e]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-af8dff8e]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-af8dff8e]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-af8dff8e]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-af8dff8e]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-af8dff8e]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-af8dff8e]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-af8dff8e]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-af8dff8e]{text-align:center}.avatar[data-v-af8dff8e]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-af8dff8e]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-af8dff8e]{margin:0;font-weight:600}.affiliation[data-v-af8dff8e]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-af8dff8e]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-af8dff8e]:hover{color:var(--vp-c-brand-1)}.desc[data-v-af8dff8e]{margin:0 auto}.desc[data-v-af8dff8e] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-af8dff8e]{display:flex;justify-content:center;height:56px}.sp-link[data-v-af8dff8e]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-af8dff8e]:hover,.sp .sp-link.link[data-v-af8dff8e]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-af8dff8e]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-3ca0e3f5]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-3ca0e3f5]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-3ca0e3f5]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-3ca0e3f5]{max-width:876px}.VPTeamMembers.medium .container[data-v-3ca0e3f5]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-3ca0e3f5]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-3ca0e3f5]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-3ca0e3f5]{max-width:760px}.container[data-v-3ca0e3f5]{display:grid;gap:24px;margin:0 auto;max-width:1152px}.VPTeamPage[data-v-de6c58d7]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-de6c58d7]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-de6c58d7-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-de6c58d7-s],.VPTeamMembers+.VPTeamPageSection[data-v-de6c58d7-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-de6c58d7-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-de6c58d7-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-de6c58d7-s],.VPTeamMembers+.VPTeamPageSection[data-v-de6c58d7-s]{margin-top:96px}}.VPTeamMembers[data-v-de6c58d7-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-de6c58d7-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-de6c58d7-s]{padding:0 64px}}.VPTeamPageSection[data-v-1ac32f26]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-1ac32f26]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-1ac32f26]{padding:0 64px}}.title[data-v-1ac32f26]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-1ac32f26]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-1ac32f26]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-1ac32f26]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-1ac32f26]{padding-top:40px}.VPTeamPageTitle[data-v-6ce551d6]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-6ce551d6]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-6ce551d6]{padding:80px 64px 48px}}.title[data-v-6ce551d6]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-6ce551d6]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-6ce551d6]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-6ce551d6]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}} diff --git a/docs/document/component/contextmenu.html b/docs/document/component/contextmenu.html index f52df6316..96ea99731 100644 --- a/docs/document/component/contextmenu.html +++ b/docs/document/component/contextmenu.html @@ -5,14 +5,15 @@ 右键菜单 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

右键菜单 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本

创建 ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

右键菜单 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本

创建 ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -104,8 +105,8 @@
             html: 'Your New Menu',
         })
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/component/controls.html b/docs/document/component/controls.html index 32080230a..4e87fa446 100644 --- a/docs/document/component/controls.html +++ b/docs/document/component/controls.html @@ -5,14 +5,15 @@ 控制器 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

控制器 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本
positionStringleft 和 right 控制控制器出现的左右位置
selectorArray选择列表的对象数组
onSelectFunction选择列表的元素被点击时触发的函数

创建 ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

控制器 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本
positionStringleft 和 right 控制控制器出现的左右位置
selectorArray选择列表的对象数组
onSelectFunction选择列表的元素被点击时触发的函数

创建 ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -151,8 +152,8 @@
             ],
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/component/layers.html b/docs/document/component/layers.html index ff153ba9e..d6c682a8f 100644 --- a/docs/document/component/layers.html +++ b/docs/document/component/layers.html @@ -5,14 +5,15 @@ 业务层 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

业务层 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本

创建 ​

▶ Run Code
js
var img = '/assets/sample/layer.png';
+    
Skip to content

业务层 ​

配置 ​

属性类型描述
disableBoolean是否禁用组件
nameString组件唯一名称,用于标记类名
indexNumber组件索引,用于显示的优先级
htmlString, Element组件的 DOM 元素
styleObject组件样式对象
clickFunction组件点击事件
mountedFunction组件挂载后触发
tooltipString组件的提示文本

创建 ​

▶ Run Code
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -123,8 +124,8 @@
             },
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/component/setting.html b/docs/document/component/setting.html index ce38c8a9d..daed0c15c 100644 --- a/docs/document/component/setting.html +++ b/docs/document/component/setting.html @@ -5,14 +5,15 @@ 设置面板 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

设置面板 ​

内置 ​

须先打开设置面板,然后自带四个内置项:flip, playbackRate, aspectRatio, subtitleOffset

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

设置面板 ​

内置 ​

须先打开设置面板,然后自带四个内置项:flip, playbackRate, aspectRatio, subtitleOffset

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 	setting: true,
@@ -30,7 +31,22 @@
     playbackRate: true,
     aspectRatio: true,
     subtitleOffset: true,
-});

创建 - 选择列表 ​

属性类型描述
htmlString, Element元素的 DOM
iconString, Element元素的图标
selectorArray元素列表
onSelectFunction元素点击事件
widthNumber列表宽度
tooltipString提示文本
▶ Run Code
js
var art = new Artplayer({
+});

创建 - 按钮 ​

属性类型描述
htmlString, Element元素的 DOM
iconString, Element元素的图标
onClickFunction元素点击事件
widthNumber列表宽度
tooltipString提示文本
▶ Run Code
js
var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+    setting: true,
+    settings: [
+        {
+            html: 'Button',
+            icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
+            tooltip: 'tooltip',
+			onClick(item, $dom, event) {
+                console.info(item, $dom, event);
+				return 'new tooltip'
+			}
+        },
+    ],
+});

创建 - 选择列表 ​

属性类型描述
htmlString, Element元素的 DOM
iconString, Element元素的图标
selectorArray元素列表
onSelectFunction元素点击事件
widthNumber列表宽度
tooltipString提示文本
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -228,8 +244,8 @@
             switch: false,
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/advanced/built-in.html b/docs/document/en/advanced/built-in.html index f2531056e..8d0151702 100644 --- a/docs/document/en/advanced/built-in.html +++ b/docs/document/en/advanced/built-in.html @@ -5,14 +5,15 @@ Advanced Properties | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Advanced Properties ​

The advanced properties here refer to the secondary attributes mounted on the instance, which are less commonly used

option ​

Options for the player

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Advanced Properties ​

The advanced properties here refer to the secondary attributes mounted on the instance, which are less commonly used

option ​

Options for the player

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -204,8 +205,8 @@
 
 art.on('ready', () => {
     art.plugins.add(myPlugin);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/advanced/class.html b/docs/document/en/advanced/class.html index d6b8c9425..21f9293c8 100644 --- a/docs/document/en/advanced/class.html +++ b/docs/document/en/advanced/class.html @@ -5,14 +5,15 @@ Static Properties | Artplayer.js - - + + + - + - - - + + + @@ -22,15 +23,15 @@ -
Skip to content

Static Properties ​

Here, Static Properties refer to the first-level properties mounted on the constructor, which are very rarely used.

instances ​

Returns an array of all player instances. You can use this property when you want to manage multiple players at the same time.

▶ Run Code
js
console.info([...Artplayer.instances]);
+    
Skip to content

Static Properties ​

Here, Static Properties refer to the first-level properties mounted on the constructor, which are very rarely used.

instances ​

Returns an array of all player instances. You can use this property when you want to manage multiple players at the same time.

▶ Run Code
js
console.info([...Artplayer.instances]);
 
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
 
-console.info([...Artplayer.instances]);

version ​

Returns the version information of the player.

▶ Run Code
js
console.info(Artplayer.version);

env ​

Returns the environment variables of the player.

▶ Run Code
js
console.info(Artplayer.env);

build ​

Returns the build time of the player

▶ Run Code
js
console.info(Artplayer.build);

config ​

Returns the default configuration of the video

▶ Run Code
js
console.info(Artplayer.config);

utils ​

Returns a collection of utility functions for the player

▶ Run Code
js
console.info(Artplayer.utils);

For the full list of utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme ​

Returns the validation scheme for the player options

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

Returns the constructor for the event dispatcher

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

Returns the validation function for options

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

Returns the function tool for type checking

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

Returns the html string required for the player

▶ Run Code
js
console.info(Artplayer.html);

option ​

Returns the player's default options

▶ Run Code
js
console.info(Artplayer.option);
- +console.info([...Artplayer.instances]);

version ​

Returns the version information of the player.

▶ Run Code
js
console.info(Artplayer.version);

env ​

Returns the environment variables of the player.

▶ Run Code
js
console.info(Artplayer.env);

build ​

Returns the build time of the player

▶ Run Code
js
console.info(Artplayer.build);

config ​

Returns the default configuration of the video

▶ Run Code
js
console.info(Artplayer.config);

utils ​

Returns a collection of utility functions for the player

▶ Run Code
js
console.info(Artplayer.utils);

For the full list of utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme ​

Returns the validation scheme for the player options

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

Returns the constructor for the event dispatcher

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

Returns the validation function for options

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

Returns the function tool for type checking

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

Returns the html string required for the player

▶ Run Code
js
console.info(Artplayer.html);

option ​

Returns the player's default options

▶ Run Code
js
console.info(Artplayer.option);
+ \ No newline at end of file diff --git a/docs/document/en/advanced/event.html b/docs/document/en/advanced/event.html index 7b251dfe7..6b2635e7b 100644 --- a/docs/document/en/advanced/event.html +++ b/docs/document/en/advanced/event.html @@ -5,14 +5,15 @@ Example Events | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Example Events ​

Player events are divided into two types, one is the video's native events (prefix video:), the other is custom events

Listening to events:

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Example Events ​

Player events are divided into two types, one is the video's native events (prefix video:), the other is custom events

Listening to events:

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
 });
@@ -383,8 +384,8 @@
 
 art.on('keydown', (event) => {
     console.log(event.code);
-});

video:canplay ​

The browser can play the media file, but estimates there is not enough data to play through to the end without having to stop for further buffering

video:canplaythrough ​

The browser estimates it can play the media through to the end without stopping for content buffering

video:complete ​

OfflineAudioContext rendering is complete

video:durationchange ​

Triggered when the value of the duration property changes

video:emptied ​

The media content becomes empty; for example, when this media has been completely loaded (or partially loaded), this event is sent and the load() method is called to reload it

video:ended ​

The video has stopped because the media reached the end point

video:error ​

An error occurred while fetching media data, or the resource type is not a supported media format

video:loadeddata ​

The first frame of the media has finished loading

video:loadedmetadata ​

Metadata has been loaded

video:pause ​

Playback has been paused

video:play ​

Playback has started

video:playing ​

Playback is ready to start following a pause or delay due to lack of data

video:progress ​

Periodically triggered while the browser is loading resources

video:ratechange ​

The playback rate has changed

video:seeked ​

A seek (frame skipping) operation has completed

video:seeking ​

A seek (frame skipping) operation has started

video:stalled ​

The user agent is trying to fetch media data, but the data unexpectedly has not appeared

video:suspend ​

Media data loading has been suspended

video:timeupdate ​

The time specified by the currentTime attribute has changed

video:volumechange ​

Volume changed

video:waiting ​

Playback has stopped due to temporarily missing data

- +});

video:canplay ​

The browser can play the media file, but estimates there is not enough data to play through to the end without having to stop for further buffering

video:canplaythrough ​

The browser estimates it can play the media through to the end without stopping for content buffering

video:complete ​

OfflineAudioContext rendering is complete

video:durationchange ​

Triggered when the value of the duration property changes

video:emptied ​

The media content becomes empty; for example, when this media has been completely loaded (or partially loaded), this event is sent and the load() method is called to reload it

video:ended ​

The video has stopped because the media reached the end point

video:error ​

An error occurred while fetching media data, or the resource type is not a supported media format

video:loadeddata ​

The first frame of the media has finished loading

video:loadedmetadata ​

Metadata has been loaded

video:pause ​

Playback has been paused

video:play ​

Playback has started

video:playing ​

Playback is ready to start following a pause or delay due to lack of data

video:progress ​

Periodically triggered while the browser is loading resources

video:ratechange ​

The playback rate has changed

video:seeked ​

A seek (frame skipping) operation has completed

video:seeking ​

A seek (frame skipping) operation has started

video:stalled ​

The user agent is trying to fetch media data, but the data unexpectedly has not appeared

video:suspend ​

Media data loading has been suspended

video:timeupdate ​

The time specified by the currentTime attribute has changed

video:volumechange ​

Volume changed

video:waiting ​

Playback has stopped due to temporarily missing data

+ \ No newline at end of file diff --git a/docs/document/en/advanced/global.html b/docs/document/en/advanced/global.html index 7a7a5dbfc..b25ae9938 100644 --- a/docs/document/en/advanced/global.html +++ b/docs/document/en/advanced/global.html @@ -5,14 +5,15 @@ Global Attributes | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Global Attributes ​

Here, Global Attributes refer to the first-level properties mounted on the constructor. Property names are all in uppercase, subject to change in the future and basically not needed.

DEBUG ​

Whether to start debug mode, which can print out all built-in events of the video by default is turned off.

▶ Run Code
js
Artplayer.DEBUG = true;
+    
Skip to content

Global Attributes ​

Here, Global Attributes refer to the first-level properties mounted on the constructor. Property names are all in uppercase, subject to change in the future and basically not needed.

DEBUG ​

Whether to start debug mode, which can print out all built-in events of the video by default is turned off.

▶ Run Code
js
Artplayer.DEBUG = true;
 
 var art = new Artplayer({
     container: '.artplayer-app',
@@ -243,8 +244,8 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     miniProgressBar: true,
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/advanced/plugin.html b/docs/document/en/advanced/plugin.html index b1505975c..13504e808 100644 --- a/docs/document/en/advanced/plugin.html +++ b/docs/document/en/advanced/plugin.html @@ -5,14 +5,15 @@ Writing Plugins | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Writing Plugins ​

Once you know the player's properties, methods, and events, writing plugins is very simple.

You can load the plugin functions when instantiated.

▶ Run Code
js
function myPlugin(art) {
+    
Skip to content

Writing Plugins ​

Once you know the player's properties, methods, and events, writing plugins is very simple.

You can load the plugin functions when instantiated.

▶ Run Code
js
function myPlugin(art) {
     console.info(art);
     return {
         name: 'myPlugin',
@@ -120,8 +121,8 @@
             url: '/assets/sample/layer.png'
         })
     ],
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/advanced/property.html b/docs/document/en/advanced/property.html index 5f965c152..f6367512a 100644 --- a/docs/document/en/advanced/property.html +++ b/docs/document/en/advanced/property.html @@ -5,14 +5,15 @@ Instance Properties | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Instance Properties ​

Here, instance properties refer to the primary properties mounted on the instance, which are quite commonly used.

play ​

  • Type: Function

Play video

▶ Run Code
js

+    
Skip to content

Instance Properties ​

Here, instance properties refer to the primary properties mounted on the instance, which are quite commonly used.

play ​

  • Type: Function

Play video

▶ Run Code
js

 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -426,8 +427,8 @@
 
 art.on('ready', () => {
     art.subtitleOffset = 1;
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/component/contextmenu.html b/docs/document/en/component/contextmenu.html index 2b29bc026..11d82b84d 100644 --- a/docs/document/en/component/contextmenu.html +++ b/docs/document/en/component/contextmenu.html @@ -5,14 +5,15 @@ Context Menu | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Context Menu ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique name of the component, used for marking the class name
indexNumberComponent index, used for display priority
htmlString, ElementThe DOM element of the component
styleObjectStyle object for the component
clickFunctionClick event for the component
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component

Creation ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Context Menu ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique name of the component, used for marking the class name
indexNumberComponent index, used for display priority
htmlString, ElementThe DOM element of the component
styleObjectStyle object for the component
clickFunctionClick event for the component
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component

Creation ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     contextmenu: [
@@ -104,8 +105,8 @@
             html: 'Your New Menu',
         })
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/component/controls.html b/docs/document/en/component/controls.html index 44c161cc4..68aca30fb 100644 --- a/docs/document/en/component/controls.html +++ b/docs/document/en/component/controls.html @@ -5,14 +5,15 @@ Controller | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Controller ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringThe unique name of the component for class identification
indexNumberThe index of the component, used for display priority
htmlString, ElementThe component's DOM element
styleObjectThe style object for the component
clickFunctionComponent click event
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component
positionStringleft and right control the position of the controller
selectorArrayAn array of objects for the selection list
onSelectFunctionFunction triggered when an item from the selection list is clicked

Creation ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Controller ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringThe unique name of the component for class identification
indexNumberThe index of the component, used for display priority
htmlString, ElementThe component's DOM element
styleObjectThe style object for the component
clickFunctionComponent click event
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component
positionStringleft and right control the position of the controller
selectorArrayAn array of objects for the selection list
onSelectFunctionFunction triggered when an item from the selection list is clicked

Creation ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     controls: [
@@ -151,8 +152,8 @@
             ],
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/component/layers.html b/docs/document/en/component/layers.html index bee8c50a0..009b0964a 100644 --- a/docs/document/en/component/layers.html +++ b/docs/document/en/component/layers.html @@ -5,14 +5,15 @@ Layer | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Layer ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique name of the component, used for marking class name
indexNumberComponent index, used for display priority
htmlString, ElementThe DOM element of the component
styleObjectStyle object for the component
clickFunctionClick event for the component
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component

Creation ​

▶ Run Code
js
var img = '/assets/sample/layer.png';
+    
Skip to content

Layer ​

Configuration ​

PropertyTypeDescription
disableBooleanWhether to disable the component
nameStringUnique name of the component, used for marking class name
indexNumberComponent index, used for display priority
htmlString, ElementThe DOM element of the component
styleObjectStyle object for the component
clickFunctionClick event for the component
mountedFunctionTriggered after the component is mounted
tooltipStringTooltip text for the component

Creation ​

▶ Run Code
js
var img = '/assets/sample/layer.png';
 var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -123,8 +124,8 @@
             },
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/component/setting.html b/docs/document/en/component/setting.html index 00dd78dbc..70557c803 100644 --- a/docs/document/en/component/setting.html +++ b/docs/document/en/component/setting.html @@ -5,14 +5,15 @@ Settings Panel | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Settings Panel ​

Built-in ​

First, open the settings panel, and then it comes with four built-in items: flip, playbackRate, aspectRatio, subtitleOffset

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Settings Panel ​

Built-in ​

First, open the settings panel, and then it comes with four built-in items: flip, playbackRate, aspectRatio, subtitleOffset

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -30,7 +31,22 @@
     playbackRate: true,
     aspectRatio: true,
     subtitleOffset: true,
-});

Create - Selection List ​

PropertyTypeDescription
htmlString, ElementItem DOM
iconString, ElementItem Icon
selectorArrayItem selector
onSelectFunctionClick event
widthNumberList Width
tooltipStringTooltip text
▶ Run Code
js
var art = new Artplayer({
+});

Create - Button ​

PropertyTypeDescription
htmlString, ElementItem DOM
iconString, ElementItem Icon
onClickFunctionClick event
widthNumberList Width
tooltipStringTooltip text
▶ Run Code
js
var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+    setting: true,
+    settings: [
+        {
+            html: 'Button',
+            icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
+            tooltip: 'tooltip',
+			onClick(item, $dom, event) {
+                console.info(item, $dom, event);
+				return 'new tooltip'
+			}
+        },
+    ],
+});

Create - Selection List ​

PropertyTypeDescription
htmlString, ElementItem DOM
iconString, ElementItem Icon
selectorArrayItem selector
onSelectFunctionClick event
widthNumberList Width
tooltipStringTooltip text
▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     setting: true,
@@ -228,8 +244,8 @@
             switch: false,
         });
     }, 3000);
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/index.html b/docs/document/en/index.html index 1db7fc104..4802fd9d4 100644 --- a/docs/document/en/index.html +++ b/docs/document/en/index.html @@ -5,14 +5,15 @@ Installation and Usage | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Installation and Usage ​

Installation ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Usage ​

html
<html>
+    
Skip to content

Installation and Usage ​

Installation ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Usage ​

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -43,7 +44,7 @@
           });
         </script>
     </body>
-</html>

Warning

The player's size depends on the size of the container container, so your container container must have a size.

You can see more examples of use at the following link

/packages/artplayer-template

Vue.js ​

vue
<template>
+</html>

Warning

The player's size depends on the size of the container container, so your container container must have a size.

You can see more examples of use at the following link

/packages/artplayer-template

Vue.js ​

vue
<template>
   <div ref="artRef"></div>
 </template>
 
@@ -107,7 +108,7 @@
     },
   },
 };
-</script>

Artplayer Not Responsive:

Modifying option directly in Vue.js will not change the player

React.js ​

jsx
import { useEffect, useRef } from 'react';
+</script>

Artplayer Not Responsive:

Modifying option directly in Vue.js will not change the player

React.js ​

jsx
import { useEffect, useRef } from 'react';
 import Artplayer from 'artplayer';
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -195,8 +196,8 @@
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

Ancient Browsers ​

The production build of artplayer.js is only compatible with the latest major version of Chrome: last 1 Chrome version

For ancient browsers, you can use the artplayer.legacy.js file, which is compatible up to: IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you need to support even older browsers, please modify the following configuration and then build it yourself:

Build configuration: scripts/build.js

Refer to documentation: browserslist

- +const art8 = new Artplayer(option);

Ancient Browsers ​

The production build of artplayer.js is only compatible with the latest major version of Chrome: last 1 Chrome version

For ancient browsers, you can use the artplayer.legacy.js file, which is compatible up to: IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you need to support even older browsers, please modify the following configuration and then build it yourself:

Build configuration: scripts/build.js

Refer to documentation: browserslist

+ \ No newline at end of file diff --git a/docs/document/en/start/i18n.html b/docs/document/en/start/i18n.html index 238e7b249..78f108db8 100644 --- a/docs/document/en/start/i18n.html +++ b/docs/document/en/start/i18n.html @@ -5,14 +5,15 @@ Language Settings | Artplayer.js - - + + + - + - - - + + + @@ -22,11 +23,11 @@ -
Skip to content

Language Settings ​

DANGER

Given the increasing number of bundled multilingual packs, starting from version 5.1.0, the core code of artplayer.js will no longer include other languages besides Simplified Chinese and English. You need to import the required languages on your own.

WARNING

When a language cannot be matched, English will be displayed by default. For i18n usage, refer to: artplayer/types/i18n.d.ts

Default Languages ​

The default languages are: en, zh-cn, which do not require manual import.

js
var art = new Artplayer({
+    
Skip to content

Language Settings ​

DANGER

Given the increasing number of bundled multilingual packs, starting from version 5.1.0, the core code of artplayer.js will no longer include other languages besides Simplified Chinese and English. You need to import the required languages on your own.

WARNING

When a language cannot be matched, English will be displayed by default. For i18n usage, refer to: artplayer/types/i18n.d.ts

Default Languages ​

The default languages are: en, zh-cn, which do not require manual import.

js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

Importing Languages ​

Language files before packaging are located in: artplayer/src/i18n/*.js. You are welcome to add your language. Packaged language files are located at: artplayer/dist/i18n/*.js

Manually imported languages include: cs, es, fa, fr, id, pl, ru, ar, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
+});

Importing Languages ​

Language files before packaging are located in: artplayer/src/i18n/*.js. You are welcome to add your language. Packaged language files are located at: artplayer/dist/i18n/*.js

js
import id from 'artplayer/dist/i18n/id.js';
 import zhTw from 'artplayer/dist/i18n/zh-tw.js';
 
 var art = new Artplayer({
@@ -73,8 +74,8 @@
             Play: 'Your Play'
         },
     },
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/en/start/option.html b/docs/document/en/start/option.html index 401f0e6ea..c6b805455 100644 --- a/docs/document/en/start/option.html +++ b/docs/document/en/start/option.html @@ -5,14 +5,15 @@ Basic Options | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

Basic Options ​

container ​

  • Type: String, Element
  • Default: #artplayer

The DOM container where the player mounts

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

Basic Options ​

container ​

  • Type: String, Element
  • Default: #artplayer

The DOM container where the player mounts

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app', 
     // container: document.querySelector('.artplayer-app'),
     url: '/assets/sample/video.mp4',
@@ -378,6 +379,10 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lock: true,
+});

gesture ​

  • Type: Boolean
  • Default: true

Whether to enable gesture events on video elements on mobile devices

▶ Run Code
js
var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+    gesture: false,
 });

fastForward ​

  • Type: Boolean
  • Default: false

Whether to add fast forward function by long pressing on the video on mobile devices

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -405,8 +410,8 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     proxy: () => document.createElement('video')
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/hashmap.json b/docs/document/hashmap.json index 7ea6b2580..33fc31b9d 100644 --- a/docs/document/hashmap.json +++ b/docs/document/hashmap.json @@ -1 +1 @@ -{"advanced_class.md":"BNit_d6q","component_contextmenu.md":"-4hZtk2p","en_component_layers.md":"B0OnEPFl","en_component_contextmenu.md":"B4StaLLI","en_advanced_class.md":"CWL182-9","component_setting.md":"DotXGGKu","advanced_built-in.md":"Bo4XQb8X","en_start_option.md":"DLSwtP6A","start_i18n.md":"MhBE-9Zy","en_advanced_property.md":"CM0QsujK","en_component_controls.md":"C7L6lFR8","component_controls.md":"DQKRBMXp","en_advanced_plugin.md":"CK2r-NOO","index.md":"13DkGx_-","advanced_plugin.md":"BreKSsG5","en_advanced_built-in.md":"C8MvISE7","en_advanced_event.md":"BY6ISfQM","component_layers.md":"C9che3XP","advanced_property.md":"DxYgetVh","en_index.md":"DJnDZ3oN","advanced_event.md":"RJ7ayOSh","en_start_i18n.md":"BI37jYR8","plugin_danmuku.md":"2scAzaGY","en_component_setting.md":"DzbjefWf","advanced_global.md":"BhN7_gRt","en_advanced_global.md":"BryBJDhD","start_option.md":"Cxa3QDj_"} +{"advanced_built-in.md":"xIN6yJEQ","advanced_class.md":"eY3DVSC3","advanced_event.md":"c-TsYEyx","advanced_global.md":"BrPgVIjS","advanced_plugin.md":"BXZAPwSl","advanced_property.md":"Bv9cWBio","component_contextmenu.md":"-d4adzZb","component_controls.md":"DZNfg7M_","component_layers.md":"BYX-1Wvu","component_setting.md":"B_SkzqZZ","en_advanced_built-in.md":"TNSAz5Xl","en_advanced_class.md":"g5hMOwKP","en_advanced_event.md":"rzb3kj1q","en_advanced_global.md":"CeJCRiyy","en_advanced_plugin.md":"BS5dhI7P","en_advanced_property.md":"DT7zAMKq","en_component_contextmenu.md":"CSeB35ob","en_component_controls.md":"CamUOgKQ","en_component_layers.md":"BtuRSWO9","en_component_setting.md":"DHxmIQKF","en_index.md":"C5Q5CphE","en_start_i18n.md":"DdodGftR","en_start_option.md":"WkjoTmIK","index.md":"D3g3xAoX","plugin_danmuku.md":"DbxWAnMR","start_i18n.md":"pF9oCBr8","start_option.md":"VVl3BaRC"} diff --git a/docs/document/index.html b/docs/document/index.html index b419b5fdd..0f1a75d99 100644 --- a/docs/document/index.html +++ b/docs/document/index.html @@ -5,14 +5,15 @@ 安装使用 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

html
<html>
+    
Skip to content

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

html
<html>
     <head>
         <title>ArtPlayer Demo</title>
         <meta charset="UTF-8" />
@@ -43,7 +44,7 @@
           });
         </script>
     </body>
-</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/packages/artplayer-template

Vue.js ​

vue
<template>
+</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/packages/artplayer-template

Vue.js ​

vue
<template>
   <div ref="artRef"></div>
 </template>
 
@@ -79,7 +80,7 @@
   },
 };
 </script>
vue
<template>
-  <Artplayer @get-instance="getInstance" :option="option" :style="style" />
+  <Artplayer @get-instance="getInstance" :option="option" :style="style" />
 </template>
 
 <script>
@@ -107,7 +108,7 @@
     },
   },
 };
-</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import { useEffect, useRef } from 'react';
+</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import { useEffect, useRef } from 'react';
 import Artplayer from 'artplayer';
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -195,8 +196,8 @@
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

- +const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

+ \ No newline at end of file diff --git a/docs/document/plugin/danmuku.html b/docs/document/plugin/danmuku.html index 95dcf476c..12b1f86fd 100644 --- a/docs/document/plugin/danmuku.html +++ b/docs/document/plugin/danmuku.html @@ -5,14 +5,15 @@ 弹幕库 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

弹幕结构 ​

每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数

js
{
+    
Skip to content

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

弹幕结构 ​

每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕库,通常只需要text就可以发送一个弹幕,其余都是非必要参数

js
{
     text: '', // 弹幕文本
     time: 10, // 弹幕时间, 默认为当前播放器时间
     mode: 0, // 弹幕模式: 0: 滚动(默认),1: 顶部,2: 底部
@@ -365,8 +366,8 @@
 
 art.on('artplayerPluginDanmuku:destroy', () => {
     console.info('弹幕销毁');
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/start/i18n.html b/docs/document/start/i18n.html index 1be534d7b..952194e35 100644 --- a/docs/document/start/i18n.html +++ b/docs/document/start/i18n.html @@ -5,14 +5,15 @@ 语言设置 | Artplayer.js - - + + + - + - - - + + + @@ -22,11 +23,11 @@ -
Skip to content

语言设置 ​

DANGER

鉴于捆绑的多国语言越来越多, 从 5.1.0 版本开始, artplayer.js 核心代码除了包含 简体中文 和 英文 外, 不再捆绑其它多国语言, 需要自行导入需要的语言。

WARNING

当无法匹配到语言时, 会默认显示英文, i18n 写法参考: artplayer/types/i18n.d.ts

默认语言 ​

默认语言有: en, zh-cn, 无需手动导入

js
var art = new Artplayer({
+    
Skip to content

语言设置 ​

DANGER

鉴于捆绑的多国语言越来越多, 从 5.1.0 版本开始, artplayer.js 核心代码除了包含 简体中文 和 英文 外, 不再捆绑其它多国语言, 需要自行导入需要的语言。

WARNING

当无法匹配到语言时, 会默认显示英文, i18n 写法参考: artplayer/types/i18n.d.ts

默认语言 ​

默认语言有: en, zh-cn, 无需手动导入

js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

手动导入的语言有: cs, es, fa, fr, id, pl, ru, ar, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
+});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

js
import id from 'artplayer/dist/i18n/id.js';
 import zhTw from 'artplayer/dist/i18n/zh-tw.js';
 
 var art = new Artplayer({
@@ -73,8 +74,8 @@
             Play: 'Your Play'
         },
     },
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/start/option.html b/docs/document/start/option.html index ab42b7fa6..bc463757c 100644 --- a/docs/document/start/option.html +++ b/docs/document/start/option.html @@ -5,14 +5,15 @@ 基础选项 | Artplayer.js - - + + + - + - - - + + + @@ -22,7 +23,7 @@ -
Skip to content

基础选项 ​

container ​

  • Type: String, Element
  • Default: #artplayer

播放器挂载的 DOM 容器

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content

基础选项 ​

container ​

  • Type: String, Element
  • Default: #artplayer

播放器挂载的 DOM 容器

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app', 
     // container: document.querySelector('.artplayer-app'),
     url: '/assets/sample/video.mp4',
@@ -378,6 +379,10 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lock: true,
+});

gesture ​

  • Type: Boolean
  • Default: true

是否在移动端启用视频元素上的手势事件

▶ Run Code
js
var art = new Artplayer({
+    container: '.artplayer-app',
+    url: '/assets/sample/video.mp4',
+    gesture: false,
 });

fastForward ​

  • Type: Boolean
  • Default: false

是否在移动端添加长按视频快进功能

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
@@ -405,8 +410,8 @@
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     proxy: () => document.createElement('video')
-});
- +});
+ \ No newline at end of file diff --git a/docs/document/vp-icons.css b/docs/document/vp-icons.css new file mode 100644 index 000000000..ddc5bd8ed --- /dev/null +++ b/docs/document/vp-icons.css @@ -0,0 +1 @@ +.vpi-social-github{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")} \ No newline at end of file diff --git a/package.json b/package.json index a012af06e..8763e79a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "artplayer-packages", - "version": "5.1.1", + "version": "5.2.0", "type": "module", "private": true, "description": "ArtPlayer.js is a modern and full featured HTML5 video player", @@ -8,7 +8,7 @@ "packages/*" ], "scripts": { - "build:all": "npm run build all && npm run build:i18n && npm run build:sw && npm run build:ts && npm run build:docs", + "build:all": "npm run build all && npm run build:i18n && npm run build:ts && npm run build:docs", "lint": "npx eslint packages/*/src --fix", "build:ts": "node ./scripts/build-ts.js", "build:docs": "node ./scripts/build-docs.js", @@ -37,29 +37,25 @@ "homepage": "https://artplayer.org", "browserslist": "last 1 Chrome version", "dependencies": { - "@parcel/config-default": "^2.12.0", - "@parcel/core": "^2.12.0", - "@parcel/optimizer-data-url": "^2.12.0", - "@parcel/reporter-cli": "^2.12.0", - "@parcel/transformer-inline-string": "^2.12.0", - "@parcel/transformer-less": "^2.12.0", - "axios": "^1.7.2", - "cpy": "^11.0.1", + "@parcel/config-default": "^2.14.4", + "@parcel/core": "^2.14.4", + "@parcel/optimizer-data-url": "^2.14.4", + "@parcel/reporter-cli": "^2.14.4", + "@parcel/transformer-inline-string": "^2.14.4", + "@parcel/transformer-less": "^2.14.4", + "cpy": "^11.1.0", "cross-env": "^7.0.3", - "cross-spawn": "^7.0.3", - "dotenv": "^16.4.5", - "eslint": "^9.6.0", - "glob": "^11.0.0", - "globals": "^15.8.0", - "lerna": "^8.1.5", - "prettier": "^3.3.2", + "cross-spawn": "^7.0.6", + "dotenv": "^16.5.0", + "eslint": "^9.25.0", + "glob": "^11.0.1", + "globals": "^16.0.0", + "lerna": "^8.2.2", + "prettier": "^3.5.3", "prompts": "^2.4.2", "servor": "^4.0.2", "svgo": "^3.3.2" }, - "resolutions": { - "string-width": "4.2.3" - }, "engines": { "node": ">= 20.0.0" } diff --git a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js index e3a334731..744ac59a0 100644 --- a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js +++ b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a[t]&&a[t],o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(n,l){if(!o[n]){if(!e[n]){var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var s=Error("Cannot find module '"+n+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},c.cache={};var u=o[n]=new p.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:p(n)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=o,p.parent=r,p.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(p,"root",{get:function(){return a[t]}}),a[t]=p;for(var s=0;sr);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{!function(e){let{version:n,utils:{errorHandle:l}}=e.constructor,t=n.split(".").map(Number);l(t[0]+t[1]/100>=5,`Artplayer.js@${n} is not compatible the artplayerPluginAds@${r.version}. Please update it to version Artplayer.js@5.x.x`)}(n);let{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:o,loading:d},constructor:{validator:p,utils:{query:s,append:u,setStyle:c}}}=n;e=p({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let y=null,f=null,g=null,m=null,x=null,v=null,h=0,b=null,w=!1,j=!1,D=!1;function P(e,n){return n.replace("%s",e)}function $(){w=!0,n.play(),e.video&&y.pause(),c(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function k(){w||(b=setTimeout(()=>{h+=1;let n=e.playDuration-h;n>=1?g.innerHTML=P(n,e.i18n.canBeClosed):(g.innerHTML=e.i18n.close,D||(D=!0)),m.innerHTML=P(e.totalDuration-h,e.i18n.countdown),h>=e.totalDuration?$():k()},1e3))}function A(){w||clearTimeout(b)}function O(){j||(j=!0,function(){n.template.$ads=u(l,'
'),y=u(n.template.$ads,e.video?``:`
${e.html}
`),v=u(n.template.$ads,'
'),u(v,d),g=s(".artplayer-plugin-ads-close",f=u(n.template.$ads,`
${e.playDuration<=0?e.i18n.close:P(e.playDuration,e.i18n.canBeClosed)}
${P(e.totalDuration,e.i18n.countdown)}
`)),m=s(".artplayer-plugin-ads-countdown",f),e.playDuration>=e.totalDuration&&c(g,"display","none"),n.proxy(g,"click",()=>{D&&$()});let r=s(".artplayer-plugin-ads-detail",x=u(n.template.$ads,`
${e.i18n.detail}
`)),p=s(".artplayer-plugin-ads-muted",x),h=s(".artplayer-plugin-ads-fullscreen",x);if(e.url?n.proxy(r,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):c(r,"display","none"),e.video){let l=u(p,t),a=u(p,i);c(a,"display","none"),e.muted&&(y.muted=!0,c(l,"display","none"),c(a,"display","inline-flex")),n.proxy(p,"click",()=>{y.muted=!y.muted,y.muted?(c(l,"display","none"),c(a,"display","inline-flex")):(c(l,"display","inline-flex"),c(a,"display","none"))})}else c(p,"display","none");let b=u(h,a),w=u(h,o);c(w,"display","none"),n.proxy(h,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(c(b,"display","inline-flex"),c(w,"display","none")):(c(b,"display","none"),c(w,"display","inline-flex"))}),n.proxy(y,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(y,"error",$),n.proxy(y,"loadedmetadata",()=>{k(),y.play(),c(f,"display","flex"),c(x,"display","flex"),c(v,"display","none")})):(k(),c(f,"display","flex"),c(x,"display","flex"),c(v,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?A():k()}))}return n.on("ready",()=>{n.once("play",O),n.once("video:playing",O)}),{name:"artplayerPluginAds",skip:$,pause:A,play:k}}}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){let e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginAds=r)},{"bundle-text:./style.less":"jDrWj","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jDrWj:[function(e,n,l){n.exports=".artplayer-plugin-ads{z-index:150;color:#fff;background-color:#000;width:100%;height:100%;font-size:13px;line-height:1;position:absolute;inset:0;overflow:hidden}.artplayer-plugin-ads .artplayer-plugin-ads-html{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-video{width:100%;height:100%}.artplayer-plugin-ads .artplayer-plugin-ads-timer{display:none;position:absolute;top:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-timer>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}"},{}],"9pCYc":[function(e,n,l){l.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},l.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.exportAll=function(e,n){return Object.keys(e).forEach(function(l){"default"===l||"__esModule"===l||Object.prototype.hasOwnProperty.call(n,l)||Object.defineProperty(n,l,{enumerable:!0,get:function(){return e[l]}})}),n},l.export=function(e,n,l){Object.defineProperty(e,n,{enumerable:!0,get:l})}},{}]},["hUYA0"],"hUYA0","parcelRequire4dc0"); \ No newline at end of file +!function(e,n,l,t,i,r,a,o){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[t]&&d[t],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function y(n,l){if(!u[n]){if(!e[n]){if(i[n])return i[n];var r="function"==typeof d[t]&&d[t];if(!l&&r)return r(n,!0);if(p)return p(n,!0);if(c&&"string"==typeof n)return c(n);var a=Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},s.cache={};var o=u[n]=new y.Module(n);e[n][0].call(o.exports,s,o,o.exports,d)}return u[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:y(n)}}y.isParcelRequire=!0,y.Module=function(e){this.id=e,this.bundle=y,this.require=c,this.exports={}},y.modules=e,y.cache=u,y.parent=p,y.distDir=void 0,y.publicUrl=void 0,y.devServer=void 0,y.i=s,y.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(y,"root",{get:function(){return d[t]}}),d[t]=y;for(var f=0;fo);var r=e("bundle-text:./style.less"),a=i.interopDefault(r);function o(e){return n=>{let{version:l,utils:{errorHandle:t}}=n.constructor,i=l.split(".").map(Number);t(i[0]+i[1]/100>=5,`Artplayer.js@${l} is not compatible the artplayerPluginAds@${o.version}. Please update it to version Artplayer.js@5.x.x`);let{template:{$player:r},icons:{volume:a,volumeClose:d,fullscreenOn:p,fullscreenOff:s,loading:u},constructor:{validator:c,utils:{query:y,append:f,setStyle:g}}}=n;e=c({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let m=null,v=null,x=null,h=null,b=null,w=null,j=0,D=null,P=!1,$=!1,k=!1;function A(e,n){return n.replace("%s",e)}function O(){P=!0,n.play(),e.video&&m.pause(),g(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function C(){P||(D=setTimeout(()=>{j+=1;let n=e.playDuration-j;n>=1?x.innerHTML=A(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,k||(k=!0)),h.innerHTML=A(e.totalDuration-j,e.i18n.countdown),j>=e.totalDuration?O():C()},1e3))}function M(){P||clearTimeout(D)}function T(){$||($=!0,function(){n.template.$ads=f(r,'
'),m=f(n.template.$ads,e.video?``:`
${e.html}
`),w=f(n.template.$ads,'
'),f(w,u),x=y(".artplayer-plugin-ads-close",v=f(n.template.$ads,`
${e.playDuration<=0?e.i18n.close:A(e.playDuration,e.i18n.canBeClosed)}
${A(e.totalDuration,e.i18n.countdown)}
`)),h=y(".artplayer-plugin-ads-countdown",v),e.playDuration>=e.totalDuration&&g(x,"display","none"),n.proxy(x,"click",()=>{k&&O()});let l=y(".artplayer-plugin-ads-detail",b=f(n.template.$ads,`
${e.i18n.detail}
`)),t=y(".artplayer-plugin-ads-muted",b),i=y(".artplayer-plugin-ads-fullscreen",b);if(e.url?n.proxy(l,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):g(l,"display","none"),e.video){let l=f(t,a),i=f(t,d);g(i,"display","none"),e.muted&&(m.muted=!0,g(l,"display","none"),g(i,"display","inline-flex")),n.proxy(t,"click",()=>{m.muted=!m.muted,m.muted?(g(l,"display","none"),g(i,"display","inline-flex")):(g(l,"display","inline-flex"),g(i,"display","none"))})}else g(t,"display","none");let o=f(i,p),c=f(i,s);g(c,"display","none"),n.proxy(i,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(g(o,"display","inline-flex"),g(c,"display","none")):(g(o,"display","none"),g(c,"display","inline-flex"))}),n.proxy(m,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(m,"error",O),n.proxy(m,"loadedmetadata",()=>{C(),m.play(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")})):(C(),g(v,"display","flex"),g(b,"display","flex"),g(w,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?M():C()}))}return n.on("ready",()=>{n.once("play",T),n.once("video:playing",T)}),{name:"artplayerPluginAds",skip:O,pause:M,play:C}}}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){let e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginAds=o)},{"bundle-text:./style.less":"jDrWj","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jDrWj:[function(e,n,l,t){n.exports=".artplayer-plugin-ads{z-index:150;color:#fff;background-color:#000;width:100%;height:100%;font-size:13px;line-height:1;position:absolute;inset:0;overflow:hidden}.artplayer-plugin-ads .artplayer-plugin-ads-html{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-video{width:100%;height:100%}.artplayer-plugin-ads .artplayer-plugin-ads-timer{display:none;position:absolute;top:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-timer>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}"},{}],"9pCYc":[function(e,n,l,t){l.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},l.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.exportAll=function(e,n){return Object.keys(e).forEach(function(l){"default"===l||"__esModule"===l||Object.prototype.hasOwnProperty.call(n,l)||Object.defineProperty(n,l,{enumerable:!0,get:function(){return e[l]}})}),n},l.export=function(e,n,l){Object.defineProperty(e,n,{enumerable:!0,get:l})}},{}]},["hUYA0"],"hUYA0","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js index 1080ef076..7815d74ac 100644 --- a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js +++ b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,n,t,r,l){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[r]&&i[r],o=a.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(n,t){if(!o[n]){if(!e[n]){var l="function"==typeof i[r]&&i[r];if(!t&&l)return l(n,!0);if(a)return a(n,!0);if(s&&"string"==typeof n)return s(n);var p=Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}c.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},c.cache={};var u=o[n]=new d.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:d(n)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=o,d.parent=a,d.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var p=0;p=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginAds@").concat(o.version,". Please update it to version Artplayer.js@5.x.x"));var t,r,i,a=n.template.$player,s=n.icons,d=s.volume,p=s.volumeClose,u=s.fullscreenOn,c=s.fullscreenOff,f=s.loading,y=n.constructor,g=y.validator,m=y.utils,v=m.query,h=m.append,x=m.setStyle;e=g((0,l._)({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"}},e),{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});var b=null,w=null,j=null,_=null,D=null,O=null,P=0,k=null,A=!1,I=!1,M=!1;function C(e,n){return n.replace("%s",e)}function L(){A=!0,n.play(),e.video&&b.pause(),x(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function T(){A||(k=setTimeout(function(){P+=1;var n=e.playDuration-P;n>=1?j.innerHTML=C(n,e.i18n.canBeClosed):(j.innerHTML=e.i18n.close,M||(M=!0)),_.innerHTML=C(e.totalDuration-P,e.i18n.countdown),P>=e.totalDuration?L():T()},1e3))}function F(){A||clearTimeout(k)}function U(){I||(I=!0,function(){n.template.$ads=h(a,'
'),b=h(n.template.$ads,e.video?''):'
'.concat(e.html,"
")),O=h(n.template.$ads,'
'),h(O,f),j=v(".artplayer-plugin-ads-close",w=h(n.template.$ads,'
\n
'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'
\n
').concat(C(e.totalDuration,e.i18n.countdown),"
\n
"))),_=v(".artplayer-plugin-ads-countdown",w),e.playDuration>=e.totalDuration&&x(j,"display","none"),n.proxy(j,"click",function(){M&&L()});var t=v(".artplayer-plugin-ads-detail",D=h(n.template.$ads,'
\n
'.concat(e.i18n.detail,'
\n
\n
\n
'))),r=v(".artplayer-plugin-ads-muted",D),l=v(".artplayer-plugin-ads-fullscreen",D);if(e.url?n.proxy(t,"click",function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)}):x(t,"display","none"),e.video){var i=h(r,d),o=h(r,p);x(o,"display","none"),e.muted&&(b.muted=!0,x(i,"display","none"),x(o,"display","inline-flex")),n.proxy(r,"click",function(){b.muted=!b.muted,b.muted?(x(i,"display","none"),x(o,"display","inline-flex")):(x(i,"display","inline-flex"),x(o,"display","none"))})}else x(r,"display","none");var s=h(l,u),y=h(l,c);x(y,"display","none"),n.proxy(l,"click",function(){n.fullscreen=!n.fullscreen,n.fullscreen?(x(s,"display","inline-flex"),x(y,"display","none")):(x(s,"display","none"),x(y,"display","inline-flex"))}),n.proxy(b,"click",function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(b,"error",L),n.proxy(b,"loadedmetadata",function(){T(),b.play(),x(w,"display","flex"),x(D,"display","flex"),x(O,"display","none")})):(T(),x(w,"display","flex"),x(D,"display","flex"),x(O,"display","none")),n.proxy(document,"visibilitychange",function(){document.hidden?F():T()}))}return n.on("ready",function(){n.once("play",U),n.once("video:playing",U)}),{name:"artplayerPluginAds",skip:L,pause:F,play:T}}}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){var s=document.createElement("style");s.id="artplayer-plugin-ads",s.textContent=a.default,document.head.appendChild(s)}"undefined"!=typeof window&&(window.artplayerPluginAds=o)},{"@swc/helpers/_/_object_spread":"9agdF","bundle-text:./style.less":"1LZhU","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"_",function(){return i});var l=e("./_define_property.js");function i(e){for(var n=1;ndiv{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}"},{}]},["69VIU"],"69VIU","parcelRequire4dc0"); \ No newline at end of file +!function(e,n,t,r,l,i,a,o){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof s[r]&&s[r],p=d.i||{},u=d.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(n,t){if(!u[n]){if(!e[n]){if(l[n])return l[n];var i="function"==typeof s[r]&&s[r];if(!t&&i)return i(n,!0);if(d)return d(n,!0);if(c&&"string"==typeof n)return c(n);var a=Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}p.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},p.cache={};var o=u[n]=new f.Module(n);e[n][0].call(o.exports,p,o,o.exports,s)}return u[n].exports;function p(e){var n=p.resolve(e);return!1===n?{}:f(n)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=u,f.parent=d,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=p,f.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(f,"root",{get:function(){return s[r]}}),s[r]=f;for(var y=0;y=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginAds@").concat(s.version,". Please update it to version Artplayer.js@5.x.x"));var t,r,l,a=n.template.$player,o=n.icons,d=o.volume,p=o.volumeClose,u=o.fullscreenOn,c=o.fullscreenOff,f=o.loading,y=n.constructor,g=y.validator,m=y.utils,v=m.query,h=m.append,x=m.setStyle;e=g((0,i._)({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"}},e),{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});var b=null,w=null,j=null,D=null,_=null,O=null,P=0,k=null,A=!1,I=!1,M=!1;function C(e,n){return n.replace("%s",e)}function L(){A=!0,n.play(),e.video&&b.pause(),x(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function T(){A||(k=setTimeout(function(){P+=1;var n=e.playDuration-P;n>=1?j.innerHTML=C(n,e.i18n.canBeClosed):(j.innerHTML=e.i18n.close,M||(M=!0)),D.innerHTML=C(e.totalDuration-P,e.i18n.countdown),P>=e.totalDuration?L():T()},1e3))}function U(){A||clearTimeout(k)}function F(){I||(I=!0,function(){n.template.$ads=h(a,'
'),b=h(n.template.$ads,e.video?''):'
'.concat(e.html,"
")),O=h(n.template.$ads,'
'),h(O,f),j=v(".artplayer-plugin-ads-close",w=h(n.template.$ads,'
\n
'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'
\n
').concat(C(e.totalDuration,e.i18n.countdown),"
\n
"))),D=v(".artplayer-plugin-ads-countdown",w),e.playDuration>=e.totalDuration&&x(j,"display","none"),n.proxy(j,"click",function(){M&&L()});var t=v(".artplayer-plugin-ads-detail",_=h(n.template.$ads,'
\n
'.concat(e.i18n.detail,'
\n
\n
\n
'))),r=v(".artplayer-plugin-ads-muted",_),l=v(".artplayer-plugin-ads-fullscreen",_);if(e.url?n.proxy(t,"click",function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)}):x(t,"display","none"),e.video){var i=h(r,d),o=h(r,p);x(o,"display","none"),e.muted&&(b.muted=!0,x(i,"display","none"),x(o,"display","inline-flex")),n.proxy(r,"click",function(){b.muted=!b.muted,b.muted?(x(i,"display","none"),x(o,"display","inline-flex")):(x(i,"display","inline-flex"),x(o,"display","none"))})}else x(r,"display","none");var s=h(l,u),y=h(l,c);x(y,"display","none"),n.proxy(l,"click",function(){n.fullscreen=!n.fullscreen,n.fullscreen?(x(s,"display","inline-flex"),x(y,"display","none")):(x(s,"display","none"),x(y,"display","inline-flex"))}),n.proxy(b,"click",function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(b,"error",L),n.proxy(b,"loadedmetadata",function(){T(),b.play(),x(w,"display","flex"),x(_,"display","flex"),x(O,"display","none")})):(T(),x(w,"display","flex"),x(_,"display","flex"),x(O,"display","none")),n.proxy(document,"visibilitychange",function(){document.hidden?U():T()}))}return n.on("ready",function(){n.once("play",F),n.once("video:playing",F)}),{name:"artplayerPluginAds",skip:L,pause:U,play:T}}}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){var d=document.createElement("style");d.id="artplayer-plugin-ads",d.textContent=o.default,document.head.appendChild(d)}"undefined"!=typeof window&&(window.artplayerPluginAds=s)},{"@swc/helpers/_/_object_spread":"9agdF","bundle-text:./style.less":"1LZhU","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,n,t,r){var l=e("@parcel/transformer-js/src/esmodule-helpers.js");l.defineInteropFlag(t),l.export(t,"_",function(){return a});var i=e("./_define_property.js");function a(e){for(var n=1;ndiv{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}"},{}]},["69VIU"],"69VIU","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.js b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.js index 3e405f004..9f24a629c 100644 --- a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.js +++ b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof i[r]&&i[r],l=u.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,n){if(!l[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(u)return u(t,!0);if(f&&"string"==typeof t)return f(t);var d=Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},p.cache={};var c=l[t]=new a.Module(t);e[t][0].call(c.exports,p,c,c.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=l,a.parent=u,a.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(a,"root",{get:function(){return i[r]}}),i[r]=a;for(var d=0;d{let{$video:n}=t.template,{createElement:r,addClass:o,setStyles:i}=t.constructor.utils,{blur:u="50px",opacity:l=.5,frequency:f=10,duration:a=.3}=e,d=r("div"),c=(d.innerHTML=Array(9).fill("
").join(""),Array.from(d.children));o(d,"artplayer-plugin-ambilight"),n.parentNode.insertBefore(d,n),i(d,{position:"absolute",top:0,left:0,zIndex:9,inset:0,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr 1fr"}),function(e,t,n,r){e.forEach(e=>{i(e,{opacity:n,filter:`blur(${t})`,transition:`background-color ${r}s ease`})})}(c,u,l,a);let p=function(e,n,o){let i=r("canvas"),u=i.getContext("2d");i.width=3,i.height=3;let l=0;return function r(){let i=performance.now();if(i-l<1e3/o||!t.playing){s=requestAnimationFrame(r);return}l=i;let f=e.videoWidth/3,a=e.videoHeight/3,d=[[0,0],[f,0],[2*f,0],[0,a],[f,a],[2*f,a],[0,2*a],[f,2*a],[2*f,2*a]].map(([t,n])=>(function(t,n,r,o){u.drawImage(e,t,n,r,o,0,0,1,1);let[i,l,f]=u.getImageData(0,0,1,1).data;return`rgb(${i}, ${l}, ${f})`})(t,n,f,a));n.forEach((e,t)=>{e.style.backgroundColor=d[t]}),s=requestAnimationFrame(r)}}(n,c,f),s=null;function m(){s||p()}function g(){s&&(cancelAnimationFrame(s),s=null)}return t.on("ready",m),t.on("destroy",g),{name:"artplayerPluginAmbilight",start:m,stop:g}}}r.defineInteropFlag(n),r.export(n,"default",()=>o),"undefined"!=typeof window&&(window.artplayerPluginAmbilight=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["4TtJY"],"4TtJY","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,n,o,i,u,l){var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof f[n]&&f[n],d=a.i||{},c=a.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(r,t){if(!c[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof f[n]&&f[n];if(!t&&i)return i(r,!0);if(a)return a(r,!0);if(p&&"string"==typeof r)return p(r);var u=Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},d.cache={};var l=c[r]=new s.Module(r);e[r][0].call(l.exports,d,l,l.exports,f)}return c[r].exports;function d(e){var r=d.resolve(e);return!1===r?{}:s(r)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.require=p,this.exports={}},s.modules=e,s.cache=c,s.parent=a,s.distDir=void 0,s.publicUrl=void 0,s.devServer=void 0,s.i=d,s.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return f[n]}}),f[n]=s;for(var m=0;m{var t,n,o,i,u,l,f;let{$video:a}=r.template,{createElement:d,addClass:c,setStyles:p}=r.constructor.utils,{blur:s="50px",opacity:m=.5,frequency:g=10,duration:y=.3}=e,h=d("div"),b=((t=h).innerHTML=Array(9).fill("
").join(""),Array.from(t.children));n=h,o=a,c(n,"artplayer-plugin-ambilight"),o.parentNode.insertBefore(n,o),p(n,{position:"absolute",top:0,left:0,zIndex:9,inset:0,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr 1fr"}),i=b,u=s,l=m,f=y,i.forEach(e=>{p(e,{opacity:l,filter:`blur(${u})`,transition:`background-color ${f}s ease`})});let v=function(e,t,n){let o=d("canvas"),i=o.getContext("2d");o.width=3,o.height=3;let u=0;return function o(){let l=performance.now();if(l-u<1e3/n||!r.playing){w=requestAnimationFrame(o);return}u=l;let f=e.videoWidth/3,a=e.videoHeight/3,d=[[0,0],[f,0],[2*f,0],[0,a],[f,a],[2*f,a],[0,2*a],[f,2*a],[2*f,2*a]].map(([r,t])=>(function(r,t,n,o){i.drawImage(e,r,t,n,o,0,0,1,1);let[u,l,f]=i.getImageData(0,0,1,1).data;return`rgb(${u}, ${l}, ${f})`})(r,t,f,a));t.forEach((e,r)=>{e.style.backgroundColor=d[r]}),w=requestAnimationFrame(o)}}(a,b,g),w=null;function x(){w||v()}function j(){w&&(cancelAnimationFrame(w),w=null)}return r.on("ready",x),r.on("destroy",j),{name:"artplayerPluginAmbilight",start:x,stop:j}}}o.defineInteropFlag(t),o.export(t,"default",()=>i),"undefined"!=typeof window&&(window.artplayerPluginAmbilight=i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,r,t,n){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}]},["4TtJY"],"4TtJY","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.legacy.js b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.legacy.js index 698a79374..6d71e7a2a 100644 --- a/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.legacy.js +++ b/packages/artplayer-plugin-ambilight/dist/artplayer-plugin-ambilight.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,r,t,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],l=i.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!l[r]){if(!e[r]){var o="function"==typeof a[n]&&a[n];if(!t&&o)return o(r,!0);if(i)return i(r,!0);if(s&&"string"==typeof r)return s(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},d.cache={};var c=l[r]=new u.Module(r);e[r][0].call(c.exports,d,c,c.exports,this)}return l[r].exports;function d(e){var r=d.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=l,u.parent=i,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return a[n]}}),a[n]=u;for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:{};return function(r){var t,n,a,i,l=r.template.$video,s=r.constructor.utils,u=s.createElement,f=s.addClass,c=s.setStyles,d=e.blur,p=e.opacity,m=e.frequency,y=e.duration,_=u("div"),h=(_.innerHTML=Array(9).fill("
").join(""),Array.from(_.children));f(_,"artplayer-plugin-ambilight"),l.parentNode.insertBefore(_,l),c(_,{position:"absolute",top:0,left:0,zIndex:9,inset:0,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr 1fr"}),function(e,r,t,n){e.forEach(function(e){c(e,{opacity:t,filter:"blur(".concat(r,")"),transition:"background-color ".concat(n,"s ease")})})}(h,void 0===d?"50px":d,void 0===p?.5:p,void 0===y?.3:y);var j=(t=void 0===m?10:m,a=(n=u("canvas")).getContext("2d"),n.width=3,n.height=3,i=0,function e(){var n=performance.now();if(n-i<1e3/t||!r.playing){v=requestAnimationFrame(e);return}i=n;var s=l.videoWidth/3,u=l.videoHeight/3,f=[[0,0],[s,0],[2*s,0],[0,u],[s,u],[2*s,u],[0,2*u],[s,2*u],[2*s,2*u]].map(function(e){var r,t,n,i,f=(0,o._)(e,2),c=f[0],d=f[1];return a.drawImage(l,c,d,s,u,0,0,1,1),t=(r=(0,o._)(a.getImageData(0,0,1,1).data,3))[0],n=r[1],i=r[2],"rgb(".concat(t,", ").concat(n,", ").concat(i,")")});h.forEach(function(e,r){e.style.backgroundColor=f[r]}),v=requestAnimationFrame(e)}),v=null;function g(){v||j()}function b(){v&&(cancelAnimationFrame(v),v=null)}return r.on("ready",g),r.on("destroy",b),{name:"artplayerPluginAmbilight",start:g,stop:b}}}"undefined"!=typeof window&&(window.artplayerPluginAmbilight=a)},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return s});var o=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),i=e("./_non_iterable_rest.js"),l=e("./_unsupported_iterable_to_array.js");function s(e,r){return(0,o._)(e)||(0,a._)(e,r)||(0,l._)(e,r)||(0,i._)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(Array.isArray(e))return e}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],loYCM:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(t=o.next()).done)&&(a.push(t.value),!r||a.length!==r);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(l)throw n}}return a}}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5m31D":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return a});var o=e("./_array_like_to_array.js");function a(e,r){if(e){if("string"==typeof e)return(0,o._)(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return(0,o._)(e,r)}}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t0&&void 0!==arguments[0]?arguments[0]:{};return function(r){var t,n,o,a,l,u,s,f,c,d,p,m,y,_=r.template.$video,h=r.constructor.utils,j=h.createElement,v=h.addClass,g=h.setStyles,b=e.blur,w=e.opacity,x=e.frequency,D=e.duration,A=j("div"),F=((t=A).innerHTML=Array(9).fill("
").join(""),Array.from(t.children));n=A,o=_,v(n,"artplayer-plugin-ambilight"),o.parentNode.insertBefore(n,o),g(n,{position:"absolute",top:0,left:0,zIndex:9,inset:0,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr 1fr"}),a=F,l=void 0===b?"50px":b,u=void 0===w?.5:w,s=void 0===D?.3:D,a.forEach(function(e){g(e,{opacity:u,filter:"blur(".concat(l,")"),transition:"background-color ".concat(s,"s ease")})});var I=(f=_,c=F,d=void 0===x?10:x,m=(p=j("canvas")).getContext("2d"),p.width=3,p.height=3,y=0,function e(){var t=performance.now();if(t-y<1e3/d||!r.playing){M=requestAnimationFrame(e);return}y=t;var n=f.videoWidth/3,o=f.videoHeight/3,a=[[0,0],[n,0],[2*n,0],[0,o],[n,o],[2*n,o],[0,2*o],[n,2*o],[2*n,2*o]].map(function(e){var r,t,a,l,u=(0,i._)(e,2),s=u[0],c=u[1];return m.drawImage(f,s,c,n,o,0,0,1,1),t=(r=(0,i._)(m.getImageData(0,0,1,1).data,3))[0],a=r[1],l=r[2],"rgb(".concat(t,", ").concat(a,", ").concat(l,")")});c.forEach(function(e,r){e.style.backgroundColor=a[r]}),M=requestAnimationFrame(e)}),M=null;function O(){M||I()}function W(){M&&(cancelAnimationFrame(M),M=null)}return r.on("ready",O),r.on("destroy",W),{name:"artplayerPluginAmbilight",start:O,stop:W}}}"undefined"!=typeof window&&(window.artplayerPluginAmbilight=a)},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return s});var i=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),l=e("./_non_iterable_rest.js"),u=e("./_unsupported_iterable_to_array.js");function s(e,r){return(0,i._)(e)||(0,a._)(e,r)||(0,u._)(e,r)||(0,l._)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){if(Array.isArray(e))return e}o.defineInteropFlag(t),o.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t,n){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],loYCM:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r){var t,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(t=o.next()).done)&&(i.push(t.value),!r||i.length!==r);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw n}}return i}}o.defineInteropFlag(t),o.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}o.defineInteropFlag(t),o.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5m31D":[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return a});var i=e("./_array_like_to_array.js");function a(e,r){if(e){if("string"==typeof e)return(0,i._)(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return(0,i._)(e,r)}}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t(t.on("video:loadedmetadata",()=>{let n=e.url||t.option.url,o=e.width||160,r=e.number||100,i=e.scale||1;!function({url:e,width:t,number:n},o){let r=document.createElement("video");r.crossOrigin="anonymous",r.src=e,r.onloadedmetadata=()=>{let e=r.duration,i=document.createElement("canvas"),u=i.getContext("2d"),l=Math.floor(t*r.videoHeight/r.videoWidth);i.width=10*t,i.height=l*Math.ceil(n/10);let f=0,d=null;!function a(c){i.toBlob(e=>{URL.revokeObjectURL(d),o({url:d=URL.createObjectURL(e),height:l})},"image/jpeg"),c>=n||(r.currentTime=e*c/n,r.onseeked=()=>{u.drawImage(r,c%10*t,Math.floor(c/10)*l,t,l),f++,a(c+1)})}(0)}}({url:n,width:o,number:r},e=>{t.thumbnails={...e,column:10,number:r,width:o,scale:i}})}),{name:"artplayerPluginAutoThumbnail"})}o.defineInteropFlag(n),o.export(n,"default",()=>r),"undefined"!=typeof window&&(window.artplayerPluginAutoThumbnail=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["gj1wy"],"gj1wy","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,o,r,i,u,l){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},f="function"==typeof d[o]&&d[o],a=f.i||{},c=f.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!c[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof d[o]&&d[o];if(!n&&i)return i(t,!0);if(f)return f(t,!0);if(s&&"string"==typeof t)return s(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}a.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},a.cache={};var l=c[t]=new p.Module(t);e[t][0].call(l.exports,a,l,l.exports,d)}return c[t].exports;function a(e){var t=a.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=s,this.exports={}},p.modules=e,p.cache=c,p.parent=f,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=a,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return d[o]}}),d[o]=p;for(var m=0;m(t.on("video:loadedmetadata",()=>{let n=e.url||t.option.url,o=e.width||160,r=e.number||100,i=e.scale||1;!function({url:e,width:t,number:n},o){let r=document.createElement("video");r.crossOrigin="anonymous",r.src=e,r.onloadedmetadata=()=>{let e=r.duration,i=document.createElement("canvas"),u=i.getContext("2d"),l=Math.floor(t*r.videoHeight/r.videoWidth);i.width=10*t,i.height=l*Math.ceil(n/10);let d=0,f=null;!function a(c){i.toBlob(e=>{URL.revokeObjectURL(f),o({url:f=URL.createObjectURL(e),height:l})},"image/jpeg"),c>=n||(r.currentTime=e*c/n,r.onseeked=()=>{u.drawImage(r,c%10*t,Math.floor(c/10)*l,t,l),d++,a(c+1)})}(0)}}({url:n,width:o,number:r},e=>{t.thumbnails={...e,column:10,number:r,width:o,scale:i}})}),{name:"artplayerPluginAutoThumbnail"})}r.defineInteropFlag(n),r.export(n,"default",()=>i),"undefined"!=typeof window&&(window.artplayerPluginAutoThumbnail=i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["gj1wy"],"gj1wy","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.legacy.js b/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.legacy.js index d87fb4953..88b0a720e 100644 --- a/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.legacy.js +++ b/packages/artplayer-plugin-auto-thumbnail/dist/artplayer-plugin-auto-thumbnail.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof i[n]&&i[n],a=c.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(r,t){if(!a[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(c)return c(r,!0);if(u&&"string"==typeof r)return u(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},p.cache={};var l=a[r]=new s.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return a[r].exports;function p(e){var r=p.resolve(e);return!1===r?{}:s(r)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=a,s.parent=c,s.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return i[n]}}),i[n]=s;for(var f=0;f=u||(s.currentTime=e*l/u,s.onseeked=function(){t.drawImage(s,l%10*a,Math.floor(l/10)*o,a,o),i++,f(l+1)})}(0)}}),[2,{name:"artplayerPluginAutoThumbnail"}]})}),function(e){return r.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginAutoThumbnail=u)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r,t,n,o,i,c){try{var a=e[i](c),u=a.value}catch(e){t(e);return}a.done?r(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var c=e.apply(r,t);function a(e){o(c,n,i,a,u,"next",e)}function u(e){o(c,n,i,a,u,"throw",e)}a(void 0)})}}n.defineInteropFlag(t),n.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],"9agdF":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return i});var o=e("./_define_property.js");function i(e){for(var r=1;rr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function s(e,r,t,n){var o,i=arguments.length,c=i<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,r,t,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(c=(i<3?o(c):i>3?o(r,t,c):o(r,t))||c);return i>3&&c&&Object.defineProperty(r,t,c),c}function f(e,r){return function(t,n){r(t,n,e)}}function l(e,r,t,n,o,i){function c(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=n.kind,s="getter"===u?"get":"setter"===u?"set":"value",f=!r&&e?n.static?e:e.prototype:null,l=r||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=t.length-1;d>=0;d--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(c(e||null))};var h=(0,t[d])("accessor"===u?{get:l.get,set:l.set}:l[s],y);if("accessor"===u){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(a=c(h.get))&&(l.get=a),(a=c(h.set))&&(l.set=a),(a=c(h.init))&&o.unshift(a)}else(a=c(h))&&("field"===u?o.unshift(a):l[s]=a)}f&&Object.defineProperty(f,n.name,l),p=!0}function p(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),c=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return c}function g(){for(var e=[],r=0;r1||a(e,r)})},r&&(n[e]=r(n[e])))}function a(e,r){try{var t;(t=o[e](r)).value instanceof P?Promise.resolve(t.value.v).then(u,s):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function u(e){a("next",e)}function s(e){a("throw",e)}function f(e,r){e(r),i.shift(),i.length&&a(i[0][0],i[0][1])}}function E(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:P(e[n](r)),done:!1}:o?o(r):r}:o}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=j(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){!function(e,r,t,n){Promise.resolve(n).then(function(r){e({value:r,done:t})},r)}(n,o,(r=e[t](r)).done,r.value)})}}}function I(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var T=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r};function F(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&m(r,e,t);return T(r,e),r}function R(e){return e&&e.__esModule?e:{default:e}}function k(e,r,t,n){if("a"===t&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function A(e,r,t,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!o:!r.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,t):o?o.value=t:r.set(e,t),t}function M(e,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?r===e:e.has(r)}function N(e,r,t){if(null!=r){var n,o;if("object"!=typeof r&&"function"!=typeof r)throw TypeError("Object expected.");if(t){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=r[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=r[Symbol.dispose],t&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:r,dispose:n,async:t})}else t&&e.stack.push({async:!0});return r}var W="function"==typeof SuppressedError?SuppressedError:function(e,r,t){var n=Error(t);return n.name="SuppressedError",n.error=e,n.suppressed=r,n};function C(e){function r(r){e.error=e.hasError?new W(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}var t,n=0;return function o(){for(;t=e.stack.pop();)try{if(!t.async&&1===n)return n=0,e.stack.push(t),Promise.resolve().then(o);if(t.dispose){var i=t.dispose.call(t.value);if(t.async)return n|=2,Promise.resolve(i).then(o,function(e){return r(e),o()})}else n|=1}catch(e){r(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function L(e,r){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,t,n,o,i){return t?r?".jsx":".js":!n||o&&i?n+o+"."+i.toLowerCase()+"js":e}):e}t.default={__extends:c,__assign:a,__rest:u,__decorate:s,__param:f,__esDecorate:l,__runInitializers:p,__propKey:d,__setFunctionName:y,__metadata:_,__awaiter:h,__generator:b,__createBinding:m,__exportStar:v,__values:j,__read:w,__spread:g,__spreadArrays:O,__spreadArray:x,__await:P,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:D,__makeTemplateObject:I,__importStar:F,__importDefault:R,__classPrivateFieldGet:k,__classPrivateFieldSet:A,__classPrivateFieldIn:M,__addDisposableResource:N,__disposeResources:C,__rewriteRelativeImportExtension:L}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["htF8d"],"htF8d","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,n,o,i,c,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[n]&&a[n],f=s.i||{},l=s.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(r,t){if(!l[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof a[n]&&a[n];if(!t&&i)return i(r,!0);if(s)return s(r,!0);if(p&&"string"==typeof r)return p(r);var c=Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var u=l[r]=new d.Module(r);e[r][0].call(u.exports,f,u,u.exports,a)}return l[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:d(r)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=l,d.parent=s,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return a[n]}}),a[n]=d;for(var _=0;_=a||(s.currentTime=e*l/a,s.onseeked=function(){t.drawImage(s,l%10*i,Math.floor(l/10)*o,i,o),c++,f(l+1)})}(0)}}),[2,{name:"artplayerPluginAutoThumbnail"}]})}),function(e){return r.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginAutoThumbnail=s)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r,t,n,o,i,c){try{var u=e[i](c),a=u.value}catch(e){t(e);return}u.done?r(a):Promise.resolve(a).then(n,o)}function c(e){return function(){var r=this,t=arguments;return new Promise(function(n,o){var c=e.apply(r,t);function u(e){i(c,n,o,u,a,"next",e)}function a(e){i(c,n,o,u,a,"throw",e)}u(void 0)})}}o.defineInteropFlag(t),o.export(t,"_",function(){return c})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t,n){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],"9agdF":[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return c});var i=e("./_define_property.js");function c(e){for(var r=1;rr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function f(e,r,t,n){var o,c=arguments.length,u=c<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,r,t,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(u=(c<3?o(u):c>3?o(r,t,u):o(r,t))||u);return c>3&&u&&Object.defineProperty(r,t,u),u}function l(e,r){return function(t,n){r(t,n,e)}}function p(e,r,t,n,o,c){function u(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,s=n.kind,f="getter"===s?"get":"setter"===s?"set":"value",l=!r&&e?n.static?e:e.prototype:null,p=r||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,_=t.length-1;_>=0;_--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");c.push(u(e||null))};var v=(0,t[_])("accessor"===s?{get:p.get,set:p.set}:p[f],y);if("accessor"===s){if(void 0===v)continue;if(null===v||(void 0===v?"undefined":(0,i._)(v))!=="object")throw TypeError("Object expected");(a=u(v.get))&&(p.get=a),(a=u(v.set))&&(p.set=a),(a=u(v.init))&&o.unshift(a)}else(a=u(v))&&("field"===s?o.unshift(a):p[f]=a)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),c=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return c}function O(){for(var e=[],r=0;r1||u(e,r)})},r&&(n[e]=r(n[e])))}function u(e,r){try{var t;(t=o[e](r)).value instanceof S?Promise.resolve(t.value.v).then(a,s):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function a(e){u("next",e)}function s(e){u("throw",e)}function f(e,r){e(r),i.shift(),i.length&&u(i[0][0],i[0][1])}}function D(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:S(e[n](r)),done:!1}:o?o(r):r}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=w(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){var i,c,u;i=n,c=o,u=(r=e[t](r)).done,Promise.resolve(r.value).then(function(e){i({value:e,done:u})},c)})}}}function T(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var F=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r},R=function(e){return(R=Object.getOwnPropertyNames||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)};function k(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t=R(e),n=0;ni);var n=e("bundle-text:./style.less"),o=a.interopDefault(n);function i(e={}){return t=>{let{$player:r}=t.template,{setStyle:a,append:n,clamp:o,query:i,isMobile:l,addClass:d,removeClass:p}=t.constructor.utils,s=`
`,u=null,c=[],f=t.query(".art-control-progress"),h=t.query(".art-control-progress-inner"),g=n(h,'
'),y=n(h,'
');function m({$chapter:e,width:t}){let r=e.dataset.title.trim();if(r){a(y,"display","flex"),y.innerText=r;let e=y.clientWidth;t<=e/2?a(y,"left",0):t>h.clientWidth-e/2?a(y,"left",`${h.clientWidth-e}px`):a(y,"left",`${t-e/2}px`)}else a(y,"display","none")}function v(e=[]){if(c=[],g.innerText="",p(r,"artplayer-plugin-chapter"),Array.isArray(e)&&e.length&&t.duration){e=e.sort((e,t)=>e.start-t.start);for(let r=0;rt.duration||a.start>=a.end||n&&a.end>n.start)throw Error("Illegal chapter time point")}e[0].start>0&&e.unshift({start:0,end:e[0].start,title:""}),e[e.length-1].end{let r=n(g,s),a=o(e.start,0,t.duration),l=o(e.end,0,t.duration),d=l-a,p=d/t.duration;return r.dataset.start=a,r.dataset.end=l,r.dataset.duration=d,r.dataset.title=e.title.trim(),r.style.width=`${100*p}%`,{$chapter:r,$hover:i(".art-progress-hover",r),$loaded:i(".art-progress-loaded",r),$played:i(".art-progress-played",r)}}),d(r,"artplayer-plugin-chapter"),t.emit("setBar","loaded",t.loaded||0)}}return t.on("setBar",(e,r,n)=>{if(c.length)for(let o=0;ow&&a(f,"width","100%"),v>=x&&v<=w){let t=(v-x)/b;a(f,"width",`${100*t}%`),l?"played"===e&&n&&(m({$chapter:i,width:h}),clearTimeout(u),u=setTimeout(()=>{a(y,"display","none")},500)):"hover"===e&&m({$chapter:i,width:h})}}}),l||t.proxy(f,"mouseleave",()=>{c.length&&a(y,"display","none")}),t.once("video:loadedmetadata",()=>v(e.chapters)),{name:"artplayerPluginChapter",update:({chapters:e})=>v(e)}}}if("undefined"!=typeof document){let e="artplayer-plugin-chapter",t=document.getElementById(e);t||((t=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(t)}):(document.head||document.documentElement).appendChild(t)),t.textContent=o.default}"undefined"!=typeof window&&(window.artplayerPluginChapter=i)},{"bundle-text:./style.less":"9CXLk","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9CXLk":[function(e,t,r){t.exports=".artplayer-plugin-chapter .art-control-progress-inner{background-color:#0000!important;height:100%!important}.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-hover,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-loaded,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-played{display:none!important}.artplayer-plugin-chapter .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 64px)!important}.artplayer-plugin-chapter .art-chapters{z-index:0;align-items:center;gap:4px;height:100%;display:flex;position:absolute;inset:0;transform:scaleY(1.25)}.artplayer-plugin-chapter .art-chapters .art-chapter{align-items:center;height:100%;display:flex}.artplayer-plugin-chapter .art-chapters .art-chapter .art-chapter-inner{cursor:pointer;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);border-radius:10px;width:100%;height:50%;position:relative;overflow:hidden}.artplayer-plugin-chapter .art-chapters .art-chapter:hover .art-chapter-inner{height:100%}.artplayer-plugin-chapter .art-chapter-title{z-index:70;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:14px;line-height:1;display:none;position:absolute;top:-50px;left:0}"},{}],"9pCYc":[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["eSFsM"],"eSFsM","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,a,n,o,i,l){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[a]&&d[a],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(n[t])return n[t];var o="function"==typeof d[a]&&d[a];if(!r&&o)return o(t,!0);if(p)return p(t,!0);if(c&&"string"==typeof t)return c(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}s.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},s.cache={};var l=u[t]=new f.Module(t);e[t][0].call(l.exports,s,l,l.exports,d)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=u,f.parent=p,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=s,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return d[a]}}),d[a]=f;for(var h=0;hl);var o=e("bundle-text:./style.less"),i=n.interopDefault(o);function l(e={}){return t=>{let{$player:r}=t.template,{setStyle:a,append:n,clamp:o,query:i,isMobile:l,addClass:d,removeClass:p}=t.constructor.utils,s=`
`,u=null,c=[],f=t.query(".art-control-progress"),h=t.query(".art-control-progress-inner"),g=n(h,'
'),y=n(h,'
');function m({$chapter:e,width:t}){let r=e.dataset.title.trim();if(r){a(y,"display","flex"),y.innerText=r;let e=y.clientWidth;t<=e/2?a(y,"left",0):t>h.clientWidth-e/2?a(y,"left",`${h.clientWidth-e}px`):a(y,"left",`${t-e/2}px`)}else a(y,"display","none")}function v(e=[]){if((c=[],g.innerText="",p(r,"artplayer-plugin-chapter"),Array.isArray(e)&&e.length)&&t.duration){e=e.sort((e,t)=>e.start-t.start);for(let r=0;rt.duration||a.start>=a.end||n&&a.end>n.start)throw Error("Illegal chapter time point")}e[0].start>0&&e.unshift({start:0,end:e[0].start,title:""}),e[e.length-1].end{let r=n(g,s),a=o(e.start,0,t.duration),l=o(e.end,0,t.duration),d=l-a,p=d/t.duration;return r.dataset.start=a,r.dataset.end=l,r.dataset.duration=d,r.dataset.title=e.title.trim(),r.style.width=`${100*p}%`,{$chapter:r,$hover:i(".art-progress-hover",r),$loaded:i(".art-progress-loaded",r),$played:i(".art-progress-played",r)}}),d(r,"artplayer-plugin-chapter"),t.emit("setBar","loaded",t.loaded||0)}}return t.on("setBar",(e,r,n)=>{if(c.length)for(let o=0;ow&&a(f,"width","100%"),v>=x&&v<=w){let t=(v-x)/b;a(f,"width",`${100*t}%`),l?"played"===e&&n&&(m({$chapter:i,width:h}),clearTimeout(u),u=setTimeout(()=>{a(y,"display","none")},500)):"hover"===e&&m({$chapter:i,width:h})}}}),l||t.proxy(f,"mouseleave",()=>{c.length&&a(y,"display","none")}),t.once("video:loadedmetadata",()=>v(e.chapters)),{name:"artplayerPluginChapter",update:({chapters:e})=>v(e)}}}if("undefined"!=typeof document){let e="artplayer-plugin-chapter",t=document.getElementById(e);t||((t=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(t)}):(document.head||document.documentElement).appendChild(t)),t.textContent=i.default}"undefined"!=typeof window&&(window.artplayerPluginChapter=l)},{"bundle-text:./style.less":"9CXLk","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9CXLk":[function(e,t,r,a){t.exports=".artplayer-plugin-chapter .art-control-progress-inner{background-color:#0000!important;height:100%!important}.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-hover,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-loaded,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-played{display:none!important}.artplayer-plugin-chapter .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 64px)!important}.artplayer-plugin-chapter .art-chapters{z-index:0;align-items:center;gap:4px;height:100%;display:flex;position:absolute;inset:0;transform:scaleY(1.25)}.artplayer-plugin-chapter .art-chapters .art-chapter{align-items:center;height:100%;display:flex}.artplayer-plugin-chapter .art-chapters .art-chapter .art-chapter-inner{cursor:pointer;width:100%;height:50%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);border-radius:10px;position:relative;overflow:hidden}.artplayer-plugin-chapter .art-chapters .art-chapter:hover .art-chapter-inner{height:100%}.artplayer-plugin-chapter .art-chapter-title{z-index:70;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:14px;line-height:1;display:none;position:absolute;top:-50px;left:0}"},{}],"9pCYc":[function(e,t,r,a){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["eSFsM"],"eSFsM","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.legacy.js b/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.legacy.js index c9efa9cf1..0303a1e69 100644 --- a/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.legacy.js +++ b/packages/artplayer-plugin-chapter/dist/artplayer-plugin-chapter.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,a,n){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[a]&&o[a],l=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!l[t]){if(!e[t]){var n="function"==typeof o[a]&&o[a];if(!r&&n)return n(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},c.cache={};var u=l[t]=new p.Module(t);e[t][0].call(u.exports,c,u,u.exports,this)}return l[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=l,p.parent=i,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return o[a]}}),o[a]=p;for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.template.$player,a=t.constructor.utils,n=a.setStyle,o=a.append,i=a.clamp,l=a.query,d=a.isMobile,p=a.addClass,s=a.removeClass,u=null,c=[],f=t.query(".art-control-progress"),h=t.query(".art-control-progress-inner"),g=o(h,'
'),y=o(h,'
');function v(e){var t=e.$chapter,r=e.width,a=t.dataset.title.trim();if(a){n(y,"display","flex"),y.innerText=a;var o=y.clientWidth;r<=o/2?n(y,"left",0):r>h.clientWidth-o/2?n(y,"left","".concat(h.clientWidth-o,"px")):n(y,"left","".concat(r-o/2,"px"))}else n(y,"display","none")}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(c=[],g.innerText="",s(r,"artplayer-plugin-chapter"),Array.isArray(e)&&e.length&&t.duration){e=e.sort(function(e,t){return e.start-t.start});for(var a=0;at.duration||n.start>=n.end||d&&n.end>d.start)throw Error("Illegal chapter time point")}e[0].start>0&&e.unshift({start:0,end:e[0].start,title:""}),e[e.length-1].end\n
\n
\n
\n
\n
\n
\n '),a=i(e.start,0,t.duration),n=i(e.end,0,t.duration),d=n-a,p=d/t.duration;return r.dataset.start=a,r.dataset.end=n,r.dataset.duration=d,r.dataset.title=e.title.trim(),r.style.width="".concat(100*p,"%"),{$chapter:r,$hover:l(".art-progress-hover",r),$loaded:l(".art-progress-loaded",r),$played:l(".art-progress-played",r)}}),p(r,"artplayer-plugin-chapter"),t.emit("setBar","loaded",t.loaded||0)}}return t.on("setBar",function(e,r,a){if(c.length)for(var o=0;ow&&n(f,"width","100%"),m>=x&&m<=w){var j=(m-x)/b;n(f,"width","".concat(100*j,"%")),d?"played"===e&&a&&(v({$chapter:l,width:h}),clearTimeout(u),u=setTimeout(function(){n(y,"display","none")},500)):"hover"===e&&v({$chapter:l,width:h})}}}),d||t.proxy(f,"mouseleave",function(){c.length&&n(y,"display","none")}),t.once("video:loadedmetadata",function(){return m(e.chapters)}),{name:"artplayerPluginChapter",update:function(e){return m(e.chapters)}}}}if("undefined"!=typeof document){var l="artplayer-plugin-chapter",d=document.getElementById(l);d||((d=document.createElement("style")).id=l,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){document.head.appendChild(d)}):(document.head||document.documentElement).appendChild(d)),d.textContent=o.default}"undefined"!=typeof window&&(window.artplayerPluginChapter=i)},{"bundle-text:./style.less":"4jhrf","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"4jhrf":[function(e,t,r){t.exports=".artplayer-plugin-chapter .art-control-progress-inner{background-color:transparent!important;height:100%!important}.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-hover,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-loaded,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-played{display:none!important}.artplayer-plugin-chapter .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 64px)!important}.artplayer-plugin-chapter .art-chapters{z-index:0;align-items:center;gap:4px;height:100%;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;transform:scaleY(1.25)}.artplayer-plugin-chapter .art-chapters .art-chapter{align-items:center;height:100%;display:flex}.artplayer-plugin-chapter .art-chapters .art-chapter .art-chapter-inner{cursor:pointer;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);border-radius:10px;width:100%;height:50%;position:relative;overflow:hidden}.artplayer-plugin-chapter .art-chapters .art-chapter:hover .art-chapter-inner{height:100%}.artplayer-plugin-chapter .art-chapter-title{z-index:70;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:14px;line-height:1;display:none;position:absolute;top:-50px;left:0}"},{}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["9rqDr"],"9rqDr","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,a,n,o,i,l){var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof d[a]&&d[a],s=p.i||{},u=p.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(n[t])return n[t];var o="function"==typeof d[a]&&d[a];if(!r&&o)return o(t,!0);if(p)return p(t,!0);if(c&&"string"==typeof t)return c(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}s.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},s.cache={};var l=u[t]=new f.Module(t);e[t][0].call(l.exports,s,l,l.exports,d)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=u,f.parent=p,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=s,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return d[a]}}),d[a]=f;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.template.$player,a=t.constructor.utils,n=a.setStyle,o=a.append,i=a.clamp,l=a.query,d=a.isMobile,p=a.addClass,s=a.removeClass,u=null,c=[],f=t.query(".art-control-progress"),h=t.query(".art-control-progress-inner"),g=o(h,'
'),y=o(h,'
');function v(e){var t=e.$chapter,r=e.width,a=t.dataset.title.trim();if(a){n(y,"display","flex"),y.innerText=a;var o=y.clientWidth;r<=o/2?n(y,"left",0):r>h.clientWidth-o/2?n(y,"left","".concat(h.clientWidth-o,"px")):n(y,"left","".concat(r-o/2,"px"))}else n(y,"display","none")}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if((c=[],g.innerText="",s(r,"artplayer-plugin-chapter"),Array.isArray(e)&&e.length)&&t.duration){e=e.sort(function(e,t){return e.start-t.start});for(var a=0;at.duration||n.start>=n.end||d&&n.end>d.start)throw Error("Illegal chapter time point")}e[0].start>0&&e.unshift({start:0,end:e[0].start,title:""}),e[e.length-1].end\n
\n
\n
\n
\n
\n
\n '),a=i(e.start,0,t.duration),n=i(e.end,0,t.duration),d=n-a,p=d/t.duration;return r.dataset.start=a,r.dataset.end=n,r.dataset.duration=d,r.dataset.title=e.title.trim(),r.style.width="".concat(100*p,"%"),{$chapter:r,$hover:l(".art-progress-hover",r),$loaded:l(".art-progress-loaded",r),$played:l(".art-progress-played",r)}}),p(r,"artplayer-plugin-chapter"),t.emit("setBar","loaded",t.loaded||0)}}return t.on("setBar",function(e,r,a){if(c.length)for(var o=0;ow&&n(f,"width","100%"),m>=x&&m<=w){var j=(m-x)/b;n(f,"width","".concat(100*j,"%")),d?"played"===e&&a&&(v({$chapter:l,width:h}),clearTimeout(u),u=setTimeout(function(){n(y,"display","none")},500)):"hover"===e&&v({$chapter:l,width:h})}}}),d||t.proxy(f,"mouseleave",function(){c.length&&n(y,"display","none")}),t.once("video:loadedmetadata",function(){return m(e.chapters)}),{name:"artplayerPluginChapter",update:function(e){return m(e.chapters)}}}}if("undefined"!=typeof document){var d="artplayer-plugin-chapter",p=document.getElementById(d);p||((p=document.createElement("style")).id=d,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){document.head.appendChild(p)}):(document.head||document.documentElement).appendChild(p)),p.textContent=i.default}"undefined"!=typeof window&&(window.artplayerPluginChapter=l)},{"bundle-text:./style.less":"4jhrf","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"4jhrf":[function(e,t,r,a){t.exports=".artplayer-plugin-chapter .art-control-progress-inner{background-color:transparent!important;height:100%!important}.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-hover,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-loaded,.artplayer-plugin-chapter .art-control-progress-inner>.art-progress-played{display:none!important}.artplayer-plugin-chapter .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 64px)!important}.artplayer-plugin-chapter .art-chapters{z-index:0;align-items:center;gap:4px;height:100%;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;transform:scaleY(1.25)}.artplayer-plugin-chapter .art-chapters .art-chapter{align-items:center;height:100%;display:flex}.artplayer-plugin-chapter .art-chapters .art-chapter .art-chapter-inner{cursor:pointer;width:100%;height:50%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);border-radius:10px;position:relative;overflow:hidden}.artplayer-plugin-chapter .art-chapters .art-chapter:hover .art-chapter-inner{height:100%}.artplayer-plugin-chapter .art-chapter-title{z-index:70;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:14px;line-height:1;display:none;position:absolute;top:-50px;left:0}"},{}],iWrD0:[function(e,t,r,a){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["9rqDr"],"9rqDr","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-chapter/package.json b/packages/artplayer-plugin-chapter/package.json index 59cf4c84b..37467b52c 100644 --- a/packages/artplayer-plugin-chapter/package.json +++ b/packages/artplayer-plugin-chapter/package.json @@ -21,4 +21,4 @@ "video", "player" ] -} \ No newline at end of file +} diff --git a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.js b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.js index d5277b04a..becbbcc00 100644 --- a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.js +++ b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,o,n,a){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof i[n]&&i[n],c=r.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,o){if(!c[t]){if(!e[t]){var a="function"==typeof i[n]&&i[n];if(!o&&a)return a(t,!0);if(r)return r(t,!0);if(s&&"string"==typeof t)return s(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}f.resolve=function(o){var n=e[t][1][o];return null!=n?n:o},f.cache={};var u=c[t]=new d.Module(t);e[t][0].call(u.exports,f,u,u.exports,this)}return c[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=c,d.parent=r,d.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(d,"root",{get:function(){return i[n]}}),i[n]=d;for(var l=0;lr);let a=e=>new Promise((t,o)=>{let n=document.createElement("script");n.src=e,n.onload=t,n.onerror=o,document.body.appendChild(n)}),i=e=>({mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",mp3:"audio/mp3",wav:"audio/wav",flv:"video/x-flv",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mpd:"application/dash+xml",m3u8:"application/x-mpegURL"})[e.split("?")[0].split("#")[0].split(".").pop().toLowerCase()]||"application/octet-stream";function r(e){let t=!1,o=null,n=null,r=()=>new Promise((i,r)=>{window.__onGCastApiAvailable=a=>{if(a){let a=window.cast.framework.CastContext.getInstance();a.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),a.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=>{let a=window.cast.framework.SessionState;switch(n=t.sessionState,o=t.session,t.sessionState){case a.NO_SESSION:e.onStateChange?.("disconnected"),s("disconnected");break;case a.SESSION_STARTING:e.onStateChange?.("connecting"),s("connecting");break;case a.SESSION_STARTED:e.onStateChange?.("connected"),s("connected");break;case a.SESSION_ENDING:e.onStateChange?.("disconnecting"),s("disconnecting");break;case a.SESSION_RESUMED:e.onStateChange?.("connected"),s("connected")}}),a.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,t=>{let o=window.cast.framework.CastState;switch(t.castState){case o.NO_DEVICES_AVAILABLE:e.onCastAvailable?.(!1);break;case o.NOT_CONNECTED:case o.CONNECTING:case o.CONNECTED:e.onCastAvailable?.(!0)}}),t=!0,i()}else r(Error("Cast API is not available"))},window.chrome&&window.chrome.cast||a(e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").catch(r)}),c=(t,o)=>{let n=e.url||t.option.url,a=new window.chrome.cast.media.MediaInfo(n,e.mimeType||i(n)),r=new window.chrome.cast.media.LoadRequest(a);o.loadMedia(r).then(()=>{t.notice.show="Casting started",e.onCastStart?.()}).catch(o=>{throw t.notice.show="Error casting media",e.onError?.(o),o})},s=e=>{let t=document.querySelector(".art-icon-cast");if(t)switch(e){case"connected":t.style.color="red";break;case"connecting":case"disconnecting":t.style.color="orange";break;default:t.style.color="white"}};return async a=>(a.controls.add({name:"chromecast",position:"right",tooltip:"Chromecast",html:`${e.icon||''}`,click:async()=>{if(!t)try{await r()}catch(t){throw a.notice.show="Failed to initialize Cast API",e.onError?.(t),t}let n=window.cast.framework.CastContext.getInstance();if(o)c(a,o);else try{let e=await n.requestSession();c(a,e)}catch(t){throw a.notice.show="Error connecting to cast session",e.onError?.(t),t}}}),{name:"artplayerPluginChromecast",getCastState:()=>n,isCasting:()=>null!==o})}"undefined"!=typeof window&&(window.artplayerPluginChromecast=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,o){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,t){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[o]}})}),t},o.export=function(e,t,o){Object.defineProperty(e,t,{enumerable:!0,get:o})}},{}]},["3wl5Y"],"3wl5Y","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,o,n,i,r,a,c){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof s[n]&&s[n],l=d.i||{},u=d.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function w(t,o){if(!u[t]){if(!e[t]){if(i[t])return i[t];var r="function"==typeof s[n]&&s[n];if(!o&&r)return r(t,!0);if(d)return d(t,!0);if(f&&"string"==typeof t)return f(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}l.resolve=function(o){var n=e[t][1][o];return null!=n?n:o},l.cache={};var c=u[t]=new w.Module(t);e[t][0].call(c.exports,l,c,c.exports,s)}return u[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:w(t)}}w.isParcelRequire=!0,w.Module=function(e){this.id=e,this.bundle=w,this.require=f,this.exports={}},w.modules=e,w.cache=u,w.parent=d,w.distDir=void 0,w.publicUrl=void 0,w.devServer=void 0,w.i=l,w.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(w,"root",{get:function(){return s[n]}}),s[n]=w;for(var p=0;pc);let r=e=>new Promise((t,o)=>{let n=document.createElement("script");n.src=e,n.onload=t,n.onerror=o,document.body.appendChild(n)}),a=e=>({mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",mp3:"audio/mp3",wav:"audio/wav",flv:"video/x-flv",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mpd:"application/dash+xml",m3u8:"application/x-mpegURL"})[e.split("?")[0].split("#")[0].split(".").pop().toLowerCase()]||"application/octet-stream";function c(e){let t=!1,o=null,n=null,i=()=>new Promise((i,a)=>{window.__onGCastApiAvailable=r=>{if(r){let r=window.cast.framework.CastContext.getInstance();r.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),r.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=>{let i=window.cast.framework.SessionState;switch(n=t.sessionState,o=t.session,t.sessionState){case i.NO_SESSION:e.onStateChange?.("disconnected"),s("disconnected");break;case i.SESSION_STARTING:e.onStateChange?.("connecting"),s("connecting");break;case i.SESSION_STARTED:e.onStateChange?.("connected"),s("connected");break;case i.SESSION_ENDING:e.onStateChange?.("disconnecting"),s("disconnecting");break;case i.SESSION_RESUMED:e.onStateChange?.("connected"),s("connected")}}),r.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,t=>{let o=window.cast.framework.CastState;switch(t.castState){case o.NO_DEVICES_AVAILABLE:e.onCastAvailable?.(!1);break;case o.NOT_CONNECTED:case o.CONNECTING:case o.CONNECTED:e.onCastAvailable?.(!0)}}),t=!0,i()}else a(Error("Cast API is not available"))},window.chrome&&window.chrome.cast||r(e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").catch(a)}),c=(t,o)=>{let n=e.url||t.option.url,i=new window.chrome.cast.media.MediaInfo(n,e.mimeType||a(n)),r=new window.chrome.cast.media.LoadRequest(i);o.loadMedia(r).then(()=>{t.notice.show="Casting started",e.onCastStart?.()}).catch(o=>{throw t.notice.show="Error casting media",e.onError?.(o),o})},s=e=>{let t=document.querySelector(".art-icon-cast");if(t)switch(e){case"connected":t.style.color="red";break;case"connecting":case"disconnecting":t.style.color="orange";break;default:t.style.color="white"}};return async r=>(r.controls.add({name:"chromecast",position:"right",tooltip:"Chromecast",html:`${e.icon||''}`,click:async()=>{if(!t)try{await i()}catch(t){throw r.notice.show="Failed to initialize Cast API",e.onError?.(t),t}let n=window.cast.framework.CastContext.getInstance();if(o)c(r,o);else try{let e=await n.requestSession();c(r,e)}catch(t){throw r.notice.show="Error connecting to cast session",e.onError?.(t),t}}}),{name:"artplayerPluginChromecast",getCastState:()=>n,isCasting:()=>null!==o})}"undefined"!=typeof window&&(window.artplayerPluginChromecast=c)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,o,n){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,t){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[o]}})}),t},o.export=function(e,t,o){Object.defineProperty(e,t,{enumerable:!0,get:o})}},{}]},["3wl5Y"],"3wl5Y","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.legacy.js b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.legacy.js index 919f9892c..86dfe2a45 100644 --- a/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.legacy.js +++ b/packages/artplayer-plugin-chromecast/dist/artplayer-plugin-chromecast.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],c=a.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!c[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(s&&"string"==typeof t)return s(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=c[t]=new u.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return c[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=c,u.parent=a,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var l=0;l'.concat(e.icon||'',""),click:/*#__PURE__*/(0,o._)(function(){var o,u,l,f,p;return(0,i._)(this,function(i){switch(i.label){case 0:if(r)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,new Promise(function(t,o){if(window.__onGCastApiAvailable=function(i){if(i){var c=window.cast.framework.CastContext.getInstance();c.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),c.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,function(t){var r,o,i,c,u,l=window.cast.framework.SessionState;switch(a=t.sessionState,n=t.session,t.sessionState){case l.NO_SESSION:null===(r=e.onStateChange)||void 0===r||r.call(e,"disconnected"),s("disconnected");break;case l.SESSION_STARTING:null===(o=e.onStateChange)||void 0===o||o.call(e,"connecting"),s("connecting");break;case l.SESSION_STARTED:null===(i=e.onStateChange)||void 0===i||i.call(e,"connected"),s("connected");break;case l.SESSION_ENDING:null===(c=e.onStateChange)||void 0===c||c.call(e,"disconnecting"),s("disconnecting");break;case l.SESSION_RESUMED:null===(u=e.onStateChange)||void 0===u||u.call(e,"connected"),s("connected")}}),c.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,function(t){var r,n,o,i=window.cast.framework.CastState;switch(t.castState){case i.NO_DEVICES_AVAILABLE:null===(r=e.onCastAvailable)||void 0===r||r.call(e,!1);break;case i.NOT_CONNECTED:null===(n=e.onCastAvailable)||void 0===n||n.call(e,!0);break;case i.CONNECTING:case i.CONNECTED:null===(o=e.onCastAvailable)||void 0===o||o.call(e,!0)}}),r=!0,t()}else o(Error("Cast API is not available"))},!window.chrome||!window.chrome.cast){var i;(i=e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",new Promise(function(e,t){var r=document.createElement("script");r.src=i,r.onload=e,r.onerror=t,document.body.appendChild(r)})).catch(o)}})];case 2:return i.sent(),[3,4];case 3:throw o=i.sent(),t.notice.show="Failed to initialize Cast API",null===(u=e.onError)||void 0===u||u.call(e,o),o;case 4:if(l=window.cast.framework.CastContext.getInstance(),!n)return[3,5];return c(t,n),[3,8];case 5:return i.trys.push([5,7,,8]),[4,l.requestSession()];case 6:return c(t,i.sent()),[3,8];case 7:throw f=i.sent(),t.notice.show="Error connecting to cast session",null===(p=e.onError)||void 0===p||p.call(e,f),f;case 8:return[2]}})})}),[2,{name:"artplayerPluginChromecast",getCastState:function(){return a},isCasting:function(){return null!==n}}]})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginChromecast=a)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var c=e[i](a),s=c.value}catch(e){r(e);return}c.done?t(s):Promise.resolve(s).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function c(e){o(a,n,i,c,s,"next",e)}function s(e){o(a,n,i,c,s,"throw",e)}c(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator});var o=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return a}),n.export(r,"__assign",function(){return c}),n.export(r,"__rest",function(){return s}),n.export(r,"__decorate",function(){return u}),n.export(r,"__param",function(){return l}),n.export(r,"__esDecorate",function(){return f}),n.export(r,"__runInitializers",function(){return p}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return y}),n.export(r,"__metadata",function(){return _}),n.export(r,"__awaiter",function(){return h}),n.export(r,"__generator",function(){return v}),n.export(r,"__createBinding",function(){return m}),n.export(r,"__exportStar",function(){return w}),n.export(r,"__values",function(){return b}),n.export(r,"__read",function(){return g}),n.export(r,"__spread",function(){return S}),n.export(r,"__spreadArrays",function(){return x}),n.export(r,"__spreadArray",function(){return O}),n.export(r,"__await",function(){return E}),n.export(r,"__asyncGenerator",function(){return j}),n.export(r,"__asyncDelegator",function(){return P}),n.export(r,"__asyncValues",function(){return C}),n.export(r,"__makeTemplateObject",function(){return I}),n.export(r,"__importStar",function(){return D}),n.export(r,"__importDefault",function(){return A}),n.export(r,"__classPrivateFieldGet",function(){return k}),n.export(r,"__classPrivateFieldSet",function(){return N}),n.export(r,"__classPrivateFieldIn",function(){return R}),n.export(r,"__addDisposableResource",function(){return F}),n.export(r,"__disposeResources",function(){return G});var o=e("@swc/helpers/_/_type_of"),i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,s=n.kind,u="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var h=(0,r[d])("accessor"===s?{get:f.get,set:f.set}:f[u],y);if("accessor"===s){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(c=a(h.get))&&(f.get=c),(c=a(h.set))&&(f.set=c),(c=a(h.init))&&o.unshift(c)}else(c=a(h))&&("field"===s?o.unshift(c):f[u]=c)}l&&Object.defineProperty(l,n.name,f),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function S(){for(var e=[],t=0;t1||c(e,t)})},t&&(n[e]=t(n[e])))}function c(e,t){try{var r;(r=o[e](t)).value instanceof E?Promise.resolve(r.value.v).then(s,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function s(e){c("next",e)}function u(e){c("throw",e)}function l(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:!1}:o?o(t):t}:o}}function C(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function D(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return T(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function N(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function F(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var M="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function G(e){function t(t){e.error=e.hasError?new M(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:a,__assign:c,__rest:s,__decorate:u,__param:l,__metadata:_,__awaiter:h,__generator:v,__createBinding:m,__exportStar:w,__values:b,__read:g,__spread:S,__spreadArrays:x,__spreadArray:O,__await:E,__asyncGenerator:j,__asyncDelegator:P,__asyncValues:C,__makeTemplateObject:I,__importStar:D,__importDefault:A,__classPrivateFieldGet:k,__classPrivateFieldSet:N,__classPrivateFieldIn:R,__addDisposableResource:F,__disposeResources:G}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["ipx5S"],"ipx5S","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,i,a,c){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof s[n]&&s[n],l=u.i||{},f=u.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!f[t]){if(!e[t]){if(o[t])return o[t];var i="function"==typeof s[n]&&s[n];if(!r&&i)return i(t,!0);if(u)return u(t,!0);if(p&&"string"==typeof t)return p(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var c=f[t]=new d.Module(t);e[t][0].call(c.exports,l,c,c.exports,s)}return f[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=f,d.parent=u,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=l,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return s[n]}}),s[n]=d;for(var _=0;_'.concat(e.icon||'',""),click:(0,i._)(function(){var i,u,l,f,p;return(0,a._)(this,function(a){switch(a.label){case 0:if(r)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,new Promise(function(t,i){var a;window.__onGCastApiAvailable=function(a){if(a){var c=window.cast.framework.CastContext.getInstance();c.setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),c.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,function(t){var r,i,a,c,u,l=window.cast.framework.SessionState;switch(o=t.sessionState,n=t.session,t.sessionState){case l.NO_SESSION:null==(r=e.onStateChange)||r.call(e,"disconnected"),s("disconnected");break;case l.SESSION_STARTING:null==(i=e.onStateChange)||i.call(e,"connecting"),s("connecting");break;case l.SESSION_STARTED:null==(a=e.onStateChange)||a.call(e,"connected"),s("connected");break;case l.SESSION_ENDING:null==(c=e.onStateChange)||c.call(e,"disconnecting"),s("disconnecting");break;case l.SESSION_RESUMED:null==(u=e.onStateChange)||u.call(e,"connected"),s("connected")}}),c.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,function(t){var r,n,o,i=window.cast.framework.CastState;switch(t.castState){case i.NO_DEVICES_AVAILABLE:null==(r=e.onCastAvailable)||r.call(e,!1);break;case i.NOT_CONNECTED:null==(n=e.onCastAvailable)||n.call(e,!0);break;case i.CONNECTING:case i.CONNECTED:null==(o=e.onCastAvailable)||o.call(e,!0)}}),r=!0,t()}else i(Error("Cast API is not available"))},window.chrome&&window.chrome.cast||(a=e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",new Promise(function(e,t){var r=document.createElement("script");r.src=a,r.onload=e,r.onerror=t,document.body.appendChild(r)})).catch(i)})];case 2:return a.sent(),[3,4];case 3:throw i=a.sent(),t.notice.show="Failed to initialize Cast API",null==(u=e.onError)||u.call(e,i),i;case 4:if(l=window.cast.framework.CastContext.getInstance(),!n)return[3,5];return c(t,n),[3,8];case 5:return a.trys.push([5,7,,8]),[4,l.requestSession()];case 6:return c(t,a.sent()),[3,8];case 7:throw f=a.sent(),t.notice.show="Error connecting to cast session",null==(p=e.onError)||p.call(e,f),f;case 8:return[2]}})})}),[2,{name:"artplayerPluginChromecast",getCastState:function(){return o},isCasting:function(){return null!==n}}]})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginChromecast=c)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r,n,o,i,a){try{var c=e[i](a),s=c.value}catch(e){r(e);return}c.done?t(s):Promise.resolve(s).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function c(e){i(a,n,o,c,s,"next",e)}function s(e){i(a,n,o,c,s,"throw",e)}c(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return i.__generator});var i=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"__extends",function(){return c}),o.export(r,"__assign",function(){return s}),o.export(r,"__rest",function(){return u}),o.export(r,"__decorate",function(){return l}),o.export(r,"__param",function(){return f}),o.export(r,"__esDecorate",function(){return p}),o.export(r,"__runInitializers",function(){return d}),o.export(r,"__propKey",function(){return _}),o.export(r,"__setFunctionName",function(){return y}),o.export(r,"__metadata",function(){return h}),o.export(r,"__awaiter",function(){return v}),o.export(r,"__generator",function(){return m}),o.export(r,"__createBinding",function(){return w}),o.export(r,"__exportStar",function(){return b}),o.export(r,"__values",function(){return g}),o.export(r,"__read",function(){return x}),o.export(r,"__spread",function(){return S}),o.export(r,"__spreadArrays",function(){return j}),o.export(r,"__spreadArray",function(){return O}),o.export(r,"__await",function(){return E}),o.export(r,"__asyncGenerator",function(){return P}),o.export(r,"__asyncDelegator",function(){return C}),o.export(r,"__asyncValues",function(){return I}),o.export(r,"__makeTemplateObject",function(){return T}),o.export(r,"__importStar",function(){return k}),o.export(r,"__importDefault",function(){return N}),o.export(r,"__classPrivateFieldGet",function(){return R}),o.export(r,"__classPrivateFieldSet",function(){return F}),o.export(r,"__classPrivateFieldIn",function(){return M}),o.export(r,"__addDisposableResource",function(){return G}),o.export(r,"__disposeResources",function(){return q}),o.export(r,"__rewriteRelativeImportExtension",function(){return z});var i=e("@swc/helpers/_/_type_of"),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function l(e,t,r,n){var o,a=arguments.length,c=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(t,r,c):o(t,r))||c);return a>3&&c&&Object.defineProperty(t,r,c),c}function f(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function c(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?n.static?e:e.prototype:null,p=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),d=!1,_=r.length-1;_>=0;_--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(c(e||null))};var v=(0,r[_])("accessor"===u?{get:p.get,set:p.set}:p[l],y);if("accessor"===u){if(void 0===v)continue;if(null===v||(void 0===v?"undefined":(0,i._)(v))!=="object")throw TypeError("Object expected");(s=c(v.get))&&(p.get=s),(s=c(v.set))&&(p.set=s),(s=c(v.init))&&o.unshift(s)}else(s=c(v))&&("field"===u?o.unshift(s):p[l]=s)}f&&Object.defineProperty(f,n.name,p),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function S(){for(var e=[],t=0;t1||c(e,t)})},t&&(n[e]=t(n[e])))}function c(e,t){try{var r;(r=o[e](t)).value instanceof E?Promise.resolve(r.value.v).then(s,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function s(e){c("next",e)}function u(e){c("throw",e)}function l(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function C(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var i,a,c;i=n,a=o,c=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){i({value:e,done:c})},a)})}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var D=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},A=function(e){return(A=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=A(e),n=0;np);var n=t("./danmuku"),o=a.interopDefault(n),s=t("./setting"),l=a.interopDefault(s),r=t("./heatmap"),d=a.interopDefault(r);function p(t){return e=>{let i=new o.default(e,t),a=new l.default(e,i);return i.option.heatmap&&(0,d.default)(e,i,i.option.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),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}p.icons=l.default.icons,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=p)},{"./danmuku":"4ns48","./setting":"lO8OT","./heatmap":"8AxLD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,i){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var n=t("./bilibili"),o=t("bundle-text:./worker"),s=a.interopDefault(o);class l{constructor(t,e){let{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=l.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e);let n=new Blob([s.default],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return` user-select: none; position: absolute; white-space: pre; pointer-events: none; perspective: 500px; display: inline-block; will-change: transform; font-weight: normal; line-height: 1.125; visibility: hidden; font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif; 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; `}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){let{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;return"number"==typeof e?t(e,0,i):"string"==typeof e&&e.endsWith("%")?t(i*(parseFloat(e)/100),0,i):l.option.margin[0]}get marginBottom(){let{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;return"number"==typeof e?t(e,0,i):"string"==typeof e&&e.endsWith("%")?t(i*(parseFloat(e)/100),0,i):l.option.margin[1]}get fontSize(){let{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;return"number"==typeof i?Math.round(t(i,12,e)):"string"==typeof i&&i.endsWith("%")?Math.round(t(e*(parseFloat(i)/100),12,e)):l.option.fontSize}get $ref(){let t=this.$refs.pop()||document.createElement("div");return t.style.cssText=l.cssText,t.dataset.mode="",t.className="",t}get readys(){let{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){let t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{let n=a.$ref.offsetTop,o=this.getLeft(a.$ref)-i,s=a.$ref.clientHeight,l=a.$ref.clientWidth,r=o+l,d=r/a.$restTime,p={};p.top=n,p.left=o,p.height=s,p.width=l,p.right=e-r,p.speed=d,p.distance=r,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}async load(t){let{errorHandle:e}=this.utils,i=[],a=t||this.option.danmuku;try{"function"==typeof a?i=await a():a instanceof Promise?i=await a:"string"==typeof a?i=await (0,n.bilibiliDanmuParseFromUrl)(a):Array.isArray(a)&&(i=a),e(Array.isArray(i),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.innerText="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))&&(this.option=Object.assign({},l.option,this.option,t),this.validator(this.option,l.scheme),this.option.mode=e(this.option.mode,0,2),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.lockTime=e(this.option.lockTime,1,60),this.option.maxLength=e(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||i,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option)),this}getLeft(t){let e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{let{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){let i=this.states[t]||[];for(let t=0;te!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=l.cssText,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)}update(){let{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{let e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});let e=this.readys;for(let i=0;i{0===e.mode&&(e.$ref.style.left=`${t}px`)}),this.filter("emit",e=>{if(e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}})}continue(){let{clientWidth:t}=this.$player;return this.filter("stop",e=>{if(this.setState(e,"emit"),e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}}),this}suspend(){let{clientWidth:t}=this.$player;return this.filter("emit",e=>{if(this.setState(e,"stop"),0===e.mode){let 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"}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}i.default=l},{"./bilibili":"f83sx","bundle-text:./worker":"lfIAi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f83sx:[function(t,e,i){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");function n(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function o(t){if("string"!=typeof t)return[];let e=new RegExp(/(?.+?)<\/d>/gs);return Array.from(t.matchAll(e)).map(t=>{let e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:n(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null}).filter(Boolean)}function s({data:t}){let{xml:e,id:i}=t;if(!i||!e)return;let a=o(e);self.postMessage({danmus:a,id:i})}function l(t){return new Promise(async e=>{let i=await fetch(t),a=await i.text();try{let t=function(){let t=new Blob([` ${n.toString()} ${o.toString()} onmessage = ${s.toString()} `],{type:"application/javascript"});return new Worker(URL.createObjectURL(t))}();t.onmessage=i=>{let{danmus:a,id:n}=i.data;n&&a&&(e(a),t.terminate())},t.postMessage({xml:a,id:Date.now()})}catch(t){e(o(a))}})}a.defineInteropFlag(i),a.export(i,"bilibiliDanmuParseFromUrl",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[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||Object.prototype.hasOwnProperty.call(e,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})}},{}],lfIAi:[function(t,e,i){e.exports='!function(e,t,n,o,i){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},f="function"==typeof r[o]&&r[o],l=f.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!l[t]){if(!e[t]){var i="function"==typeof r[o]&&r[o];if(!n&&i)return i(t,!0);if(f)return f(t,!0);if(d&&"string"==typeof t)return d(t);var h=Error("Cannot find module \'"+t+"\'");throw h.code="MODULE_NOT_FOUND",h}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var p=l[t]=new u.Module(t);e[t][0].call(p.exports,s,p,p.exports,this)}return l[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=l,u.parent=f,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return r[o]}}),r[o]=u;for(var h=0;ht.mode===e.mode&&t.top<=l).sort((e,t)=>e.top-t.top);if(0===d.length)return 2===e.mode?l-e.height:r;if(d.unshift({type:"top",top:0,left:0,right:0,height:r,width:n,speed:0,distance:n}),d.push({type:"bottom",top:l,left:0,right:0,height:i,width:n,speed:0,distance:n}),2===e.mode)for(let t=d.length-2;t>=0;t-=1){let n=d[t],o=d[t+1],i=n.top+n.height;if(o.top-i>=e.height)return o.top-e.height}else for(let t=1;t=e.height)return i}let u=[];for(let e=1;et.every(t=>!(nt.time)));return t&&t[0]?t[0].top:void 0}case 1:case 2:return}else{switch(e.mode){case 0:u.sort((e,t)=>{let n=Math.min(...t.map(e=>e.right)),o=Math.min(...e.map(e=>e.right));return n*t.length-o*e.length});break;case 1:case 2:u.sort((e,t)=>{let n=Math.max(...t.map(e=>e.width));return Math.max(...e.map(e=>e.width))*e.length-n*t.length})}return u[0][0].top}}onmessage=e=>{let{data:t}=e;if(!t.id||!t.type)return;let n=(0,({getDanmuTop:o})[t.type])(t);self.postMessage({result:n,id:t.id})}},{}]},["59OZS"],"59OZS","parcelRequire4dc0");'},{}],lO8OT:[function(t,e,i){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var n=t("bundle-text:./style.less"),o=a.interopDefault(n),s=t("bundle-text:./img/on.svg"),l=a.interopDefault(s),r=t("bundle-text:./img/off.svg"),d=a.interopDefault(r),p=t("bundle-text:./img/config.svg"),u=a.interopDefault(p),h=t("bundle-text:./img/style.svg"),m=a.interopDefault(h),c=t("bundle-text:./img/mode_0_off.svg"),f=a.interopDefault(c),g=t("bundle-text:./img/mode_0_on.svg"),y=a.interopDefault(g),v=t("bundle-text:./img/mode_1_off.svg"),x=a.interopDefault(v),k=t("bundle-text:./img/mode_1_on.svg"),b=a.interopDefault(k),$=t("bundle-text:./img/mode_2_off.svg"),w=a.interopDefault($),M=t("bundle-text:./img/mode_2_on.svg"),E=a.interopDefault(M),S=t("bundle-text:./img/check_on.svg"),D=a.interopDefault(S),z=t("bundle-text:./img/check_off.svg"),A=a.interopDefault(z);if(i.default=class{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;let{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:l.default,$off:d.default,$config:u.default,$style:m.default,$mode_0_off:f.default,$mode_0_on:y.default,$mode_1_off:x.default,$mode_1_on:b.default,$mode_2_off:w.default,$mode_2_on:E.default,$check_on:D.default,$check_off:A.default}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){let{option:t}=this;return`
${l.default}${d.default}
${u.default}
\u{6309}\u{7C7B}\u{578B}\u{5C4F}\u{853D}
${f.default}${y.default}
\u{6EDA}\u{52A8}
${x.default}${b.default}
\u{9876}\u{90E8}
${w.default}${E.default}
\u{5E95}\u{90E8}
${D.default}${A.default} \u{9632}\u{6B62}\u{5F39}\u{5E55}\u{91CD}\u{53E0}
${D.default}${A.default} \u{540C}\u{6B65}\u{89C6}\u{9891}\u{901F}\u{5EA6}
\u{4E0D}\u{900F}\u{660E}\u{5EA6}
\u{672A}\u{77E5}
\u{663E}\u{793A}\u{533A}\u{57DF}
\u{672A}\u{77E5}
\u{5F39}\u{5E55}\u{5B57}\u{53F7}
\u{672A}\u{77E5}
\u{5F39}\u{5E55}\u{901F}\u{5EA6}
\u{672A}\u{77E5}
${m.default}
\u{6A21}\u{5F0F}
${y.default}
\u{6EDA}\u{52A8}
${b.default}
\u{9876}\u{90E8}
${E.default}
\u{5E95}\u{90E8}
\u{989C}\u{8272}
${this.COLOR.map(t=>`
`).join("")}
\u{53D1}\u{9001}
`}get OPACITY(){return{min:0,max:100,steps:[],...this.option.OPACITY}}get FONT_SIZE(){return{min:12,max:120,steps:[],...this.option.FONT_SIZE}}get MARGIN(){return{min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}],...this.option.MARGIN}}get SPEED(){return{min:0,max:4,steps:[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}],...this.option.SPEED}}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){let{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){let{append:i}=this.utils;[...t.children].some(t=>t===e)||i(t,e)}setData(t,e){let{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){let{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");let{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"关闭弹幕")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"打开弹幕")})}createEvents(){let{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:o,$send:s,$input:l}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{let e=t.target.closest(".apd-mode");if(!e)return;let i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(o,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{let e=t.target.closest(".apd-mode");if(!e)return;let i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{let e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(s,"click",()=>this.emit()),this.art.proxy(l,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider({...this.OPACITY,container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{let{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}}),this.slider.margin=this.createSlider({...this.MARGIN,container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{let e=this.MARGIN.steps[t];if(!e)return;let{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}}),this.slider.fontSize=this.createSlider({...this.FONT_SIZE,container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{let{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}}),this.slider.speed=this.createSlider({...this.SPEED,container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{let e=this.SPEED.steps[t];if(!e)return;let{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}})}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:o=[]}){let{query:s,clamp:l,setStyle:r}=this.utils;r(i,"touch-action","none"),i.innerHTML=`
${o.map(()=>'
').join("")}
${o.map(t=>t.hide?"":`
${t.name}
`).join("")}
`;let d=s(".apd-slider-dot",i),p=s(".apd-slider-progress",i),u=!1;function h(i=a()){if(ie)return;let s=(i-t)/(e-t);d.style.left=`${100*s}%`,0===o.length&&(p.style.width=d.style.left),n(i)}function m(a){let{top:n,height:o,left:s,width:r}=i.getBoundingClientRect();this.art.isRotate?h(Math.round(l(a.clientY-n,0,o)/o*(e-t)+t)):h(Math.round(l(a.clientX-s,0,r)/r*(e-t)+t))}return this.art.proxy(i,"click",t=>{m.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{u=0===t.button}),this.art.proxy(document,"pointermove",t=>{u&&m.call(this,t)}),this.art.proxy(document,"pointerup",t=>{u&&(u=!1,m.call(this,t))}),{reset:h}}onFullscreen(t){let{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){let{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=i.getBoundingClientRect(),s=n.width/2-a.width/2,l=o.left-(a.left-s),r=a.right+s-o.right;l>0?e.style.left=`${-s+l}px`:r>0?e.style.left=`${-s-r}px`:e.style.left=`${-s}px`}async emit(){let{$input:t}=this.template,e=t.value.trim();if(!e.length||this.isLock||this.emitting)return;let i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;let e=await this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(t){this.emitting=!1}}lock(){let{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.innerText=i,t(e,"apd-lock");let a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(i-=1,e.innerText=i,a())},1e3)};a()}unlock(){let{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.innerText="发送",t(e,"apd-lock")}resize(){if(this.outside||this.art.fullscreen||this.art.fullscreenWeb)return;let{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());n&&t(n,"apd-active"),e(i,this.option.visible?"关闭弹幕":"打开弹幕"),this.resize()}mount(t){let{errorHandle:e}=this.utils,i="string"==typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}},"undefined"!=typeof document){let t="artplayer-plugin-danmuku",e=document.getElementById(t);if(e)e.textContent=o.default;else{let e=document.createElement("style");e.id=t,e.textContent=o.default,document.head.appendChild(e)}}},{"bundle-text:./style.less":"hViDo","bundle-text:./img/on.svg":"9pjcf","bundle-text:./img/off.svg":"b2dkP","bundle-text:./img/config.svg":"l8tyy","bundle-text:./img/style.svg":"5iZC3","bundle-text:./img/mode_0_off.svg":"i0Vut","bundle-text:./img/mode_0_on.svg":"hOSvZ","bundle-text:./img/mode_1_off.svg":"bOXC3","bundle-text:./img/mode_1_on.svg":"lKuh0","bundle-text:./img/mode_2_off.svg":"eB8W6","bundle-text:./img/mode_2_on.svg":"bpe2E","bundle-text:./img/check_on.svg":"kL9zy","bundle-text:./img/check_off.svg":"22xpM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hViDo:[function(t,e,i){e.exports='.artplayer-plugin-danmuku{z-index:99;color:#fff;flex-shrink:0;justify-content:center;align-items:center;gap:10px;width:100%;height:32px;font-size:12px;font-weight:300;display:flex;position:relative}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;fill:#fff;transition:all .2s}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{opacity:0;pointer-events:none;width:320px;padding:10px;position:absolute;bottom:24px;left:0}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{background-color:#000000d9;border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{align-items:center;gap:20px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{align-items:center;gap:12px;display:flex}.artplayer-plugin-danmuku .apd-config-slider .apd-value{text-align:right;width:32px}.artplayer-plugin-danmuku .apd-slider{cursor:pointer;flex:1;justify-content:center;align-items:center;height:20px;display:flex;position:relative}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{background-color:#ffffff40;border-radius:3px;width:100%;height:2px;position:relative;overflow:hidden}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{justify-content:space-between;align-items:center;display:flex;position:absolute;inset:0}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{background-color:#ffffff80;border-radius:50%;width:2px;height:2px}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{background-color:#00a1d6;width:0%;height:100%}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{background-color:#00a1d6;border-radius:50%;width:12px;height:12px;position:absolute;left:0%;transform:translate(-6px)}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{color:#777;justify-content:space-between;align-items:center;width:calc(100% + 32px);display:flex;position:absolute;bottom:-12px}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{text-align:center;flex-shrink:0;width:36px;scale:.95}.artplayer-plugin-danmuku .apd-config-other{align-items:center;gap:20px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{cursor:pointer;align-items:center;gap:2px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{background-color:#ffffff40;border-radius:5px;flex:1;align-items:center;height:100%;display:flex}.artplayer-plugin-danmuku .apd-style{justify-content:center;align-items:center;display:flex;position:relative}.artplayer-plugin-danmuku .apd-style .apd-style-panel{opacity:0;pointer-events:none;width:200px;padding:10px;position:absolute;bottom:24px;left:0}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{background-color:#000000d9;border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{flex-wrap:wrap;gap:8px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-colors .apd-color{cursor:pointer;border-radius:2px;width:16px;height:16px}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid #000;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{color:#fff;background-color:#0000;border:none;outline:none;flex:1;width:auto;min-width:0;height:100%;line-height:1}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{cursor:pointer;text-shadow:none;background-color:#00a1d6;border-top-right-radius:5px;border-bottom-right-radius:5px;flex-shrink:0;justify-content:center;align-items:center;width:60px;height:100%;display:flex}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{flex:none;width:260px}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{gap:16px;height:38px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{flex:none;width:400px}.art-video-player>.artplayer-plugin-danmuku{padding:0 10px;position:absolute;bottom:-40px;left:0;right:0}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"9pjcf":[function(t,e,i){e.exports=''},{}],b2dkP:[function(t,e,i){e.exports=''},{}],l8tyy:[function(t,e,i){e.exports=''},{}],"5iZC3":[function(t,e,i){e.exports=''},{}],i0Vut:[function(t,e,i){e.exports=''},{}],hOSvZ:[function(t,e,i){e.exports=''},{}],bOXC3:[function(t,e,i){e.exports=''},{}],lKuh0:[function(t,e,i){e.exports=''},{}],eB8W6:[function(t,e,i){e.exports=''},{}],bpe2E:[function(t,e,i){e.exports=''},{}],kL9zy:[function(t,e,i){e.exports=''},{}],"22xpM":[function(t,e,i){e.exports=''},{}],"8AxLD":[function(t,e,i){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"default",()=>s);let n={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){let a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}},o=(t,e)=>{let i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),angle:Math.atan2(a,i)}};function s(t,e,i){let{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(s){let l=null,r=null;function d(p=[]){if(l=null,r=null,s.innerHTML="",!t.duration||t.option.isLive)return;let u={w:s.offsetWidth,h:s.offsetHeight},h={xMin:0,xMax:u.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*u.h),sampling:Math.floor(u.w/100),smoothing:.2,flattening:.2};"object"==typeof i&&Object.assign(h,i);let m=[];if(Array.isArray(p)&&p.length)m=[...p];else{let i=t.duration/u.w;for(let t=0;t<=u.w;t+=h.sampling){let a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+h.sampling)*i).length;m.push([t,a])}}if(0===m.length)return;let c=m[m.length-1],f=c[0],g=c[1];f!==u.w&&m.push([u.w,g]);let y=m.map(t=>t[1]),v=(Math.min(...y)+Math.max(...y))/2;for(let t=0;tv?1+h.scale:1-h.scale)+h.minHeight}let x=(t,e,i,a)=>{let s=o(e||t,i||t),l=n.map(Math.cos(s.angle)*h.flattening,0,1,1,0),r=s.angle*l+(a?Math.PI:0),d=s.length*h.smoothing;return[t[0]+Math.cos(r)*d,t[1]+Math.sin(r)*d]},k=(t,e,i)=>{let a=x(i[e-1],i[e-2],t),n=x(t,i[e-1],i[e+1],!0),o=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${o}`},b=m.map(t=>[n.map(t[0],h.xMin,h.xMax,0,u.w),n.map(t[1],h.yMin,h.yMax,u.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${u.h} L ${e[0]},${u.h} L ${e[0]},${e[1]}`:`${t} ${k(e,i,a)}`,"");s.innerHTML=``,l=a("#heatmap-start",s),r=a("#heatmap-stop",s),l.setAttribute("offset",`${100*t.played}%`),r.setAttribute("offset",`${100*t.played}%`)}t.on("video:timeupdate",()=>{l&&r&&(l.setAttribute("offset",`${100*t.played}%`),r.setAttribute("offset",`${100*t.played}%`))}),t.on("setBar",(t,e)=>{l&&r&&"played"===t&&(l.setAttribute("offset",`${100*e}%`),r.setAttribute("offset",`${100*e}%`))}),t.on("ready",()=>d()),t.on("resize",()=>d()),t.on("artplayerPluginDanmuku:loaded",()=>d()),t.on("artplayerPluginDanmuku:points",t=>d(t))}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["bgm6t"],"bgm6t","parcelRequire4dc0"); \ No newline at end of file +!function(t,e,i,a,n,o,s,l){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof r[a]&&r[a],p=d.i||{},u=d.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function m(e,i){if(!u[e]){if(!t[e]){if(n[e])return n[e];var o="function"==typeof r[a]&&r[a];if(!i&&o)return o(e,!0);if(d)return d(e,!0);if(h&&"string"==typeof e)return h(e);var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}p.resolve=function(i){var a=t[e][1][i];return null!=a?a:i},p.cache={};var l=u[e]=new m.Module(e);t[e][0].call(l.exports,p,l,l.exports,r)}return u[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:m(e)}}m.isParcelRequire=!0,m.Module=function(t){this.id=t,this.bundle=m,this.require=h,this.exports={}},m.modules=t,m.cache=u,m.parent=d,m.distDir=void 0,m.publicUrl=void 0,m.devServer=void 0,m.i=p,m.register=function(e,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(m,"root",{get:function(){return r[a]}}),r[a]=m;for(var c=0;cu);var o=t("./danmuku"),s=n.interopDefault(o),l=t("./setting"),r=n.interopDefault(l),d=t("./heatmap"),p=n.interopDefault(d);function u(t){return e=>{let i=new(0,s.default)(e,t),a=new(0,r.default)(e,i);return i.option.heatmap&&(0,p.default)(e,i,i.option.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),mount:a.mount.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}u.icons=r.default.icons,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=u)},{"./danmuku":"4ns48","./setting":"lO8OT","./heatmap":"8AxLD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,i,a){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=t("./bilibili"),s=t("bundle-text:./worker"),l=n.interopDefault(s);class r{constructor(t,e){let{constructor:i,template:a}=t;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.queue=[],this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.index=0,this.option=r.option,this.states={wait:[],ready:[],emit:[],stop:[]},this.config(e);let n=new Blob([l.default],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.resize=this.resize.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.resize),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,width:512,points:[],filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,visible:!0,emitter:!0,maxLength:200,lockTime:5,theme:"dark",OPACITY:{},FONT_SIZE:{},MARGIN:{},SPEED:{},COLOR:[]}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement|string",heatmap:"object|boolean",width:"number",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",emitter:"boolean",maxLength:"number",lockTime:"number",theme:"string",OPACITY:"object",FONT_SIZE:"object",MARGIN:"object",SPEED:"object",COLOR:"array"}}static get cssText(){return` user-select: none; position: absolute; white-space: pre; pointer-events: none; perspective: 500px; display: inline-block; will-change: transform; font-weight: normal; line-height: 1.125; visibility: hidden; font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif; 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; `}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){let{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;return"number"==typeof e?t(e,0,i):"string"==typeof e&&e.endsWith("%")?t(i*(parseFloat(e)/100),0,i):r.option.margin[0]}get marginBottom(){let{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;return"number"==typeof e?t(e,0,i):"string"==typeof e&&e.endsWith("%")?t(i*(parseFloat(e)/100),0,i):r.option.margin[1]}get fontSize(){let{clamp:t}=this.utils,{clientHeight:e}=this.$player,i=this.option.fontSize;return"number"==typeof i?Math.round(t(i,12,e)):"string"==typeof i&&i.endsWith("%")?Math.round(t(e*(parseFloat(i)/100),12,e)):r.option.fontSize}get $ref(){let t=this.$refs.pop()||document.createElement("div");return t.style.cssText=r.cssText,t.dataset.mode="",t.className="",t}get readys(){let{currentTime:t}=this.art,e=[];return this.filter("ready",t=>e.push(t)),this.filter("wait",i=>{t+.1>=i.time&&i.time>=t-.1&&e.push(i)}),e}get visibles(){let t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",a=>{let n=a.$ref.offsetTop,o=this.getLeft(a.$ref)-i,s=a.$ref.clientHeight,l=a.$ref.clientWidth,r=o+l,d=r/a.$restTime,p={};p.top=n,p.left=o,p.height=s,p.width=l,p.right=e-r,p.speed=d,p.distance=r,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}get speed(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}async load(t){let{errorHandle:e}=this.utils,i=[],a=t||this.option.danmuku;try{"function"==typeof a?i=await a():a instanceof Promise?i=await a:"string"==typeof a?i=await (0,o.bilibiliDanmuParseFromUrl)(a):Array.isArray(a)&&(i=a),e(Array.isArray(i),"Danmuku need return an array as result"),void 0===t&&(this.reset(),this.queue=[],this.states={wait:[],ready:[],emit:[],stop:[]},this.$refs=[],this.$danmuku.innerText="");for(let t=0;tJSON.stringify(this.option[e])!==JSON.stringify(t[e]))&&(this.option=Object.assign({},r.option,this.option,t),this.validator(this.option,r.scheme),this.option.mode=e(this.option.mode,0,2),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.lockTime=e(this.option.lockTime,1,60),this.option.maxLength=e(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||i,t.fontSize&&this.reset(),this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option)),this}getLeft(t){let e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}postMessage(t={}){return new Promise(e=>{t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{let{data:a}=i;a.id===t.id&&e(a)}})}filter(t,e){let i=this.states[t]||[];for(let t=0;te!==t),t.$state=e,t.$ref&&(t.$ref.dataset.state=e),this.states[e].push(t)}makeWait(t){this.setState(t,"wait"),t.$ref&&(t.$ref.style.cssText=r.cssText,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)}update(){let{setStyles:t}=this.utils;return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{let e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});let e=this.readys;for(let i=0;i{0===e.mode&&(e.$ref.style.left=`${t}px`)}),this.filter("emit",e=>{if(e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.left=`${t}px`,e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}})}continue(){let{clientWidth:t}=this.$player;return this.filter("stop",e=>{if(this.setState(e,"emit"),e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}}),this}suspend(){let{clientWidth:t}=this.$player;return this.filter("emit",e=>{if(this.setState(e,"stop"),0===e.mode){let 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"}}),this}stop(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}start(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this.art.emit("artplayerPluginDanmuku:reset"),this}show(){return this.isHide=!1,this.$danmuku.style.opacity=1,this.option.visible=!0,this.art.emit("artplayerPluginDanmuku:show"),this}hide(){return this.isHide=!0,this.$danmuku.style.opacity=0,this.option.visible=!1,this.art.emit("artplayerPluginDanmuku:hide"),this}destroy(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}i.default=r},{"./bilibili":"f83sx","bundle-text:./worker":"lfIAi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f83sx:[function(t,e,i,a){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function o(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function s(t){if("string"!=typeof t)return[];let e=new RegExp(/(?.+?)<\/d>/gs);return Array.from(t.matchAll(e)).map(t=>{let e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:o(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null}).filter(Boolean)}function l({data:t}){let{xml:e,id:i}=t;if(!i||!e)return;let a=s(e);self.postMessage({danmus:a,id:i})}function r(t){return new Promise(async e=>{let i=await fetch(t),a=await i.text();try{let t=function(){let t=new Blob([` ${o.toString()} ${s.toString()} onmessage = ${l.toString()} `],{type:"application/javascript"});return new Worker(URL.createObjectURL(t))}();t.onmessage=i=>{let{danmus:a,id:n}=i.data;n&&a&&(e(a),t.terminate())},t.postMessage({xml:a,id:Date.now()})}catch(t){e(s(a))}})}n.defineInteropFlag(i),n.export(i,"bilibiliDanmuParseFromUrl",()=>r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(t,e,i,a){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||Object.prototype.hasOwnProperty.call(e,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})}},{}],lfIAi:[function(t,e,i,a){e.exports='!function(e,t,i,o,n,r,f,d){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof l[o]&&l[o],h=u.i||{},p=u.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,i){if(!p[t]){if(!e[t]){if(n[t])return n[t];var r="function"==typeof l[o]&&l[o];if(!i&&r)return r(t,!0);if(u)return u(t,!0);if(s&&"string"==typeof t)return s(t);var f=Error("Cannot find module \'"+t+"\'");throw f.code="MODULE_NOT_FOUND",f}h.resolve=function(i){var o=e[t][1][i];return null!=o?o:i},h.cache={};var d=p[t]=new a.Module(t);e[t][0].call(d.exports,h,d,d.exports,l)}return p[t].exports;function h(e){var t=h.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.require=s,this.exports={}},a.modules=e,a.cache=p,a.parent=u,a.distDir=void 0,a.publicUrl=void 0,a.devServer=void 0,a.i=h,a.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(a,"root",{get:function(){return l[o]}}),l[o]=a;for(var c=0;ct.mode===e.mode&&t.top<=d).sort((e,t)=>e.top-t.top);if(0===l.length)if(2===e.mode)return d-e.height;else return r;if(l.unshift({type:"top",top:0,left:0,right:0,height:r,width:i,speed:0,distance:i}),l.push({type:"bottom",top:d,left:0,right:0,height:n,width:i,speed:0,distance:i}),2===e.mode)for(let t=l.length-2;t>=0;t-=1){let i=l[t],o=l[t+1],n=i.top+i.height;if(o.top-n>=e.height)return o.top-e.height}else for(let t=1;t=e.height)return n}let u=[];for(let e=1;et.every(t=>!(it.time))));return t&&t[0]?t[0].top:void 0}case 1:case 2:return}else{switch(e.mode){case 0:u.sort((e,t)=>{let i=Math.min(...t.map(e=>e.right)),o=Math.min(...e.map(e=>e.right));return i*t.length-o*e.length});break;case 1:case 2:u.sort((e,t)=>{let i=Math.max(...t.map(e=>e.width));return Math.max(...e.map(e=>e.width))*e.length-i*t.length})}return u[0][0].top}}onmessage=e=>{let{data:t}=e;if(!t.id||!t.type)return;let i=(0,({getDanmuTop:n})[t.type])(t);self.postMessage({result:i,id:t.id})}},{}]},["59OZS"],"59OZS","parcelRequire4dc0",{});'},{}],lO8OT:[function(t,e,i,a){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=t("bundle-text:./style.less"),s=n.interopDefault(o),l=t("bundle-text:./img/on.svg"),r=n.interopDefault(l),d=t("bundle-text:./img/off.svg"),p=n.interopDefault(d),u=t("bundle-text:./img/config.svg"),h=n.interopDefault(u),m=t("bundle-text:./img/style.svg"),c=n.interopDefault(m),f=t("bundle-text:./img/mode_0_off.svg"),g=n.interopDefault(f),y=t("bundle-text:./img/mode_0_on.svg"),v=n.interopDefault(y),x=t("bundle-text:./img/mode_1_off.svg"),k=n.interopDefault(x),b=t("bundle-text:./img/mode_1_on.svg"),$=n.interopDefault(b),w=t("bundle-text:./img/mode_2_off.svg"),M=n.interopDefault(w),E=t("bundle-text:./img/mode_2_on.svg"),S=n.interopDefault(E),D=t("bundle-text:./img/check_on.svg"),A=n.interopDefault(D),z=t("bundle-text:./img/check_off.svg"),F=n.interopDefault(z);if(i.default=class{constructor(t,e){this.art=t,this.danmuku=e,this.utils=t.constructor.utils;let{setStyle:i}=this.utils,{$controlsCenter:a}=t.template;i(a,"display","flex"),this.template={$controlsCenter:a,$mount:a,$danmuku:null,$toggle:null,$config:null,$configPanel:null,$configModes:null,$style:null,$stylePanel:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("resize",()=>this.resize()),t.on("fullscreen",t=>this.onFullscreen(t)),t.on("fullscreenWeb",t=>this.onFullscreen(t)),t.proxy(this.template.$config,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$config,$panel:this.template.$configPanel})}),t.proxy(this.template.$style,"mouseenter",()=>{this.onMouseEnter({$control:this.template.$style,$panel:this.template.$stylePanel})})}static get icons(){return{$on:r.default,$off:p.default,$config:h.default,$style:c.default,$mode_0_off:g.default,$mode_0_on:v.default,$mode_1_off:k.default,$mode_1_on:$.default,$mode_2_off:M.default,$mode_2_on:S.default,$check_on:A.default,$check_off:F.default}}get option(){return this.danmuku.option}get outside(){return this.template.$mount!==this.template.$controlsCenter}get TEMPLATE(){let{option:t}=this;return`
${r.default}${p.default}
${h.default}
\u{6309}\u{7C7B}\u{578B}\u{5C4F}\u{853D}
${g.default}${v.default}
\u{6EDA}\u{52A8}
${k.default}${$.default}
\u{9876}\u{90E8}
${M.default}${S.default}
\u{5E95}\u{90E8}
${A.default}${F.default} \u{9632}\u{6B62}\u{5F39}\u{5E55}\u{91CD}\u{53E0}
${A.default}${F.default} \u{540C}\u{6B65}\u{89C6}\u{9891}\u{901F}\u{5EA6}
\u{4E0D}\u{900F}\u{660E}\u{5EA6}
\u{672A}\u{77E5}
\u{663E}\u{793A}\u{533A}\u{57DF}
\u{672A}\u{77E5}
\u{5F39}\u{5E55}\u{5B57}\u{53F7}
\u{672A}\u{77E5}
\u{5F39}\u{5E55}\u{901F}\u{5EA6}
\u{672A}\u{77E5}
${c.default}
\u{6A21}\u{5F0F}
${v.default}
\u{6EDA}\u{52A8}
${$.default}
\u{9876}\u{90E8}
${S.default}
\u{5E95}\u{90E8}
\u{989C}\u{8272}
${this.COLOR.map(t=>`
`).join("")}
\u{53D1}\u{9001}
`}get OPACITY(){return{min:0,max:100,steps:[],...this.option.OPACITY}}get FONT_SIZE(){return{min:12,max:120,steps:[],...this.option.FONT_SIZE}}get MARGIN(){return{min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}],...this.option.MARGIN}}get SPEED(){return{min:0,max:4,steps:[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}],...this.option.SPEED}}get COLOR(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}query(t){let{query:e}=this.utils,{$danmuku:i}=this.template;return e(t,i)}append(t,e){let{append:i}=this.utils;[...t.children].some(t=>t===e)||i(t,e)}setData(t,e){let{$player:i}=this.art.template,{$mount:a}=this.template;i.dataset[t]=e,this.outside&&(a.dataset[t]=e)}createTemplate(){let{createElement:t,tooltip:e}=this.utils,i=t("div");i.className="artplayer-plugin-danmuku",i.innerHTML=this.TEMPLATE,this.template.$danmuku=i,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");let{$toggle:a}=this.template;this.art.on("artplayerPluginDanmuku:show",()=>{e(a,"关闭弹幕")}),this.art.on("artplayerPluginDanmuku:hide",()=>{e(a,"打开弹幕")})}createEvents(){let{$toggle:t,$configModes:e,$styleModes:i,$colors:a,$antiOverlap:n,$syncVideo:o,$send:s,$input:l}=this.template;this.art.proxy(t,"click",()=>{this.danmuku.config({visible:!this.option.visible}),this.reset()}),this.art.proxy(e,"click",t=>{let e=t.target.closest(".apd-mode");if(!e)return;let i=Number(e.dataset.mode);this.option.modes.includes(i)?this.danmuku.config({modes:this.option.modes.filter(t=>t!==i)}):this.danmuku.config({modes:[...this.option.modes,i]}),this.reset()}),this.art.proxy(n,"click",()=>{this.danmuku.config({antiOverlap:!this.option.antiOverlap}),this.reset()}),this.art.proxy(o,"click",()=>{this.danmuku.config({synchronousPlayback:!this.option.synchronousPlayback}),this.reset()}),this.art.proxy(i,"click",t=>{let e=t.target.closest(".apd-mode");if(!e)return;let i=Number(e.dataset.mode);this.danmuku.config({mode:i}),this.reset()}),this.art.proxy(a,"click",t=>{let e=t.target.closest(".apd-color");e&&(this.danmuku.config({color:e.dataset.color}),this.reset())}),this.art.proxy(s,"click",()=>this.emit()),this.art.proxy(l,"keypress",t=>{"Enter"===t.key&&(t.preventDefault(),this.emit())})}createSliders(){this.slider.opacity=this.createSlider({...this.OPACITY,container:this.template.$opacitySlider,findIndex:()=>Math.round(100*this.option.opacity),onChange:t=>{let{$opacityValue:e}=this.template;e.textContent=`${t}%`,this.danmuku.config({opacity:t/100})}}),this.slider.margin=this.createSlider({...this.MARGIN,container:this.template.$marginSlider,findIndex:()=>this.MARGIN.steps.findIndex(t=>t.value[0]===this.option.margin[0]&&t.value[1]===this.option.margin[1]),onChange:t=>{let e=this.MARGIN.steps[t];if(!e)return;let{$marginValue:i}=this.template;i.textContent=e.name,this.danmuku.config({margin:e.value})}}),this.slider.fontSize=this.createSlider({...this.FONT_SIZE,container:this.template.$fontSizeSlider,findIndex:()=>this.danmuku.fontSize,onChange:t=>{let{$fontSizeValue:e}=this.template;e.textContent=`${t}px`,t!==this.danmuku.fontSize&&this.danmuku.config({fontSize:t})}}),this.slider.speed=this.createSlider({...this.SPEED,container:this.template.$speedSlider,findIndex:()=>this.SPEED.steps.findIndex(t=>t.value===this.option.speed),onChange:t=>{let e=this.SPEED.steps[t];if(!e)return;let{$speedValue:i}=this.template;i.textContent=e.name,this.danmuku.config({speed:e.value})}})}createSlider({min:t,max:e,container:i,findIndex:a,onChange:n,steps:o=[]}){let{query:s,clamp:l,setStyle:r}=this.utils;r(i,"touch-action","none"),i.innerHTML=`
${o.map(()=>'
').join("")}
${o.map(t=>t.hide?"":`
${t.name}
`).join("")}
`;let d=s(".apd-slider-dot",i),p=s(".apd-slider-progress",i),u=!1;function h(i=a()){if(ie)return;let s=(i-t)/(e-t);d.style.left=`${100*s}%`,0===o.length&&(p.style.width=d.style.left),n(i)}function m(a){let{top:n,height:o,left:s,width:r}=i.getBoundingClientRect();this.art.isRotate?h(Math.round(l(a.clientY-n,0,o)/o*(e-t)+t)):h(Math.round(l(a.clientX-s,0,r)/r*(e-t)+t))}return this.art.proxy(i,"click",t=>{m.call(this,t)}),this.art.proxy(i,"pointerdown",t=>{u=0===t.button}),this.art.proxy(document,"pointermove",t=>{u&&m.call(this,t)}),this.art.proxy(document,"pointerup",t=>{u&&(u=!1,m.call(this,t))}),{reset:h}}onFullscreen(t){let{$danmuku:e,$controlsCenter:i,$mount:a}=this.template;this.outside?t?this.append(i,e):this.append(a,e):this.append(i,e)}onMouseEnter({$control:t,$panel:e}){let{$player:i}=this.art.template,a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=i.getBoundingClientRect(),s=n.width/2-a.width/2,l=o.left-(a.left-s),r=a.right+s-o.right;l>0?e.style.left=`${-s+l}px`:r>0?e.style.left=`${-s-r}px`:e.style.left=`${-s}px`}async emit(){let{$input:t}=this.template,e=t.value.trim();if(!e.length||this.isLock||this.emitting)return;let i={text:e,mode:this.option.mode,color:this.option.color,time:this.art.currentTime};try{this.emitting=!0;let e=await this.option.beforeEmit(i);if(this.emitting=!1,!0!==e)return;i.border=!0,delete i.time,this.danmuku.emit(i),t.value="",this.lock()}catch(t){this.emitting=!1}}lock(){let{addClass:t}=this.utils,{$send:e}=this.template;this.isLock=!0;let i=this.option.lockTime;e.innerText=i,t(e,"apd-lock");let a=()=>{this.timer=setTimeout(()=>{0===i?this.unlock():(e.innerText=i-=1,a())},1e3)};a()}unlock(){let{removeClass:t}=this.utils,{$send:e}=this.template;clearTimeout(this.timer),this.isLock=!1,e.innerText="发送",t(e,"apd-lock")}resize(){if(this.outside||this.art.fullscreen||this.art.fullscreenWeb)return;let{$player:t,$controlsCenter:e}=this.art.template,{$danmuku:i}=this.template;this.art.widtht.dataset.color===this.option.color.toUpperCase());n&&t(n,"apd-active"),e(i,this.option.visible?"关闭弹幕":"打开弹幕"),this.resize()}mount(t){let{errorHandle:e}=this.utils,i="string"==typeof t?document.querySelector(t):t;e(i,`Can not find the mount point: ${t}`),this.append(i,this.template.$danmuku),this.template.$mount=i,this.reset()}},"undefined"!=typeof document){let t="artplayer-plugin-danmuku",e=document.getElementById(t);e||((e=document.createElement("style")).id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(e)}):(document.head||document.documentElement).appendChild(e)),e.textContent=s.default}},{"bundle-text:./style.less":"hViDo","bundle-text:./img/on.svg":"9pjcf","bundle-text:./img/off.svg":"b2dkP","bundle-text:./img/config.svg":"l8tyy","bundle-text:./img/style.svg":"5iZC3","bundle-text:./img/mode_0_off.svg":"i0Vut","bundle-text:./img/mode_0_on.svg":"hOSvZ","bundle-text:./img/mode_1_off.svg":"bOXC3","bundle-text:./img/mode_1_on.svg":"lKuh0","bundle-text:./img/mode_2_off.svg":"eB8W6","bundle-text:./img/mode_2_on.svg":"bpe2E","bundle-text:./img/check_on.svg":"kL9zy","bundle-text:./img/check_off.svg":"22xpM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hViDo:[function(t,e,i,a){e.exports='.artplayer-plugin-danmuku{z-index:99;color:#fff;flex-shrink:0;justify-content:center;align-items:center;gap:10px;width:100%;height:32px;font-size:12px;font-weight:300;display:flex;position:relative}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;fill:#fff;transition:all .2s}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{opacity:0;pointer-events:none;width:320px;padding:10px;position:absolute;bottom:24px;left:0}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{background-color:#000000d9;border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{align-items:center;gap:20px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{align-items:center;gap:12px;display:flex}.artplayer-plugin-danmuku .apd-config-slider .apd-value{text-align:right;width:32px}.artplayer-plugin-danmuku .apd-slider{cursor:pointer;flex:1;justify-content:center;align-items:center;height:20px;display:flex;position:relative}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{background-color:#ffffff40;border-radius:3px;width:100%;height:2px;position:relative;overflow:hidden}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{justify-content:space-between;align-items:center;display:flex;position:absolute;inset:0}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{background-color:#ffffff80;border-radius:50%;width:2px;height:2px}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{background-color:#00a1d6;width:0%;height:100%}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{background-color:#00a1d6;border-radius:50%;width:12px;height:12px;position:absolute;left:0%;transform:translate(-6px)}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{color:#777;justify-content:space-between;align-items:center;width:calc(100% + 32px);display:flex;position:absolute;bottom:-12px}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{text-align:center;flex-shrink:0;width:36px;scale:.95}.artplayer-plugin-danmuku .apd-config-other{align-items:center;gap:20px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{cursor:pointer;align-items:center;gap:2px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{background-color:#ffffff40;border-radius:5px;flex:1;align-items:center;height:100%;display:flex}.artplayer-plugin-danmuku .apd-style{justify-content:center;align-items:center;display:flex;position:relative}.artplayer-plugin-danmuku .apd-style .apd-style-panel{opacity:0;pointer-events:none;width:200px;padding:10px;position:absolute;bottom:24px;left:0}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{background-color:#000000d9;border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{opacity:100;pointer-events:all}.artplayer-plugin-danmuku .apd-colors{flex-wrap:wrap;gap:8px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-colors .apd-color{cursor:pointer;border-radius:2px;width:16px;height:16px}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid #000;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{color:#fff;background-color:#0000;border:none;outline:none;flex:1;width:auto;min-width:0;height:100%;line-height:1}.artplayer-plugin-danmuku .apd-input::placeholder{color:#ffffff80}.artplayer-plugin-danmuku .apd-send{cursor:pointer;width:60px;height:100%;text-shadow:none;background-color:#00a1d6;border-top-right-radius:5px;border-bottom-right-radius:5px;flex-shrink:0;justify-content:center;align-items:center;display:flex}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{flex:none;width:260px}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{gap:16px;height:38px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{flex:none;width:400px}.art-video-player>.artplayer-plugin-danmuku{padding:0 10px;position:absolute;bottom:-40px;left:0;right:0}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:#0000004d}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"9pjcf":[function(t,e,i,a){e.exports=''},{}],b2dkP:[function(t,e,i,a){e.exports=''},{}],l8tyy:[function(t,e,i,a){e.exports=''},{}],"5iZC3":[function(t,e,i,a){e.exports=''},{}],i0Vut:[function(t,e,i,a){e.exports=''},{}],hOSvZ:[function(t,e,i,a){e.exports=''},{}],bOXC3:[function(t,e,i,a){e.exports=''},{}],lKuh0:[function(t,e,i,a){e.exports=''},{}],eB8W6:[function(t,e,i,a){e.exports=''},{}],bpe2E:[function(t,e,i,a){e.exports=''},{}],kL9zy:[function(t,e,i,a){e.exports=''},{}],"22xpM":[function(t,e,i,a){e.exports=''},{}],"8AxLD":[function(t,e,i,a){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",()=>l);let o={map:(t,e,i,a,n)=>(t-e)*(n-a)/(i-e)+a,range(t,e,i){let a=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+a)}},s=(t,e)=>{let i=e[0]-t[0],a=e[1]-t[1];return{length:Math.sqrt(Math.pow(i,2)+Math.pow(a,2)),angle:Math.atan2(a,i)}};function l(t,e,i){let{query:a}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(n){let l=null,r=null;function d(p=[]){if(l=null,r=null,n.innerHTML="",!t.duration||t.option.isLive)return;let u={w:n.offsetWidth,h:n.offsetHeight},h={xMin:0,xMax:u.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*u.h),sampling:Math.floor(u.w/100),smoothing:.2,flattening:.2};"object"==typeof i&&Object.assign(h,i);let m=[];if(Array.isArray(p)&&p.length)m=[...p];else{let i=t.duration/u.w;for(let t=0;t<=u.w;t+=h.sampling){let a=e.queue.filter(({time:e})=>e>t*i&&e<=(t+h.sampling)*i).length;m.push([t,a])}}if(0===m.length)return;let c=m[m.length-1],f=c[0],g=c[1];f!==u.w&&m.push([u.w,g]);let y=m.map(t=>t[1]),v=(Math.min(...y)+Math.max(...y))/2;for(let t=0;tv?1+h.scale:1-h.scale)+h.minHeight}let x=(t,e,i,a)=>{let n=s(e||t,i||t),l=o.map(Math.cos(n.angle)*h.flattening,0,1,1,0),r=n.angle*l+(a?Math.PI:0),d=n.length*h.smoothing;return[t[0]+Math.cos(r)*d,t[1]+Math.sin(r)*d]},k=(t,e,i)=>{let a=x(i[e-1],i[e-2],t),n=x(t,i[e-1],i[e+1],!0),o=e===i.length-1?" z":"";return`C ${a[0]},${a[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${o}`},b=m.map(t=>[o.map(t[0],h.xMin,h.xMax,0,u.w),o.map(t[1],h.yMin,h.yMax,u.h,0)]).reduce((t,e,i,a)=>0===i?`M ${a[a.length-1][0]},${u.h} L ${e[0]},${u.h} L ${e[0]},${e[1]}`:`${t} ${k(e,i,a)}`,"");n.innerHTML=``,l=a("#heatmap-start",n),r=a("#heatmap-stop",n),l.setAttribute("offset",`${100*t.played}%`),r.setAttribute("offset",`${100*t.played}%`)}t.on("video:timeupdate",()=>{l&&r&&(l.setAttribute("offset",`${100*t.played}%`),r.setAttribute("offset",`${100*t.played}%`))}),t.on("setBar",(t,e)=>{l&&r&&"played"===t&&(l.setAttribute("offset",`${100*e}%`),r.setAttribute("offset",`${100*e}%`))}),t.on("ready",()=>d()),t.on("resize",()=>d()),t.on("artplayerPluginDanmuku:loaded",()=>d()),t.on("artplayerPluginDanmuku:points",t=>d(t))}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["bgm6t"],"bgm6t","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js index 2b62561b5..1634220b0 100644 --- a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js +++ b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js @@ -1,8 +1,8 @@ /*! - * artplayer-plugin-danmuku.js v5.1.5 + * artplayer-plugin-danmuku.js v5.1.6 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,r,a){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[r]&&o[r],s=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!s[t]){if(!e[t]){var a="function"==typeof o[r]&&o[r];if(!n&&a)return a(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var p=s[t]=new u.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=i,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return o[r]}}),o[r]=u;for(var c=0;c=n.time&&n.time>=e-.1&&t.push(n)}),t}},{key:"visibles",get:function(){var e=this,t=[],n=this.$player.clientWidth,r=this.getLeft(this.$player);return this.filter("emit",function(a){var o=a.$ref.offsetTop,i=e.getLeft(a.$ref)-r,s=a.$ref.clientHeight,l=a.$ref.clientWidth,u=i+l,c=u/a.$restTime,p={};p.top=o,p.left=i,p.height=s,p.width=l,p.right=n-u,p.speed=c,p.distance=u,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}},{key:"speed",get:function(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}},{key:"load",value:function(e){var t=this;return(0,a._)(function(){var n,r,a,o,i,s;return(0,u._)(this,function(l){switch(l.label){case 0:n=t.utils.errorHandle,r=[],a=e||t.option.danmuku,l.label=1;case 1:if(l.trys.push([1,13,,14]),"function"!=typeof a)return[3,3];return[4,a()];case 2:case 4:case 6:return r=l.sent(),[3,8];case 3:if(!(a instanceof Promise))return[3,5];return[4,a];case 5:if("string"!=typeof a)return[3,7];return[4,(0,c.bilibiliDanmuParseFromUrl)(a)];case 7:Array.isArray(a)&&(r=a),l.label=8;case 8:n(Array.isArray(r),"Danmuku need return an array as result"),void 0===e&&(t.reset(),t.queue=[],t.states={wait:[],ready:[],emit:[],stop:[]},t.$refs=[],t.$danmuku.innerText=""),o=0,l.label=9;case 9:if(!(o0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(n){t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var r=e.data;r.id===t.id&&n(r)}})}},{key:"filter",value:function(e,t){for(var n=this.states[e]||[],r=0;rt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function u(e,t,n,r){var a,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,r){t(n,r,e)}}function p(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,p=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),d=!1,f=n.length-1;f>=0;f--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var y=(0,n[f])("accessor"===l?{get:p.get,set:p.set}:p[u],h);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(s=i(y.get))&&(p.get=s),(s=i(y.set))&&(p.set=s),(s=i(y.init))&&a.unshift(s)}else(s=i(y))&&("field"===l?a.unshift(s):p[u]=s)}c&&Object.defineProperty(c,r.name,p),d=!0}function d(e,t,n){for(var r=arguments.length>2,a=0;a0&&a[a.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function k(){for(var e=[],t=0;t1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{var n;(n=a[e](t)).value instanceof $?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function S(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:$(e[r](t)),done:!1}:a?a(t):t}:a}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,a,(t=e[n](t)).done,t.value)})}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&v(t,e,n);return P(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function A(e,t,n,r,a){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n}function z(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function I(e,t,n){if(null!=t){var r,a;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(n){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(a=r)}if("function"!=typeof r)throw TypeError("Object not disposable.");a&&(r=function(){try{a.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var C="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function R(e){function t(t){e.error=e.hasError?new C(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var a=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(a).then(n,function(e){return t(e),n()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}n.default={__extends:i,__assign:s,__rest:l,__decorate:u,__param:c,__metadata:m,__awaiter:y,__generator:g,__createBinding:v,__exportStar:_,__values:b,__read:x,__spread:k,__spreadArrays:w,__spreadArray:j,__await:$,__asyncGenerator:O,__asyncDelegator:S,__asyncValues:D,__makeTemplateObject:M,__importStar:F,__importDefault:E,__classPrivateFieldGet:T,__classPrivateFieldSet:A,__classPrivateFieldIn:z,__addDisposableResource:I,__disposeResources:R}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}r.defineInteropFlag(n),r.export(n,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kMsXR:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"bilibiliDanmuParseFromUrl",function(){return u});var a=e("@swc/helpers/_/_async_to_generator"),o=e("@swc/helpers/_/_ts_generator");function i(e){switch(e){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function s(e){if("string"!=typeof e)return[];var t=new RegExp(RegExp('(?.+?)<\\/d>',"gs"));return Array.from(e.matchAll(t)).map(function(e){var t=e.groups.p.split(",");return t.length>=8?{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(t[0]),mode:i(Number(t[1])),fontSize:Number(t[2]),color:"#".concat(Number(t[3]).toString(16)),timestamp:Number(t[4]),pool:Number(t[5]),userID:t[6],rowID:Number(t[7])}:null}).filter(Boolean)}function l(e){var t=e.data,n=t.xml,r=t.id;if(r&&n){var a=s(n);self.postMessage({danmus:a,id:r})}}function u(e){var t;return new Promise((t=(0,a._)(function(t){var n,r;return(0,o._)(this,function(a){switch(a.label){case 0:return[4,fetch(e)];case 1:return[4,a.sent().text()];case 2:n=a.sent();try{var o;o=new Blob(["\n ".concat(i.toString(),"\n ").concat(s.toString(),"\n onmessage = ").concat(l.toString(),"\n ")],{type:"application/javascript"}),(r=new Worker(URL.createObjectURL(o))).onmessage=function(e){var n=e.data,a=n.danmus;n.id&&a&&(t(a),r.terminate())},r.postMessage({xml:n,id:Date.now()})}catch(e){t(s(n))}return[2]}})}),function(e){return t.apply(this,arguments)}))}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1gMd5":[function(e,t,n){t.exports='!function(e,r,t,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],s=i.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(r,t){if(!s[r]){if(!e[r]){var o="function"==typeof a[n]&&a[n];if(!t&&o)return o(r,!0);if(i)return i(r,!0);if(u&&"string"==typeof r)return u(r);var f=Error("Cannot find module \'"+r+"\'");throw f.code="MODULE_NOT_FOUND",f}c.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},c.cache={};var p=s[r]=new l.Module(r);e[r][0].call(p.exports,c,p,p.exports,this)}return s[r].exports;function c(e){var r=c.resolve(e);return!1===r?{}:l(r)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=s,l.parent=i,l.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(l,"root",{get:function(){return a[n]}}),a[n]=l;for(var f=0;f=0;p-=1){var c=f[p],d=f[p+1],h=c.top+c.height;if(d.top-h>=r.height)return d.top-r.height}else for(var _=1;_=r.height)return g}for(var j=[],v=1;ve.time)})});return x&&x[0]?x[0].top:void 0;case 1:case 2:return}else{switch(r.mode){case 0:j.sort(function(e,r){var t,o,a=(t=Math).min.apply(t,(0,n._)(r.map(function(e){return e.right}))),i=(o=Math).min.apply(o,(0,n._)(e.map(function(e){return e.right})));return a*r.length-i*e.length});break;case 1:case 2:j.sort(function(e,r){var t,o,a=(t=Math).max.apply(t,(0,n._)(r.map(function(e){return e.width})));return(o=Math).max.apply(o,(0,n._)(e.map(function(e){return e.width})))*e.length-a*r.length})}return j[0][0].top}}onmessage=function(e){var r=e.data;if(r.id&&r.type){var t=(0,({getDanmuTop:o})[r.type])(r);self.postMessage({result:t,id:r.id})}}},{"@swc/helpers/_/_to_consumable_array":"iwLF0"}],iwLF0:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return u});var o=e("./_array_without_holes.js"),a=e("./_iterable_to_array.js"),i=e("./_non_iterable_spread.js"),s=e("./_unsupported_iterable_to_array.js");function u(e){return(0,o._)(e)||(0,a._)(e)||(0,s._)(e)||(0,i._)()}},{"./_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(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return a});var o=e("./_array_like_to_array.js");function a(e){if(Array.isArray(e))return(0,o._)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t\n '.concat(h.default).concat(y.default,'\n
\n
\n ').concat(v.default,'\n
\n
\n
\n 按类型屏蔽\n
\n
\n ').concat(k.default).concat(j.default,'\n
滚动
\n
\n
\n ').concat(O.default).concat(D.default,'\n
顶部
\n
\n
\n ').concat(P.default).concat(E.default,'\n
底部
\n
\n
\n
\n
\n
\n ').concat(A.default).concat(I.default,'\n 防止弹幕重叠\n
\n
\n ').concat(A.default).concat(I.default,'\n 同步视频速度\n
\n
\n
\n 不透明度\n
\n
未知
\n
\n
\n 显示区域\n
\n
未知
\n
\n
\n 弹幕字号\n
\n
未知
\n
\n
\n 弹幕速度\n
\n
未知
\n
\n
\n
\n
\n
\n
\n ').concat(b.default,'\n
\n
\n
\n 模式\n
\n
\n ').concat(j.default,'\n
滚动
\n
\n
\n ').concat(D.default,'\n
顶部
\n
\n
\n ').concat(E.default,'\n
底部
\n
\n
\n
\n
\n 颜色\n
\n ').concat(this.COLOR.map(function(e){return'
')}).join(""),'\n
\n
\n
\n
\n
\n\n
发送
\n
\n ')}},{key:"OPACITY",get:function(){return(0,s._)({min:0,max:100,steps:[]},this.option.OPACITY)}},{key:"FONT_SIZE",get:function(){return(0,s._)({min:12,max:120,steps:[]},this.option.FONT_SIZE)}},{key:"MARGIN",get:function(){return(0,s._)({min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}]},this.option.MARGIN)}},{key:"SPEED",get:function(){return(0,s._)({min:0,max:4,steps:[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}]},this.option.SPEED)}},{key:"COLOR",get:function(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}},{key:"query",value:function(e){return(0,this.utils.query)(e,this.template.$danmuku)}},{key:"append",value:function(e,t){var n=this.utils.append;(0,u._)(e.children).some(function(e){return e===t})||n(e,t)}},{key:"setData",value:function(e,t){var n=this.art.template.$player,r=this.template.$mount;n.dataset[e]=t,this.outside&&(r.dataset[e]=t)}},{key:"createTemplate",value:function(){var e=this.utils,t=e.createElement,n=e.tooltip,r=t("div");r.className="artplayer-plugin-danmuku",r.innerHTML=this.TEMPLATE,this.template.$danmuku=r,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");var a=this.template.$toggle;this.art.on("artplayerPluginDanmuku:show",function(){n(a,"关闭弹幕")}),this.art.on("artplayerPluginDanmuku:hide",function(){n(a,"打开弹幕")})}},{key:"createEvents",value:function(){var e=this,t=this.template,n=t.$toggle,r=t.$configModes,a=t.$styleModes,o=t.$colors,i=t.$antiOverlap,s=t.$syncVideo,l=t.$send,c=t.$input;this.art.proxy(n,"click",function(){e.danmuku.config({visible:!e.option.visible}),e.reset()}),this.art.proxy(r,"click",function(t){var n=t.target.closest(".apd-mode");if(n){var r=Number(n.dataset.mode);e.option.modes.includes(r)?e.danmuku.config({modes:e.option.modes.filter(function(e){return e!==r})}):e.danmuku.config({modes:(0,u._)(e.option.modes).concat([r])}),e.reset()}}),this.art.proxy(i,"click",function(){e.danmuku.config({antiOverlap:!e.option.antiOverlap}),e.reset()}),this.art.proxy(s,"click",function(){e.danmuku.config({synchronousPlayback:!e.option.synchronousPlayback}),e.reset()}),this.art.proxy(a,"click",function(t){var n=t.target.closest(".apd-mode");if(n){var r=Number(n.dataset.mode);e.danmuku.config({mode:r}),e.reset()}}),this.art.proxy(o,"click",function(t){var n=t.target.closest(".apd-color");n&&(e.danmuku.config({color:n.dataset.color}),e.reset())}),this.art.proxy(l,"click",function(){return e.emit()}),this.art.proxy(c,"keypress",function(t){"Enter"===t.key&&(t.preventDefault(),e.emit())})}},{key:"createSliders",value:function(){var e=this;this.slider.opacity=this.createSlider((0,l._)((0,s._)({},this.OPACITY),{container:this.template.$opacitySlider,findIndex:function(){return Math.round(100*e.option.opacity)},onChange:function(t){e.template.$opacityValue.textContent="".concat(t,"%"),e.danmuku.config({opacity:t/100})}})),this.slider.margin=this.createSlider((0,l._)((0,s._)({},this.MARGIN),{container:this.template.$marginSlider,findIndex:function(){return e.MARGIN.steps.findIndex(function(t){return t.value[0]===e.option.margin[0]&&t.value[1]===e.option.margin[1]})},onChange:function(t){var n=e.MARGIN.steps[t];n&&(e.template.$marginValue.textContent=n.name,e.danmuku.config({margin:n.value}))}})),this.slider.fontSize=this.createSlider((0,l._)((0,s._)({},this.FONT_SIZE),{container:this.template.$fontSizeSlider,findIndex:function(){return e.danmuku.fontSize},onChange:function(t){e.template.$fontSizeValue.textContent="".concat(t,"px"),t!==e.danmuku.fontSize&&e.danmuku.config({fontSize:t})}})),this.slider.speed=this.createSlider((0,l._)((0,s._)({},this.SPEED),{container:this.template.$speedSlider,findIndex:function(){return e.SPEED.steps.findIndex(function(t){return t.value===e.option.speed})},onChange:function(t){var n=e.SPEED.steps[t];n&&(e.template.$speedValue.textContent=n.name,e.danmuku.config({speed:n.value}))}}))}},{key:"createSlider",value:function(e){var t=this,n=e.min,r=e.max,a=e.container,o=e.findIndex,i=e.onChange,s=e.steps,l=void 0===s?[]:s,u=this.utils,c=u.query,p=u.clamp;(0,u.setStyle)(a,"touch-action","none"),a.innerHTML='\n
\n
\n '.concat(l.map(function(){return'
'}).join(""),'\n
\n
\n
\n
\n
\n ').concat(l.map(function(e){return e.hide?"":'
'.concat(e.name,"
")}).join(""),"\n
\n ");var d=c(".apd-slider-dot",a),f=c(".apd-slider-progress",a),h=!1;function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();if(!(er)){var t=(e-n)/(r-n);d.style.left="".concat(100*t,"%"),0===l.length&&(f.style.width=d.style.left),i(e)}}function y(e){var t=a.getBoundingClientRect(),o=t.top,i=t.height,s=t.left,l=t.width;this.art.isRotate?m(Math.round(p(e.clientY-o,0,i)/i*(r-n)+n)):m(Math.round(p(e.clientX-s,0,l)/l*(r-n)+n))}return this.art.proxy(a,"click",function(e){y.call(t,e)}),this.art.proxy(a,"pointerdown",function(e){h=0===e.button}),this.art.proxy(document,"pointermove",function(e){h&&y.call(t,e)}),this.art.proxy(document,"pointerup",function(e){h&&(h=!1,y.call(t,e))}),{reset:m}}},{key:"onFullscreen",value:function(e){var t=this.template,n=t.$danmuku,r=t.$controlsCenter,a=t.$mount;this.outside?e?this.append(r,n):this.append(a,n):this.append(r,n)}},{key:"onMouseEnter",value:function(e){var t=e.$control,n=e.$panel,r=this.art.template.$player,a=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=r.getBoundingClientRect(),s=o.width/2-a.width/2,l=i.left-(a.left-s),u=a.right+s-i.right;l>0?n.style.left="".concat(-s+l,"px"):u>0?n.style.left="".concat(-s-u,"px"):n.style.left="".concat(-s,"px")}},{key:"emit",value:function(){var e=this;return(0,a._)(function(){var t,n,r,a;return(0,c._)(this,function(o){switch(o.label){case 0:if(!(n=(t=e.template.$input).value.trim()).length||e.isLock||e.emitting)return[2];r={text:n,mode:e.option.mode,color:e.option.color,time:e.art.currentTime},o.label=1;case 1:return o.trys.push([1,3,,4]),e.emitting=!0,[4,e.option.beforeEmit(r)];case 2:if(a=o.sent(),e.emitting=!1,!0!==a)return[2];return r.border=!0,delete r.time,e.danmuku.emit(r),t.value="",e.lock(),[3,4];case 3:return o.sent(),e.emitting=!1,[3,4];case 4:return[2]}})})()}},{key:"lock",value:function(){var e=this,t=this.utils.addClass,n=this.template.$send;this.isLock=!0;var r=this.option.lockTime;n.innerText=r,t(n,"apd-lock");var a=function(){e.timer=setTimeout(function(){0===r?e.unlock():(r-=1,n.innerText=r,a())},1e3)};a()}},{key:"unlock",value:function(){var e=this.utils.removeClass,t=this.template.$send;clearTimeout(this.timer),this.isLock=!1,t.innerText="发送",e(t,"apd-lock")}},{key:"resize",value:function(){if(!this.outside&&!this.art.fullscreen&&!this.art.fullscreenWeb){var e=this.art.template,t=e.$player,n=e.$controlsCenter,r=this.template.$danmuku;this.art.widthe.length)&&(t=e.length);for(var n=0,r=Array(t);n.artplayer-plugin-danmuku{padding:0 10px;position:absolute;bottom:-40px;left:0;right:0}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"4mwSI":[function(e,t,n){t.exports=''},{}],"9bQDs":[function(e,t,n){t.exports=''},{}],cciuY:[function(e,t,n){t.exports=''},{}],e5G6o:[function(e,t,n){t.exports=''},{}],fC4yA:[function(e,t,n){t.exports=''},{}],fUkVg:[function(e,t,n){t.exports=''},{}],isoJm:[function(e,t,n){t.exports=''},{}],"20nBM":[function(e,t,n){t.exports=''},{}],"6x9CL":[function(e,t,n){t.exports=''},{}],"7GKdL":[function(e,t,n){t.exports=''},{}],"9SCIh":[function(e,t,n){t.exports=''},{}],"6KRxn":[function(e,t,n){t.exports=''},{}],dXFn2:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"default",function(){return s});var a=e("@swc/helpers/_/_to_consumable_array"),o={map:function(e,t,n,r,a){return(e-t)*(a-r)/(n-t)+r}},i=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),angle:Math.atan2(r,n)}};function s(e,t,n){var r=e.constructor.utils.query;e.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted:function(s){var l=null,u=null;function c(){var c,p,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(l=null,u=null,s.innerHTML="",e.duration&&!e.option.isLive){var f={w:s.offsetWidth,h:s.offsetHeight},h={xMin:0,xMax:f.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*f.h),sampling:Math.floor(f.w/100),smoothing:.2,flattening:.2};"object"==typeof n&&Object.assign(h,n);var m=[];if(Array.isArray(d)&&d.length)m=(0,a._)(d);else for(var y=function(e){var n=t.queue.filter(function(t){var n=t.time;return n>e*g&&n<=(e+h.sampling)*g}).length;m.push([e,n])},g=e.duration/f.w,v=0;v<=f.w;v+=h.sampling)y(v);if(0!==m.length){var _=m[m.length-1],b=_[0],x=_[1];b!==f.w&&m.push([f.w,x]);for(var k=m.map(function(e){return e[1]}),w=((c=Math).min.apply(c,(0,a._)(k))+(p=Math).max.apply(p,(0,a._)(k)))/2,j=0;jw?1+h.scale:1-h.scale)+h.minHeight}var S=function(e,t,n,r){var a=i(t||e,n||e),s=o.map(Math.cos(a.angle)*h.flattening,0,1,1,0),l=a.angle*s+(r?Math.PI:0),u=a.length*h.smoothing;return[e[0]+Math.cos(l)*u,e[1]+Math.sin(l)*u]},D=function(e,t,n){var r=S(n[t-1],n[t-2],e),a=S(e,n[t-1],n[t+1],!0),o=t===n.length-1?" z":"";return"C ".concat(r[0],",").concat(r[1]," ").concat(a[0],",").concat(a[1]," ").concat(e[0],",").concat(e[1]).concat(o)},M=m.map(function(e){return[o.map(e[0],h.xMin,h.xMax,0,f.w),o.map(e[1],h.yMin,h.yMax,f.h,0)]}).reduce(function(e,t,n,r){return 0===n?"M ".concat(r[r.length-1][0],",").concat(f.h," L ").concat(t[0],",").concat(f.h," L ").concat(t[0],",").concat(t[1]):"".concat(e," ").concat(D(t,n,r))},"");s.innerHTML='\n\n\n\n\n\n\n\n\n\n\n\n '),l=r("#heatmap-start",s),u=r("#heatmap-stop",s),l.setAttribute("offset","".concat(100*e.played,"%")),u.setAttribute("offset","".concat(100*e.played,"%"))}}}e.on("video:timeupdate",function(){l&&u&&(l.setAttribute("offset","".concat(100*e.played,"%")),u.setAttribute("offset","".concat(100*e.played,"%")))}),e.on("setBar",function(e,t){l&&u&&"played"===e&&(l.setAttribute("offset","".concat(100*t,"%")),u.setAttribute("offset","".concat(100*t,"%")))}),e.on("ready",function(){return c()}),e.on("resize",function(){return c()}),e.on("artplayerPluginDanmuku:loaded",function(){return c()}),e.on("artplayerPluginDanmuku:points",function(e){return c(e)})}})}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,r,a,o,i,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof l[r]&&l[r],c=u.i||{},p=u.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!p[t]){if(!e[t]){if(a[t])return a[t];var o="function"==typeof l[r]&&l[r];if(!n&&o)return o(t,!0);if(u)return u(t,!0);if(d&&"string"==typeof t)return d(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}c.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},c.cache={};var s=p[t]=new f.Module(t);e[t][0].call(s.exports,c,s,s.exports,l)}return p[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=d,this.exports={}},f.modules=e,f.cache=p,f.parent=u,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=c,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return l[r]}}),l[r]=f;for(var h=0;h=n.time&&n.time>=e-.1&&t.push(n)}),t}},{key:"visibles",get:function(){var e=this,t=[],n=this.$player.clientWidth,r=this.getLeft(this.$player);return this.filter("emit",function(a){var o=a.$ref.offsetTop,i=e.getLeft(a.$ref)-r,s=a.$ref.clientHeight,l=a.$ref.clientWidth,u=i+l,c=u/a.$restTime,p={};p.top=o,p.left=i,p.height=s,p.width=l,p.right=n-u,p.speed=c,p.distance=u,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}},{key:"speed",get:function(){return this.option.synchronousPlayback&&this.art.playbackRate?this.option.speed/Number(this.art.playbackRate):this.option.speed}},{key:"load",value:function(e){var t=this;return(0,o._)(function(){var n,r,a,o,i,s;return(0,c._)(this,function(l){switch(l.label){case 0:n=t.utils.errorHandle,r=[],a=e||t.option.danmuku,l.label=1;case 1:if(l.trys.push([1,13,,14]),"function"!=typeof a)return[3,3];return[4,a()];case 2:case 4:case 6:return r=l.sent(),[3,8];case 3:if(!(a instanceof Promise))return[3,5];return[4,a];case 5:if("string"!=typeof a)return[3,7];return[4,(0,p.bilibiliDanmuParseFromUrl)(a)];case 7:Array.isArray(a)&&(r=a),l.label=8;case 8:n(Array.isArray(r),"Danmuku need return an array as result"),void 0===e&&(t.reset(),t.queue=[],t.states={wait:[],ready:[],emit:[],stop:[]},t.$refs=[],t.$danmuku.innerText=""),o=0,l.label=9;case 9:if(!(o0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(n){t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var r=e.data;r.id===t.id&&n(r)}})}},{key:"filter",value:function(e,t){for(var n=this.states[e]||[],r=0;rt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function c(e,t,n,r){var a,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(("undefined"==typeof Reflect?"undefined":(0,o._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function p(e,t){return function(n,r){t(n,r,e)}}function d(e,t,n,r,a,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",p=!t&&e?r.static?e:e.prototype:null,d=t||(p?Object.getOwnPropertyDescriptor(p,r.name):{}),f=!1,h=n.length-1;h>=0;h--){var m={};for(var y in r)m[y]="access"===y?{}:r[y];for(var y in r.access)m.access[y]=r.access[y];m.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var g=(0,n[h])("accessor"===u?{get:d.get,set:d.set}:d[c],m);if("accessor"===u){if(void 0===g)continue;if(null===g||(void 0===g?"undefined":(0,o._)(g))!=="object")throw TypeError("Object expected");(l=s(g.get))&&(d.get=l),(l=s(g.set))&&(d.set=l),(l=s(g.init))&&a.unshift(l)}else(l=s(g))&&("field"===u?a.unshift(l):d[c]=l)}p&&Object.defineProperty(p,r.name,d),f=!0}function f(e,t,n){for(var r=arguments.length>2,a=0;a0&&a[a.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function w(){for(var e=[],t=0;t1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{var n;(n=a[e](t)).value instanceof O?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function D(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:O(e[r](t)),done:!1}:a?a(t):t}:a}}function P(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=x(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){var o,i,s;o=r,i=a,s=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:s})},i)})}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var E=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},F=function(e){return(F=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=F(e),r=0;r(?.+?)<\\/d>',"gs"));return Array.from(e.matchAll(t)).map(function(e){var t=e.groups.p.split(",");return t.length>=8?{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(t[0]),mode:s(Number(t[1])),fontSize:Number(t[2]),color:"#".concat(Number(t[3]).toString(16)),timestamp:Number(t[4]),pool:Number(t[5]),userID:t[6],rowID:Number(t[7])}:null}).filter(Boolean)}function u(e){var t=e.data,n=t.xml,r=t.id;if(r&&n){var a=l(n);self.postMessage({danmus:a,id:r})}}function c(e){var t;return new Promise((t=(0,o._)(function(t){var n,r;return(0,i._)(this,function(a){switch(a.label){case 0:return[4,fetch(e)];case 1:return[4,a.sent().text()];case 2:n=a.sent();try{var o;o=new Blob(["\n ".concat(s.toString(),"\n ").concat(l.toString(),"\n onmessage = ").concat(u.toString(),"\n ")],{type:"application/javascript"}),(r=new Worker(URL.createObjectURL(o))).onmessage=function(e){var n=e.data,a=n.danmus;n.id&&a&&(t(a),r.terminate())},r.postMessage({xml:n,id:Date.now()})}catch(e){t(l(n))}return[2]}})}),function(e){return t.apply(this,arguments)}))}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1gMd5":[function(e,t,n,r){t.exports='!function(e,r,t,n,o,i,a,s){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof u[n]&&u[n],f=l.i||{},p=l.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(r,t){if(!p[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof u[n]&&u[n];if(!t&&i)return i(r,!0);if(l)return l(r,!0);if(c&&"string"==typeof r)return c(r);var a=Error("Cannot find module \'"+r+"\'");throw a.code="MODULE_NOT_FOUND",a}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var s=p[r]=new d.Module(r);e[r][0].call(s.exports,f,s,s.exports,u)}return p[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:d(r)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=c,this.exports={}},d.modules=e,d.cache=p,d.parent=l,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return u[n]}}),u[n]=d;for(var h=0;h=0;p-=1){var c=f[p],d=f[p+1],h=c.top+c.height;if(d.top-h>=r.height)return d.top-r.height}else for(var _=1;_=r.height)return g}for(var j=[],v=1;ve.time))})});return x&&x[0]?x[0].top:void 0;case 1:case 2:return}else{switch(r.mode){case 0:j.sort(function(e,r){var t,n,i=(t=Math).min.apply(t,(0,o._)(r.map(function(e){return e.right}))),a=(n=Math).min.apply(n,(0,o._)(e.map(function(e){return e.right})));return i*r.length-a*e.length});break;case 1:case 2:j.sort(function(e,r){var t,n,i=(t=Math).max.apply(t,(0,o._)(r.map(function(e){return e.width})));return(n=Math).max.apply(n,(0,o._)(e.map(function(e){return e.width})))*e.length-i*r.length})}return j[0][0].top}}onmessage=function(e){var r=e.data;if(r.id&&r.type){var t=(0,({getDanmuTop:i})[r.type])(r);self.postMessage({result:t,id:r.id})}}},{"@swc/helpers/_/_to_consumable_array":"iwLF0"}],iwLF0:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return l});var i=e("./_array_without_holes.js"),a=e("./_iterable_to_array.js"),s=e("./_non_iterable_spread.js"),u=e("./_unsupported_iterable_to_array.js");function l(e){return(0,i._)(e)||(0,a._)(e)||(0,u._)(e)||(0,s._)()}},{"./_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(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return a});var i=e("./_array_like_to_array.js");function a(e){if(Array.isArray(e))return(0,i._)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t\n '.concat(m.default).concat(g.default,'\n
\n
\n ').concat(_.default,'\n
\n
\n
\n 按类型屏蔽\n
\n
\n ').concat(w.default).concat($.default,'\n
滚动
\n
\n
\n ').concat(S.default).concat(P.default,'\n
顶部
\n
\n
\n ').concat(E.default).concat(T.default,'\n
底部
\n
\n
\n
\n
\n
\n ').concat(I.default).concat(C.default,'\n 防止弹幕重叠\n
\n
\n ').concat(I.default).concat(C.default,'\n 同步视频速度\n
\n
\n
\n 不透明度\n
\n
未知
\n
\n
\n 显示区域\n
\n
未知
\n
\n
\n 弹幕字号\n
\n
未知
\n
\n
\n 弹幕速度\n
\n
未知
\n
\n
\n
\n
\n
\n
\n ').concat(x.default,'\n
\n
\n
\n 模式\n
\n
\n ').concat($.default,'\n
滚动
\n
\n
\n ').concat(P.default,'\n
顶部
\n
\n
\n ').concat(T.default,'\n
底部
\n
\n
\n
\n
\n 颜色\n
\n ').concat(this.COLOR.map(function(e){return'
')}).join(""),'\n
\n
\n
\n
\n
\n\n
发送
\n
\n ')}},{key:"OPACITY",get:function(){return(0,l._)({min:0,max:100,steps:[]},this.option.OPACITY)}},{key:"FONT_SIZE",get:function(){return(0,l._)({min:12,max:120,steps:[]},this.option.FONT_SIZE)}},{key:"MARGIN",get:function(){return(0,l._)({min:0,max:3,steps:[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}]},this.option.MARGIN)}},{key:"SPEED",get:function(){return(0,l._)({min:0,max:4,steps:[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}]},this.option.SPEED)}},{key:"COLOR",get:function(){return this.option.COLOR.length?this.option.COLOR:["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}},{key:"query",value:function(e){return(0,this.utils.query)(e,this.template.$danmuku)}},{key:"append",value:function(e,t){var n=this.utils.append;(0,c._)(e.children).some(function(e){return e===t})||n(e,t)}},{key:"setData",value:function(e,t){var n=this.art.template.$player,r=this.template.$mount;n.dataset[e]=t,this.outside&&(r.dataset[e]=t)}},{key:"createTemplate",value:function(){var e=this.utils,t=e.createElement,n=e.tooltip,r=t("div");r.className="artplayer-plugin-danmuku",r.innerHTML=this.TEMPLATE,this.template.$danmuku=r,this.template.$toggle=this.query(".apd-toggle"),this.template.$config=this.query(".apd-config"),this.template.$configPanel=this.query(".apd-config-panel"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$style=this.query(".apd-style"),this.template.$stylePanel=this.query(".apd-style-panel"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send");var a=this.template.$toggle;this.art.on("artplayerPluginDanmuku:show",function(){n(a,"关闭弹幕")}),this.art.on("artplayerPluginDanmuku:hide",function(){n(a,"打开弹幕")})}},{key:"createEvents",value:function(){var e=this,t=this.template,n=t.$toggle,r=t.$configModes,a=t.$styleModes,o=t.$colors,i=t.$antiOverlap,s=t.$syncVideo,l=t.$send,u=t.$input;this.art.proxy(n,"click",function(){e.danmuku.config({visible:!e.option.visible}),e.reset()}),this.art.proxy(r,"click",function(t){var n=t.target.closest(".apd-mode");if(n){var r=Number(n.dataset.mode);e.option.modes.includes(r)?e.danmuku.config({modes:e.option.modes.filter(function(e){return e!==r})}):e.danmuku.config({modes:(0,c._)(e.option.modes).concat([r])}),e.reset()}}),this.art.proxy(i,"click",function(){e.danmuku.config({antiOverlap:!e.option.antiOverlap}),e.reset()}),this.art.proxy(s,"click",function(){e.danmuku.config({synchronousPlayback:!e.option.synchronousPlayback}),e.reset()}),this.art.proxy(a,"click",function(t){var n=t.target.closest(".apd-mode");if(n){var r=Number(n.dataset.mode);e.danmuku.config({mode:r}),e.reset()}}),this.art.proxy(o,"click",function(t){var n=t.target.closest(".apd-color");n&&(e.danmuku.config({color:n.dataset.color}),e.reset())}),this.art.proxy(l,"click",function(){return e.emit()}),this.art.proxy(u,"keypress",function(t){"Enter"===t.key&&(t.preventDefault(),e.emit())})}},{key:"createSliders",value:function(){var e=this;this.slider.opacity=this.createSlider((0,u._)((0,l._)({},this.OPACITY),{container:this.template.$opacitySlider,findIndex:function(){return Math.round(100*e.option.opacity)},onChange:function(t){e.template.$opacityValue.textContent="".concat(t,"%"),e.danmuku.config({opacity:t/100})}})),this.slider.margin=this.createSlider((0,u._)((0,l._)({},this.MARGIN),{container:this.template.$marginSlider,findIndex:function(){return e.MARGIN.steps.findIndex(function(t){return t.value[0]===e.option.margin[0]&&t.value[1]===e.option.margin[1]})},onChange:function(t){var n=e.MARGIN.steps[t];n&&(e.template.$marginValue.textContent=n.name,e.danmuku.config({margin:n.value}))}})),this.slider.fontSize=this.createSlider((0,u._)((0,l._)({},this.FONT_SIZE),{container:this.template.$fontSizeSlider,findIndex:function(){return e.danmuku.fontSize},onChange:function(t){e.template.$fontSizeValue.textContent="".concat(t,"px"),t!==e.danmuku.fontSize&&e.danmuku.config({fontSize:t})}})),this.slider.speed=this.createSlider((0,u._)((0,l._)({},this.SPEED),{container:this.template.$speedSlider,findIndex:function(){return e.SPEED.steps.findIndex(function(t){return t.value===e.option.speed})},onChange:function(t){var n=e.SPEED.steps[t];n&&(e.template.$speedValue.textContent=n.name,e.danmuku.config({speed:n.value}))}}))}},{key:"createSlider",value:function(e){var t=this,n=e.min,r=e.max,a=e.container,o=e.findIndex,i=e.onChange,s=e.steps,l=void 0===s?[]:s,u=this.utils,c=u.query,p=u.clamp;(0,u.setStyle)(a,"touch-action","none"),a.innerHTML='\n
\n
\n '.concat(l.map(function(){return'
'}).join(""),'\n
\n
\n
\n
\n
\n ').concat(l.map(function(e){return e.hide?"":'
'.concat(e.name,"
")}).join(""),"\n
\n ");var d=c(".apd-slider-dot",a),f=c(".apd-slider-progress",a),h=!1;function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();if(!(er)){var t=(e-n)/(r-n);d.style.left="".concat(100*t,"%"),0===l.length&&(f.style.width=d.style.left),i(e)}}function y(e){var t=a.getBoundingClientRect(),o=t.top,i=t.height,s=t.left,l=t.width;this.art.isRotate?m(Math.round(p(e.clientY-o,0,i)/i*(r-n)+n)):m(Math.round(p(e.clientX-s,0,l)/l*(r-n)+n))}return this.art.proxy(a,"click",function(e){y.call(t,e)}),this.art.proxy(a,"pointerdown",function(e){h=0===e.button}),this.art.proxy(document,"pointermove",function(e){h&&y.call(t,e)}),this.art.proxy(document,"pointerup",function(e){h&&(h=!1,y.call(t,e))}),{reset:m}}},{key:"onFullscreen",value:function(e){var t=this.template,n=t.$danmuku,r=t.$controlsCenter,a=t.$mount;this.outside?e?this.append(r,n):this.append(a,n):this.append(r,n)}},{key:"onMouseEnter",value:function(e){var t=e.$control,n=e.$panel,r=this.art.template.$player,a=t.getBoundingClientRect(),o=n.getBoundingClientRect(),i=r.getBoundingClientRect(),s=o.width/2-a.width/2,l=i.left-(a.left-s),u=a.right+s-i.right;l>0?n.style.left="".concat(-s+l,"px"):u>0?n.style.left="".concat(-s-u,"px"):n.style.left="".concat(-s,"px")}},{key:"emit",value:function(){var e=this;return(0,o._)(function(){var t,n,r,a;return(0,p._)(this,function(o){switch(o.label){case 0:if(!(n=(t=e.template.$input).value.trim()).length||e.isLock||e.emitting)return[2];r={text:n,mode:e.option.mode,color:e.option.color,time:e.art.currentTime},o.label=1;case 1:return o.trys.push([1,3,,4]),e.emitting=!0,[4,e.option.beforeEmit(r)];case 2:if(a=o.sent(),e.emitting=!1,!0!==a)return[2];return r.border=!0,delete r.time,e.danmuku.emit(r),t.value="",e.lock(),[3,4];case 3:return o.sent(),e.emitting=!1,[3,4];case 4:return[2]}})})()}},{key:"lock",value:function(){var e=this,t=this.utils.addClass,n=this.template.$send;this.isLock=!0;var r=this.option.lockTime;n.innerText=r,t(n,"apd-lock");var a=function(){e.timer=setTimeout(function(){0===r?e.unlock():(n.innerText=r-=1,a())},1e3)};a()}},{key:"unlock",value:function(){var e=this.utils.removeClass,t=this.template.$send;clearTimeout(this.timer),this.isLock=!1,t.innerText="发送",e(t,"apd-lock")}},{key:"resize",value:function(){if(!this.outside&&!this.art.fullscreen&&!this.art.fullscreenWeb){var e=this.art.template,t=e.$player,n=e.$controlsCenter,r=this.template.$danmuku;this.art.widthe.length)&&(t=e.length);for(var n=0,r=Array(t);n.artplayer-plugin-danmuku{padding:0 10px;position:absolute;bottom:-40px;left:0;right:0}.art-video-player:has(>.artplayer-plugin-danmuku){margin-bottom:40px}[data-danmuku-emitter=false] .apd-emitter{display:none!important}[data-danmuku-emitter=false] .art-controls-center .artplayer-plugin-danmuku{justify-content:flex-end;gap:18px}[data-danmuku-emitter=false].art-fullscreen .art-controls-center .artplayer-plugin-danmuku,[data-danmuku-emitter=false].art-fullscreen-web .art-controls-center .artplayer-plugin-danmuku{gap:24px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"4mwSI":[function(e,t,n,r){t.exports=''},{}],"9bQDs":[function(e,t,n,r){t.exports=''},{}],cciuY:[function(e,t,n,r){t.exports=''},{}],e5G6o:[function(e,t,n,r){t.exports=''},{}],fC4yA:[function(e,t,n,r){t.exports=''},{}],fUkVg:[function(e,t,n,r){t.exports=''},{}],isoJm:[function(e,t,n,r){t.exports=''},{}],"20nBM":[function(e,t,n,r){t.exports=''},{}],"6x9CL":[function(e,t,n,r){t.exports=''},{}],"7GKdL":[function(e,t,n,r){t.exports=''},{}],"9SCIh":[function(e,t,n,r){t.exports=''},{}],"6KRxn":[function(e,t,n,r){t.exports=''},{}],dXFn2:[function(e,t,n,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(n),a.export(n,"default",function(){return u});var o=e("@swc/helpers/_/_to_consumable_array"),i=e("@swc/helpers/_/_type_of"),s={map:function(e,t,n,r,a){return(e-t)*(a-r)/(n-t)+r}},l=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),angle:Math.atan2(r,n)}};function u(e,t,n){var r=e.constructor.utils.query;e.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted:function(a){var u=null,c=null;function p(){var p,d,f=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(u=null,c=null,a.innerHTML="",e.duration&&!e.option.isLive){var h={w:a.offsetWidth,h:a.offsetHeight},m={xMin:0,xMax:h.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*h.h),sampling:Math.floor(h.w/100),smoothing:.2,flattening:.2};(void 0===n?"undefined":(0,i._)(n))==="object"&&Object.assign(m,n);var y=[];if(Array.isArray(f)&&f.length)y=(0,o._)(f);else for(var g=function(e){var n=t.queue.filter(function(t){var n=t.time;return n>e*v&&n<=(e+m.sampling)*v}).length;y.push([e,n])},v=e.duration/h.w,_=0;_<=h.w;_+=m.sampling)g(_);if(0!==y.length){var b=y[y.length-1],x=b[0],k=b[1];x!==h.w&&y.push([h.w,k]);for(var w=y.map(function(e){return e[1]}),j=((p=Math).min.apply(p,(0,o._)(w))+(d=Math).max.apply(d,(0,o._)(w)))/2,$=0;$j?1+m.scale:1-m.scale)+m.minHeight}var D=function(e,t,n,r){var a=l(t||e,n||e),o=s.map(Math.cos(a.angle)*m.flattening,0,1,1,0),i=a.angle*o+(r?Math.PI:0),u=a.length*m.smoothing;return[e[0]+Math.cos(i)*u,e[1]+Math.sin(i)*u]},P=function(e,t,n){var r=D(n[t-1],n[t-2],e),a=D(e,n[t-1],n[t+1],!0),o=t===n.length-1?" z":"";return"C ".concat(r[0],",").concat(r[1]," ").concat(a[0],",").concat(a[1]," ").concat(e[0],",").concat(e[1]).concat(o)},M=y.map(function(e){return[s.map(e[0],m.xMin,m.xMax,0,h.w),s.map(e[1],m.yMin,m.yMax,h.h,0)]}).reduce(function(e,t,n,r){return 0===n?"M ".concat(r[r.length-1][0],",").concat(h.h," L ").concat(t[0],",").concat(h.h," L ").concat(t[0],",").concat(t[1]):"".concat(e," ").concat(P(t,n,r))},"");a.innerHTML='\n\n\n\n\n\n\n\n\n\n\n\n '),u=r("#heatmap-start",a),c=r("#heatmap-stop",a),u.setAttribute("offset","".concat(100*e.played,"%")),c.setAttribute("offset","".concat(100*e.played,"%"))}}}e.on("video:timeupdate",function(){u&&c&&(u.setAttribute("offset","".concat(100*e.played,"%")),c.setAttribute("offset","".concat(100*e.played,"%")))}),e.on("setBar",function(e,t){u&&c&&"played"===e&&(u.setAttribute("offset","".concat(100*t,"%")),c.setAttribute("offset","".concat(100*t,"%")))}),e.on("ready",function(){return p()}),e.on("resize",function(){return p()}),e.on("artplayerPluginDanmuku:loaded",function(){return p()}),e.on("artplayerPluginDanmuku:points",function(e){return p(e)})}})}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-danmuku/package.json b/packages/artplayer-plugin-danmuku/package.json index 00e89fd83..5b7ad0f04 100644 --- a/packages/artplayer-plugin-danmuku/package.json +++ b/packages/artplayer-plugin-danmuku/package.json @@ -21,4 +21,4 @@ "video", "player" ] -} \ No newline at end of file +} diff --git a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.js b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.js index d5718a480..fdfbf4455 100644 --- a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.js +++ b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(a&&"string"==typeof t)return a(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}f.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},f.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,f,c,c.exports,this)}return u[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var s=0;sd);var r=e("bundle-text:./quality.svg"),i=o.interopDefault(r),l=e("bundle-text:./audio.svg"),u=o.interopDefault(l);function a(e,t){let n=new Map;return e.filter(e=>{let o=e[t];return void 0===o||!n.has(o)&&n.set(o,1)})}function d(e={}){return t=>{let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function r(){o(t.dash.getVideoElement()===n,'Cannot find instance of DASH from "art.dash"'),function(n){let o=n.getBitrateInfoListFor("video");if(!o||!o.length)return;let r=e.quality||{},l=r.auto||"Auto",u=r.title||"Quality",d=r.getName||(e=>`${e.height}p`),s=n.getQualityFor("video"),c=n.getSettings().streaming.abr.autoSwitchBitrate.video,f=c?l:d(o[s]),h=a(o.map(e=>({html:d(e),value:e.qualityIndex,default:s===e.qualityIndex&&!c})),"html").sort((e,t)=>t.value-e.value);h.push({html:l,value:"auto",default:c});let p=e=>("auto"===e.value?n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):(n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),n.setQualityFor("video",e.value)),t.notice.show=`${u}: ${e.html}`,r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html);r.control&&t.controls.update({name:"dash-quality",position:"right",html:f,style:{padding:"0 10px"},selector:h,onSelect:p}),r.setting&&t.setting.update({name:"dash-quality",tooltip:f,html:u,icon:i.default,width:200,selector:h,onSelect:p})}(t.dash),function(n){let o=n.getTracksFor("audio");if(!o||!o.length)return;let r=e.audio||{},i=r.auto||"Auto",l=r.title||"Audio",d=r.getName||(e=>e.lang||e.id),s=n.getCurrentTrackFor("audio")||o[0],c=s?d(s):i,f=a(o.map(e=>({html:d(e),value:e,default:s===e})),"html"),h=e=>(n.setCurrentTrack(e.value),t.notice.show=`${l}: ${e.html}`,r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html);r.control&&t.controls.update({name:"dash-audio",position:"right",html:c,style:{padding:"0 10px"},selector:f,onSelect:h}),r.setting&&t.setting.update({name:"dash-audio",tooltip:c,html:l,icon:u.default,width:200,selector:f,onSelect:h})}(t.dash)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginDashControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginDashControl=d)},{"bundle-text:./quality.svg":"aRkFd","bundle-text:./audio.svg":"hfT2T","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aRkFd:[function(e,t,n){t.exports=''},{}],hfT2T:[function(e,t,n){t.exports=''},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["hRBuj"],"hRBuj","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,o,n,r,i,l,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof a[n]&&a[n],s=d.i||{},c=d.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,o){if(!c[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof a[n]&&a[n];if(!o&&i)return i(t,!0);if(d)return d(t,!0);if(f&&"string"==typeof t)return f(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}s.resolve=function(o){var n=e[t][1][o];return null!=n?n:o},s.cache={};var u=c[t]=new h.Module(t);e[t][0].call(u.exports,s,u,u.exports,a)}return c[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.require=f,this.exports={}},h.modules=e,h.cache=c,h.parent=d,h.distDir=void 0,h.publicUrl=void 0,h.devServer=void 0,h.i=s,h.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(h,"root",{get:function(){return a[n]}}),a[n]=h;for(var p=0;ps);var i=e("bundle-text:./quality.svg"),l=r.interopDefault(i),u=e("bundle-text:./audio.svg"),a=r.interopDefault(u);function d(e,t){let o=new Map;return e.filter(e=>{let n=e[t];return void 0===n||!o.has(n)&&o.set(n,1)})}function s(e={}){return t=>{let{$video:o}=t.template,{errorHandle:n}=t.constructor.utils;function r(){n(t.dash.getVideoElement()===o,'Cannot find instance of DASH from "art.dash"'),function(o){let n=o.getBitrateInfoListFor("video");if(!n||!n.length)return;let r=e.quality||{},i=r.auto||"Auto",u=r.title||"Quality",a=r.getName||(e=>`${e.height}p`),s=o.getQualityFor("video"),c=o.getSettings().streaming.abr.autoSwitchBitrate.video,f=c?i:a(n[s]),h=d(n.map(e=>({html:a(e),value:e.qualityIndex,default:s===e.qualityIndex&&!c})),"html").sort((e,t)=>t.value-e.value);h.push({html:i,value:"auto",default:c});let p=e=>("auto"===e.value?o.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):(o.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),o.setQualityFor("video",e.value)),t.notice.show=`${u}: ${e.html}`,r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html);r.control&&t.controls.update({name:"dash-quality",position:"right",html:f,style:{padding:"0 10px"},selector:h,onSelect:p}),r.setting&&t.setting.update({name:"dash-quality",tooltip:f,html:u,icon:l.default,width:200,selector:h,onSelect:p})}(t.dash),function(o){let n=o.getTracksFor("audio");if(!n||!n.length)return;let r=e.audio||{},i=r.auto||"Auto",l=r.title||"Audio",u=r.getName||(e=>e.lang||e.id),s=o.getCurrentTrackFor("audio")||n[0],c=s?u(s):i,f=d(n.map(e=>({html:u(e),value:e,default:s===e})),"html"),h=e=>(o.setCurrentTrack(e.value),t.notice.show=`${l}: ${e.html}`,r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html);r.control&&t.controls.update({name:"dash-audio",position:"right",html:c,style:{padding:"0 10px"},selector:f,onSelect:h}),r.setting&&t.setting.update({name:"dash-audio",tooltip:c,html:l,icon:a.default,width:200,selector:f,onSelect:h})}(t.dash)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginDashControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginDashControl=s)},{"bundle-text:./quality.svg":"aRkFd","bundle-text:./audio.svg":"hfT2T","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aRkFd:[function(e,t,o,n){t.exports=''},{}],hfT2T:[function(e,t,o,n){t.exports=''},{}],"9pCYc":[function(e,t,o,n){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,t){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[o]}})}),t},o.export=function(e,t,o){Object.defineProperty(e,t,{enumerable:!0,get:o})}},{}]},["hRBuj"],"hRBuj","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.legacy.js b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.legacy.js index a9e878e48..bcf036734 100644 --- a/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.legacy.js +++ b/packages/artplayer-plugin-dash-control/dist/artplayer-plugin-dash-control.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(t,e,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof i[o]&&i[o],a=u.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(e,n){if(!a[e]){if(!t[e]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(e,!0);if(u)return u(e,!0);if(l&&"string"==typeof e)return l(e);var d=Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}s.resolve=function(n){var o=t[e][1][n];return null!=o?o:n},s.cache={};var f=a[e]=new c.Module(e);t[e][0].call(f.exports,s,f,f.exports,this)}return a[e].exports;function s(t){var e=s.resolve(t);return!1===e?{}:c(e)}}c.isParcelRequire=!0,c.Module=function(t){this.id=t,this.bundle=c,this.exports={}},c.modules=t,c.cache=a,c.parent=u,c.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return i[o]}}),i[o]=c;for(var d=0;d0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var n=e.template.$video,o=e.constructor.utils.errorHandle;function r(){o(e.dash.getVideoElement()===n,'Cannot find instance of DASH from "art.dash"'),function(n){var o=n.getBitrateInfoListFor("video");if(o&&o.length){var r=t.quality||{},u=r.auto||"Auto",a=r.title||"Quality",c=r.getName||function(t){return"".concat(t.height,"p")},d=n.getQualityFor("video"),f=n.getSettings().streaming.abr.autoSwitchBitrate.video,s=f?u:c(o[d]),p=l(o.map(function(t){return{html:c(t),value:t.qualityIndex,default:d===t.qualityIndex&&!f}}),"html").sort(function(t,e){return e.value-t.value});p.push({html:u,value:"auto",default:f});var h=function(t){return"auto"===t.value?n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):(n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),n.setQualityFor("video",t.value)),e.notice.show="".concat(a,": ").concat(t.html),r.control&&e.controls.check(t),r.setting&&e.setting.check(t),t.html};r.control&&e.controls.update({name:"dash-quality",position:"right",html:s,style:{padding:"0 10px"},selector:p,onSelect:h}),r.setting&&e.setting.update({name:"dash-quality",tooltip:s,html:a,icon:i.default,width:200,selector:p,onSelect:h})}}(e.dash),function(n){var o=n.getTracksFor("audio");if(o&&o.length){var r=t.audio||{},i=r.auto||"Auto",u=r.title||"Audio",c=r.getName||function(t){return t.lang||t.id},d=n.getCurrentTrackFor("audio")||o[0],f=d?c(d):i,s=l(o.map(function(t){return{html:c(t),value:t,default:d===t}}),"html"),p=function(t){return n.setCurrentTrack(t.value),e.notice.show="".concat(u,": ").concat(t.html),r.control&&e.controls.check(t),r.setting&&e.setting.check(t),t.html};r.control&&e.controls.update({name:"dash-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:p}),r.setting&&e.setting.update({name:"dash-audio",tooltip:f,html:u,icon:a.default,width:200,selector:s,onSelect:p})}}(e.dash)}return e.on("ready",r),e.on("restart",r),{name:"artplayerPluginDashControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginDashControl=c)},{"bundle-text:./quality.svg":"eOZxP","bundle-text:./audio.svg":"2wNMP","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eOZxP:[function(t,e,n){e.exports=''},{}],"2wNMP":[function(t,e,n){e.exports=''},{}],iWrD0:[function(t,e,n){n.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},n.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.exportAll=function(t,e){return Object.keys(t).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})}),e},n.export=function(t,e,n){Object.defineProperty(t,e,{enumerable:!0,get:n})}},{}]},["cjCOF"],"cjCOF","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,o,r,i,u,a){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[o]&&l[o],d=c.i||{},f=c.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!f[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof l[o]&&l[o];if(!n&&i)return i(t,!0);if(c)return c(t,!0);if(s&&"string"==typeof t)return s(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var a=f[t]=new p.Module(t);e[t][0].call(a.exports,d,a,a.exports,l)}return f[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=s,this.exports={}},p.modules=e,p.cache=f,p.parent=c,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=d,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return l[o]}}),l[o]=p;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.template.$video,o=t.constructor.utils.errorHandle;function r(){o(t.dash.getVideoElement()===n,'Cannot find instance of DASH from "art.dash"'),function(n){var o=n.getBitrateInfoListFor("video");if(o&&o.length){var r=e.quality||{},i=r.auto||"Auto",a=r.title||"Quality",l=r.getName||function(e){return"".concat(e.height,"p")},d=n.getQualityFor("video"),f=n.getSettings().streaming.abr.autoSwitchBitrate.video,s=f?i:l(o[d]),p=c(o.map(function(e){return{html:l(e),value:e.qualityIndex,default:d===e.qualityIndex&&!f}}),"html").sort(function(e,t){return t.value-e.value});p.push({html:i,value:"auto",default:f});var h=function(e){return"auto"===e.value?n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):(n.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),n.setQualityFor("video",e.value)),t.notice.show="".concat(a,": ").concat(e.html),r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html};r.control&&t.controls.update({name:"dash-quality",position:"right",html:s,style:{padding:"0 10px"},selector:p,onSelect:h}),r.setting&&t.setting.update({name:"dash-quality",tooltip:s,html:a,icon:u.default,width:200,selector:p,onSelect:h})}}(t.dash),function(n){var o=n.getTracksFor("audio");if(o&&o.length){var r=e.audio||{},i=r.auto||"Auto",u=r.title||"Audio",a=r.getName||function(e){return e.lang||e.id},d=n.getCurrentTrackFor("audio")||o[0],f=d?a(d):i,s=c(o.map(function(e){return{html:a(e),value:e,default:d===e}}),"html"),p=function(e){return n.setCurrentTrack(e.value),t.notice.show="".concat(u,": ").concat(e.html),r.control&&t.controls.check(e),r.setting&&t.setting.check(e),e.html};r.control&&t.controls.update({name:"dash-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:p}),r.setting&&t.setting.update({name:"dash-audio",tooltip:f,html:u,icon:l.default,width:200,selector:s,onSelect:p})}}(t.dash)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginDashControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginDashControl=d)},{"bundle-text:./quality.svg":"eOZxP","bundle-text:./audio.svg":"2wNMP","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eOZxP:[function(e,t,n,o){t.exports=''},{}],"2wNMP":[function(e,t,n,o){t.exports=''},{}],iWrD0:[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["cjCOF"],"cjCOF","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-dash-control/package.json b/packages/artplayer-plugin-dash-control/package.json index 92d0f5cd7..6617f8a5d 100644 --- a/packages/artplayer-plugin-dash-control/package.json +++ b/packages/artplayer-plugin-dash-control/package.json @@ -21,4 +21,4 @@ "video", "player" ] -} \ No newline at end of file +} diff --git a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.js b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.js index f386ac999..3e7f5e7a9 100644 --- a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.js +++ b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,o,l){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof r[o]&&r[o],u=i.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!u[t]){if(!e[t]){var l="function"==typeof r[o]&&r[o];if(!n&&l)return l(t,!0);if(i)return i(t,!0);if(a&&"string"==typeof t)return a(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var f=u[t]=new c.Module(t);e[t][0].call(f.exports,d,f,f.exports,this)}return u[t].exports;function d(e){var t=d.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=u,c.parent=i,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return r[o]}}),r[o]=c;for(var s=0;sc);var l=e("bundle-text:./quality.svg"),r=o.interopDefault(l),i=e("bundle-text:./audio.svg"),u=o.interopDefault(i);function a(e,t){let n=new Map;return e.filter(e=>{let o=e[t];return void 0===o||!n.has(o)&&n.set(o,1)})}function c(e={}){return t=>{let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function l(){o(t.hls?.media===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(!n.levels.length)return;let o=e.quality||{},l=o.auto||"Auto",i=o.title||"Quality",u=o.getName||(e=>e.name||e.height+"P"),c=n.levels[n.currentLevel],s=c?u(c):l,f=a(n.levels.map((e,t)=>({html:u(e,t),value:t,default:n.currentLevel===t})),"html").sort((e,t)=>t.value-e.value);f.push({html:l,value:-1,default:-1===n.currentLevel});let d=e=>(n.currentLevel=e.value,t.notice.show=`${i}: ${e.html}`,o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html);o.control&&t.controls.update({name:"hls-quality",position:"right",html:s,style:{padding:"0 10px"},selector:f,onSelect:d}),o.setting&&t.setting.update({name:"hls-quality",tooltip:s,html:i,icon:r.default,width:200,selector:f,onSelect:d})}(t.hls),function(n){if(!n.audioTracks.length)return;let o=e.audio||{},l=o.auto||"Auto",r=o.title||"Audio",i=o.getName||(e=>e.name||e.lang||e.language),c=n.audioTracks[n.audioTrack],s=c?i(c):l,f=a(n.audioTracks.map((e,t)=>({html:i(e,t),value:e.id,default:n.audioTrack===e.id})),"html"),d=e=>(n.audioTrack=e.value,t.notice.show=`${r}: ${e.html}`,o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html);o.control&&t.controls.update({name:"hls-audio",position:"right",html:s,style:{padding:"0 10px"},selector:f,onSelect:d}),o.setting&&t.setting.update({name:"hls-audio",tooltip:s,html:r,icon:u.default,width:200,selector:f,onSelect:d})}(t.hls)}return t.on("ready",l),t.on("restart",l),{name:"artplayerPluginHlsControl",update:l}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=c)},{"bundle-text:./quality.svg":"5aI3W","bundle-text:./audio.svg":"kbgg8","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aI3W":[function(e,t,n){t.exports=''},{}],kbgg8:[function(e,t,n){t.exports=''},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["haa6A"],"haa6A","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,o,l,r,i,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof a[o]&&a[o],s=c.i||{},d=c.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!d[t]){if(!e[t]){if(l[t])return l[t];var r="function"==typeof a[o]&&a[o];if(!n&&r)return r(t,!0);if(c)return c(t,!0);if(f&&"string"==typeof t)return f(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var u=d[t]=new p.Module(t);e[t][0].call(u.exports,s,u,u.exports,a)}return d[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=f,this.exports={}},p.modules=e,p.cache=d,p.parent=c,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=s,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return a[o]}}),a[o]=p;for(var h=0;hs);var r=e("bundle-text:./quality.svg"),i=l.interopDefault(r),u=e("bundle-text:./audio.svg"),a=l.interopDefault(u);function c(e,t){let n=new Map;return e.filter(e=>{let o=e[t];return void 0===o||!n.has(o)&&n.set(o,1)})}function s(e={}){return t=>{let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function l(){o(t.hls?.media===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(!n.levels.length)return;let o=e.quality||{},l=o.auto||"Auto",r=o.title||"Quality",u=o.getName||(e=>e.name||e.height+"P"),a=n.levels[n.currentLevel],s=a?u(a):l,d=c(n.levels.map((e,t)=>({html:u(e,t),value:t,default:n.currentLevel===t})),"html").sort((e,t)=>t.value-e.value);d.push({html:l,value:-1,default:-1===n.currentLevel});let f=e=>(n.currentLevel=e.value,t.notice.show=`${r}: ${e.html}`,o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html);o.control&&t.controls.update({name:"hls-quality",position:"right",html:s,style:{padding:"0 10px"},selector:d,onSelect:f}),o.setting&&t.setting.update({name:"hls-quality",tooltip:s,html:r,icon:i.default,width:200,selector:d,onSelect:f})}(t.hls),function(n){if(!n.audioTracks.length)return;let o=e.audio||{},l=o.auto||"Auto",r=o.title||"Audio",i=o.getName||(e=>e.name||e.lang||e.language),u=n.audioTracks[n.audioTrack],s=u?i(u):l,d=c(n.audioTracks.map((e,t)=>({html:i(e,t),value:e.id,default:n.audioTrack===e.id})),"html"),f=e=>(n.audioTrack=e.value,t.notice.show=`${r}: ${e.html}`,o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html);o.control&&t.controls.update({name:"hls-audio",position:"right",html:s,style:{padding:"0 10px"},selector:d,onSelect:f}),o.setting&&t.setting.update({name:"hls-audio",tooltip:s,html:r,icon:a.default,width:200,selector:d,onSelect:f})}(t.hls)}return t.on("ready",l),t.on("restart",l),{name:"artplayerPluginHlsControl",update:l}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=s)},{"bundle-text:./quality.svg":"5aI3W","bundle-text:./audio.svg":"kbgg8","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aI3W":[function(e,t,n,o){t.exports=''},{}],kbgg8:[function(e,t,n,o){t.exports=''},{}],"9pCYc":[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["haa6A"],"haa6A","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.legacy.js b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.legacy.js index fc3b27f38..6d6669deb 100644 --- a/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.legacy.js +++ b/packages/artplayer-plugin-hls-control/dist/artplayer-plugin-hls-control.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,o,r){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[o]&&l[o],u=i.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(a&&"string"==typeof t)return a(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var s=u[t]=new c.Module(t);e[t][0].call(s.exports,d,s,s.exports,this)}return u[t].exports;function d(e){var t=d.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=u,c.parent=i,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return l[o]}}),l[o]=c;for(var f=0;f0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.template.$video,o=t.constructor.utils.errorHandle;function r(){var r;o((null===(r=t.hls)||void 0===r?void 0:r.media)===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(n.levels.length){var o=e.quality||{},r=o.auto||"Auto",i=o.title||"Quality",u=o.getName||function(e){return e.name||e.height+"P"},c=n.levels[n.currentLevel],f=c?u(c):r,s=a(n.levels.map(function(e,t){return{html:u(e,t),value:t,default:n.currentLevel===t}}),"html").sort(function(e,t){return t.value-e.value});s.push({html:r,value:-1,default:-1===n.currentLevel});var d=function(e){return n.currentLevel=e.value,t.notice.show="".concat(i,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-quality",tooltip:f,html:i,icon:l.default,width:200,selector:s,onSelect:d})}}(t.hls),function(n){if(n.audioTracks.length){var o=e.audio||{},r=o.auto||"Auto",l=o.title||"Audio",i=o.getName||function(e){return e.name||e.lang||e.language},c=n.audioTracks[n.audioTrack],f=c?i(c):r,s=a(n.audioTracks.map(function(e,t){return{html:i(e,t),value:e.id,default:n.audioTrack===e.id}}),"html"),d=function(e){return n.audioTrack=e.value,t.notice.show="".concat(l,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-audio",tooltip:f,html:l,icon:u.default,width:200,selector:s,onSelect:d})}}(t.hls)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginHlsControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=c)},{"bundle-text:./quality.svg":"ghIYQ","bundle-text:./audio.svg":"cPSEW","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ghIYQ:[function(e,t,n){t.exports=''},{}],cPSEW:[function(e,t,n){t.exports=''},{}],iWrD0:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["6nh0Z"],"6nh0Z","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,o,r,i,l,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof a[o]&&a[o],f=c.i||{},s=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,n){if(!s[t]){if(!e[t]){if(r[t])return r[t];var i="function"==typeof a[o]&&a[o];if(!n&&i)return i(t,!0);if(c)return c(t,!0);if(d&&"string"==typeof t)return d(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}f.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},f.cache={};var u=s[t]=new h.Module(t);e[t][0].call(u.exports,f,u,u.exports,a)}return s[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.require=d,this.exports={}},h.modules=e,h.cache=s,h.parent=c,h.distDir=void 0,h.publicUrl=void 0,h.devServer=void 0,h.i=f,h.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(h,"root",{get:function(){return a[o]}}),a[o]=h;for(var p=0;p0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.template.$video,o=t.constructor.utils.errorHandle;function r(){var r;o((null==(r=t.hls)?void 0:r.media)===n,'Cannot find instance of HLS from "art.hls"'),function(n){if(n.levels.length){var o=e.quality||{},r=o.auto||"Auto",i=o.title||"Quality",u=o.getName||function(e){return e.name||e.height+"P"},a=n.levels[n.currentLevel],f=a?u(a):r,s=c(n.levels.map(function(e,t){return{html:u(e,t),value:t,default:n.currentLevel===t}}),"html").sort(function(e,t){return t.value-e.value});s.push({html:r,value:-1,default:-1===n.currentLevel});var d=function(e){return n.currentLevel=e.value,t.notice.show="".concat(i,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-quality",tooltip:f,html:i,icon:l.default,width:200,selector:s,onSelect:d})}}(t.hls),function(n){if(n.audioTracks.length){var o=e.audio||{},r=o.auto||"Auto",i=o.title||"Audio",l=o.getName||function(e){return e.name||e.lang||e.language},u=n.audioTracks[n.audioTrack],f=u?l(u):r,s=c(n.audioTracks.map(function(e,t){return{html:l(e,t),value:e.id,default:n.audioTrack===e.id}}),"html"),d=function(e){return n.audioTrack=e.value,t.notice.show="".concat(i,": ").concat(e.html),o.control&&t.controls.check(e),o.setting&&t.setting.check(e),e.html};o.control&&t.controls.update({name:"hls-audio",position:"right",html:f,style:{padding:"0 10px"},selector:s,onSelect:d}),o.setting&&t.setting.update({name:"hls-audio",tooltip:f,html:i,icon:a.default,width:200,selector:s,onSelect:d})}}(t.hls)}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginHlsControl",update:r}}}"undefined"!=typeof window&&(window.artplayerPluginHlsControl=f)},{"bundle-text:./quality.svg":"ghIYQ","bundle-text:./audio.svg":"cPSEW","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ghIYQ:[function(e,t,n,o){t.exports=''},{}],cPSEW:[function(e,t,n,o){t.exports=''},{}],iWrD0:[function(e,t,n,o){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["6nh0Z"],"6nh0Z","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-hls-control/package.json b/packages/artplayer-plugin-hls-control/package.json index 871ab44f2..f22d75220 100644 --- a/packages/artplayer-plugin-hls-control/package.json +++ b/packages/artplayer-plugin-hls-control/package.json @@ -21,4 +21,4 @@ "video", "player" ] -} \ No newline at end of file +} diff --git a/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js b/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js index bb507be1e..9233d41e6 100644 --- a/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js +++ b/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,s){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],a=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!a[t]){if(!e[t]){var s="function"==typeof o[n]&&o[n];if(!r&&s)return s(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}u.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},u.cache={};var c=a[t]=new d.Module(t);e[t][0].call(c.exports,u,c,c.exports,this)}return a[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=i,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return o[n]}}),o[n]=d;for(var l=0;lnull,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){let{type:t,data:r,id:n}=e.data;"inject"===t&&(this.injected=!0),this.promises[n]&&("error"===t?this.promises[n].reject(Error(r)):this.promises[n].resove(r),delete this.promises[n]),this.messageCallback&&this.messageCallback({type:t,data:r})}postMessage({type:e,data:t}){return new Promise((r,n)=>{(function s(){if(this.destroyed)n(Error("The instance has been destroyed"));else if(this.injected){let s=Date.now();this.promises[s]={resove:r,reject:n},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)})}commit(e){if("function"!=typeof e)throw Error('"commit.callback" needs to be a function');let t=e.toString(),r=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:r})}message(e){if("function"!=typeof e)throw Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}r.default=n,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,s,i,a){var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof f[n]&&f[n],l=d.i||{},u=d.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!u[t]){if(!e[t]){if(o[t])return o[t];var s="function"==typeof f[n]&&f[n];if(!r&&s)return s(t,!0);if(d)return d(t,!0);if(c&&"string"==typeof t)return c(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var a=u[t]=new p.Module(t);e[t][0].call(a.exports,l,a,a.exports,f)}return u[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=c,this.exports={}},p.modules=e,p.cache=u,p.parent=d,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=l,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return f[n]}}),f[n]=p;for(var m=0;mnull,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){let{type:t,data:r,id:n}=e.data;"inject"===t&&(this.injected=!0),this.promises[n]&&("error"===t?this.promises[n].reject(Error(r)):this.promises[n].resove(r),delete this.promises[n]),this.messageCallback&&this.messageCallback({type:t,data:r})}postMessage({type:e,data:t}){return new Promise((r,n)=>{(function o(){if(this.destroyed)n(Error("The instance has been destroyed"));else if(this.injected){let o=Date.now();this.promises[o]={resove:r,reject:n},this.$iframe.contentWindow.postMessage({type:e,data:t,id:o},"*")}else setTimeout(o.bind(this),200)}).call(this)})}commit(e){if("function"!=typeof e)throw Error('"commit.callback" needs to be a function');let t=e.toString(),r=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:r})}message(e){if("function"!=typeof e)throw Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}r.default=o,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.legacy.js b/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.legacy.js index 7f178337c..dc4ca7e60 100644 --- a/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.legacy.js +++ b/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],s=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!s[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(c&&"string"==typeof r)return c(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},p.cache={};var l=s[r]=new u.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return s[r].exports;function p(e){var r=p.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=a,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var f=0;fr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function u(e,r,t,n){var o,i=arguments.length,a=i<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,r,t,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(r,t,a):o(r,t))||a);return i>3&&a&&Object.defineProperty(r,t,a),a}function f(e,r){return function(t,n){r(t,n,e)}}function l(e,r,t,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",f=!r&&e?n.static?e:e.prototype:null,l=r||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=t.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var _=(0,t[d])("accessor"===c?{get:l.get,set:l.set}:l[u],y);if("accessor"===c){if(void 0===_)continue;if(null===_||"object"!=typeof _)throw TypeError("Object expected");(s=a(_.get))&&(l.get=s),(s=a(_.set))&&(l.set=s),(s=a(_.init))&&o.unshift(s)}else(s=a(_))&&("field"===c?o.unshift(s):l[u]=s)}f&&Object.defineProperty(f,n.name,l),p=!0}function p(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function j(){for(var e=[],r=0;r1||s(e,r)})},r&&(n[e]=r(n[e])))}function s(e,r){try{var t;(t=o[e](r)).value instanceof P?Promise.resolve(t.value.v).then(c,u):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function f(e,r){e(r),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:P(e[n](r)),done:!1}:o?o(r):r}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=w(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){!function(e,r,t,n){Promise.resolve(n).then(function(r){e({value:r,done:t})},r)}(n,o,(r=e[t](r)).done,r.value)})}}}function k(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var M=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r};function I(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&v(r,e,t);return M(r,e),r}function D(e){return e&&e.__esModule?e:{default:e}}function F(e,r,t,n){if("a"===t&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function A(e,r,t,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!o:!r.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,t):o?o.value=t:r.set(e,t),t}function R(e,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?r===e:e.has(r)}function C(e,r,t){if(null!=r){var n,o;if("object"!=typeof r&&"function"!=typeof r)throw TypeError("Object expected.");if(t){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=r[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=r[Symbol.dispose],t&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:r,dispose:n,async:t})}else t&&e.stack.push({async:!0});return r}var W="function"==typeof SuppressedError?SuppressedError:function(e,r,t){var n=Error(t);return n.name="SuppressedError",n.error=e,n.suppressed=r,n};function N(e){function r(r){e.error=e.hasError?new W(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(t,function(e){return r(e),t()})}catch(e){r(e)}}if(e.hasError)throw e.error}()}t.default={__extends:a,__assign:s,__rest:c,__decorate:u,__param:f,__metadata:h,__awaiter:_,__generator:m,__createBinding:v,__exportStar:b,__values:w,__read:g,__spread:j,__spreadArrays:x,__spreadArray:O,__await:P,__asyncGenerator:E,__asyncDelegator:S,__asyncValues:T,__makeTemplateObject:k,__importStar:I,__importDefault:D,__classPrivateFieldGet:F,__classPrivateFieldSet:A,__classPrivateFieldIn:R,__addDisposableResource:C,__disposeResources:N}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["akNoT"],"akNoT","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,n,o,i,a,s){var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof c[n]&&c[n],f=u.i||{},l=u.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(r,t){if(!l[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof c[n]&&c[n];if(!t&&i)return i(r,!0);if(u)return u(r,!0);if(p&&"string"==typeof r)return p(r);var a=Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var s=l[r]=new d.Module(r);e[r][0].call(s.exports,f,s,s.exports,c)}return l[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:d(r)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=l,d.parent=u,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return c[n]}}),c[n]=d;for(var y=0;yr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function f(e,r,t,n){var o,a=arguments.length,s=a<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,r,t,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(r,t,s):o(r,t))||s);return a>3&&s&&Object.defineProperty(r,t,s),s}function l(e,r){return function(t,n){r(t,n,e)}}function p(e,r,t,n,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,u=n.kind,f="getter"===u?"get":"setter"===u?"set":"value",l=!r&&e?n.static?e:e.prototype:null,p=r||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,y=t.length-1;y>=0;y--){var _={};for(var h in n)_[h]="access"===h?{}:n[h];for(var h in n.access)_.access[h]=n.access[h];_.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,t[y])("accessor"===u?{get:p.get,set:p.set}:p[f],_);if("accessor"===u){if(void 0===m)continue;if(null===m||(void 0===m?"undefined":(0,i._)(m))!=="object")throw TypeError("Object expected");(c=s(m.get))&&(p.get=c),(c=s(m.set))&&(p.set=c),(c=s(m.init))&&o.unshift(c)}else(c=s(m))&&("field"===u?o.unshift(c):p[f]=c)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],r=0;r1||s(e,r)})},r&&(n[e]=r(n[e])))}function s(e,r){try{var t;(t=o[e](r)).value instanceof E?Promise.resolve(t.value.v).then(c,u):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function f(e,r){e(r),i.shift(),i.length&&s(i[0][0],i[0][1])}}function I(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:E(e[n](r)),done:!1}:o?o(r):r}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=g(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){var i,a,s;i=n,a=o,s=(r=e[t](r)).done,Promise.resolve(r.value).then(function(e){i({value:e,done:s})},a)})}}}function k(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var M=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r},D=function(e){return(D=Object.getOwnPropertyNames||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)};function F(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t=D(e),n=0;na);var n=e("./adapter"),i=r.interopDefault(n);function a(e){return t=>{let s=new i.default(t,e);return{name:"artplayerPluginLibass",libass:s.libass,visible:s.visible,init:s.init.bind(s),switch:s.switch.bind(s),show:s.show.bind(s),hide:s.hide.bind(s),destroy:s.destroy.bind(s)}}}"undefined"!=typeof window&&(window.artplayerPluginLibass=a)},{"./adapter":"2m9sB","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2m9sB":[function(e,t,s){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(s);var n=e("libass-wasm"),i=r.interopDefault(n);let a=`[Script Info] ScriptType: v4.00+`;s.default=class{constructor(e,t){let{constructor:s,template:r}=e;this.art=e,this.$video=r.$video,this.$webvtt=r.$subtitle,this.utils=s.utils,this.libass=null,e.once("ready",this.init.bind(this,t))}async init(e){this.#e(),await this.#t(e),this.#s(),this.art.emit("artplayerPluginLibass:init",this);let t=this.art?.option?.subtitle?.url;t&&"ass"===this.utils.getExt(t)&&this.switch(t)}switch(e){this.art.emit("artplayerPluginLibass:switch",e),e&&"ass"===this.utils.getExt(e)?(this.currentType="ass",this.libass.freeTrack(),this.libass.setTrackByUrl(this.#r(e)),this.visible=this.art.subtitle.show):(this.currentType="webvtt",this.hide(),this.libass.freeTrack())}setVisibility(e){this.visible=e}setOffset(e){this.timeOffset=e}get active(){return"ass"===this.currentType}get visible(){return!!this.libass&&"none"!==this.libass.canvasParent.style.display}set visible(e){this.art.emit("artplayerPluginLibass:visible",e),this.#n(!this.active),this.libass.canvasParent&&(this.libass.canvasParent.style.display=e?"block":"none",e&&this.libass.resize())}get timeOffset(){return this.libass.timeOffset}set timeOffset(e){this.art.emit("artplayerPluginLibass:timeOffset",e),this.libass.timeOffset=e}show(){this.visible=!0}hide(){this.visible=!1}destroy(){this.art.emit("artplayerPluginLibass:destroy"),this.#i(),this.libass.dispose(),URL.revokeObjectURL(this.workerScriptUrl),this.libass=null}async #t(e={}){if(!e.fallbackFont)return this.utils.errorHandle(e.fallbackFont,"artplayerPluginLibass: fallbackFont is required");e.workerUrl||(e.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),e.availableFonts&&(e.availableFonts=Object.entries(e.availableFonts).reduce((e,[t,s])=>(e[t]=this.#r(s),e),{})),this.libass=new i.default({subContent:a,video:this.$video,...e,workerUrl:await this.#a(e),fallbackFont:this.#r(e.fallbackFont),fonts:e.fonts?.map(e=>this.#r(e))}),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText=` position: absolute; top: 0; left: 0; width: 100%; height: 100%; user-select: none; pointer-events: none; z-index: 20;`}#s(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}#i(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}#n(e){this.$webvtt.style.visibility=e?"visible":"hidden"}#r(e){return this.#o(e)?e:new URL(e,document.baseURI).toString()}#o(e){return/^https?:\/\//.test(e)}#a({workerUrl:e,wasmUrl:t}){return new Promise(s=>{fetch(e).then(e=>e.text()).then(r=>{let n=r,i=new Blob([n=n.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,(s,r)=>(t=t?this.#r(t):new URL(r,e).toString(),`wasmBinaryFile = "${t}"`))],{type:"text/javascript"});s(URL.createObjectURL(i))})})}#e(){let e=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));t instanceof WebAssembly.Module&&(e=new WebAssembly.Instance(t) instanceof WebAssembly.Instance)}}catch(e){}this.utils.errorHandle(e,"Browser does not support WebAssembly")}}},{"libass-wasm":"lHkek","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lHkek:[function(e,t,s){"function"==typeof SubtitlesOctopusOnLoad&&SubtitlesOctopusOnLoad(),t.exports&&(t.exports=function(e){var t=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));e instanceof WebAssembly.Module&&(t=new WebAssembly.Instance(e) instanceof WebAssembly.Instance)}}catch(e){}console.log("WebAssembly support detected: "+(t?"yes":"no"));var s=this;function r(){s.setCurrentTime(s.video.currentTime+s.timeOffset)}function n(){s.setIsPaused(!1,s.video.currentTime+s.timeOffset)}function i(){s.setIsPaused(!0,s.video.currentTime+s.timeOffset)}function a(){s.video.removeEventListener("timeupdate",r,!1)}function o(){s.video.addEventListener("timeupdate",r,!1);var e=s.video.currentTime+s.timeOffset;s.setCurrentTime(e)}function l(){s.setRate(s.video.playbackRate)}function c(){s.setIsPaused(!0,s.video.currentTime+s.timeOffset)}function d(e){e.target.removeEventListener(e.type,d,!1),s.resize()}function u(){var e=s.renderFramesData,t=performance.now();s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height);for(var r=0;r=1?i[a]:1;var o=new ImageData(i,n.w,n.h);s.bufferCanvasCtx.putImageData(o,0,0),s.ctx.drawImage(s.bufferCanvas,n.x,n.y)}if(s.debug){var l=Math.round(performance.now()-t),c=e.blendTime;void 0!==c?console.log("render: "+Math.round(e.spentTime-c)+" ms, blend: "+Math.round(c)+" ms, draw: "+l+" ms; TOTAL="+Math.round(e.spentTime+l)+" ms"):console.log(Math.round(e.spentTime)+" ms (+ "+l+" ms draw)"),s.renderStart=performance.now()}}function v(){var e=s.renderFramesData,t=performance.now();s.ctx.clearRect(0,0,s.canvas.width,s.canvas.height);for(var r=0;r0?s.resize():s.video.addEventListener("loadedmetadata",d,!1))},s.getVideoPosition=function(){var e=s.video.videoWidth/s.video.videoHeight,t=s.video.offsetWidth,r=s.video.offsetHeight,n=t,i=r;t/r>e?n=Math.floor(r*e):i=Math.floor(t/e);var a=(t-n)/2,o=(r-i)/2;return{width:n,height:i,x:a,y:o}},s.setSubUrl=function(e){s.subUrl=e},s.renderFrameData=null,s.workerActive=!1,s.frameId=0,s.onWorkerMessage=function(e){!s.workerActive&&(s.workerActive=!0,s.onReadyEvent&&s.onReadyEvent());var t=e.data;switch(t.target){case"stdout":console.log(t.content);break;case"console-log":console.log.apply(console,JSON.parse(t.content));break;case"console-debug":console.debug.apply(console,JSON.parse(t.content));break;case"console-info":console.info.apply(console,JSON.parse(t.content));break;case"console-warn":console.warn.apply(console,JSON.parse(t.content));break;case"console-error":console.error.apply(console,JSON.parse(t.content));break;case"stderr":console.error(t.content);break;case"window":window[t.method]();break;case"canvas":switch(t.op){case"getContext":s.ctx=s.canvas.getContext(t.type,t.attributes);break;case"resize":s.resize(t.width,t.height);break;case"renderCanvas":s.lastRenderTime0&&i>s.maxRenderHeight&&(i=s.maxRenderHeight),e*=i/t,t=i}return{width:e,height:t}}((i=s.getVideoPosition()).width*s.pixelRatio,i.height*s.pixelRatio);e=a.width,t=a.height;var o=s.canvasParent.getBoundingClientRect().top-s.video.getBoundingClientRect().top;r=i.y-o,n=i.x}if(!e||!t){s.video||console.error("width or height is 0. You should specify width & height for resize.");return}(s.canvas.width!=e||s.canvas.height!=t||s.canvas.style.top!=r||s.canvas.style.left!=n)&&(s.canvas.width=e,s.canvas.height=t,null!=i&&(s.canvasParent.style.position="relative",s.canvas.style.display="block",s.canvas.style.position="absolute",s.canvas.style.width=i.width+"px",s.canvas.style.height=i.height+"px",s.canvas.style.top=r+"px",s.canvas.style.left=n+"px",s.canvas.style.pointerEvents="none"),s.worker.postMessage({target:"canvas",width:s.canvas.width,height:s.canvas.height}))},s.resizeWithTimeout=function(){s.resize(),setTimeout(s.resize,100)},s.runBenchmark=function(){s.worker.postMessage({target:"runBenchmark"})},s.customMessage=function(e,t){t=t||{},s.worker.postMessage({target:"custom",userData:e,preMain:t.preMain})},s.setCurrentTime=function(e){s.worker.postMessage({target:"video",currentTime:e})},s.setTrackByUrl=function(e){s.worker.postMessage({target:"set-track-by-url",url:e})},s.setTrack=function(e){s.worker.postMessage({target:"set-track",content:e})},s.freeTrack=function(e){s.worker.postMessage({target:"free-track"})},s.render=s.setCurrentTime,s.setIsPaused=function(e,t){s.worker.postMessage({target:"video",isPaused:e,currentTime:t})},s.setRate=function(e){s.worker.postMessage({target:"video",rate:e})},s.dispose=function(){s.worker.postMessage({target:"destroy"}),s.worker.terminate(),s.worker.removeEventListener("message",s.onWorkerMessage),s.worker.removeEventListener("error",s.workerError),s.workerActive=!1,s.worker=null,s.video&&(s.video.removeEventListener("timeupdate",r,!1),s.video.removeEventListener("playing",n,!1),s.video.removeEventListener("pause",i,!1),s.video.removeEventListener("seeking",a,!1),s.video.removeEventListener("seeked",o,!1),s.video.removeEventListener("ratechange",l,!1),s.video.removeEventListener("waiting",c,!1),s.video.removeEventListener("loadedmetadata",d,!1),document.removeEventListener("fullscreenchange",s.resizeWithTimeout,!1),document.removeEventListener("mozfullscreenchange",s.resizeWithTimeout,!1),document.removeEventListener("webkitfullscreenchange",s.resizeWithTimeout,!1),document.removeEventListener("msfullscreenchange",s.resizeWithTimeout,!1),window.removeEventListener("resize",s.resizeWithTimeout,!1),s.video.parentNode.removeChild(s.canvasParent),s.video=null),s.ro&&(s.ro.disconnect(),s.ro=null),s.onCustomMessage=null,s.onErrorEvent=null,s.onReadyEvent=null},s.fetchFromWorker=function(e,t,r){try{var n=e.target,i=setTimeout(function(){o(Error("Error: Timeout while try to fetch "+n))},5e3),a=function(e){e.data.target==n&&(t(e.data),s.worker.removeEventListener("message",a),s.worker.removeEventListener("error",o),clearTimeout(i))},o=function(e){r(e),s.worker.removeEventListener("message",a),s.worker.removeEventListener("error",o),clearTimeout(i)};s.worker.addEventListener("message",a),s.worker.addEventListener("error",o),s.worker.postMessage(e)}catch(e){r(e)}},s.createEvent=function(e){s.worker.postMessage({target:"create-event",event:e})},s.getEvents=function(e,t){s.fetchFromWorker({target:"get-events"},function(t){e(t.events)},t)},s.setEvent=function(e,t){s.worker.postMessage({target:"set-event",event:e,index:t})},s.removeEvent=function(e){s.worker.postMessage({target:"remove-event",index:e})},s.createStyle=function(e){s.worker.postMessage({target:"create-style",style:e})},s.getStyles=function(e,t){s.fetchFromWorker({target:"get-styles"},function(t){e(t.styles)},t)},s.setStyle=function(e,t){s.worker.postMessage({target:"set-style",style:e,index:t})},s.removeStyle=function(e){s.worker.postMessage({target:"remove-style",index:e})},s.init()})},{}],"9pCYc":[function(e,t,s){s.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},s.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},s.exportAll=function(e,t){return Object.keys(e).forEach(function(s){"default"===s||"__esModule"===s||Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[s]}})}),t},s.export=function(e,t,s){Object.defineProperty(e,t,{enumerable:!0,get:s})}},{}]},["5lsnt"],"5lsnt","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,s,i,n,a,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[s]&&l[s],d=c.i||{},u=c.cache||{},v="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(i[t])return i[t];var n="function"==typeof l[s]&&l[s];if(!r&&n)return n(t,!0);if(c)return c(t,!0);if(v&&"string"==typeof t)return v(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}d.resolve=function(r){var s=e[t][1][r];return null!=s?s:r},d.cache={};var o=u[t]=new f.Module(t);e[t][0].call(o.exports,d,o,o.exports,l)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=v,this.exports={}},f.modules=e,f.cache=u,f.parent=c,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=d,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return l[s]}}),l[s]=f;for(var h=0;ho);var n=e("./adapter"),a=i.interopDefault(n);function o(e){return t=>{let r=new(0,a.default)(t,e);return{name:"artplayerPluginLibass",libass:r.libass,visible:r.visible,init:r.init.bind(r),switch:r.switch.bind(r),show:r.show.bind(r),hide:r.hide.bind(r),destroy:r.destroy.bind(r)}}}"undefined"!=typeof window&&(window.artplayerPluginLibass=o)},{"./adapter":"2m9sB","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2m9sB":[function(e,t,r,s){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(r);var n=e("libass-wasm"),a=i.interopDefault(n);let o=`[Script Info] ScriptType: v4.00+`;r.default=class{constructor(e,t){let{constructor:r,template:s}=e;this.art=e,this.$video=s.$video,this.$webvtt=s.$subtitle,this.utils=r.utils,this.libass=null,e.once("ready",this.init.bind(this,t))}async init(e){this.#e(),await this.#t(e),this.#r(),this.art.emit("artplayerPluginLibass:init",this);let t=this.art?.option?.subtitle?.url;t&&"ass"===this.utils.getExt(t)&&this.switch(t)}switch(e){this.art.emit("artplayerPluginLibass:switch",e),e&&"ass"===this.utils.getExt(e)?(this.currentType="ass",this.libass.freeTrack(),this.libass.setTrackByUrl(this.#s(e)),this.visible=this.art.subtitle.show):(this.currentType="webvtt",this.hide(),this.libass.freeTrack())}setVisibility(e){this.visible=e}setOffset(e){this.timeOffset=e}get active(){return"ass"===this.currentType}get visible(){return!!this.libass&&"none"!==this.libass.canvasParent.style.display}set visible(e){this.art.emit("artplayerPluginLibass:visible",e),this.#i(!this.active),this.libass.canvasParent&&(this.libass.canvasParent.style.display=e?"block":"none",e&&this.libass.resize())}get timeOffset(){return this.libass.timeOffset}set timeOffset(e){this.art.emit("artplayerPluginLibass:timeOffset",e),this.libass.timeOffset=e}show(){this.visible=!0}hide(){this.visible=!1}destroy(){this.art.emit("artplayerPluginLibass:destroy"),this.#n(),this.libass.dispose(),URL.revokeObjectURL(this.workerScriptUrl),this.libass=null}async #t(e={}){if(!e.fallbackFont)return this.utils.errorHandle(e.fallbackFont,"artplayerPluginLibass: fallbackFont is required");e.workerUrl||(e.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),e.availableFonts&&(e.availableFonts=Object.entries(e.availableFonts).reduce((e,[t,r])=>(e[t]=this.#s(r),e),{})),this.libass=new(0,a.default)({subContent:o,video:this.$video,...e,workerUrl:await this.#a(e),fallbackFont:this.#s(e.fallbackFont),fonts:e.fonts?.map(e=>this.#s(e))}),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText=` position: absolute; top: 0; left: 0; width: 100%; height: 100%; user-select: none; pointer-events: none; z-index: 20;`}#r(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}#n(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}#i(e){this.$webvtt.style.visibility=e?"visible":"hidden"}#s(e){return this.#o(e)?e:new URL(e,document.baseURI).toString()}#o(e){return/^https?:\/\//.test(e)}#a({workerUrl:e,wasmUrl:t}){return new Promise(r=>{fetch(e).then(e=>e.text()).then(s=>{let i=s,n=new Blob([i=i.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,(r,s)=>(t=t?this.#s(t):new URL(s,e).toString(),`wasmBinaryFile = "${t}"`))],{type:"text/javascript"});r(URL.createObjectURL(n))})})}#e(){let e=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));t instanceof WebAssembly.Module&&(e=new WebAssembly.Instance(t)instanceof WebAssembly.Instance)}}catch(e){}this.utils.errorHandle(e,"Browser does not support WebAssembly")}}},{"libass-wasm":"lHkek","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lHkek:[function(e,t,r,s){"use strict";"function"==typeof SubtitlesOctopusOnLoad&&SubtitlesOctopusOnLoad(),t.exports&&(t.exports=function(e){var t=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){let e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));e instanceof WebAssembly.Module&&(t=new WebAssembly.Instance(e)instanceof WebAssembly.Instance)}}catch(e){}console.log("WebAssembly support detected: "+(t?"yes":"no"));var r=this;function s(){r.setCurrentTime(r.video.currentTime+r.timeOffset)}function i(){r.setIsPaused(!1,r.video.currentTime+r.timeOffset)}function n(){r.setIsPaused(!0,r.video.currentTime+r.timeOffset)}function a(){r.video.removeEventListener("timeupdate",s,!1)}function o(){r.video.addEventListener("timeupdate",s,!1);var e=r.video.currentTime+r.timeOffset;r.setCurrentTime(e)}function l(){r.setRate(r.video.playbackRate)}function c(){r.setIsPaused(!0,r.video.currentTime+r.timeOffset)}function d(e){e.target.removeEventListener(e.type,d,!1),r.resize()}function u(){var e=r.renderFramesData,t=performance.now();r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height);for(var s=0;s=1?n[a]:1;var o=new ImageData(n,i.w,i.h);r.bufferCanvasCtx.putImageData(o,0,0),r.ctx.drawImage(r.bufferCanvas,i.x,i.y)}if(r.debug){var l=Math.round(performance.now()-t),c=e.blendTime;void 0!==c?console.log("render: "+Math.round(e.spentTime-c)+" ms, blend: "+Math.round(c)+" ms, draw: "+l+" ms; TOTAL="+Math.round(e.spentTime+l)+" ms"):console.log(Math.round(e.spentTime)+" ms (+ "+l+" ms draw)"),r.renderStart=performance.now()}}function v(){var e=r.renderFramesData,t=performance.now();r.ctx.clearRect(0,0,r.canvas.width,r.canvas.height);for(var s=0;s0?r.resize():r.video.addEventListener("loadedmetadata",d,!1))},r.getVideoPosition=function(){var e=r.video.videoWidth/r.video.videoHeight,t=r.video.offsetWidth,s=r.video.offsetHeight,i=t,n=s;t/s>e?i=Math.floor(s*e):n=Math.floor(t/e);var a=(t-i)/2,o=(s-n)/2;return{width:i,height:n,x:a,y:o}},r.setSubUrl=function(e){r.subUrl=e},r.renderFrameData=null,r.workerActive=!1,r.frameId=0,r.onWorkerMessage=function(e){!r.workerActive&&(r.workerActive=!0,r.onReadyEvent&&r.onReadyEvent());var t=e.data;switch(t.target){case"stdout":console.log(t.content);break;case"console-log":console.log.apply(console,JSON.parse(t.content));break;case"console-debug":console.debug.apply(console,JSON.parse(t.content));break;case"console-info":console.info.apply(console,JSON.parse(t.content));break;case"console-warn":console.warn.apply(console,JSON.parse(t.content));break;case"console-error":console.error.apply(console,JSON.parse(t.content));break;case"stderr":console.error(t.content);break;case"window":window[t.method]();break;case"canvas":switch(t.op){case"getContext":r.ctx=r.canvas.getContext(t.type,t.attributes);break;case"resize":r.resize(t.width,t.height);break;case"renderCanvas":r.lastRenderTime0&&n>r.maxRenderHeight&&(n=r.maxRenderHeight),e*=n/t,t=n}return{width:e,height:t}}((n=r.getVideoPosition()).width*r.pixelRatio,n.height*r.pixelRatio);e=a.width,t=a.height;var o=r.canvasParent.getBoundingClientRect().top-r.video.getBoundingClientRect().top;s=n.y-o,i=n.x}if(!e||!t){r.video||console.error("width or height is 0. You should specify width & height for resize.");return}(r.canvas.width!=e||r.canvas.height!=t||r.canvas.style.top!=s||r.canvas.style.left!=i)&&(r.canvas.width=e,r.canvas.height=t,null!=n&&(r.canvasParent.style.position="relative",r.canvas.style.display="block",r.canvas.style.position="absolute",r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.canvas.style.top=s+"px",r.canvas.style.left=i+"px",r.canvas.style.pointerEvents="none"),r.worker.postMessage({target:"canvas",width:r.canvas.width,height:r.canvas.height}))},r.resizeWithTimeout=function(){r.resize(),setTimeout(r.resize,100)},r.runBenchmark=function(){r.worker.postMessage({target:"runBenchmark"})},r.customMessage=function(e,t){t=t||{},r.worker.postMessage({target:"custom",userData:e,preMain:t.preMain})},r.setCurrentTime=function(e){r.worker.postMessage({target:"video",currentTime:e})},r.setTrackByUrl=function(e){r.worker.postMessage({target:"set-track-by-url",url:e})},r.setTrack=function(e){r.worker.postMessage({target:"set-track",content:e})},r.freeTrack=function(e){r.worker.postMessage({target:"free-track"})},r.render=r.setCurrentTime,r.setIsPaused=function(e,t){r.worker.postMessage({target:"video",isPaused:e,currentTime:t})},r.setRate=function(e){r.worker.postMessage({target:"video",rate:e})},r.dispose=function(){r.worker.postMessage({target:"destroy"}),r.worker.terminate(),r.worker.removeEventListener("message",r.onWorkerMessage),r.worker.removeEventListener("error",r.workerError),r.workerActive=!1,r.worker=null,r.video&&(r.video.removeEventListener("timeupdate",s,!1),r.video.removeEventListener("playing",i,!1),r.video.removeEventListener("pause",n,!1),r.video.removeEventListener("seeking",a,!1),r.video.removeEventListener("seeked",o,!1),r.video.removeEventListener("ratechange",l,!1),r.video.removeEventListener("waiting",c,!1),r.video.removeEventListener("loadedmetadata",d,!1),document.removeEventListener("fullscreenchange",r.resizeWithTimeout,!1),document.removeEventListener("mozfullscreenchange",r.resizeWithTimeout,!1),document.removeEventListener("webkitfullscreenchange",r.resizeWithTimeout,!1),document.removeEventListener("msfullscreenchange",r.resizeWithTimeout,!1),window.removeEventListener("resize",r.resizeWithTimeout,!1),r.video.parentNode.removeChild(r.canvasParent),r.video=null),r.ro&&(r.ro.disconnect(),r.ro=null),r.onCustomMessage=null,r.onErrorEvent=null,r.onReadyEvent=null},r.fetchFromWorker=function(e,t,s){try{var i=e.target,n=setTimeout(function(){o(Error("Error: Timeout while try to fetch "+i))},5e3),a=function(e){e.data.target==i&&(t(e.data),r.worker.removeEventListener("message",a),r.worker.removeEventListener("error",o),clearTimeout(n))},o=function(e){s(e),r.worker.removeEventListener("message",a),r.worker.removeEventListener("error",o),clearTimeout(n)};r.worker.addEventListener("message",a),r.worker.addEventListener("error",o),r.worker.postMessage(e)}catch(e){s(e)}},r.createEvent=function(e){r.worker.postMessage({target:"create-event",event:e})},r.getEvents=function(e,t){r.fetchFromWorker({target:"get-events"},function(t){e(t.events)},t)},r.setEvent=function(e,t){r.worker.postMessage({target:"set-event",event:e,index:t})},r.removeEvent=function(e){r.worker.postMessage({target:"remove-event",index:e})},r.createStyle=function(e){r.worker.postMessage({target:"create-style",style:e})},r.getStyles=function(e,t){r.fetchFromWorker({target:"get-styles"},function(t){e(t.styles)},t)},r.setStyle=function(e,t){r.worker.postMessage({target:"set-style",style:e,index:t})},r.removeStyle=function(e){r.worker.postMessage({target:"remove-style",index:e})},r.init()})},{}],"9pCYc":[function(e,t,r,s){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["5lsnt"],"5lsnt","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-libass/dist/artplayer-plugin-libass.legacy.js b/packages/artplayer-plugin-libass/dist/artplayer-plugin-libass.legacy.js index 0dd447df8..f02fbb2ef 100644 --- a/packages/artplayer-plugin-libass/dist/artplayer-plugin-libass.legacy.js +++ b/packages/artplayer-plugin-libass/dist/artplayer-plugin-libass.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[n]&&s[n],i=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(t,r){if(!i[t]){if(!e[t]){var o="function"==typeof s[n]&&s[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var f=i[t]=new l.Module(t);e[t][0].call(f.exports,d,f,f.exports,this)}return i[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:l(t)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=i,l.parent=a,l.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return s[n]}}),s[n]=l;for(var u=0;u0&&void 0!==c[0]?c[0]:{}).fallbackFont)return[2,this.utils.errorHandle(t.fallbackFont,"artplayerPluginLibass: fallbackFont is required")];return t.workerUrl||(t.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),t.availableFonts&&(t.availableFonts=Object.entries(t.availableFonts).reduce(function(t,r){var n=(0,f._)(r,2),o=n[0],s=n[1];return t[o]=(0,a._)(e,_,L).call(e,s),t},{})),n=this,o=h.default.bind,s=[(0,l._)({subContent:"[Script Info]\nScriptType: v4.00+",video:this.$video},t)],i={},[4,(0,a._)(this,w,F).call(this,t)];case 1:return n.libass=new(o.apply(h.default,[void 0,(0,u._).apply(void 0,s.concat([(i.workerUrl=d.sent(),i.fallbackFont=(0,a._)(this,_,L).call(this,t.fallbackFont),i.fonts=null===(r=t.fonts)||void 0===r?void 0:r.map(function(t){return(0,a._)(e,_,L).call(e,t)}),i)]))])),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n z-index: 20;",[2]}})})).apply(this,arguments)}function E(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}function P(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}function T(e){this.$webvtt.style.visibility=e?"visible":"hidden"}function L(e){return(0,a._)(this,g,S).call(this,e)?e:new URL(e,document.baseURI).toString()}function S(e){return/^https?:\/\//.test(e)}function F(e){var t=this,r=e.workerUrl,n=e.wasmUrl;return new Promise(function(e){fetch(r).then(function(e){return e.text()}).then(function(o){var s=o,i=new Blob([s=s.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,function(e,o){return n=n?(0,a._)(t,_,L).call(t,n):new URL(o,r).toString(),'wasmBinaryFile = "'.concat(n,'"')})],{type:"text/javascript"});e(URL.createObjectURL(i))})})}function I(){var e=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));t instanceof WebAssembly.Module&&(e=new WebAssembly.Instance(t) instanceof WebAssembly.Instance)}}catch(e){}this.utils.errorHandle(e,"Browser does not support WebAssembly")}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_class_private_method_get":"g3ohx","@swc/helpers/_/_class_private_method_init":"7mIdc","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_ts_generator":"6Xyd0","libass-wasm":"gKNB2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,s,a){try{var i=e[s](a),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var a=e.apply(t,r);function i(e){o(a,n,s,i,c,"next",e)}function c(e){o(a,n,s,i,c,"throw",e)}i(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9iJMm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],g3ohx:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7mIdc":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return s});var o=e("./_check_private_redeclaration.js");function s(e,t){(0,o._)(e,t),t.add(e)}},{"./_check_private_redeclaration.js":"7Xw9a","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7Xw9a":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function l(e,t,r,n){var o,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(a=(s<3?o(a):s>3?o(t,r,a):o(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var i,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?n.static?e:e.prototype:null,f=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),d=!1,p=r.length-1;p>=0;p--){var h={};for(var v in n)h[v]="access"===v?{}:n[v];for(var v in n.access)h.access[v]=n.access[v];h.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,r[p])("accessor"===c?{get:f.get,set:f.set}:f[l],h);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(i=a(m.get))&&(f.get=i),(i=a(m.set))&&(f.set=i),(i=a(m.init))&&o.unshift(i)}else(i=a(m))&&("field"===c?o.unshift(i):f[l]=i)}u&&Object.defineProperty(u,n.name,f),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a}function j(){for(var e=[],t=0;t1||i(e,t)})},t&&(n[e]=t(n[e])))}function i(e,t){try{var r;(r=o[e](t)).value instanceof O?Promise.resolve(r.value.v).then(c,l):u(s[0][2],r)}catch(e){u(s[0][3],e)}}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),s.shift(),s.length&&i(s[0][0],s[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:O(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function L(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return S(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function M(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function W(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function D(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function C(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var A="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function R(e){function t(t){e.error=e.hasError?new A(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:a,__assign:i,__rest:c,__decorate:l,__param:u,__metadata:v,__awaiter:m,__generator:y,__createBinding:b,__exportStar:_,__values:g,__read:w,__spread:j,__spreadArrays:k,__spreadArray:x,__await:O,__asyncGenerator:E,__asyncDelegator:P,__asyncValues:T,__makeTemplateObject:L,__importStar:F,__importDefault:I,__classPrivateFieldGet:M,__classPrivateFieldSet:W,__classPrivateFieldIn:D,__addDisposableResource:C,__disposeResources:R}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gKNB2:[function(e,t,r){"function"==typeof SubtitlesOctopusOnLoad&&SubtitlesOctopusOnLoad(),t.exports&&(t.exports=function(e){var t=!1;try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){var r=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));r instanceof WebAssembly.Module&&(t=new WebAssembly.Instance(r) instanceof WebAssembly.Instance)}}catch(e){}console.log("WebAssembly support detected: "+(t?"yes":"no"));var n=this;function o(){n.setCurrentTime(n.video.currentTime+n.timeOffset)}function s(){n.setIsPaused(!1,n.video.currentTime+n.timeOffset)}function a(){n.setIsPaused(!0,n.video.currentTime+n.timeOffset)}function i(){n.video.removeEventListener("timeupdate",o,!1)}function c(){n.video.addEventListener("timeupdate",o,!1);var e=n.video.currentTime+n.timeOffset;n.setCurrentTime(e)}function l(){n.setRate(n.video.playbackRate)}function u(){n.setIsPaused(!0,n.video.currentTime+n.timeOffset)}function f(e){e.target.removeEventListener(e.type,f,!1),n.resize()}function d(){var e=n.renderFramesData,t=performance.now();n.ctx.clearRect(0,0,n.canvas.width,n.canvas.height);for(var r=0;r=1?s[a]:1;var i=new ImageData(s,o.w,o.h);n.bufferCanvasCtx.putImageData(i,0,0),n.ctx.drawImage(n.bufferCanvas,o.x,o.y)}if(n.debug){var c=Math.round(performance.now()-t),l=e.blendTime;void 0!==l?console.log("render: "+Math.round(e.spentTime-l)+" ms, blend: "+Math.round(l)+" ms, draw: "+c+" ms; TOTAL="+Math.round(e.spentTime+c)+" ms"):console.log(Math.round(e.spentTime)+" ms (+ "+c+" ms draw)"),n.renderStart=performance.now()}}function p(){var e=n.renderFramesData,t=performance.now();n.ctx.clearRect(0,0,n.canvas.width,n.canvas.height);for(var r=0;r0?n.resize():n.video.addEventListener("loadedmetadata",f,!1))},n.getVideoPosition=function(){var e=n.video.videoWidth/n.video.videoHeight,t=n.video.offsetWidth,r=n.video.offsetHeight,o=t,s=r;t/r>e?o=Math.floor(r*e):s=Math.floor(t/e);var a=(t-o)/2,i=(r-s)/2;return{width:o,height:s,x:a,y:i}},n.setSubUrl=function(e){n.subUrl=e},n.renderFrameData=null,n.workerActive=!1,n.frameId=0,n.onWorkerMessage=function(e){!n.workerActive&&(n.workerActive=!0,n.onReadyEvent&&n.onReadyEvent());var t=e.data;switch(t.target){case"stdout":console.log(t.content);break;case"console-log":console.log.apply(console,JSON.parse(t.content));break;case"console-debug":console.debug.apply(console,JSON.parse(t.content));break;case"console-info":console.info.apply(console,JSON.parse(t.content));break;case"console-warn":console.warn.apply(console,JSON.parse(t.content));break;case"console-error":console.error.apply(console,JSON.parse(t.content));break;case"stderr":console.error(t.content);break;case"window":window[t.method]();break;case"canvas":switch(t.op){case"getContext":n.ctx=n.canvas.getContext(t.type,t.attributes);break;case"resize":n.resize(t.width,t.height);break;case"renderCanvas":n.lastRenderTime0&&s>n.maxRenderHeight&&(s=n.maxRenderHeight),e*=s/t,t=s}return{width:e,height:t}}((s=n.getVideoPosition()).width*n.pixelRatio,s.height*n.pixelRatio);e=a.width,t=a.height;var i=n.canvasParent.getBoundingClientRect().top-n.video.getBoundingClientRect().top;r=s.y-i,o=s.x}if(!e||!t){n.video||console.error("width or height is 0. You should specify width & height for resize.");return}(n.canvas.width!=e||n.canvas.height!=t||n.canvas.style.top!=r||n.canvas.style.left!=o)&&(n.canvas.width=e,n.canvas.height=t,null!=s&&(n.canvasParent.style.position="relative",n.canvas.style.display="block",n.canvas.style.position="absolute",n.canvas.style.width=s.width+"px",n.canvas.style.height=s.height+"px",n.canvas.style.top=r+"px",n.canvas.style.left=o+"px",n.canvas.style.pointerEvents="none"),n.worker.postMessage({target:"canvas",width:n.canvas.width,height:n.canvas.height}))},n.resizeWithTimeout=function(){n.resize(),setTimeout(n.resize,100)},n.runBenchmark=function(){n.worker.postMessage({target:"runBenchmark"})},n.customMessage=function(e,t){t=t||{},n.worker.postMessage({target:"custom",userData:e,preMain:t.preMain})},n.setCurrentTime=function(e){n.worker.postMessage({target:"video",currentTime:e})},n.setTrackByUrl=function(e){n.worker.postMessage({target:"set-track-by-url",url:e})},n.setTrack=function(e){n.worker.postMessage({target:"set-track",content:e})},n.freeTrack=function(e){n.worker.postMessage({target:"free-track"})},n.render=n.setCurrentTime,n.setIsPaused=function(e,t){n.worker.postMessage({target:"video",isPaused:e,currentTime:t})},n.setRate=function(e){n.worker.postMessage({target:"video",rate:e})},n.dispose=function(){n.worker.postMessage({target:"destroy"}),n.worker.terminate(),n.worker.removeEventListener("message",n.onWorkerMessage),n.worker.removeEventListener("error",n.workerError),n.workerActive=!1,n.worker=null,n.video&&(n.video.removeEventListener("timeupdate",o,!1),n.video.removeEventListener("playing",s,!1),n.video.removeEventListener("pause",a,!1),n.video.removeEventListener("seeking",i,!1),n.video.removeEventListener("seeked",c,!1),n.video.removeEventListener("ratechange",l,!1),n.video.removeEventListener("waiting",u,!1),n.video.removeEventListener("loadedmetadata",f,!1),document.removeEventListener("fullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("mozfullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("webkitfullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("msfullscreenchange",n.resizeWithTimeout,!1),window.removeEventListener("resize",n.resizeWithTimeout,!1),n.video.parentNode.removeChild(n.canvasParent),n.video=null),n.ro&&(n.ro.disconnect(),n.ro=null),n.onCustomMessage=null,n.onErrorEvent=null,n.onReadyEvent=null},n.fetchFromWorker=function(e,t,r){try{var o=e.target,s=setTimeout(function(){i(Error("Error: Timeout while try to fetch "+o))},5e3),a=function(e){e.data.target==o&&(t(e.data),n.worker.removeEventListener("message",a),n.worker.removeEventListener("error",i),clearTimeout(s))},i=function(e){r(e),n.worker.removeEventListener("message",a),n.worker.removeEventListener("error",i),clearTimeout(s)};n.worker.addEventListener("message",a),n.worker.addEventListener("error",i),n.worker.postMessage(e)}catch(e){r(e)}},n.createEvent=function(e){n.worker.postMessage({target:"create-event",event:e})},n.getEvents=function(e,t){n.fetchFromWorker({target:"get-events"},function(t){e(t.events)},t)},n.setEvent=function(e,t){n.worker.postMessage({target:"set-event",event:e,index:t})},n.removeEvent=function(e){n.worker.postMessage({target:"remove-event",index:e})},n.createStyle=function(e){n.worker.postMessage({target:"create-style",style:e})},n.getStyles=function(e,t){n.fetchFromWorker({target:"get-styles"},function(t){e(t.styles)},t)},n.setStyle=function(e,t){n.worker.postMessage({target:"set-style",style:e,index:t})},n.removeStyle=function(e){n.worker.postMessage({target:"remove-style",index:e})},n.init()})},{}]},["1dPf1"],"1dPf1","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,s,a,i){var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof c[n]&&c[n],u=l.i||{},f=l.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!f[t]){if(!e[t]){if(o[t])return o[t];var s="function"==typeof c[n]&&c[n];if(!r&&s)return s(t,!0);if(l)return l(t,!0);if(d&&"string"==typeof t)return d(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}u.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},u.cache={};var i=f[t]=new p.Module(t);e[t][0].call(i.exports,u,i,i.exports,c)}return f[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=d,this.exports={}},p.modules=e,p.cache=f,p.parent=l,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=u,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return c[n]}}),c[n]=p;for(var h=0;h0&&void 0!==c[0]?c[0]:{}).fallbackFont)return[2,this.utils.errorHandle(t.fallbackFont,"artplayerPluginLibass: fallbackFont is required")];return t.workerUrl||(t.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),t.availableFonts&&(t.availableFonts=Object.entries(t.availableFonts).reduce(function(t,r){var n=(0,d._)(r,2),o=n[0],s=n[1];return t[o]=(0,i._)(e,w,F).call(e,s),t},{})),n=this,o=m.default.bind,s=[(0,u._)({subContent:"[Script Info]\nScriptType: v4.00+",video:this.$video},t)],a={},[4,(0,i._)(this,k,W).call(this,t)];case 1:return n.libass=new(o.apply(m.default,[void 0,f._.apply(void 0,s.concat([(a.workerUrl=l.sent(),a.fallbackFont=(0,i._)(this,w,F).call(this,t.fallbackFont),a.fonts=null==(r=t.fonts)?void 0:r.map(function(t){return(0,i._)(e,w,F).call(e,t)}),a)]))])),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n z-index: 20;",[2]}})})).apply(this,arguments)}function L(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}function T(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}function S(e){this.$webvtt.style.visibility=e?"visible":"hidden"}function F(e){return(0,i._)(this,j,I).call(this,e)?e:new URL(e,document.baseURI).toString()}function I(e){return/^https?:\/\//.test(e)}function W(e){var t=this,r=e.workerUrl,n=e.wasmUrl;return new Promise(function(e){fetch(r).then(function(e){return e.text()}).then(function(o){var s=o,a=new Blob([s=s.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,function(e,o){return n=n?(0,i._)(t,w,F).call(t,n):new URL(o,r).toString(),'wasmBinaryFile = "'.concat(n,'"')})],{type:"text/javascript"});e(URL.createObjectURL(a))})})}function M(){var e=!1;try{if(("undefined"==typeof WebAssembly?"undefined":(0,p._)(WebAssembly))==="object"&&"function"==typeof WebAssembly.instantiate){var t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));t instanceof WebAssembly.Module&&(e=new WebAssembly.Instance(t)instanceof WebAssembly.Instance)}}catch(e){}this.utils.errorHandle(e,"Browser does not support WebAssembly")}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_class_private_method_get":"g3ohx","@swc/helpers/_/_class_private_method_init":"7mIdc","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","libass-wasm":"gKNB2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t,r,n,o,s,a){try{var i=e[s](a),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){s(a,n,o,i,c,"next",e)}function c(e){s(a,n,o,i,c,"throw",e)}i(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9iJMm":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}o.defineInteropFlag(r),o.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],g3ohx:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}o.defineInteropFlag(r),o.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7mIdc":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return a});var s=e("./_check_private_redeclaration.js");function a(e,t){(0,s._)(e,t),t.add(e)}},{"./_check_private_redeclaration.js":"7Xw9a","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7Xw9a":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}o.defineInteropFlag(r),o.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function s(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,s._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function f(e,t){return function(r,n){t(r,n,e)}}function d(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,u="getter"===l?"get":"setter"===l?"set":"value",f=!t&&e?n.static?e:e.prototype:null,d=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,h=r.length-1;h>=0;h--){var v={};for(var m in n)v[m]="access"===m?{}:n[m];for(var m in n.access)v.access[m]=n.access[m];v.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var y=(0,r[h])("accessor"===l?{get:d.get,set:d.set}:d[u],v);if("accessor"===l){if(void 0===y)continue;if(null===y||(void 0===y?"undefined":(0,s._)(y))!=="object")throw TypeError("Object expected");(c=i(y.get))&&(d.get=c),(c=i(y.set))&&(d.set=c),(c=i(y.init))&&o.unshift(c)}else(c=i(y))&&("field"===l?o.unshift(c):d[u]=c)}f&&Object.defineProperty(f,n.name,d),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a}function k(){for(var e=[],t=0;t1||i(e,t)})},t&&(n[e]=t(n[e])))}function i(e,t){try{var r;(r=o[e](t)).value instanceof E?Promise.resolve(r.value.v).then(c,l):u(s[0][2],r)}catch(e){u(s[0][3],e)}}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),s.shift(),s.length&&i(s[0][0],s[0][1])}}function L(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:E(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=w(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var s,a,i;s=n,a=o,i=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){s({value:e,done:i})},a)})}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},I=function(e){return(I=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function W(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=I(e),n=0;n=1?s[a]:1;var i=new ImageData(s,o.w,o.h);n.bufferCanvasCtx.putImageData(i,0,0),n.ctx.drawImage(n.bufferCanvas,o.x,o.y)}if(n.debug){var c=Math.round(performance.now()-t),l=e.blendTime;void 0!==l?console.log("render: "+Math.round(e.spentTime-l)+" ms, blend: "+Math.round(l)+" ms, draw: "+c+" ms; TOTAL="+Math.round(e.spentTime+c)+" ms"):console.log(Math.round(e.spentTime)+" ms (+ "+c+" ms draw)"),n.renderStart=performance.now()}}function h(){var e=n.renderFramesData,t=performance.now();n.ctx.clearRect(0,0,n.canvas.width,n.canvas.height);for(var r=0;r0?n.resize():n.video.addEventListener("loadedmetadata",d,!1))},n.getVideoPosition=function(){var e=n.video.videoWidth/n.video.videoHeight,t=n.video.offsetWidth,r=n.video.offsetHeight,o=t,s=r;t/r>e?o=Math.floor(r*e):s=Math.floor(t/e);var a=(t-o)/2,i=(r-s)/2;return{width:o,height:s,x:a,y:i}},n.setSubUrl=function(e){n.subUrl=e},n.renderFrameData=null,n.workerActive=!1,n.frameId=0,n.onWorkerMessage=function(e){!n.workerActive&&(n.workerActive=!0,n.onReadyEvent&&n.onReadyEvent());var t=e.data;switch(t.target){case"stdout":console.log(t.content);break;case"console-log":console.log.apply(console,JSON.parse(t.content));break;case"console-debug":console.debug.apply(console,JSON.parse(t.content));break;case"console-info":console.info.apply(console,JSON.parse(t.content));break;case"console-warn":console.warn.apply(console,JSON.parse(t.content));break;case"console-error":console.error.apply(console,JSON.parse(t.content));break;case"stderr":console.error(t.content);break;case"window":window[t.method]();break;case"canvas":switch(t.op){case"getContext":n.ctx=n.canvas.getContext(t.type,t.attributes);break;case"resize":n.resize(t.width,t.height);break;case"renderCanvas":n.lastRenderTime0&&s>n.maxRenderHeight&&(s=n.maxRenderHeight),e*=s/t,t=s}return{width:e,height:t}}((s=n.getVideoPosition()).width*n.pixelRatio,s.height*n.pixelRatio);e=a.width,t=a.height;var i=n.canvasParent.getBoundingClientRect().top-n.video.getBoundingClientRect().top;r=s.y-i,o=s.x}if(!e||!t){n.video||console.error("width or height is 0. You should specify width & height for resize.");return}(n.canvas.width!=e||n.canvas.height!=t||n.canvas.style.top!=r||n.canvas.style.left!=o)&&(n.canvas.width=e,n.canvas.height=t,null!=s&&(n.canvasParent.style.position="relative",n.canvas.style.display="block",n.canvas.style.position="absolute",n.canvas.style.width=s.width+"px",n.canvas.style.height=s.height+"px",n.canvas.style.top=r+"px",n.canvas.style.left=o+"px",n.canvas.style.pointerEvents="none"),n.worker.postMessage({target:"canvas",width:n.canvas.width,height:n.canvas.height}))},n.resizeWithTimeout=function(){n.resize(),setTimeout(n.resize,100)},n.runBenchmark=function(){n.worker.postMessage({target:"runBenchmark"})},n.customMessage=function(e,t){t=t||{},n.worker.postMessage({target:"custom",userData:e,preMain:t.preMain})},n.setCurrentTime=function(e){n.worker.postMessage({target:"video",currentTime:e})},n.setTrackByUrl=function(e){n.worker.postMessage({target:"set-track-by-url",url:e})},n.setTrack=function(e){n.worker.postMessage({target:"set-track",content:e})},n.freeTrack=function(e){n.worker.postMessage({target:"free-track"})},n.render=n.setCurrentTime,n.setIsPaused=function(e,t){n.worker.postMessage({target:"video",isPaused:e,currentTime:t})},n.setRate=function(e){n.worker.postMessage({target:"video",rate:e})},n.dispose=function(){n.worker.postMessage({target:"destroy"}),n.worker.terminate(),n.worker.removeEventListener("message",n.onWorkerMessage),n.worker.removeEventListener("error",n.workerError),n.workerActive=!1,n.worker=null,n.video&&(n.video.removeEventListener("timeupdate",s,!1),n.video.removeEventListener("playing",a,!1),n.video.removeEventListener("pause",i,!1),n.video.removeEventListener("seeking",c,!1),n.video.removeEventListener("seeked",l,!1),n.video.removeEventListener("ratechange",u,!1),n.video.removeEventListener("waiting",f,!1),n.video.removeEventListener("loadedmetadata",d,!1),document.removeEventListener("fullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("mozfullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("webkitfullscreenchange",n.resizeWithTimeout,!1),document.removeEventListener("msfullscreenchange",n.resizeWithTimeout,!1),window.removeEventListener("resize",n.resizeWithTimeout,!1),n.video.parentNode.removeChild(n.canvasParent),n.video=null),n.ro&&(n.ro.disconnect(),n.ro=null),n.onCustomMessage=null,n.onErrorEvent=null,n.onReadyEvent=null},n.fetchFromWorker=function(e,t,r){try{var o=e.target,s=setTimeout(function(){i(Error("Error: Timeout while try to fetch "+o))},5e3),a=function(e){e.data.target==o&&(t(e.data),n.worker.removeEventListener("message",a),n.worker.removeEventListener("error",i),clearTimeout(s))},i=function(e){r(e),n.worker.removeEventListener("message",a),n.worker.removeEventListener("error",i),clearTimeout(s)};n.worker.addEventListener("message",a),n.worker.addEventListener("error",i),n.worker.postMessage(e)}catch(e){r(e)}},n.createEvent=function(e){n.worker.postMessage({target:"create-event",event:e})},n.getEvents=function(e,t){n.fetchFromWorker({target:"get-events"},function(t){e(t.events)},t)},n.setEvent=function(e,t){n.worker.postMessage({target:"set-event",event:e,index:t})},n.removeEvent=function(e){n.worker.postMessage({target:"remove-event",index:e})},n.createStyle=function(e){n.worker.postMessage({target:"create-style",style:e})},n.getStyles=function(e,t){n.fetchFromWorker({target:"get-styles"},function(t){e(t.styles)},t)},n.setStyle=function(e,t){n.worker.postMessage({target:"set-style",style:e,index:t})},n.removeStyle=function(e){n.worker.postMessage({target:"remove-style",index:e})},n.init()})},{"@swc/helpers/_/_type_of":"felZi"}]},["1dPf1"],"1dPf1","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.js b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.js index 84155269a..3acd6d473 100644 --- a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.js +++ b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[i]&&a[i],s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!s[t]){if(!e[t]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(t,!0);if(o)return o(t,!0);if(l&&"string"==typeof t)return l(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(n){var i=e[t][1][n];return null!=i?i:n},d.cache={};var c=s[t]=new u.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=o,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var f=0;fo);var r=e("./parser");async function a(e,{getExt:t,srtToVtt:n,assToVtt:i}){let r=await fetch(e.url),a=await r.arrayBuffer(),o=new TextDecoder(e.encoding||"utf-8").decode(a);switch(e.type||t(e.url)){case"srt":return n(o);case"ass":return i(o);case"vtt":return o;default:return""}}function o({subtitles:e=[]}){return async t=>{let{unescape:n,getExt:i,srtToVtt:o,assToVtt:s}=t.constructor.utils,l=new r.WebVTTParser,u=new r.WebVTTSerializer,f=(await Promise.all(e.map(e=>a(e,{getExt:i,srtToVtt:o,assToVtt:s})))).map((t,n)=>{let i=l.parse(t,"metadata");return i.url=e[n].url,i.name=e[n].name,i}),c="";function d(e=[]){let i=function(e){let t=new r.WebVTTParser().parse("","metadata");for(let n=0;n${n.value}`}}}t.cues.push(...i.cues)}return t}(e),a=u.serialize(i.cues);URL.revokeObjectURL(c);let o=URL.createObjectURL(new Blob([a],{type:"text/vtt"}));c=o,t.option.subtitle.escape=!1,t.subtitle.init({...t.option.subtitle,url:o,type:"vtt",onVttLoad:n})}return d(f),{name:"multipleSubtitles",tracks:(e=[])=>d(e.map(e=>f.find(t=>t.name===e))),reset:()=>d(f)}}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=o)},{"./parser":"cU78l","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cU78l:[function(e,t,n){!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},t=function(t){t||(t={"&":"&","<":"<",">":">","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=t,this.parse=function(n,a){n=n.replace(/\0/g,"�");var o=Date.now(),s=0,l=n.split(/\r\n|\r|\n/),u=!1,f=[],c=[],d=[];function p(e,t){d.push({message:e,line:s+1,col:t})}var m=l[s],g=m.length,h="WEBVTT",v=0,b=h.length;for("\uFEFF"===m[0]&&(v=1,b+=1),(gb&&" "!==m[b]&&" "!==m[b])&&p('No valid signature. (File needs to start with "WEBVTT".)'),s++;""!=l[s]&&void 0!=l[s];){if(p("No blank line after the signature."),-1!=l[s].indexOf("-->")){u=!0;break}s++}for(;void 0!=l[s];){for(;!u&&""==l[s];)s++;if(!u&&void 0==l[s])break;T=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null});var T,y=!0;if(-1==l[s].indexOf("-->")){if(T.id=l[s],/^NOTE($|[ \t])/.test(T.id)){for(s++;""!=l[s]&&void 0!=l[s];)-1!=l[s].indexOf("-->")&&p("Cannot have timestamp in a comment."),s++;continue}if(/^STYLE($|[ \t])/.test(T.id)){var x=[],w=!1;for(s++;""!=l[s]&&void 0!=l[s];)-1!=l[s].indexOf("-->")&&(p("Cannot have timestamp in a style block."),w=!0),x.push(l[s]),s++;if(c.length){p("Style blocks cannot appear after the first cue.");continue}w||f.push(x.join("\n"));continue}if(""==l[++s]||void 0==l[s]){p("Cue identifier cannot be standalone.");continue}if(-1==l[s].indexOf("-->")){y=!1,p("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var O=new i(l[s],p),P=0;if(c.length>0&&(P=c[c.length-1].startTime),y&&!O.parse(T,P)){for(T=null,s++;""!=l[s]&&void 0!=l[s];){if(-1!=l[s].indexOf("-->")){u=!0;break}s++}continue}for(s++;""!=l[s]&&void 0!=l[s];){if(-1!=l[s].indexOf("-->")){p("Blank line missing before cue."),u=!0;break}""!=T.text&&(T.text+="\n"),T.text+=l[s],s++}var j=new r(T.text,p,a,t);T.tree=j.parse(T.startTime,T.endTime),c.push(T)}return c.sort(function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:e.endTime2||parseInt(t,10)>59)&&(l="hours"),":"!=e[r]){a("No time unit separator found.");return}if(r++,2!=(n=s(/\d/)).length){a("Must be exactly two digits.");return}if("hours"==l||":"==e[r]){if(":"!=e[r]){a("No seconds found or minutes is greater than 59.");return}if(r++,2!=(i=s(/\d/)).length){a("Must be exactly two digits.");return}}else{if(2!=t.length){a("Must be exactly two digits.");return}i=n,n=t,t="0"}if("."!=e[r]){a('No decimal separator (".") found.');return}if(r++,3!=(o=s(/\d/)).length){a("Milliseconds must be given in three digits.");return}if(parseInt(n,10)>59){a("You cannot have more than 59 minutes.");return}if(parseInt(i,10)>59){a("You cannot have more than 59 seconds.");return}return 3600*parseInt(t,10)+60*parseInt(n,10)+parseInt(i,10)+parseInt(o,10)/1e3}this.parse=function(t,s){if(o(n),t.startTime=l(),void 0!=t.startTime){if(t.startTime' by whitespace."),o(n),"-"!=e[r]||"-"!=e[++r]||">"!=e[++r]){a("No valid timestamp separator found.");return}if(r++,i.test(e[r])&&a("'-->' not separated from timestamp by whitespace."),o(n),t.endTime=l(),void 0!=t.endTime)return t.endTime<=t.startTime&&a("End timestamp is not greater than start timestamp."),i.test(e[r]),o(n),function(e,t){for(var i=e.split(n),r=[],o=0;o100)){a("Line position cannot be >100%.");continue}if(""===d||isNaN(d)||!isFinite(d)){a("Line position needs to be a number");continue}if(void 0!==c){if(!["start","center","end"].includes(c)){a("Line alignment needs to be one of start, center or end");continue}t.lineAlign=c}t.snapToLines=!p,t.linePosition=parseFloat(d),parseFloat(d).toString()!==d&&(t.nonSerializable=!0)}else if("position"==l){if(/,/.test(u)){var f=u.split(",");u=f[0];var m=f[1]}if("%"!=u[u.length-1]){a("Text position must be a percentage.");continue}if(parseInt(u,10)>100||0>parseInt(u,10)){a("Text position needs to be between 0 and 100%.");continue}if(""===(d=u.slice(0,u.length-1))||isNaN(d)||!isFinite(d)){a("Line position needs to be a number");continue}if(void 0!==m){if(!["line-left","center","line-right"].includes(m)){a("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=m}t.textPosition=parseFloat(d)}else if("size"==l){if("%"!=u[u.length-1]){a("Size must be a percentage.");continue}if(parseInt(u,10)>100){a("Size cannot be >100%.");continue}var g=u.slice(0,u.length-1);if(void 0===g||""===g||isNaN(g)){a("Size needs to be a number"),g=100;continue}if((g=parseFloat(g))<0||g>100){a("Size needs to be between 0 and 100%.");continue}t.size=g}else if("align"==l){var h=["start","center","end","left","right"];if(-1==h.indexOf(u)){a("Alignment can only be set to one of "+h.join(", ")+".");continue}t.alignment=u}else a("Invalid setting.")}}(e.substring(r),t),!0}},this.parseTimestamp=function(){var t=l();if(void 0!=e[r]){a("Timestamp must not have trailing characters.");return}return t}},r=function(e,t,n,r){this.entities=r;var a=this,e=e,o=0,s=function(e){"metadata"!=n&&t(e,o+1)};this.parse=function(t,l){var u={children:[]},f=u,c=[];function d(e){f.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:f}),f=f.children[f.children.length-1]}for(;void 0!=e[o];){var p=function(){for(var t="data",n="",i="",l=[];void 0!=e[o-1]||0==o;){var u=e[o];if("data"==t){if("&"==u)i=u,t="escape";else if("<"==u&&""==n)t="tag";else{if("<"==u||void 0==u)return["text",n];n+=u}}else if("escape"==t){if("<"==u||void 0==u){let e;return s("Incorrect escape."),(e=i.match(/^&#([0-9]+)$/))?n+=String.fromCharCode(e[1]):a.entities[i]?n+=a.entities[i]:n+=i,["text",n]}if("&"==u)s("Incorrect escape."),n+=i,i=u;else if(/[a-z#0-9]/i.test(u))i+=u;else if(";"==u){let e;(e=i.match(/^&#(x?[0-9]+)$/))?n+=String.fromCharCode("0"+e[1]):a.entities[i+u]?n+=a.entities[i+u]:(e=Object.keys(r).find(e=>i.startsWith(e)))?n+=a.entities[e]+i.slice(e.length)+u:(s("Incorrect escape."),n+=i+";"),t="data"}else s("Incorrect escape."),n+=i+u,t="data"}else if("tag"==t){if(" "==u||"\n"==u||"\f"==u||" "==u)t="start tag annotation";else if("."==u)t="start tag class";else if("/"==u)t="end tag";else if(/\d/.test(u))n=u,t="timestamp tag";else{if(">"==u||void 0==u)return">"==u&&o++,["start tag","",[],""];n=u,t="start tag"}}else if("start tag"==t){if(" "==u||"\f"==u||" "==u)t="start tag annotation";else if("\n"==u)i=u,t="start tag annotation";else if("."==u)t="start tag class";else{if(">"==u||void 0==u)return">"==u&&o++,["start tag",n,[],""];n+=u}}else if("start tag class"==t){if(" "==u||"\f"==u||" "==u)i&&l.push(i),i="",t="start tag annotation";else if("\n"==u)i&&l.push(i),i=u,t="start tag annotation";else if("."==u)i&&l.push(i),i="";else{if(">"==u||void 0==u)return">"==u&&o++,i&&l.push(i),["start tag",n,l,""];i+=u}}else if("start tag annotation"==t){if(">"==u||void 0==u)return">"==u&&o++,["start tag",n,l,i=i.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];i+=u}else if("end tag"==t){if(">"==u||void 0==u)return">"==u&&o++,["end tag",n];n+=u}else if("timestamp tag"==t){if(">"==u||void 0==u)return">"==u&&o++,["timestamp",n];n+=u}else s("Never happens.");o++}}();if("text"==p[0])f.children.push({type:"text",value:p[1],parent:f});else if("start tag"==p[0]){"chapters"==n&&s("Start tags not allowed in chapter title text.");var m=p[1];"v"!=m&&"lang"!=m&&""!=p[3]&&s("Onlyandcan have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m?d(p):"rt"==m&&"ruby"==f.name?d(p):"v"==m?(function(e){for(var t=f;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&s("cannot be nested inside itself."),d(p),f.value=p[3],p[3]||s("requires an annotation.")):"lang"==m?(d(p),f.value=p[3]):s("Incorrect start tag.")}else if("end tag"==p[0])"chapters"==n&&s("End tags not allowed in chapter title text."),p[1]==f.name?f=f.parent:"ruby"==p[1]&&"rt"==f.name?f=f.parent.parent:s("Incorrect end tag.");else if("timestamp"==p[0]){"chapters"==n&&s("Timestamp not allowed in chapter title text.");var g=new i(p[1],s).parseTimestamp();void 0!=g&&((g<=t||g>=l)&&s("Timestamp must be between start timestamp and end timestamp."),c.length>0&&c[c.length-1]>=g&&s("Timestamp must be greater than any previous timestamp."),f.children.push({type:"timestamp",value:g,parent:f}),c.push(g))}}for(;f.parent;)"v"!=f.name&&s("Required end tag missing."),f=f.parent;return function e(t){let n={...t};return t.children&&(n.children=t.children.map(e)),n.parent&&delete n.parent,n}(u)}},a=function(){function t(e){let t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),n=0,i=0,r=0;return e>=3600&&(n=Math.floor(e/3600)),i=Math.floor((e-3600*n)/60),r=Math.floor(e-3600*n-60*i),(n?n+":":"")+(""+i).padStart(2,"0")+":"+(""+r).padStart(2,"0")+"."+t}this.serialize=function(n,i){var r,a="WEBVTT\n\n";if(i)for(var o=0;o"+t(r.endTime)+function(t){var n="";let i=Object.keys(e).filter(n=>t[n]!==e[n]);return i.includes("direction")&&(n+=" vertical:"+t.direction),i.includes("alignment")&&(n+=" align:"+t.alignment),i.includes("size")&&(n+=" size:"+t.size+"%"),(i.includes("lineAlign")||i.includes("linePosition"))&&(n+=" line:"+t.linePosition+(t.snapToLines?"":"%")+(t.lineAlign&&t.lineAlign!=e.lineAlign?","+t.lineAlign:"")),(i.includes("textPosition")||i.includes("positionAlign"))&&(n+=" position:"+t.textPosition+"%"+(t.positionAlign&&t.positionAlign!==e.positionAlign?","+t.positionAlign:"")),n}(r)+"\n"+function e(n){for(var i="",r=0;r/g,">");else if("object"==a.type){if(i+="<"+a.name,a.classes)for(var o=0;o"}else"timestamp"==a.type?i+="<"+t(a.value)+">":i+="<"+a.value+">"}return i}(r.tree.children)+"\n\n";return a}};function o(e){e.WebVTTParser=t,e.WebVTTCueTimingsAndSettingsParser=i,e.WebVTTCueTextParser=r,e.WebVTTSerializer=a}"undefined"!=typeof window&&o(window),o(n)}()},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["4Kbf6"],"4Kbf6","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,i,r,a,o,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof l[i]&&l[i],f=u.i||{},d=u.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,n){if(!d[t]){if(!e[t]){if(r[t])return r[t];var a="function"==typeof l[i]&&l[i];if(!n&&a)return a(t,!0);if(u)return u(t,!0);if(c&&"string"==typeof t)return c(t);var o=Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(n){var i=e[t][1][n];return null!=i?i:n},f.cache={};var s=d[t]=new p.Module(t);e[t][0].call(s.exports,f,s,s.exports,l)}return d[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.require=c,this.exports={}},p.modules=e,p.cache=d,p.parent=u,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=f,p.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(p,"root",{get:function(){return l[i]}}),l[i]=p;for(var m=0;ms);var a=e("./parser");async function o(e,{getExt:t,srtToVtt:n,assToVtt:i}){let r=await fetch(e.url),a=await r.arrayBuffer(),o=new TextDecoder(e.encoding||"utf-8").decode(a);switch(e.type||t(e.url)){case"srt":return n(o);case"ass":return i(o);case"vtt":return o;default:return""}}function s({subtitles:e=[]}){return async t=>{let{unescape:n,getExt:i,srtToVtt:r,assToVtt:s}=t.constructor.utils,l=new(0,a.WebVTTParser),u=new(0,a.WebVTTSerializer),f=(await Promise.all(e.map(e=>o(e,{getExt:i,srtToVtt:r,assToVtt:s})))).map((t,n)=>{let i=l.parse(t,"metadata");return i.url=e[n].url,i.name=e[n].name,i}),d="";function c(e=[]){let i=function(e){let t=new(0,a.WebVTTParser)().parse("","metadata");for(let n=0;n${n.value}`}}}t.cues.push(...i.cues)}return t}(e),r=u.serialize(i.cues);URL.revokeObjectURL(d);let o=URL.createObjectURL(new Blob([r],{type:"text/vtt"}));d=o,t.option.subtitle.escape=!1,t.subtitle.init({...t.option.subtitle,url:o,type:"vtt",onVttLoad:n})}return c(f),{name:"multipleSubtitles",tracks:(e=[])=>c(e.map(e=>f.find(t=>t.name===e))),reset:()=>c(f)}}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=s)},{"./parser":"cU78l","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cU78l:[function(e,t,n,i){!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},t=function(t){t||(t={"&":"&","<":"<",">":">","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=t,this.parse=function(n,a){n=n.replace(/\0/g,"�");var o=Date.now(),s=0,l=n.split(/\r\n|\r|\n/),u=!1,f=[],d=[],c=[];function p(e,t){c.push({message:e,line:s+1,col:t})}var m=l[s],g=m.length,v="WEBVTT",h=0,b=v.length;for("\uFEFF"===m[0]&&(h=1,b+=1),(gb&&" "!==m[b]&&" "!==m[b])&&p('No valid signature. (File needs to start with "WEBVTT".)'),s++;""!=l[s]&&void 0!=l[s];){if(p("No blank line after the signature."),-1!=l[s].indexOf("--\x3e")){u=!0;break}s++}for(;void 0!=l[s];){for(;!u&&""==l[s];)s++;if(!u&&void 0==l[s])break;var T=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null}),y=!0;if(-1==l[s].indexOf("--\x3e")){if(T.id=l[s],/^NOTE($|[ \t])/.test(T.id)){for(s++;""!=l[s]&&void 0!=l[s];)-1!=l[s].indexOf("--\x3e")&&p("Cannot have timestamp in a comment."),s++;continue}if(/^STYLE($|[ \t])/.test(T.id)){var x=[],w=!1;for(s++;""!=l[s]&&void 0!=l[s];)-1!=l[s].indexOf("--\x3e")&&(p("Cannot have timestamp in a style block."),w=!0),x.push(l[s]),s++;if(d.length){p("Style blocks cannot appear after the first cue.");continue}w||f.push(x.join("\n"));continue}if(""==l[++s]||void 0==l[s]){p("Cue identifier cannot be standalone.");continue}if(-1==l[s].indexOf("--\x3e")){y=!1,p("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var O=new i(l[s],p),P=0;if(d.length>0&&(P=d[d.length-1].startTime),y&&!O.parse(T,P)){for(T=null,s++;""!=l[s]&&void 0!=l[s];){if(-1!=l[s].indexOf("--\x3e")){u=!0;break}s++}continue}for(s++;""!=l[s]&&void 0!=l[s];){if(-1!=l[s].indexOf("--\x3e")){p("Blank line missing before cue."),u=!0;break}""!=T.text&&(T.text+="\n"),T.text+=l[s],s++}var j=new r(T.text,p,a,t);T.tree=j.parse(T.startTime,T.endTime),d.push(T)}return d.sort(function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:+(e.endTime2||parseInt(t,10)>59)&&(l="hours"),":"!=e[r])return void a("No time unit separator found.");if(r++,2!=(n=s(/\d/)).length)return void a("Must be exactly two digits.");if("hours"==l||":"==e[r]){if(":"!=e[r])return void a("No seconds found or minutes is greater than 59.");if(r++,2!=(i=s(/\d/)).length)return void a("Must be exactly two digits.")}else{if(2!=t.length)return void a("Must be exactly two digits.");i=n,n=t,t="0"}return"."!=e[r]?void a('No decimal separator (".") found.'):(r++,3!=(o=s(/\d/)).length)?void a("Milliseconds must be given in three digits."):parseInt(n,10)>59?void a("You cannot have more than 59 minutes."):parseInt(i,10)>59?void a("You cannot have more than 59 seconds."):3600*parseInt(t,10)+60*parseInt(n,10)+parseInt(i,10)+parseInt(o,10)/1e3}this.parse=function(t,s){return(o(n),t.startTime=l(),void 0==t.startTime)?void 0:(t.startTime"!=e[++r])?void a("No valid timestamp separator found."):(r++,i.test(e[r])&&a("'--\x3e' not separated from timestamp by whitespace."),o(n),t.endTime=l(),void 0!=t.endTime)?(t.endTime<=t.startTime&&a("End timestamp is not greater than start timestamp."),i.test(e[r]),o(n),!function(e,t){for(var i=e.split(n),r=[],o=0;o100)){a("Line position cannot be >100%.");continue}if(""===c||isNaN(c)||!isFinite(c)){a("Line position needs to be a number");continue}if(void 0!==d){if(!["start","center","end"].includes(d)){a("Line alignment needs to be one of start, center or end");continue}t.lineAlign=d}t.snapToLines=!p,t.linePosition=parseFloat(c),parseFloat(c).toString()!==c&&(t.nonSerializable=!0)}else if("position"==l){if(/,/.test(u)){var f=u.split(",");u=f[0];var m=f[1]}if("%"!=u[u.length-1]){a("Text position must be a percentage.");continue}if(parseInt(u,10)>100||0>parseInt(u,10)){a("Text position needs to be between 0 and 100%.");continue}if(""===(c=u.slice(0,u.length-1))||isNaN(c)||!isFinite(c)){a("Line position needs to be a number");continue}if(void 0!==m){if(!["line-left","center","line-right"].includes(m)){a("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=m}t.textPosition=parseFloat(c)}else if("size"==l){if("%"!=u[u.length-1]){a("Size must be a percentage.");continue}if(parseInt(u,10)>100){a("Size cannot be >100%.");continue}var g=u.slice(0,u.length-1);if(void 0===g||""===g||isNaN(g)){a("Size needs to be a number"),g=100;continue}if((g=parseFloat(g))<0||g>100){a("Size needs to be between 0 and 100%.");continue}t.size=g}else if("align"==l){var v=["start","center","end","left","right"];if(-1==v.indexOf(u)){a("Alignment can only be set to one of "+v.join(", ")+".");continue}t.alignment=u}else a("Invalid setting.")}}(e.substring(r),t),!0):void 0},this.parseTimestamp=function(){var t=l();return void 0!=e[r]?void a("Timestamp must not have trailing characters."):t}},r=function(e,t,n,r){this.entities=r;var a=this,e=e,o=0,s=function(e){"metadata"!=n&&t(e,o+1)};this.parse=function(t,l){var u={children:[]},f=u,d=[];function c(e){f.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:f}),f=f.children[f.children.length-1]}for(;void 0!=e[o];){var p=function(){for(var t="data",n="",i="",l=[];void 0!=e[o-1]||0==o;){var u=e[o];if("data"==t)if("&"==u)i=u,t="escape";else if("<"==u&&""==n)t="tag";else{if("<"==u||void 0==u)return["text",n];n+=u}else if("escape"==t)if("<"==u||void 0==u){let e;return s("Incorrect escape."),(e=i.match(/^&#([0-9]+)$/))?n+=String.fromCharCode(e[1]):a.entities[i]?n+=a.entities[i]:n+=i,["text",n]}else if("&"==u)s("Incorrect escape."),n+=i,i=u;else if(/[a-z#0-9]/i.test(u))i+=u;else if(";"==u){let e;(e=i.match(/^&#(x?[0-9]+)$/))?n+=String.fromCharCode("0"+e[1]):a.entities[i+u]?n+=a.entities[i+u]:(e=Object.keys(r).find(e=>i.startsWith(e)))?n+=a.entities[e]+i.slice(e.length)+u:(s("Incorrect escape."),n+=i+";"),t="data"}else s("Incorrect escape."),n+=i+u,t="data";else if("tag"==t)if(" "==u||"\n"==u||"\f"==u||" "==u)t="start tag annotation";else if("."==u)t="start tag class";else if("/"==u)t="end tag";else if(/\d/.test(u))n=u,t="timestamp tag";else{if(">"==u||void 0==u)return">"==u&&o++,["start tag","",[],""];n=u,t="start tag"}else if("start tag"==t)if(" "==u||"\f"==u||" "==u)t="start tag annotation";else if("\n"==u)i=u,t="start tag annotation";else if("."==u)t="start tag class";else{if(">"==u||void 0==u)return">"==u&&o++,["start tag",n,[],""];n+=u}else if("start tag class"==t)if(" "==u||"\f"==u||" "==u)i&&l.push(i),i="",t="start tag annotation";else if("\n"==u)i&&l.push(i),i=u,t="start tag annotation";else if("."==u)i&&l.push(i),i="";else{if(">"==u||void 0==u)return">"==u&&o++,i&&l.push(i),["start tag",n,l,""];i+=u}else if("start tag annotation"==t)if(">"==u||void 0==u)return">"==u&&o++,["start tag",n,l,i=i.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];else i+=u;else if("end tag"==t)if(">"==u||void 0==u)return">"==u&&o++,["end tag",n];else n+=u;else if("timestamp tag"==t)if(">"==u||void 0==u)return">"==u&&o++,["timestamp",n];else n+=u;else s("Never happens.");o++}}();if("text"==p[0])f.children.push({type:"text",value:p[1],parent:f});else if("start tag"==p[0]){"chapters"==n&&s("Start tags not allowed in chapter title text.");var m=p[1];"v"!=m&&"lang"!=m&&""!=p[3]&&s("Onlyandcan have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m||"rt"==m&&"ruby"==f.name?c(p):"v"==m?(function(e){for(var t=f;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&s("cannot be nested inside itself."),c(p),f.value=p[3],p[3]||s("requires an annotation.")):"lang"==m?(c(p),f.value=p[3]):s("Incorrect start tag.")}else if("end tag"==p[0])"chapters"==n&&s("End tags not allowed in chapter title text."),p[1]==f.name?f=f.parent:"ruby"==p[1]&&"rt"==f.name?f=f.parent.parent:s("Incorrect end tag.");else if("timestamp"==p[0]){"chapters"==n&&s("Timestamp not allowed in chapter title text.");var g=new i(p[1],s).parseTimestamp();void 0!=g&&((g<=t||g>=l)&&s("Timestamp must be between start timestamp and end timestamp."),d.length>0&&d[d.length-1]>=g&&s("Timestamp must be greater than any previous timestamp."),f.children.push({type:"timestamp",value:g,parent:f}),d.push(g))}}for(;f.parent;)"v"!=f.name&&s("Required end tag missing."),f=f.parent;return function e(t){let n={...t};return t.children&&(n.children=t.children.map(e)),n.parent&&delete n.parent,n}(u)}},a=function(){function t(e){let t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),n=0,i=0,r=0;return e>=3600&&(n=Math.floor(e/3600)),i=Math.floor((e-3600*n)/60),r=Math.floor(e-3600*n-60*i),(n?n+":":"")+(""+i).padStart(2,"0")+":"+(""+r).padStart(2,"0")+"."+t}this.serialize=function(n,i){var r,a="WEBVTT\n\n";if(i)for(var o=0;ot[n]!==e[n]);return i.includes("direction")&&(n+=" vertical:"+t.direction),i.includes("alignment")&&(n+=" align:"+t.alignment),i.includes("size")&&(n+=" size:"+t.size+"%"),(i.includes("lineAlign")||i.includes("linePosition"))&&(n+=" line:"+t.linePosition+(t.snapToLines?"":"%")+(t.lineAlign&&t.lineAlign!=e.lineAlign?","+t.lineAlign:"")),(i.includes("textPosition")||i.includes("positionAlign"))&&(n+=" position:"+t.textPosition+"%"+(t.positionAlign&&t.positionAlign!==e.positionAlign?","+t.positionAlign:"")),n}(r)+"\n"+function e(n){for(var i="",r=0;r/g,">");else if("object"==a.type){if(i+="<"+a.name,a.classes)for(var o=0;o"}else"timestamp"==a.type?i+="<"+t(a.value)+">":i+="<"+a.value+">"}return i}(r.tree.children)+"\n\n";return a}};function o(e){e.WebVTTParser=t,e.WebVTTCueTimingsAndSettingsParser=i,e.WebVTTCueTextParser=r,e.WebVTTSerializer=a}"undefined"!=typeof window&&o(window),o(n)}()},{}],"9pCYc":[function(e,t,n,i){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["4Kbf6"],"4Kbf6","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.legacy.js b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.legacy.js index 411573ad2..be55eca84 100644 --- a/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.legacy.js +++ b/packages/artplayer-plugin-multiple-subtitles/dist/artplayer-plugin-multiple-subtitles.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],s=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=s[t]=new u.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return s[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=a,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:[],n=function(e){for(var t=new u.WebVTTParser().parse("","metadata"),r=0;r').concat(l.value,"")}}(n=t.cues).push.apply(n,(0,s._)(o.cues))}return t}(t),o=h.serialize(n.cues);URL.revokeObjectURL(v);var c=URL.createObjectURL(new Blob([o],{type:"text/vtt"}));v=c,e.option.subtitle.escape=!1,e.subtitle.init((0,a._)((0,i._)({},e.option.subtitle),{url:c,type:"vtt",onVttLoad:r}))}return(0,c._)(this,function(i){switch(i.label){case 0:return r=(t=e.constructor.utils).unescape,o=t.getExt,f=t.srtToVtt,p=t.assToVtt,d=new u.WebVTTParser,h=new u.WebVTTSerializer,[4,Promise.all(n.map(function(e){return function(e,t){return l.apply(this,arguments)}(e,{getExt:o,srtToVtt:f,assToVtt:p})}))];case 1:return m=i.sent().map(function(e,t){var r=d.parse(e,"metadata");return r.url=n[t].url,r.name=n[t].name,r}),v="",_(m),[2,{name:"multipleSubtitles",tracks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return _(e.map(function(e){return m.find(function(t){return t.name===e})}))},reset:function(){return _(m)}}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=f)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","./parser":"8YYw5","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,c,"next",e)}function c(e){o(a,n,i,s,c,"throw",e)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9agdF":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return i});var o=e("./_define_property.js");function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,r[d])("accessor"===c?{get:f.get,set:f.set}:f[u],h);if("accessor"===c){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(s=a(v.get))&&(f.get=s),(s=a(v.set))&&(f.set=s),(s=a(v.init))&&o.unshift(s)}else(s=a(v))&&("field"===c?o.unshift(s):f[u]=s)}l&&Object.defineProperty(l,n.name,f),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function w(){for(var e=[],t=0;t1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=o[e](t)).value instanceof T?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:T(e[n](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var D=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&y(t,e,r);return D(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function W(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function L(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function z(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function R(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:a,__assign:s,__rest:c,__decorate:u,__param:l,__metadata:m,__awaiter:v,__generator:_,__createBinding:y,__exportStar:g,__values:b,__read:j,__spread:w,__spreadArrays:x,__spreadArray:O,__await:T,__asyncGenerator:P,__asyncDelegator:S,__asyncValues:I,__makeTemplateObject:E,__importStar:F,__importDefault:A,__classPrivateFieldGet:k,__classPrivateFieldSet:W,__classPrivateFieldIn:L,__addDisposableResource:z,__disposeResources:R}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"8YYw5":[function(e,t,r){var n=e("@swc/helpers/_/_object_spread");!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},t=function(t){t||(t={"&":"&","<":"<",">":">","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=t,this.parse=function(r,n){r=r.replace(/\0/g,"�");var a=Date.now(),s=0,c=r.split(/\r\n|\r|\n/),u=!1,l=[],f=[],p=[];function d(e,t){p.push({message:e,line:s+1,col:t})}var h=c[s],m=h.length,v="WEBVTT",_=0,y=v.length;for("\uFEFF"===h[0]&&(_=1,y+=1),(my&&" "!==h[y]&&" "!==h[y])&&d('No valid signature. (File needs to start with "WEBVTT".)'),s++;""!=c[s]&&void 0!=c[s];){if(d("No blank line after the signature."),-1!=c[s].indexOf("-->")){u=!0;break}s++}for(;void 0!=c[s];){for(;!u&&""==c[s];)s++;if(!u&&void 0==c[s])break;g=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null});var g,b=!0;if(-1==c[s].indexOf("-->")){if(g.id=c[s],/^NOTE($|[ \t])/.test(g.id)){for(s++;""!=c[s]&&void 0!=c[s];)-1!=c[s].indexOf("-->")&&d("Cannot have timestamp in a comment."),s++;continue}if(/^STYLE($|[ \t])/.test(g.id)){var j=[],w=!1;for(s++;""!=c[s]&&void 0!=c[s];)-1!=c[s].indexOf("-->")&&(d("Cannot have timestamp in a style block."),w=!0),j.push(c[s]),s++;if(f.length){d("Style blocks cannot appear after the first cue.");continue}w||l.push(j.join("\n"));continue}if(""==c[++s]||void 0==c[s]){d("Cue identifier cannot be standalone.");continue}if(-1==c[s].indexOf("-->")){b=!1,d("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var x=new o(c[s],d),O=0;if(f.length>0&&(O=f[f.length-1].startTime),b&&!x.parse(g,O)){for(g=null,s++;""!=c[s]&&void 0!=c[s];){if(-1!=c[s].indexOf("-->")){u=!0;break}s++}continue}for(s++;""!=c[s]&&void 0!=c[s];){if(-1!=c[s].indexOf("-->")){d("Blank line missing before cue."),u=!0;break}""!=g.text&&(g.text+="\n"),g.text+=c[s],s++}var T=new i(g.text,d,n,t);g.tree=T.parse(g.startTime,g.endTime),f.push(g)}return f.sort(function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:e.endTime2||parseInt(t,10)>59)&&(c="hours"),":"!=e[o]){i("No time unit separator found.");return}if(o++,2!=(r=s(/\d/)).length){i("Must be exactly two digits.");return}if("hours"==c||":"==e[o]){if(":"!=e[o]){i("No seconds found or minutes is greater than 59.");return}if(o++,2!=(n=s(/\d/)).length){i("Must be exactly two digits.");return}}else{if(2!=t.length){i("Must be exactly two digits.");return}n=r,r=t,t="0"}if("."!=e[o]){i('No decimal separator (".") found.');return}if(o++,3!=(a=s(/\d/)).length){i("Milliseconds must be given in three digits.");return}if(parseInt(r,10)>59){i("You cannot have more than 59 minutes.");return}if(parseInt(n,10)>59){i("You cannot have more than 59 seconds.");return}return 3600*parseInt(t,10)+60*parseInt(r,10)+parseInt(n,10)+parseInt(a,10)/1e3}this.parse=function(t,s){if(a(r),t.startTime=c(),void 0!=t.startTime){if(t.startTime' by whitespace."),a(r),"-"!=e[o]||"-"!=e[++o]||">"!=e[++o]){i("No valid timestamp separator found.");return}if(o++,n.test(e[o])&&i("'-->' not separated from timestamp by whitespace."),a(r),t.endTime=c(),void 0!=t.endTime)return t.endTime<=t.startTime&&i("End timestamp is not greater than start timestamp."),n.test(e[o]),a(r),function(e,t){for(var n=e.split(r),o=[],a=0;a100)){i("Line position cannot be >100%.");continue}if(""===p||isNaN(p)||!isFinite(p)){i("Line position needs to be a number");continue}if(void 0!==f){if(!["start","center","end"].includes(f)){i("Line alignment needs to be one of start, center or end");continue}t.lineAlign=f}t.snapToLines=!d,t.linePosition=parseFloat(p),parseFloat(p).toString()!==p&&(t.nonSerializable=!0)}else if("position"==c){if(/,/.test(u)){var l=u.split(",");u=l[0];var h=l[1]}if("%"!=u[u.length-1]){i("Text position must be a percentage.");continue}if(parseInt(u,10)>100||0>parseInt(u,10)){i("Text position needs to be between 0 and 100%.");continue}if(""===(p=u.slice(0,u.length-1))||isNaN(p)||!isFinite(p)){i("Line position needs to be a number");continue}if(void 0!==h){if(!["line-left","center","line-right"].includes(h)){i("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=h}t.textPosition=parseFloat(p)}else if("size"==c){if("%"!=u[u.length-1]){i("Size must be a percentage.");continue}if(parseInt(u,10)>100){i("Size cannot be >100%.");continue}var m=u.slice(0,u.length-1);if(void 0===m||""===m||isNaN(m)){i("Size needs to be a number"),m=100;continue}if((m=parseFloat(m))<0||m>100){i("Size needs to be between 0 and 100%.");continue}t.size=m}else if("align"==c){var v=["start","center","end","left","right"];if(-1==v.indexOf(u)){i("Alignment can only be set to one of "+v.join(", ")+".");continue}t.alignment=u}else i("Invalid setting.")}}(e.substring(o),t),!0}},this.parseTimestamp=function(){var t=c();if(void 0!=e[o]){i("Timestamp must not have trailing characters.");return}return t}},i=function(e,t,r,i){this.entities=i;var a=this,e=e,s=0,c=function(e){"metadata"!=r&&t(e,s+1)};this.parse=function(t,u){var l={children:[]},f=l,p=[];function d(e){f.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:f}),f=f.children[f.children.length-1]}for(;void 0!=e[s];){var h=function(){for(var t="data",r="",n="",o=[];void 0!=e[s-1]||0==s;){var u=e[s];if("data"==t){if("&"==u)n=u,t="escape";else if("<"==u&&""==r)t="tag";else{if("<"==u||void 0==u)return["text",r];r+=u}}else if("escape"==t){if("<"==u||void 0==u){c("Incorrect escape.");var l=void 0;return(l=n.match(/^&#([0-9]+)$/))?r+=String.fromCharCode(l[1]):a.entities[n]?r+=a.entities[n]:r+=n,["text",r]}if("&"==u)c("Incorrect escape."),r+=n,n=u;else if(/[a-z#0-9]/i.test(u))n+=u;else if(";"==u){var f=void 0;(f=n.match(/^&#(x?[0-9]+)$/))?r+=String.fromCharCode("0"+f[1]):a.entities[n+u]?r+=a.entities[n+u]:(f=Object.keys(i).find(function(e){return n.startsWith(e)}))?r+=a.entities[f]+n.slice(f.length)+u:(c("Incorrect escape."),r+=n+";"),t="data"}else c("Incorrect escape."),r+=n+u,t="data"}else if("tag"==t){if(" "==u||"\n"==u||"\f"==u||" "==u)t="start tag annotation";else if("."==u)t="start tag class";else if("/"==u)t="end tag";else if(/\d/.test(u))r=u,t="timestamp tag";else{if(">"==u||void 0==u)return">"==u&&s++,["start tag","",[],""];r=u,t="start tag"}}else if("start tag"==t){if(" "==u||"\f"==u||" "==u)t="start tag annotation";else if("\n"==u)n=u,t="start tag annotation";else if("."==u)t="start tag class";else{if(">"==u||void 0==u)return">"==u&&s++,["start tag",r,[],""];r+=u}}else if("start tag class"==t){if(" "==u||"\f"==u||" "==u)n&&o.push(n),n="",t="start tag annotation";else if("\n"==u)n&&o.push(n),n=u,t="start tag annotation";else if("."==u)n&&o.push(n),n="";else{if(">"==u||void 0==u)return">"==u&&s++,n&&o.push(n),["start tag",r,o,""];n+=u}}else if("start tag annotation"==t){if(">"==u||void 0==u)return">"==u&&s++,["start tag",r,o,n=n.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];n+=u}else if("end tag"==t){if(">"==u||void 0==u)return">"==u&&s++,["end tag",r];r+=u}else if("timestamp tag"==t){if(">"==u||void 0==u)return">"==u&&s++,["timestamp",r];r+=u}else c("Never happens.");s++}}();if("text"==h[0])f.children.push({type:"text",value:h[1],parent:f});else if("start tag"==h[0]){"chapters"==r&&c("Start tags not allowed in chapter title text.");var m=h[1];"v"!=m&&"lang"!=m&&""!=h[3]&&c("Onlyandcan have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m?d(h):"rt"==m&&"ruby"==f.name?d(h):"v"==m?(function(e){for(var t=f;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&c("cannot be nested inside itself."),d(h),f.value=h[3],h[3]||c("requires an annotation.")):"lang"==m?(d(h),f.value=h[3]):c("Incorrect start tag.")}else if("end tag"==h[0])"chapters"==r&&c("End tags not allowed in chapter title text."),h[1]==f.name?f=f.parent:"ruby"==h[1]&&"rt"==f.name?f=f.parent.parent:c("Incorrect end tag.");else if("timestamp"==h[0]){"chapters"==r&&c("Timestamp not allowed in chapter title text.");var v=new o(h[1],c).parseTimestamp();void 0!=v&&((v<=t||v>=u)&&c("Timestamp must be between start timestamp and end timestamp."),p.length>0&&p[p.length-1]>=v&&c("Timestamp must be greater than any previous timestamp."),f.children.push({type:"timestamp",value:v,parent:f}),p.push(v))}}for(;f.parent;)"v"!=f.name&&c("Required end tag missing."),f=f.parent;return function e(t){var r=(0,n._)({},t);return t.children&&(r.children=t.children.map(e)),r.parent&&delete r.parent,r}(l)}},a=function(){function t(e){var t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),r=0,n=0,o=0;return e>=3600&&(r=Math.floor(e/3600)),n=Math.floor((e-3600*r)/60),o=Math.floor(e-3600*r-60*n),(r?r+":":"")+(""+n).padStart(2,"0")+":"+(""+o).padStart(2,"0")+"."+t}this.serialize=function(r,n){var o="WEBVTT\n\n";if(n)for(var i=0;i"+t(r.endTime)+(n="",(o=Object.keys(e).filter(function(t){return r[t]!==e[t]})).includes("direction")&&(n+=" vertical:"+r.direction),o.includes("alignment")&&(n+=" align:"+r.alignment),o.includes("size")&&(n+=" size:"+r.size+"%"),(o.includes("lineAlign")||o.includes("linePosition"))&&(n+=" line:"+r.linePosition+(r.snapToLines?"":"%")+(r.lineAlign&&r.lineAlign!=e.lineAlign?","+r.lineAlign:"")),(o.includes("textPosition")||o.includes("positionAlign"))&&(n+=" position:"+r.textPosition+"%"+(r.positionAlign&&r.positionAlign!==e.positionAlign?","+r.positionAlign:"")),n)+"\n"+function e(r){for(var n="",o=0;o/g,">");else if("object"==i.type){if(n+="<"+i.name,i.classes)for(var a=0;a"}else"timestamp"==i.type?n+="<"+t(i.value)+">":n+="<"+i.value+">"}return n}(r.tree.children)+"\n\n"}(r[i]);return o}};function s(e){e.WebVTTParser=t,e.WebVTTCueTimingsAndSettingsParser=o,e.WebVTTCueTextParser=i,e.WebVTTSerializer=a}"undefined"!=typeof window&&s(window),s(r)}()},{"@swc/helpers/_/_object_spread":"9agdF"}]},["2hz0c"],"2hz0c","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,i,a,s){var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof c[n]&&c[n],l=u.i||{},f=u.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!f[t]){if(!e[t]){if(o[t])return o[t];var i="function"==typeof c[n]&&c[n];if(!r&&i)return i(t,!0);if(u)return u(t,!0);if(p&&"string"==typeof t)return p(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var s=f[t]=new d.Module(t);e[t][0].call(s.exports,l,s,s.exports,c)}return f[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=f,d.parent=u,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=l,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return c[n]}}),c[n]=d;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:[],n=function(e){for(var t=new(0,l.WebVTTParser)().parse("","metadata"),r=0;r').concat(u.value,"")}}(n=t.cues).push.apply(n,(0,c._)(o.cues))}return t}(t),o=h.serialize(n.cues);URL.revokeObjectURL(v);var i=URL.createObjectURL(new Blob([o],{type:"text/vtt"}));v=i,e.option.subtitle.escape=!1,e.subtitle.init((0,s._)((0,a._)({},e.option.subtitle),{url:i,type:"vtt",onVttLoad:r}))}return(0,u._)(this,function(a){switch(a.label){case 0:return r=(t=e.constructor.utils).unescape,o=t.getExt,i=t.srtToVtt,p=t.assToVtt,d=new(0,l.WebVTTParser),h=new(0,l.WebVTTSerializer),[4,Promise.all(n.map(function(e){return function(e,t){return f.apply(this,arguments)}(e,{getExt:o,srtToVtt:i,assToVtt:p})}))];case 1:return m=a.sent().map(function(e,t){var r=d.parse(e,"metadata");return r.url=n[t].url,r.name=n[t].name,r}),v="",_(m),[2,{name:"multipleSubtitles",tracks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return _(e.map(function(e){return m.find(function(t){return t.name===e})}))},reset:function(){return _(m)}}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=p)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","./parser":"8YYw5","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(e){i(a,n,o,s,c,"next",e)}function c(e){i(a,n,o,s,c,"throw",e)}s(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9agdF":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return a});var i=e("./_define_property.js");function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function l(e,t,r,n){var o,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(t,r,s):o(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}function f(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?n.static?e:e.prototype:null,p=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var m={};for(var v in n)m[v]="access"===v?{}:n[v];for(var v in n.access)m.access[v]=n.access[v];m.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var _=(0,r[h])("accessor"===u?{get:p.get,set:p.set}:p[l],m);if("accessor"===u){if(void 0===_)continue;if(null===_||(void 0===_?"undefined":(0,i._)(_))!=="object")throw TypeError("Object expected");(c=s(_.get))&&(p.get=c),(c=s(_.set))&&(p.set=c),(c=s(_.init))&&o.unshift(c)}else(c=s(_))&&("field"===u?o.unshift(c):p[l]=c)}f&&Object.defineProperty(f,n.name,p),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],t=0;t1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function E(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=j(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var i,a,s;i=n,a=o,s=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){i({value:e,done:s})},a)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},A=function(e){return(A=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=A(e),n=0;n","&lrm":"‎","&rlm":"‏"," ":" "}),this.entities=t,this.parse=function(r,o){r=r.replace(/\0/g,"�");var a=Date.now(),s=0,c=r.split(/\r\n|\r|\n/),u=!1,l=[],f=[],p=[];function d(e,t){p.push({message:e,line:s+1,col:t})}var h=c[s],m=h.length,v="WEBVTT",_=0,y=v.length;for("\uFEFF"===h[0]&&(_=1,y+=1),(my&&" "!==h[y]&&" "!==h[y])&&d('No valid signature. (File needs to start with "WEBVTT".)'),s++;""!=c[s]&&void 0!=c[s];){if(d("No blank line after the signature."),-1!=c[s].indexOf("--\x3e")){u=!0;break}s++}for(;void 0!=c[s];){for(;!u&&""==c[s];)s++;if(!u&&void 0==c[s])break;var g=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null}),b=!0;if(-1==c[s].indexOf("--\x3e")){if(g.id=c[s],/^NOTE($|[ \t])/.test(g.id)){for(s++;""!=c[s]&&void 0!=c[s];)-1!=c[s].indexOf("--\x3e")&&d("Cannot have timestamp in a comment."),s++;continue}if(/^STYLE($|[ \t])/.test(g.id)){var j=[],w=!1;for(s++;""!=c[s]&&void 0!=c[s];)-1!=c[s].indexOf("--\x3e")&&(d("Cannot have timestamp in a style block."),w=!0),j.push(c[s]),s++;if(f.length){d("Style blocks cannot appear after the first cue.");continue}w||l.push(j.join("\n"));continue}if(""==c[++s]||void 0==c[s]){d("Cue identifier cannot be standalone.");continue}if(-1==c[s].indexOf("--\x3e")){b=!1,d("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var x=new n(c[s],d),O=0;if(f.length>0&&(O=f[f.length-1].startTime),b&&!x.parse(g,O)){for(g=null,s++;""!=c[s]&&void 0!=c[s];){if(-1!=c[s].indexOf("--\x3e")){u=!0;break}s++}continue}for(s++;""!=c[s]&&void 0!=c[s];){if(-1!=c[s].indexOf("--\x3e")){d("Blank line missing before cue."),u=!0;break}""!=g.text&&(g.text+="\n"),g.text+=c[s],s++}var T=new i(g.text,d,o,t);g.tree=T.parse(g.startTime,g.endTime),f.push(g)}return f.sort(function(e,t){return e.startTimet.startTime?1:e.endTime>t.endTime?-1:+(e.endTime2||parseInt(t,10)>59)&&(c="hours"),":"!=e[o])return void i("No time unit separator found.");if(o++,2!=(r=s(/\d/)).length)return void i("Must be exactly two digits.");if("hours"==c||":"==e[o]){if(":"!=e[o])return void i("No seconds found or minutes is greater than 59.");if(o++,2!=(n=s(/\d/)).length)return void i("Must be exactly two digits.")}else{if(2!=t.length)return void i("Must be exactly two digits.");n=r,r=t,t="0"}return"."!=e[o]?void i('No decimal separator (".") found.'):(o++,3!=(a=s(/\d/)).length)?void i("Milliseconds must be given in three digits."):parseInt(r,10)>59?void i("You cannot have more than 59 minutes."):parseInt(n,10)>59?void i("You cannot have more than 59 seconds."):3600*parseInt(t,10)+60*parseInt(r,10)+parseInt(n,10)+parseInt(a,10)/1e3}this.parse=function(t,s){return(a(r),t.startTime=c(),void 0==t.startTime)?void 0:(t.startTime"!=e[++o])?void i("No valid timestamp separator found."):(o++,n.test(e[o])&&i("'--\x3e' not separated from timestamp by whitespace."),a(r),t.endTime=c(),void 0!=t.endTime)?(t.endTime<=t.startTime&&i("End timestamp is not greater than start timestamp."),n.test(e[o]),a(r),!function(e,t){for(var n=e.split(r),o=[],a=0;a100)){i("Line position cannot be >100%.");continue}if(""===p||isNaN(p)||!isFinite(p)){i("Line position needs to be a number");continue}if(void 0!==f){if(!["start","center","end"].includes(f)){i("Line alignment needs to be one of start, center or end");continue}t.lineAlign=f}t.snapToLines=!d,t.linePosition=parseFloat(p),parseFloat(p).toString()!==p&&(t.nonSerializable=!0)}else if("position"==c){if(/,/.test(u)){var l=u.split(",");u=l[0];var h=l[1]}if("%"!=u[u.length-1]){i("Text position must be a percentage.");continue}if(parseInt(u,10)>100||0>parseInt(u,10)){i("Text position needs to be between 0 and 100%.");continue}if(""===(p=u.slice(0,u.length-1))||isNaN(p)||!isFinite(p)){i("Line position needs to be a number");continue}if(void 0!==h){if(!["line-left","center","line-right"].includes(h)){i("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=h}t.textPosition=parseFloat(p)}else if("size"==c){if("%"!=u[u.length-1]){i("Size must be a percentage.");continue}if(parseInt(u,10)>100){i("Size cannot be >100%.");continue}var m=u.slice(0,u.length-1);if(void 0===m||""===m||isNaN(m)){i("Size needs to be a number"),m=100;continue}if((m=parseFloat(m))<0||m>100){i("Size needs to be between 0 and 100%.");continue}t.size=m}else if("align"==c){var v=["start","center","end","left","right"];if(-1==v.indexOf(u)){i("Alignment can only be set to one of "+v.join(", ")+".");continue}t.alignment=u}else i("Invalid setting.")}}(e.substring(o),t),!0):void 0},this.parseTimestamp=function(){var t=c();return void 0!=e[o]?void i("Timestamp must not have trailing characters."):t}},i=function(e,t,r,i){this.entities=i;var a=this,e=e,s=0,c=function(e){"metadata"!=r&&t(e,s+1)};this.parse=function(t,u){var l={children:[]},f=l,p=[];function d(e){f.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:f}),f=f.children[f.children.length-1]}for(;void 0!=e[s];){var h=function(){for(var t="data",r="",n="",o=[];void 0!=e[s-1]||0==s;){var u=e[s];if("data"==t)if("&"==u)n=u,t="escape";else if("<"==u&&""==r)t="tag";else{if("<"==u||void 0==u)return["text",r];r+=u}else if("escape"==t)if("<"==u||void 0==u){c("Incorrect escape.");var l=void 0;return(l=n.match(/^&#([0-9]+)$/))?r+=String.fromCharCode(l[1]):a.entities[n]?r+=a.entities[n]:r+=n,["text",r]}else if("&"==u)c("Incorrect escape."),r+=n,n=u;else if(/[a-z#0-9]/i.test(u))n+=u;else if(";"==u){var f=void 0;(f=n.match(/^&#(x?[0-9]+)$/))?r+=String.fromCharCode("0"+f[1]):a.entities[n+u]?r+=a.entities[n+u]:(f=Object.keys(i).find(function(e){return n.startsWith(e)}))?r+=a.entities[f]+n.slice(f.length)+u:(c("Incorrect escape."),r+=n+";"),t="data"}else c("Incorrect escape."),r+=n+u,t="data";else if("tag"==t)if(" "==u||"\n"==u||"\f"==u||" "==u)t="start tag annotation";else if("."==u)t="start tag class";else if("/"==u)t="end tag";else if(/\d/.test(u))r=u,t="timestamp tag";else{if(">"==u||void 0==u)return">"==u&&s++,["start tag","",[],""];r=u,t="start tag"}else if("start tag"==t)if(" "==u||"\f"==u||" "==u)t="start tag annotation";else if("\n"==u)n=u,t="start tag annotation";else if("."==u)t="start tag class";else{if(">"==u||void 0==u)return">"==u&&s++,["start tag",r,[],""];r+=u}else if("start tag class"==t)if(" "==u||"\f"==u||" "==u)n&&o.push(n),n="",t="start tag annotation";else if("\n"==u)n&&o.push(n),n=u,t="start tag annotation";else if("."==u)n&&o.push(n),n="";else{if(">"==u||void 0==u)return">"==u&&s++,n&&o.push(n),["start tag",r,o,""];n+=u}else if("start tag annotation"==t)if(">"==u||void 0==u)return">"==u&&s++,["start tag",r,o,n=n.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];else n+=u;else if("end tag"==t)if(">"==u||void 0==u)return">"==u&&s++,["end tag",r];else r+=u;else if("timestamp tag"==t)if(">"==u||void 0==u)return">"==u&&s++,["timestamp",r];else r+=u;else c("Never happens.");s++}}();if("text"==h[0])f.children.push({type:"text",value:h[1],parent:f});else if("start tag"==h[0]){"chapters"==r&&c("Start tags not allowed in chapter title text.");var m=h[1];"v"!=m&&"lang"!=m&&""!=h[3]&&c("Onlyandcan have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m||"rt"==m&&"ruby"==f.name?d(h):"v"==m?(function(e){for(var t=f;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&c("cannot be nested inside itself."),d(h),f.value=h[3],h[3]||c("requires an annotation.")):"lang"==m?(d(h),f.value=h[3]):c("Incorrect start tag.")}else if("end tag"==h[0])"chapters"==r&&c("End tags not allowed in chapter title text."),h[1]==f.name?f=f.parent:"ruby"==h[1]&&"rt"==f.name?f=f.parent.parent:c("Incorrect end tag.");else if("timestamp"==h[0]){"chapters"==r&&c("Timestamp not allowed in chapter title text.");var v=new n(h[1],c).parseTimestamp();void 0!=v&&((v<=t||v>=u)&&c("Timestamp must be between start timestamp and end timestamp."),p.length>0&&p[p.length-1]>=v&&c("Timestamp must be greater than any previous timestamp."),f.children.push({type:"timestamp",value:v,parent:f}),p.push(v))}}for(;f.parent;)"v"!=f.name&&c("Required end tag missing."),f=f.parent;return function e(t){var r=(0,o._)({},t);return t.children&&(r.children=t.children.map(e)),r.parent&&delete r.parent,r}(l)}},a=function(){function t(e){var t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),r=0,n=0,o=0;return e>=3600&&(r=Math.floor(e/3600)),n=Math.floor((e-3600*r)/60),o=Math.floor(e-3600*r-60*n),(r?r+":":"")+(""+n).padStart(2,"0")+":"+(""+o).padStart(2,"0")+"."+t}this.serialize=function(r,n){var o="WEBVTT\n\n";if(n)for(var i=0;i/g,">");else if("object"==i.type){if(n+="<"+i.name,i.classes)for(var a=0;a"}else"timestamp"==i.type?n+="<"+t(i.value)+">":n+="<"+i.value+">"}return n}(r.tree.children)+"\n\n"}(r[i]);return o}};function s(e){e.WebVTTParser=t,e.WebVTTCueTimingsAndSettingsParser=n,e.WebVTTCueTextParser=i,e.WebVTTSerializer=a}"undefined"!=typeof window&&s(window),s(r)}()},{"@swc/helpers/_/_object_spread":"9agdF"}]},["2hz0c"],"2hz0c","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-multiple-subtitles/package.json b/packages/artplayer-plugin-multiple-subtitles/package.json index 12a04cb96..cf7343f54 100644 --- a/packages/artplayer-plugin-multiple-subtitles/package.json +++ b/packages/artplayer-plugin-multiple-subtitles/package.json @@ -21,4 +21,4 @@ "video", "player" ] -} \ No newline at end of file +} diff --git a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.js b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.js index 58db817af..2f2bfae52 100644 --- a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.js +++ b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,i,n,s){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof r[n]&&r[n],a=o.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,i){if(!a[t]){if(!e[t]){var s="function"==typeof r[n]&&r[n];if(!i&&s)return s(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var h=Error("Cannot find module '"+t+"'");throw h.code="MODULE_NOT_FOUND",h}c.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},c.cache={};var l=a[t]=new d.Module(t);e[t][0].call(l.exports,c,l,l.exports,this)}return a[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=o,d.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(d,"root",{get:function(){return r[n]}}),r[n]=d;for(var h=0;hr);var s=e("@glomex/vast-ima-player");function r(e){return async t=>{let{template:i,constructor:n}=t,{createElement:r,setStyles:o,append:a}=n.utils,{$video:u,$player:d}=i;await (0,s.loadImaSdk)();let h=window.google.ima,l=new h.AdsRenderingSettings,c=new s.PlayerOptions,f=`art-${Date.now()}`,p=r("div");a(d,p),p.id=f,o(p,{position:"absolute",inset:"0",width:"100%",height:"100%",zIndex:"150",display:"none"});let v=new s.Player(h,u,p,l,c);return"function"==typeof e&&await e({art:t,id:f,ima:h,imaPlayer:v,$container:p,playUrl:function(e){let t=new h.AdsRequest;t.adTagUrl=e,v.playAds(t)},playRes:function(e){let t=new h.AdsRequest;t.adsResponse=e,v.playAds(t)}}),{name:"artplayerPluginVast"}}}"undefined"!=typeof window&&(window.artplayerPluginVast=r)},{"@glomex/vast-ima-player":"bQPGX","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bQPGX:[function(e,t,i){var n,s,r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"Player",()=>eu),r.export(i,"PlayerError",()=>j),r.export(i,"PlayerEvent",()=>k),r.export(i,"PlayerOptions",()=>M),r.export(i,"loadImaSdk",()=>u);var o=null,a=function(){o=null},u=function(){var e=window;return e.google&&e.google.ima?Promise.resolve(e.google.ima):o||((o=new Promise(function(e,t){var i=document.createElement("script");i.async=!0,i.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",i.onload=e,i.onerror=t,document.body.appendChild(i)}).then(function(){return e.google.ima})).then(a).catch(a),o)};function d(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=Array(t);i-1&&(g(this,J)[J].splice(t,1),this.g(g(this,J)[J]))},i.resizeAd=function(e,t){g(this,F)[F]=e,g(this,G)[G]=t,g(this,V)[V]&&g(this,V)[V].resize(e,t,this.k()),g(this,N)[N].style.width=e+"px",g(this,N)[N].style.height=t+"px"},i.reset=function(e){void 0===e&&(e=!1),e&&(g(this,X)[X]=!1,g(this,K)[K]=!1,g(this,Z)[Z]=!1),this.C(),g(this,J)[J]=[],g(this,er)[er]=!1,g(this,ei)[ei]=void 0,g(this,V)[V]&&g(this,V)[V].destroy(),g(this,V)[V]=void 0,g(this,z)[z].settings.setAutoPlayAdBreaks(!0),e&&this.P(),g(this,N)[N].style.display="none"},i.P=function(){g(this,H)[H]&&(g(this,H)[H].removeEventListener(g(this,z)[z].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),g(this,H)[H].removeEventListener(g(this,z)[z].AdErrorEvent.Type.AD_ERROR,this.l,!1),g(this,H)[H].destroy()),g(this,B)[B]&&g(this,B)[B].destroy()},i.destroy=function(){var e,t,i,n,s=this;this.reset(!0),g(this,x)[x].destroy(),I.forEach(function(e){g(s,L)[L].removeEventListener(e,s.o)}),null==(e=g(this,H)[H])||e.removeEventListener(g(this,z)[z].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),null==(t=g(this,B)[B])||t.destroy(),null==(i=g(this,H)[H])||i.destroy(),g(this,X)[X]=!1,g(this,Z)[Z]=!1,g(this,K)[K]=!1,null==(n=g(this,q)[q])||n.disconnect()},i.isCustomPlaybackUsed=function(){return!1===g(this,z)[z].settings.getDisableCustomPlaybackForIOS10Plus()&&!g(this,N)[N].querySelector("video")},i.C=function(){window.clearTimeout(g(this,en)[en]),window.clearTimeout(g(this,es)[es]),g(this,en)[en]=void 0,g(this,es)[es]=void 0,g(this,Q)[Q]=void 0,g(this,ee)[ee]=void 0,g(this,et)[et]=void 0,g(this,N)[N].style.display="none",g(this,N)[N].classList.remove("nonlinear"),g(this,V)[V]&&this.R()},i.o=function(e){var t=this;if(g(this,x)[x].enabled||"volumechange"===e.type){if("timeupdate"===e.type){if(g(this,L)[L].currentTime<.5)return;if(g(this,V)[V]){var i=g(this,V)[V].getCuePoints().filter(function(e){return e>=0&&e-1&&(g(this,L)[L].currentTime=g(this,L)[L].duration-1e-5,g(this,Z)[Z]=!0),g(this,H)[H].contentComplete(),g(this,V)[V]||this.T()),!window.ResizeObserver&&g(this,W)[W].autoResize&&"loadedmetadata"===e.type){var n=g(this,L)[L],s=n.offsetHeight,r=n.offsetWidth;g(this,F)[F]=r,g(this,G)[G]=s,this.R()}g(this,$)[$]&&"volumechange"!==e.type||this.dispatchEvent(new T(e.type))}},i.S=function(e){var t=this,i=g(this,z)[z].AdEvent;switch(e.type){case i.Type.LOADED:var n=e.getAd();g(this,ei)[ei]&&0===g(this,J)[J].length?g(this,ei)[ei]({ad:n,start:function(){t.M(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.M()}}):g(this,Y)[Y]=n;break;case i.Type.AD_BREAK_READY:this.C(),g(this,ei)[ei]?(g(this,ei)[ei]({ad:g(this,Y)[Y],adBreakTime:e.getAdData().adBreakTime,start:function(){t.M(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.M()}}),g(this,Y)[Y]=void 0):this.M();break;case i.Type.STARTED:var s=g(this,Q)[Q]=e.getAd();s.getAdPodInfo().getAdPosition()>1&&g(this,V)[V].setVolume(g(this,V)[V].getVolume()),g(this,N)[N].classList.remove("nonlinear"),this.R(),s.isLinear()?(g(this,x)[x].disable(),g(this,et)[et]=s.getDuration(),g(this,ee)[ee]=0):(g(this,N)[N].classList.add("nonlinear"),this.I()),g(this,N)[N].style.display="",g(this,er)[er]&&(g(this,er)[er]=!1,g(this,V)[V].pause());break;case i.Type.ALL_ADS_COMPLETED:if(g(this,Z)[Z])return;this.isCustomPlaybackUsed()&&g(this,Q)[Q]&&-1!==g(this,Q)[Q].getAdPodInfo().getTimeOffset()&&this.I(),this.reset();break;case i.Type.CONTENT_PAUSE_REQUESTED:this.C(),g(this,Q)[Q]=e.getAd(),g(this,N)[N].style.display="",g(this,L)[L].pause(),this.R(),g(this,Q)[Q]&&this.A(g(this,Q)[Q].getAdPodInfo().getTimeOffset()),g(this,V)[V].setVolume(g(this,L)[L].muted?0:g(this,L)[L].volume),g(this,x)[x].disable(),g(this,et)[et]=g(this,Q)[Q].getDuration(),g(this,ee)[ee]=0;break;case i.Type.CONTENT_RESUME_REQUESTED:var r=!!g(this,Q)[Q];if(r){var o=g(this,V)[V].getVolume();g(this,L)[L].muted=0===o,g(this,L)[L].volume=g(this,eo)[eo]}g(this,Z)[Z]&&(g(this,L)[L].currentTime=g(this,L)[L].duration+1,g(this,Z)[Z]=!1),g(this,L)[L].ended?(this.reset(),this.T()):this.C(),r&&(g(this,er)[er]=!1,this.I());break;case i.Type.AD_METADATA:this.g(g(this,V)[V].getCuePoints()),-1===g(this,J)[J].indexOf(0)&&(g(this,ei)[ei]?g(this,ei)[ei]({start:function(){t.I(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.I()}}):this.I());break;case i.Type.AD_PROGRESS:var a=e.getAdData();g(this,ee)[ee]=a.currentTime,g(this,et)[et]=a.duration;break;case i.Type.LOG:var u=e.getAdData();g(this,ei)[ei]?g(this,ei)[ei]({start:function(){t.I(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.I()}}):u.adError&&!g(this,Q)[Q]&&this.I();break;case i.Type.VOLUME_CHANGED:var d=g(this,V)[V].getVolume();d>0&&(g(this,eo)[eo]=d)}},i.l=function(e){this.j(this.B(e))},i.u=function(e){var t,i=this,n=g(this,z)[z],s=n.AdEvent,r=n.AdErrorEvent.Type.AD_ERROR;window.clearTimeout(g(this,en)[en]);var o=g(this,V)[V]=e.getAdsManager(g(this,x)[x],g(this,U)[U]);Object.keys(s.Type).forEach(function(e){o.addEventListener(s.Type[e],function(t){if(i.S(t),k[e]){var n=["LOG","AD_PROGRESS"].indexOf(e)>-1;i.dispatchEvent(new T(k[e],{detail:{ad:t.getAd()||g(i,Q)[Q],adData:n?t.getAdData():{}}}))}})}),o.addEventListener(r,function(e){return i.j(i.B(e))});try{o.init(g(this,F)[F],g(this,G)[G],this.k()),o.setVolume(g(this,L)[L].muted?0:g(this,L)[L].volume),null==(t=g(this,B)[B])||t.initialize(),g(this,ei)[ei]||this.M()}catch(e){this.j(new j(e.message))}},i.M=function(){if(g(this,K)[K]||(this.dispatchEvent(new T(k.MEDIA_START)),g(this,K)[K]=!0),g(this,V)[V])try{g(this,V)[V].start()}catch(e){this.j(new j(e.message))}else this.I()},i.T=function(){var e=this;setTimeout(function(){g(e,X)[X]=!1,g(e,K)[K]=!1,g(e,Z)[Z]=!1,e.dispatchEvent(new T(k.MEDIA_STOP))},1)},i.v=function(e){for(var t,i=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return m(e,void 0);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?m(e,void 0):void 0}}(e))){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=i()).done;){var n=t.value;n.contentBoxSize&&1===n.contentBoxSize.length?(g(this,F)[F]=n.contentBoxSize[0].inlineSize,g(this,G)[G]=n.contentBoxSize[0].blockSize):n.contentBoxSize&&n.contentBoxSize.inlineSize?(g(this,F)[F]=n.contentBoxSize.inlineSize,g(this,G)[G]=n.contentBoxSize.blockSize):(g(this,F)[F]=n.contentRect.width,g(this,G)[G]=n.contentRect.height)}this.R()},i.R=function(){if(g(this,W)[W].autoResize&&g(this,V)[V]){var e=g(this,Q)[Q],t=this.k();e&&!e.isLinear()?e&&(e.getWidth()>g(this,F)[F]||e.getHeight()>g(this,G)[G]?this.resizeAd(g(this,F)[F],g(this,G)[G]):(g(this,V)[V].resize(e.getWidth(),e.getHeight()+20,t),g(this,N)[N].style.width=e.getWidth()+"px",g(this,N)[N].style.height=e.getHeight()+20+"px")):this.resizeAd(g(this,F)[F],g(this,G)[G])}},i.k=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||g(this,L)[L].webkitDisplayingFullscreen?g(this,z)[z].ViewMode.FULLSCREEN:g(this,z)[z].ViewMode.NORMAL},i.I=function(){var e=this;g(this,N)[N].style.display="none",g(this,L)[L].ended||(g(this,x)[x].enable(),g(this,er)[er]?(g(this,L)[L].pause(),this.dispatchEvent(new T("pause"))):(this.p().then(function(){}).catch(function(){e.dispatchEvent(new T("pause"))}),this.dispatchEvent(new T("play")),this.dispatchEvent(new T(k.MEDIA_RESUMED))),g(this,er)[er]=!1)},i.B=function(e){var t=e.getError(),i=new j(t.getMessage());return i.type=t.getType(),i.errorCode=t.getErrorCode(),i.vastErrorCode=t.getVastErrorCode&&t.getVastErrorCode(),i.innerError=t.getInnerError(),i},i.j=function(e){var t=this;this.dispatchEvent(new T(k.AD_ERROR,{detail:{error:e}})),this.C(),g(this,ei)[ei]?g(this,ei)[ei]({start:function(){t.I(),g(t,ei)[ei]=void 0},startWithoutReset:function(){t.I()}}):this.I()},h(t,[{key:"volume",get:function(){return!g(this,x)[x].enabled&&g(this,V)[V]?g(this,V)[V].getVolume():g(this,L)[L].volume},set:function(e){!g(this,x)[x].enabled&&g(this,V)[V]&&g(this,V)[V].setVolume(e),g(this,L)[L].volume=e}},{key:"muted",get:function(){return!g(this,x)[x].enabled&&g(this,V)[V]?0===g(this,V)[V].getVolume():g(this,L)[L].muted},set:function(e){!g(this,x)[x].enabled&&g(this,V)[V]&&g(this,V)[V].setVolume(e?0:g(this,eo)[eo]),g(this,L)[L].muted=e}},{key:"currentTime",get:function(){return void 0!==g(this,ee)[ee]?g(this,ee)[ee]:g(this,L)[L].currentTime},set:function(e){g(this,x)[x].enabled&&(g(this,L)[L].currentTime=e)}},{key:"duration",get:function(){return void 0!==g(this,et)[et]?g(this,et)[et]:g(this,L)[L].duration}},{key:"cuePoints",get:function(){return[].concat(g(this,J)[J])}}]),t}(C)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,i){i.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},i.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.exportAll=function(e,t){return Object.keys(e).forEach(function(i){"default"===i||"__esModule"===i||Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[i]}})}),t},i.export=function(e,t,i){Object.defineProperty(e,t,{enumerable:!0,get:i})}},{}]},["iW4Tm"],"iW4Tm","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,i,n,s,r,o,a){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof u[n]&&u[n],h=d.i||{},l=d.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,i){if(!l[t]){if(!e[t]){if(s[t])return s[t];var r="function"==typeof u[n]&&u[n];if(!i&&r)return r(t,!0);if(d)return d(t,!0);if(c&&"string"==typeof t)return c(t);var o=Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}h.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},h.cache={};var a=l[t]=new f.Module(t);e[t][0].call(a.exports,h,a,a.exports,u)}return l[t].exports;function h(e){var t=h.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=c,this.exports={}},f.modules=e,f.cache=l,f.parent=d,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=h,f.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(f,"root",{get:function(){return u[n]}}),u[n]=f;for(var p=0;po);var r=e("@glomex/vast-ima-player");function o(e){return async t=>{let{template:i,constructor:n}=t,{createElement:s,setStyles:o,append:a}=n.utils,{$video:u,$player:d}=i;await (0,r.loadImaSdk)();let h=window.google.ima,l=new h.AdsRenderingSettings,c=new(0,r.PlayerOptions),f=`art-${Date.now()}`,p=s("div");a(d,p),p.id=f,o(p,{position:"absolute",inset:"0",width:"100%",height:"100%",zIndex:"150",display:"none"});let v=new(0,r.Player)(h,u,p,l,c);return"function"==typeof e&&await e({art:t,id:f,ima:h,imaPlayer:v,$container:p,playUrl:function(e){let t=new h.AdsRequest;t.adTagUrl=e,v.playAds(t)},playRes:function(e){let t=new h.AdsRequest;t.adsResponse=e,v.playAds(t)}}),{name:"artplayerPluginVast"}}}"undefined"!=typeof window&&(window.artplayerPluginVast=o)},{"@glomex/vast-ima-player":"bnIjt","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bnIjt:[function(e,t,i,n){var s,r,o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(i),o.export(i,"Player",()=>ed),o.export(i,"PlayerError",()=>L),o.export(i,"PlayerEvent",()=>M),o.export(i,"PlayerOptions",()=>j),o.export(i,"loadImaSdk",()=>d);var a=null,u=function(){a=null},d=function(){var e=window;return e.google&&e.google.ima?Promise.resolve(e.google.ima):a||((a=new Promise(function(e,t){var i=document.createElement("script");i.async=!0,i.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",i.onload=e,i.onerror=t,document.body.appendChild(i)}).then(function(){return e.google.ima})).then(u).catch(u),a)};function h(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=Array(t);i-1&&(O(this,ee)[ee].splice(t,1),this.g(O(this,ee)[ee]))},i.resizeAd=function(e,t){O(this,G)[G]=e,O(this,H)[H]=t,O(this,F)[F]&&O(this,F)[F].resize(e,t,this.k()),O(this,x)[x].style.width=e+"px",O(this,x)[x].style.height=t+"px"},i.reset=function(e){void 0===e&&(e=!1),e&&(O(this,X)[X]=!1,O(this,$)[$]=!1,O(this,J)[J]=!1),this.C(),O(this,ee)[ee]=[],O(this,eo)[eo]=!1,O(this,en)[en]=void 0,O(this,F)[F]&&O(this,F)[F].destroy(),O(this,F)[F]=void 0,O(this,B)[B].settings.setAutoPlayAdBreaks(!0),e&&this.P(),O(this,x)[x].style.display="none"},i.P=function(){O(this,W)[W]&&(O(this,W)[W].removeEventListener(O(this,B)[B].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),O(this,W)[W].removeEventListener(O(this,B)[B].AdErrorEvent.Type.AD_ERROR,this.l,!1),O(this,W)[W].destroy()),O(this,V)[V]&&O(this,V)[V].destroy()},i.destroy=function(){var e,t,i,n,s=this;this.reset(!0),O(this,U)[U].destroy(),k.forEach(function(e){O(s,N)[N].removeEventListener(e,s.o)}),null==(e=O(this,W)[W])||e.removeEventListener(O(this,B)[B].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),null==(t=O(this,V)[V])||t.destroy(),null==(i=O(this,W)[W])||i.destroy(),O(this,X)[X]=!1,O(this,J)[J]=!1,O(this,$)[$]=!1,null==(n=O(this,Q)[Q])||n.disconnect()},i.isCustomPlaybackUsed=function(){return!1===O(this,B)[B].settings.getDisableCustomPlaybackForIOS10Plus()&&!O(this,x)[x].querySelector("video")},i.C=function(){window.clearTimeout(O(this,es)[es]),window.clearTimeout(O(this,er)[er]),O(this,es)[es]=void 0,O(this,er)[er]=void 0,O(this,Y)[Y]=void 0,O(this,et)[et]=void 0,O(this,ei)[ei]=void 0,O(this,x)[x].style.display="none",O(this,x)[x].classList.remove("nonlinear"),O(this,F)[F]&&this.R()},i.o=function(e){var t=this;if(O(this,U)[U].enabled||"volumechange"===e.type){if("timeupdate"===e.type){if(O(this,F)[F]){var i=O(this,F)[F].getCuePoints().filter(function(e){return e>=0&&e=.5&&(this.dispatchEvent(new R(M.MEDIA_IMPRESSION)),O(this,X)[X]=!0)}if("play"!==e.type||O(this,$)[$]||O(this,Z)[Z]||(this.dispatchEvent(new R(M.MEDIA_START)),O(this,$)[$]=!0),"ended"===e.type&&(this.isCustomPlaybackUsed()&&O(this,N)[N].currentTime===O(this,N)[N].duration&&O(this,ee)[ee].indexOf(-1)>-1&&(O(this,N)[N].currentTime=O(this,N)[N].duration-1e-5,O(this,J)[J]=!0),O(this,W)[W].contentComplete(),O(this,F)[F]||this.T()),!window.ResizeObserver&&O(this,q)[q].autoResize&&"loadedmetadata"===e.type){var n=O(this,N)[N],s=n.offsetHeight,r=n.offsetWidth;O(this,G)[G]=r,O(this,H)[H]=s,this.R()}O(this,Z)[Z]&&"volumechange"!==e.type||this.dispatchEvent(new R(e.type))}},i.S=function(e){var t=this,i=O(this,B)[B].AdEvent;switch(e.type){case i.Type.LOADED:var n=e.getAd();O(this,en)[en]&&0===O(this,ee)[ee].length?O(this,en)[en]({ad:n,start:function(){t.M(),O(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}):O(this,K)[K]=n;break;case i.Type.AD_BREAK_READY:this.C(),O(this,en)[en]?(O(this,en)[en]({ad:O(this,K)[K],adBreakTime:e.getAdData().adBreakTime,start:function(){t.M(),O(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}),O(this,K)[K]=void 0):this.M();break;case i.Type.STARTED:var s=O(this,Y)[Y]=e.getAd();s.getAdPodInfo().getAdPosition()>1&&O(this,F)[F].setVolume(O(this,F)[F].getVolume()),O(this,x)[x].classList.remove("nonlinear"),this.R(),s.isLinear()?(O(this,U)[U].disable(),O(this,ei)[ei]=s.getDuration(),O(this,et)[et]=0):(O(this,x)[x].classList.add("nonlinear"),this.I()),O(this,x)[x].style.display="",O(this,eo)[eo]&&(O(this,eo)[eo]=!1,O(this,F)[F].pause());break;case i.Type.ALL_ADS_COMPLETED:if(O(this,J)[J])return;this.isCustomPlaybackUsed()&&O(this,Y)[Y]&&-1!==O(this,Y)[Y].getAdPodInfo().getTimeOffset()&&this.I(),this.reset();break;case i.Type.CONTENT_PAUSE_REQUESTED:this.C(),O(this,Y)[Y]=e.getAd(),O(this,x)[x].style.display="",O(this,N)[N].pause(),this.R(),O(this,Y)[Y]&&this.A(O(this,Y)[Y].getAdPodInfo().getTimeOffset()),O(this,F)[F].setVolume(O(this,N)[N].muted?0:O(this,N)[N].volume),O(this,U)[U].disable(),O(this,ei)[ei]=O(this,Y)[Y].getDuration(),O(this,et)[et]=0;break;case i.Type.CONTENT_RESUME_REQUESTED:var r=!!O(this,Y)[Y];if(r){var o=O(this,F)[F].getVolume();O(this,N)[N].muted=0===o,O(this,N)[N].volume=O(this,ea)[ea]}O(this,J)[J]&&(O(this,N)[N].currentTime=O(this,N)[N].duration+1,O(this,J)[J]=!1),O(this,N)[N].ended?(this.reset(),this.T()):this.C(),r&&(O(this,eo)[eo]=!1,this.I());break;case i.Type.AD_METADATA:this.g(O(this,F)[F].getCuePoints()),-1===O(this,ee)[ee].indexOf(0)&&(O(this,en)[en]?O(this,en)[en]({start:function(){t.I(),O(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I());break;case i.Type.AD_PROGRESS:var a=e.getAdData();O(this,et)[et]=a.currentTime,O(this,ei)[ei]=a.duration;break;case i.Type.LOG:var u=e.getAdData();O(this,en)[en]?O(this,en)[en]({start:function(){t.I(),O(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):u.adError&&!O(this,Y)[Y]&&this.I();break;case i.Type.VOLUME_CHANGED:var d=O(this,F)[F].getVolume();d>0&&(O(this,ea)[ea]=d)}},i.l=function(e){this.j(this.B(e))},i.u=function(e){var t,i=this,n=O(this,B)[B],s=n.AdEvent,r=n.AdErrorEvent.Type.AD_ERROR;window.clearTimeout(O(this,es)[es]);var o=O(this,F)[F]=e.getAdsManager(O(this,U)[U],O(this,z)[z]);Object.keys(s.Type).forEach(function(e){o.addEventListener(s.Type[e],function(t){if(i.S(t),M[e]){var n=["LOG","AD_PROGRESS"].indexOf(e)>-1;i.dispatchEvent(new R(M[e],{detail:{ad:t.getAd()||O(i,Y)[Y],adData:n?t.getAdData():{}}}))}})}),o.addEventListener(r,function(e){return i.j(i.B(e))});try{o.init(O(this,G)[G],O(this,H)[H],this.k()),o.setVolume(O(this,N)[N].muted?0:O(this,N)[N].volume),null==(t=O(this,V)[V])||t.initialize(),O(this,en)[en]||this.M()}catch(e){this.j(new L(e.message))}},i.M=function(){if(O(this,$)[$]||(this.dispatchEvent(new R(M.MEDIA_START)),O(this,$)[$]=!0),O(this,F)[F])try{O(this,F)[F].start()}catch(e){this.j(new L(e.message))}else this.I()},i.T=function(){var e=this;setTimeout(function(){O(e,X)[X]=!1,O(e,$)[$]=!1,O(e,J)[J]=!1,e.dispatchEvent(new R(M.MEDIA_STOP))},1)},i.v=function(e){for(var t,i=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return A(e,void 0);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?A(e,void 0):void 0}}(e))){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=i()).done;){var n=t.value;n.contentBoxSize&&1===n.contentBoxSize.length?(O(this,G)[G]=n.contentBoxSize[0].inlineSize,O(this,H)[H]=n.contentBoxSize[0].blockSize):n.contentBoxSize&&n.contentBoxSize.inlineSize?(O(this,G)[G]=n.contentBoxSize.inlineSize,O(this,H)[H]=n.contentBoxSize.blockSize):(O(this,G)[G]=n.contentRect.width,O(this,H)[H]=n.contentRect.height)}this.R()},i.R=function(){if(O(this,q)[q].autoResize&&O(this,F)[F]){var e=O(this,Y)[Y],t=this.k();e&&!e.isLinear()?e&&(e.getWidth()>O(this,G)[G]||e.getHeight()>O(this,H)[H]?this.resizeAd(O(this,G)[G],O(this,H)[H]):(O(this,F)[F].resize(e.getWidth(),e.getHeight()+20,t),O(this,x)[x].style.width=e.getWidth()+"px",O(this,x)[x].style.height=e.getHeight()+20+"px")):this.resizeAd(O(this,G)[G],O(this,H)[H])}},i.k=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||O(this,N)[N].webkitDisplayingFullscreen?O(this,B)[B].ViewMode.FULLSCREEN:O(this,B)[B].ViewMode.NORMAL},i.I=function(){var e=this;O(this,x)[x].style.display="none",O(this,N)[N].ended||(O(this,U)[U].enable(),O(this,eo)[eo]?(O(this,N)[N].pause(),this.dispatchEvent(new R("pause"))):(this.p().then(function(){}).catch(function(){e.dispatchEvent(new R("pause"))}),this.dispatchEvent(new R("play")),this.dispatchEvent(new R(M.MEDIA_RESUMED))),O(this,eo)[eo]=!1)},i.B=function(e){var t=e.getError(),i=new L(t.getMessage());return i.type=t.getType(),i.errorCode=t.getErrorCode(),i.vastErrorCode=t.getVastErrorCode&&t.getVastErrorCode(),i.innerError=t.getInnerError(),i},i.j=function(e){var t=this;this.dispatchEvent(new R(M.AD_ERROR,{detail:{error:e}})),this.C(),O(this,en)[en]?O(this,en)[en]({start:function(){t.I(),O(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I()},l(t,[{key:"volume",get:function(){return!O(this,U)[U].enabled&&O(this,F)[F]?O(this,F)[F].getVolume():O(this,N)[N].volume},set:function(e){!O(this,U)[U].enabled&&O(this,F)[F]&&O(this,F)[F].setVolume(e),O(this,N)[N].volume=e}},{key:"muted",get:function(){return!O(this,U)[U].enabled&&O(this,F)[F]?0===O(this,F)[F].getVolume():O(this,N)[N].muted},set:function(e){!O(this,U)[U].enabled&&O(this,F)[F]&&O(this,F)[F].setVolume(e?0:O(this,ea)[ea]),O(this,N)[N].muted=e}},{key:"currentTime",get:function(){return void 0!==O(this,et)[et]?O(this,et)[et]:O(this,N)[N].currentTime},set:function(e){O(this,U)[U].enabled&&(O(this,N)[N].currentTime=e)}},{key:"duration",get:function(){return void 0!==O(this,ei)[ei]?O(this,ei)[ei]:O(this,N)[N].duration}},{key:"cuePoints",get:function(){return[].concat(O(this,ee)[ee])}}]),t}(I)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,i,n){i.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},i.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.exportAll=function(e,t){return Object.keys(e).forEach(function(i){"default"===i||"__esModule"===i||Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[i]}})}),t},i.export=function(e,t,i){Object.defineProperty(e,t,{enumerable:!0,get:i})}},{}]},["iW4Tm"],"iW4Tm","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.legacy.js b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.legacy.js index edc2e30e3..516d9ae00 100644 --- a/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.legacy.js +++ b/packages/artplayer-plugin-vast/dist/artplayer-plugin-vast.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,r,i){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof o[r]&&o[r],a=s.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!a[t]){if(!e[t]){var i="function"==typeof o[r]&&o[r];if(!n&&i)return i(t,!0);if(s)return s(t,!0);if(u&&"string"==typeof t)return u(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}h.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},h.cache={};var d=a[t]=new c.Module(t);e[t][0].call(d.exports,h,d,d.exports,this)}return a[t].exports;function h(e){var t=h.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=a,c.parent=s,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return o[r]}}),o[r]=c;for(var l=0;lt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function c(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function l(e,t){return function(n,r){t(n,r,e)}}function d(e,t,n,r,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),h=!1,f=n.length-1;f>=0;f--){var p={};for(var y in r)p[y]="access"===y?{}:r[y];for(var y in r.access)p.access[y]=r.access[y];p.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,n[f])("accessor"===u?{get:d.get,set:d.set}:d[c],p);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(a=s(v.get))&&(d.get=a),(a=s(v.set))&&(d.set=a),(a=s(v.init))&&i.unshift(a)}else(a=s(v))&&("field"===u?i.unshift(a):d[c]=a)}l&&Object.defineProperty(l,r.name,d),h=!0}function h(e,t,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function A(){for(var e=[],t=0;t1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{var n;(n=i[e](t)).value instanceof P?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function T(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:P(e[r](t)),done:!1}:i?i(t):t}:i}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=E(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function R(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var j=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&b(t,e,n);return j(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function C(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function k(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function L(e,t,n){if(null!=t){var r,i;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(n){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function U(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(e){return t(e),n()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}n.default={__extends:s,__assign:a,__rest:u,__decorate:c,__param:l,__metadata:y,__awaiter:v,__generator:m,__createBinding:b,__exportStar:_,__values:E,__read:g,__spread:A,__spreadArrays:w,__spreadArray:O,__await:P,__asyncGenerator:S,__asyncDelegator:T,__asyncValues:D,__makeTemplateObject:R,__importStar:x,__importDefault:I,__classPrivateFieldGet:C,__classPrivateFieldSet:k,__classPrivateFieldIn:M,__addDisposableResource:L,__disposeResources:U}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}r.defineInteropFlag(n),r.export(n,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cqJrZ:[function(e,t,n){var r,i,o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n),o.export(n,"Player",function(){return eu}),o.export(n,"PlayerError",function(){return k}),o.export(n,"PlayerEvent",function(){return I}),o.export(n,"PlayerOptions",function(){return C}),o.export(n,"loadImaSdk",function(){return u});var s=null,a=function(){s=null},u=function(){var e=window;return e.google&&e.google.ima?Promise.resolve(e.google.ima):s||((s=new Promise(function(e,t){var n=document.createElement("script");n.async=!0,n.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",n.onload=e,n.onerror=t,document.body.appendChild(n)}).then(function(){return e.google.ima})).then(a).catch(a),s)};function c(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n-1&&(g(this,J)[J].splice(t,1),this.g(g(this,J)[J]))},n.resizeAd=function(e,t){g(this,G)[G]=e,g(this,V)[V]=t,g(this,B)[B]&&g(this,B)[B].resize(e,t,this.k()),g(this,L)[L].style.width=e+"px",g(this,L)[L].style.height=t+"px"},n.reset=function(e){void 0===e&&(e=!1),e&&(g(this,$)[$]=!1,g(this,Z)[Z]=!1,g(this,Y)[Y]=!1),this.C(),g(this,J)[J]=[],g(this,eo)[eo]=!1,g(this,en)[en]=void 0,g(this,B)[B]&&g(this,B)[B].destroy(),g(this,B)[B]=void 0,g(this,F)[F].settings.setAutoPlayAdBreaks(!0),e&&this.P(),g(this,L)[L].style.display="none"},n.P=function(){g(this,W)[W]&&(g(this,W)[W].removeEventListener(g(this,F)[F].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),g(this,W)[W].removeEventListener(g(this,F)[F].AdErrorEvent.Type.AD_ERROR,this.l,!1),g(this,W)[W].destroy()),g(this,z)[z]&&g(this,z)[z].destroy()},n.destroy=function(){var e,t,n,r,i=this;this.reset(!0),g(this,N)[N].destroy(),x.forEach(function(e){g(i,M)[M].removeEventListener(e,i.o)}),null==(e=g(this,W)[W])||e.removeEventListener(g(this,F)[F].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),null==(t=g(this,z)[z])||t.destroy(),null==(n=g(this,W)[W])||n.destroy(),g(this,$)[$]=!1,g(this,Y)[Y]=!1,g(this,Z)[Z]=!1,null==(r=g(this,q)[q])||r.disconnect()},n.isCustomPlaybackUsed=function(){return!1===g(this,F)[F].settings.getDisableCustomPlaybackForIOS10Plus()&&!g(this,L)[L].querySelector("video")},n.C=function(){window.clearTimeout(g(this,er)[er]),window.clearTimeout(g(this,ei)[ei]),g(this,er)[er]=void 0,g(this,ei)[ei]=void 0,g(this,Q)[Q]=void 0,g(this,ee)[ee]=void 0,g(this,et)[et]=void 0,g(this,L)[L].style.display="none",g(this,L)[L].classList.remove("nonlinear"),g(this,B)[B]&&this.R()},n.o=function(e){var t=this;if(g(this,N)[N].enabled||"volumechange"===e.type){if("timeupdate"===e.type){if(g(this,M)[M].currentTime<.5)return;if(g(this,B)[B]){var n=g(this,B)[B].getCuePoints().filter(function(e){return e>=0&&e-1&&(g(this,M)[M].currentTime=g(this,M)[M].duration-1e-5,g(this,Y)[Y]=!0),g(this,W)[W].contentComplete(),g(this,B)[B]||this.T()),!window.ResizeObserver&&g(this,H)[H].autoResize&&"loadedmetadata"===e.type){var r=g(this,M)[M],i=r.offsetHeight,o=r.offsetWidth;g(this,G)[G]=o,g(this,V)[V]=i,this.R()}g(this,X)[X]&&"volumechange"!==e.type||this.dispatchEvent(new P(e.type))}},n.S=function(e){var t=this,n=g(this,F)[F].AdEvent;switch(e.type){case n.Type.LOADED:var r=e.getAd();g(this,en)[en]&&0===g(this,J)[J].length?g(this,en)[en]({ad:r,start:function(){t.M(),g(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}):g(this,K)[K]=r;break;case n.Type.AD_BREAK_READY:this.C(),g(this,en)[en]?(g(this,en)[en]({ad:g(this,K)[K],adBreakTime:e.getAdData().adBreakTime,start:function(){t.M(),g(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}),g(this,K)[K]=void 0):this.M();break;case n.Type.STARTED:var i=g(this,Q)[Q]=e.getAd();i.getAdPodInfo().getAdPosition()>1&&g(this,B)[B].setVolume(g(this,B)[B].getVolume()),g(this,L)[L].classList.remove("nonlinear"),this.R(),i.isLinear()?(g(this,N)[N].disable(),g(this,et)[et]=i.getDuration(),g(this,ee)[ee]=0):(g(this,L)[L].classList.add("nonlinear"),this.I()),g(this,L)[L].style.display="",g(this,eo)[eo]&&(g(this,eo)[eo]=!1,g(this,B)[B].pause());break;case n.Type.ALL_ADS_COMPLETED:if(g(this,Y)[Y])return;this.isCustomPlaybackUsed()&&g(this,Q)[Q]&&-1!==g(this,Q)[Q].getAdPodInfo().getTimeOffset()&&this.I(),this.reset();break;case n.Type.CONTENT_PAUSE_REQUESTED:this.C(),g(this,Q)[Q]=e.getAd(),g(this,L)[L].style.display="",g(this,M)[M].pause(),this.R(),g(this,Q)[Q]&&this.A(g(this,Q)[Q].getAdPodInfo().getTimeOffset()),g(this,B)[B].setVolume(g(this,M)[M].muted?0:g(this,M)[M].volume),g(this,N)[N].disable(),g(this,et)[et]=g(this,Q)[Q].getDuration(),g(this,ee)[ee]=0;break;case n.Type.CONTENT_RESUME_REQUESTED:var o=!!g(this,Q)[Q];if(o){var s=g(this,B)[B].getVolume();g(this,M)[M].muted=0===s,g(this,M)[M].volume=g(this,es)[es]}g(this,Y)[Y]&&(g(this,M)[M].currentTime=g(this,M)[M].duration+1,g(this,Y)[Y]=!1),g(this,M)[M].ended?(this.reset(),this.T()):this.C(),o&&(g(this,eo)[eo]=!1,this.I());break;case n.Type.AD_METADATA:this.g(g(this,B)[B].getCuePoints()),-1===g(this,J)[J].indexOf(0)&&(g(this,en)[en]?g(this,en)[en]({start:function(){t.I(),g(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I());break;case n.Type.AD_PROGRESS:var a=e.getAdData();g(this,ee)[ee]=a.currentTime,g(this,et)[et]=a.duration;break;case n.Type.LOG:var u=e.getAdData();g(this,en)[en]?g(this,en)[en]({start:function(){t.I(),g(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):u.adError&&!g(this,Q)[Q]&&this.I();break;case n.Type.VOLUME_CHANGED:var c=g(this,B)[B].getVolume();c>0&&(g(this,es)[es]=c)}},n.l=function(e){this.j(this.B(e))},n.u=function(e){var t,n=this,r=g(this,F)[F],i=r.AdEvent,o=r.AdErrorEvent.Type.AD_ERROR;window.clearTimeout(g(this,er)[er]);var s=g(this,B)[B]=e.getAdsManager(g(this,N)[N],g(this,U)[U]);Object.keys(i.Type).forEach(function(e){s.addEventListener(i.Type[e],function(t){if(n.S(t),I[e]){var r=["LOG","AD_PROGRESS"].indexOf(e)>-1;n.dispatchEvent(new P(I[e],{detail:{ad:t.getAd()||g(n,Q)[Q],adData:r?t.getAdData():{}}}))}})}),s.addEventListener(o,function(e){return n.j(n.B(e))});try{s.init(g(this,G)[G],g(this,V)[V],this.k()),s.setVolume(g(this,M)[M].muted?0:g(this,M)[M].volume),null==(t=g(this,z)[z])||t.initialize(),g(this,en)[en]||this.M()}catch(e){this.j(new k(e.message))}},n.M=function(){if(g(this,Z)[Z]||(this.dispatchEvent(new P(I.MEDIA_START)),g(this,Z)[Z]=!0),g(this,B)[B])try{g(this,B)[B].start()}catch(e){this.j(new k(e.message))}else this.I()},n.T=function(){var e=this;setTimeout(function(){g(e,$)[$]=!1,g(e,Z)[Z]=!1,g(e,Y)[Y]=!1,e.dispatchEvent(new P(I.MEDIA_STOP))},1)},n.v=function(e){for(var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return b(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,void 0):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=n()).done;){var r=t.value;r.contentBoxSize&&1===r.contentBoxSize.length?(g(this,G)[G]=r.contentBoxSize[0].inlineSize,g(this,V)[V]=r.contentBoxSize[0].blockSize):r.contentBoxSize&&r.contentBoxSize.inlineSize?(g(this,G)[G]=r.contentBoxSize.inlineSize,g(this,V)[V]=r.contentBoxSize.blockSize):(g(this,G)[G]=r.contentRect.width,g(this,V)[V]=r.contentRect.height)}this.R()},n.R=function(){if(g(this,H)[H].autoResize&&g(this,B)[B]){var e=g(this,Q)[Q],t=this.k();e&&!e.isLinear()?e&&(e.getWidth()>g(this,G)[G]||e.getHeight()>g(this,V)[V]?this.resizeAd(g(this,G)[G],g(this,V)[V]):(g(this,B)[B].resize(e.getWidth(),e.getHeight()+20,t),g(this,L)[L].style.width=e.getWidth()+"px",g(this,L)[L].style.height=e.getHeight()+20+"px")):this.resizeAd(g(this,G)[G],g(this,V)[V])}},n.k=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||g(this,M)[M].webkitDisplayingFullscreen?g(this,F)[F].ViewMode.FULLSCREEN:g(this,F)[F].ViewMode.NORMAL},n.I=function(){var e=this;g(this,L)[L].style.display="none",g(this,M)[M].ended||(g(this,N)[N].enable(),g(this,eo)[eo]?(g(this,M)[M].pause(),this.dispatchEvent(new P("pause"))):(this.p().then(function(){}).catch(function(){e.dispatchEvent(new P("pause"))}),this.dispatchEvent(new P("play")),this.dispatchEvent(new P(I.MEDIA_RESUMED))),g(this,eo)[eo]=!1)},n.B=function(e){var t=e.getError(),n=new k(t.getMessage());return n.type=t.getType(),n.errorCode=t.getErrorCode(),n.vastErrorCode=t.getVastErrorCode&&t.getVastErrorCode(),n.innerError=t.getInnerError(),n},n.j=function(e){var t=this;this.dispatchEvent(new P(I.AD_ERROR,{detail:{error:e}})),this.C(),g(this,en)[en]?g(this,en)[en]({start:function(){t.I(),g(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I()},l(t,[{key:"volume",get:function(){return!g(this,N)[N].enabled&&g(this,B)[B]?g(this,B)[B].getVolume():g(this,M)[M].volume},set:function(e){!g(this,N)[N].enabled&&g(this,B)[B]&&g(this,B)[B].setVolume(e),g(this,M)[M].volume=e}},{key:"muted",get:function(){return!g(this,N)[N].enabled&&g(this,B)[B]?0===g(this,B)[B].getVolume():g(this,M)[M].muted},set:function(e){!g(this,N)[N].enabled&&g(this,B)[B]&&g(this,B)[B].setVolume(e?0:g(this,es)[es]),g(this,M)[M].muted=e}},{key:"currentTime",get:function(){return void 0!==g(this,ee)[ee]?g(this,ee)[ee]:g(this,M)[M].currentTime},set:function(e){g(this,N)[N].enabled&&(g(this,M)[M].currentTime=e)}},{key:"duration",get:function(){return void 0!==g(this,et)[et]?g(this,et)[et]:g(this,M)[M].duration}},{key:"cuePoints",get:function(){return[].concat(g(this,J)[J])}}]),t}(j)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["lmDdD"],"lmDdD","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,i,o,s,a){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof u[n]&&u[n],l=c.i||{},d=c.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!d[t]){if(!e[t]){if(i[t])return i[t];var o="function"==typeof u[n]&&u[n];if(!r&&o)return o(t,!0);if(c)return c(t,!0);if(h&&"string"==typeof t)return h(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var a=d[t]=new f.Module(t);e[t][0].call(a.exports,l,a,a.exports,u)}return d[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=h,this.exports={}},f.modules=e,f.cache=d,f.parent=c,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=l,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return u[n]}}),u[n]=f;for(var p=0;pt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function l(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,o._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function d(e,t){return function(r,n){t(r,n,e)}}function h(e,t,r,n,i,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",d=!t&&e?n.static?e:e.prototype:null,h=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var y in n)v[y]="access"===y?{}:n[y];for(var y in n.access)v.access[y]=n.access[y];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,r[p])("accessor"===c?{get:h.get,set:h.set}:h[l],v);if("accessor"===c){if(void 0===m)continue;if(null===m||(void 0===m?"undefined":(0,o._)(m))!=="object")throw TypeError("Object expected");(u=a(m.get))&&(h.get=u),(u=a(m.set))&&(h.set=u),(u=a(m.init))&&i.unshift(u)}else(u=a(m))&&("field"===c?i.unshift(u):h[l]=u)}d&&Object.defineProperty(d,n.name,h),f=!0}function f(e,t,r){for(var n=arguments.length>2,i=0;i0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function w(){for(var e=[],t=0;t1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{var r;(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function j(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var o,s,a;o=n,s=i,a=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:a})},s)})}}}function R(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},x=function(e){return(x=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=x(e),n=0;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r-1&&(A(this,ee)[ee].splice(t,1),this.g(A(this,ee)[ee]))},r.resizeAd=function(e,t){A(this,V)[V]=e,A(this,H)[H]=t,A(this,G)[G]&&A(this,G)[G].resize(e,t,this.k()),A(this,N)[N].style.width=e+"px",A(this,N)[N].style.height=t+"px"},r.reset=function(e){void 0===e&&(e=!1),e&&(A(this,Y)[Y]=!1,A(this,X)[X]=!1,A(this,J)[J]=!1),this.C(),A(this,ee)[ee]=[],A(this,es)[es]=!1,A(this,en)[en]=void 0,A(this,G)[G]&&A(this,G)[G].destroy(),A(this,G)[G]=void 0,A(this,z)[z].settings.setAutoPlayAdBreaks(!0),e&&this.P(),A(this,N)[N].style.display="none"},r.P=function(){A(this,W)[W]&&(A(this,W)[W].removeEventListener(A(this,z)[z].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),A(this,W)[W].removeEventListener(A(this,z)[z].AdErrorEvent.Type.AD_ERROR,this.l,!1),A(this,W)[W].destroy()),A(this,B)[B]&&A(this,B)[B].destroy()},r.destroy=function(){var e,t,r,n,i=this;this.reset(!0),A(this,U)[U].destroy(),x.forEach(function(e){A(i,L)[L].removeEventListener(e,i.o)}),null==(e=A(this,W)[W])||e.removeEventListener(A(this,z)[z].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.u,!1),null==(t=A(this,B)[B])||t.destroy(),null==(r=A(this,W)[W])||r.destroy(),A(this,Y)[Y]=!1,A(this,J)[J]=!1,A(this,X)[X]=!1,null==(n=A(this,Q)[Q])||n.disconnect()},r.isCustomPlaybackUsed=function(){return!1===A(this,z)[z].settings.getDisableCustomPlaybackForIOS10Plus()&&!A(this,N)[N].querySelector("video")},r.C=function(){window.clearTimeout(A(this,ei)[ei]),window.clearTimeout(A(this,eo)[eo]),A(this,ei)[ei]=void 0,A(this,eo)[eo]=void 0,A(this,K)[K]=void 0,A(this,et)[et]=void 0,A(this,er)[er]=void 0,A(this,N)[N].style.display="none",A(this,N)[N].classList.remove("nonlinear"),A(this,G)[G]&&this.R()},r.o=function(e){var t=this;if(A(this,U)[U].enabled||"volumechange"===e.type){if("timeupdate"===e.type){if(A(this,G)[G]){var r=A(this,G)[G].getCuePoints().filter(function(e){return e>=0&&e=.5&&(this.dispatchEvent(new S(k.MEDIA_IMPRESSION)),A(this,Y)[Y]=!0)}if("play"!==e.type||A(this,X)[X]||A(this,Z)[Z]||(this.dispatchEvent(new S(k.MEDIA_START)),A(this,X)[X]=!0),"ended"===e.type&&(this.isCustomPlaybackUsed()&&A(this,L)[L].currentTime===A(this,L)[L].duration&&A(this,ee)[ee].indexOf(-1)>-1&&(A(this,L)[L].currentTime=A(this,L)[L].duration-1e-5,A(this,J)[J]=!0),A(this,W)[W].contentComplete(),A(this,G)[G]||this.T()),!window.ResizeObserver&&A(this,q)[q].autoResize&&"loadedmetadata"===e.type){var n=A(this,L)[L],i=n.offsetHeight,o=n.offsetWidth;A(this,V)[V]=o,A(this,H)[H]=i,this.R()}A(this,Z)[Z]&&"volumechange"!==e.type||this.dispatchEvent(new S(e.type))}},r.S=function(e){var t=this,r=A(this,z)[z].AdEvent;switch(e.type){case r.Type.LOADED:var n=e.getAd();A(this,en)[en]&&0===A(this,ee)[ee].length?A(this,en)[en]({ad:n,start:function(){t.M(),A(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}):A(this,$)[$]=n;break;case r.Type.AD_BREAK_READY:this.C(),A(this,en)[en]?(A(this,en)[en]({ad:A(this,$)[$],adBreakTime:e.getAdData().adBreakTime,start:function(){t.M(),A(t,en)[en]=void 0},startWithoutReset:function(){t.M()}}),A(this,$)[$]=void 0):this.M();break;case r.Type.STARTED:var i=A(this,K)[K]=e.getAd();i.getAdPodInfo().getAdPosition()>1&&A(this,G)[G].setVolume(A(this,G)[G].getVolume()),A(this,N)[N].classList.remove("nonlinear"),this.R(),i.isLinear()?(A(this,U)[U].disable(),A(this,er)[er]=i.getDuration(),A(this,et)[et]=0):(A(this,N)[N].classList.add("nonlinear"),this.I()),A(this,N)[N].style.display="",A(this,es)[es]&&(A(this,es)[es]=!1,A(this,G)[G].pause());break;case r.Type.ALL_ADS_COMPLETED:if(A(this,J)[J])return;this.isCustomPlaybackUsed()&&A(this,K)[K]&&-1!==A(this,K)[K].getAdPodInfo().getTimeOffset()&&this.I(),this.reset();break;case r.Type.CONTENT_PAUSE_REQUESTED:this.C(),A(this,K)[K]=e.getAd(),A(this,N)[N].style.display="",A(this,L)[L].pause(),this.R(),A(this,K)[K]&&this.A(A(this,K)[K].getAdPodInfo().getTimeOffset()),A(this,G)[G].setVolume(A(this,L)[L].muted?0:A(this,L)[L].volume),A(this,U)[U].disable(),A(this,er)[er]=A(this,K)[K].getDuration(),A(this,et)[et]=0;break;case r.Type.CONTENT_RESUME_REQUESTED:var o=!!A(this,K)[K];if(o){var s=A(this,G)[G].getVolume();A(this,L)[L].muted=0===s,A(this,L)[L].volume=A(this,ea)[ea]}A(this,J)[J]&&(A(this,L)[L].currentTime=A(this,L)[L].duration+1,A(this,J)[J]=!1),A(this,L)[L].ended?(this.reset(),this.T()):this.C(),o&&(A(this,es)[es]=!1,this.I());break;case r.Type.AD_METADATA:this.g(A(this,G)[G].getCuePoints()),-1===A(this,ee)[ee].indexOf(0)&&(A(this,en)[en]?A(this,en)[en]({start:function(){t.I(),A(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I());break;case r.Type.AD_PROGRESS:var a=e.getAdData();A(this,et)[et]=a.currentTime,A(this,er)[er]=a.duration;break;case r.Type.LOG:var u=e.getAdData();A(this,en)[en]?A(this,en)[en]({start:function(){t.I(),A(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):u.adError&&!A(this,K)[K]&&this.I();break;case r.Type.VOLUME_CHANGED:var c=A(this,G)[G].getVolume();c>0&&(A(this,ea)[ea]=c)}},r.l=function(e){this.j(this.B(e))},r.u=function(e){var t,r=this,n=A(this,z)[z],i=n.AdEvent,o=n.AdErrorEvent.Type.AD_ERROR;window.clearTimeout(A(this,ei)[ei]);var s=A(this,G)[G]=e.getAdsManager(A(this,U)[U],A(this,F)[F]);Object.keys(i.Type).forEach(function(e){s.addEventListener(i.Type[e],function(t){if(r.S(t),k[e]){var n=["LOG","AD_PROGRESS"].indexOf(e)>-1;r.dispatchEvent(new S(k[e],{detail:{ad:t.getAd()||A(r,K)[K],adData:n?t.getAdData():{}}}))}})}),s.addEventListener(o,function(e){return r.j(r.B(e))});try{s.init(A(this,V)[V],A(this,H)[H],this.k()),s.setVolume(A(this,L)[L].muted?0:A(this,L)[L].volume),null==(t=A(this,B)[B])||t.initialize(),A(this,en)[en]||this.M()}catch(e){this.j(new M(e.message))}},r.M=function(){if(A(this,X)[X]||(this.dispatchEvent(new S(k.MEDIA_START)),A(this,X)[X]=!0),A(this,G)[G])try{A(this,G)[G].start()}catch(e){this.j(new M(e.message))}else this.I()},r.T=function(){var e=this;setTimeout(function(){A(e,Y)[Y]=!1,A(e,X)[X]=!1,A(e,J)[J]=!1,e.dispatchEvent(new S(k.MEDIA_STOP))},1)},r.v=function(e){for(var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return _(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,void 0):void 0}}(e))){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(t=r()).done;){var n=t.value;n.contentBoxSize&&1===n.contentBoxSize.length?(A(this,V)[V]=n.contentBoxSize[0].inlineSize,A(this,H)[H]=n.contentBoxSize[0].blockSize):n.contentBoxSize&&n.contentBoxSize.inlineSize?(A(this,V)[V]=n.contentBoxSize.inlineSize,A(this,H)[H]=n.contentBoxSize.blockSize):(A(this,V)[V]=n.contentRect.width,A(this,H)[H]=n.contentRect.height)}this.R()},r.R=function(){if(A(this,q)[q].autoResize&&A(this,G)[G]){var e=A(this,K)[K],t=this.k();e&&!e.isLinear()?e&&(e.getWidth()>A(this,V)[V]||e.getHeight()>A(this,H)[H]?this.resizeAd(A(this,V)[V],A(this,H)[H]):(A(this,G)[G].resize(e.getWidth(),e.getHeight()+20,t),A(this,N)[N].style.width=e.getWidth()+"px",A(this,N)[N].style.height=e.getHeight()+20+"px")):this.resizeAd(A(this,V)[V],A(this,H)[H])}},r.k=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||A(this,L)[L].webkitDisplayingFullscreen?A(this,z)[z].ViewMode.FULLSCREEN:A(this,z)[z].ViewMode.NORMAL},r.I=function(){var e=this;A(this,N)[N].style.display="none",A(this,L)[L].ended||(A(this,U)[U].enable(),A(this,es)[es]?(A(this,L)[L].pause(),this.dispatchEvent(new S("pause"))):(this.p().then(function(){}).catch(function(){e.dispatchEvent(new S("pause"))}),this.dispatchEvent(new S("play")),this.dispatchEvent(new S(k.MEDIA_RESUMED))),A(this,es)[es]=!1)},r.B=function(e){var t=e.getError(),r=new M(t.getMessage());return r.type=t.getType(),r.errorCode=t.getErrorCode(),r.vastErrorCode=t.getVastErrorCode&&t.getVastErrorCode(),r.innerError=t.getInnerError(),r},r.j=function(e){var t=this;this.dispatchEvent(new S(k.AD_ERROR,{detail:{error:e}})),this.C(),A(this,en)[en]?A(this,en)[en]({start:function(){t.I(),A(t,en)[en]=void 0},startWithoutReset:function(){t.I()}}):this.I()},d(t,[{key:"volume",get:function(){return!A(this,U)[U].enabled&&A(this,G)[G]?A(this,G)[G].getVolume():A(this,L)[L].volume},set:function(e){!A(this,U)[U].enabled&&A(this,G)[G]&&A(this,G)[G].setVolume(e),A(this,L)[L].volume=e}},{key:"muted",get:function(){return!A(this,U)[U].enabled&&A(this,G)[G]?0===A(this,G)[G].getVolume():A(this,L)[L].muted},set:function(e){!A(this,U)[U].enabled&&A(this,G)[G]&&A(this,G)[G].setVolume(e?0:A(this,ea)[ea]),A(this,L)[L].muted=e}},{key:"currentTime",get:function(){return void 0!==A(this,et)[et]?A(this,et)[et]:A(this,L)[L].currentTime},set:function(e){A(this,U)[U].enabled&&(A(this,L)[L].currentTime=e)}},{key:"duration",get:function(){return void 0!==A(this,er)[er]?A(this,er)[er]:A(this,L)[L].duration}},{key:"cuePoints",get:function(){return[].concat(A(this,ee)[ee])}}]),t}(I)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["lmDdD"],"lmDdD","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-vast/package.json b/packages/artplayer-plugin-vast/package.json index 486120267..45b068846 100644 --- a/packages/artplayer-plugin-vast/package.json +++ b/packages/artplayer-plugin-vast/package.json @@ -1,27 +1,27 @@ { - "license": "MIT", - "version": "1.0.0", - "name": "artplayer-plugin-vast", - "types": "types/artplayer-plugin-vast.d.ts", - "description": "vast plugin for ArtPlayer", - "main": "dist/artplayer-plugin-vast.js", - "legacy": "dist/artplayer-plugin-vast.legacy.js", - "author": "Harvey Zack ", - "browserslist": "last 1 Chrome version", - "homepage": "https://artplayer.org", - "repository": { - "type": "git", - "url": "git+https://github.com/zhw2590582/ArtPlayer.git" - }, - "bugs": { - "url": "https://github.com/zhw2590582/ArtPlayer/issues" - }, - "keywords": [ - "html5", - "video", - "player" - ], - "dependencies": { - "@glomex/vast-ima-player": "^1.21.0" - } + "license": "MIT", + "version": "1.0.0", + "name": "artplayer-plugin-vast", + "types": "types/artplayer-plugin-vast.d.ts", + "description": "vast plugin for ArtPlayer", + "main": "dist/artplayer-plugin-vast.js", + "legacy": "dist/artplayer-plugin-vast.legacy.js", + "author": "Harvey Zack ", + "browserslist": "last 1 Chrome version", + "homepage": "https://artplayer.org", + "repository": { + "type": "git", + "url": "git+https://github.com/zhw2590582/ArtPlayer.git" + }, + "bugs": { + "url": "https://github.com/zhw2590582/ArtPlayer/issues" + }, + "keywords": [ + "html5", + "video", + "player" + ], + "dependencies": { + "@glomex/vast-ima-player": "^1.21.0" + } } diff --git a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js index 35b46056e..db6592bdf 100644 --- a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js +++ b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var p=u[t]=new a.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=u,a.parent=l,a.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(a,"root",{get:function(){return i[r]}}),i[r]=a;for(var s=0;sl);var o=e("./getVttArray"),i=r.interopDefault(o);function l(e){return async t=>{let{constructor:{utils:{setStyle:n,isMobile:r,addClass:o}},template:{$progress:l}}=t,u=null,f=await (0,i.default)(e.vtt);return t.controls.add({name:"vtt-thumbnail",position:"top",index:20,style:e.style||{},mounted(e){o(e,"art-control-thumbnails"),t.on("setBar",async(o,i,a)=>{let s="played"===o&&a&&r;if("hover"===o||s){let o=l.clientWidth*i,a=i*t.duration;n(e,"display","flex");let p=f.find(e=>a>=e.start&&a<=e.end);if(!p)return n(e,"display","none");o>0&&ol.clientWidth-p.w/2?n(e,"left",`${l.clientWidth-p.w}px`):n(e,"left",`${o-p.w/2}px`)):r||n(e,"display","none"),s&&(clearTimeout(u),u=setTimeout(()=>{n(e,"display","none")},500))}})}}),{name:"artplayerPluginVttThumbnail"}}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=l)},{"./getVttArray":"4IFMi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IFMi":[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){var t,n,r,o=e.split("."),i=o[0].split(":")||[],l=Number((t=o[1]||"0",n=3,r="0",t.length>n?String(t):((n-=t.length)>r.length&&(r+=r.repeat(n/r.length)),String(t)+r.slice(0,n))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+l}async function i(e=""){let t=(await (await fetch(e)).text()).split(/[\n\r]/gm).filter(e=>e.trim()),n=[];for(let r=1;r?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(u),a=/(.*)#(\w{4})=(.*)/i,s=l.match(a),p=Math.floor(o(f[1])),d=Math.floor(o(f[2])),c=s[1];if(!/^\/|((https?|ftp|file):\/\/)/i.test(c)){let t=e.split("/");t.pop(),t.push(c),c=t.join("/")}let h={start:p,end:d,url:c},m=s[2].split(""),y=s[3].split(",");for(let e=0;ei)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["YTqB2"],"YTqB2","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,r,i,o,l,u){var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof f[r]&&f[r],d=a.i||{},s=a.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,n){if(!s[t]){if(!e[t]){if(i[t])return i[t];var o="function"==typeof f[r]&&f[r];if(!n&&o)return o(t,!0);if(a)return a(t,!0);if(p&&"string"==typeof t)return p(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.exports,f)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.require=p,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.distDir=void 0,c.publicUrl=void 0,c.devServer=void 0,c.i=d,c.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(c,"root",{get:function(){return f[r]}}),f[r]=c;for(var h=0;hu);var o=e("./getVttArray"),l=i.interopDefault(o);function u(e){return async t=>{let{constructor:{utils:{setStyle:n,isMobile:r,addClass:i}},template:{$progress:o}}=t,u=null,f=await (0,l.default)(e.vtt);return t.controls.add({name:"vtt-thumbnail",position:"top",index:20,style:e.style||{},mounted(e){i(e,"art-control-thumbnails"),t.on("setBar",async(i,l,a)=>{let d="played"===i&&a&&r;if("hover"===i||d){let i=o.clientWidth*l,a=l*t.duration;n(e,"display","flex");let s=f.find(e=>a>=e.start&&a<=e.end);if(!s)return n(e,"display","none");if(i>0&&io.clientWidth-s.w/2?n(e,"left",`${o.clientWidth-s.w}px`):n(e,"left",`${i-s.w/2}px`);else r||n(e,"display","none");d&&(clearTimeout(u),u=setTimeout(()=>{n(e,"display","none")},500))}})}}),{name:"artplayerPluginVttThumbnail"}}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=u)},{"./getVttArray":"4IFMi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IFMi":[function(e,t,n,r){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){var t,n,r,i=e.split("."),o=i[0].split(":")||[],l=Number((t=i[1]||"0",n=3,r="0",t.length>n?String(t):((n-=t.length)>r.length&&(r+=r.repeat(n/r.length)),String(t)+r.slice(0,n))))/1e3;return 3600*Number(o[o.length-3]||0)+60*Number(o[o.length-2]||0)+Number(o[o.length-1]||0)+l}async function l(e=""){let t=(await (await fetch(e)).text()).split(/[\n\r]/gm).filter(e=>e.trim()),n=[];for(let r=1;r?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(u),a=/(.*)#(\w{4})=(.*)/i,d=l.match(a),s=Math.floor(o(f[1])),p=Math.floor(o(f[2])),c=d[1];if(!/^\/|((https?|ftp|file):\/\/)/i.test(c)){let t=e.split("/");t.pop(),t.push(c),c=t.join("/")}let h={start:s,end:p,url:c},m=d[2].split(""),y=d[3].split(",");for(let e=0;el)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n,r){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["YTqB2"],"YTqB2","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.legacy.js b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.legacy.js index 449184014..a014fcd90 100644 --- a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.legacy.js +++ b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],u=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,r){if(!u[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=u[t]=new s.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return u[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=u,s.parent=a,s.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(s,"root",{get:function(){return i[n]}}),i[n]=s;for(var l=0;l=e.start&&d<=e.end})))return[2,n(e,"display","none")];p>0&&ps.clientWidth-y.w/2?n(e,"left","".concat(s.clientWidth-y.w,"px")):n(e,"left","".concat(p-y.w/2,"px"))):a||n(e,"display","none"),c&&(clearTimeout(l),l=setTimeout(function(){n(e,"display","none")},500))}return[2]})}),function(e,t,n){return r.apply(this,arguments)}))}}),[2,{name:"artplayerPluginVttThumbnail"}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=c)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","./getVttArray":"iUpz3","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){r(e);return}u.done?t(c):Promise.resolve(c).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator});var o=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return a}),n.export(r,"__assign",function(){return u}),n.export(r,"__rest",function(){return c}),n.export(r,"__decorate",function(){return s}),n.export(r,"__param",function(){return l}),n.export(r,"__esDecorate",function(){return f}),n.export(r,"__runInitializers",function(){return p}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return y}),n.export(r,"__metadata",function(){return _}),n.export(r,"__awaiter",function(){return h}),n.export(r,"__generator",function(){return v}),n.export(r,"__createBinding",function(){return m}),n.export(r,"__exportStar",function(){return b}),n.export(r,"__values",function(){return g}),n.export(r,"__read",function(){return w}),n.export(r,"__spread",function(){return x}),n.export(r,"__spreadArrays",function(){return j}),n.export(r,"__spreadArray",function(){return O}),n.export(r,"__await",function(){return P}),n.export(r,"__asyncGenerator",function(){return S}),n.export(r,"__asyncDelegator",function(){return E}),n.export(r,"__asyncValues",function(){return T}),n.export(r,"__makeTemplateObject",function(){return D}),n.export(r,"__importStar",function(){return F}),n.export(r,"__importDefault",function(){return k}),n.export(r,"__classPrivateFieldGet",function(){return A}),n.export(r,"__classPrivateFieldSet",function(){return M}),n.export(r,"__classPrivateFieldIn",function(){return R}),n.export(r,"__addDisposableResource",function(){return W}),n.export(r,"__disposeResources",function(){return q});var o=e("@swc/helpers/_/_type_of"),i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function l(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,c=n.kind,s="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var h=(0,r[d])("accessor"===c?{get:f.get,set:f.set}:f[s],y);if("accessor"===c){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(u=a(h.get))&&(f.get=u),(u=a(h.set))&&(f.set=u),(u=a(h.init))&&o.unshift(u)}else(u=a(h))&&("field"===c?o.unshift(u):f[s]=u)}l&&Object.defineProperty(l,n.name,f),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],t=0;t1||u(e,t)})},t&&(n[e]=t(n[e])))}function u(e,t){try{var r;(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(c,s):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function c(e){u("next",e)}function s(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function E(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return I(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function A(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function M(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function W(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function q(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:a,__assign:u,__rest:c,__decorate:s,__param:l,__metadata:_,__awaiter:h,__generator:v,__createBinding:m,__exportStar:b,__values:g,__read:w,__spread:x,__spreadArrays:j,__spreadArray:O,__await:P,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:T,__makeTemplateObject:D,__importStar:F,__importDefault:k,__classPrivateFieldGet:A,__classPrivateFieldSet:M,__classPrivateFieldIn:R,__addDisposableResource:W,__disposeResources:q}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iUpz3:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var o=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator");function a(e){var t,r,n,o=e.split("."),i=o[0].split(":")||[],a=Number((t=o[1]||"0",r=3,n="0",t.length>r?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+a}function u(){return c.apply(this,arguments)}function c(){return(c=(0,o._)(function(){var e,t,r,n,o,u,c,s,l,f,p,d,y,_,h,v,m,b,g=arguments;return(0,i._)(this,function(i){switch(i.label){case 0:return[4,fetch(e=g.length>0&&void 0!==g[0]?g[0]:"")];case 1:return[4,i.sent().text()];case 2:for(n=1,t=i.sent().split(/[\n\r]/gm).filter(function(e){return e.trim()}),r=[];n?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,s=o.match(c),l=/(.*)#(\w{4})=(.*)/i,f=u.match(l),p=Math.floor(a(s[1])),d=Math.floor(a(s[2])),y=f[1],/^\/|((https?|ftp|file):\/\/)/i.test(y)||((_=e.split("/")).pop(),_.push(y),y=_.join("/")),h={start:p,end:d,url:y},v=f[2].split(""),m=f[3].split(","),b=0;b=e.start&&d<=e.end})))return[2,n(e,"display","none")];if(p>0&&ps.clientWidth-y.w/2?n(e,"left","".concat(s.clientWidth-y.w,"px")):n(e,"left","".concat(p-y.w/2,"px"));else o||n(e,"display","none");c&&(clearTimeout(f),f=setTimeout(function(){n(e,"display","none")},500))}return[2]})}),function(e,t,n){return r.apply(this,arguments)}))}}),[2,{name:"artplayerPluginVttThumbnail"}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=s)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","./getVttArray":"iUpz3","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){r(e);return}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return i.__generator});var i=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"__extends",function(){return u}),o.export(r,"__assign",function(){return c}),o.export(r,"__rest",function(){return s}),o.export(r,"__decorate",function(){return f}),o.export(r,"__param",function(){return l}),o.export(r,"__esDecorate",function(){return p}),o.export(r,"__runInitializers",function(){return d}),o.export(r,"__propKey",function(){return y}),o.export(r,"__setFunctionName",function(){return _}),o.export(r,"__metadata",function(){return h}),o.export(r,"__awaiter",function(){return v}),o.export(r,"__generator",function(){return m}),o.export(r,"__createBinding",function(){return b}),o.export(r,"__exportStar",function(){return w}),o.export(r,"__values",function(){return g}),o.export(r,"__read",function(){return x}),o.export(r,"__spread",function(){return j}),o.export(r,"__spreadArrays",function(){return O}),o.export(r,"__spreadArray",function(){return P}),o.export(r,"__await",function(){return S}),o.export(r,"__asyncGenerator",function(){return E}),o.export(r,"__asyncDelegator",function(){return I}),o.export(r,"__asyncValues",function(){return T}),o.export(r,"__makeTemplateObject",function(){return D}),o.export(r,"__importStar",function(){return k}),o.export(r,"__importDefault",function(){return A}),o.export(r,"__classPrivateFieldGet",function(){return M}),o.export(r,"__classPrivateFieldSet",function(){return N}),o.export(r,"__classPrivateFieldIn",function(){return W}),o.export(r,"__addDisposableResource",function(){return q}),o.export(r,"__disposeResources",function(){return z}),o.export(r,"__rewriteRelativeImportExtension",function(){return V});var i=e("@swc/helpers/_/_type_of"),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function f(e,t,r,n){var o,a=arguments.length,u=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(u=(a<3?o(u):a>3?o(t,r,u):o(t,r))||u);return a>3&&u&&Object.defineProperty(t,r,u),u}function l(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function u(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,s=n.kind,f="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?n.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,y=r.length-1;y>=0;y--){var _={};for(var h in n)_[h]="access"===h?{}:n[h];for(var h in n.access)_.access[h]=n.access[h];_.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(u(e||null))};var v=(0,r[y])("accessor"===s?{get:p.get,set:p.set}:p[f],_);if("accessor"===s){if(void 0===v)continue;if(null===v||(void 0===v?"undefined":(0,i._)(v))!=="object")throw TypeError("Object expected");(c=u(v.get))&&(p.get=c),(c=u(v.set))&&(p.set=c),(c=u(v.init))&&o.unshift(c)}else(c=u(v))&&("field"===s?o.unshift(c):p[f]=c)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function j(){for(var e=[],t=0;t1||u(e,t)})},t&&(n[e]=t(n[e])))}function u(e,t){try{var r;(r=o[e](t)).value instanceof S?Promise.resolve(r.value.v).then(c,s):f(i[0][2],r)}catch(e){f(i[0][3],e)}}function c(e){u("next",e)}function s(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var i,a,u;i=n,a=o,u=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){i({value:e,done:u})},a)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},R=function(e){return(R=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=R(e),n=0;nr?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+a}function c(){return s.apply(this,arguments)}function s(){return(s=(0,i._)(function(){var e,t,r,n,o,i,c,s,f,l,p,d,y,_,h,v,m,b,w=arguments;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,fetch(e=w.length>0&&void 0!==w[0]?w[0]:"")];case 1:return[4,a.sent().text()];case 2:for(n=1,t=a.sent().split(/[\n\r]/gm).filter(function(e){return e.trim()}),r=[];n?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,s=o.match(c),f=/(.*)#(\w{4})=(.*)/i,l=i.match(f),p=Math.floor(u(s[1])),d=Math.floor(u(s[2])),y=l[1],/^\/|((https?|ftp|file):\/\/)/i.test(y)||((_=e.split("/")).pop(),_.push(y),y=_.join("/")),h={start:p,end:d,url:y},v=l[2].split(""),m=l[3].split(","),b=0;b{let{constructor:n}=t,{createElement:o}=n.utils,i=o("canvas"),r=o("video"),a=i.getContext("2d"),u=null,f={};for(let e in i)"function"==typeof i[e]&&(f[e]=i[e].bind(i));for(let e in r)e in i||Object.defineProperty(i,e,{get(){let t=r[e];return"function"==typeof t?t.bind(r):t},set(t){r[e]=t},configurable:!0,enumerable:!0});for(let e in f)i[e]=function(...t){return e in f?f[e](...t):r[e].apply(r,t)};return function(){let{events:e}=n.config;setTimeout(()=>{e.forEach(e=>{t.proxy(r,e,e=>{t.emit(`video:${e.type}`,e)})})})}(),t.on("video:loadedmetadata",()=>{i.width=r.videoWidth,i.height=r.videoHeight}),t.on("video:play",()=>{cancelAnimationFrame(u),d()}),t.on("video:pause",()=>{cancelAnimationFrame(u)}),t.on("resize",()=>{(function(){let e,n;let o=t.template?.$player;if(!o||t.option.autoSize)return;let a=r.videoWidth/r.videoHeight,u=o.clientWidth,f=o.clientHeight;u/f>a?e=(n=f)*a:n=(e=u)/a,i.width=e,i.height=n;let l=(u-e)/2,d=(f-n)/2;Object.assign(i.style,{padding:`${d}px ${l}px`})})(),l()}),t.on("destroy",()=>{cancelAnimationFrame(u)}),i;async function l(){try{if("undefined"!=typeof createImageBitmap){let e=await createImageBitmap(r);a.drawImage(e,0,0,i.width,i.height),e.close()}else a.drawImage(r,0,0,i.width,i.height);e&&e(a,r),t.emit("artplayerProxyCanvas:draw",a,r)}catch(e){t.emit("artplayerProxyCanvas:error",e)}}async function d(){await l(),u=requestAnimationFrame(d)}}}o.defineInteropFlag(n),o.export(n,"default",()=>i),"undefined"!=typeof window&&(window.artplayerProxyCanvas=i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["16i3K"],"16i3K","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,n,i,r,o,a,u){var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof f[i]&&f[i],l=d.i||{},c=d.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,n){if(!c[t]){if(!e[t]){if(r[t])return r[t];var o="function"==typeof f[i]&&f[i];if(!n&&o)return o(t,!0);if(d)return d(t,!0);if(p&&"string"==typeof t)return p(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}l.resolve=function(n){var i=e[t][1][n];return null!=i?i:n},l.cache={};var u=c[t]=new s.Module(t);e[t][0].call(u.exports,l,u,u.exports,f)}return c[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.require=p,this.exports={}},s.modules=e,s.cache=c,s.parent=d,s.distDir=void 0,s.publicUrl=void 0,s.devServer=void 0,s.i=l,s.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(s,"root",{get:function(){return f[i]}}),f[i]=s;for(var y=0;y{let{constructor:n}=t,{createElement:i}=n.utils,r=i("canvas"),o=i("video"),a=r.getContext("2d"),u=null,f={};for(let e in r)"function"==typeof r[e]&&(f[e]=r[e].bind(r));for(let e in o)e in r||Object.defineProperty(r,e,{get(){let t=o[e];return"function"==typeof t?t.bind(o):t},set(t){o[e]=t},configurable:!0,enumerable:!0});for(let e in f)r[e]=function(...t){return e in f?f[e](...t):o[e].apply(o,t)};return function(){let{events:e}=n.config;setTimeout(()=>{e.forEach(e=>{t.proxy(o,e,e=>{t.emit(`video:${e.type}`,e)})})})}(),t.on("video:loadedmetadata",()=>{r.width=o.videoWidth,r.height=o.videoHeight}),t.on("video:play",()=>{cancelAnimationFrame(u),l()}),t.on("video:pause",()=>{cancelAnimationFrame(u)}),t.on("resize",()=>{!function(){let e,n,i=t.template?.$player;if(!i||t.option.autoSize)return;let a=o.videoWidth/o.videoHeight,u=i.clientWidth,f=i.clientHeight;u/f>a?e=(n=f)*a:n=(e=u)/a,r.width=e,r.height=n;let d=(u-e)/2,l=(f-n)/2;Object.assign(r.style,{padding:`${l}px ${d}px`})}(),d()}),t.on("destroy",()=>{cancelAnimationFrame(u)}),r;async function d(){try{if("undefined"!=typeof createImageBitmap){let e=await createImageBitmap(o);a.drawImage(e,0,0,r.width,r.height),e.close()}else a.drawImage(o,0,0,r.width,r.height);e&&e(a,o),t.emit("artplayerProxyCanvas:draw",a,o)}catch(e){t.emit("artplayerProxyCanvas:error",e)}}async function l(){await d(),u=requestAnimationFrame(l)}}}r.defineInteropFlag(n),r.export(n,"default",()=>o),"undefined"!=typeof window&&(window.artplayerProxyCanvas=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n,i){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["16i3K"],"16i3K","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js b/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js index 34b05f6d1..74990e109 100644 --- a/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js +++ b/packages/artplayer-proxy-canvas/dist/artplayer-proxy-canvas.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],c=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(r,t){if(!c[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(u&&"string"==typeof r)return u(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},p.cache={};var l=c[r]=new s.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return c[r].exports;function p(e){var r=p.resolve(e);return!1===r?{}:s(r)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=c,s.parent=a,s.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(s,"root",{get:function(){return i[n]}}),i[n]=s;for(var f=0;fi?t=(n=c)*i:n=(t=a)/i,f.width=t,f.height=n;var u=(a-t)/2,s=(c-n)/2;Object.assign(f.style,{padding:"".concat(s,"px ").concat(u,"px")})}})(),v()}),r.on("destroy",function(){cancelAnimationFrame(d)}),f;function v(){return b.apply(this,arguments)}function b(){return(b=(0,o._)(function(){var t,n;return(0,a._)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,4,,5]),!("undefined"!=typeof createImageBitmap))return[3,2];return[4,createImageBitmap(l)];case 1:return t=o.sent(),p.drawImage(t,0,0,f.width,f.height),t.close(),[3,3];case 2:p.drawImage(l,0,0,f.width,f.height),o.label=3;case 3:return e&&e(p,l),r.emit("artplayerProxyCanvas:draw",p,l),[3,5];case 4:return n=o.sent(),r.emit("artplayerProxyCanvas:error",n),[3,5];case 5:return[2]}})})).apply(this,arguments)}function j(){return w.apply(this,arguments)}function w(){return(w=(0,o._)(function(){return(0,a._)(this,function(e){switch(e.label){case 0:return[4,v()];case 1:return e.sent(),d=requestAnimationFrame(j),[2]}})})).apply(this,arguments)}}}"undefined"!=typeof window&&(window.artplayerProxyCanvas=c)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r,t,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){t(e);return}c.done?r(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function c(e){o(a,n,i,c,u,"next",e)}function u(e){o(a,n,i,c,u,"throw",e)}c(void 0)})}}n.defineInteropFlag(t),n.export(t,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],iwLF0:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return u});var o=e("./_array_without_holes.js"),i=e("./_iterable_to_array.js"),a=e("./_non_iterable_spread.js"),c=e("./_unsupported_iterable_to_array.js");function u(e){return(0,o._)(e)||(0,i._)(e)||(0,c._)(e)||(0,a._)()}},{"./_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(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_",function(){return i});var o=e("./_array_like_to_array.js");function i(e){if(Array.isArray(e))return(0,o._)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);tr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function s(e,r,t,n){var o,i=arguments.length,a=i<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,r,t,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(r,t,a):o(r,t))||a);return i>3&&a&&Object.defineProperty(r,t,a),a}function f(e,r){return function(t,n){r(t,n,e)}}function l(e,r,t,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,u=n.kind,s="getter"===u?"get":"setter"===u?"set":"value",f=!r&&e?n.static?e:e.prototype:null,l=r||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=t.length-1;d>=0;d--){var _={};for(var y in n)_[y]="access"===y?{}:n[y];for(var y in n.access)_.access[y]=n.access[y];_.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var h=(0,t[d])("accessor"===u?{get:l.get,set:l.set}:l[s],_);if("accessor"===u){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw TypeError("Object expected");(c=a(h.get))&&(l.get=c),(c=a(h.set))&&(l.set=c),(c=a(h.init))&&o.unshift(c)}else(c=a(h))&&("field"===u?o.unshift(c):l[s]=c)}f&&Object.defineProperty(f,n.name,l),p=!0}function p(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],r=0;r1||c(e,r)})},r&&(n[e]=r(n[e])))}function c(e,r){try{var t;(t=o[e](r)).value instanceof P?Promise.resolve(t.value.v).then(u,s):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function u(e){c("next",e)}function s(e){c("throw",e)}function f(e,r){e(r),i.shift(),i.length&&c(i[0][0],i[0][1])}}function E(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:P(e[n](r)),done:!1}:o?o(r):r}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=j(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){!function(e,r,t,n){Promise.resolve(n).then(function(r){e({value:r,done:t})},r)}(n,o,(r=e[t](r)).done,r.value)})}}}function D(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var F=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r};function T(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&v(r,e,t);return F(r,e),r}function A(e){return e&&e.__esModule?e:{default:e}}function R(e,r,t,n){if("a"===t&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function k(e,r,t,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!o:!r.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,t):o?o.value=t:r.set(e,t),t}function W(e,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?r===e:e.has(r)}function C(e,r,t){if(null!=r){var n,o;if("object"!=typeof r&&"function"!=typeof r)throw TypeError("Object expected.");if(t){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=r[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=r[Symbol.dispose],t&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:r,dispose:n,async:t})}else t&&e.stack.push({async:!0});return r}var M="function"==typeof SuppressedError?SuppressedError:function(e,r,t){var n=Error(t);return n.name="SuppressedError",n.error=e,n.suppressed=r,n};function N(e){function r(r){e.error=e.hasError?new M(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(t,function(e){return r(e),t()})}catch(e){r(e)}}if(e.hasError)throw e.error}()}t.default={__extends:a,__assign:c,__rest:u,__decorate:s,__param:f,__metadata:y,__awaiter:h,__generator:m,__createBinding:v,__exportStar:b,__values:j,__read:w,__spread:g,__spreadArrays:x,__spreadArray:O,__await:P,__asyncGenerator:S,__asyncDelegator:E,__asyncValues:I,__makeTemplateObject:D,__importStar:T,__importDefault:A,__classPrivateFieldGet:R,__classPrivateFieldSet:k,__classPrivateFieldIn:W,__addDisposableResource:C,__disposeResources:N}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(t),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["59CNb"],"59CNb","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,n,o,i,a,c){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof u[n]&&u[n],f=s.i||{},l=s.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(r,t){if(!l[r]){if(!e[r]){if(o[r])return o[r];var i="function"==typeof u[n]&&u[n];if(!t&&i)return i(r,!0);if(s)return s(r,!0);if(p&&"string"==typeof r)return p(r);var a=Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var c=l[r]=new d.Module(r);e[r][0].call(c.exports,f,c,c.exports,u)}return l[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:d(r)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=l,d.parent=s,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return u[n]}}),u[n]=d;for(var _=0;_i?t=(n=c)*i:n=(t=a)/i,f.width=t,f.height=n;var u=(a-t)/2,s=(c-n)/2;Object.assign(f.style,{padding:"".concat(s,"px ").concat(u,"px")})}}(),v()}),r.on("destroy",function(){cancelAnimationFrame(d)}),f;function v(){return b.apply(this,arguments)}function b(){return(b=(0,i._)(function(){var t,n;return(0,c._)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,4,,5]),"undefined"==typeof createImageBitmap)return[3,2];return[4,createImageBitmap(l)];case 1:return t=o.sent(),p.drawImage(t,0,0,f.width,f.height),t.close(),[3,3];case 2:p.drawImage(l,0,0,f.width,f.height),o.label=3;case 3:return e&&e(p,l),r.emit("artplayerProxyCanvas:draw",p,l),[3,5];case 4:return n=o.sent(),r.emit("artplayerProxyCanvas:error",n),[3,5];case 5:return[2]}})})).apply(this,arguments)}function j(){return w.apply(this,arguments)}function w(){return(w=(0,i._)(function(){return(0,c._)(this,function(e){switch(e.label){case 0:return[4,v()];case 1:return e.sent(),d=requestAnimationFrame(j),[2]}})})).apply(this,arguments)}}}"undefined"!=typeof window&&(window.artplayerProxyCanvas=u)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r,t,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){t(e);return}c.done?r(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var r=this,t=arguments;return new Promise(function(n,o){var a=e.apply(r,t);function c(e){i(a,n,o,c,u,"next",e)}function u(e){i(a,n,o,c,u,"throw",e)}c(void 0)})}}o.defineInteropFlag(t),o.export(t,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t,n){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],iwLF0:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return s});var i=e("./_array_without_holes.js"),a=e("./_iterable_to_array.js"),c=e("./_non_iterable_spread.js"),u=e("./_unsupported_iterable_to_array.js");function s(e){return(0,i._)(e)||(0,a._)(e)||(0,u._)(e)||(0,c._)()}},{"./_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(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(t),o.export(t,"_",function(){return a});var i=e("./_array_like_to_array.js");function a(e){if(Array.isArray(e))return(0,i._)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);tr.indexOf(n)&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);or.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t}function f(e,r,t,n){var o,a=arguments.length,c=a<3?r:null===n?n=Object.getOwnPropertyDescriptor(r,t):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,r,t,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(r,t,c):o(r,t))||c);return a>3&&c&&Object.defineProperty(r,t,c),c}function l(e,r){return function(t,n){r(t,n,e)}}function p(e,r,t,n,o,a){function c(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,s=n.kind,f="getter"===s?"get":"setter"===s?"set":"value",l=!r&&e?n.static?e:e.prototype:null,p=r||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,_=t.length-1;_>=0;_--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(c(e||null))};var m=(0,t[_])("accessor"===s?{get:p.get,set:p.set}:p[f],y);if("accessor"===s){if(void 0===m)continue;if(null===m||(void 0===m?"undefined":(0,i._)(m))!=="object")throw TypeError("Object expected");(u=c(m.get))&&(p.get=u),(u=c(m.set))&&(p.set=u),(u=c(m.init))&&o.unshift(u)}else(u=c(m))&&("field"===s?o.unshift(u):p[f]=u)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],r=0;r1||c(e,r)})},r&&(n[e]=r(n[e])))}function c(e,r){try{var t;(t=o[e](r)).value instanceof S?Promise.resolve(t.value.v).then(u,s):f(i[0][2],t)}catch(e){f(i[0][3],e)}}function u(e){c("next",e)}function s(e){c("throw",e)}function f(e,r){e(r),i.shift(),i.length&&c(i[0][0],i[0][1])}}function E(e){var r,t;return r={},n("next"),n("throw",function(e){throw e}),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:S(e[n](r)),done:!1}:o?o(r):r}:o}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=w(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise(function(n,o){var i,a,c;i=n,a=o,c=(r=e[t](r)).done,Promise.resolve(r.value).then(function(e){i({value:e,done:c})},a)})}}}function F(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var A=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r},T=function(e){return(T=Object.getOwnPropertyNames||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r})(e)};function R(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t=T(e),n=0;n", - "browserslist": "last 1 Chrome version", - "homepage": "https://artplayer.org", - "repository": { - "type": "git", - "url": "git+https://github.com/zhw2590582/ArtPlayer.git" - }, - "bugs": { - "url": "https://github.com/zhw2590582/ArtPlayer/issues" - }, - "keywords": [ - "html5", - "video", - "player" - ] -} \ No newline at end of file + "license": "MIT", + "version": "1.0.0", + "name": "artplayer-proxy-canvas", + "types": "types/artplayer-proxy-canvas.d.ts", + "description": "canvas proxy for ArtPlayer", + "main": "dist/artplayer-proxy-canvas.js", + "legacy": "dist/artplayer-proxy-canvas.legacy.js", + "author": "Harvey Zack ", + "browserslist": "last 1 Chrome version", + "homepage": "https://artplayer.org", + "repository": { + "type": "git", + "url": "git+https://github.com/zhw2590582/ArtPlayer.git" + }, + "bugs": { + "url": "https://github.com/zhw2590582/ArtPlayer/issues" + }, + "keywords": [ + "html5", + "video", + "player" + ] +} diff --git a/packages/artplayer-proxy-webav/dist/artplayer-proxy-webav.js b/packages/artplayer-proxy-webav/dist/artplayer-proxy-webav.js index f0d38e8e7..da40ee342 100644 --- a/packages/artplayer-proxy-webav/dist/artplayer-proxy-webav.js +++ b/packages/artplayer-proxy-webav/dist/artplayer-proxy-webav.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(t,e,r,s,n){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[s]&&a[s],h=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,r){if(!h[e]){if(!t[e]){var n="function"==typeof a[s]&&a[s];if(!r&&n)return n(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var d=Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(r){var s=t[e][1][r];return null!=s?s:r},p.cache={};var f=h[e]=new u.Module(e);t[e][0].call(f.exports,p,f,f.exports,this)}return h[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=h,u.parent=o,u.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return a[s]}}),a[s]=u;for(var d=0;da);var n=t("@webav/av-cliper");function a(t={}){return e=>{let r,s;let{option:a,constructor:o}=e,{createElement:h,def:l}=o.utils,u=h("canvas"),d=u.getContext("2d"),f=null,p=null,c=null,m=null,g=0,y={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:a.muted,volume:a.volume,autoplay:a.autoplay};function _(){c&&(clearInterval(c),c=null),p&&(p.stop(),p=null)}function b(){if(s){let t=y.muted?0:y.volume;s.gain.setValueAtTime(t,r.currentTime)}}async function w(){r||(s=(r=new AudioContext).createGain()).connect(r.destination);let t=1e6*y.currentTime,n=0,a=!0,o=performance.now();async function h(){if(!y.playing)return;let h=performance.now(),l=h-o;o=h,null!==m?(t=1e6*m,m=null,a=!0):t+=1e3*l*y.playbackRate,y.currentTime=t/1e6;let{state:u,video:c,audio:g}=await f.tick(Math.round(t));if(e.emit("video:timeupdate",{type:"timeupdate"}),"done"===u){_(),y.ended=!0,y.playing=!1,y.paused=!0,e.emit("video:ended",{type:"ended"});return}if(c&&"success"===u&&(d.clearRect(0,0,y.videoWidth,y.videoHeight),d.drawImage(c,0,0,y.videoWidth,y.videoHeight),c.close()),a)a=!1;else if(g?.[0]?.length){let t=r.createBuffer(2,g[0].length,48e3);t.copyToChannel(g[0],0),t.copyToChannel(g[1],1),(p=r.createBufferSource()).buffer=t,p.connect(s),p.playbackRate.setValueAtTime(y.playbackRate,r.currentTime),n=Math.max(r.currentTime,n),p.start(n),n+=t.duration/y.playbackRate}}_(),b(),y.playing=!0,y.paused=!1,c=setInterval(h,1e3/60)}async function v(t){let{video:e}=await f.tick(1e6*t);e&&(d.clearRect(0,0,u.width,u.height),d.drawImage(e,0,0,u.width,u.height),e.close())}function S(){let t=e.template?.$player;if(!t||a.autoSize)return;let r=u.videoWidth/u.videoHeight,s=t.clientWidth,n=t.clientHeight,o=0,h=0;s/n>r?o=(s-n*r)/2:h=(n-s/r)/2,Object.assign(u.style,{padding:`${h}px ${o}px`})}async function E(){if(!await (0,n.Combinator).isSupported())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");_(),Object.assign(y,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:a.muted,volume:a.volume,autoplay:a.autoplay}),f&&(f.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"}));try{await Promise.resolve(),y.readyState=1,e.emit("video:loadstart",{type:"loadstart"});let r=await fetch(a.url);if(!r.body)throw Error("No response body");f=new n.MP4Clip(r.body,t)}catch(t){throw y.readyState=0,e.emit("video:error",t),t}let r=await f.ready;Object.assign(y,{readyState:4,duration:Math.round(r.duration/1e6),videoWidth:r.width,videoHeight:r.height}),u.width=y.videoWidth,u.height=y.videoHeight,await v(.1),S(),e.emit("video:loadedmetadata",{type:"loadedmetadata"}),e.emit("video:durationchange",{type:"durationchange"}),e.emit("video:loadeddata",{type:"loadeddata"}),e.emit("video:canplay",{type:"canplay"}),e.emit("video:canplaythrough",{type:"canplaythrough"})}return l(u,"duration",{get:()=>y.duration}),l(u,"videoWidth",{get:()=>y.videoWidth}),l(u,"videoHeight",{get:()=>y.videoHeight}),l(u,"volume",{get:()=>y.volume,set:t=>{y.volume=Math.max(0,Math.min(1,t)),b(),e.emit("video:volumechange",{type:"volumechange"})}}),l(u,"currentTime",{get:()=>y.currentTime,set:t=>{if(y.readyState<4)return;let r=Math.max(0,Math.min(t,y.duration)),s=performance.now();s-g>16&&(g=s,m=r,y.currentTime=r,y.playing||v(r),e.emit("video:timeupdate",{type:"timeupdate"}))}}),l(u,"autoplay",{get:()=>y.autoplay,set:t=>{y.autoplay=t,t&&y.readyState>=4&&u.play()}}),l(u,"src",{get:()=>a.url,set:t=>{a.url=t,E().then(()=>{a.autoplay&&u.play()})}}),l(u,"playbackRate",{get:()=>y.playbackRate,set:t=>{y.playbackRate=Math.max(.25,Math.min(2,t)),p&&p.playbackRate.setValueAtTime(y.playbackRate,r.currentTime),e.emit("video:ratechange",{type:"ratechange"})}}),l(u,"playing",{get:()=>y.playing}),l(u,"paused",{get:()=>y.paused}),l(u,"ended",{get:()=>y.ended}),l(u,"readyState",{get:()=>y.readyState}),l(u,"muted",{get:()=>y.muted,set:t=>{y.muted=t,b(),e.emit("video:volumechange",{type:"volumechange"})}}),l(u,"buffered",{get:()=>({start:()=>0,end:()=>y.buffered,length:1})}),l(u,"play",{value:async()=>!(y.readyState<4)&&(await w(),e.emit("video:play",{type:"play"}),e.emit("video:playing",{type:"playing"}),!0)}),l(u,"pause",{value:()=>{_(),y.playing=!1,y.paused=!0,e.emit("video:pause",{type:"pause"})}}),e.on("destroy",()=>{_(),f&&f.destroy()}),e.on("resize",S),u}}"undefined"!=typeof window&&(window.artplayerProxyWebAV=a)},{"@webav/av-cliper":"b01Rz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],b01Rz:[function(t,e,r){var s,n,a,o,h,l,u,d,f,p,c,m,g,y,_,b,w,v,S,E,U,x,T,A,C,I,B,k,F,R,P,z,L,D,M,O,N,G,Y,W,V,H,X,j,Z,$,K,q,Q,J,tt,te,ti,tr,ts,tn,ta,to,th,tl,tu,td,tf,tp,tc,tm,tg,ty,t_,tb,tw,tv,tS,tE,tU,tx,tT,tA,tC,tI,tB,tk,tF,tR,tP,tz,tL,tD,tM,tO,tN,tG,tY,tW,tV,tH,tX,tj,tZ,t$,tK,tq,tQ,tJ,t0,t1,t2,t3,t6,t8,t4,t5,t9,t7,et,ee,ei,er,es,en,ea,eo,eh,el,eu,ed=t("@parcel/transformer-js/src/esmodule-helpers.js");ed.defineInteropFlag(r),ed.export(r,"AudioClip",()=>iX),ed.export(r,"Combinator",()=>rB),ed.export(r,"DEFAULT_AUDIO_CONF",()=>iC),ed.export(r,"EmbedSubtitlesClip",()=>iQ),ed.export(r,"EventTool",()=>i0),ed.export(r,"ImgClip",()=>iV),ed.export(r,"Log",()=>e5),ed.export(r,"MP4Clip",()=>iz),ed.export(r,"MediaStreamClip",()=>iK),ed.export(r,"OffscreenSprite",()=>rT),ed.export(r,"Rect",()=>rE),ed.export(r,"VisibleSprite",()=>rA),ed.export(r,"adjustAudioDataVolume",()=>iy),ed.export(r,"audioResample",()=>iw),ed.export(r,"autoReadStream",()=>iE),ed.export(r,"concatAudioClip",()=>ij),ed.export(r,"concatFloat32Array",()=>ip),ed.export(r,"concatPCMFragments",()=>ic),ed.export(r,"createChromakey",()=>rv),ed.export(r,"createEl",()=>eE),ed.export(r,"createHLSLoader",()=>rm),ed.export(r,"decodeImg",()=>i_),ed.export(r,"extractPCM4AudioBuffer",()=>ig),ed.export(r,"extractPCM4AudioData",()=>im),ed.export(r,"fastConcatMP4",()=>rt),ed.export(r,"file2stream",()=>i9),ed.export(r,"fixFMP4Duration",()=>ri),ed.export(r,"mixinMP4AndAudio",()=>rr),ed.export(r,"mixinPCM",()=>ib),ed.export(r,"recodemux",()=>i4),ed.export(r,"renderTxt2Img",()=>eU),ed.export(r,"renderTxt2ImgBitmap",()=>ex),ed.export(r,"ringSliceFloat32Array",()=>iS),ed.export(r,"workerTimer",()=>is);var ef=arguments[3],ep=t("718a311db185ef08").Buffer,ec=Object.defineProperty,em=t=>{throw TypeError(t)},eg=(t,e,r)=>e in t?ec(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ey=(t,e,r)=>eg(t,"symbol"!=typeof e?e+"":e,r),e_=(t,e,r)=>e.has(t)||em("Cannot "+r),eb=(t,e,r)=>(e_(t,e,"read from private field"),r?r.call(t):e.get(t)),ew=(t,e,r)=>e.has(t)?em("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ev=(t,e,r,s)=>(e_(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r),eS=(t,e,r)=>(e_(t,e,"access private method"),r);function eE(t){return document.createElement(t)}function eU(t,e){let r=eE("pre");r.style.cssText=`margin: 0; ${e}; visibility: hidden; position: fixed;`,r.textContent=t,document.body.appendChild(r);let{width:s,height:n}=r.getBoundingClientRect();r.remove(),r.style.visibility="visible";let a=new Image;a.width=s,a.height=n;let o=`
${r.outerHTML}
`.replace(/\t/g,"").replace(/#/g,"%23");return a.src=`data:image/svg+xml;charset=utf-8,${o}`,a}async function ex(t,e){let r=eU(t,e);await new Promise(t=>{r.onload=t});let s=new OffscreenCanvas(r.width,r.height),n=s.getContext("2d");return null==n||n.drawImage(r,0,0,r.width,r.height),await createImageBitmap(s)}var eT=t=>{throw TypeError(t)},eA=(t,e,r)=>e.has(t)||eT("Cannot "+r),eC=(t,e,r)=>(eA(t,e,"read from private field"),r?r.call(t):e.get(t)),eI=(t,e,r)=>e.has(t)?eT("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),eB=(t,e,r,s)=>(eA(t,e,"write to private field"),e.set(t,r),r);let ek="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHUobil7aWYobj09PSIvIilyZXR1cm57cGFyZW50Om51bGwsbmFtZToiIn07Y29uc3QgZT1uLnNwbGl0KCIvIikuZmlsdGVyKGk9PmkubGVuZ3RoPjApO2lmKGUubGVuZ3RoPT09MCl0aHJvdyBFcnJvcigiSW52YWxpZCBwYXRoIik7Y29uc3QgYT1lW2UubGVuZ3RoLTFdLHI9Ii8iK2Uuc2xpY2UoMCwtMSkuam9pbigiLyIpO3JldHVybntuYW1lOmEscGFyZW50OnJ9fWFzeW5jIGZ1bmN0aW9uIHcobixlKXtjb25zdHtwYXJlbnQ6YSxuYW1lOnJ9PXUobik7aWYoYT09bnVsbClyZXR1cm4gYXdhaXQgbmF2aWdhdG9yLnN0b3JhZ2UuZ2V0RGlyZWN0b3J5KCk7Y29uc3QgaT1hLnNwbGl0KCIvIikuZmlsdGVyKHQ9PnQubGVuZ3RoPjApO3RyeXtsZXQgdD1hd2FpdCBuYXZpZ2F0b3Iuc3RvcmFnZS5nZXREaXJlY3RvcnkoKTtmb3IoY29uc3QgcyBvZiBpKXQ9YXdhaXQgdC5nZXREaXJlY3RvcnlIYW5kbGUocyx7Y3JlYXRlOmUuY3JlYXRlfSk7aWYoZS5pc0ZpbGUpcmV0dXJuIGF3YWl0IHQuZ2V0RmlsZUhhbmRsZShyLHtjcmVhdGU6ZS5jcmVhdGV9KX1jYXRjaCh0KXtpZih0Lm5hbWU9PT0iTm90Rm91bmRFcnJvciIpcmV0dXJuIG51bGw7dGhyb3cgdH19Y29uc3QgZj17fTtzZWxmLm9ubWVzc2FnZT1hc3luYyBuPT57dmFyIGk7Y29uc3R7ZXZ0VHlwZTplLGFyZ3M6YX09bi5kYXRhO2xldCByPWZbYS5maWxlSWRdO3RyeXtsZXQgdDtjb25zdCBzPVtdO2lmKGU9PT0icmVnaXN0ZXIiKXtjb25zdCBsPWF3YWl0IHcoYS5maWxlUGF0aCx7Y3JlYXRlOiEwLGlzRmlsZTohMH0pO2lmKGw9PW51bGwpdGhyb3cgRXJyb3IoYG5vdCBmb3VuZCBmaWxlOiAke2EuZmlsZUlkfWApO3I9YXdhaXQgbC5jcmVhdGVTeW5jQWNjZXNzSGFuZGxlKHttb2RlOmEubW9kZX0pLGZbYS5maWxlSWRdPXJ9ZWxzZSBpZihlPT09ImNsb3NlIilhd2FpdCByLmNsb3NlKCksZGVsZXRlIGZbYS5maWxlSWRdO2Vsc2UgaWYoZT09PSJ0cnVuY2F0ZSIpYXdhaXQgci50cnVuY2F0ZShhLm5ld1NpemUpO2Vsc2UgaWYoZT09PSJ3cml0ZSIpe2NvbnN0e2RhdGE6bCxvcHRzOm99PW4uZGF0YS5hcmdzO3Q9YXdhaXQgci53cml0ZShsLG8pfWVsc2UgaWYoZT09PSJyZWFkIil7Y29uc3R7b2Zmc2V0Omwsc2l6ZTpvfT1uLmRhdGEuYXJncyxnPW5ldyBVaW50OEFycmF5KG8pLGQ9YXdhaXQgci5yZWFkKGcse2F0Omx9KSxjPWcuYnVmZmVyO3Q9ZD09PW8/YzooKGk9Yy50cmFuc2Zlcik9PW51bGw/dm9pZCAwOmkuY2FsbChjLGQpKT8/Yy5zbGljZSgwLGQpLHMucHVzaCh0KX1lbHNlIGU9PT0iZ2V0U2l6ZSI/dD1hd2FpdCByLmdldFNpemUoKTplPT09ImZsdXNoIiYmYXdhaXQgci5mbHVzaCgpO3NlbGYucG9zdE1lc3NhZ2Uoe2V2dFR5cGU6ImNhbGxiYWNrIixjYklkOm4uZGF0YS5jYklkLHJldHVyblZhbDp0fSxzKX1jYXRjaCh0KXtjb25zdCBzPXQ7c2VsZi5wb3N0TWVzc2FnZSh7ZXZ0VHlwZToidGhyb3dFcnJvciIsY2JJZDpuLmRhdGEuY2JJZCxlcnJNc2c6cy5uYW1lKyI6ICIrcy5tZXNzYWdlK2AKYCtKU09OLnN0cmluZ2lmeShuLmRhdGEpfSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPW9wZnMtd29ya2VyLUY0UldscWNfLmpzLm1hcAo=",eF="u">typeof self&&self.Blob&&new Blob([Uint8Array.from(atob(ek),t=>t.charCodeAt(0))],{type:"text/javascript;charset=utf-8"});function eR(t){let e;try{if(!(e=eF&&(self.URL||self.webkitURL).createObjectURL(eF)))throw"";let r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;base64,"+ek,{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}async function eP(t,e,r){let s=function(){if(ez.length<3){let t=function(){let t=new eR,e=0,r={};return t.onmessage=({data:t})=>{var e,s;"callback"===t.evtType?null==(e=r[t.cbId])||e.resolve(t.returnVal):"throwError"===t.evtType&&(null==(s=r[t.cbId])||s.reject(Error(t.errMsg))),delete r[t.cbId]},async function(s,n,a=[]){e+=1;let o=new Promise((t,s)=>{r[e]={resolve:t,reject:s}});return t.postMessage({cbId:e,evtType:s,args:n},a),o}}();return ez.push(t),t}{let t=ez[eL];return eL=(eL+1)%ez.length,t}}();return await s("register",{fileId:t,filePath:e,mode:r}),{read:async(e,r)=>await s("read",{fileId:t,offset:e,size:r}),write:async(e,r)=>await s("write",{fileId:t,data:e,opts:r},[ArrayBuffer.isView(e)?e.buffer:e]),close:async()=>await s("close",{fileId:t}),truncate:async e=>await s("truncate",{fileId:t,newSize:e}),getSize:async()=>await s("getSize",{fileId:t}),flush:async()=>await s("flush",{fileId:t})}}let ez=[],eL=0;function eD(t){if("/"===t)return{parent:null,name:""};let e=t.split("/").filter(t=>t.length>0);if(0===e.length)throw Error("Invalid path");return{name:e[e.length-1],parent:"/"+e.slice(0,-1).join("/")}}async function eM(t,e){let{parent:r,name:s}=eD(t);if(null==r)return await navigator.storage.getDirectory();let n=r.split("/").filter(t=>t.length>0);try{let t=await navigator.storage.getDirectory();for(let r of n)t=await t.getDirectoryHandle(r,{create:e.create});return e.isFile?await t.getFileHandle(s,{create:e.create}):await t.getDirectoryHandle(s,{create:e.create})}catch(t){if("NotFoundError"===t.name)return null;throw t}}async function eO(t){let{parent:e,name:r}=eD(t);if(null==e){let t=await navigator.storage.getDirectory();for await(let e of t.keys())await t.removeEntry(e,{recursive:!0});return}let s=await eM(e,{create:!1,isFile:!1});null!=s&&await s.removeEntry(r,{recursive:!0})}function eN(t,e){return`${t}/${e}`.replace("//","/")}function eG(t){return new eY(t)}class eY{constructor(t){eI(this,g),eI(this,y),eI(this,_),eB(this,g,t);let{parent:e,name:r}=eD(t);eB(this,y,r),eB(this,_,e)}get kind(){return"dir"}get name(){return eC(this,y)}get path(){return eC(this,g)}get parent(){return null==eC(this,_)?null:eG(eC(this,_))}async create(){return await eM(eC(this,g),{create:!0,isFile:!1}),eG(eC(this,g))}async exists(){return await eM(eC(this,g),{create:!1,isFile:!1}) instanceof FileSystemDirectoryHandle}async remove(){for(let t of(await this.children()))try{await t.remove()}catch(t){console.warn(t)}try{await eO(eC(this,g))}catch(t){console.warn(t)}}async children(){let t=await eM(eC(this,g),{create:!1,isFile:!1});if(null==t)return[];let e=[];for await(let r of t.values())e.push(("file"===r.kind?eV:eG)(eN(eC(this,g),r.name)));return e}async copyTo(t){if(!await this.exists())throw Error(`dir ${this.path} not exists`);let e=await t.exists()?eG(eN(t.path,this.name)):t;return await e.create(),await Promise.all((await this.children()).map(t=>t.copyTo(e))),e}async moveTo(t){let e=await this.copyTo(t);return await this.remove(),e}}g=/* @__PURE__ */new WeakMap,y=/* @__PURE__ */new WeakMap,_=/* @__PURE__ */new WeakMap;let eW=/* @__PURE__ */new Map;function eV(t,e="rw"){if("rw"===e){let r=eW.get(t)??new e$(t,e);return eW.set(t,r),r}return new e$(t,e)}async function eH(t,e,r={overwrite:!0}){if(e instanceof e$){await eH(t,await e.stream(),r);return}let s=await (t instanceof e$?t:eV(t,"rw")).createWriter();try{if(r.overwrite&&await s.truncate(0),e instanceof ReadableStream){let t=e.getReader();for(;;){let{done:e,value:r}=await t.read();if(e)break;await s.write(r)}}else await s.write(e)}catch(t){throw t}finally{await s.close()}}let eX=0,ej=()=>++eX,eZ=class t{constructor(t,e){eI(this,b),eI(this,w),eI(this,v),eI(this,S),eI(this,E),eI(this,U,0),eI(this,x,/* @__PURE__ */(()=>{let t=null;return()=>(eB(this,U,eC(this,U)+1),t??(t=new Promise(async(e,r)=>{try{let r=await eP(eC(this,E),eC(this,b),eC(this,S));e([r,async()=>{eB(this,U,eC(this,U)-1),eC(this,U)>0||(t=null,await r.close())}])}catch(t){r(t)}})))})()),eI(this,T,!1),eB(this,E,ej()),eB(this,b,t),eB(this,S,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[e]);let{parent:r,name:s}=eD(t);eB(this,v,s),eB(this,w,r)}get kind(){return"file"}get path(){return eC(this,b)}get name(){return eC(this,v)}get parent(){return null==eC(this,w)?null:eG(eC(this,w))}async createWriter(){if("read-only"===eC(this,S))throw Error("file is read-only");if(eC(this,T))throw Error("Other writer have not been closed");eB(this,T,!0);let t=new TextEncoder,[e,r]=await eC(this,x).call(this),s=await e.getSize(),n=!1;return{write:async(r,a={})=>{if(n)throw Error("Writer is closed");let o="string"==typeof r?t.encode(r):r,h=a.at??s;return s=h+o.byteLength,await e.write(o,{at:h})},truncate:async t=>{if(n)throw Error("Writer is closed");await e.truncate(t),s>t&&(s=t)},flush:async()=>{if(n)throw Error("Writer is closed");await e.flush()},close:async()=>{if(n)throw Error("Writer is closed");n=!0,eB(this,T,!1),await r()}}}async createReader(){let[t,e]=await eC(this,x).call(this),r=!1,s=0;return{read:async(e,n={})=>{if(r)throw Error("Reader is closed");let a=n.at??s,o=await t.read(a,e);return s=a+o.byteLength,o},getSize:async()=>{if(r)throw Error("Reader is closed");return await t.getSize()},close:async()=>{r||(r=!0,await e())}}}async text(){return new TextDecoder().decode(await this.arrayBuffer())}async arrayBuffer(){let t=await eM(eC(this,b),{create:!1,isFile:!0});return null==t?new ArrayBuffer(0):(await t.getFile()).arrayBuffer()}async stream(){let t=await this.getOriginFile();return null==t?new ReadableStream({pull:t=>{t.close()}}):t.stream()}async getOriginFile(){var t;return null==(t=await eM(eC(this,b),{create:!1,isFile:!0}))?void 0:t.getFile()}async getSize(){let t=await eM(eC(this,b),{create:!1,isFile:!0});return null==t?0:(await t.getFile()).size}async exists(){return await eM(eC(this,b),{create:!1,isFile:!0}) instanceof FileSystemFileHandle}async remove(){if(eC(this,U))throw Error("exists unclosed reader/writer");await eO(eC(this,b))}async copyTo(e){if(!await this.exists())throw Error(`file ${this.path} not exists`);if(e instanceof t)return eV(e.path)===this?this:(await eH(e.path,this),eV(e.path));if(e instanceof eY)return await this.copyTo(eV(eN(e.path,this.name)));throw Error("Illegal target type")}async moveTo(t){let e=await this.copyTo(t);return await this.remove(),e}};b=/* @__PURE__ */new WeakMap,w=/* @__PURE__ */new WeakMap,v=/* @__PURE__ */new WeakMap,S=/* @__PURE__ */new WeakMap,E=/* @__PURE__ */new WeakMap,U=/* @__PURE__ */new WeakMap,x=/* @__PURE__ */new WeakMap,T=/* @__PURE__ */new WeakMap;let e$=eZ,eK="/.opfs-tools-temp-dir";async function eq(t){try{if("file"===t.kind){if(!await t.exists())return!0;let e=await t.createWriter();await e.truncate(0),await e.close(),await t.remove()}else await t.remove();return!0}catch(t){return console.warn(t),!1}}let eQ=[],eJ=!1;async function e0(){if(null==globalThis.localStorage)return;let t="OPFS_TOOLS_EXPIRES_TMP_FILES";eJ||(eJ=!0,globalThis.addEventListener("unload",()=>{0!==eQ.length&&localStorage.setItem(t,`${localStorage.getItem(t)??""},${eQ.join(",")}`)}));let e=localStorage.getItem(t)??"";for(let t of e.split(","))0!==t.length&&await eq(eV(`${eK}/${t}`))&&(e=e.replace(t,""));localStorage.setItem(t,e.replace(/,{2,}/g,","))}function e1(){let t=`${Math.random().toString().slice(2)}-${Date.now()}`;return eQ.push(t),eV(`${eK}/${t}`)}!async function(){var t;!0===globalThis.__opfs_tools_tmpfile_init__||(globalThis.__opfs_tools_tmpfile_init__=!0,null==globalThis.FileSystemDirectoryHandle||null==globalThis.FileSystemFileHandle||(null==(t=globalThis.navigator)?void 0:t.storage.getDirectory)==null||(setInterval(async()=>{for(let t of(await eG(eK).children())){let e=/^\d+-(\d+)$/.exec(t.name);(null==e||Date.now()-Number(e[1])>2592e5)&&await eq(t)}},6e4),await e0()))}();let e2=1,e3=e1(),e6=null,e8=["debug","info","warn","error"].reduce((t,e,r)=>Object.assign(t,{[e]:(...t)=>{e2<=r&&(console[e](...t),null==e6||e6.write(`[${e}][${function(){let t=/* @__PURE__ */new Date;return`${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}.${t.getMilliseconds()}`}()}] ${t.map(t=>t instanceof Error?String(t):"object"==typeof t?JSON.stringify(t,(t,e)=>e instanceof Error?String(e):e):String(t)).join(" ")} `))}}),{}),e4=/* @__PURE__ */new Map,e5={setLogLevel:t=>{e2=e4.get(t)??1},...e8,create:t=>Object.fromEntries(Object.entries(e8).map(([e,r])=>[e,(...e)=>r(t,...e)])),dump:async()=>(await e7,await (null==e6?void 0:e6.flush()),await e3.text())};async function e9(){try{e6=await e3.createWriter(),e5.info(navigator.userAgent),e5.info("date: "+/* @__PURE__ */new Date().toLocaleDateString())}catch(t){if(!(t instanceof Error))throw t;if(t.message.includes("createSyncAccessHandle is not a function"))console.warn(t);else throw t}}e4.set(e5.debug,0),e4.set(e5.info,1),e4.set(e5.warn,2),e4.set(e5.error,3);let e7=null==globalThis.navigator?null:e9(),it=()=>{let t;self.onmessage=e=>{"start"===e.data.event&&(self.clearInterval(t),t=self.setInterval(()=>{self.postMessage({})},16.6)),"stop"===e.data.event&&self.clearInterval(t)}},ie=/* @__PURE__ */new Map,ii=1,ir=null;null!=globalThis.Worker&&((ir=(()=>{let t=new Blob([`(${it.toString()})()`]);return new Worker(URL.createObjectURL(t))})()).onmessage=()=>{for(let[t,e]of(ii+=1,ie))if(ii%t==0)for(let t of e)t()});let is=(t,e)=>{let r=Math.round(e/16.6),s=ie.get(r)??/* @__PURE__ */new Set;return s.add(t),ie.set(r,s),1===ie.size&&1===s.size&&(null==ir||ir.postMessage({event:"start"})),()=>{s.delete(t),0===s.size&&ie.delete(r),0===ie.size&&(ii=0,null==ir||ir.postMessage({event:"stop"}))}};class ia{constructor(t,e,r){var s;this.length_=t,this.scaleFactor_=(t-1)/e,this.interpolate=this.cubic,"point"===r.method?this.interpolate=this.point:"linear"===r.method?this.interpolate=this.linear:"sinc"===r.method&&(this.interpolate=this.sinc),this.tangentFactor_=1-Math.max(0,Math.min(1,r.tension||0)),this.sincFilterSize_=r.sincFilterSize||1,this.kernel_=(s=r.sincWindow||io,function(t){return(0===t?1:Math.sin(Math.PI*t)/(Math.PI*t))*s(t)})}point(t,e){return this.getClippedInput_(Math.round(this.scaleFactor_*t),e)}linear(t,e){let r=Math.floor(t=this.scaleFactor_*t);return(1-(t-=r))*this.getClippedInput_(r,e)+t*this.getClippedInput_(r+1,e)}cubic(t,e){let r=Math.floor(t=this.scaleFactor_*t),s=[this.getTangent_(r,e),this.getTangent_(r+1,e)],n=[this.getClippedInput_(r,e),this.getClippedInput_(r+1,e)],a=(t-=r)*t,o=t*a;return(2*o-3*a+1)*n[0]+(o-2*a+t)*s[0]+(-2*o+3*a)*n[1]+(o-a)*s[1]}sinc(t,e){let r=Math.floor(t=this.scaleFactor_*t),s=r-this.sincFilterSize_+1,n=r+this.sincFilterSize_,a=0;for(let r=s;r<=n;r++)a+=this.kernel_(t-r)*this.getClippedInput_(r,e);return a}getTangent_(t,e){return this.tangentFactor_*(this.getClippedInput_(t+1,e)-this.getClippedInput_(t-1,e))/2}getClippedInput_(t,e){return 0<=t&&tt.length).reduce((t,e)=>t+e)),r=0;for(let s of t)e.set(s,r),r+=s.length;return e}function ic(t){let e=[];for(let r=0;rnew Float32Array(r));for(let n=0;nt.getChannelData(r))}function iy(t,e){let r=new Float32Array(ip(im(t))).map(t=>t*e),s=new AudioData({sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels,timestamp:t.timestamp,format:t.format,numberOfFrames:t.numberOfFrames,data:r});return t.close(),s}async function i_(t,e){var r;let s=new ImageDecoder({type:e,data:t});await Promise.all([s.completed,s.tracks.ready]);let n=(null==(r=s.tracks.selectedTrack)?void 0:r.frameCount)??1,a=[];for(let t=0;t{var e;return(null==(e=t[0])?void 0:e.length)??0})),n=new Float32Array(2*s);for(let a=0;anew Float32Array(0));if(0===s)return n;let a=Math.max(...t.map(t=>t.length));if(0===a)return n;if(null==globalThis.OfflineAudioContext)return t.map(t=>new Float32Array(function(t,e,r,s={}){let n=(r-e)/e+1,a=new Float64Array(t.length*n);s.method=s.method||"cubic";let o=new ia(t.length,a.length,{method:s.method,tension:s.tension||0,sincFilterSize:s.sincFilterSize||6,sincWindow:s.sincWindow||void 0});if(void 0===s.LPF&&(s.LPF=ih[s.method]),s.LPF){s.LPFType=s.LPFType||"IIR";let n=iu[s.LPFType];r>e?function(t,e,r,s){for(let n=0,a=e.length;n=0;t--)e[t]=s.filter(e[t])}(t,a,o,new n(s.LPFOrder||il[s.LPFType],r,e/2)):function(t,e,r,s){for(let e=0,r=t.length;e=0;e--)t[e]=s.filter(t[e]);id(t,e,r)}(t,a,o,new n(s.LPFOrder||il[s.LPFType],e,r/2))}else id(t,a,o);return a}(t,e,r.rate,{method:"sinc",LPF:!1})));let o=new globalThis.OfflineAudioContext(r.chanCount,a*r.rate/e,r.rate),h=o.createBufferSource(),l=o.createBuffer(s,a,e);return t.forEach((t,e)=>l.copyToChannel(t,e)),h.buffer=l,h.connect(o.destination),h.start(),ig(await o.startRendering())}function iv(t){return new Promise(e=>{let r=is(()=>{r(),e()},t)})}function iS(t,e,r){let s=r-e,n=new Float32Array(s),a=0;for(;a{r=!0}}var iU="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof ef?ef:"u">typeof self?self:{};function ix(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var iT={};(s=/* @__PURE__ */new Date,n=4,a={setLogLevel:function(t){t==this.debug?n=1:t==this.info?n=2:t==this.warn?n=3:(this.error,n=4)},debug:function(t,e){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},log:function(t,e){this.debug(t.msg)},info:function(t,e){2>=n&&console.info("["+a.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},warn:function(t,e){3>=n&&console.warn("["+a.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},error:function(t,e){4>=n&&console.error("["+a.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)}}).getDurationString=function(t,e){function r(t,e){for(var r=(""+t).split(".");r[0].length0))return"(empty)";for(var r="",s=0;s0&&(r+=","),r+="["+a.getDurationString(t.start(s))+","+a.getDurationString(t.end(s))+"]";return r},iT.Log=a,(o=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0}).prototype.getPosition=function(){return this.position},o.prototype.getEndPosition=function(){return this.buffer.byteLength},o.prototype.getLength=function(){return this.buffer.byteLength},o.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},o.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},o.prototype.readAnyInt=function(t,e){var r=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:r=e?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=e?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16|this.dataview.getUint8(this.position+1)<<8|this.dataview.getUint8(this.position+2);break;case 4:r=e?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32|this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,r}throw"Not enough bytes in buffer"},o.prototype.readUint8=function(){return this.readAnyInt(1,!1)},o.prototype.readUint16=function(){return this.readAnyInt(2,!1)},o.prototype.readUint24=function(){return this.readAnyInt(3,!1)},o.prototype.readUint32=function(){return this.readAnyInt(4,!1)},o.prototype.readUint64=function(){return this.readAnyInt(8,!1)},o.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",r=0;rthis._byteLength&&(this._byteLength=e);return}for(r<1&&(r=1);e>r;)r*=2;var s=new ArrayBuffer(r),n=new Uint8Array(this._buffer);new Uint8Array(s,0,n.length).set(n),this.buffer=s,this._byteLength=e}},h.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},h.BIG_ENDIAN=!1,h.LITTLE_ENDIAN=!0,h.prototype._byteLength=0,Object.defineProperty(h.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(h.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(h.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(h.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),h.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},h.prototype.isEof=function(){return this.position>=this._byteLength},h.prototype.mapUint8Array=function(t){this._realloc(1*t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},h.prototype.readInt32Array=function(t,e){var r=new Int32Array(t=t??this.byteLength-this.position/4);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readInt16Array=function(t,e){var r=new Int16Array(t=t??this.byteLength-this.position/2);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readInt8Array=function(t){var e=new Int8Array(t=t??this.byteLength-this.position);return h.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},h.prototype.readUint32Array=function(t,e){var r=new Uint32Array(t=t??this.byteLength-this.position/4);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readUint16Array=function(t,e){var r=new Uint16Array(t=t??this.byteLength-this.position/2);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readUint8Array=function(t){var e=new Uint8Array(t=t??this.byteLength-this.position);return h.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},h.prototype.readFloat64Array=function(t,e){var r=new Float64Array(t=t??this.byteLength-this.position/8);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readFloat32Array=function(t,e){var r=new Float32Array(t=t??this.byteLength-this.position/4);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,e??this.endianness),this.position+=r.byteLength,r},h.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,t??this.endianness);return this.position+=4,e},h.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,t??this.endianness);return this.position+=2,e},h.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},h.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,t??this.endianness);return this.position+=4,e},h.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,t??this.endianness);return this.position+=2,e},h.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},h.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,t??this.endianness);return this.position+=4,e},h.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,t??this.endianness);return this.position+=8,e},h.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,h.memcpy=function(t,e,r,s,n){var a=new Uint8Array(t,e,n),o=new Uint8Array(r,s,n);a.set(o)},h.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},h.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},h.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;rn;s--,n++){var a=e[n];e[n]=e[s],e[s]=a}return t},h.prototype.failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=[],r=0;r>16),this.writeUint8((65280&t)>>8),this.writeUint8(255&t)},h.prototype.adjustUint32=function(t,e){var r=this.position;this.seek(t),this.writeUint32(e),this.seek(r)},h.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=4*t,r},h.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=2*t,r},h.prototype.mapInt8Array=function(t){this._realloc(1*t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},h.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=4*t,r},h.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=2*t,r},h.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=8*t,r},h.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,e??this.endianness),this.position+=4*t,r},(l=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)}).prototype=new h(new ArrayBuffer,0,h.BIG_ENDIAN),l.prototype.initialized=function(){var t;return this.bufferIndex>-1||(this.buffers.length>0?0===(t=this.buffers[0]).fileStart?(this.buffer=t,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(t,e){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r.buffer},l.prototype.reduceBuffer=function(t,e,r){var s;return(s=new Uint8Array(r)).set(new Uint8Array(t,e,r)),s.buffer.fileStart=t.fileStart+e,s.buffer.usedBytes=0,s.buffer},l.prototype.insertBuffer=function(t){for(var e=!0,r=0;rs.byteLength){this.buffers.splice(r,1),r--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring")}else t.fileStart+t.byteLength<=s.fileStart||(t=this.reduceBuffer(t,0,s.fileStart-t.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(r,0,t),0===r&&(this.buffer=t);e=!1;break}if(t.fileStart0)t=this.reduceBuffer(t,n,o);else{e=!1;break}}}e&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),0===r&&(this.buffer=t))},l.prototype.logBufferLevel=function(t){var e,r,s,n,o,h=[],l="";for(s=0,n=0,e=0;e0&&(l+=o.end-1+"]"),(t?a.info:a.debug)("MultiBufferStream",0===this.buffers.length?"No more buffer in memory":""+this.buffers.length+" stored buffer(s) ("+s+"/"+n+" bytes), continuous ranges: "+l)},l.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0},l.prototype.findPosition=function(t,e,r){var s,n=null,o=-1;for(s=!0===t?0:this.bufferIndex;s=e?(a.debug("MultiBufferStream","Found position in existing buffer #"+o),o):-1},l.prototype.findEndContiguousBuf=function(t){var e,r,s,n=void 0!==t?t:this.bufferIndex;if(r=this.buffers[n],this.buffers.length>n+1)for(e=n+1;e>3;return 31===s&&r.data.length>=2&&(s=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),s},r.DecoderConfigDescriptor=function(t){r.Descriptor.call(this,4,t)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)},r.DecoderSpecificInfo=function(t){r.Descriptor.call(this,5,t)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(t){r.Descriptor.call(this,6,t)},r.SLConfigDescriptor.prototype=new r.Descriptor,this},iT.MPEG4DescriptorParser=u,(d={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){d.FullBox.prototype=new d.Box,d.ContainerBox.prototype=new d.Box,d.SampleEntry.prototype=new d.Box,d.TrackGroupTypeBox.prototype=new d.FullBox,d.BASIC_BOXES.forEach(function(t){d.createBoxCtor(t)}),d.FULL_BOXES.forEach(function(t){d.createFullBoxCtor(t)}),d.CONTAINER_BOXES.forEach(function(t){d.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,r){this.type=t,this.size=e,this.uuid=r},FullBox:function(t,e,r){d.Box.call(this,t,e,r),this.flags=0,this.version=0},ContainerBox:function(t,e,r){d.Box.call(this,t,e,r),this.boxes=[]},SampleEntry:function(t,e,r,s){d.ContainerBox.call(this,t,e),this.hdr_size=r,this.start=s},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){d.FullBox.call(this,t,e)},createBoxCtor:function(t,e){d.boxCodes.push(t),d[t+"Box"]=function(e){d.Box.call(this,t,e)},d[t+"Box"].prototype=new d.Box,e&&(d[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){d[t+"Box"]=function(e){d.FullBox.call(this,t,e)},d[t+"Box"].prototype=new d.FullBox,d[t+"Box"].prototype.parse=function(t){this.parseFullHeader(t),e&&e.call(this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,r=0;rr?(a.error("BoxParser","Box of type '"+f+"' has a size "+u+" greater than its container size "+r),{code:d.ERR_NOT_ENOUGH_DATA,type:f,size:u,hdr_size:l,start:h}):0!==u&&h+u>t.getEndPosition()?(t.seek(h),a.info("BoxParser","Not enough data in stream to parse the entire '"+f+"' box"),{code:d.ERR_NOT_ENOUGH_DATA,type:f,size:u,hdr_size:l,start:h}):e?{code:d.OK,type:f,size:u,hdr_size:l,start:h}:(d[f+"Box"]?s=new d[f+"Box"](u):"uuid"!==f?(a.warn("BoxParser","Unknown box type: '"+f+"'"),(s=new d.Box(f,u)).has_unparsed_data=!0):d.UUIDBoxes[o]?s=new d.UUIDBoxes[o](u):(a.warn("BoxParser","Unknown uuid type: '"+o+"'"),(s=new d.Box(f,u)).uuid=o,s.has_unparsed_data=!0),s.hdr_size=l,s.start=h,s.write===d.Box.prototype.write&&"mdat"!==s.type&&(a.info("BoxParser","'"+p+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(t)),s.parse(t),(n=t.getPosition()-(s.start+s.size))<0?(a.warn("BoxParser","Parsing of box '"+p+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),t.seek(s.start+s.size)):n>0&&(a.error("BoxParser","Parsing of box '"+p+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),0!==s.size&&t.seek(s.start+s.size)),{code:d.OK,box:s,size:s.size})},d.Box.prototype.parse=function(t){"mdat"!=this.type?this.data=t.readUint8Array(this.size-this.hdr_size):0===this.size?t.seek(t.getEndPosition()):t.seek(this.start+this.size)},d.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size},d.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size},d.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4},d.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},d.ContainerBox.prototype.parse=function(t){for(var e,r;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},d.SAMPLE_ENTRY_TYPE_VISUAL="Visual",d.SAMPLE_ENTRY_TYPE_AUDIO="Audio",d.SAMPLE_ENTRY_TYPE_HINT="Hint",d.SAMPLE_ENTRY_TYPE_METADATA="Metadata",d.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",d.SAMPLE_ENTRY_TYPE_SYSTEM="System",d.SAMPLE_ENTRY_TYPE_TEXT="Text",d.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8},d.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},d.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size},d.SampleEntry.prototype.parseFooter=function(t){d.ContainerBox.prototype.parse.call(this,t)},d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_HINT),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_METADATA),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SUBTITLE),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SYSTEM),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,this.parseFooter(t)}),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT,"enct"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_METADATA,"encm"),d.createBoxCtor("a1lx",function(t){var e=((1&(1&t.readUint8()))+1)*16;this.layer_size=[];for(var r=0;r<3;r++)16==e?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()}),d.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()}),d.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}),d.createBoxCtor("av1C",function(t){var e=t.readUint8();if(this.version=127&e,1!==this.version){a.error("av1C version "+this.version+" not supported");return}if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=31&e,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=3&e,e=t.readUint8(),this.reserved_1=e>>5&7,0!==this.reserved_1){a.error("av1C reserved_1 parsing problem");return}if(this.initial_presentation_delay_present=e>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&e;else if(this.reserved_2=15&e,0!==this.reserved_2){a.error("av1C reserved_2 parsing problem");return}var r=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(r)}),d.createBoxCtor("avcC",function(t){var e,r;for(this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=3&t.readUint8(),this.nb_SPS_nalus=31&t.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],e=0;e0&&(this.ext=t.readUint8Array(r))}),d.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}),d.createFullBoxCtor("ccst",function(t){var e=t.readUint8();this.all_ref_pics_intra=(128&e)==128,this.intra_pred_used=(64&e)==64,this.max_ref_per_pic=(63&e)>>2,t.readUint24()}),d.createBoxCtor("cdef",function(t){var e;for(this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],e=0;e=32768&&this.component_type_urls.push(t.readCString())}}),d.createFullBoxCtor("co64",function(t){var e,r;if(e=t.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else"rICC"===this.colour_type?this.ICC_profile=t.readUint8Array(this.size-4):"prof"===this.colour_type&&(this.ICC_profile=t.readUint8Array(this.size-4))}),d.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()}),d.createFullBoxCtor("cslg",function(t){0===this.version&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())}),d.createFullBoxCtor("ctts",function(t){var e,r;if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=e>>1&31,this.bsmod=(1&e)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|s>>5&7}),d.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=7&e,this.ind_subs=[];for(var r=0;r>6,s.bsid=n>>1&31,s.bsmod=(1&n)<<4|a>>4&15,s.acmod=a>>1&7,s.lfeon=1&a,s.num_dep_sub=o>>1&15,s.num_dep_sub>0&&(s.chan_loc=(1&o)<<8|t.readUint8())}}),d.createFullBoxCtor("dfLa",function(t){var e=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(t);;){var s=t.readUint8(),n=Math.min(127&s,r.length-1);if(n?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),e.push(r[n]),128&s)break}this.numMetadataBlocks=e.length+" ("+e.join(", ")+")"}),d.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()}),d.createBoxCtor("dmax",function(t){this.time=t.readUint32()}),d.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()}),d.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;etypeof u){var r=new u;this.esd=r.parseOneDescriptor(new h(e.buffer,0,h.BIG_ENDIAN))}}),d.createBoxCtor("fiel",function(t){this.fieldCount=t.readUint8(),this.fieldOrdering=t.readUint8()}),d.createBoxCtor("frma",function(t){this.data_format=t.readString(4)}),d.createBoxCtor("ftyp",function(t){var e=this.size-this.hdr_size;this.major_brand=t.readString(4),this.minor_version=t.readUint32(),e-=8,this.compatible_brands=[];for(var r=0;e>=4;)this.compatible_brands[r]=t.readString(4),e-=4,r++}),d.createFullBoxCtor("hdlr",function(t){0===this.version&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))}),d.createBoxCtor("hvcC",function(t){this.configurationVersion=t.readUint8(),n=t.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),this.chroma_format_idc=3&t.readUint8(),this.bit_depth_luma_minus8=7&t.readUint8(),this.bit_depth_chroma_minus8=7&t.readUint8(),this.avgFrameRate=t.readUint16(),n=t.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var e,r,s,n,a=t.readUint8();for(e=0;e>7,o.nalu_type=63&n;var h=t.readUint16();for(r=0;r>4&15,this.length_size=15&e,e=t.readUint8(),this.base_offset_size=e>>4&15,1===this.version||2===this.version?this.index_size=15&e:this.index_size=0,this.items=[];var e,r=0;if(this.version<2)r=t.readUint16();else if(2===this.version)r=t.readUint32();else throw"version of iloc box not supported";for(var s=0;s>7,this.axis=1&e}),d.createFullBoxCtor("infe",function(t){if((0===this.version||1===this.version)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),1===this.version){this.extension_type=t.readString(4),a.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(2===this.version?this.item_ID=t.readUint16():3===this.version&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),"mime"===this.item_type?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):"uri "===this.item_type&&(this.item_uri_type=t.readCString()))}),d.createFullBoxCtor("ipma",function(t){var e,r;for(entry_count=t.readUint32(),this.associations=[],e=0;e>7==1,1&this.flags?o.property_index=(127&a)<<8|t.readUint8():o.property_index=127&a}}}),d.createFullBoxCtor("iref",function(t){var e,r;for(this.references=[];t.getPosition()>7,s.assignment_type=127&n,s.assignment_type){case 0:s.grouping_type=t.readString(4);break;case 1:s.grouping_type=t.readString(4),s.grouping_type_parameter=t.readUint32();break;case 2:case 3:break;case 4:s.sub_track_id=t.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}}),d.createBoxCtor("lsel",function(t){this.layer_id=t.readUint16()}),d.createBoxCtor("maxr",function(t){this.period=t.readUint32(),this.bytes=t.readUint32()}),d.createBoxCtor("mdcv",function(t){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=t.readUint16(),this.display_primaries[0].y=t.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=t.readUint16(),this.display_primaries[1].y=t.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=t.readUint16(),this.display_primaries[2].y=t.readUint16(),this.white_point={},this.white_point.x=t.readUint16(),this.white_point.y=t.readUint16(),this.max_display_mastering_luminance=t.readUint32(),this.min_display_mastering_luminance=t.readUint32()}),d.createFullBoxCtor("mdhd",function(t){1==this.version?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.parseLanguage(t),t.readUint16()}),d.createFullBoxCtor("mehd",function(t){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=t.readUint64():this.fragment_duration=t.readUint32()}),d.createFullBoxCtor("meta",function(t){this.boxes=[],d.ContainerBox.prototype.parse.call(this,t)}),d.createFullBoxCtor("mfhd",function(t){this.sequence_number=t.readUint32()}),d.createFullBoxCtor("mfro",function(t){this._size=t.readUint32()}),d.createFullBoxCtor("mvhd",function(t){1==this.version?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.rate=t.readUint32(),this.volume=t.readUint16()>>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}),d.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()}),d.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()}),d.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var r=0;r0){var e=t.readUint32();this.kid=[];for(var r=0;r0&&(this.data=t.readUint8Array(s))}),d.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),d.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}),d.createFullBoxCtor("saio",function(t){1&this.flags&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var r=t.readUint8(),s=0;s>7,this.num_leading_samples=127&e}),d.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=15&e,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=d.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}),d.createSampleGroupCtor("stsa",function(t){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=63&e}),d.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7}),d.createSampleGroupCtor("tsas",function(t){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("tscl",function(t){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("vipr",function(t){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),1===this.version?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),r=0;r>6,this.sample_depends_on[s]=e>>4&3,this.sample_is_depended_on[s]=e>>2&3,this.sample_has_redundancy[s]=3&e}),d.createFullBoxCtor("senc"),d.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e,r=t.readUint32(),s=0;s>31&1,s.referenced_size=2147483647&n,s.subsegment_duration=t.readUint32(),n=t.readUint32(),s.starts_with_SAP=n>>31&1,s.SAP_type=n>>28&7,s.SAP_delta_time=268435455&n}}),d.SingleItemTypeReferenceBox=function(t,e,r,s){d.Box.call(this,t,e),this.hdr_size=r,this.start=s},d.SingleItemTypeReferenceBox.prototype=new d.Box,d.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[e+1]=15&s}else if(8===this.field_size)for(e=0;e0)for(r=0;r>4&15,this.default_skip_byte_block=15&e}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=d.parseHex16(t),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}),d.createFullBoxCtor("tfdt",function(t){1==this.version?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}),d.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}),d.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=3&e,this.entries=[];for(var r=t.readUint32(),s=0;s>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}),d.createBoxCtor("tmax",function(t){this.time=t.readUint32()}),d.createBoxCtor("tmin",function(t){this.time=t.readUint32()}),d.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()}),d.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()}),d.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()}),d.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()},d.createTrackGroupCtor("msrc"),d.TrackReferenceTypeBox=function(t,e,r,s){d.Box.call(this,t,e),this.hdr_size=r,this.start=s},d.TrackReferenceTypeBox.prototype=new d.Box,d.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)},d.trefBox.prototype.parse=function(t){for(var e,r;t.getPosition()e&&this.flags&d.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&d.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=t.readUint8(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}),d.createFullBoxCtor("url ",function(t){1!==this.flags&&(this.location=t.readCString())}),d.createFullBoxCtor("urn ",function(t){this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}),d.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),d.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=d.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}),d.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),d.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=d.parseHex16(t)}),d.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=1&e,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8()):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=1&e),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}),d.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)}),d.createFullBoxCtor("vvcC",function(t){var e,r,s={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){this.held_bits=t.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(t){this.held_bits=t.readUint16(),this.num_held_bits=16},extract_bits:function(t){var e=this.held_bits>>this.num_held_bits-t&(1<1){for(s.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=s.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)s.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<"u"||null===e?e=2:e;r.length>=1;e+=d.decimalToHex(s,0)+".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var n=!1,a="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||n)&&(a="."+d.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+a,n=!0);e+=a}return e},d.vvc1SampleEntry.prototype.getCodec=d.vvi1SampleEntry.prototype.getCodec=function(){var t,e=d.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){e+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?e+=".H":e+=".L",e+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var s,n,a=[];for(n=0|this.vvcC.ptl_frame_only_constraint<<7|this.vvcC.ptl_multilayer_enabled<<6,t=0;t>2&63,a.push(n),n&&(s=t),n=this.vvcC.general_constraint_info[t]>>2&3;if(void 0===s)r=".CA";else{r=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",h=0,l=0;for(t=0;t<=s;++t)for(h=h<<8|a[t],l+=8;l>=5;)r+=o[h>>l-5&31],l-=5,h&=(1<4294967296&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>4294967296?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),"uuid"===this.type&&t.writeUint8Array(this.uuid),this.size>4294967296&&t.writeUint64(this.size)},d.FullBox.prototype.writeHeader=function(t){this.size+=4,d.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)},d.Box.prototype.write=function(t){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))},d.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+14294967295?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(t),1===this.version?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)},d.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&d.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&d.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&d.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&d.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&d.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)},d.tkhdBox.prototype.write=function(t){this.version=0,this.size=80,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)},d.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)},d.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&d.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&d.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&d.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&d.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&d.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&d.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&d.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&d.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)){if(t[r]instanceof d.Box||e[r]instanceof d.Box||typeof t[r]>"u"||typeof e[r]>"u"||"function"==typeof t[r]||"function"==typeof e[r]||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||d.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;if(t[r]!==e[r])return!1}return!0},d.boxEqual=function(t,e){if(!d.boxEqualFields(t,e))return!1;for(var r=0;r1)for(e=1;etypeof DOMParser&&(r.document=new DOMParser().parseFromString(r.documentString,"application/xml")),r},(p=function(){}).prototype.parseSample=function(t){return new o(t.data.buffer).readString(t.data.length)},p.prototype.parseConfig=function(t){var e=new o(t.buffer);return e.readUint32(),e.readCString()},iT.XMLSubtitlein4Parser=f,iT.Textin4Parser=p,(c=function(t){this.stream=t||new l,this.boxes=[],this.mdats=[],this.moofs=[],this.isProgressive=!1,this.moovStartFound=!1,this.onMoovStart=null,this.moovStartSent=!1,this.onReady=null,this.readySent=!1,this.onSegment=null,this.onSamples=null,this.onError=null,this.sampleListBuilt=!1,this.fragmentedTracks=[],this.extractedTracks=[],this.isFragmentationInitialized=!1,this.sampleProcessingStarted=!1,this.nextMoofNumber=0,this.itemListBuilt=!1,this.onSidx=null,this.sidxSent=!1}).prototype.setSegmentOptions=function(t,e,r){var s=this.getTrackById(t);if(s){var n={};this.fragmentedTracks.push(n),n.id=t,n.user=e,n.trak=s,s.nextSample=0,n.segmentStream=null,n.nb_samples=1e3,n.rapAlignement=!0,r&&(r.nbSamples&&(n.nb_samples=r.nbSamples),r.rapAlignement&&(n.rapAlignement=r.rapAlignement))}},c.prototype.unsetSegmentOptions=function(t){for(var e=-1,r=0;r-1&&this.fragmentedTracks.splice(e,1)},c.prototype.setExtractionOptions=function(t,e,r){var s=this.getTrackById(t);if(s){var n={};this.extractedTracks.push(n),n.id=t,n.user=e,n.trak=s,s.nextSample=0,n.nb_samples=1e3,n.samples=[],r&&r.nbSamples&&(n.nb_samples=r.nbSamples)}},c.prototype.unsetExtractionOptions=function(t){for(var e=-1,r=0;r-1&&this.extractedTracks.splice(e,1)},c.prototype.parse=function(){var t,e,r;if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else if(this.saveParsePosition&&this.saveParsePosition(),(e=d.parseOneBox(this.stream,!1)).code===d.ERR_NOT_ENOUGH_DATA){if(!this.processIncompleteBox)return;if(this.processIncompleteBox(e))continue;return}else{switch(t="uuid"!==(r=e.box).type?r.type:r.uuid,this.boxes.push(r),t){case"mdat":this.mdats.push(r);break;case"moof":this.moofs.push(r);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[t]&&a.warn("ISOFile","Duplicate Box of type: "+t+", overriding previous occurrence"),this[t]=r}this.updateUsedBytes&&this.updateUsedBytes(r,e)}},c.prototype.checkBuffer=function(t){if(null==t)throw"Buffer must be defined and non empty";if(void 0===t.fileStart)throw"Buffer must have a fileStart property";return 0===t.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},c.prototype.appendBuffer=function(t,e){var r;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},c.prototype.getInfo=function(){var t,e,r,s,n,a,o={},h=/* @__PURE__ */new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(h+1e3*this.moov.mvhd.creation_time),o.modified=new Date(h+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],t=0;t0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',t=0;t=r.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,r.nextSample-s.nb_samples)+","+(r.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,r.nextSample,t||r.nextSample>=r.samples.length),s.segmentStream=null,s!==this.fragmentedTracks[e]))break}}if(null!==this.onSamples)for(e=0;e=r.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+o.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(o.id,o.user,o.samples),o.samples=[],o!==this.extractedTracks[e]))break}}}},c.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null},c.prototype.getBoxes=function(t,e){var r=[];return c._sweep.call(this,t,r,e),r},c._sweep=function(t,e,r){for(var s in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&r)return;c._sweep.call(this.boxes[s],t,e,r)}},c.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);if(e)return e.samples},c.prototype.getTrackSample=function(t,e){var r=this.getTrackById(t);return this.getSample(r,e)},c.prototype.releaseUsedSamples=function(t,e){var r=0,s=this.getTrackById(t);s.lastValidSample||(s.lastValidSample=0);for(var n=s.lastValidSample;nt*n.timescale){u=s-1;break}e&&n.is_sync&&(l=s)}for(e&&(u=l),t=r.samples[u].cts,r.nextSample=u;r.samples[u].alreadyRead===r.samples[u].size&&r.samples[u+1];)u++;return h=r.samples[u].offset+r.samples[u].alreadyRead,a.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+a.getDurationString(t,o)+" and offset: "+h),{offset:h,time:t/o}},c.prototype.getTrackDuration=function(t){var e;return t.samples?((e=t.samples[t.samples.length-1]).cts+e.duration)/e.timescale:1/0},c.prototype.seek=function(t,e){var r,s,n,o=this.moov,h={offset:1/0,time:1/0};if(this.moov){for(n=0;nthis.getTrackDuration(r))&&((s=this.seekTrack(t,e,r)).offset-1){h=l;break}switch(h){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",e.width).set("height",e.height).set("horizresolution",4718592).set("vertresolution",4718592).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var p=new d.avcCBox;p.parse(new o(e.avcDecoderConfigRecord)),a.addBox(p)}else if(e.hevcDecoderConfigRecord){var c=new d.hvcCBox;c.parse(new o(e.hevcDecoderConfigRecord)),a.addBox(c)}break;case"Audio":n.add("smhd").set("balance",e.balance||0),a.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":n.add("sthd"),"stpp"===e.type&&a.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break;default:n.add("nmhd")}e.description&&a.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(t){a.addBox(t)}),n.add("dinf").add("dref").addEntry(new d["url Box"]().set("flags",1));var m=n.add("stbl");return m.add("stsd").addEntry(a),m.add("stts").set("sample_counts",[]).set("sample_deltas",[]),m.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),m.add("stco").set("chunk_offsets",[]),m.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(r),e.id}},d.Box.prototype.computeSize=function(t){var e=t||new h;e.endianness=h.BIG_ENDIAN,this.write(e)},c.prototype.addSample=function(t,e,r){var s=r||{},n={},a=this.getTrackById(t);if(null!==a){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=s.sample_description_index?s.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=e,n.size=e.byteLength,n.alreadyRead=n.size,n.duration=s.duration||1,n.cts=s.cts||0,n.dts=s.dts||0,n.is_sync=s.is_sync||!1,n.is_leading=s.is_leading||0,n.depends_on=s.depends_on||0,n.is_depended_on=s.is_depended_on||0,n.has_redundancy=s.has_redundancy||0,n.degradation_priority=s.degradation_priority||0,n.offset=0,n.subsamples=s.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,void 0===a.first_dts&&(a.first_dts=s.dts),this.processSamples();var o=this.createSingleSampleMoof(n);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),n}},c.prototype.createSingleSampleMoof=function(t){var e=0;e=t.is_sync?33554432:65536;var r=new d.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var s=r.add("traf"),n=this.getTrackById(t.track_id);return s.add("tfhd").set("track_id",t.track_id).set("flags",d.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),s.add("tfdt").set("baseMediaDecodeTime",t.dts-(n.first_dts||0)),s.add("trun").set("flags",d.TRUN_FLAGS_DATA_OFFSET|d.TRUN_FLAGS_DURATION|d.TRUN_FLAGS_SIZE|d.TRUN_FLAGS_FLAGS|d.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),r},c.prototype.lastMoofIndex=0,c.prototype.samplesDataSize=0,c.prototype.resetTables=function(){var t,e,r,s,n,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,t=0;t=2&&(l=n[o].grouping_type+"/0",(h=new u(n[o].grouping_type,0)).is_fragment=!0,e.sample_groups_info[l]||(e.sample_groups_info[l]=h))}else for(o=0;o=2&&(l=s[o].grouping_type+"/0",h=new u(s[o].grouping_type,0),t.sample_groups_info[l]||(t.sample_groups_info[l]=h))},c.setSampleGroupProperties=function(t,e,r,s){var n,a,o;for(n in e.sample_groups=[],s)e.sample_groups[n]={},e.sample_groups[n].grouping_type=s[n].grouping_type,e.sample_groups[n].grouping_type_parameter=s[n].grouping_type_parameter,r>=s[n].last_sample_in_run&&(s[n].last_sample_in_run<0&&(s[n].last_sample_in_run=0),s[n].entry_index++,s[n].entry_index<=s[n].sbgp.entries.length-1&&(s[n].last_sample_in_run+=s[n].sbgp.entries[s[n].entry_index].sample_count)),s[n].entry_index<=s[n].sbgp.entries.length-1?e.sample_groups[n].group_description_index=s[n].sbgp.entries[s[n].entry_index].group_description_index:e.sample_groups[n].group_description_index=-1,0!==e.sample_groups[n].group_description_index&&(o=s[n].fragment_description?s[n].fragment_description:s[n].description,e.sample_groups[n].group_description_index>0?(a=e.sample_groups[n].group_description_index>65535?(e.sample_groups[n].group_description_index>>16)-1:e.sample_groups[n].group_description_index-1,o&&a>=0&&(e.sample_groups[n].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[n].description=o.entries[o.default_group_description_index-1]))},c.process_sdtp=function(t,e,r){e&&(t?(e.is_leading=t.is_leading[r],e.depends_on=t.sample_depends_on[r],e.is_depended_on=t.sample_is_depended_on[r],e.has_redundancy=t.sample_has_redundancy[r]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},c.prototype.buildSampleLists=function(){var t,e;for(t=0;t"u")){for(e=0;ew&&(v++,w<0&&(w=0),w+=a.sample_counts[v]),e>0?(t.samples[e-1].duration=a.sample_deltas[v],t.samples_duration+=t.samples[e-1].duration,A.dts=t.samples[e-1].dts+t.samples[e-1].duration):A.dts=0,o?(e>=S&&(E++,S<0&&(S=0),S+=o.sample_counts[E]),A.cts=t.samples[e].dts+o.sample_offsets[E]):A.cts=A.dts,h?(e==h.sample_numbers[U]-1?(A.is_sync=!0,U++):(A.is_sync=!1,A.degradation_priority=0),u&&u.entries[x].sample_delta+T==e+1&&(A.subsamples=u.entries[x].subsamples,T+=u.entries[x].sample_delta,x++)):A.is_sync=!0,c.process_sdtp(t.mdia.minf.stbl.sdtp,A,A.number),p?A.degradation_priority=p.priority[e]:A.degradation_priority=0,u&&u.entries[x].sample_delta+T==e&&(A.subsamples=u.entries[x].subsamples,T+=u.entries[x].sample_delta),(d.length>0||f.length>0)&&c.setSampleGroupProperties(t,A,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},c.prototype.updateSampleLists=function(){var t,e,r,s,n,a,o,h,l,u,f,p,m,g;if(void 0!==this.moov){for(;this.lastMoofIndex0&&c.initSampleGroups(f,u,u.sbgps,f.mdia.minf.stbl.sgpds,u.sgpds),e=0;e0?m.dts=f.samples[f.samples.length-2].dts+f.samples[f.samples.length-2].duration:(u.tfdt?m.dts=u.tfdt.baseMediaDecodeTime:m.dts=0,f.first_traf_merged=!0),m.cts=m.dts,y.flags&d.TRUN_FLAGS_CTS_OFFSET&&(m.cts=m.dts+y.sample_composition_time_offset[r]),g=o,y.flags&d.TRUN_FLAGS_FLAGS?g=y.sample_flags[r]:0===r&&y.flags&d.TRUN_FLAGS_FIRST_FLAG&&(g=y.first_sample_flags),m.is_sync=!(g>>16&1),m.is_leading=g>>26&3,m.depends_on=g>>24&3,m.is_depended_on=g>>22&3,m.has_redundancy=g>>20&3,m.degradation_priority=65535&g;var _=!!(u.tfhd.flags&d.TFHD_FLAG_BASE_DATA_OFFSET),b=!!(u.tfhd.flags&d.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),w=!!(y.flags&d.TRUN_FLAGS_DATA_OFFSET),v=0;v=_?u.tfhd.base_data_offset:b||0===e?l.start:h,0===e&&0===r?w?m.offset=v+y.data_offset:m.offset=v:m.offset=h,h=m.offset+m.size,(u.sbgps.length>0||u.sgpds.length>0||f.mdia.minf.stbl.sbgps.length>0||f.mdia.minf.stbl.sgpds.length>0)&&c.setSampleGroupProperties(f,m,m.number_in_traf,u.sample_groups_info)}}if(u.subs){f.has_fragment_subsamples=!0;var S=u.first_sample_index;for(e=0;e-1))return null;var o=(r=this.stream.buffers[n]).byteLength-(s.offset+s.alreadyRead-r.fileStart);if(s.size-s.alreadyRead<=o)return a.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-r.fileStart)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),h.memcpy(s.data.buffer,s.alreadyRead,r,s.offset+s.alreadyRead-r.fileStart,s.size-s.alreadyRead),r.usedBytes+=s.size-s.alreadyRead,this.stream.logBufferLevel(),s.alreadyRead=s.size,s;if(0===o)return null;a.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-r.fileStart)+" read size: "+o+" full size: "+s.size+")"),h.memcpy(s.data.buffer,s.alreadyRead,r,s.offset+s.alreadyRead-r.fileStart,o),s.alreadyRead+=o,r.usedBytes+=o,this.stream.logBufferLevel()}},c.prototype.releaseSample=function(t,e){var r=t.samples[e];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},c.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},c.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},c.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=n.ipro.protections[n.iinf.item_infos[t].protection_index-1]),n.iinf.item_infos[t].item_type?r.type=n.iinf.item_infos[t].item_type:r.type="mime",r.content_type=n.iinf.item_infos[t].content_type,r.content_encoding=n.iinf.item_infos[t].content_encoding;if(n.iloc)for(t=0;t0&&f.property_index-1-1))return null;var l=(e=this.stream.buffers[o]).byteLength-(n.offset+n.alreadyRead-e.fileStart);if(!(n.length-n.alreadyRead<=l))return a.debug("ISOFile","Getting item #"+t+" extent #"+s+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+r.size+")"),h.memcpy(r.data.buffer,r.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,l),n.alreadyRead+=l,r.alreadyRead+=l,e.usedBytes+=l,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+t+" extent #"+s+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+r.size+")"),h.memcpy(r.data.buffer,r.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,n.length-n.alreadyRead),e.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return r.alreadyRead===r.size?r:null},c.prototype.releaseItem=function(t){var e=this.items[t];if(!e.data)return 0;this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var r=0;r0?this.moov.traks[t].samples[0].duration:0),e.push(s)}return e},d.Box.prototype.printHeader=function(t){this.size+=8,this.size>4294967296&&(this.size+=8),"uuid"===this.type&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)},d.FullBox.prototype.printHeader=function(t){this.size+=4,d.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)},d.Box.prototype.print=function(t){this.printHeader(t)},d.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)},d.tkhdBox.prototype.print=function(t){d.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)},(m={}).createFile=function(t,e){var r=new c(e);return r.discardMdatData=!(void 0===t||t),r},iT.createFile=m.createFile;let iA=/* @__PURE__ */ix(iT),iC={sampleRate:48e3,channelCount:2,codec:"mp4a.40.2"};function iI(t,e){let r=e.videoTracks[0],s={};if(null!=r){let n=function(t){for(let e of t.mdia.minf.stbl.stsd.entries){let t=e.avcC??e.hvcC??e.vpcC;if(null!=t){let e=new iA.DataStream(void 0,0,iA.DataStream.BIG_ENDIAN);return t.write(e),new Uint8Array(e.buffer.slice(8))}}throw Error("avcC, hvcC or VPX not found")}(t.getTrackById(r.id)).buffer,{descKey:a,type:o}=r.codec.startsWith("avc1")?{descKey:"avcDecoderConfigRecord",type:"avc1"}:r.codec.startsWith("hvc1")?{descKey:"hevcDecoderConfigRecord",type:"hvc1"}:{descKey:"",type:""};""!==a&&(s.videoTrackConf={timescale:r.timescale,duration:r.duration,width:r.video.width,height:r.video.height,brands:e.brands,type:o,[a]:n}),s.videoDecoderConf={codec:r.codec,codedHeight:r.video.height,codedWidth:r.video.width,description:n}}let n=e.audioTracks[0];if(null!=n){let e=iB(t);s.audioTrackConf={timescale:n.timescale,samplerate:n.audio.sample_rate,channel_count:n.audio.channel_count,hdlr:"soun",type:n.codec.startsWith("mp4a")?"mp4a":n.codec,description:iB(t)},s.audioDecoderConf={codec:n.codec.startsWith("mp4a")?iC.codec:n.codec,numberOfChannels:n.audio.channel_count,sampleRate:n.audio.sample_rate,...null==e?{}:function(t){var e;let r=null==(e=t.esd.descs[0])?void 0:e.descs[0];if(null==r)return{};let[s,n]=r.data;return{sampleRate:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][((7&s)<<1)+(n>>7)],numberOfChannels:(127&n)>>3}}(e)}}return s}function iB(t,e="mp4a"){var r;let s=null==(r=t.moov)?void 0:r.traks.map(t=>t.mdia.minf.stbl.stsd.entries).flat().find(({type:t})=>t===e);return null==s?void 0:s.esds}class ik{constructor(){ey(this,"readable"),ey(this,"writable"),ew(this,A,0);let t=iA.createFile(),e=!1;this.readable=new ReadableStream({start:e=>{t.onReady=r=>{var s,n;let a=null==(s=r.videoTracks[0])?void 0:s.id;null!=a&&t.setExtractionOptions(a,"video",{nbSamples:100});let o=null==(n=r.audioTracks[0])?void 0:n.id;null!=o&&t.setExtractionOptions(o,"audio",{nbSamples:100}),e.enqueue({chunkType:"ready",data:{info:r,file:t}}),t.start()};let r={};t.onSamples=(s,n,a)=>{e.enqueue({chunkType:"samples",data:{id:s,type:n,samples:a.map(t=>({...t}))}}),r[s]=(r[s]??0)+a.length,t.releaseUsedSamples(s,r[s])},t.onFlush=()=>{e.close()}},cancel:()=>{t.stop(),e=!0}},{highWaterMark:50}),this.writable=new WritableStream({write:async r=>{if(e){this.writable.abort();return}let s=r.buffer;s.fileStart=eb(this,A),ev(this,A,eb(this,A)+s.byteLength),t.appendBuffer(s)},close:()=>{var e;t.flush(),t.stop(),null==(e=t.onFlush)||e.call(t)}})}}A=new WeakMap;let iF=0;function iR(t){return"file"===t.kind&&t.createReader instanceof Function}let iP=class t{constructor(t,e={audio:!0}){if(ew(this,C,e5.create(`MP4Clip id:${iF++},`)),ey(this,"ready"),ew(this,I,!1),ew(this,B,{duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0}),ew(this,k),ew(this,F,1),ew(this,R,[]),ew(this,P,[]),ew(this,z,null),ew(this,L,null),ew(this,D,{video:null,audio:null}),ew(this,M,{audio:!0}),ey(this,"tickInterceptor",async(t,e)=>e),ew(this,O,new AbortController),!(t instanceof ReadableStream)&&!iR(t)&&!Array.isArray(t.videoSamples))throw Error("Illegal argument");ev(this,M,{...e}),ev(this,F,"object"==typeof e.audio&&"volume"in e.audio?e.audio.volume:1);let r=async t=>(await eH(eb(this,k),t),await eb(this,k).stream());ev(this,k,iR(t)?t:"localFile"in t?t.localFile:e1()),this.ready=(t instanceof ReadableStream?r(t).then(t=>iL(t,eb(this,M))):iR(t)?t.stream().then(t=>iL(t,eb(this,M))):Promise.resolve(t)).then(async({videoSamples:t,audioSamples:e,decoderConf:r})=>{var s,n,a;ev(this,R,t),ev(this,P,e),ev(this,D,r);let{videoFrameFinder:o,audioFrameFinder:h}=(s={video:null==r.video?null:{...r.video,hardwareAcceleration:eb(this,M).__unsafe_hardwareAcceleration__},audio:r.audio},n=await eb(this,k).createReader(),{audioFrameFinder:null==(a=!1!==eb(this,M).audio?eb(this,F):null)||null==s.audio||0===e.length?null:new iM(n,e,s.audio,{volume:a,targetSampleRate:iC.sampleRate}),videoFrameFinder:null==s.video||0===t.length?null:new iD(n,t,s.video)});return ev(this,z,o),ev(this,L,h),ev(this,B,function(t,e,r){let s={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};null!=t.video&&e.length>0&&(s.width=t.video.codedWidth??0,s.height=t.video.codedHeight??0),null!=t.audio&&r.length>0&&(s.audioSampleRate=iC.sampleRate,s.audioChanCount=iC.channelCount);let n=0,a=0;if(e.length>0)for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r.deleted){n=r.cts+r.duration;break}}if(r.length>0){let t=r.at(-1);a=t.cts+t.duration}return s.duration=Math.max(n,a),s}(r,t,e)),eb(this,C).info("MP4Clip meta:",eb(this,B)),{...eb(this,B)}})}get meta(){return{...eb(this,B)}}async tick(t){var e,r;if(t>=eb(this,B).duration)return await this.tickInterceptor(t,{audio:[],state:"done"});let[s,n]=await Promise.all([(null==(e=eb(this,L))?void 0:e.find(t))??[],null==(r=eb(this,z))?void 0:r.find(t)]);return null==n?await this.tickInterceptor(t,{audio:s,state:"success"}):await this.tickInterceptor(t,{video:n,audio:s,state:"success"})}async thumbnails(t=100,e){eb(this,O).abort(),ev(this,O,new AbortController);let r=eb(this,O).signal;await this.ready;let s="generate thumbnails aborted";if(r.aborted)throw Error(s);let{width:n,height:a}=eb(this,B),o=function(t,e,r){let s=new OffscreenCanvas(t,e),n=s.getContext("2d");return async a=>(n.drawImage(a,0,0,t,e),a.close(),await s.convertToBlob(r))}(t,Math.round(t/n*a),{quality:.1,type:"image/png"});return new Promise(async(t,n)=>{let a=[],h=eb(this,D).video;if(null==h||0===eb(this,R).length){l();return}async function l(){r.aborted||t(await Promise.all(a.map(async t=>({ts:t.ts,img:await t.img}))))}function u(t){a.push({ts:t.timestamp,img:o(t)})}r.addEventListener("abort",()=>{n(Error(s))});let{start:d=0,end:f=eb(this,B).duration,step:p}=e??{};if(p){let t=d,e=new iD(await eb(this,k).createReader(),eb(this,R),{...h,hardwareAcceleration:eb(this,M).__unsafe_hardwareAcceleration__});for(;t<=f&&!r.aborted;){let r=await e.find(t);r&&u(r),t+=p}e.destroy(),l()}else await iY(eb(this,R),eb(this,k),h,r,{start:d,end:f},(t,e)=>{u(t),e&&l()})})}async split(e){if(await this.ready,e<=0||e>=eb(this,B).duration)throw Error('"time" out of bounds');let[r,s]=function(t,e){if(0===t.length)return[];let r=0,s=0,n=-1;for(let a=0;a({...t}));for(let t=r;t({...t,cts:t.cts-e}));for(let t of h){if(t.cts>=0)break;t.deleted=!0,t.cts=-1}return[o,h]}(eb(this,R),e),[n,a]=function(t,e){if(0===t.length)return[];let r=-1;for(let s=0;st[s].cts)){r=s;break}if(-1===r)throw Error("Not found audio sample by time");return[t.slice(0,r),t.slice(r).map(t=>({...t,cts:t.cts-e}))]}(eb(this,P),e),o=new t({localFile:eb(this,k),videoSamples:r??[],audioSamples:n??[],decoderConf:eb(this,D)},eb(this,M)),h=new t({localFile:eb(this,k),videoSamples:s??[],audioSamples:a??[],decoderConf:eb(this,D)},eb(this,M));return await Promise.all([o.ready,h.ready]),[o,h]}async clone(){await this.ready;let e=new t({localFile:eb(this,k),videoSamples:[...eb(this,R)],audioSamples:[...eb(this,P)],decoderConf:eb(this,D)},eb(this,M));return await e.ready,e.tickInterceptor=this.tickInterceptor,e}async splitTrack(){await this.ready;let e=[];if(eb(this,R).length>0){let r=new t({localFile:eb(this,k),videoSamples:[...eb(this,R)],audioSamples:[],decoderConf:{video:eb(this,D).video,audio:null}},eb(this,M));await r.ready,r.tickInterceptor=this.tickInterceptor,e.push(r)}if(eb(this,P).length>0){let r=new t({localFile:eb(this,k),videoSamples:[],audioSamples:[...eb(this,P)],decoderConf:{audio:eb(this,D).audio,video:null}},eb(this,M));await r.ready,r.tickInterceptor=this.tickInterceptor,e.push(r)}return e}destroy(){var t,e;eb(this,I)||(eb(this,C).info("MP4Clip destroy"),ev(this,I,!0),null==(t=eb(this,z))||t.destroy(),null==(e=eb(this,L))||e.destroy())}};C=new WeakMap,I=new WeakMap,B=new WeakMap,k=new WeakMap,F=new WeakMap,R=new WeakMap,P=new WeakMap,z=new WeakMap,L=new WeakMap,D=new WeakMap,M=new WeakMap,O=new WeakMap;let iz=iP;async function iL(t,e={}){let r;let s={video:null,audio:null},n=[],a=[];return new Promise(async(h,l)=>{let u=-1,d=-1,f=iE(t.pipeThrough(new ik),{onChunk:async({chunkType:t,data:h})=>{if("ready"===t){r=h.info;let{videoDecoderConf:t,audioDecoderConf:e}=iI(h.file,h.info);s.video=t??null,s.audio=e??null,null==t&&null==e&&(f(),l(Error("MP4Clip must contain at least one video or audio track"))),e5.info("mp4BoxFile moov ready",{...h.info,tracks:null,videoTracks:null,audioTracks:null},s)}else if("samples"===t){if("video"===h.type)for(let t of(-1===u&&(u=h.samples[0].dts),h.samples))n.push(o(t,u,"video"));else if("audio"===h.type&&e.audio)for(let t of(-1===d&&(d=h.samples[0].dts),h.samples))a.push(o(t,d,"audio"))}},onDone:()=>{let t=n.at(-1)??a.at(-1);if(null==r){l(Error("MP4Clip stream is done, but not emit ready"));return}if(null==t){l(Error("MP4Clip stream not contain any sample"));return}let e=n[0];null!=e&&e.cts<2e5&&(e.duration+=e.cts,e.cts=0),e5.info("mp4 stream parsed"),h({videoSamples:n,audioSamples:a,decoderConf:s})}})});function o(t,e=0,r){return{...t,is_idr:"video"===r&&t.is_sync&&function(t){let e=new DataView(t.buffer),r=0;for(;r((null==eb(this,N)||t<=eb(this,G)||t-eb(this,G)>3e6)&&eb(this,Q).call(this,t),eb(this,Y).abort=!0,ev(this,G,t),ev(this,Y,{abort:!1,st:performance.now()}),await eb(this,$).call(this,t,eb(this,N),eb(this,Y)))),ew(this,W,0),ew(this,V,!1),ew(this,H,0),ew(this,X,[]),ew(this,j,0),ew(this,Z,0),ew(this,$,async(t,e,r)=>{if(null==e||"closed"===e.state||r.abort)return null;if(eb(this,X).length>0){let s=eb(this,X)[0];return ts.timestamp+(s.duration??0)?(s.close(),await eb(this,$).call(this,t,e,r)):(eb(this,X).length<10&&eb(this,q).call(this,e).catch(e=>{throw eb(this,Q).call(this,t),e}),s))}if(eb(this,K)||eb(this,j)0){if(performance.now()-r.st>3e3)throw Error(`MP4Clip.tick video timeout, ${JSON.stringify(eb(this,J).call(this))}`);await iv(15)}else{if(eb(this,H)>=this.samples.length)return null;try{await eb(this,q).call(this,e)}catch(e){throw eb(this,Q).call(this,t),e}}return await eb(this,$).call(this,t,e,r)}),ew(this,K,!1),ew(this,q,async t=>{var e,r;if(eb(this,K))return;ev(this,K,!0);let s=eb(this,H)+1,n=!1;for(;s{if(eb(this,V))throw t;ev(this,V,!0),e5.warn("Downgrade to software decode"),eb(this,Q).call(this)}}),ev(this,Z,eb(this,Z)+e.length)}}ev(this,H,s),ev(this,K,!1)}),ew(this,Q,t=>{var e,r;if(ev(this,K,!1),eb(this,X).forEach(t=>t.close()),ev(this,X,[]),null==t||0===t)ev(this,H,0);else{let e=0;for(let r=0;r{if(ev(this,j,eb(this,j)+1),-1===t.timestamp){t.close();return}let e=t;null==t.duration&&(e=new VideoFrame(t,{duration:eb(this,W)}),t.close()),eb(this,X).push(e)},error:t=>{e5.error(`MP4Clip VideoDecoder err: ${t.message}`)}})),eb(this,N).configure({...this.conf,...eb(this,V)?{hardwareAcceleration:"prefer-software"}:{}})}),ew(this,J,()=>{var t,e;return{time:eb(this,G),decState:null==(t=eb(this,N))?void 0:t.state,decQSize:null==(e=eb(this,N))?void 0:e.decodeQueueSize,decCusorIdx:eb(this,H),sampleLen:this.samples.length,inputCnt:eb(this,Z),outputCnt:eb(this,j),cacheFrameLen:eb(this,X).length,softDeocde:eb(this,V)}}),ey(this,"destroy",()=>{var t,e;(null==(t=eb(this,N))?void 0:t.state)!=="closed"&&(null==(e=eb(this,N))||e.close()),ev(this,N,null),eb(this,Y).abort=!0,eb(this,X).forEach(t=>t.close()),ev(this,X,[]),this.localFileReader.close()}),this.localFileReader=t,this.samples=e,this.conf=r}}N=new WeakMap,G=new WeakMap,Y=new WeakMap,W=new WeakMap,V=new WeakMap,H=new WeakMap,X=new WeakMap,j=new WeakMap,Z=new WeakMap,$=new WeakMap,K=new WeakMap,q=new WeakMap,Q=new WeakMap,J=new WeakMap;class iM{constructor(t,e,r,s){ew(this,tt,1),ew(this,te),ew(this,ti,null),ew(this,tr,{abort:!1,st:performance.now()}),ey(this,"find",async t=>{if(null==eb(this,ti)||t<=eb(this,ts)||t-eb(this,ts)>1e5){eb(this,tl).call(this),ev(this,ts,t);for(let e=0;e{if(null==e||r.abort||"closed"===e.state)return[];let s=Math.ceil(t*(eb(this,te)/1e6));if(0===s)return[];let n=eb(this,ta).frameCnt-s;if(n>0)return ne){let h=e-s;r[0].set(a.subarray(0,h),s),r[1].set(o.subarray(0,h),s),t.data[n][0]=a.subarray(h,a.length),t.data[n][1]=o.subarray(h,o.length);break}r[0].set(a,s),r[1].set(o,s),s+=a.length,n++}return t.data=t.data.slice(n),t.frameCnt-=e,r}(eb(this,ta),s);if(e.decodeQueueSize>10){if(performance.now()-r.st>3e3)throw r.abort=!0,Error(`MP4Clip.tick audio timeout, ${JSON.stringify(eb(this,tu).call(this))}`);await iv(15)}else{if(eb(this,tn)>=this.samples.length-1)return[];eb(this,th).call(this,e)}return eb(this,to).call(this,t,e,r)}),ew(this,th,t=>{if(t.decodeQueueSize>100)return;let e=[],r=eb(this,tn);for(;r=10))break}ev(this,tn,r),t.decode(e.map(t=>new EncodedAudioChunk({type:"key",timestamp:t.cts,duration:t.duration,data:t.data})))}),ew(this,tl,()=>{var t;ev(this,ts,0),ev(this,tn,0),ev(this,ta,{frameCnt:0,data:[]}),null==(t=eb(this,ti))||t.close(),ev(this,ti,function(t,e,r){let s=t=>{if(0!==t.length){if(1!==e.volume)for(let r of t)for(let t=0;t{let r=n;n+=1,t().then(t=>{e[r]=t,s()}).catch(t=>{e[r]=t,s()})}}(s),a=e.resampleRate!==t.sampleRate,o=new AudioDecoder({output:t=>{let r=im(t);a?n(()=>iw(r,t.sampleRate,{rate:e.resampleRate,chanCount:t.numberOfChannels})):s(r),t.close()},error:t=>{e5.error(`MP4Clip AudioDecoder err: ${t.message}`)}});return o.configure(t),{decode(t){for(let e of t)o.decode(e)},close(){"closed"!==o.state&&o.close()},get state(){return o.state},get decodeQueueSize(){return o.decodeQueueSize}}}(this.conf,{resampleRate:iC.sampleRate,volume:eb(this,tt)},t=>{eb(this,ta).data.push(t),eb(this,ta).frameCnt+=t[0].length}))}),ew(this,tu,()=>{var t,e;return{time:eb(this,ts),decState:null==(t=eb(this,ti))?void 0:t.state,decQSize:null==(e=eb(this,ti))?void 0:e.decodeQueueSize,decCusorIdx:eb(this,tn),sampleLen:this.samples.length,pcmLen:eb(this,ta).frameCnt}}),ey(this,"destroy",()=>{ev(this,ti,null),eb(this,tr).abort=!0,ev(this,ta,{frameCnt:0,data:[]}),this.localFileReader.close()}),this.localFileReader=t,this.samples=e,this.conf=r,ev(this,tt,s.volume),ev(this,te,s.targetSampleRate)}}async function iO(t,e){let r=t[0],s=t.at(-1);if(null==s)return[];let n=s.offset+s.size-r.offset;if(n<3e7){let s=new Uint8Array(await e.read(n,{at:r.offset}));return t.map(t=>{let e=t.offset-r.offset,n=s.subarray(e,e+t.size);return t.is_idr&&(n=iG(n)),new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:n})})}return await Promise.all(t.map(async t=>{let r=await e.read(t.size,{at:t.offset});return t.is_idr&&(r=iG(new Uint8Array(r))),new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:r})}))}function iN(t,e,r){let s=0;if("configured"===t.state){for(;s{if(!(t instanceof Error))throw t;if(t.message.includes("Decoding error")&&null!=r.onDecodingError){r.onDecodingError(t);return}if(!t.message.includes("Aborted due to close"))throw t})}}function iG(t){let e=new DataView(t.buffer);return(31&e.getUint8(4))==6?t.subarray(e.getUint32(0)+4):t}async function iY(t,e,r,s,n,a){let o=await e.createReader(),h=0,l=new VideoDecoder({output:t=>{let e=(h+=1)===u.length;a(t,e),e&&o.close()},error:e5.error});s.addEventListener("abort",()=>{o.close(),l.close()});let u=await iO(t.filter(t=>!t.deleted&&t.is_sync&&t.cts>=n.start&&t.cts<=n.end),o);0===u.length||s.aborted||(l.configure(r),iN(l,u,{}))}tt=new WeakMap,te=new WeakMap,ti=new WeakMap,tr=new WeakMap,ts=new WeakMap,tn=new WeakMap,ta=new WeakMap,to=new WeakMap,th=new WeakMap,tl=new WeakMap,tu=new WeakMap;let iW=class t{constructor(t){ew(this,tc),ey(this,"ready"),ew(this,td,{duration:0,width:0,height:0}),ew(this,tf,null),ew(this,tp,[]);let e=t=>(ev(this,tf,t),eb(this,td).width=t.width,eb(this,td).height=t.height,eb(this,td).duration=1/0,{...eb(this,td)});if(t instanceof ReadableStream)this.ready=new Response(t).blob().then(t=>createImageBitmap(t)).then(e);else if(t instanceof ImageBitmap)this.ready=Promise.resolve(e(t));else if(Array.isArray(t)&&t.every(t=>t instanceof VideoFrame)){ev(this,tp,t);let e=eb(this,tp)[0];if(null==e)throw Error("The frame count must be greater than 0");ev(this,td,{width:e.displayWidth,height:e.displayHeight,duration:eb(this,tp).reduce((t,e)=>t+(e.duration??0),0)}),this.ready=Promise.resolve({...eb(this,td),duration:1/0})}else if("type"in t)this.ready=eS(this,tc,tm).call(this,t.stream,t.type).then(()=>({width:eb(this,td).width,height:eb(this,td).height,duration:1/0}));else throw Error("Illegal arguments")}get meta(){return{...eb(this,td)}}async tick(t){if(null!=eb(this,tf))return{video:await createImageBitmap(eb(this,tf)),state:"success"};let e=t%eb(this,td).duration;return{video:(eb(this,tp).find(t=>e>=t.timestamp&&e<=t.timestamp+(t.duration??0))??eb(this,tp)[0]).clone(),state:"success"}}async split(e){if(await this.ready,null!=eb(this,tf))return[new t(await createImageBitmap(eb(this,tf))),new t(await createImageBitmap(eb(this,tf)))];let r=-1;for(let t=0;teb(this,tp)[t].timestamp)){r=t;break}if(-1===r)throw Error("Not found frame by time");let s=eb(this,tp).slice(0,r).map(t=>new VideoFrame(t)),n=eb(this,tp).slice(r).map(t=>new VideoFrame(t,{timestamp:t.timestamp-e}));return[new t(s),new t(n)]}async clone(){return await this.ready,new t(null==eb(this,tf)?eb(this,tp).map(t=>t.clone()):await createImageBitmap(eb(this,tf)))}destroy(){var t;e5.info("ImgClip destroy"),null==(t=eb(this,tf))||t.close(),eb(this,tp).forEach(t=>t.close())}};td=new WeakMap,tf=new WeakMap,tp=new WeakMap,tc=new WeakSet,tm=async function(t,e){ev(this,tp,await i_(t,e));let r=eb(this,tp)[0];if(null==r)throw Error("No frame available in gif");ev(this,td,{duration:eb(this,tp).reduce((t,e)=>t+(e.duration??0),0),width:r.codedWidth,height:r.codedHeight}),e5.info("ImgClip ready:",eb(this,td))};let iV=iW,iH=class t{constructor(t,e={}){ew(this,tw),ey(this,"ready"),ew(this,tg,{duration:0,width:0,height:0}),ew(this,ty,new Float32Array),ew(this,t_,new Float32Array),ew(this,tb),ew(this,tS,0),ew(this,tE,0),ev(this,tb,{loop:!1,volume:1,...e}),this.ready=eS(this,tw,tv).call(this,t).then(()=>({width:0,height:0,duration:e.loop?1/0:eb(this,tg).duration}))}get meta(){return{...eb(this,tg),sampleRate:iC.sampleRate,chanCount:2}}getPCMData(){return[eb(this,ty),eb(this,t_)]}async tick(t){if(!eb(this,tb).loop&&t>=eb(this,tg).duration)return{audio:[],state:"done"};let e=t-eb(this,tS);if(t3e6)return ev(this,tS,t),ev(this,tE,Math.ceil(eb(this,tS)/1e6*iC.sampleRate)),{audio:[new Float32Array(0),new Float32Array(0)],state:"success"};ev(this,tS,t);let r=Math.ceil(e/1e6*iC.sampleRate),s=eb(this,tE)+r,n=eb(this,tb).loop?[iS(eb(this,ty),eb(this,tE),s),iS(eb(this,t_),eb(this,tE),s)]:[eb(this,ty).slice(eb(this,tE),s),eb(this,t_).slice(eb(this,tE),s)];return ev(this,tE,s),{audio:n,state:"success"}}async split(e){await this.ready;let r=Math.ceil(e/1e6*iC.sampleRate);return[new t(this.getPCMData().map(t=>t.slice(0,r)),eb(this,tb)),new t(this.getPCMData().map(t=>t.slice(r)),eb(this,tb))]}async clone(){await this.ready;let e=new t(this.getPCMData(),eb(this,tb));return await e.ready,e}destroy(){ev(this,ty,new Float32Array(0)),ev(this,t_,new Float32Array(0)),e5.info("---- audioclip destroy ----")}};tg=new WeakMap,ty=new WeakMap,t_=new WeakMap,tb=new WeakMap,tw=new WeakSet,tv=async function(t){null==iH.ctx&&(iH.ctx=new AudioContext({sampleRate:iC.sampleRate}));let e=performance.now(),r=t instanceof ReadableStream?await iZ(t,iH.ctx):t;e5.info("Audio clip decoded complete:",performance.now()-e);let s=eb(this,tb).volume;if(1!==s)for(let t of r)for(let e=0;e{}),ey(this,"audioTrack"),ew(this,tT,null),ew(this,tA),ev(this,tA,t);let e=t.getVideoTracks()[0];if(null!=e){var r;let{width:t,height:s}=e.getSettings();e.contentHint="motion",eb(this,tU).width=t??0,eb(this,tU).height=s??0,ev(this,tT,new OffscreenCanvas(t??0,s??0)),ev(this,tx,(r=eb(this,tT).getContext("2d"),iE(new MediaStreamTrackProcessor({track:e}).readable,{onChunk:async t=>{r.drawImage(t,0,0),t.close()},onDone:async()=>{}})))}this.audioTrack=t.getAudioTracks()[0]??null,eb(this,tU).duration=1/0,this.ready=Promise.resolve(this.meta)}get meta(){return{...eb(this,tU)}}async tick(){return{video:null==eb(this,tT)?null:await createImageBitmap(eb(this,tT)),audio:[],state:"success"}}async split(){return[await this.clone(),await this.clone()]}async clone(){return new t(eb(this,tA).clone())}destroy(){eb(this,tA).getTracks().forEach(t=>t.stop()),eb(this,tx).call(this)}};tU=new WeakMap,tx=new WeakMap,tT=new WeakMap,tA=new WeakMap,ey(i$,"ctx",null);let iK=i$,iq=class t{constructor(t,e){var r;if(ew(this,tL),ey(this,"ready"),ew(this,tC,[]),ew(this,tI,{width:0,height:0,duration:0}),ew(this,tB,{color:"#FFF",textBgColor:null,type:"srt",fontSize:30,letterSpacing:null,bottomOffset:30,fontFamily:"Noto Sans SC",strokeStyle:"#000",lineWidth:null,lineCap:null,lineJoin:null,textShadow:{offsetX:2,offsetY:2,blur:4,color:"#000"},videoWidth:1280,videoHeight:720}),ew(this,tk),ew(this,tF),ew(this,tR,null),ew(this,tP,0),ew(this,tz,0),ev(this,tC,Array.isArray(t)?t:t.split(/\r|\n/).map(t=>t.trim()).filter(t=>t.length>0).map(t=>({lineStr:t,match:t.match(/(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/)})).filter(({lineStr:t},e,r)=>{var s;return!(/^\d+$/.test(t)&&(null==(s=r[e+1])?void 0:s.match)!=null)}).reduce((t,{lineStr:e,match:r})=>{if(null==r){let r=t.at(-1);if(null==r)return t;r.text+=0===r.text.length?e:` ${e}`}else t.push({start:iJ(r[1]),end:iJ(r[2]),text:""});return t},[]).map(({start:t,end:e,text:r})=>({start:1e6*t,end:1e6*e,text:r}))),0===eb(this,tC).length)throw Error("No subtitles content");ev(this,tB,Object.assign(eb(this,tB),e)),ev(this,tz,null==e.textBgColor?0:(e.fontSize??50)*.2);let{fontSize:s,fontFamily:n,videoWidth:a,videoHeight:o,letterSpacing:h}=eb(this,tB);ev(this,tP,s+2*eb(this,tz)),ev(this,tk,new OffscreenCanvas(a,o)),ev(this,tF,eb(this,tk).getContext("2d")),eb(this,tF).font=`${s}px ${n}`,eb(this,tF).textAlign="center",eb(this,tF).textBaseline="top",eb(this,tF).letterSpacing=h??"0px",ev(this,tI,{width:a,height:o,duration:(null==(r=eb(this,tC).at(-1))?void 0:r.end)??0}),this.ready=Promise.resolve(this.meta)}get meta(){return{...eb(this,tI)}}async tick(t){var e,r;if(null!=eb(this,tR)&&t>=eb(this,tR).timestamp&&t<=eb(this,tR).timestamp+(eb(this,tR).duration??0))return{video:eb(this,tR).clone(),state:"success"};let s=0;for(;sn.end)return{state:"done"};if(teb(this,tC)[t].start)){r=t;break}if(-1===r)throw Error("Not found subtitle by time");let s=eb(this,tC).slice(0,r).map(t=>({...t})),n=s.at(-1),a=null;null!=n&&n.end>e&&(a={start:0,end:n.end-e,text:n.text},n.end=e);let o=eb(this,tC).slice(r).map(t=>({...t,start:t.start-e,end:t.end-e}));return null!=a&&o.unshift(a),[new t(s,eb(this,tB)),new t(o,eb(this,tB))]}async clone(){return new t(eb(this,tC).slice(0),eb(this,tB))}destroy(){var t;null==(t=eb(this,tR))||t.close()}};tC=new WeakMap,tI=new WeakMap,tB=new WeakMap,tk=new WeakMap,tF=new WeakMap,tR=new WeakMap,tP=new WeakMap,tz=new WeakMap,tL=new WeakSet,tD=function(t){let e=t.split(` `).reverse().map(t=>t.trim()),{width:r,height:s}=eb(this,tk),{color:n,fontSize:a,textBgColor:o,textShadow:h,strokeStyle:l,lineWidth:u,lineCap:d,lineJoin:f,bottomOffset:p}=eb(this,tB),c=eb(this,tF);c.clearRect(0,0,r,s),c.globalAlpha=.6;let m=p;for(let t of e){let e=c.measureText(t),p=r/2;null!=o&&(c.shadowOffsetX=0,c.shadowOffsetY=0,c.shadowBlur=0,c.fillStyle=o,c.globalAlpha=.5,c.fillRect(p-e.actualBoundingBoxLeft-eb(this,tz),s-m-eb(this,tP),e.width+2*eb(this,tz),eb(this,tP))),c.shadowColor=h.color,c.shadowOffsetX=h.offsetX,c.shadowOffsetY=h.offsetY,c.shadowBlur=h.blur,c.globalAlpha=1,null!=l&&(c.lineWidth=u??a/6,null!=d&&(c.lineCap=d),null!=f&&(c.lineJoin=f),c.strokeStyle=l,c.strokeText(t,p,s-m-eb(this,tP)+eb(this,tz))),c.fillStyle=n,c.fillText(t,p,s-m-eb(this,tP)+eb(this,tz)),m+=eb(this,tP)+.2*a}};let iQ=iq;function iJ(t){let e=t.match(/(\d{2}):(\d{2}):(\d{2}),(\d{3})/);if(null==e)throw Error(`time format error: ${t}`);let r=Number(e[1]);return 3600*r+60*Number(e[2])+Number(e[3])+Number(e[4])/1e3}class i0{constructor(){ew(this,tM,/* @__PURE__ */new Map),ey(this,"on",(t,e)=>{let r=eb(this,tM).get(t)??/* @__PURE__ */new Set;return r.add(e),eb(this,tM).has(t)||eb(this,tM).set(t,r),()=>{r.delete(e),0===r.size&&eb(this,tM).delete(t)}}),ey(this,"once",(t,e)=>{let r=this.on(t,(...t)=>{r(),e(...t)});return r}),ey(this,"emit",(t,...e)=>{let r=eb(this,tM).get(t);null!=r&&r.forEach(t=>t(...e))})}static forwardEvent(t,e,r){let s=r.map(r=>{let[s,n]=Array.isArray(r)?r:[r,r];return t.on(s,(...t)=>{e.emit(n,...t)})});return()=>{s.forEach(t=>t())}}destroy(){eb(this,tM).clear()}}tM=new WeakMap;let i1=(t,e)=>{let r=new Uint8Array(8);new DataView(r.buffer).setUint32(0,e);for(let e=0;e<4;e++)r[4+e]=t.charCodeAt(e);return r},i2=()=>{let t=new TextEncoder,e=t.encode("mdta"),r=t.encode("mp4 handler"),s=32+r.byteLength+1,n=new Uint8Array(s),a=new DataView(n.buffer);return n.set(i1("hdlr",s),0),a.setUint32(8,0),n.set(e,16),n.set(r,32),n},i3=t=>{let e=new TextEncoder,r=e.encode("mdta"),s=t.map(t=>{let s=e.encode(t),n=8+s.byteLength,a=new Uint8Array(n);return new DataView(a.buffer).setUint32(0,n),a.set(r,4),a.set(s,4+r.byteLength),a}),n=16+s.reduce((t,e)=>t+e.byteLength,0),a=new Uint8Array(n),o=new DataView(a.buffer);a.set(i1("keys",n),0),o.setUint32(8,0),o.setUint32(12,t.length);let h=16;for(let t of s)a.set(t,h),h+=t.byteLength;return a},i6=t=>{let e=new TextEncoder,r=e.encode("data"),s=Object.entries(t).map(([t,s],n)=>{let a=e.encode(s),o=24+a.byteLength,h=new Uint8Array(o),l=new DataView(h.buffer);return l.setUint32(0,o),l.setUint32(4,n+1),l.setUint32(8,16+a.byteLength),h.set(r,12),l.setUint32(16,1),h.set(a,24),h}),n=8+s.reduce((t,e)=>t+e.byteLength,0),a=new Uint8Array(n);a.set(i1("ilst",n),0);let o=8;for(let t of s)a.set(t,o),o+=t.byteLength;return a},i8=t=>{let e=i2(),r=i3(Object.keys(t)),s=i6(t),n=new Uint8Array(e.length+r.length+s.length);return n.set(e,0),n.set(r,e.length),n.set(s,e.length+r.length),n};function i4(t){e5.info("recodemux opts:",t);let e=iA.createFile(),r=new i0,s=(t,e)=>{let r=t.add("udta").add("meta");r.data=i8(e),r.size=r.data.byteLength},n=!1,a=()=>{null==e.moov||n||(n=!0,null!=t.metaDataTags&&s(e.moov,t.metaDataTags),null!=t.duration&&(e.moov.mvhd.duration=t.duration))};r.once("VideoReady",a),r.once("AudioReady",a);let o=null!=t.video?function(t,e,r){let s={timescale:1e6,width:t.width,height:t.height,brands:["isom","iso2","avc1","mp42","mp41"],avcDecoderConfigRecord:null,name:"Track created with WebAV"},n=-1,a=!1;r.once("AudioReady",()=>{a=!0});let o={encoder0:[],encoder1:[]},h=(t,a,h)=>{var l;if(-1===n&&null!=h){let t=null==(l=h.decoderConfig)?void 0:l.description;(function(t){let e=new Uint8Array(t);e[2].toString(2).slice(-2).includes("1")&&(e[2]=0)})(t),s.avcDecoderConfigRecord=t,n=e.addTrack(s),r.emit("VideoReady"),e5.info("VideoEncoder, video track ready, trackId:",n)}o[t].push(i7(a))},l="encoder1",u=0;function d(){if(!a)return;let t="encoder1"===l?"encoder0":"encoder1",r=o[l],s=o[t];if(0===r.length&&0===s.length)return;let h=r[0];if(null!=h&&h.cts-u<1e4){let t=function(t){let r=-1,s=0;for(;s0&&a.is_sync)break;e.addSample(n,a.data,a),r=a.cts+a.duration}return t.splice(0,s),r}(r);t>u&&(u=t)}let f=s[0];null!=f&&f.cts-u<1e4&&(l=t,d())}let f=is(d,15),p=i5(t,(t,e)=>h("encoder0",t,e)),c=i5(t,(t,e)=>h("encoder1",t,e)),m=0;return{get encodeQueueSize(){return p.encodeQueueSize+c.encodeQueueSize},encode:(t,e)=>{e.keyFrame&&(m+=1),(m%2==0?p:c).encode(t,e)},flush:async()=>{await Promise.all(["configured"===p.state?await p.flush():null,"configured"===c.state?await c.flush():null]),f(),d()},close:()=>{"configured"===p.state&&p.close(),"configured"===c.state&&c.close()}}}(t.video,e,r):null,h=null!=t.audio?function(t,e,r){let s={timescale:1e6,samplerate:t.sampleRate,channel_count:t.channelCount,hdlr:"soun",type:"aac"===t.codec?"mp4a":"Opus",name:"Track created with WebAV"},n=-1,a=[],o=!1;r.once("VideoReady",()=>{o=!0,a.forEach(t=>{let r=i7(t);e.addSample(n,r.data,r)}),a=[]});let h=new AudioEncoder({error:e5.error,output:(t,h)=>{var l;if(-1===n){let t=null==(l=h.decoderConfig)?void 0:l.description;n=e.addTrack({...s,description:null==t?void 0:function(t){let e=t.byteLength,r=new Uint8Array([0,0,0,0,3,23+e,0,2,0,4,18+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5,e,...new Uint8Array(t instanceof ArrayBuffer?t:t.buffer),6,1,2]),s=new iA.BoxParser.esdsBox(r.byteLength);return s.hdr_size=0,s.parse(new iA.DataStream(r,0,iA.DataStream.BIG_ENDIAN)),s}(t)}),r.emit("AudioReady"),e5.info("AudioEncoder, audio track ready, trackId:",n)}if(o){let r=i7(t);e.addSample(n,r.data,r)}else a.push(t)}});return h.configure({codec:"aac"===t.codec?iC.codec:"opus",sampleRate:t.sampleRate,numberOfChannels:t.channelCount,bitrate:128e3}),h}(t.audio,e,r):null;return null==t.video&&r.emit("VideoReady"),null==t.audio&&r.emit("AudioReady"),{encodeVideo:(t,e)=>{null==o||o.encode(t,e),t.close()},encodeAudio:t=>{null!=h&&(h.encode(t),t.close())},getEncodeQueueSize:()=>(null==o?void 0:o.encodeQueueSize)??(null==h?void 0:h.encodeQueueSize)??0,flush:async()=>{await Promise.all([null==o?void 0:o.flush(),(null==h?void 0:h.state)==="configured"?h.flush():null])},close:()=>{r.destroy(),null==o||o.close(),(null==h?void 0:h.state)==="configured"&&h.close()},mp4file:e}}function i5(t,e){let r=new VideoEncoder({error:e5.error,output:e});return r.configure({codec:t.codec,framerate:t.expectFPS,hardwareAcceleration:t.__unsafe_hardwareAcceleration__,bitrate:t.bitrate,width:t.width,height:t.height,alpha:"discard",avc:{format:"avc"}}),r}function i9(t,e,r){let s=0,n=0,a=t.boxes,o=!1,h=()=>{var e;if(!o){if(null==a.find(t=>"moof"===t.type))return null;o=!0}if(n>=a.length)return null;let r=new iA.DataStream;r.endianness=iA.DataStream.BIG_ENDIAN;let s=n;try{for(;s{let t=h();null==t||u||r.enqueue(t)},e),d=e=>{if(clearInterval(s),t.flush(),null!=e){r.error(e);return}let n=h();null==n||u||r.enqueue(n),u||r.close()},l&&d()},cancel(){u=!0,clearInterval(s),null==r||r()}}),stop:t=>{l||(l=!0,null==d||d(t))}}}function i7(t){let e=new ArrayBuffer(t.byteLength);t.copyTo(e);let r=t.timestamp;return{duration:t.duration??0,dts:r,cts:r,is_sync:"key"===t.type,data:e}}async function rt(t){let e=iA.createFile(),r=function(t){let e=0,r=t.boxes,s=[],n=0;async function a(){let a=c(r,e);e=r.length,s.forEach(({track:e,id:r})=>{let s=e.samples.at(-1);null!=s&&(n=Math.max(n,s.cts+s.duration)),t.releaseUsedSamples(r,e.samples.length),e.samples=[]}),t.mdats=[],t.moofs=[],null!=a&&await (null==d?void 0:d.write(a))}let o=[];function h(){if(o.length>0)return!0;let n=r.findIndex(t=>"moov"===t.type);if(-1===n)return!1;if(o=r.slice(0,n+1),e=n+1,0===s.length)for(let e=1;;e+=1){let r=t.getTrackById(e);if(null==r)break;s.push({track:r,id:e})}return!0}let l=0,u=e1(),d=null,f=(async()=>{d=await u.createWriter(),l=self.setInterval(()=>{h()&&a()},100)})(),p=!1;return async()=>{if(p)throw Error("File exported");if(p=!0,await f,clearInterval(l),!h()||null==d)return null;t.flush(),await a(),await (null==d?void 0:d.close());let e=o.find(t=>"moov"===t.type);if(null==e)return null;e.mvhd.duration=n;let r=e1(),s=c(o,0);return await eH(r,s),await eH(r,u,{overwrite:!1}),await r.stream()};function c(t,e){if(e>=t.length)return null;let r=new iA.DataStream;r.endianness=iA.DataStream.BIG_ENDIAN;for(let s=e;s{iE(d.pipeThrough(new ik),{onDone:t,onChunk:async({chunkType:t,data:d})=>{if("ready"===t){let{videoTrackConf:t,audioTrackConf:s}=iI(d.file,d.info);0===r&&null!=t&&(r=e.addTrack(t)),0===a&&null!=s&&(a=e.addTrack(s))}else if("samples"===t){let{type:t,samples:f}=d,p="video"===t?r:a,c="video"===t?s:o,m="video"===t?n:h;f.forEach(t=>{e.addSample(p,t.data,{duration:t.duration,dts:t.dts+c,cts:t.cts+m,is_sync:t.is_sync})});let g=f.at(-1);if(null==g)return;"video"===t?l=g:"audio"===t&&(u=g)}}})}),null!=l&&(s+=l.dts,n+=l.cts),null!=u&&(o+=u.dts,h+=u.cts)}async function ri(t){return await rt([t])}function rr(t,e){e5.info("mixinMP4AndAudio, opts:",{volume:e.volume,loop:e.loop});let r=iA.createFile(),{stream:s,stop:n}=i9(r,500),a=null,o=null,h=[],l=0,u=0,d=0,f=!0,p=48e3;function c(t){let r=h.map(r=>e.loop?iS(r,d,d+t):r.slice(d,d+t));if(d+=t,1!==e.volume)for(let t of r)for(let r=0;r{await (null==o?void 0:o.stop()),null==a||a.close(),n()},onChunk:async({chunkType:t,data:s})=>{if("ready"===t){let{videoTrackConf:t,audioTrackConf:n,audioDecoderConf:d}=iI(s.file,s.info);0===l&&null!=t&&(l=r.addTrack(t));let c=n??{timescale:1e6,samplerate:p,channel_count:iC.channelCount,hdlr:"soun",name:"SoundHandler",type:"mp4a"};0===u&&(u=r.addTrack(c),p=(null==n?void 0:n.samplerate)??p,f=null!=n);let m=new AudioContext({sampleRate:p});h=ig(await m.decodeAudioData(await new Response(e.stream).arrayBuffer())),null!=d&&(a=function(t){let e=[],r=new AudioDecoder({output:t=>{e.push(t)},error:e5.error});return r.configure(t),{decode:async t=>{t.forEach(t=>{r.decode(new EncodedAudioChunk({type:t.is_sync?"key":"delta",timestamp:1e6*t.cts/t.timescale,duration:1e6*t.duration/t.timescale,data:t.data}))}),await r.flush();let s=e;return e=[],s},close:()=>{r.close()}}}(d)),o=function(t,e){let r=new AudioEncoder({output:t=>{e(i7(t))},error:e5.error});r.configure({codec:t.codec,sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels});let s=null;function n(e,r){return new AudioData({timestamp:r,numberOfChannels:t.numberOfChannels,numberOfFrames:e.length/t.numberOfChannels,sampleRate:t.sampleRate,format:"f32-planar",data:e})}return{encode:async(t,e)=>{null!=s&&r.encode(n(s.data,s.ts)),s={data:t,ts:e}},stop:async()=>{null!=s&&(function(t,e,r){let s=t.length-1,n=Math.min(r/2,s);for(let r=0;rr.addSample(u,t.data,t))}else if("samples"===t){let{id:t,type:e,samples:n}=s;if("video"===e){n.forEach(e=>r.addSample(t,e.data,e)),f||await m(n);return}"audio"===e&&await g(n)}}}),s}var rs=/* @__PURE__ */function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var r=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(r,1),r>-1},e.trigger=function(t){var e=this.listeners[t];if(e){if(2==arguments.length)for(var r=e.length,s=0;stypeof window?tO=window:"u">typeof iU?tO=iU:"u">typeof self?tO=self:tO={};let ra=/* @__PURE__ */ix(tO);/*! @name m3u8-parser @version 7.1.0 @license Apache-2.0 */class ro extends rs{constructor(){super(),this.buffer=""}push(t){let e;for(this.buffer+=t,e=this.buffer.indexOf(` `);e>-1;e=this.buffer.indexOf(` `))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)}}let rh=function(t){let e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),r={};return e[1]&&(r.length=parseInt(e[1],10)),e[2]&&(r.offset=parseInt(e[2],10)),r},rl=function(t){let e={};if(!t)return e;let r=t.split(RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),s=r.length,n;for(;s--;)""!==r[s]&&((n=/([^=]*)=(.*)/.exec(r[s]).slice(1))[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),e[n[0]]=n[1]);return e};class ru extends rs{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(t){let e,r;if(0!==(t=t.trim()).length){if("#"!==t[0]){this.trigger("data",{type:"uri",uri:t});return}this.tagMappers.reduce((e,r)=>{let s=r(t);return s===t?e:e.concat([s])},[t]).forEach(t=>{for(let e=0;et),this.customParsers.push(n=>{if(t.exec(n))return this.trigger("data",{type:"custom",data:r(n),customType:e,segment:s}),!0})}addTagMapper({expression:t,map:e}){this.tagMappers.push(r=>t.test(r)?e(r):r)}}let rd=t=>t.toLowerCase().replace(/-(\w)/g,t=>t[1].toUpperCase()),rf=function(t){let e={};return Object.keys(t).forEach(function(r){e[rd(r)]=t[r]}),e},rp=function(t){let{serverControl:e,targetDuration:r,partTargetDuration:s}=t;if(!e)return;let n="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",h=r&&3*r,l=s&&2*s;r&&!e.hasOwnProperty(a)&&(e[a]=h,this.trigger("info",{message:`${n} defaulting HOLD-BACK to targetDuration * 3 (${h}).`})),h&&e[a]{!r.uri&&(r.parts||r.preloadHints)&&(!r.map&&s&&(r.map=s),!r.key&&n&&(r.key=n),r.timeline||"number"!=typeof l||(r.timeline=l),this.manifest.preloadSegment=r)}),this.parseStream.on("data",function(p){let c,m;({tag(){(({version(){p.version&&(this.manifest.version=p.version)},"allow-cache"(){this.manifest.allowCache=p.allowed,"allowed"in p||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){let t={};"length"in p&&(r.byterange=t,t.length=p.length,"offset"in p||(p.offset=u)),"offset"in p&&(r.byterange=t,t.offset=p.offset),u=t.offset+t.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),p.title&&(r.title=p.title),p.duration>0&&(r.duration=p.duration),0===p.duration&&(r.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=e},key(){if(!p.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if("NONE"===p.attributes.METHOD){n=null;return}if(!p.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if("com.apple.streamingkeydelivery"===p.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:p.attributes};return}if("com.microsoft.playready"===p.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:p.attributes.URI};return}if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===p.attributes.KEYFORMAT){if(-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(p.attributes.METHOD)){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if("SAMPLE-AES-CENC"===p.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==p.attributes.URI.substring(0,23)){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(p.attributes.KEYID&&"0x"===p.attributes.KEYID.substring(0,2))){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:p.attributes.KEYFORMAT,keyId:p.attributes.KEYID.substring(2)},pssh:function(t){for(var e=ra.atob?ra.atob(t):ep.from(t,"base64").toString("binary"),r=new Uint8Array(e.length),s=0;stypeof p.attributes.IV&&(n.iv=p.attributes.IV)},"media-sequence"(){if(!isFinite(p.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+p.number});return}this.manifest.mediaSequence=p.number},"discontinuity-sequence"(){if(!isFinite(p.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+p.number});return}this.manifest.discontinuitySequence=p.number,l=p.number},"playlist-type"(){if(!/VOD|EVENT/.test(p.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+p.playlist});return}this.manifest.playlistType=p.playlistType},map(){s={},p.uri&&(s.uri=p.uri),p.byterange&&(s.byterange=p.byterange),n&&(s.key=n)},"stream-inf"(){if(this.manifest.playlists=e,this.manifest.mediaGroups=this.manifest.mediaGroups||h,!p.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}r.attributes||(r.attributes={}),rn(r.attributes,p.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(p.attributes&&p.attributes.TYPE&&p.attributes["GROUP-ID"]&&p.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}let t=this.manifest.mediaGroups[p.attributes.TYPE];t[p.attributes["GROUP-ID"]]=t[p.attributes["GROUP-ID"]]||{},c=t[p.attributes["GROUP-ID"]],(m={default:/yes/i.test(p.attributes.DEFAULT)}).default?m.autoselect=!0:m.autoselect=/yes/i.test(p.attributes.AUTOSELECT),p.attributes.LANGUAGE&&(m.language=p.attributes.LANGUAGE),p.attributes.URI&&(m.uri=p.attributes.URI),p.attributes["INSTREAM-ID"]&&(m.instreamId=p.attributes["INSTREAM-ID"]),p.attributes.CHARACTERISTICS&&(m.characteristics=p.attributes.CHARACTERISTICS),p.attributes.FORCED&&(m.forced=/yes/i.test(p.attributes.FORCED)),c[p.attributes.NAME]=m},discontinuity(){l+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(e.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=p.dateTimeString,this.manifest.dateTimeObject=p.dateTimeObject),r.dateTimeString=p.dateTimeString,r.dateTimeObject=p.dateTimeObject;let{lastProgramDateTime:t}=this;this.lastProgramDateTime=new Date(p.dateTimeString).getTime(),null===t&&this.manifest.segments.reduceRight((t,e)=>(e.programDateTime=t-1e3*e.duration,e.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(p.duration)||p.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+p.duration});return}this.manifest.targetDuration=p.duration,rp.call(this,this.manifest)},start(){if(!p.attributes||isNaN(p.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:p.attributes["TIME-OFFSET"],precise:p.attributes.PRECISE}},"cue-out"(){r.cueOut=p.data},"cue-out-cont"(){r.cueOutCont=p.data},"cue-in"(){r.cueIn=p.data},skip(){this.manifest.skip=rf(p.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",p.attributes,["SKIPPED-SEGMENTS"])},part(){a=!0;let t=this.manifest.segments.length,e=rf(p.attributes);r.parts=r.parts||[],r.parts.push(e),e.byterange&&(e.byterange.hasOwnProperty("offset")||(e.byterange.offset=d),d=e.byterange.offset+e.byterange.length);let s=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${s} for segment #${t}`,p.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((t,e)=>{t.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${e} lacks required attribute(s): LAST-PART`})})},"server-control"(){let t=this.manifest.serverControl=rf(p.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),rp.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){let t=this.manifest.segments.length,e=rf(p.attributes),s=e.type&&"PART"===e.type;r.preloadHints=r.preloadHints||[],r.preloadHints.push(e),e.byterange&&(e.byterange.hasOwnProperty("offset")||(e.byterange.offset=s?d:0,s&&(d=e.byterange.offset+e.byterange.length)));let n=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${n} for segment #${t}`,p.attributes,["TYPE","URI"]),e.type)for(let s=0;st.id===e.id);this.manifest.dateRanges[t]=rn(this.manifest.dateRanges[t],e),f[e.id]=rn(f[e.id],e),this.manifest.dateRanges.pop()}else f[e.id]=e},"independent-segments"(){this.manifest.independentSegments=!0},"content-steering"(){this.manifest.contentSteering=rf(p.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",p.attributes,["SERVER-URI"])}})[p.tagType]||o).call(t)},uri(){r.uri=p.uri,e.push(r),!this.manifest.targetDuration||"duration"in r||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),r.duration=this.manifest.targetDuration),n&&(r.key=n),r.timeline=l,s&&(r.map=s),d=0,null!==this.lastProgramDateTime&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1e3*r.duration),r={}},comment(){},custom(){p.segment?(r.custom=r.custom||{},r.custom[p.customType]=p.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[p.customType]=p.data)}})[p.type].call(t)})}warnOnMissingAttributes_(t,e,r){let s=[];r.forEach(function(t){e.hasOwnProperty(t)||s.push(t)}),s.length&&this.trigger("warn",{message:`${t} lacks required attribute(s): ${s.join(", ")}`})}push(t){this.lineStream.push(t)}end(){this.lineStream.push(` `),this.manifest.dateRanges.length&&null===this.lastProgramDateTime&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(t){this.parseStream.addParser(t)}addTagMapper(t){this.parseStream.addTagMapper(t)}}async function rm(t,e=10){let r=new rc;r.push(await (await fetch(t)).text()),r.end();let s=r.manifest.segments.reduce((t,e)=>(t[e.map.uri]=t[e.map.uri]??[],t[e.map.uri].push(e),t),{}),n=new URL(t,location.href),a={};async function o(t,r,s){async function o(t){return(await fetch(t)).arrayBuffer()}let h=function(e){let n=0,a=0,o=[];async function h(){if(na[t]=o(t))}}async function h(t){let e=await a[t];return delete a[t],e}return{load(t=0,e=1/0){let r={},a=0,l=0;for(let[n,o]of Object.entries(s)){let s=0,h=[],u=-1,d=-1;for(let r=0;rt/1e6&&(u=r,a=(s-n.duration)*1e6),u>-1&&-1===d&&s>=e/1e6){d=r+1,l=1e6*s;break}}e>=1e6*s&&(d=o.length,l=1e6*s),d>u&&(h=h.concat(o.slice(u,d))),h.length>0&&(r[n]={actualStartTime:a,actualEndTime:l,segments:h})}return 0===Object.keys(r).length?null:Object.entries(r).map(([t,{actualStartTime:e,actualEndTime:r,segments:s}])=>{let a=0,l=new i0;return{actualStartTime:e,actualEndTime:r,on:l.on,stream:new ReadableStream({start:async e=>{o(s,e,l),e.enqueue(new Uint8Array(await (await fetch(new URL(t,n).href)).arrayBuffer()))},pull:async t=>{let e=new URL(s[a].uri,n).href;t.enqueue(new Uint8Array(await h(e))),(a+=1)>=s.length&&(t.close(),l.destroy())}})}})}}}let rg=`#version 300 es layout (location = 0) in vec4 a_position; layout (location = 1) in vec2 a_texCoord; out vec2 v_texCoord; void main () { gl_Position = a_position; v_texCoord = a_texCoord; } `,ry=`#version 300 es precision mediump float; out vec4 FragColor; in vec2 v_texCoord; uniform sampler2D frameTexture; uniform vec3 keyColor; // \u{8272}\u{5EA6}\u{7684}\u{76F8}\u{4F3C}\u{5EA6}\u{8BA1}\u{7B97} uniform float similarity; // \u{900F}\u{660E}\u{5EA6}\u{7684}\u{5E73}\u{6ED1}\u{5EA6}\u{8BA1}\u{7B97} uniform float smoothness; // \u{964D}\u{4F4E}\u{7EFF}\u{5E55}\u{9971}\u{548C}\u{5EA6}\u{FF0C}\u{63D0}\u{9AD8}\u{62A0}\u{56FE}\u{51C6}\u{786E}\u{5EA6} uniform float spill; vec2 RGBtoUV(vec3 rgb) { return vec2( rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5, rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5 ); } void main() { // \u{83B7}\u{53D6}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{7684}rgba\u{503C} vec4 rgba = texture(frameTexture, v_texCoord); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{4E0E}\u{7EFF}\u{5E55}\u{50CF}\u{7D20}\u{7684}\u{8272}\u{5EA6}\u{5DEE}\u{503C} vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{4E0E}\u{7EFF}\u{5E55}\u{50CF}\u{7D20}\u{7684}\u{8272}\u{5EA6}\u{8DDD}\u{79BB}\u{FF08}\u{5411}\u{91CF}\u{957F}\u{5EA6}\u{FF09}, \u{8D8A}\u{76F8}\u{50CF}\u{5219}\u{8272}\u{5EA6}\u{8DDD}\u{79BB}\u{8D8A}\u{5C0F} float chromaDist = sqrt(dot(chromaVec, chromaVec)); // \u{8BBE}\u{7F6E}\u{4E86}\u{4E00}\u{4E2A}\u{76F8}\u{4F3C}\u{5EA6}\u{9608}\u{503C}\u{FF0C}baseMask\u{4E3A}\u{8D1F}\u{FF0C}\u{5219}\u{8868}\u{660E}\u{662F}\u{7EFF}\u{5E55}\u{FF0C}\u{4E3A}\u{6B63}\u{5219}\u{8868}\u{660E}\u{4E0D}\u{662F}\u{7EFF}\u{5E55} float baseMask = chromaDist - similarity; // \u{5982}\u{679C}baseMask\u{4E3A}\u{8D1F}\u{6570}\u{FF0C}fullMask\u{7B49}\u{4E8E}0\u{FF1B}baseMask\u{4E3A}\u{6B63}\u{6570}\u{FF0C}\u{8D8A}\u{5927}\u{FF0C}\u{5219}\u{900F}\u{660E}\u{5EA6}\u{8D8A}\u{4F4E} float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5); rgba.a = fullMask; // \u{8BBE}\u{7F6E}\u{900F}\u{660E}\u{5EA6} // \u{5982}\u{679C}baseMask\u{4E3A}\u{8D1F}\u{6570}\u{FF0C}spillVal\u{7B49}\u{4E8E}0\u{FF1B}baseMask\u{4E3A}\u{6574}\u{6570}\u{FF0C}\u{8D8A}\u{5C0F}\u{FF0C}\u{9971}\u{548C}\u{5EA6}\u{8D8A}\u{4F4E} float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5); float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{7684}\u{7070}\u{5EA6}\u{503C} rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal); FragColor = rgba; } `,r_=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1],rb=[0,1,0,0,1,0,1,0,1,1,0,1];function rw(t,e,r){let s=t.createShader(e);if(t.shaderSource(s,r),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS)){let e=t.getShaderInfoLog(s);throw t.deleteShader(s),Error(e??"An error occurred compiling the shaders")}return s}let rv=t=>{let e=null,r=null,s=t.keyColor,n=null;return async a=>{var o,h;if((null==e||null==r||null==n)&&(null==s&&(s=function(t){let e=new OffscreenCanvas(1,1).getContext("2d");e.drawImage(t,0,0);let{data:[r,s,n]}=e.getImageData(0,0,1,1);return[r,s,n]}(a)),{cvs:e,gl:r}=function(t){let e="document"in globalThis?globalThis.document.createElement("canvas"):new OffscreenCanvas(t.width,t.height);e.width=t.width,e.height=t.height;let r=e.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0});if(null==r)throw Error("Cant create gl context");let s=function(t,e,r){let s=rw(t,t.VERTEX_SHADER,e),n=rw(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,s),t.attachShader(a,n),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw Error(t.getProgramInfoLog(a)??"Unable to initialize the shader program");return a}(r,rg,ry);r.useProgram(s),r.uniform3fv(r.getUniformLocation(s,"keyColor"),t.keyColor.map(t=>t/255)),r.uniform1f(r.getUniformLocation(s,"similarity"),t.similarity),r.uniform1f(r.getUniformLocation(s,"smoothness"),t.smoothness),r.uniform1f(r.getUniformLocation(s,"spill"),t.spill);let n=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,n),r.bufferData(r.ARRAY_BUFFER,new Float32Array(r_),r.STATIC_DRAW);let a=r.getAttribLocation(s,"a_position");r.vertexAttribPointer(a,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(a);let o=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,new Float32Array(rb),r.STATIC_DRAW);let h=r.getAttribLocation(s,"a_texCoord");return r.vertexAttribPointer(h,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(h),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1),{cvs:e,gl:r}}({...a instanceof VideoFrame?{width:a.codedWidth,height:a.codedHeight}:{width:a.width,height:a.height},keyColor:s,...t}),n=function(t){let e=t.createTexture();if(null==e)throw Error("Create WebGL texture error");t.bindTexture(t.TEXTURE_2D,e);let r=t.RGBA,s=t.RGBA,n=t.UNSIGNED_BYTE,a=new Uint8Array([0,0,255,255]);return t.texImage2D(t.TEXTURE_2D,0,r,1,1,0,s,n,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}(r)),o=r,h=n,o.bindTexture(o.TEXTURE_2D,h),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,o.RGBA,o.UNSIGNED_BYTE,a),o.drawArrays(o.TRIANGLES,0,6),null!=globalThis.VideoFrame&&a instanceof globalThis.VideoFrame){let t=new VideoFrame(e,{alpha:"keep",timestamp:a.timestamp,duration:a.duration??void 0});return a.close(),t}return createImageBitmap(e,{imageOrientation:a instanceof ImageBitmap?"flipY":"none"})}},rS=class t{constructor(t,e,r,s,n){ew(this,tX),ew(this,tN,new i0),ey(this,"on",eb(this,tN).on),ew(this,tG,0),ew(this,tY,0),ew(this,tW,0),ew(this,tV,0),ew(this,tH,0),ey(this,"master",null),ey(this,"fixedAspectRatio",!1),this.x=t??0,this.y=e??0,this.w=r??0,this.h=s??0,this.master=n??null}get x(){return eb(this,tG)}set x(t){eS(this,tX,tj).call(this,"x",t)}get y(){return eb(this,tY)}set y(t){eS(this,tX,tj).call(this,"y",t)}get w(){return eb(this,tW)}set w(t){eS(this,tX,tj).call(this,"w",t)}get h(){return eb(this,tV)}set h(t){eS(this,tX,tj).call(this,"h",t)}get angle(){return eb(this,tH)}set angle(t){eS(this,tX,tj).call(this,"angle",t)}get center(){let{x:t,y:e,w:r,h:s}=this;return{x:t+r/2,y:e+s/2}}get ctrls(){let{w:e,h:r}=this,s=t.CTRL_SIZE,n=s/2,a=e/2,o=r/2,h=1.5*s,l=h/2;return{...this.fixedAspectRatio?{}:{t:new t(-n,-o-n,s,s,this),b:new t(-n,o-n,s,s,this),l:new t(-a-n,-n,s,s,this),r:new t(a-n,-n,s,s,this)},lt:new t(-a-n,-o-n,s,s,this),lb:new t(-a-n,o-n,s,s,this),rt:new t(a-n,-o-n,s,s,this),rb:new t(a-n,o-n,s,s,this),rotate:new t(-l,-o-2*s-l,h,h,this)}}clone(){let{x:e,y:r,w:s,h:n,master:a}=this,o=new t(e,r,s,n,a);return o.angle=this.angle,o.fixedAspectRatio=this.fixedAspectRatio,o}checkHit(t,e){let{angle:r,center:s,x:n,y:a,w:o,h:h,master:l}=this,u=(null==l?void 0:l.center)??s,d=(null==l?void 0:l.angle)??r;null==l&&(n-=u.x,a-=u.y);let f=t-u.x,p=e-u.y,c=f,m=p;return 0!==d&&(c=f*Math.cos(d)+p*Math.sin(d),m=p*Math.cos(d)-f*Math.sin(d)),!(cn+o||ma+h)}};tN=new WeakMap,tG=new WeakMap,tY=new WeakMap,tW=new WeakMap,tV=new WeakMap,tH=new WeakMap,tX=new WeakSet,tj=function(t,e){let r=this[t]!==e;switch(t){case"x":ev(this,tG,e);break;case"y":ev(this,tY,e);break;case"w":ev(this,tW,e);break;case"h":ev(this,tV,e);break;case"angle":ev(this,tH,e)}r&&eb(this,tN).emit("propsChange",{[t]:e})},ey(rS,"CTRL_SIZE",16),ey(rS,"CTRL_KEYS",["t","b","l","r","lt","lb","rt","rb","rotate"]);let rE=rS;class rU{constructor(){ey(this,"rect",new rE),ey(this,"time",{offset:0,duration:0}),ey(this,"visible",!0),ew(this,tZ,new i0),ey(this,"on",eb(this,tZ).on),ew(this,t$,0),ey(this,"opacity",1),ey(this,"flip",null),ew(this,tK,null),ew(this,tq,null),ey(this,"ready",Promise.resolve()),this.rect.on("propsChange",t=>{eb(this,tZ).emit("propsChange",{rect:t})})}get zIndex(){return eb(this,t$)}set zIndex(t){let e=eb(this,t$)!==t;ev(this,t$,t),e&&eb(this,tZ).emit("propsChange",{zIndex:t})}_render(t){let{rect:{center:e,angle:r}}=this;t.setTransform("horizontal"===this.flip?-1:1,0,0,"vertical"===this.flip?-1:1,e.x,e.y),t.rotate((null==this.flip?1:-1)*r),t.globalAlpha=this.opacity}setAnimation(t,e){ev(this,tK,Object.entries(t).map(([t,e])=>{let r={from:0,to:100}[t]??Number(t.slice(0,-1));if(isNaN(r)||r>100||r<0)throw Error("keyFrame must between 0~100");return[r/100,e]})),ev(this,tq,Object.assign({},eb(this,tq),{duration:1e6*e.duration,delay:(e.delay??0)*1e6,iterCount:e.iterCount??1/0}))}animate(t){if(null==eb(this,tK)||null==eb(this,tq)||t=r.iterCount)return{};let s=t%r.duration,n=t===r.duration?1:s/r.duration,a=e.findIndex(t=>t[0]>=n);if(-1===a)return{};let o=e[a-1],h=e[a],l=h[1];if(null==o)return l;let u=o[1],d={},f=(n-o[0])/(h[0]-o[0]);for(let t in l)null!=u[t]&&(d[t]=(l[t]-u[t])*f+u[t]);return d}(t,eb(this,tK),eb(this,tq));for(let t in e)switch(t){case"opacity":this.opacity=e[t];break;case"x":case"y":case"w":case"h":case"angle":this.rect[t]=e[t]}}copyStateTo(t){ev(t,tK,eb(this,tK)),ev(t,tq,eb(this,tq)),t.visible=this.visible,t.zIndex=this.zIndex,t.opacity=this.opacity,t.flip=this.flip,t.rect=this.rect.clone(),t.time={...this.time}}destroy(){eb(this,tZ).destroy()}}tZ=new WeakMap,t$=new WeakMap,tK=new WeakMap,tq=new WeakMap;let rx=class t extends rU{constructor(t){super(),ew(this,tQ),ew(this,tJ,null),ew(this,t0,!1),ev(this,tQ,t),this.ready=t.ready.then(({width:t,height:e,duration:r})=>{this.rect.w=0===this.rect.w?t:this.rect.w,this.rect.h=0===this.rect.h?e:this.rect.h,this.time.duration=0===this.time.duration?r:this.time.duration})}async offscreenRender(t,e){var r;this.animate(e),super._render(t);let{w:s,h:n}=this.rect,{video:a,audio:o,state:h}=await eb(this,tQ).tick(e);if("done"===h)return{audio:o??[],done:!0};let l=a??eb(this,tJ);return null!=l&&t.drawImage(l,-s/2,-n/2,s,n),null!=a&&(null==(r=eb(this,tJ))||r.close(),ev(this,tJ,a)),{audio:o??[],done:!1}}async clone(){let e=new t(await eb(this,tQ).clone());return await e.ready,this.copyStateTo(e),e}destroy(){var t;eb(this,t0)||(ev(this,t0,!0),e5.info("OffscreenSprite destroy"),super.destroy(),null==(t=eb(this,tJ))||t.close(),ev(this,tJ,null),eb(this,tQ).destroy())}};tQ=new WeakMap,tJ=new WeakMap,t0=new WeakMap;let rT=rx;class rA extends rU{constructor(t){super(),ew(this,t8),ew(this,t1),ew(this,t2,null),ew(this,t3,[]),ew(this,t6,!1),ew(this,t5,-1),ew(this,t9,!1),ev(this,t1,t),this.ready=t.ready.then(({width:t,height:e,duration:r})=>{this.rect.w=0===this.rect.w?t:this.rect.w,this.rect.h=0===this.rect.h?e:this.rect.h,this.time.duration=0===this.time.duration?r:this.time.duration})}getClip(){return eb(this,t1)}preFrame(t){eS(this,t8,t4).call(this,t)}render(t,e){this.animate(e),super._render(t);let{w:r,h:s}=this.rect;eb(this,t5)!==e&&eS(this,t8,t4).call(this,e),ev(this,t5,e);let n=eb(this,t3);ev(this,t3,[]);let a=eb(this,t2);return null!=a&&t.drawImage(a,-r/2,-s/2,r,s),{audio:n}}destroy(){var t;eb(this,t9)||(ev(this,t9,!0),e5.info("VisibleSprite destroy"),super.destroy(),null==(t=eb(this,t2))||t.close(),ev(this,t2,null),eb(this,t1).destroy())}}t1=new WeakMap,t2=new WeakMap,t3=new WeakMap,t6=new WeakMap,t8=new WeakSet,t4=function(t){eb(this,t6)||(ev(this,t6,!0),eb(this,t1).tick(t).then(({video:t,audio:e})=>{var r;null!=t&&(null==(r=eb(this,t2))||r.close(),ev(this,t2,t??null)),ev(this,t3,e??[])}).finally(()=>{ev(this,t6,!1)}))},t5=new WeakMap,t9=new WeakMap;let rC=0;async function rI(t){t()>50&&(await iv(15),await rI(t))}class rB{constructor(t={}){ew(this,eh),ew(this,t7,e5.create(`id:${rC++},`)),ew(this,et,!1),ew(this,ee,[]),ew(this,ei),ew(this,er),ew(this,es,null),ew(this,en),ew(this,ea),ew(this,eo,new i0),ey(this,"on",eb(this,eo).on);let{width:e=0,height:r=0}=t;ev(this,ei,new OffscreenCanvas(e,r));let s=eb(this,ei).getContext("2d",{alpha:!1});if(null==s)throw Error("Can not create 2d offscreen context");ev(this,er,s),ev(this,en,Object.assign({bgColor:"#000",width:0,height:0,videoCodec:"avc1.42E032",audio:!0,bitrate:5e6,metaDataTags:null},t)),ev(this,ea,e*r>0)}static async isSupported(t={videoCodec:"avc1.42E032"}){return null!=self.OffscreenCanvas&&null!=self.VideoEncoder&&null!=self.VideoDecoder&&null!=self.VideoFrame&&null!=self.AudioEncoder&&null!=self.AudioDecoder&&null!=self.AudioData&&((await self.VideoEncoder.isConfigSupported({codec:t.videoCodec,width:1280,height:720})).supported??!1)&&(await self.AudioEncoder.isConfigSupported({codec:iC.codec,sampleRate:iC.sampleRate,numberOfChannels:iC.channelCount})).supported}async addSprite(t,e={}){eb(this,t7).info("Combinator add sprite",t);let r=await t.clone();eb(this,t7).info("Combinator add sprite ready",t),eb(this,ee).push(Object.assign(r,{main:e.main??!1,expired:!1})),eb(this,ee).sort((t,e)=>t.zIndex-e.zIndex)}output(){if(0===eb(this,ee).length)throw Error("No sprite added");let t=eb(this,ee).find(t=>t.main),e=null!=t?t.time.offset+t.time.duration:Math.max(...eb(this,ee).map(t=>t.time.offset+t.time.duration));if(e===1/0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of ImgClip, AudioCli");-1===e&&eb(this,t7).warn("Unable to determine the end time, process value don't update"),eb(this,t7).info(`start combinate video, maxTime:${e}`);let r=eS(this,eh,el).call(this,e),s=performance.now(),n=eS(this,eh,eu).call(this,r,e,{onProgress:t=>{eb(this,t7).debug("OutputProgress:",t),eb(this,eo).emit("OutputProgress",t)},onEnded:async()=>{await r.flush(),eb(this,t7).info("===== output ended =====, cost:",performance.now()-s),eb(this,eo).emit("OutputProgress",1),this.destroy()},onError:t=>{eb(this,eo).emit("error",t),o(t),this.destroy()}});ev(this,es,()=>{n(),r.close(),o()});let{stream:a,stop:o}=i9(r.mp4file,500,this.destroy);return a}destroy(){var t;eb(this,et)||(ev(this,et,!0),null==(t=eb(this,es))||t.call(this),eb(this,eo).destroy())}}t7=new WeakMap,et=new WeakMap,ee=new WeakMap,ei=new WeakMap,er=new WeakMap,es=new WeakMap,en=new WeakMap,ea=new WeakMap,eo=new WeakMap,eh=new WeakSet,el=function(t){let{width:e,height:r,videoCodec:s,bitrate:n,audio:a,metaDataTags:o}=eb(this,en);return i4({video:eb(this,ea)?{width:e,height:r,expectFPS:30,codec:s,bitrate:n,__unsafe_hardwareAcceleration__:eb(this,en).__unsafe_hardwareAcceleration__}:null,audio:!1===a?null:{codec:"aac",sampleRate:iC.sampleRate,channelCount:iC.channelCount},duration:t,metaDataTags:o})},eu=function(t,e,{onProgress:r,onEnded:s,onError:n}){let a=0,o=!1,h=null;(async()=>{let r=0,{width:n,height:l}=eb(this,ei),d=eb(this,er),f=0;for(;;){if(null!=h)return;if(o||-1!==e&&f>e||0===eb(this,ee).length){u(),await s();return}a=f/e,d.fillStyle=eb(this,en).bgColor,d.fillRect(0,0,n,l);let p=[];for(let t of eb(this,ee)){if(o)break;if(f0&&f>t.time.offset+t.time.duration||r){if(t.main){u(),await s();return}t.destroy(),t.expired=!0}}if(o)return;if(!1!==eb(this,en).audio){if(p.flat().every(t=>0===t.length))t.encodeAudio(function(t,e,r){let s=Math.floor(33e3*r/1e6);return new AudioData({timestamp:t,numberOfChannels:iC.channelCount,numberOfFrames:s,sampleRate:r,format:"f32-planar",data:new Float32Array(2*s)})}(f,0,iC.sampleRate));else{let e=ib(p);t.encodeAudio(new AudioData({timestamp:f,numberOfChannels:iC.channelCount,numberOfFrames:e.length/iC.channelCount,sampleRate:iC.sampleRate,format:"f32-planar",data:e}))}}if(eb(this,ea)){let e=new VideoFrame(eb(this,ei),{duration:33e3,timestamp:f});t.encodeVideo(e,{keyFrame:r%150==0}),d.resetTransform(),d.clearRect(0,0,n,l),r+=1}f+=33e3,await rI(t.getEncodeQueueSize)}})().catch(t=>{h=t,eb(this,t7).error(t),u(),n(t)});let l=setInterval(()=>{r(a)},500),u=()=>{o||(o=!0,clearInterval(l),eb(this,ee).forEach(t=>t.destroy()))};return u}},{"718a311db185ef08":"juSMc","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],juSMc:[function(t,e,r){var s=t("9c62938f1dccc73c"),n=t("aceacb6a4531a9d2"),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return d(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!h.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|m(t,e),s=o(r),n=s.write(t,e);return n!==r&&(s=s.slice(0,n)),s}(t,e);if(ArrayBuffer.isView(t))return function(t){if(B(t,Uint8Array)){var e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(B(t,SharedArrayBuffer)||t&&B(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var s=t.valueOf&&t.valueOf();if(null!=s&&s!==t)return h.from(s,e,r);var n=function(t){if(h.isBuffer(t)){var e,r=0|c(t.length),s=o(r);return 0===s.length||t.copy(s,0,0,r),s}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?o(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return u(t),o(t<0?0:0|c(t))}function f(t){for(var e=t.length<0?0:0|c(t.length),r=o(e),s=0;s=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function m(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return A(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return C(t).length;default:if(n)return s?-1:A(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n,a,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var s=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>s)&&(r=s);for(var n="",a=e;a2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(a=r=+r)!=a&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return -1;r=t.length-1}else if(r<0){if(!n)return -1;r=0}if("string"==typeof e&&(e=h.from(e,s)),h.isBuffer(e))return 0===e.length?-1:b(t,e,r,s,n);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,s,n);throw TypeError("val must be string, number or Buffer")}function b(t,e,r,s,n){var a,o=1,h=t.length,l=e.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(t.length<2||e.length<2)return -1;o=2,h/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){var d=-1;for(a=r;ah&&(r=h-l),a=r;a>=0;a--){for(var f=!0,p=0;p239?4:u>223?3:u>191?2:1;if(n+f<=r)switch(f){case 1:u<128&&(d=u);break;case 2:(192&(a=t[n+1]))==128&&(l=(31&u)<<6|63&a)>127&&(d=l);break;case 3:a=t[n+1],o=t[n+2],(192&a)==128&&(192&o)==128&&(l=(15&u)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:a=t[n+1],o=t[n+2],h=t[n+3],(192&a)==128&&(192&o)==128&&(192&h)==128&&(l=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&h)>65535&&l<1114112&&(d=l)}null===d?(d=65533,f=1):d>65535&&(d-=65536,s.push(d>>>10&1023|55296),d=56320|1023&d),s.push(d),n+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",s=0;sr)throw RangeError("Trying to access beyond buffer length")}function S(t,e,r,s,n,a){if(!h.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw RangeError("Index out of range")}function E(t,e,r,s,n,a){if(r+s>t.length||r<0)throw RangeError("Index out of range")}function U(t,e,r,s,a){return e=+e,r>>>=0,a||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),n.write(t,e,r,s,23,4),r+4}function x(t,e,r,s,a){return e=+e,r>>>=0,a||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),n.write(t,e,r,s,52,8),r+8}r.Buffer=h,r.SlowBuffer=function(t){return+t!=t&&(t=0),h.alloc(+t)},r.INSPECT_MAX_BYTES=50,r.kMaxLength=2147483647,h.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,r){return(u(t),t<=0)?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},h.allocUnsafe=function(t){return d(t)},h.allocUnsafeSlow=function(t){return d(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(B(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),B(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,s=e.length,n=0,a=Math.min(r,s);ns.length?h.from(a).copy(s,n):Uint8Array.prototype.set.call(s,a,n);else if(h.isBuffer(a))a.copy(s,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=a.length}return s},h.byteLength=m,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;ee&&(t+=" ... "),""},a&&(h.prototype[a]=h.prototype.inspect),h.prototype.compare=function(t,e,r,s,n){if(B(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),e<0||r>t.length||s<0||n>this.length)throw RangeError("out of range index");if(s>=n&&e>=r)return 0;if(s>=n)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,s>>>=0,n>>>=0,this===t)return 0;for(var a=n-s,o=r-e,l=Math.min(a,o),u=this.slice(s,n),d=t.slice(e,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===s&&(s="utf8")):(s=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,a,o,h,l,u,d,f,p=this.length-e;if((void 0===r||r>p)&&(r=p),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");s||(s="utf8");for(var c=!1;;)switch(s){case"hex":return function(t,e,r,s){r=Number(r)||0;var n=t.length-r;s?(s=Number(s))>n&&(s=n):s=n;var a=e.length;s>a/2&&(s=a/2);for(var o=0;o>8,n.push(r%256),n.push(s);return n}(t,this.length-d),this,d,f);default:if(c)throw TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),c=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},h.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||v(t,e,this.length);for(var s=this[t],n=1,a=0;++a>>=0,e>>>=0,r||v(t,e,this.length);for(var s=this[t+--e],n=1;e>0&&(n*=256);)s+=this[t+--e]*n;return s},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||v(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var s=this[t],n=1,a=0;++a=(n*=128)&&(s-=Math.pow(2,8*e)),s},h.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var s=e,n=1,a=this[t+--s];s>0&&(n*=256);)a+=this[t+--s]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*e)),a},h.prototype.readInt8=function(t,e){return(t>>>=0,e||v(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||v(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){t>>>=0,e||v(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return t>>>=0,e||v(t,4,this.length),n.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||v(t,4,this.length),n.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||v(t,8,this.length),n.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||v(t,8,this.length),n.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,r,s){if(t=+t,e>>>=0,r>>>=0,!s){var n=Math.pow(2,8*r)-1;S(this,t,e,r,n,0)}var a=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!s){var n=Math.pow(2,8*r)-1;S(this,t,e,r,n,0)}var a=r-1,o=1;for(this[e+a]=255&t;--a>=0&&(o*=256);)this[e+a]=t/o&255;return e+r},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeIntLE=function(t,e,r,s){if(t=+t,e>>>=0,!s){var n=Math.pow(2,8*r-1);S(this,t,e,r,n-1,-n)}var a=0,o=1,h=0;for(this[e]=255&t;++a>0)-h&255;return e+r},h.prototype.writeIntBE=function(t,e,r,s){if(t=+t,e>>>=0,!s){var n=Math.pow(2,8*r-1);S(this,t,e,r,n-1,-n)}var a=r-1,o=1,h=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===h&&0!==this[e+a+1]&&(h=1),this[e+a]=(t/o>>0)-h&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return x(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return x(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,s){if(!h.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),s||0===s||(s=this.length),e>=t.length&&(e=t.length),e||(e=0),s>0&&s=this.length)throw RangeError("Index out of range");if(s<0)throw RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(n=e;n55295&&r<57344){if(!n){if(r>56319||o+1===s){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function C(t){return s.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function I(t,e,r,s){for(var n=0;n=e.length)&&!(n>=t.length);++n)e[n+r]=t[n];return n}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var k=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var s=16*r,n=0;n<16;++n)e[s+n]=t[r]+t[n];return e}()},{"9c62938f1dccc73c":"iaOvk",aceacb6a4531a9d2:"9RC4J"}],iaOvk:[function(t,e,r){r.byteLength=function(t){var e=u(t),r=e[0],s=e[1];return(r+s)*3/4-s},r.toByteArray=function(t){var e,r,s=u(t),o=s[0],h=s[1],l=new a((o+h)*3/4-h),d=0,f=h>0?o-4:o;for(r=0;r>16&255,l[d++]=e>>8&255,l[d++]=255&e;return 2===h&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[d++]=255&e),1===h&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[d++]=e>>8&255,l[d++]=255&e),l},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,a=[],o=0,h=r-n;o>18&63]+s[n>>12&63]+s[n>>6&63]+s[63&n]);return a.join("")}(t,o,o+16383>h?h:o+16383));return 1===n?a.push(s[(e=t[r-1])>>2]+s[e<<4&63]+"=="):2===n&&a.push(s[(e=(t[r-2]<<8)+t[r-1])>>10]+s[e>>4&63]+s[e<<2&63]+"="),a.join("")};for(var s=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,l=o.length;h0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var s=r===e?0:4-r%4;return[r,s]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],"9RC4J":[function(t,e,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh*/r.read=function(t,e,r,s,n){var a,o,h=8*n-s-1,l=(1<>1,d=-7,f=r?n-1:0,p=r?-1:1,c=t[e+f];for(f+=p,a=c&(1<<-d)-1,c>>=-d,d+=h;d>0;a=256*a+t[e+f],f+=p,d-=8);for(o=a&(1<<-d)-1,a>>=-d,d+=s;d>0;o=256*o+t[e+f],f+=p,d-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(c?-1:1);o+=Math.pow(2,s),a-=u}return(c?-1:1)*o*Math.pow(2,a-s)},r.write=function(t,e,r,s,n,a){var o,h,l,u=8*a-n-1,d=(1<>1,p=23===n?5960464477539062e-23:0,c=s?0:a-1,m=s?1:-1,g=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(h=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?e+=p/l:e+=p*Math.pow(2,1-f),e*l>=2&&(o++,l/=2),o+f>=d?(h=0,o=d):o+f>=1?(h=(e*l-1)*Math.pow(2,n),o+=f):(h=e*Math.pow(2,f-1)*Math.pow(2,n),o=0));n>=8;t[r+c]=255&h,c+=m,h/=256,n-=8);for(o=o<0;t[r+c]=255&o,c+=m,o/=256,u-=8);t[r+c-m]|=128*g}},{}],"9pCYc":[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}]},["jc2x7"],"jc2x7","parcelRequire4dc0"); \ No newline at end of file +!function(t,e,r,s,a,n,o,l){var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},d="function"==typeof h[s]&&h[s],u=d.i||{},p=d.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(e,r){if(!p[e]){if(!t[e]){if(a[e])return a[e];var n="function"==typeof h[s]&&h[s];if(!r&&n)return n(e,!0);if(d)return d(e,!0);if(c&&"string"==typeof e)return c(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}u.resolve=function(r){var s=t[e][1][r];return null!=s?s:r},u.cache={};var l=p[e]=new f.Module(e);t[e][0].call(l.exports,u,l,l.exports,h)}return p[e].exports;function u(t){var e=u.resolve(t);return!1===e?{}:f(e)}}f.isParcelRequire=!0,f.Module=function(t){this.id=t,this.bundle=f,this.require=c,this.exports={}},f.modules=t,f.cache=p,f.parent=d,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=u,f.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return h[s]}}),h[s]=f;for(var m=0;mo);var n=t("@webav/av-cliper");function o(t={}){return e=>{let r,s,{option:a,constructor:o}=e,{createElement:l,def:h}=o.utils,d=l("canvas"),u=d.getContext("2d"),p=null,c=null,f=null,m=null,_=0,g={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:a.muted,volume:a.volume,autoplay:a.autoplay};function y(){f&&(clearInterval(f),f=null),c&&(c.stop(),c=null)}function w(){if(s){let t=g.muted?0:g.volume;s.gain.setValueAtTime(t,r.currentTime)}}async function b(){r||(s=(r=new AudioContext).createGain()).connect(r.destination);let t=1e6*g.currentTime,a=0,n=!0,o=performance.now();async function l(){if(!g.playing)return;let l=performance.now(),h=l-o;o=l,null!==m?(t=1e6*m,m=null,n=!0):t+=1e3*h*g.playbackRate,g.currentTime=t/1e6;let{state:d,video:f,audio:_}=await p.tick(Math.round(t));if(e.emit("video:timeupdate",{type:"timeupdate"}),"done"===d){y(),g.ended=!0,g.playing=!1,g.paused=!0,e.emit("video:ended",{type:"ended"});return}if(f&&"success"===d&&(u.clearRect(0,0,g.videoWidth,g.videoHeight),u.drawImage(f,0,0,g.videoWidth,g.videoHeight),f.close()),n)n=!1;else if(_?.[0]?.length){let t=r.createBuffer(2,_[0].length,48e3);t.copyToChannel(_[0],0),t.copyToChannel(_[1],1),(c=r.createBufferSource()).buffer=t,c.connect(s),c.playbackRate.setValueAtTime(g.playbackRate,r.currentTime),a=Math.max(r.currentTime,a),c.start(a),a+=t.duration/g.playbackRate}}y(),w(),g.playing=!0,g.paused=!1,f=setInterval(l,1e3/60)}async function v(t){let{video:e}=await p.tick(1e6*t);e&&(u.clearRect(0,0,d.width,d.height),u.drawImage(e,0,0,d.width,d.height),e.close())}function S(){let t=e.template?.$player;if(!t||a.autoSize)return;let r=d.videoWidth/d.videoHeight,s=t.clientWidth,n=t.clientHeight,o=0,l=0;s/n>r?o=(s-n*r)/2:l=(n-s/r)/2,Object.assign(d.style,{padding:`${l}px ${o}px`})}async function x(){if(!await n.Combinator.isSupported())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");y(),Object.assign(g,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:a.muted,volume:a.volume,autoplay:a.autoplay}),p&&(p.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"}));try{await Promise.resolve(),g.readyState=1,e.emit("video:loadstart",{type:"loadstart"});let r=await fetch(a.url);if(!r.body)throw Error("No response body");p=new(0,n.MP4Clip)(r.body,t)}catch(t){throw g.readyState=0,e.emit("video:error",t),t}let r=await p.ready;Object.assign(g,{readyState:4,duration:Math.round(r.duration/1e6),videoWidth:r.width,videoHeight:r.height}),d.width=g.videoWidth,d.height=g.videoHeight,await v(.1),S(),e.emit("video:loadedmetadata",{type:"loadedmetadata"}),e.emit("video:durationchange",{type:"durationchange"}),e.emit("video:loadeddata",{type:"loadeddata"}),e.emit("video:canplay",{type:"canplay"}),e.emit("video:canplaythrough",{type:"canplaythrough"})}return h(d,"duration",{get:()=>g.duration}),h(d,"videoWidth",{get:()=>g.videoWidth}),h(d,"videoHeight",{get:()=>g.videoHeight}),h(d,"volume",{get:()=>g.volume,set:t=>{g.volume=Math.max(0,Math.min(1,t)),w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(d,"currentTime",{get:()=>g.currentTime,set:t=>{if(g.readyState<4)return;let r=Math.max(0,Math.min(t,g.duration)),s=performance.now();s-_>16&&(_=s,m=r,g.currentTime=r,g.playing||v(r),e.emit("video:timeupdate",{type:"timeupdate"}))}}),h(d,"autoplay",{get:()=>g.autoplay,set:t=>{g.autoplay=t,t&&g.readyState>=4&&d.play()}}),h(d,"src",{get:()=>a.url,set:t=>{a.url=t,x().then(()=>{a.autoplay&&d.play()})}}),h(d,"playbackRate",{get:()=>g.playbackRate,set:t=>{g.playbackRate=Math.max(.25,Math.min(2,t)),c&&c.playbackRate.setValueAtTime(g.playbackRate,r.currentTime),e.emit("video:ratechange",{type:"ratechange"})}}),h(d,"playing",{get:()=>g.playing}),h(d,"paused",{get:()=>g.paused}),h(d,"ended",{get:()=>g.ended}),h(d,"readyState",{get:()=>g.readyState}),h(d,"muted",{get:()=>g.muted,set:t=>{g.muted=t,w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(d,"buffered",{get:()=>({start:()=>0,end:()=>g.buffered,length:1})}),h(d,"play",{value:async()=>!(g.readyState<4)&&(await b(),e.emit("video:play",{type:"play"}),e.emit("video:playing",{type:"playing"}),!0)}),h(d,"pause",{value:()=>{y(),g.playing=!1,g.paused=!0,e.emit("video:pause",{type:"pause"})}}),e.on("destroy",()=>{y(),p&&p.destroy()}),e.on("resize",S),d}}"undefined"!=typeof window&&(window.artplayerProxyWebAV=o)},{"@webav/av-cliper":"4w9ns","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4w9ns":[function(t,e,r,s){var a,n,o,l,h,d,u,p,c,f,m,_,g,y,w,b,v,S,x,U,E,A,C,T,k,B,F,I,z,P,L,R,D,M,O,N,G,W,Y,H,V,j,Z,X,K,$,J,Q,q,tt,te,ti,tr,ts,ta,tn,to,tl,th,td,tu,tp,tc,tf,tm,t_,tg,ty,tw,tb,tv,tS,tx,tU,tE,tA,tC,tT,tk,tB,tF,tI,tz,tP,tL,tR,tD,tM,tO,tN,tG,tW,tY,tH,tV,tj,tZ,tX,tK,t$,tJ,tQ,tq,t0,t1,t2,t3,t6=t("@parcel/transformer-js/src/esmodule-helpers.js");t6.defineInteropFlag(r),t6.export(r,"AudioClip",()=>eO),t6.export(r,"Combinator",()=>ii),t6.export(r,"EmbedSubtitlesClip",()=>eH),t6.export(r,"ImgClip",()=>eD),t6.export(r,"Log",()=>t5.Log),t6.export(r,"MP4Clip",()=>eA),t6.export(r,"MediaStreamClip",()=>eW),t6.export(r,"OffscreenSprite",()=>e5),t6.export(r,"Rect",()=>e6),t6.export(r,"VisibleSprite",()=>e9),t6.export(r,"createChromakey",()=>e2),t6.export(r,"fastConcatMP4",()=>eZ),t6.export(r,"fixFMP4Duration",()=>eK),t6.export(r,"mixinMP4AndAudio",()=>e$),t6.export(r,"renderTxt2ImgBitmap",()=>eh);var t8=t("@webav/mp4box.js"),t4=t6.interopDefault(t8),t5=t("@webav/internal-utils"),t7=t("wave-resampler"),t9=t("opfs-tools"),et=Object.defineProperty,ee=t=>{throw TypeError(t)},ei=(t,e,r)=>e in t?et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,er=(t,e,r)=>ei(t,"symbol"!=typeof e?e+"":e,r),es=(t,e,r)=>e.has(t)||ee("Cannot "+r),ea=(t,e,r)=>(es(t,e,"read from private field"),r?r.call(t):e.get(t)),en=(t,e,r)=>e.has(t)?ee("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),eo=(t,e,r,s)=>(es(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r),el=(t,e,r)=>(es(t,e,"access private method"),r);async function eh(t,e){let r=function(t,e){let r=document.createElement("pre");r.style.cssText=`margin: 0; ${e}; visibility: hidden; position: fixed;`,r.textContent=t,document.body.appendChild(r);let{width:s,height:a}=r.getBoundingClientRect();r.remove(),r.style.visibility="visible";let n=new Image;n.width=s,n.height=a;let o=`
${r.outerHTML}
`.replace(/\t/g,"").replace(/#/g,"%23");return n.src=`data:image/svg+xml;charset=utf-8,${o}`,n}(t,e);await new Promise(t=>{r.onload=t});let s=new OffscreenCanvas(r.width,r.height),a=s.getContext("2d");return null==a||a.drawImage(r,0,0,r.width,r.height),await createImageBitmap(s)}function ed(t){let e=new Float32Array(t.map(t=>t.length).reduce((t,e)=>t+e)),r=0;for(let s of t)e.set(s,r),r+=s.length;return e}function eu(t){if("f32-planar"===t.format){let e=[];for(let r=0;rnew Float32Array(r));for(let a=0;anew Float32Array(r));for(let a=0;at.getChannelData(r))}async function ec(t,e){var r;let s=new ImageDecoder({type:e,data:t});await Promise.all([s.completed,s.tracks.ready]);let a=(null==(r=s.tracks.selectedTrack)?void 0:r.frameCount)??1,n=[];for(let t=0;t{var e;return(null==(e=t[0])?void 0:e.length)??0})),a=new Float32Array(2*s);for(let n=0;nnew Float32Array(0));if(0===s)return a;let n=Math.max(...t.map(t=>t.length));if(0===n)return a;if(null==globalThis.OfflineAudioContext)return t.map(t=>new Float32Array(t7.resample(t,e,r.rate,{method:"sinc",LPF:!1})));let o=new globalThis.OfflineAudioContext(r.chanCount,n*r.rate/e,r.rate),l=o.createBufferSource(),h=o.createBuffer(s,n,e);return t.forEach((t,e)=>h.copyToChannel(t,e)),l.buffer=h,l.connect(o.destination),l.start(),ep(await o.startRendering())}function e_(t){return new Promise(e=>{let r=(0,t5.workerTimer)(()=>{r(),e()},t)})}function eg(t,e,r){let s=r-e,a=new Float32Array(s),n=0;for(;n>7)],numberOfChannels:(127&a)>>3}}(e)}}return s}function ev(t,e="mp4a"){var r;let s=null==(r=t.moov)?void 0:r.traks.map(t=>t.mdia.minf.stbl.stsd.entries).flat().find(({type:t})=>t===e);return null==s?void 0:s.esds}async function eS(t,e,r){let s=t4.default.createFile(!1);async function a(){let e=0;for(;;){let r=await t.read(0x1e00000,{at:e});if(0===r.byteLength)break;r.fileStart=e;let a=s.appendBuffer(r);if(null==a)break;e=a}s.stop()}s.onReady=t=>{var r,a;e({mp4boxFile:s,info:t});let n=null==(r=t.videoTracks[0])?void 0:r.id;null!=n&&s.setExtractionOptions(n,"video",{nbSamples:100});let o=null==(a=t.audioTracks[0])?void 0:a.id;null!=o&&s.setExtractionOptions(o,"audio",{nbSamples:100}),s.start()},s.onSamples=r,await a()}let ex=0;function eU(t){return"file"===t.kind&&t.createReader instanceof Function}let eE=class t{constructor(t,e={}){if(en(this,a,ex++),en(this,n,t5.Log.create(`MP4Clip id:${ea(this,a)},`)),er(this,"ready"),en(this,o,!1),en(this,l,{duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0}),en(this,h),en(this,d,[]),en(this,u,1),en(this,p,[]),en(this,c,[]),en(this,f,null),en(this,m,null),en(this,_,{video:null,audio:null}),en(this,g,{audio:!0}),er(this,"tickInterceptor",async(t,e)=>e),en(this,y,new AbortController),!(t instanceof ReadableStream)&&!eU(t)&&!Array.isArray(t.videoSamples))throw Error("Illegal argument");eo(this,g,{audio:!0,...e}),eo(this,u,"object"==typeof e.audio&&"volume"in e.audio?e.audio.volume:1);let r=async t=>(await (0,t9.write)(ea(this,h),t),ea(this,h));eo(this,h,eU(t)?t:"localFile"in t?t.localFile:(0,t9.tmpfile)()),this.ready=(t instanceof ReadableStream?r(t).then(t=>eC(t,ea(this,g))):eU(t)?eC(t,ea(this,g)):Promise.resolve(t)).then(async({videoSamples:t,audioSamples:e,decoderConf:r,headerBoxPos:s})=>{var a,o,y,w,b;eo(this,p,t),eo(this,c,e),eo(this,_,r),eo(this,d,s);let{videoFrameFinder:v,audioFrameFinder:S}=(a={video:null==r.video?null:{...r.video,hardwareAcceleration:ea(this,g).__unsafe_hardwareAcceleration__},audio:r.audio},o=await ea(this,h).createReader(),y=t,w=e,{audioFrameFinder:0===(b=!1!==ea(this,g).audio?ea(this,u):0)||null==a.audio||0===w.length?null:new ek(o,w,a.audio,{volume:b,targetSampleRate:ew.sampleRate}),videoFrameFinder:null==a.video||0===y.length?null:new eT(o,y,a.video)});return eo(this,f,v),eo(this,m,S),eo(this,l,function(t,e,r){let s={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};null!=t.video&&e.length>0&&(s.width=t.video.codedWidth??0,s.height=t.video.codedHeight??0),null!=t.audio&&r.length>0&&(s.audioSampleRate=ew.sampleRate,s.audioChanCount=ew.channelCount);let a=0,n=0;if(e.length>0)for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r.deleted){a=r.cts+r.duration;break}}if(r.length>0){let t=r.at(-1);n=t.cts+t.duration}return s.duration=Math.max(a,n),s}(r,t,e)),ea(this,n).info("MP4Clip meta:",ea(this,l)),{...ea(this,l)}})}get meta(){return{...ea(this,l)}}async getFileHeaderBinData(){await this.ready;let t=await ea(this,h).getOriginFile();if(null==t)throw Error("MP4Clip localFile is not origin file");return await new Blob(ea(this,d).map(({start:e,size:r})=>t.slice(e,e+r))).arrayBuffer()}async tick(t){var e,r,s;if(t>=ea(this,l).duration)return await this.tickInterceptor(t,{audio:await (null==(e=ea(this,m))?void 0:e.find(t))??[],state:"done"});let[a,n]=await Promise.all([(null==(r=ea(this,m))?void 0:r.find(t))??[],null==(s=ea(this,f))?void 0:s.find(t)]);return null==n?await this.tickInterceptor(t,{audio:a,state:"success"}):await this.tickInterceptor(t,{video:n,audio:a,state:"success"})}async thumbnails(t=100,e){ea(this,y).abort(),eo(this,y,new AbortController);let r=ea(this,y).signal;await this.ready;let s="generate thumbnails aborted";if(r.aborted)throw Error(s);let{width:a,height:n}=ea(this,l),o=function(t,e,r){let s=new OffscreenCanvas(t,e),a=s.getContext("2d");return async n=>(a.drawImage(n,0,0,t,e),n.close(),await s.convertToBlob(r))}(t,Math.round(t/a*n),{quality:.1,type:"image/png"});return new Promise(async(t,a)=>{let n=[],d=ea(this,_).video;if(null==d||0===ea(this,p).length)return void u();async function u(){r.aborted||t(await Promise.all(n.map(async t=>({ts:t.ts,img:await t.img}))))}function c(t){n.push({ts:t.timestamp,img:o(t)})}r.addEventListener("abort",()=>{a(Error(s))});let{start:f=0,end:m=ea(this,l).duration,step:y}=e??{};if(y){let t=f,e=new eT(await ea(this,h).createReader(),ea(this,p),{...d,hardwareAcceleration:ea(this,g).__unsafe_hardwareAcceleration__});for(;t<=m&&!r.aborted;){let r=await e.find(t);r&&c(r),t+=y}e.destroy(),u()}else await ez(ea(this,p),ea(this,h),d,r,{start:f,end:m},(t,e)=>{null!=t&&c(t),e&&u()})})}async split(e){if(await this.ready,e<=0||e>=ea(this,l).duration)throw Error('"time" out of bounds');let[r,s]=function(t,e){if(0===t.length)return[];let r=0,s=0,a=-1;for(let n=0;n({...t}));for(let t=r;t({...t,cts:t.cts-e}));for(let t of l)t.cts<0&&(t.deleted=!0,t.cts=-1);return eP(l),[o,l]}(ea(this,p),e),[a,n]=function(t,e){if(0===t.length)return[];let r=-1;for(let s=0;st[s].cts)){r=s;break}if(-1===r)throw Error("Not found audio sample by time");return[t.slice(0,r).map(t=>({...t})),t.slice(r).map(t=>({...t,cts:t.cts-e}))]}(ea(this,c),e),o=new t({localFile:ea(this,h),videoSamples:r??[],audioSamples:a??[],decoderConf:ea(this,_),headerBoxPos:ea(this,d)},ea(this,g)),u=new t({localFile:ea(this,h),videoSamples:s??[],audioSamples:n??[],decoderConf:ea(this,_),headerBoxPos:ea(this,d)},ea(this,g));return await Promise.all([o.ready,u.ready]),[o,u]}async clone(){await this.ready;let e=new t({localFile:ea(this,h),videoSamples:[...ea(this,p)],audioSamples:[...ea(this,c)],decoderConf:ea(this,_),headerBoxPos:ea(this,d)},ea(this,g));return await e.ready,e.tickInterceptor=this.tickInterceptor,e}async splitTrack(){await this.ready;let e=[];if(ea(this,p).length>0){let r=new t({localFile:ea(this,h),videoSamples:[...ea(this,p)],audioSamples:[],decoderConf:{video:ea(this,_).video,audio:null},headerBoxPos:ea(this,d)},ea(this,g));await r.ready,r.tickInterceptor=this.tickInterceptor,e.push(r)}if(ea(this,c).length>0){let r=new t({localFile:ea(this,h),videoSamples:[],audioSamples:[...ea(this,c)],decoderConf:{audio:ea(this,_).audio,video:null},headerBoxPos:ea(this,d)},ea(this,g));await r.ready,r.tickInterceptor=this.tickInterceptor,e.push(r)}return e}destroy(){var t,e;ea(this,o)||(ea(this,n).info("MP4Clip destroy"),eo(this,o,!0),null==(t=ea(this,f))||t.destroy(),null==(e=ea(this,m))||e.destroy())}};a=new WeakMap,n=new WeakMap,o=new WeakMap,l=new WeakMap,h=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakMap,_=new WeakMap,g=new WeakMap,y=new WeakMap;let eA=eE;async function eC(t,e={}){let r=null,s={video:null,audio:null},a=[],n=[],o=[],l=-1,h=-1,d=await t.createReader();await eS(d,t=>{r=t.info;let e=t.mp4boxFile.ftyp;o.push({start:e.start,size:e.size});let a=t.mp4boxFile.moov;o.push({start:a.start,size:a.size});let{videoDecoderConf:n,audioDecoderConf:l}=eb(t.mp4boxFile,t.info);s.video=n??null,s.audio=l??null,null==n&&null==l&&t5.Log.error("MP4Clip no video and audio track"),t5.Log.info("mp4BoxFile moov ready",{...t.info,tracks:null,videoTracks:null,audioTracks:null},s)},(t,r,s)=>{if("video"===r)for(let t of(-1===l&&(l=s[0].dts),s))a.push(p(t,l,"video"));else if("audio"===r&&e.audio)for(let t of(-1===h&&(h=s[0].dts),s))n.push(p(t,h,"audio"))}),await d.close();let u=a.at(-1)??n.at(-1);if(null==r)throw Error("MP4Clip stream is done, but not emit ready");if(null==u)throw Error("MP4Clip stream not contain any sample");return eP(a),t5.Log.info("mp4 stream parsed"),{videoSamples:a,audioSamples:n,decoderConf:s,headerBoxPos:o};function p(t,e=0,r){let s="video"===r&&t.is_sync?function(t,e){if("avc1"!==e&&"hvc1"!==e)return 0;let r=new DataView(t.buffer),s=0;for(;s>1&63;if(19===t||20===t)return s}s+=r.getUint32(s)+4}return -1}(t.data,t.description.type):-1,a=t.offset,n=t.size;return s>=0&&(a+=s,n-=s),{...t,is_idr:s>=0,offset:a,size:n,cts:(t.cts-e)/t.timescale*1e6,dts:(t.dts-e)/t.timescale*1e6,duration:t.duration/t.timescale*1e6,timescale:1e6,data:"video"===r?null:t.data}}}class eT{constructor(t,e,r){en(this,w,null),en(this,b,0),en(this,v,{abort:!1,st:performance.now()}),er(this,"find",async t=>{(null==ea(this,w)||"closed"===ea(this,w).state||t<=ea(this,b)||t-ea(this,b)>3e6)&&ea(this,z).call(this,t),ea(this,v).abort=!0,eo(this,b,t),eo(this,v,{abort:!1,st:performance.now()});let e=await ea(this,B).call(this,t,ea(this,w),ea(this,v));return eo(this,T,0),e}),en(this,S,0),en(this,x,!1),en(this,U,0),en(this,E,[]),en(this,A,0),en(this,C,0),en(this,T,0),en(this,k,!1),en(this,B,async(t,e,r)=>{if(null==e||"closed"===e.state||r.abort)return null;if(ea(this,E).length>0){let s=ea(this,E)[0];return ts.timestamp+(s.duration??0)?(s.close(),await ea(this,B).call(this,t,e,r)):(!ea(this,k)&&ea(this,E).length<10&&ea(this,I).call(this,e).catch(e=>{throw eo(this,k,!0),ea(this,z).call(this,t),e}),s))}if(ea(this,F)||ea(this,A)0){if(performance.now()-r.st>6e3)throw Error(`MP4Clip.tick video timeout, ${JSON.stringify(ea(this,P).call(this))}`);eo(this,T,ea(this,T)+1),await e_(15)}else{if(ea(this,U)>=this.samples.length)return null;try{await ea(this,I).call(this,e)}catch(e){throw ea(this,z).call(this,t),e}}return await ea(this,B).call(this,t,e,r)}),en(this,F,!1),en(this,I,async t=>{var e,r;if(ea(this,F)||t.decodeQueueSize>600)return;let s=ea(this,U)+1;if(s>this.samples.length)return;eo(this,F,!0);let a=!1;for(;s1e3){let t=a[0],e=a.at(-1),r=e.offset+e.size-t.offset;t5.Log.warn(`Read video samples time cost: ${Math.round(n)}ms, file chunk size: ${r}`)}if("closed"===t.state)return;eo(this,S,(null==(r=s[0])?void 0:r.duration)??0),eI(t,s,{onDecodingError:t=>{if(ea(this,x))throw t;0===ea(this,A)&&(eo(this,x,!0),t5.Log.warn("Downgrade to software decode"),ea(this,z).call(this))}}),eo(this,C,ea(this,C)+s.length)}}eo(this,U,s),eo(this,F,!1)}),en(this,z,t=>{var e,r;if(eo(this,F,!1),ea(this,E).forEach(t=>t.close()),eo(this,E,[]),null==t||0===t)eo(this,U,0);else{let e=0;for(let r=0;r{if(eo(this,A,ea(this,A)+1),-1===t.timestamp)return void t.close();let e=t;null==t.duration&&(e=new VideoFrame(t,{duration:ea(this,S)}),t.close()),ea(this,E).push(e)},error:t=>{if(t.message.includes("Codec reclaimed due to inactivity")){eo(this,w,null),t5.Log.warn(t.message);return}let e=`VideoFinder VideoDecoder err: ${t.message}, config: ${JSON.stringify(s)}, state: ${JSON.stringify(ea(this,P).call(this))}`;throw t5.Log.error(e),Error(e)}})),ea(this,w).configure(s)}),en(this,P,()=>{var t,e;return{time:ea(this,b),decState:null==(t=ea(this,w))?void 0:t.state,decQSize:null==(e=ea(this,w))?void 0:e.decodeQueueSize,decCusorIdx:ea(this,U),sampleLen:this.samples.length,inputCnt:ea(this,C),outputCnt:ea(this,A),cacheFrameLen:ea(this,E).length,softDeocde:ea(this,x),clipIdCnt:ex,sleepCnt:ea(this,T),memInfo:eL()}}),er(this,"destroy",()=>{var t,e;(null==(t=ea(this,w))?void 0:t.state)!=="closed"&&(null==(e=ea(this,w))||e.close()),eo(this,w,null),ea(this,v).abort=!0,ea(this,E).forEach(t=>t.close()),eo(this,E,[]),this.localFileReader.close()}),this.localFileReader=t,this.samples=e,this.conf=r}}w=new WeakMap,b=new WeakMap,v=new WeakMap,S=new WeakMap,x=new WeakMap,U=new WeakMap,E=new WeakMap,A=new WeakMap,C=new WeakMap,T=new WeakMap,k=new WeakMap,B=new WeakMap,F=new WeakMap,I=new WeakMap,z=new WeakMap,P=new WeakMap;class ek{constructor(t,e,r,s){en(this,L,1),en(this,R),en(this,D,null),en(this,M,{abort:!1,st:performance.now()}),er(this,"find",async t=>{let e=t<=ea(this,O)||t-ea(this,O)>1e5;(null==ea(this,D)||"closed"===ea(this,D).state||e)&&ea(this,V).call(this),e&&(eo(this,O,t),eo(this,N,function(t,e){for(let r=0;r=s.cts&&tt)break}return 0}(t,this.samples))),ea(this,M).abort=!0;let r=t-ea(this,O);eo(this,O,t),eo(this,M,{abort:!1,st:performance.now()});let s=await ea(this,Y).call(this,Math.ceil(r*(ea(this,R)/1e6)),ea(this,D),ea(this,M));return eo(this,W,0),s}),en(this,O,0),en(this,N,0),en(this,G,{frameCnt:0,data:[]}),en(this,W,0),en(this,Y,async(t,e=null,r)=>{if(null==e||r.abort||"closed"===e.state||0===t)return[];let s=ea(this,G).frameCnt-t;if(s>0)return s3e3)throw r.abort=!0,Error(`MP4Clip.tick audio timeout, ${JSON.stringify(ea(this,j).call(this))}`);eo(this,W,ea(this,W)+1),await e_(15)}else{if(ea(this,N)>=this.samples.length-1)return eB(ea(this,G),ea(this,G).frameCnt);ea(this,H).call(this,e)}return ea(this,Y).call(this,t,e,r)}),en(this,H,t=>{if(t.decodeQueueSize>10)return;let e=[],r=ea(this,N);for(;r=10))break}eo(this,N,r),t.decode(e.map(t=>new EncodedAudioChunk({type:"key",timestamp:t.cts,duration:t.duration,data:t.data})))}),en(this,V,()=>{var t;eo(this,O,0),eo(this,N,0),eo(this,G,{frameCnt:0,data:[]}),null==(t=ea(this,D))||t.close(),eo(this,D,function(t,e,r){let s=0,a=0,n=t=>{if(a+=1,0!==t.length){if(1!==e.volume)for(let r of t)for(let t=0;t{let r=a;a+=1,t().then(t=>{e[r]=t,s()}).catch(t=>{e[r]=t,s()})}}(n),l=e.resampleRate!==t.sampleRate,h=new AudioDecoder({output:t=>{let r=eu(t);l?o(()=>em(r,t.sampleRate,{rate:e.resampleRate,chanCount:t.numberOfChannels})):n(r),t.close()},error:t=>{t.message.includes("Codec reclaimed due to inactivity")||d("MP4Clip AudioDecoder err",t)}});function d(t,e){let r=`${t}: ${e.message}, state: ${JSON.stringify({qSize:h.decodeQueueSize,state:h.state,inputCnt:s,outputCnt:a})}`;throw t5.Log.error(r),Error(r)}return h.configure(t),{decode(t){s+=t.length;try{for(let e of t)h.decode(e)}catch(t){d("decode audio chunk error",t)}},close(){"closed"!==h.state&&h.close()},get decoding(){return s>a&&h.decodeQueueSize>0},get state(){return h.state},get decodeQueueSize(){return h.decodeQueueSize}}}(this.conf,{resampleRate:ew.sampleRate,volume:ea(this,L)},t=>{ea(this,G).data.push(t),ea(this,G).frameCnt+=t[0].length}))}),en(this,j,()=>{var t,e;return{time:ea(this,O),decState:null==(t=ea(this,D))?void 0:t.state,decQSize:null==(e=ea(this,D))?void 0:e.decodeQueueSize,decCusorIdx:ea(this,N),sampleLen:this.samples.length,pcmLen:ea(this,G).frameCnt,clipIdCnt:ex,sleepCnt:ea(this,W),memInfo:eL()}}),er(this,"destroy",()=>{eo(this,D,null),ea(this,M).abort=!0,eo(this,G,{frameCnt:0,data:[]}),this.localFileReader.close()}),this.localFileReader=t,this.samples=e,this.conf=r,eo(this,L,s.volume),eo(this,R,s.targetSampleRate)}}function eB(t,e){let r=[new Float32Array(e),new Float32Array(e)],s=0,a=0;for(;ae){let l=e-s;r[0].set(n.subarray(0,l),s),r[1].set(o.subarray(0,l),s),t.data[a][0]=n.subarray(l,n.length),t.data[a][1]=o.subarray(l,o.length);break}r[0].set(n,s),r[1].set(o,s),s+=n.length,a++}return t.data=t.data.slice(a),t.frameCnt-=e,r}async function eF(t,e){let r=t[0],s=t.at(-1);if(null==s)return[];let a=s.offset+s.size-r.offset;if(a<3e7){let s=new Uint8Array(await e.read(a,{at:r.offset}));return t.map(t=>{let e=t.offset-r.offset;return new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:s.subarray(e,e+t.size)})})}return await Promise.all(t.map(async t=>new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:await e.read(t.size,{at:t.offset})})))}function eI(t,e,r){let s=0;if("configured"===t.state){for(;s{if(!(t instanceof Error))throw t;if(t.message.includes("Decoding error")&&null!=r.onDecodingError)return void r.onDecodingError(t);if(!t.message.includes("Aborted due to close"))throw t})}}async function ez(t,e,r,s,a,n){let o=await e.createReader(),l=await eF(t.filter(t=>!t.deleted&&t.is_sync&&t.cts>=a.start&&t.cts<=a.end),o);if(0===l.length||s.aborted)return;let h=0;function d(t=!1){let e={...r,...t?{hardwareAcceleration:"prefer-software"}:{}},a=new VideoDecoder({output:t=>{let e=(h+=1)===l.length;n(t,e),e&&(o.close(),"closed"!==a.state&&a.close())},error:t=>{let r=`thumbnails decoder error: ${t.message}, config: ${JSON.stringify(e)}, state: ${JSON.stringify({qSize:a.decodeQueueSize,state:a.state,outputCnt:h,inputCnt:l.length})}`;throw t5.Log.error(r),Error(r)}});return s.addEventListener("abort",()=>{o.close(),"closed"!==a.state&&a.close()}),a.configure(e),a}eI(d(),l,{onDecodingError:t=>{t5.Log.warn("thumbnailsByKeyFrame",t),0===h?eI(d(!0),l,{onDecodingError:t=>{o.close(),t5.Log.error("thumbnailsByKeyFrame retry soft deocde",t)}}):(n(null,!0),o.close())}})}function eP(t){let e=0,r=null;for(let s of t)if(!s.deleted){if(s.is_sync&&(e+=1),e>=2)break;(null==r||s.ctse);let e=t=>(eo(this,X,t),ea(this,Z).width=t.width,ea(this,Z).height=t.height,ea(this,Z).duration=1/0,{...ea(this,Z)});if(t instanceof ReadableStream)this.ready=new Response(t).blob().then(t=>createImageBitmap(t)).then(e);else if(t instanceof ImageBitmap)this.ready=Promise.resolve(e(t));else if(Array.isArray(t)&&t.every(t=>t instanceof VideoFrame)){eo(this,K,t);let e=ea(this,K)[0];if(null==e)throw Error("The frame count must be greater than 0");eo(this,Z,{width:e.displayWidth,height:e.displayHeight,duration:ea(this,K).reduce((t,e)=>t+(e.duration??0),0)}),this.ready=Promise.resolve({...ea(this,Z),duration:1/0})}else if("type"in t)this.ready=el(this,$,J).call(this,t.stream,t.type).then(()=>({width:ea(this,Z).width,height:ea(this,Z).height,duration:1/0}));else throw Error("Illegal arguments")}get meta(){return{...ea(this,Z)}}async tick(t){if(null!=ea(this,X))return await this.tickInterceptor(t,{video:await createImageBitmap(ea(this,X)),state:"success"});let e=t%ea(this,Z).duration;return await this.tickInterceptor(t,{video:(ea(this,K).find(t=>e>=t.timestamp&&e<=t.timestamp+(t.duration??0))??ea(this,K)[0]).clone(),state:"success"})}async split(e){if(await this.ready,null!=ea(this,X))return[new t(await createImageBitmap(ea(this,X))),new t(await createImageBitmap(ea(this,X)))];let r=-1;for(let t=0;tea(this,K)[t].timestamp)){r=t;break}if(-1===r)throw Error("Not found frame by time");let s=ea(this,K).slice(0,r).map(t=>new VideoFrame(t)),a=ea(this,K).slice(r).map(t=>new VideoFrame(t,{timestamp:t.timestamp-e}));return[new t(s),new t(a)]}async clone(){return await this.ready,new t(null==ea(this,X)?ea(this,K).map(t=>t.clone()):await createImageBitmap(ea(this,X)))}destroy(){var t;t5.Log.info("ImgClip destroy"),null==(t=ea(this,X))||t.close(),ea(this,K).forEach(t=>t.close())}};Z=new WeakMap,X=new WeakMap,K=new WeakMap,$=new WeakSet,J=async function(t,e){eo(this,K,await ec(t,e));let r=ea(this,K)[0];if(null==r)throw Error("No frame available in gif");eo(this,Z,{duration:ea(this,K).reduce((t,e)=>t+(e.duration??0),0),width:r.codedWidth,height:r.codedHeight}),t5.Log.info("ImgClip ready:",ea(this,Z))};let eD=eR,eM=class t{constructor(t,e={}){en(this,ti),er(this,"ready"),en(this,Q,{duration:0,width:0,height:0}),en(this,q,new Float32Array),en(this,tt,new Float32Array),en(this,te),er(this,"tickInterceptor",async(t,e)=>e),en(this,ts,0),en(this,ta,0),eo(this,te,{loop:!1,volume:1,...e}),this.ready=el(this,ti,tr).call(this,t).then(()=>({width:0,height:0,duration:e.loop?1/0:ea(this,Q).duration}))}get meta(){return{...ea(this,Q),sampleRate:ew.sampleRate,chanCount:2}}getPCMData(){return[ea(this,q),ea(this,tt)]}async tick(t){if(!ea(this,te).loop&&t>=ea(this,Q).duration)return await this.tickInterceptor(t,{audio:[],state:"done"});let e=t-ea(this,ts);if(t3e6)return eo(this,ts,t),eo(this,ta,Math.ceil(ea(this,ts)/1e6*ew.sampleRate)),await this.tickInterceptor(t,{audio:[new Float32Array(0),new Float32Array(0)],state:"success"});eo(this,ts,t);let r=Math.ceil(e/1e6*ew.sampleRate),s=ea(this,ta)+r,a=ea(this,te).loop?[eg(ea(this,q),ea(this,ta),s),eg(ea(this,tt),ea(this,ta),s)]:[ea(this,q).slice(ea(this,ta),s),ea(this,tt).slice(ea(this,ta),s)];return eo(this,ta,s),await this.tickInterceptor(t,{audio:a,state:"success"})}async split(e){await this.ready;let r=Math.ceil(e/1e6*ew.sampleRate);return[new t(this.getPCMData().map(t=>t.slice(0,r)),ea(this,te)),new t(this.getPCMData().map(t=>t.slice(r)),ea(this,te))]}async clone(){await this.ready;let e=new t(this.getPCMData(),ea(this,te));return await e.ready,e}destroy(){eo(this,q,new Float32Array(0)),eo(this,tt,new Float32Array(0)),t5.Log.info("---- audioclip destroy ----")}};Q=new WeakMap,q=new WeakMap,tt=new WeakMap,te=new WeakMap,ti=new WeakSet,tr=async function(t){null==eM.ctx&&(eM.ctx=new AudioContext({sampleRate:ew.sampleRate}));let e=performance.now(),r=t instanceof ReadableStream?await eN(t,eM.ctx):t;t5.Log.info("Audio clip decoded complete:",performance.now()-e);let s=ea(this,te).volume;if(1!==s)for(let t of r)for(let e=0;e{}),er(this,"audioTrack"),en(this,tl,null),en(this,th),eo(this,th,t),this.audioTrack=t.getAudioTracks()[0]??null,ea(this,tn).duration=1/0;let e=t.getVideoTracks()[0];null!=e?(e.contentHint="motion",this.ready=new Promise(t=>{var r,s;let a,n;eo(this,to,(r=e,s=e=>{ea(this,tn).width=e.width,ea(this,tn).height=e.height,eo(this,tl,e),t(this.meta)},a=!1,(0,t5.autoReadStream)(new MediaStreamTrackProcessor({track:r}).readable,{onChunk:async t=>{if(!a){let{displayHeight:e,displayWidth:r}=t,o=new OffscreenCanvas(r??0,e??0);n=o.getContext("2d"),s(o),a=!0}n.drawImage(t,0,0),t.close()},onDone:async()=>{}})))})):this.ready=Promise.resolve(this.meta)}get meta(){return{...ea(this,tn)}}async tick(){return{video:null==ea(this,tl)?null:await createImageBitmap(ea(this,tl)),audio:[],state:"success"}}async split(){return[await this.clone(),await this.clone()]}async clone(){return new t(ea(this,th).clone())}destroy(){ea(this,th).getTracks().forEach(t=>t.stop()),ea(this,to).call(this)}};tn=new WeakMap,to=new WeakMap,tl=new WeakMap,th=new WeakMap,er(eG,"ctx",null);let eW=eG,eY=class t{constructor(t,e){var r;if(en(this,ty),er(this,"ready"),en(this,td,[]),en(this,tu,{width:0,height:0,duration:0}),en(this,tp,{color:"#FFF",textBgColor:null,type:"srt",fontSize:30,letterSpacing:null,bottomOffset:30,fontFamily:"Noto Sans SC",strokeStyle:"#000",lineWidth:null,lineCap:null,lineJoin:null,textShadow:{offsetX:2,offsetY:2,blur:4,color:"#000"},videoWidth:1280,videoHeight:720}),en(this,tc),en(this,tf),en(this,tm,null),en(this,t_,0),en(this,tg,0),eo(this,td,Array.isArray(t)?t:t.split(/\r|\n/).map(t=>t.trim()).filter(t=>t.length>0).map(t=>({lineStr:t,match:t.match(/(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/)})).filter(({lineStr:t},e,r)=>{var s;return!(/^\d+$/.test(t)&&(null==(s=r[e+1])?void 0:s.match)!=null)}).reduce((t,{lineStr:e,match:r})=>{if(null==r){let r=t.at(-1);if(null==r)return t;r.text+=0===r.text.length?e:` ${e}`}else t.push({start:eV(r[1]),end:eV(r[2]),text:""});return t},[]).map(({start:t,end:e,text:r})=>({start:1e6*t,end:1e6*e,text:r}))),0===ea(this,td).length)throw Error("No subtitles content");eo(this,tp,Object.assign(ea(this,tp),e)),eo(this,tg,null==e.textBgColor?0:(e.fontSize??50)*.2);let{fontSize:s,fontFamily:a,videoWidth:n,videoHeight:o,letterSpacing:l}=ea(this,tp);eo(this,t_,s+2*ea(this,tg)),eo(this,tc,new OffscreenCanvas(n,o)),eo(this,tf,ea(this,tc).getContext("2d")),ea(this,tf).font=`${s}px ${a}`,ea(this,tf).textAlign="center",ea(this,tf).textBaseline="top",ea(this,tf).letterSpacing=l??"0px",eo(this,tu,{width:n,height:o,duration:(null==(r=ea(this,td).at(-1))?void 0:r.end)??0}),this.ready=Promise.resolve(this.meta)}get meta(){return{...ea(this,tu)}}async tick(t){var e,r;if(null!=ea(this,tm)&&t>=ea(this,tm).timestamp&&t<=ea(this,tm).timestamp+(ea(this,tm).duration??0))return{video:ea(this,tm).clone(),state:"success"};let s=0;for(;sa.end)return{state:"done"};if(tea(this,td)[t].start)){r=t;break}if(-1===r)throw Error("Not found subtitle by time");let s=ea(this,td).slice(0,r).map(t=>({...t})),a=s.at(-1),n=null;null!=a&&a.end>e&&(n={start:0,end:a.end-e,text:a.text},a.end=e);let o=ea(this,td).slice(r).map(t=>({...t,start:t.start-e,end:t.end-e}));return null!=n&&o.unshift(n),[new t(s,ea(this,tp)),new t(o,ea(this,tp))]}async clone(){return new t(ea(this,td).slice(0),ea(this,tp))}destroy(){var t;null==(t=ea(this,tm))||t.close()}};td=new WeakMap,tu=new WeakMap,tp=new WeakMap,tc=new WeakMap,tf=new WeakMap,tm=new WeakMap,t_=new WeakMap,tg=new WeakMap,ty=new WeakSet,tw=function(t){let e=t.split(` `).reverse().map(t=>t.trim()),{width:r,height:s}=ea(this,tc),{color:a,fontSize:n,textBgColor:o,textShadow:l,strokeStyle:h,lineWidth:d,lineCap:u,lineJoin:p,bottomOffset:c}=ea(this,tp),f=ea(this,tf);f.clearRect(0,0,r,s),f.globalAlpha=.6;let m=c;for(let t of e){let e=f.measureText(t),c=r/2;null!=o&&(f.shadowOffsetX=0,f.shadowOffsetY=0,f.shadowBlur=0,f.fillStyle=o,f.globalAlpha=.5,f.fillRect(c-e.actualBoundingBoxLeft-ea(this,tg),s-m-ea(this,t_),e.width+2*ea(this,tg),ea(this,t_))),f.shadowColor=l.color,f.shadowOffsetX=l.offsetX,f.shadowOffsetY=l.offsetY,f.shadowBlur=l.blur,f.globalAlpha=1,null!=h&&(f.lineWidth=d??n/6,null!=u&&(f.lineCap=u),null!=p&&(f.lineJoin=p),f.strokeStyle=h,f.strokeText(t,c,s-m-ea(this,t_)+ea(this,tg))),f.fillStyle=a,f.fillText(t,c,s-m-ea(this,t_)+ea(this,tg)),m+=ea(this,t_)+.2*n}};let eH=eY;function eV(t){let e=t.match(/(\d{2}):(\d{2}):(\d{2}),(\d{3})/);if(null==e)throw Error(`time format error: ${t}`);let r=Number(e[1]),s=Number(e[2]);return 3600*r+60*s+Number(e[3])+Number(e[4])/1e3}class ej{constructor(){er(this,"readable"),er(this,"writable"),en(this,tb,0);let t=t4.default.createFile(),e=!1;this.readable=new ReadableStream({start:e=>{t.onReady=r=>{var s,a;let n=null==(s=r.videoTracks[0])?void 0:s.id;null!=n&&t.setExtractionOptions(n,"video",{nbSamples:100});let o=null==(a=r.audioTracks[0])?void 0:a.id;null!=o&&t.setExtractionOptions(o,"audio",{nbSamples:100}),e.enqueue({chunkType:"ready",data:{info:r,file:t}}),t.start()};let r={};t.onSamples=(s,a,n)=>{e.enqueue({chunkType:"samples",data:{id:s,type:a,samples:n.map(t=>({...t}))}}),r[s]=(r[s]??0)+n.length,t.releaseUsedSamples(s,r[s])},t.onFlush=()=>{e.close()}},cancel:()=>{t.stop(),e=!0}},{highWaterMark:50}),this.writable=new WritableStream({write:async r=>{if(e)return void this.writable.abort();let s=r.buffer;s.fileStart=ea(this,tb),eo(this,tb,ea(this,tb)+s.byteLength),t.appendBuffer(s)},close:()=>{var e;t.flush(),t.stop(),null==(e=t.onFlush)||e.call(t)}})}}async function eZ(t){let e=t4.default.createFile(),r=function(t){let e=0,r=t.boxes,s=[],a=0;async function n(){let n=f(r,e);e=r.length,s.forEach(({track:e,id:r})=>{let s=e.samples.at(-1);null!=s&&(a=Math.max(a,s.cts+s.duration)),t.releaseUsedSamples(r,e.samples.length),e.samples=[]}),t.mdats=[],t.moofs=[],null!=n&&await (null==u?void 0:u.write(n))}let o=[];function l(){if(o.length>0)return!0;let a=r.findIndex(t=>"moov"===t.type);if(-1===a)return!1;if(o=r.slice(0,a+1),e=a+1,0===s.length)for(let e=1;;e+=1){let r=t.getTrackById(e);if(null==r)break;s.push({track:r,id:e})}return!0}let h=0,d=(0,t9.tmpfile)(),u=null,p=(async()=>{u=await d.createWriter(),h=self.setInterval(()=>{l()&&n()},100)})(),c=!1;return async()=>{if(c)throw Error("File exported");if(c=!0,await p,clearInterval(h),!l()||null==u)return null;t.flush(),await n(),await (null==u?void 0:u.close());let e=o.find(t=>"moov"===t.type);if(null==e)return null;e.mvhd.duration=a;let r=(0,t9.tmpfile)(),s=f(o,0);return await (0,t9.write)(r,s),await (0,t9.write)(r,d,{overwrite:!1}),await r.stream()};function f(t,e){if(e>=t.length)return null;let r=new t4.default.DataStream;r.endianness=t4.default.DataStream.BIG_ENDIAN;for(let s=e;s{(0,t5.autoReadStream)(u.pipeThrough(new ej),{onDone:t,onChunk:async({chunkType:t,data:u})=>{if("ready"===t){let{videoTrackConf:t,audioTrackConf:s}=eb(u.file,u.info);0===r&&null!=t&&(r=e.addTrack(t)),0===n&&null!=s&&(n=e.addTrack(s))}else if("samples"===t){let{type:t,samples:p}=u,c="video"===t?r:n,f="video"===t?s:o,m="video"===t?a:l;p.forEach(t=>{e.addSample(c,t.data,{duration:t.duration,dts:t.dts+f,cts:t.cts+m,is_sync:t.is_sync})});let _=p.at(-1);if(null==_)return;"video"===t?h=_:"audio"===t&&(d=_)}}})}),null!=h&&(s+=h.dts,a+=h.cts),null!=d&&(o+=d.dts,l+=d.cts)}async function eK(t){return await eZ([t])}function e$(t,e){t5.Log.info("mixinMP4AndAudio, opts:",{volume:e.volume,loop:e.loop});let r=t4.default.createFile(),{stream:s,stop:a}=(0,t5.file2stream)(r,500),n=null,o=null,l=[],h=0,d=0,u=0,p=!0,c=ew.sampleRate;function f(t){let r=l.map(r=>e.loop?eg(r,u,u+t):r.slice(u,u+t));if(u+=t,1!==e.volume)for(let t of r)for(let r=0;r{await (null==o?void 0:o.stop()),null==n||n.close(),a()},onChunk:async({chunkType:t,data:s})=>{if("ready"===t){let{videoTrackConf:t,audioTrackConf:a,audioDecoderConf:u}=eb(s.file,s.info);0===h&&null!=t&&(h=r.addTrack(t));let f=a??{timescale:1e6,samplerate:c,channel_count:ew.channelCount,hdlr:"soun",name:"SoundHandler",type:"mp4a"};0===d&&(d=r.addTrack(f),c=(null==a?void 0:a.samplerate)??c,p=null!=a);let m=new AudioContext({sampleRate:c});l=ep(await m.decodeAudioData(await new Response(e.stream).arrayBuffer())),null!=u&&(n=function(t){let e=[],r=new AudioDecoder({output:t=>{e.push(t)},error:t5.Log.error});return r.configure(t),{decode:async t=>{t.forEach(t=>{r.decode(new EncodedAudioChunk({type:t.is_sync?"key":"delta",timestamp:1e6*t.cts/t.timescale,duration:1e6*t.duration/t.timescale,data:t.data}))}),await r.flush();let s=e;return e=[],s},close:()=>{r.close()}}}(u)),o=function(t,e){let r={codec:t.codec,sampleRate:t.sampleRate,numberOfChannels:t.numberOfChannels},s=new AudioEncoder({output:t=>{e(function(t){let e=new ArrayBuffer(t.byteLength);t.copyTo(e);let r=t.timestamp;return{duration:t.duration??0,dts:r,cts:r,is_sync:"key"===t.type,data:e}}(t))},error:t=>{t5.Log.error("AudioEncoder error:",t,", config:",r)}});s.configure(r);let a=null;function n(e,r){return new AudioData({timestamp:r,numberOfChannels:t.numberOfChannels,numberOfFrames:e.length/t.numberOfChannels,sampleRate:t.sampleRate,format:"f32-planar",data:e})}return{encode:async(t,e)=>{null!=a&&s.encode(n(a.data,a.ts)),a={data:t,ts:e}},stop:async()=>{null!=a&&(function(t,e,r){let s=t.length-1,a=Math.min(r/2,s);for(let r=0;rr.addSample(d,t.data,t))}else if("samples"===t){let{id:t,type:e,samples:a}=s;if("video"===e){a.forEach(e=>r.addSample(t,e.data,e)),p||await m(a);return}"audio"===e&&await _(a)}}}),s}tb=new WeakMap;let eJ=`#version 300 es layout (location = 0) in vec4 a_position; layout (location = 1) in vec2 a_texCoord; out vec2 v_texCoord; void main () { gl_Position = a_position; v_texCoord = a_texCoord; } `,eQ=`#version 300 es precision mediump float; out vec4 FragColor; in vec2 v_texCoord; uniform sampler2D frameTexture; uniform vec3 keyColor; // \u{8272}\u{5EA6}\u{7684}\u{76F8}\u{4F3C}\u{5EA6}\u{8BA1}\u{7B97} uniform float similarity; // \u{900F}\u{660E}\u{5EA6}\u{7684}\u{5E73}\u{6ED1}\u{5EA6}\u{8BA1}\u{7B97} uniform float smoothness; // \u{964D}\u{4F4E}\u{7EFF}\u{5E55}\u{9971}\u{548C}\u{5EA6}\u{FF0C}\u{63D0}\u{9AD8}\u{62A0}\u{56FE}\u{51C6}\u{786E}\u{5EA6} uniform float spill; vec2 RGBtoUV(vec3 rgb) { return vec2( rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5, rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5 ); } void main() { // \u{83B7}\u{53D6}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{7684}rgba\u{503C} vec4 rgba = texture(frameTexture, v_texCoord); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{4E0E}\u{7EFF}\u{5E55}\u{50CF}\u{7D20}\u{7684}\u{8272}\u{5EA6}\u{5DEE}\u{503C} vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{4E0E}\u{7EFF}\u{5E55}\u{50CF}\u{7D20}\u{7684}\u{8272}\u{5EA6}\u{8DDD}\u{79BB}\u{FF08}\u{5411}\u{91CF}\u{957F}\u{5EA6}\u{FF09}, \u{8D8A}\u{76F8}\u{50CF}\u{5219}\u{8272}\u{5EA6}\u{8DDD}\u{79BB}\u{8D8A}\u{5C0F} float chromaDist = sqrt(dot(chromaVec, chromaVec)); // \u{8BBE}\u{7F6E}\u{4E86}\u{4E00}\u{4E2A}\u{76F8}\u{4F3C}\u{5EA6}\u{9608}\u{503C}\u{FF0C}baseMask\u{4E3A}\u{8D1F}\u{FF0C}\u{5219}\u{8868}\u{660E}\u{662F}\u{7EFF}\u{5E55}\u{FF0C}\u{4E3A}\u{6B63}\u{5219}\u{8868}\u{660E}\u{4E0D}\u{662F}\u{7EFF}\u{5E55} float baseMask = chromaDist - similarity; // \u{5982}\u{679C}baseMask\u{4E3A}\u{8D1F}\u{6570}\u{FF0C}fullMask\u{7B49}\u{4E8E}0\u{FF1B}baseMask\u{4E3A}\u{6B63}\u{6570}\u{FF0C}\u{8D8A}\u{5927}\u{FF0C}\u{5219}\u{900F}\u{660E}\u{5EA6}\u{8D8A}\u{4F4E} float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5); rgba.a = fullMask; // \u{8BBE}\u{7F6E}\u{900F}\u{660E}\u{5EA6} // \u{5982}\u{679C}baseMask\u{4E3A}\u{8D1F}\u{6570}\u{FF0C}spillVal\u{7B49}\u{4E8E}0\u{FF1B}baseMask\u{4E3A}\u{6574}\u{6570}\u{FF0C}\u{8D8A}\u{5C0F}\u{FF0C}\u{9971}\u{548C}\u{5EA6}\u{8D8A}\u{4F4E} float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5); float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.); // \u{8BA1}\u{7B97}\u{5F53}\u{524D}\u{50CF}\u{7D20}\u{7684}\u{7070}\u{5EA6}\u{503C} rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal); FragColor = rgba; } `,eq=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1],e0=[0,1,0,0,1,0,1,0,1,1,0,1];function e1(t,e,r){let s=t.createShader(e);if(t.shaderSource(s,r),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS)){let e=t.getShaderInfoLog(s);throw t.deleteShader(s),Error(e??"An error occurred compiling the shaders")}return s}let e2=t=>{let e=null,r=null,s=t.keyColor,a=null;return async n=>{var o,l;if((null==e||null==r||null==a)&&(null==s&&(s=function(t){let e=new OffscreenCanvas(1,1).getContext("2d");e.drawImage(t,0,0);let{data:[r,s,a]}=e.getImageData(0,0,1,1);return[r,s,a]}(n)),{cvs:e,gl:r}=function(t){let e="document"in globalThis?globalThis.document.createElement("canvas"):new OffscreenCanvas(t.width,t.height);e.width=t.width,e.height=t.height;let r=e.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0});if(null==r)throw Error("Cant create gl context");let s=function(t,e,r){let s=e1(t,t.VERTEX_SHADER,e),a=e1(t,t.FRAGMENT_SHADER,r),n=t.createProgram();if(t.attachShader(n,s),t.attachShader(n,a),t.linkProgram(n),!t.getProgramParameter(n,t.LINK_STATUS))throw Error(t.getProgramInfoLog(n)??"Unable to initialize the shader program");return n}(r,eJ,eQ);r.useProgram(s),r.uniform3fv(r.getUniformLocation(s,"keyColor"),t.keyColor.map(t=>t/255)),r.uniform1f(r.getUniformLocation(s,"similarity"),t.similarity),r.uniform1f(r.getUniformLocation(s,"smoothness"),t.smoothness),r.uniform1f(r.getUniformLocation(s,"spill"),t.spill);let a=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,a),r.bufferData(r.ARRAY_BUFFER,new Float32Array(eq),r.STATIC_DRAW);let n=r.getAttribLocation(s,"a_position");r.vertexAttribPointer(n,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(n);let o=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e0),r.STATIC_DRAW);let l=r.getAttribLocation(s,"a_texCoord");return r.vertexAttribPointer(l,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(l),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1),{cvs:e,gl:r}}({...n instanceof VideoFrame?{width:n.codedWidth,height:n.codedHeight}:{width:n.width,height:n.height},keyColor:s,...t}),a=function(t){let e=t.createTexture();if(null==e)throw Error("Create WebGL texture error");t.bindTexture(t.TEXTURE_2D,e);let r=t.RGBA,s=t.RGBA,a=t.UNSIGNED_BYTE,n=new Uint8Array([0,0,255,255]);return t.texImage2D(t.TEXTURE_2D,0,r,1,1,0,s,a,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}(r)),o=r,l=a,o.bindTexture(o.TEXTURE_2D,l),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,o.RGBA,o.UNSIGNED_BYTE,n),o.drawArrays(o.TRIANGLES,0,6),null!=globalThis.VideoFrame&&n instanceof globalThis.VideoFrame){let t=new VideoFrame(e,{alpha:"keep",timestamp:n.timestamp,duration:n.duration??void 0});return n.close(),t}return createImageBitmap(e,{imageOrientation:n instanceof ImageBitmap?"flipY":"none"})}},e3=class t{constructor(t,e,r,s,a){en(this,tC),en(this,tv,new(0,t5.EventTool)),er(this,"on",ea(this,tv).on),en(this,tS,0),en(this,tx,0),en(this,tU,0),en(this,tE,0),en(this,tA,0),en(this,tk,null),er(this,"fixedAspectRatio",!1),er(this,"fixedScaleCenter",!1),this.x=t??0,this.y=e??0,this.w=r??0,this.h=s??0,eo(this,tk,a??null)}get x(){return ea(this,tS)}set x(t){el(this,tC,tT).call(this,"x",t)}get y(){return ea(this,tx)}set y(t){el(this,tC,tT).call(this,"y",t)}get w(){return ea(this,tU)}set w(t){el(this,tC,tT).call(this,"w",t)}get h(){return ea(this,tE)}set h(t){el(this,tC,tT).call(this,"h",t)}get angle(){return ea(this,tA)}set angle(t){el(this,tC,tT).call(this,"angle",t)}get center(){let{x:t,y:e,w:r,h:s}=this;return{x:t+r/2,y:e+s/2}}clone(){let{x:e,y:r,w:s,h:a}=this,n=new t(e,r,s,a,ea(this,tk));return n.angle=this.angle,n.fixedAspectRatio=this.fixedAspectRatio,n.fixedScaleCenter=this.fixedScaleCenter,n}checkHit(t,e){var r,s;let{angle:a,center:n,x:o,y:l,w:h,h:d}=this,u=(null==(r=ea(this,tk))?void 0:r.center)??n,p=(null==(s=ea(this,tk))?void 0:s.angle)??a;null==ea(this,tk)&&(o-=u.x,l-=u.y);let c=t-u.x,f=e-u.y,m=c,_=f;return 0!==p&&(m=c*Math.cos(p)+f*Math.sin(p),_=f*Math.cos(p)-c*Math.sin(p)),!(mo+h||_l+d)}};tv=new WeakMap,tS=new WeakMap,tx=new WeakMap,tU=new WeakMap,tE=new WeakMap,tA=new WeakMap,tC=new WeakSet,tT=function(t,e){let r=this[t]!==e;switch(t){case"x":eo(this,tS,e);break;case"y":eo(this,tx,e);break;case"w":eo(this,tU,e);break;case"h":eo(this,tE,e);break;case"angle":eo(this,tA,e)}r&&ea(this,tv).emit("propsChange",{[t]:e})},tk=new WeakMap;let e6=e3;class e8{constructor(){er(this,"rect",new e6),en(this,tB,{offset:0,duration:0,playbackRate:1}),en(this,tF,new(0,t5.EventTool)),er(this,"on",ea(this,tF).on),en(this,tI,0),er(this,"opacity",1),er(this,"flip",null),en(this,tz,null),en(this,tP,null),er(this,"ready",Promise.resolve()),this.rect.on("propsChange",t=>{ea(this,tF).emit("propsChange",{rect:t})})}get time(){return ea(this,tB)}set time(t){Object.assign(ea(this,tB),t)}get zIndex(){return ea(this,tI)}set zIndex(t){let e=ea(this,tI)!==t;eo(this,tI,t),e&&ea(this,tF).emit("propsChange",{zIndex:t})}_render(t){let{rect:{center:e,angle:r}}=this;t.setTransform("horizontal"===this.flip?-1:1,0,0,"vertical"===this.flip?-1:1,e.x,e.y),t.rotate((null==this.flip?1:-1)*r),t.globalAlpha=this.opacity}setAnimation(t,e){eo(this,tz,Object.entries(t).map(([t,e])=>{let r={from:0,to:100}[t]??Number(t.slice(0,-1));if(isNaN(r)||r>100||r<0)throw Error("keyFrame must between 0~100");return[r/100,e]})),eo(this,tP,Object.assign({},ea(this,tP),{duration:e.duration,delay:e.delay??0,iterCount:e.iterCount??1/0}))}animate(t){if(null==ea(this,tz)||null==ea(this,tP)||t=r.iterCount)return{};let a=s%r.duration,n=s===r.duration?1:a/r.duration,o=e.findIndex(t=>t[0]>=n);if(-1===o)return{};let l=e[o-1],h=e[o],d=h[1];if(null==l)return d;let u=l[1],p={},c=(n-l[0])/(h[0]-l[0]);for(let t in d)null!=u[t]&&(p[t]=(d[t]-u[t])*c+u[t]);return p}(t,ea(this,tz),ea(this,tP));for(let t in e)switch(t){case"opacity":this.opacity=e[t];break;case"x":case"y":case"w":case"h":case"angle":this.rect[t]=e[t]}}copyStateTo(t){eo(t,tz,ea(this,tz)),eo(t,tP,ea(this,tP)),t.zIndex=this.zIndex,t.opacity=this.opacity,t.flip=this.flip,t.rect=this.rect.clone(),t.time={...this.time}}destroy(){ea(this,tF).destroy()}}tB=new WeakMap,tF=new WeakMap,tI=new WeakMap,tz=new WeakMap,tP=new WeakMap;let e4=class t extends e8{constructor(t){super(),en(this,tL),en(this,tR,null),en(this,tD,!1),eo(this,tL,t),this.ready=t.ready.then(({width:t,height:e,duration:r})=>{this.rect.w=0===this.rect.w?t:this.rect.w,this.rect.h=0===this.rect.h?e:this.rect.h,this.time.duration=0===this.time.duration?r:this.time.duration})}async offscreenRender(t,e){var r;let s=e*this.time.playbackRate;this.animate(s),super._render(t);let{w:a,h:n}=this.rect,{video:o,audio:l,state:h}=await ea(this,tL).tick(s),d=l??[];if(null!=l&&1!==this.time.playbackRate&&(d=l.map(t=>ey(t,this.time.playbackRate))),"done"===h)return{audio:d,done:!0};let u=o??ea(this,tR);return null!=u&&t.drawImage(u,-a/2,-n/2,a,n),null!=o&&(null==(r=ea(this,tR))||r.close(),eo(this,tR,o)),{audio:d,done:!1}}async clone(){let e=new t(await ea(this,tL).clone());return await e.ready,this.copyStateTo(e),e}destroy(){var t;ea(this,tD)||(eo(this,tD,!0),t5.Log.info("OffscreenSprite destroy"),super.destroy(),null==(t=ea(this,tR))||t.close(),eo(this,tR,null),ea(this,tL).destroy())}};tL=new WeakMap,tR=new WeakMap,tD=new WeakMap;let e5=e4,e7=class t extends e8{constructor(t){super(),en(this,tW),en(this,tM),er(this,"visible",!0),en(this,tO,null),en(this,tN,[]),en(this,tG,!1),en(this,tH,-1),en(this,tV,!1),eo(this,tM,t),this.ready=t.ready.then(({width:t,height:e,duration:r})=>{this.rect.w=0===this.rect.w?t:this.rect.w,this.rect.h=0===this.rect.h?e:this.rect.h,this.time.duration=0===this.time.duration?r:this.time.duration})}getClip(){return ea(this,tM)}preFrame(t){el(this,tW,tY).call(this,t)}render(t,e){this.animate(e),super._render(t);let{w:r,h:s}=this.rect;ea(this,tH)!==e&&el(this,tW,tY).call(this,e),eo(this,tH,e);let a=ea(this,tN);eo(this,tN,[]);let n=ea(this,tO);return null!=n&&t.drawImage(n,-r/2,-s/2,r,s),{audio:a}}copyStateTo(e){super.copyStateTo(e),e instanceof t&&(e.visible=this.visible)}destroy(){var t;ea(this,tV)||(eo(this,tV,!0),t5.Log.info("VisibleSprite destroy"),super.destroy(),null==(t=ea(this,tO))||t.close(),eo(this,tO,null),ea(this,tM).destroy())}};tM=new WeakMap,tO=new WeakMap,tN=new WeakMap,tG=new WeakMap,tW=new WeakSet,tY=function(t){ea(this,tG)||(eo(this,tG,!0),ea(this,tM).tick(t*this.time.playbackRate).then(({video:t,audio:e})=>{var r;null!=t&&(null==(r=ea(this,tO))||r.close(),eo(this,tO,t??null)),eo(this,tN,e??[]),null!=e&&1!==this.time.playbackRate&&eo(this,tN,e.map(t=>ey(t,this.time.playbackRate)))}).finally(()=>{eo(this,tG,!1)}))},tH=new WeakMap,tV=new WeakMap;let e9=e7,it=0;async function ie(t){t()>50&&(await e_(15),await ie(t))}class ii{constructor(t={}){en(this,t1),en(this,tj,t5.Log.create(`id:${it++},`)),en(this,tZ,!1),en(this,tX,[]),en(this,tK),en(this,t$),en(this,tJ,null),en(this,tQ),en(this,tq),en(this,t0,new(0,t5.EventTool)),er(this,"on",ea(this,t0).on);let{width:e=0,height:r=0}=t;eo(this,tK,new OffscreenCanvas(e,r));let s=ea(this,tK).getContext("2d",{alpha:!1});if(null==s)throw Error("Can not create 2d offscreen context");eo(this,t$,s),eo(this,tQ,Object.assign({bgColor:"#000",width:0,height:0,videoCodec:"avc1.42E032",audio:!0,bitrate:5e6,fps:30,metaDataTags:null},t)),eo(this,tq,e*r>0)}static async isSupported(t={}){return(null!=self.OffscreenCanvas&&null!=self.VideoEncoder&&null!=self.VideoDecoder&&null!=self.VideoFrame&&null!=self.AudioEncoder&&null!=self.AudioDecoder&&null!=self.AudioData&&((await self.VideoEncoder.isConfigSupported({codec:t.videoCodec??"avc1.42E032",width:t.width??1920,height:t.height??1080,bitrate:t.bitrate??7e6})).supported??!1)&&(await self.AudioEncoder.isConfigSupported({codec:ew.codec,sampleRate:ew.sampleRate,numberOfChannels:ew.channelCount})).supported)??!1}async addSprite(t,e={}){var r,s;let a={rect:(r=["x","y","w","h"],s=t.rect,r.reduce((t,e)=>(t[e]=s[e],t),{})),time:{...t.time},zIndex:t.zIndex};ea(this,tj).info("Combinator add sprite",a);let n=await t.clone();ea(this,tj).info("Combinator add sprite ready"),ea(this,tX).push(Object.assign(n,{main:e.main??!1,expired:!1})),ea(this,tX).sort((t,e)=>t.zIndex-e.zIndex)}output(){if(0===ea(this,tX).length)throw Error("No sprite added");let t=ea(this,tX).find(t=>t.main),e=null!=t?t.time.offset+t.time.duration:Math.max(...ea(this,tX).map(t=>t.time.offset+t.time.duration));if(e===1/0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of ImgClip, AudioCli");-1===e&&ea(this,tj).warn("Unable to determine the end time, process value don't update"),ea(this,tj).info(`start combinate video, maxTime:${e}`);let r=el(this,t1,t2).call(this,e),s=performance.now(),a=el(this,t1,t3).call(this,r,e,{onProgress:t=>{ea(this,tj).debug("OutputProgress:",t),ea(this,t0).emit("OutputProgress",t)},onEnded:async()=>{await r.flush(),ea(this,tj).info("===== output ended =====, cost:",performance.now()-s),ea(this,t0).emit("OutputProgress",1),this.destroy()},onError:t=>{ea(this,t0).emit("error",t),o(t),this.destroy()}});eo(this,tJ,()=>{a(),r.close(),o()});let{stream:n,stop:o}=(0,t5.file2stream)(r.mp4file,500,this.destroy);return n}destroy(){var t;ea(this,tZ)||(eo(this,tZ,!0),null==(t=ea(this,tJ))||t.call(this),ea(this,t0).destroy())}}tj=new WeakMap,tZ=new WeakMap,tX=new WeakMap,tK=new WeakMap,t$=new WeakMap,tJ=new WeakMap,tQ=new WeakMap,tq=new WeakMap,t0=new WeakMap,t1=new WeakSet,t2=function(t){let{fps:e,width:r,height:s,videoCodec:a,bitrate:n,audio:o,metaDataTags:l}=ea(this,tQ);return(0,t5.recodemux)({video:ea(this,tq)?{width:r,height:s,expectFPS:e,codec:a,bitrate:n,__unsafe_hardwareAcceleration__:ea(this,tQ).__unsafe_hardwareAcceleration__}:null,audio:!1===o?null:{codec:"aac",sampleRate:ew.sampleRate,channelCount:ew.channelCount},duration:t,metaDataTags:l})},t3=function(t,e,{onProgress:r,onEnded:s,onError:a}){let n=0,o={aborted:!1},l=null;(async()=>{let{fps:r,bgColor:a,audio:h}=ea(this,tQ),u=Math.round(1e6/r),p=ea(this,t$),c=function(t){let{ctx:e,bgColor:r,sprites:s,aborter:a}=t,{width:n,height:o}=e.canvas;return async t=>{e.fillStyle=r,e.fillRect(0,0,n,o);let l=[],h=!1;for(let r of s){if(a.aborted)break;if(t0&&t>r.time.offset+r.time.duration||n)&&(r.main&&(h=!0),r.destroy(),r.expired=!0)}return{audios:l,mainSprDone:h}}}({ctx:p,bgColor:a,sprites:ea(this,tX),aborter:o}),f=function(t){let{ctx:e,cvs:r,outputAudio:s,remux:a,hasVideoTrack:n,timeSlice:o}=t,{width:l,height:h}=r,d=0,u=Math.floor(3*t.fps),p=function(t){let e=1024*ew.channelCount,r=new Float32Array(3*e),s=0,a=0,n=t/ew.sampleRate*1e6,o=new Float32Array(e),l=l=>{let h=0,d=Math.floor(s/e),u=[];for(let s=0;sn;)u.push(new AudioData({timestamp:a,numberOfChannels:ew.channelCount,numberOfFrames:t,sampleRate:ew.sampleRate,format:"f32",data:o})),a+=n;return u};return(t,e)=>{var a,n;let o=Math.max(...e.map(t=>{var e;return(null==(e=t[0])?void 0:e.length)??0}));for(let t=0;t{if(!1!==s)for(let e of p(t,c))a.encodeAudio(e);if(n){let s=new VideoFrame(r,{duration:o,timestamp:t});a.encodeVideo(s,{keyFrame:d%u==0}),e.resetTransform(),e.clearRect(0,0,l,h),d+=1}}}({remux:t,ctx:p,cvs:ea(this,tK),outputAudio:h,hasVideoTrack:ea(this,tq),timeSlice:u,fps:r}),m=0;for(;;){if(null!=l)return;if(o.aborted||-1!==e&&m>e||0===ea(this,tX).length){d(),await s();return}n=m/e;let{audios:r,mainSprDone:a}=await c(m);if(a){d(),await s();return}if(o.aborted)return;f(m,r),m+=u,await ie(t.getEncodeQueueSize)}})().catch(t=>{l=t,ea(this,tj).error(t),d(),a(t)});let h=setInterval(()=>{r(n)},500),d=()=>{o.aborted||(o.aborted=!0,clearInterval(h),ea(this,tX).forEach(t=>t.destroy()))};return d}},{"@webav/mp4box.js":"cxovW","@webav/internal-utils":"8Z4GK","wave-resampler":"rkdE4","opfs-tools":"hZ6Bc","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cxovW:[function(t,e,r,s){var a,n,o=(a=new Date,n=4,{setLogLevel:function(t){t==this.debug?n=1:t==this.info?n=2:t==this.warn?n=3:(this.error,n=4)},debug:function(t,e){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+o.getDurationString(new Date-a,1e3)+"]","["+t+"]",e)},log:function(t,e){this.debug(t.msg)},info:function(t,e){2>=n&&console.info("["+o.getDurationString(new Date-a,1e3)+"]","["+t+"]",e)},warn:function(t,e){3>=n&&console.warn("["+o.getDurationString(new Date-a,1e3)+"]","["+t+"]",e)},error:function(t,e){4>=n&&console.error("["+o.getDurationString(new Date-a,1e3)+"]","["+t+"]",e)}});o.getDurationString=function(t,e){function r(t,e){for(var r=(""+t).split(".");r[0].length0))return"(empty)";for(var r="",s=0;s0&&(r+=","),r+="["+o.getDurationString(t.start(s))+","+o.getDurationString(t.end(s))+"]";return r},r.Log=o;var l=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0};l.prototype.getPosition=function(){return this.position},l.prototype.getEndPosition=function(){return this.buffer.byteLength},l.prototype.getLength=function(){return this.buffer.byteLength},l.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},l.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},l.prototype.readAnyInt=function(t,e){var r=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:r=e?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=e?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16|this.dataview.getUint8(this.position+1)<<8|this.dataview.getUint8(this.position+2);break;case 4:r=e?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32|this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,r}throw"Not enough bytes in buffer"},l.prototype.readUint8=function(){return this.readAnyInt(1,!1)},l.prototype.readUint16=function(){return this.readAnyInt(2,!1)},l.prototype.readUint24=function(){return this.readAnyInt(3,!1)},l.prototype.readUint32=function(){return this.readAnyInt(4,!1)},l.prototype.readUint64=function(){return this.readAnyInt(8,!1)},l.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",r=0;rthis._byteLength&&(this._byteLength=e);return}for(r<1&&(r=1);e>r;)r*=2;var s=new ArrayBuffer(r),a=new Uint8Array(this._buffer);new Uint8Array(s,0,a.length).set(a),this.buffer=s,this._byteLength=e}},h.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},h.BIG_ENDIAN=!1,h.LITTLE_ENDIAN=!0,h.prototype._byteLength=0,Object.defineProperty(h.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(h.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(h.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(h.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),h.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},h.prototype.isEof=function(){return this.position>=this._byteLength},h.prototype.mapUint8Array=function(t){this._realloc(+t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=+t,e},h.prototype.readInt32Array=function(t,e){var r=new Int32Array(t=null==t?this.byteLength-this.position/4:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readInt16Array=function(t,e){var r=new Int16Array(t=null==t?this.byteLength-this.position/2:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readInt8Array=function(t){var e=new Int8Array(t=null==t?this.byteLength-this.position:t);return h.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},h.prototype.readUint32Array=function(t,e){var r=new Uint32Array(t=null==t?this.byteLength-this.position/4:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readUint16Array=function(t,e){var r=new Uint16Array(t=null==t?this.byteLength-this.position/2:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readUint8Array=function(t){var e=new Uint8Array(t=null==t?this.byteLength-this.position:t);return h.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},h.prototype.readFloat64Array=function(t,e){var r=new Float64Array(t=null==t?this.byteLength-this.position/8:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readFloat32Array=function(t,e){var r=new Float32Array(t=null==t?this.byteLength-this.position/4:t);return h.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),h.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},h.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null==t?this.endianness:t);return this.position+=4,e},h.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null==t?this.endianness:t);return this.position+=2,e},h.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},h.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null==t?this.endianness:t);return this.position+=4,e},h.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null==t?this.endianness:t);return this.position+=2,e},h.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},h.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null==t?this.endianness:t);return this.position+=4,e},h.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null==t?this.endianness:t);return this.position+=8,e},h.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,h.memcpy=function(t,e,r,s,a){var n=new Uint8Array(t,e,a),o=new Uint8Array(r,s,a);n.set(o)},h.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},h.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},h.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;ra;s--,a++){var n=e[a];e[a]=e[s],e[s]=n}return t},h.prototype.failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=[],r=0;r>16),this.writeUint8((65280&t)>>8),this.writeUint8(255&t)},h.prototype.adjustUint32=function(t,e){var r=this.position;this.seek(t),this.writeUint32(e),this.seek(r)},h.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},h.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},h.prototype.mapInt8Array=function(t){this._realloc(+t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=+t,e},h.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},h.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},h.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=8*t,r},h.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return h.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r};var d=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)};d.prototype=new h(new ArrayBuffer,0,h.BIG_ENDIAN),d.prototype.initialized=function(){var t;return!!(this.bufferIndex>-1)||(this.buffers.length>0?0===(t=this.buffers[0]).fileStart?(this.buffer=t,this.bufferIndex=0,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(t,e){o.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r.buffer},d.prototype.reduceBuffer=function(t,e,r){var s;return(s=new Uint8Array(r)).set(new Uint8Array(t,e,r)),s.buffer.fileStart=t.fileStart+e,s.buffer.usedBytes=0,s.buffer},d.prototype.insertBuffer=function(t){for(var e=!0,r=0;rs.byteLength){this.buffers.splice(r,1),r--;continue}else o.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring");else t.fileStart+t.byteLength<=s.fileStart||(t=this.reduceBuffer(t,0,s.fileStart-t.fileStart)),o.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(r,0,t),0===r&&(this.buffer=t);e=!1;break}if(t.fileStart0)t=this.reduceBuffer(t,a,n);else{e=!1;break}}}e&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),0===r&&(this.buffer=t))},d.prototype.logBufferLevel=function(t){var e,r,s,a,n,l=[],h="";for(e=0,s=0,a=0;e0&&(h+=n.end-1+"]"),(t?o.info:o.debug)("MultiBufferStream",0===this.buffers.length?"No more buffer in memory":""+this.buffers.length+" stored buffer(s) ("+s+"/"+a+" bytes), continuous ranges: "+h)},d.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0},d.prototype.findPosition=function(t,e,r){var s,a=null,n=-1;for(s=!0===t?0:this.bufferIndex;s=e?(o.debug("MultiBufferStream","Found position in existing buffer #"+n),n):-1},d.prototype.findEndContiguousBuf=function(t){var e,r,s,a=void 0!==t?t:this.bufferIndex;if(r=this.buffers[a],this.buffers.length>a+1)for(e=a+1;e>3;return 31===s&&r.data.length>=2&&(s=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),s},r.DecoderConfigDescriptor=function(t){r.Descriptor.call(this,4,t)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.upStream=(this.streamType>>1&1)!=0,this.streamType=this.streamType>>>2,this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)},r.DecoderSpecificInfo=function(t){r.Descriptor.call(this,5,t)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(t){r.Descriptor.call(this,6,t)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};r.MPEG4DescriptorParser=u;var p={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){p.FullBox.prototype=new p.Box,p.ContainerBox.prototype=new p.Box,p.SampleEntry.prototype=new p.Box,p.TrackGroupTypeBox.prototype=new p.FullBox,p.BASIC_BOXES.forEach(function(t){p.createBoxCtor(t)}),p.FULL_BOXES.forEach(function(t){p.createFullBoxCtor(t)}),p.CONTAINER_BOXES.forEach(function(t){p.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,r){this.type=t,this.size=e,this.uuid=r},FullBox:function(t,e,r){p.Box.call(this,t,e,r),this.flags=0,this.version=0},ContainerBox:function(t,e,r){p.Box.call(this,t,e,r),this.boxes=[]},SampleEntry:function(t,e,r,s){p.ContainerBox.call(this,t,e),this.hdr_size=r,this.start=s},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){p.FullBox.call(this,t,e)},createBoxCtor:function(t,e){p.boxCodes.push(t),p[t+"Box"]=function(e){p.Box.call(this,t,e)},p[t+"Box"].prototype=new p.Box,e&&(p[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){p[t+"Box"]=function(e){p.FullBox.call(this,t,e)},p[t+"Box"].prototype=new p.FullBox,p[t+"Box"].prototype.parse=function(t){this.parseFullHeader(t),e&&e.call(this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,r=0;rr?(o.error("BoxParser","Box of type '"+u+"' has a size "+d+" greater than its container size "+r),{code:p.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:h,start:l}):0!==d&&l+d>t.getEndPosition()?(t.seek(l),o.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:p.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:h,start:l}):e?{code:p.OK,type:u,size:d,hdr_size:h,start:l}:(p[u+"Box"]?s=new p[u+"Box"](d):"uuid"!==u?(o.warn("BoxParser","Unknown box type: '"+u+"'"),(s=new p.Box(u,d)).has_unparsed_data=!0):p.UUIDBoxes[n]?s=new p.UUIDBoxes[n](d):(o.warn("BoxParser","Unknown uuid type: '"+n+"'"),(s=new p.Box(u,d)).uuid=n,s.has_unparsed_data=!0),s.hdr_size=h,s.start=l,s.write===p.Box.prototype.write&&"mdat"!==s.type&&(o.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(t)),s.parse(t),(a=t.getPosition()-(s.start+s.size))<0?(o.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-a+" bytes), seeking forward"),t.seek(s.start+s.size)):a>0&&(o.error("BoxParser","Parsing of box '"+c+"' read "+a+" more bytes than the indicated box data size, seeking backwards"),0!==s.size&&t.seek(s.start+s.size)),{code:p.OK,box:s,size:s.size})},p.Box.prototype.parse=function(t){"mdat"!=this.type?this.data=t.readUint8Array(this.size-this.hdr_size):0===this.size?t.seek(t.getEndPosition()):t.seek(this.start+this.size)},p.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size},p.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size},p.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4},p.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},p.ContainerBox.prototype.parse=function(t){for(;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},p.SAMPLE_ENTRY_TYPE_VISUAL="Visual",p.SAMPLE_ENTRY_TYPE_AUDIO="Audio",p.SAMPLE_ENTRY_TYPE_HINT="Hint",p.SAMPLE_ENTRY_TYPE_METADATA="Metadata",p.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",p.SAMPLE_ENTRY_TYPE_SYSTEM="System",p.SAMPLE_ENTRY_TYPE_TEXT="Text",p.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8},p.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},p.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size},p.SampleEntry.prototype.parseFooter=function(t){p.ContainerBox.prototype.parse.call(this,t)},p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_HINT),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_METADATA),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_SUBTITLE),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_SYSTEM),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_TEXT),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}),p.createMediaSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,this.parseFooter(t)}),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),p.createSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"fLaC"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_TEXT,"enct"),p.createEncryptedSampleEntryCtor(p.SAMPLE_ENTRY_TYPE_METADATA,"encm"),p.createBoxCtor("a1lx",function(t){var e=((1&(1&t.readUint8()))+1)*16;this.layer_size=[];for(var r=0;r<3;r++)16==e?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()}),p.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()}),p.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}),p.createBoxCtor("av1C",function(t){var e=t.readUint8();if(e>>7&!1)return void o.error("av1C marker problem");if(this.version=127&e,1!==this.version)return void o.error("av1C version "+this.version+" not supported");if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=31&e,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=3&e,e=t.readUint8(),this.reserved_1=e>>5&7,0!==this.reserved_1)return void o.error("av1C reserved_1 parsing problem");if(this.initial_presentation_delay_present=e>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&e;else if(this.reserved_2=15&e,0!==this.reserved_2)return void o.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(r)}),p.createBoxCtor("avcC",function(t){var e,r;for(e=0,this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=3&t.readUint8(),this.nb_SPS_nalus=31&t.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[];e0&&(this.ext=t.readUint8Array(r))}),p.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}),p.createFullBoxCtor("ccst",function(t){var e=t.readUint8();this.all_ref_pics_intra=(128&e)==128,this.intra_pred_used=(64&e)==64,this.max_ref_per_pic=(63&e)>>2,t.readUint24()}),p.createBoxCtor("cdef",function(t){var e;for(e=0,this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[];e=32768&&this.component_type_urls.push(t.readCString())}}),p.createFullBoxCtor("co64",function(t){var e,r;if(e=t.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else"rICC"===this.colour_type?this.ICC_profile=t.readUint8Array(this.size-4):"prof"===this.colour_type&&(this.ICC_profile=t.readUint8Array(this.size-4))}),p.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()}),p.createFullBoxCtor("cslg",function(t){0===this.version&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())}),p.createFullBoxCtor("ctts",function(t){if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=e>>1&31,this.bsmod=(1&e)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|s>>5&7}),p.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=7&e,this.ind_subs=[];for(var r=0;r>6,s.bsid=a>>1&31,s.bsmod=(1&a)<<4|n>>4&15,s.acmod=n>>1&7,s.lfeon=1&n,s.num_dep_sub=o>>1&15,s.num_dep_sub>0&&(s.chan_loc=(1&o)<<8|t.readUint8())}}),p.createFullBoxCtor("dfLa",function(t){for(var e=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];;){var s=t.readUint8(),a=Math.min(127&s,r.length-1);if(a?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),e.push(r[a]),128&s)break}this.numMetadataBlocks=e.length+" ("+e.join(", ")+")"}),p.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()}),p.createBoxCtor("dmax",function(t){this.time=t.readUint32()}),p.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()}),p.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;e=4;)this.compatible_brands[r]=t.readString(4),e-=4,r++}),p.createFullBoxCtor("hdlr",function(t){0===this.version&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))}),p.createBoxCtor("hvcC",function(t){this.configurationVersion=t.readUint8(),a=t.readUint8(),this.general_profile_space=a>>6,this.general_tier_flag=(32&a)>>5,this.general_profile_idc=31&a,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),this.chroma_format_idc=3&t.readUint8(),this.bit_depth_luma_minus8=7&t.readUint8(),this.bit_depth_chroma_minus8=7&t.readUint8(),this.avgFrameRate=t.readUint16(),a=t.readUint8(),this.constantFrameRate=a>>6,this.numTemporalLayers=(13&a)>>3,this.temporalIdNested=(4&a)>>2,this.lengthSizeMinusOne=3&a,this.nalu_arrays=[];var e,r,s,a,n=t.readUint8();for(e=0;e>7,o.nalu_type=63&a;var l=t.readUint16();for(r=0;r>4&15,this.length_size=15&e,e=t.readUint8(),this.base_offset_size=e>>4&15,1===this.version||2===this.version?this.index_size=15&e:this.index_size=0,this.items=[];var e,r=0;if(this.version<2)r=t.readUint16();else if(2===this.version)r=t.readUint32();else throw"version of iloc box not supported";for(var s=0;s>7,this.axis=1&e}),p.createFullBoxCtor("infe",function(t){if((0===this.version||1===this.version)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),1===this.version){this.extension_type=t.readString(4),o.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(2===this.version?this.item_ID=t.readUint16():3===this.version&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),"mime"===this.item_type?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):"uri "===this.item_type&&(this.item_uri_type=t.readCString()))}),p.createFullBoxCtor("ipma",function(t){var e,r;for(e=0,entry_count=t.readUint32(),this.associations=[];e>7==1,1&this.flags?o.property_index=(127&n)<<8|t.readUint8():o.property_index=127&n}}}),p.createFullBoxCtor("iref",function(t){var e,r;for(this.references=[];t.getPosition()>7,s.assignment_type=127&a,s.assignment_type){case 0:s.grouping_type=t.readString(4);break;case 1:s.grouping_type=t.readString(4),s.grouping_type_parameter=t.readUint32();break;case 2:case 3:break;case 4:s.sub_track_id=t.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}}),p.createBoxCtor("lhvC",function(t){this.configurationVersion=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),s=t.readUint8(),this.numTemporalLayers=(13&s)>>3,this.temporalIdNested=(4&s)>>2,this.lengthSizeMinusOne=3&s,this.nalu_arrays=[];var e,r,s,a=t.readUint8();for(e=0;e>7,n.nalu_type=63&s;var o=t.readUint16();for(r=0;r>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}),p.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()}),p.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()}),p.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var r=0;r0){var e=t.readUint32();this.kid=[];for(var r=0;r0&&(this.data=t.readUint8Array(s))}),p.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),p.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),p.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),p.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),p.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}),p.createFullBoxCtor("saio",function(t){1&this.flags&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var r=t.readUint8(),s=0;s>7,this.num_leading_samples=127&e}),p.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)o.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=15&e,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=p.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}),p.createSampleGroupCtor("stsa",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),p.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=63&e}),p.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7}),p.createSampleGroupCtor("tsas",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),p.createSampleGroupCtor("tscl",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),p.createSampleGroupCtor("vipr",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),p.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),1===this.version?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),r=0;r>6,this.sample_depends_on[s]=e>>4&3,this.sample_is_depended_on[s]=e>>2&3,this.sample_has_redundancy[s]=3&e}),p.createFullBoxCtor("senc"),p.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),o.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e,r=t.readUint32(),s=0;s>31&1,s.referenced_size=0x7fffffff&a,s.subsegment_duration=t.readUint32(),s.starts_with_SAP=(a=t.readUint32())>>31&1,s.SAP_type=a>>28&7,s.SAP_delta_time=0xfffffff&a}}),p.SingleItemTypeReferenceBox=function(t,e,r,s){p.Box.call(this,t,e),this.hdr_size=r,this.start=s},p.SingleItemTypeReferenceBox.prototype=new p.Box,p.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[e+1]=15&s}else if(8===this.field_size)for(e=0;e0)for(r=0;r>4&15,this.default_skip_byte_block=15&e}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=p.parseHex16(t),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}),p.createFullBoxCtor("tfdt",function(t){1==this.version?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}),p.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&p.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}),p.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=3&e,this.entries=[];for(var r=t.readUint32(),s=0;s>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}),p.createBoxCtor("tmax",function(t){this.time=t.readUint32()}),p.createBoxCtor("tmin",function(t){this.time=t.readUint32()}),p.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()}),p.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()}),p.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()}),p.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()},p.createTrackGroupCtor("msrc"),p.TrackReferenceTypeBox=function(t,e,r,s){p.Box.call(this,t,e),this.hdr_size=r,this.start=s},p.TrackReferenceTypeBox.prototype=new p.Box,p.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)},p.trefBox.prototype.parse=function(t){for(var e,r;t.getPosition()e&&this.flags&p.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&p.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=t.readUint32(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}}),p.createFullBoxCtor("url ",function(t){1!==this.flags&&(this.location=t.readCString())}),p.createFullBoxCtor("urn ",function(t){this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}),p.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),p.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=p.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}),p.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),p.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=p.parseHex16(t)}),p.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=1&e,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8()):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=1&e),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}),p.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)}),p.createFullBoxCtor("vvcC",function(t){var e,r,s={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){this.held_bits=t.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(t){this.held_bits=t.readUint16(),this.num_held_bits=16},extract_bits:function(t){var e=this.held_bits>>this.num_held_bits-t&(1<1){for(s.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=s.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)s.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;e+=p.decimalToHex(s,0),e+=".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var a=!1,n="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||a)&&(n="."+p.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+n,a=!0);e+=n}return e},p.vvc1SampleEntry.prototype.getCodec=p.vvi1SampleEntry.prototype.getCodec=function(){var t=p.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var e="";if(this.vvcC.general_constraint_info){var r,s,a,n=[];for(s=0,r=this.vvcC.ptl_frame_only_constraint<<7|this.vvcC.ptl_multilayer_enabled<<6;s>2&63,n.push(r),r&&(a=s),r=this.vvcC.general_constraint_info[s]>>2&3;if(void 0===a)e=".CA";else{e=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l=0,h=0;for(s=0;s<=a;++s)for(l=l<<8|n[s],h+=8;h>=5;)e+=o[l>>h-5&31],h-=5,l&=(1<0x100000000&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>0x100000000?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),"uuid"===this.type&&t.writeUint8Array(this.uuid),this.size>0x100000000&&t.writeUint64(this.size)},p.FullBox.prototype.writeHeader=function(t){this.size+=4,p.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)},p.Box.prototype.write=function(t){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))},p.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+10xffffffff),this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(t),1===this.version?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)},p.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&p.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&p.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&p.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&p.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&p.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&p.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&p.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&p.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&p.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&p.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)},p.tkhdBox.prototype.write=function(t){this.version=0,this.size=80,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)},p.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)},p.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&p.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&p.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&p.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&p.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&p.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&p.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&p.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&p.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)continue;else if(t[r]instanceof p.Box||e[r]instanceof p.Box)continue;else if(void 0===t[r]||void 0===e[r])continue;else if("function"==typeof t[r]||"function"==typeof e[r])continue;else if(t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1)continue;else if("data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r)continue;else if(p.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;else if(t[r]!==e[r])return!1;return!0},p.boxEqual=function(t,e){if(!p.boxEqualFields(t,e))return!1;for(var r=0;r=e?t:Array(e-t.length+1).join(r)+t}function a(t){var e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),a=Math.floor(t-3600*e-60*r),n=Math.floor((t-3600*e-60*r-a)*1e3);return""+s(e,2)+":"+s(r,2)+":"+s(a,2)+"."+s(n,3)}for(var n=this.parseSample(r),o="",l=0;l1)for(e=1;e-1&&this.fragmentedTracks.splice(e,1)},y.prototype.setExtractionOptions=function(t,e,r){var s=this.getTrackById(t);if(s){var a={};this.extractedTracks.push(a),a.id=t,a.user=e,a.trak=s,s.nextSample=0,a.nb_samples=1e3,a.samples=[],r&&r.nbSamples&&(a.nb_samples=r.nbSamples)}},y.prototype.unsetExtractionOptions=function(t){for(var e=-1,r=0;r-1&&this.extractedTracks.splice(e,1)},y.prototype.parse=function(){var t,e,r;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat())if(this.processIncompleteMdat())continue;else return;else{if(this.saveParsePosition&&this.saveParsePosition(),(t=p.parseOneBox(this.stream,!1)).code===p.ERR_NOT_ENOUGH_DATA)if(!this.processIncompleteBox)return;else if(this.processIncompleteBox(t))continue;else return;switch(r="uuid"!==(e=t.box).type?e.type:e.uuid,this.boxes.push(e),r){case"mdat":this.mdats.push(e);break;case"moof":this.moofs.push(e);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&o.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=e}this.updateUsedBytes&&this.updateUsedBytes(e,t)}},y.prototype.checkBuffer=function(t){if(null==t)throw"Buffer must be defined and non empty";if(void 0===t.fileStart)throw"Buffer must have a fileStart property";return 0===t.byteLength?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},y.prototype.appendBuffer=function(t,e){var r;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(o.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},y.prototype.getInfo=function(){var t,e,r,s,a,n,o={},l=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(l+1e3*this.moov.mvhd.creation_time),o.modified=new Date(l+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],t=0;t0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',t=0;t=r.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,r.nextSample-s.nb_samples)+","+(r.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,r.nextSample,t||r.nextSample>=r.samples.length),s.segmentStream=null,s!==this.fragmentedTracks[e]))break}}if(null!==this.onSamples)for(e=0;e=r.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+n.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(n.id,n.user,n.samples),n.samples=[],n!==this.extractedTracks[e]))break}}}},y.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null},y.prototype.getBoxes=function(t,e){var r=[];return y._sweep.call(this,t,r,e),r},y._sweep=function(t,e,r){for(var s in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&r)return;y._sweep.call(this.boxes[s],t,e,r)}},y.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);return e?e.samples:void 0},y.prototype.getTrackSample=function(t,e){var r=this.getTrackById(t);return this.getSample(r,e)},y.prototype.releaseUsedSamples=function(t,e){var r=0,s=this.getTrackById(t);s.lastValidSample||(s.lastValidSample=0);for(var a=s.lastValidSample;at*a.timescale){d=s-1;break}e&&a.is_sync&&(h=s)}for(e&&(d=h),t=r.samples[d].cts,r.nextSample=d;r.samples[d].alreadyRead===r.samples[d].size&&r.samples[d+1];)d++;return l=r.samples[d].offset+r.samples[d].alreadyRead,o.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+o.getDurationString(t,n)+" and offset: "+l),{offset:l,time:t/n}},y.prototype.getTrackDuration=function(t){var e;return t.samples?((e=t.samples[t.samples.length-1]).cts+e.duration)/e.timescale:1/0},y.prototype.seek=function(t,e){var r,s,a,n=this.moov,l={offset:1/0,time:1/0};if(this.moov){for(a=0;athis.getTrackDuration(r))&&((s=this.seekTrack(t,e,r)).offset-1){o=h;break}switch(o){case"Visual":if(a.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),n.set("width",e.width).set("height",e.height).set("horizresolution",4718592).set("vertresolution",4718592).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var c=new p.avcCBox;c.parse(new l(e.avcDecoderConfigRecord)),n.addBox(c)}else if(e.hevcDecoderConfigRecord){var f=new p.hvcCBox;f.parse(new l(e.hevcDecoderConfigRecord)),n.addBox(f)}break;case"Audio":a.add("smhd").set("balance",e.balance||0),n.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":a.add("hmhd");break;case"Subtitle":a.add("sthd"),"stpp"===e.type&&n.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break;default:a.add("nmhd")}e.description&&n.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(t){n.addBox(t)}),a.add("dinf").add("dref").addEntry(new p["url Box"]().set("flags",1));var m=a.add("stbl");return m.add("stsd").addEntry(n),m.add("stts").set("sample_counts",[]).set("sample_deltas",[]),m.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),m.add("stco").set("chunk_offsets",[]),m.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(r),e.id}},p.Box.prototype.computeSize=function(t){var e=t||new h;e.endianness=h.BIG_ENDIAN,this.write(e)},y.prototype.addSample=function(t,e,r){var s=r||{},a={},n=this.getTrackById(t);if(null!==n){a.number=n.samples.length,a.track_id=n.tkhd.track_id,a.timescale=n.mdia.mdhd.timescale,a.description_index=s.sample_description_index?s.sample_description_index-1:0,a.description=n.mdia.minf.stbl.stsd.entries[a.description_index],a.data=e,a.size=e.byteLength,a.alreadyRead=a.size,a.duration=s.duration||1,a.cts=s.cts||0,a.dts=s.dts||0,a.is_sync=s.is_sync||!1,a.is_leading=s.is_leading||0,a.depends_on=s.depends_on||0,a.is_depended_on=s.is_depended_on||0,a.has_redundancy=s.has_redundancy||0,a.degradation_priority=s.degradation_priority||0,a.offset=0,a.subsamples=s.subsamples,n.samples.push(a),n.samples_size+=a.size,n.samples_duration+=a.duration,void 0===n.first_dts&&(n.first_dts=s.dts),this.processSamples();var o=this.createSingleSampleMoof(a);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),a}},y.prototype.createSingleSampleMoof=function(t){var e=0;e=t.is_sync?0x2000000:65536;var r=new p.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var s=r.add("traf"),a=this.getTrackById(t.track_id);return s.add("tfhd").set("track_id",t.track_id).set("flags",p.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),s.add("tfdt").set("baseMediaDecodeTime",t.dts-(a.first_dts||0)),s.add("trun").set("flags",p.TRUN_FLAGS_DATA_OFFSET|p.TRUN_FLAGS_DURATION|p.TRUN_FLAGS_SIZE|p.TRUN_FLAGS_FLAGS|p.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),r},y.prototype.lastMoofIndex=0,y.prototype.samplesDataSize=0,y.prototype.resetTables=function(){for(t=0,this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0;t=2&&(h=a[o].grouping_type+"/0",(l=new d(a[o].grouping_type,0)).is_fragment=!0,e.sample_groups_info[h]||(e.sample_groups_info[h]=l))}else for(o=0;o=2&&(h=s[o].grouping_type+"/0",l=new d(s[o].grouping_type,0),t.sample_groups_info[h]||(t.sample_groups_info[h]=l))},y.setSampleGroupProperties=function(t,e,r,s){var a,n,o;for(a in e.sample_groups=[],s)e.sample_groups[a]={},e.sample_groups[a].grouping_type=s[a].grouping_type,e.sample_groups[a].grouping_type_parameter=s[a].grouping_type_parameter,r>=s[a].last_sample_in_run&&(s[a].last_sample_in_run<0&&(s[a].last_sample_in_run=0),s[a].entry_index++,s[a].entry_index<=s[a].sbgp.entries.length-1&&(s[a].last_sample_in_run+=s[a].sbgp.entries[s[a].entry_index].sample_count)),s[a].entry_index<=s[a].sbgp.entries.length-1?e.sample_groups[a].group_description_index=s[a].sbgp.entries[s[a].entry_index].group_description_index:e.sample_groups[a].group_description_index=-1,0!==e.sample_groups[a].group_description_index&&(o=s[a].fragment_description?s[a].fragment_description:s[a].description,e.sample_groups[a].group_description_index>0?(n=e.sample_groups[a].group_description_index>65535?(e.sample_groups[a].group_description_index>>16)-1:e.sample_groups[a].group_description_index-1,o&&n>=0&&(e.sample_groups[a].description=o.entries[n])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[a].description=o.entries[o.default_group_description_index-1]))},y.process_sdtp=function(t,e,r){e&&(t?(e.is_leading=t.is_leading[r],e.depends_on=t.sample_depends_on[r],e.is_depended_on=t.sample_is_depended_on[r],e.has_redundancy=t.sample_has_redundancy[r]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},y.prototype.buildSampleLists=function(){var t,e;for(t=0;tb&&(v++,b<0&&(b=0),b+=n.sample_counts[v]),e>0?(t.samples[e-1].duration=n.sample_deltas[v],t.samples_duration+=t.samples[e-1].duration,C.dts=t.samples[e-1].dts+t.samples[e-1].duration):C.dts=0,o?(e>=S&&(x++,S<0&&(S=0),S+=o.sample_counts[x]),C.cts=t.samples[e].dts+o.sample_offsets[x]):C.cts=C.dts,l?(e==l.sample_numbers[U]-1?(C.is_sync=!0,U++):(C.is_sync=!1,C.degradation_priority=0),d&&d.entries[E].sample_delta+A==e+1&&(C.subsamples=d.entries[E].subsamples,A+=d.entries[E].sample_delta,E++)):C.is_sync=!0,y.process_sdtp(t.mdia.minf.stbl.sdtp,C,C.number),c?C.degradation_priority=c.priority[e]:C.degradation_priority=0,d&&d.entries[E].sample_delta+A==e&&(C.subsamples=d.entries[E].subsamples,A+=d.entries[E].sample_delta),(u.length>0||p.length>0)&&y.setSampleGroupProperties(t,C,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},y.prototype.updateSampleLists=function(){if(void 0!==this.moov){for(;this.lastMoofIndex0&&y.initSampleGroups(u,d,d.sbgps,u.mdia.minf.stbl.sgpds,d.sgpds),e=0;e0?f.dts=u.samples[u.samples.length-2].dts+u.samples[u.samples.length-2].duration:(d.tfdt?f.dts=d.tfdt.baseMediaDecodeTime:f.dts=0,u.first_traf_merged=!0),f.cts=f.dts,_.flags&p.TRUN_FLAGS_CTS_OFFSET&&(f.cts=f.dts+_.sample_composition_time_offset[r]),m=o,_.flags&p.TRUN_FLAGS_FLAGS?m=_.sample_flags[r]:0===r&&_.flags&p.TRUN_FLAGS_FIRST_FLAG&&(m=_.first_sample_flags),f.is_sync=!(m>>16&1),f.is_leading=m>>26&3,f.depends_on=m>>24&3,f.is_depended_on=m>>22&3,f.has_redundancy=m>>20&3,f.degradation_priority=65535&m;var g=!!(d.tfhd.flags&p.TFHD_FLAG_BASE_DATA_OFFSET),w=!!(d.tfhd.flags&p.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(_.flags&p.TRUN_FLAGS_DATA_OFFSET),v=0;v=g?d.tfhd.base_data_offset:w||0===e?h.start:l,0===e&&0===r?b?f.offset=v+_.data_offset:f.offset=v:f.offset=l,l=f.offset+f.size,(d.sbgps.length>0||d.sgpds.length>0||u.mdia.minf.stbl.sbgps.length>0||u.mdia.minf.stbl.sgpds.length>0)&&y.setSampleGroupProperties(u,f,f.number_in_traf,d.sample_groups_info)}}if(d.subs){u.has_fragment_subsamples=!0;var S=d.first_sample_index;for(e=0;e-1))return null;var n=(r=this.stream.buffers[a]).byteLength-(s.offset+s.alreadyRead-r.fileStart);if(s.size-s.alreadyRead<=n)return o.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-r.fileStart)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),h.memcpy(s.data.buffer,s.alreadyRead,r,s.offset+s.alreadyRead-r.fileStart,s.size-s.alreadyRead),r.usedBytes+=s.size-s.alreadyRead,this.stream.logBufferLevel(),s.alreadyRead=s.size,s;if(0===n)return null;o.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-r.fileStart)+" read size: "+n+" full size: "+s.size+")"),h.memcpy(s.data.buffer,s.alreadyRead,r,s.offset+s.alreadyRead-r.fileStart,n),s.alreadyRead+=n,r.usedBytes+=n,this.stream.logBufferLevel()}},y.prototype.releaseSample=function(t,e){var r=t.samples[e];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},y.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},y.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},y.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=n.ipro.protections[n.iinf.item_infos[t].protection_index-1]),n.iinf.item_infos[t].item_type?r.type=n.iinf.item_infos[t].item_type:r.type="mime",r.content_type=n.iinf.item_infos[t].content_type,r.content_encoding=n.iinf.item_infos[t].content_encoding;if(n.grpl)for(t=0;t0&&c.property_index-1-1))return null;var l=(e=this.stream.buffers[n]).byteLength-(a.offset+a.alreadyRead-e.fileStart);if(!(a.length-a.alreadyRead<=l))return o.debug("ISOFile","Getting item #"+t+" extent #"+s+" partial data (alreadyRead: "+a.alreadyRead+" offset: "+(a.offset+a.alreadyRead-e.fileStart)+" read size: "+l+" full extent size: "+a.length+" full item size: "+r.size+")"),h.memcpy(r.data.buffer,r.alreadyRead,e,a.offset+a.alreadyRead-e.fileStart,l),a.alreadyRead+=l,r.alreadyRead+=l,e.usedBytes+=l,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+t+" extent #"+s+" data (alreadyRead: "+a.alreadyRead+" offset: "+(a.offset+a.alreadyRead-e.fileStart)+" read size: "+(a.length-a.alreadyRead)+" full extent size: "+a.length+" full item size: "+r.size+")"),h.memcpy(r.data.buffer,r.alreadyRead,e,a.offset+a.alreadyRead-e.fileStart,a.length-a.alreadyRead),e.usedBytes+=a.length-a.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=a.length-a.alreadyRead,a.alreadyRead=a.length}}return r.alreadyRead===r.size?r:null},y.prototype.releaseItem=function(t){var e=this.items[t];if(!e.data)return 0;this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var r=0;r0?this.moov.traks[t].samples[0].duration:0),e.push(s)}return e},p.Box.prototype.printHeader=function(t){this.size+=8,this.size>0x100000000&&(this.size+=8),"uuid"===this.type&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)},p.FullBox.prototype.printHeader=function(t){this.size+=4,p.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)},p.Box.prototype.print=function(t){this.printHeader(t)},p.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)},p.tkhdBox.prototype.print=function(t){p.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)};var w={};w.createFile=function(t,e){var r=new y(e);return r.discardMdatData=!(void 0===t||t),r},r.createFile=w.createFile},{}],"8Z4GK":[function(t,e,r,s){var a,n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"EventTool",()=>_),n.export(r,"Log",()=>z),n.export(r,"autoReadStream",()=>S),n.export(r,"file2stream",()=>x),n.export(r,"recodemux",()=>P),n.export(r,"workerTimer",()=>v);var o=t("@webav/mp4box.js"),l=n.interopDefault(o),h=Object.defineProperty,d=t=>{throw TypeError(t)},u=(t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,p=(t,e,r)=>u(t,"symbol"!=typeof e?e+"":e,r),c=(t,e,r)=>e.has(t)||d("Cannot "+r),f=(t,e,r)=>(c(t,e,"read from private field"),r?r.call(t):e.get(t)),m=(t,e,r)=>e.has(t)?d("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);class _{constructor(){m(this,a,new Map),p(this,"on",(t,e)=>{let r=f(this,a).get(t)??new Set;return r.add(e),f(this,a).has(t)||f(this,a).set(t,r),()=>{r.delete(e),0===r.size&&f(this,a).delete(t)}}),p(this,"once",(t,e)=>{let r=this.on(t,(...t)=>{r(),e(...t)});return r}),p(this,"emit",(t,...e)=>{let r=f(this,a).get(t);null!=r&&r.forEach(t=>t(...e))})}static forwardEvent(t,e,r){let s=r.map(r=>{let[s,a]=Array.isArray(r)?r:[r,r];return t.on(s,(...t)=>{e.emit(a,...t)})});return()=>{s.forEach(t=>t())}}destroy(){f(this,a).clear()}}a=new WeakMap;let g=()=>{let t;self.onmessage=e=>{"start"===e.data.event&&(self.clearInterval(t),t=self.setInterval(()=>{self.postMessage({})},16.6)),"stop"===e.data.event&&self.clearInterval(t)}},y=new Map,w=1,b=null;null!=globalThis.Worker&&((b=(()=>{let t=new Blob([`(${g.toString()})()`]);return new Worker(URL.createObjectURL(t))})()).onmessage=()=>{for(let[t,e]of(w+=1,y))if(w%t==0)for(let t of e)t()});let v=(t,e)=>{let r=Math.round(e/16.6),s=y.get(r)??new Set;return s.add(t),y.set(r,s),1===y.size&&1===s.size&&(null==b||b.postMessage({event:"start"})),()=>{s.delete(t),0===s.size&&y.delete(r),0===y.size&&(w=0,null==b||b.postMessage({event:"stop"}))}};function S(t,e){let r=!1;return(async function(){let s=t.getReader();for(;!r;){let{value:t,done:r}=await s.read();if(r)return void e.onDone();await e.onChunk(t)}s.releaseLock(),await t.cancel()})().catch(console.error),()=>{r=!0}}function x(t,e,r){let s=0,a=0,n=t.boxes,o=!1,h=()=>{var e;if(!o)if(null==n.find(t=>"moof"===t.type))return null;else o=!0;if(a>=n.length)return null;let r=new l.default.DataStream;r.endianness=l.default.DataStream.BIG_ENDIAN;let s=a;try{for(;s{let t=h();null==t||u||r.enqueue(t)},e),p=e=>{if(clearInterval(s),t.flush(),null!=e)return void r.error(e);let a=h();null==a||u||r.enqueue(a),u||r.close()},d&&p()},cancel(){u=!0,clearInterval(s),null==r||r()}}),stop:t=>{d||(d=!0,null==p||p(t))}}}let U=(t,e)=>{let r=new Uint8Array(8);new DataView(r.buffer).setUint32(0,e);for(let e=0;e<4;e++)r[4+e]=t.charCodeAt(e);return r},E=()=>{let t=new TextEncoder,e=t.encode("mdta"),r=t.encode("mp4 handler"),s=32+r.byteLength+1,a=new Uint8Array(s),n=new DataView(a.buffer);return a.set(U("hdlr",s),0),n.setUint32(8,0),a.set(e,16),a.set(r,32),a},A=t=>{let e=new TextEncoder,r=e.encode("mdta"),s=t.map(t=>{let s=e.encode(t),a=8+s.byteLength,n=new Uint8Array(a);return new DataView(n.buffer).setUint32(0,a),n.set(r,4),n.set(s,4+r.byteLength),n}),a=16+s.reduce((t,e)=>t+e.byteLength,0),n=new Uint8Array(a),o=new DataView(n.buffer);n.set(U("keys",a),0),o.setUint32(8,0),o.setUint32(12,t.length);let l=16;for(let t of s)n.set(t,l),l+=t.byteLength;return n},C=t=>{let e=new TextEncoder,r=e.encode("data"),s=Object.entries(t).map(([t,s],a)=>{let n=e.encode(s),o=24+n.byteLength,l=new Uint8Array(o),h=new DataView(l.buffer);return h.setUint32(0,o),h.setUint32(4,a+1),h.setUint32(8,16+n.byteLength),l.set(r,12),h.setUint32(16,1),l.set(n,24),l}),a=8+s.reduce((t,e)=>t+e.byteLength,0),n=new Uint8Array(a);n.set(U("ilst",a),0);let o=8;for(let t of s)n.set(t,o),o+=t.byteLength;return n},T=t=>{let e=E(),r=A(Object.keys(t)),s=C(t),a=new Uint8Array(e.length+r.length+s.length);return a.set(e,0),a.set(r,e.length),a.set(s,e.length+r.length),a},k=1,B=[],F=["debug","info","warn","error"].reduce((t,e,r)=>Object.assign(t,{[e]:(...t)=>{k<=r&&(console[e](...t),B.push({lvName:e,timeStr:function(){let t=new Date;return`${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}.${t.getMilliseconds()}`}(),args:t}))}}),{}),I=new Map,z={setLogLevel:t=>{k=I.get(t)??1},...F,create:t=>Object.fromEntries(Object.entries(F).map(([e,r])=>[e,(...e)=>r(t,...e)])),dump:async()=>B.reduce((t,{lvName:e,timeStr:r,args:s})=>t+`[${e}][${r}] ${s.map(t=>t instanceof Error?String(t):"object"==typeof t?JSON.stringify(t,(t,e)=>e instanceof Error?String(e):e):String(t)).join(" ")} `,"")};function P(t){z.info("recodemux opts:",t);let e=l.default.createFile(),r=new _,s=(t,e)=>{let r=t.add("udta").add("meta");r.data=T(e),r.size=r.data.byteLength},a=!1,n=()=>{null==e.moov||a||(a=!0,null!=t.metaDataTags&&s(e.moov,t.metaDataTags),null!=t.duration&&(e.moov.mvhd.duration=t.duration))};r.once("VideoReady",n),r.once("AudioReady",n);let o=null!=t.video?function(t,e,r){let s={timescale:1e6,width:t.width,height:t.height,brands:["isom","iso2","avc1","mp42","mp41"],avcDecoderConfigRecord:null,name:"Track created with WebAV"},a=-1,n=!1;r.once("AudioReady",()=>{n=!0});let o={encoder0:[],encoder1:[]},l=(t,n,l)=>{var h;if(-1===a&&null!=l){let t=null==(h=l.decoderConfig)?void 0:h.description;(function(t){let e=new Uint8Array(t);e[2].toString(2).slice(-2).includes("1")&&(e[2]=0)})(t),s.avcDecoderConfigRecord=t,a=e.addTrack(s),r.emit("VideoReady"),z.info("VideoEncoder, video track ready, trackId:",a)}o[t].push(R(n))},h="encoder1",d=0,u=Math.floor(1e3/t.expectFPS*1e3);function p(){if(!n)return;let t="encoder1"===h?"encoder0":"encoder1",e=o[h],r=o[t];if(0===e.length&&0===r.length)return;let s=e[0];if(null!=s&&(!s.is_sync||s.cts-dd&&(d=t)}let a=r[0];if(null!=a&&a.is_sync&&a.cts-dd&&(d=t)}else{h=t,p();return}}function c(t){let r=-1,s=0;for(;s0&&n.is_sync)break;e.addSample(a,n.data,n),r=n.cts+n.duration}return t.splice(0,s),r}let f=v(p,15),m=L(t,(t,e)=>l("encoder0",t,e)),_=L(t,(t,e)=>l("encoder1",t,e)),g=0;return{get encodeQueueSize(){return m.encodeQueueSize+_.encodeQueueSize},encode:(t,e)=>{try{e.keyFrame&&(g+=1),(g%2==0?m:_).encode(t,e)}catch(s){let r=`encode video frame error: ${s.message}, state: ${JSON.stringify({ts:t.timestamp,keyFrame:e.keyFrame,duration:t.duration,gopId:g})}`;throw z.error(r),Error(r)}},flush:async()=>{await Promise.all(["configured"===m.state?await m.flush():null,"configured"===_.state?await _.flush():null]),f(),p()},close:()=>{"configured"===m.state&&m.close(),"configured"===_.state&&_.close()}}}(t.video,e,r):null,h=null!=t.audio?function(t,e,r){let s={timescale:1e6,samplerate:t.sampleRate,channel_count:t.channelCount,hdlr:"soun",type:"aac"===t.codec?"mp4a":"Opus",name:"Track created with WebAV"},a=-1,n=[],o=!1;r.once("VideoReady",()=>{o=!0,n.forEach(t=>{let r=R(t);e.addSample(a,r.data,r)}),n=[]});let h={codec:"aac"===t.codec?"mp4a.40.2":"opus",sampleRate:t.sampleRate,numberOfChannels:t.channelCount,bitrate:128e3},d=new AudioEncoder({error:t=>{let e=`AudioEncoder error: ${t.message}, config: ${JSON.stringify(h)}, state: ${JSON.stringify({qSize:d.encodeQueueSize,state:d.state})}`;throw z.error(e),Error(e)},output:(t,h)=>{var d;if(-1===a){let t=null==(d=h.decoderConfig)?void 0:d.description;a=e.addTrack({...s,description:null==t?void 0:function(t){let e=t.byteLength,r=new Uint8Array([0,0,0,0,3,23+e,0,2,0,4,18+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5,e,...new Uint8Array(t instanceof ArrayBuffer?t:t.buffer),6,1,2]),s=new l.default.BoxParser.esdsBox(r.byteLength);return s.hdr_size=0,s.parse(new l.default.DataStream(r,0,l.default.DataStream.BIG_ENDIAN)),s}(t)}),r.emit("AudioReady"),z.info("AudioEncoder, audio track ready, trackId:",a)}if(o){let r=R(t);e.addSample(a,r.data,r)}else n.push(t)}});return d.configure(h),d}(t.audio,e,r):null;return null==t.video&&r.emit("VideoReady"),null==t.audio&&r.emit("AudioReady"),{encodeVideo:(t,e)=>{null==o||o.encode(t,e),t.close()},encodeAudio:t=>{if(null!=h)try{h.encode(t),t.close()}catch(e){let t=`encode audio chunk error: ${e.message}, state: ${JSON.stringify({qSize:h.encodeQueueSize,state:h.state})}`;throw z.error(t),Error(t)}},getEncodeQueueSize:()=>(null==o?void 0:o.encodeQueueSize)??(null==h?void 0:h.encodeQueueSize)??0,flush:async()=>{await Promise.all([null==o?void 0:o.flush(),(null==h?void 0:h.state)==="configured"?h.flush():null])},close:()=>{r.destroy(),null==o||o.close(),(null==h?void 0:h.state)==="configured"&&h.close()},mp4file:e}}function L(t,e){let r={codec:t.codec,framerate:t.expectFPS,hardwareAcceleration:t.__unsafe_hardwareAcceleration__,bitrate:t.bitrate,width:t.width,height:t.height,alpha:"discard",avc:{format:"avc"}},s=new VideoEncoder({error:t=>{let e=`VideoEncoder error: ${t.message}, config: ${JSON.stringify(r)}, state: ${JSON.stringify({qSize:s.encodeQueueSize,state:s.state})}`;throw z.error(e),Error(e)},output:e});return s.configure(r),s}function R(t){let e=new ArrayBuffer(t.byteLength);t.copyTo(e);let r=t.timestamp;return{duration:t.duration??0,dts:r,cts:r,is_sync:"key"===t.type,data:e}}I.set(z.debug,0),I.set(z.info,1),I.set(z.warn,2),I.set(z.error,3),async function(){await Promise.resolve(),null!=globalThis.navigator&&null!=globalThis.document&&(z.info(`@webav version: 1.1.0, date: ${new Date().toLocaleDateString()}`),z.info(globalThis.navigator.userAgent),document.addEventListener("visibilitychange",()=>{z.info(`visibilitychange: ${document.visibilityState}`)}),"PressureObserver"in globalThis&&new PressureObserver(t=>{z.info(`cpu state change: ${JSON.stringify(t.map(t=>t.state))}`)}).observe("cpu"))}()},{"@webav/mp4box.js":"cxovW","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(t,e,r,s){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}],rkdE4:[function(t,e,r,s){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"resample",()=>p);var n=t("./lib/interpolator"),o=t("./lib/fir-lpf"),l=t("./lib/butterworth-lpf");let h={point:!1,linear:!1,cubic:!0,sinc:!0},d={IIR:16,FIR:71},u={IIR:l.ButterworthLPF,FIR:o.FIRLPF};function p(t,e,r,s={}){let a=(r-e)/e+1,o=new Float64Array(t.length*a);s.method=s.method||"cubic";let l=new(0,n.Interpolator)(t.length,o.length,{method:s.method,tension:s.tension||0,sincFilterSize:s.sincFilterSize||6,sincWindow:s.sincWindow||void 0});if(void 0===s.LPF&&(s.LPF=h[s.method]),s.LPF){s.LPFType=s.LPFType||"IIR";let a=u[s.LPFType];r>e?function(t,e,r,s){for(let a=0,n=e.length;a=0;t--)e[t]=s.filter(e[t])}(t,o,l,new a(s.LPFOrder||d[s.LPFType],r,e/2)):function(t,e,r,s){for(let e=0,r=t.length;e=0;e--)t[e]=s.filter(t[e]);c(t,e,r)}(t,o,l,new a(s.LPFOrder||d[s.LPFType],e,r/2))}else c(t,o,l);return o}function c(t,e,r){for(let s=0,a=e.length;sn);class n{constructor(t,e,r){var s;this.length_=t,this.scaleFactor_=(t-1)/e,this.interpolate=this.cubic,"point"===r.method?this.interpolate=this.point:"linear"===r.method?this.interpolate=this.linear:"sinc"===r.method&&(this.interpolate=this.sinc),this.tangentFactor_=1-Math.max(0,Math.min(1,r.tension||0)),this.sincFilterSize_=r.sincFilterSize||1,this.kernel_=(s=r.sincWindow||o,function(t){var e;return(0===(e=t)?1:Math.sin(Math.PI*e)/(Math.PI*e))*s(t)})}point(t,e){return this.getClippedInput_(Math.round(this.scaleFactor_*t),e)}linear(t,e){let r=Math.floor(t=this.scaleFactor_*t);return(1-(t-=r))*this.getClippedInput_(r,e)+t*this.getClippedInput_(r+1,e)}cubic(t,e){let r=Math.floor(t=this.scaleFactor_*t),s=[this.getTangent_(r,e),this.getTangent_(r+1,e)],a=[this.getClippedInput_(r,e),this.getClippedInput_(r+1,e)],n=(t-=r)*t,o=t*n;return(2*o-3*n+1)*a[0]+(o-2*n+t)*s[0]+(-2*o+3*n)*a[1]+(o-n)*s[1]}sinc(t,e){let r=Math.floor(t=this.scaleFactor_*t),s=r-this.sincFilterSize_+1,a=r+this.sincFilterSize_,n=0;for(let r=s;r<=a;r++)n+=this.kernel_(t-r)*this.getClippedInput_(r,e);return n}getTangent_(t,e){return this.tangentFactor_*(this.getClippedInput_(t+1,e)-this.getClippedInput_(t-1,e))/2}getClippedInput_(t,e){return 0<=t&&tn);class n{constructor(t,e,r){let s=2*Math.PI*r/e,a=0;this.filters=[];for(let e=0;e<=t;e++)e-t/2==0?this.filters[e]=s:(this.filters[e]=Math.sin(s*(e-t/2))/(e-t/2),this.filters[e]*=.54-.46*Math.cos(2*Math.PI*e/t)),a+=this.filters[e];for(let e=0;e<=t;e++)this.filters[e]/=a;this.z=this.initZ_()}filter(t){this.z.buf[this.z.pointer]=t;let e=0;for(let t=0,r=this.z.buf.length;tn);class n{constructor(t,e,r){let s=[];for(let a=0;aI),_.export(r,"file",()=>R),_.export(r,"rollfile",()=>X),_.export(r,"tmpfile",()=>Z),_.export(r,"write",()=>D);var g=t=>{throw TypeError(t)},y=(t,e,r)=>e.has(t)||g("Cannot "+r),w=(t,e,r)=>(y(t,e,"read from private field"),r?r.call(t):e.get(t)),b=(t,e,r)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),v=(t,e,r,s)=>(y(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r);let S="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHUobil7aWYobj09PSIvIilyZXR1cm57cGFyZW50Om51bGwsbmFtZToiIn07Y29uc3QgZT1uLnNwbGl0KCIvIikuZmlsdGVyKGk9PmkubGVuZ3RoPjApO2lmKGUubGVuZ3RoPT09MCl0aHJvdyBFcnJvcigiSW52YWxpZCBwYXRoIik7Y29uc3QgYT1lW2UubGVuZ3RoLTFdLHI9Ii8iK2Uuc2xpY2UoMCwtMSkuam9pbigiLyIpO3JldHVybntuYW1lOmEscGFyZW50OnJ9fWFzeW5jIGZ1bmN0aW9uIHcobixlKXtjb25zdHtwYXJlbnQ6YSxuYW1lOnJ9PXUobik7aWYoYT09bnVsbClyZXR1cm4gYXdhaXQgbmF2aWdhdG9yLnN0b3JhZ2UuZ2V0RGlyZWN0b3J5KCk7Y29uc3QgaT1hLnNwbGl0KCIvIikuZmlsdGVyKHQ9PnQubGVuZ3RoPjApO3RyeXtsZXQgdD1hd2FpdCBuYXZpZ2F0b3Iuc3RvcmFnZS5nZXREaXJlY3RvcnkoKTtmb3IoY29uc3QgcyBvZiBpKXQ9YXdhaXQgdC5nZXREaXJlY3RvcnlIYW5kbGUocyx7Y3JlYXRlOmUuY3JlYXRlfSk7aWYoZS5pc0ZpbGUpcmV0dXJuIGF3YWl0IHQuZ2V0RmlsZUhhbmRsZShyLHtjcmVhdGU6ZS5jcmVhdGV9KX1jYXRjaCh0KXtpZih0Lm5hbWU9PT0iTm90Rm91bmRFcnJvciIpcmV0dXJuIG51bGw7dGhyb3cgdH19Y29uc3QgZj17fTtzZWxmLm9ubWVzc2FnZT1hc3luYyBuPT57dmFyIGk7Y29uc3R7ZXZ0VHlwZTplLGFyZ3M6YX09bi5kYXRhO2xldCByPWZbYS5maWxlSWRdO3RyeXtsZXQgdDtjb25zdCBzPVtdO2lmKGU9PT0icmVnaXN0ZXIiKXtjb25zdCBsPWF3YWl0IHcoYS5maWxlUGF0aCx7Y3JlYXRlOiEwLGlzRmlsZTohMH0pO2lmKGw9PW51bGwpdGhyb3cgRXJyb3IoYG5vdCBmb3VuZCBmaWxlOiAke2EuZmlsZUlkfWApO3I9YXdhaXQgbC5jcmVhdGVTeW5jQWNjZXNzSGFuZGxlKHttb2RlOmEubW9kZX0pLGZbYS5maWxlSWRdPXJ9ZWxzZSBpZihlPT09ImNsb3NlIilhd2FpdCByLmNsb3NlKCksZGVsZXRlIGZbYS5maWxlSWRdO2Vsc2UgaWYoZT09PSJ0cnVuY2F0ZSIpYXdhaXQgci50cnVuY2F0ZShhLm5ld1NpemUpO2Vsc2UgaWYoZT09PSJ3cml0ZSIpe2NvbnN0e2RhdGE6bCxvcHRzOm99PW4uZGF0YS5hcmdzO3Q9YXdhaXQgci53cml0ZShsLG8pfWVsc2UgaWYoZT09PSJyZWFkIil7Y29uc3R7b2Zmc2V0Omwsc2l6ZTpvfT1uLmRhdGEuYXJncyxnPW5ldyBVaW50OEFycmF5KG8pLGQ9YXdhaXQgci5yZWFkKGcse2F0Omx9KSxjPWcuYnVmZmVyO3Q9ZD09PW8/YzooKGk9Yy50cmFuc2Zlcik9PW51bGw/dm9pZCAwOmkuY2FsbChjLGQpKT8/Yy5zbGljZSgwLGQpLHMucHVzaCh0KX1lbHNlIGU9PT0iZ2V0U2l6ZSI/dD1hd2FpdCByLmdldFNpemUoKTplPT09ImZsdXNoIiYmYXdhaXQgci5mbHVzaCgpO3NlbGYucG9zdE1lc3NhZ2Uoe2V2dFR5cGU6ImNhbGxiYWNrIixjYklkOm4uZGF0YS5jYklkLHJldHVyblZhbDp0fSxzKX1jYXRjaCh0KXtjb25zdCBzPXQ7c2VsZi5wb3N0TWVzc2FnZSh7ZXZ0VHlwZToidGhyb3dFcnJvciIsY2JJZDpuLmRhdGEuY2JJZCxlcnJNc2c6cy5uYW1lKyI6ICIrcy5tZXNzYWdlK2AKYCtKU09OLnN0cmluZ2lmeShuLmRhdGEpfSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPW9wZnMtd29ya2VyLUY0UldscWNfLmpzLm1hcAo=",x="u">typeof self&&self.Blob&&new Blob([Uint8Array.from(atob(S),t=>t.charCodeAt(0))],{type:"text/javascript;charset=utf-8"});function U(t){let e;try{if(!(e=x&&(self.URL||self.webkitURL).createObjectURL(x)))throw"";let r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;base64,"+S,{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}async function E(t,e,r){let s=function(){if(A.length<3){let t=function(){let t=new U,e=0,r={};return t.onmessage=({data:t})=>{var e,s;"callback"===t.evtType?null==(e=r[t.cbId])||e.resolve(t.returnVal):"throwError"===t.evtType&&(null==(s=r[t.cbId])||s.reject(Error(t.errMsg))),delete r[t.cbId]},async function(s,a,n=[]){e+=1;let o=new Promise((t,s)=>{r[e]={resolve:t,reject:s}});return t.postMessage({cbId:e,evtType:s,args:a},n),o}}();return A.push(t),t}{let t=A[C];return C=(C+1)%A.length,t}}();return await s("register",{fileId:t,filePath:e,mode:r}),{read:async(e,r)=>await s("read",{fileId:t,offset:e,size:r}),write:async(e,r)=>await s("write",{fileId:t,data:e,opts:r},[ArrayBuffer.isView(e)?e.buffer:e]),close:async()=>await s("close",{fileId:t}),truncate:async e=>await s("truncate",{fileId:t,newSize:e}),getSize:async()=>await s("getSize",{fileId:t}),flush:async()=>await s("flush",{fileId:t})}}let A=[],C=0;function T(t){if("/"===t)return{parent:null,name:""};let e=t.split("/").filter(t=>t.length>0);if(0===e.length)throw Error("Invalid path");return{name:e[e.length-1],parent:"/"+e.slice(0,-1).join("/")}}async function k(t,e){let{parent:r,name:s}=T(t);if(null==r)return await navigator.storage.getDirectory();let a=r.split("/").filter(t=>t.length>0);try{let t=await navigator.storage.getDirectory();for(let r of a)t=await t.getDirectoryHandle(r,{create:e.create});return e.isFile?await t.getFileHandle(s,{create:e.create}):await t.getDirectoryHandle(s,{create:e.create})}catch(t){if("NotFoundError"===t.name)return null;throw t}}async function B(t){let{parent:e,name:r}=T(t);if(null==e){let t=await navigator.storage.getDirectory();for await(let e of t.keys())await t.removeEntry(e,{recursive:!0});return}let s=await k(e,{create:!1,isFile:!1});if(null!=s)try{await s.removeEntry(r,{recursive:!0})}catch(t){if("NotFoundError"===t.name)return;throw t}}function F(t,e){return`${t}/${e}`.replace("//","/")}function I(t){return new P(t)}let z=class t{constructor(t){b(this,a),b(this,n),b(this,o),v(this,a,t);let{parent:e,name:r}=T(t);v(this,n,r),v(this,o,e)}get kind(){return"dir"}get name(){return w(this,n)}get path(){return w(this,a)}get parent(){return null==w(this,o)?null:I(w(this,o))}async create(){return await k(w(this,a),{create:!0,isFile:!1}),I(w(this,a))}async exists(){return await k(w(this,a),{create:!1,isFile:!1}) instanceof FileSystemDirectoryHandle}async remove(){for(let t of(await this.children()))try{await t.remove()}catch(t){console.warn(t)}try{await B(w(this,a))}catch(t){console.warn(t)}}async children(){let t=await k(w(this,a),{create:!1,isFile:!1});if(null==t)return[];let e=[];for await(let r of t.values())e.push(("file"===r.kind?R:I)(F(w(this,a),r.name)));return e}async copyTo(e){if(!await this.exists())throw Error(`dir ${this.path} not exists`);if(e instanceof t){let t=await e.exists()?I(F(e.path,this.name)):e;return await t.create(),await Promise.all((await this.children()).map(e=>e.copyTo(t))),t}if(e instanceof FileSystemDirectoryHandle)return await Promise.all((await this.children()).map(async t=>{"file"===t.kind?await t.copyTo(await e.getFileHandle(t.name,{create:!0})):await t.copyTo(await e.getDirectoryHandle(t.name,{create:!0}))})),null;throw Error("Illegal target type")}async moveTo(t){let e=await this.copyTo(t);return await this.remove(),e}};a=new WeakMap,n=new WeakMap,o=new WeakMap;let P=z,L=new Map;function R(t,e="rw"){if("rw"===e){let r=L.get(t)??new G(t,e);return L.set(t,r),r}return new G(t,e)}async function D(t,e,r={overwrite:!0}){if(e instanceof G)return void await D(t,await e.stream(),r);let s=await (t instanceof G?t:R(t,"rw")).createWriter();try{if(r.overwrite&&await s.truncate(0),e instanceof ReadableStream){let t=e.getReader();for(;;){let{done:e,value:r}=await t.read();if(e)break;await s.write(r)}}else await s.write(e)}catch(t){throw t}finally{await s.close()}}let M=0,O=()=>++M,N=class t{constructor(t,e){let r;b(this,l),b(this,h),b(this,d),b(this,u),b(this,p),b(this,c,0),b(this,f,(r=null,()=>(v(this,c,w(this,c)+1),r??(r=new Promise(async(t,e)=>{try{let e=await E(w(this,p),w(this,l),w(this,u));t([e,async()=>{v(this,c,w(this,c)-1),w(this,c)>0||(r=null,await e.close())}])}catch(t){e(t)}}))))),b(this,m,!1),v(this,p,O()),v(this,l,t),v(this,u,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[e]);let{parent:s,name:a}=T(t);if(null==s)throw Error("Invalid path");v(this,d,a),v(this,h,s)}get kind(){return"file"}get path(){return w(this,l)}get name(){return w(this,d)}get parent(){return null==w(this,h)?null:I(w(this,h))}async createWriter(){if("read-only"===w(this,u))throw Error("file is read-only");if(w(this,m))throw Error("Other writer have not been closed");v(this,m,!0);let t=new TextEncoder,[e,r]=await w(this,f).call(this),s=await e.getSize(),a=!1;return{write:async(r,n={})=>{if(a)throw Error("Writer is closed");let o="string"==typeof r?t.encode(r):r,l=n.at??s;return s=l+o.byteLength,await e.write(o,{at:l})},truncate:async t=>{if(a)throw Error("Writer is closed");await e.truncate(t),s>t&&(s=t)},flush:async()=>{if(a)throw Error("Writer is closed");await e.flush()},close:async()=>{if(a)throw Error("Writer is closed");a=!0,v(this,m,!1),await r()}}}async createReader(){let[t,e]=await w(this,f).call(this),r=!1,s=0;return{read:async(e,a={})=>{if(r)throw Error("Reader is closed");let n=a.at??s,o=await t.read(n,e);return s=n+o.byteLength,o},getSize:async()=>{if(r)throw Error("Reader is closed");return await t.getSize()},close:async()=>{r||(r=!0,await e())}}}async text(){return new TextDecoder().decode(await this.arrayBuffer())}async arrayBuffer(){let t=await k(w(this,l),{create:!1,isFile:!0});return null==t?new ArrayBuffer(0):(await t.getFile()).arrayBuffer()}async stream(){let t=await this.getOriginFile();return null==t?new ReadableStream({pull:t=>{t.close()}}):t.stream()}async getOriginFile(){var t;return null==(t=await k(w(this,l),{create:!1,isFile:!0}))?void 0:t.getFile()}async getSize(){let t=await k(w(this,l),{create:!1,isFile:!0});return null==t?0:(await t.getFile()).size}async exists(){return await k(w(this,l),{create:!1,isFile:!0}) instanceof FileSystemFileHandle}async remove(){if(w(this,c))throw Error("exists unclosed reader/writer");await B(w(this,l))}async copyTo(e){if(e instanceof t)return e.path===this.path?this:(await D(e.path,this),R(e.path));if(e instanceof P){if(!await this.exists())throw Error(`file ${this.path} not exists`);return await this.copyTo(R(F(e.path,this.name)))}if(e instanceof FileSystemFileHandle)return await (await this.stream()).pipeTo(await e.createWritable()),null;throw Error("Illegal target type")}async moveTo(t){let e=await this.copyTo(t);return await this.remove(),e}};l=new WeakMap,h=new WeakMap,d=new WeakMap,u=new WeakMap,p=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakMap;let G=N,W="/.opfs-tools-temp-dir";async function Y(t){try{if("file"===t.kind){if(!await t.exists())return!0;let e=await t.createWriter();await e.truncate(0),await e.close(),await t.remove()}else await t.remove();return!0}catch(t){return console.warn(t),!1}}let H=[],V=!1;async function j(){if(null==globalThis.localStorage)return;let t="OPFS_TOOLS_EXPIRES_TMP_FILES";V||(V=!0,globalThis.addEventListener("unload",()=>{0!==H.length&&localStorage.setItem(t,`${localStorage.getItem(t)??""},${H.join(",")}`)}));let e=localStorage.getItem(t)??"";for(let t of e.split(","))0!==t.length&&await Y(R(`${W}/${t}`))&&(e=e.replace(t,""));localStorage.setItem(t,e.replace(/,{2,}/g,","))}function Z(){let t=`${Math.random().toString().slice(2)}-${Date.now()}`;return H.push(t),R(`${W}/${t}`)}function X(t,e){let r=R(t),s=0,a=r.createWriter(),n=r.createReader(),o=async t=>{let e=await (await n).read(s,{at:Math.round(.3*s)});s=await t.write(e,{at:0}),await t.truncate(s)};return{append:async t=>{let r=await a;(s+=await r.write(t))>=e&&await o(r)},text:r.text.bind(r),remove:async()=>{await (await n).close(),await (await a).close(),await r.remove()},getSize:async()=>s}}!async function(){var t;!0!==globalThis.__opfs_tools_tmpfile_init__&&(globalThis.__opfs_tools_tmpfile_init__=!0,null!=globalThis.FileSystemDirectoryHandle&&null!=globalThis.FileSystemFileHandle&&(null==(t=globalThis.navigator)?void 0:t.storage.getDirectory)!=null&&(setInterval(async()=>{for(let t of(await I(W).children())){let e=/^\d+-(\d+)$/.exec(t.name);(null==e||Date.now()-Number(e[1])>2592e5)&&await Y(t)}},6e4),await j()))}()},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["jc2x7"],"jc2x7","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-proxy-webav/dist/artplayer-proxy-webav.legacy.js b/packages/artplayer-proxy-webav/dist/artplayer-proxy-webav.legacy.js index 3f8253023..7dd376a86 100644 --- a/packages/artplayer-proxy-webav/dist/artplayer-proxy-webav.legacy.js +++ b/packages/artplayer-proxy-webav/dist/artplayer-proxy-webav.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(t,e,r,n,s){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[n]&&a[n],u=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(e,r){if(!u[e]){if(!t[e]){var s="function"==typeof a[n]&&a[n];if(!r&&s)return s(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var h=Error("Cannot find module '"+e+"'");throw h.code="MODULE_NOT_FOUND",h}d.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},d.cache={};var f=u[e]=new c.Module(e);t[e][0].call(f.exports,d,f,f.exports,this)}return u[e].exports;function d(t){var e=d.resolve(t);return!1===e?{}:c(e)}}c.isParcelRequire=!0,c.Module=function(t){this.id=t,this.bundle=c,this.exports={}},c.modules=t,c.cache=u,c.parent=o,c.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[n]}}),a[n]=c;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var r,n,u=e.option,l=e.constructor.utils,c=l.createElement,h=l.def,f=c("canvas"),d=f.getContext("2d"),p=null,m=null,_=null,y=null,g=0,v={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:u.muted,volume:u.volume,autoplay:u.autoplay};function b(){_&&(clearInterval(_),_=null),m&&(m.stop(),m=null)}function w(){if(n){var t=v.muted?0:v.volume;n.gain.setValueAtTime(t,r.currentTime)}}function S(){return(S=(0,s._)(function(){var t,o,u,l;function c(){return h.apply(this,arguments)}function h(){return(h=(0,s._)(function(){var s,c,h,f,_,g,w,S;return(0,a._)(this,function(a){switch(a.label){case 0:if(!v.playing)return[2];return h=(c=performance.now())-l,l=c,null!==y?(t=1e6*y,y=null,u=!0):t+=1e3*h*v.playbackRate,v.currentTime=t/1e6,[4,p.tick(Math.round(t))];case 1:if(_=(f=a.sent()).state,g=f.video,w=f.audio,e.emit("video:timeupdate",{type:"timeupdate"}),"done"===_)return b(),v.ended=!0,v.playing=!1,v.paused=!0,e.emit("video:ended",{type:"ended"}),[2];return g&&"success"===_&&(d.clearRect(0,0,v.videoWidth,v.videoHeight),d.drawImage(g,0,0,v.videoWidth,v.videoHeight),g.close()),u?u=!1:(null==w?void 0:null===(s=w[0])||void 0===s?void 0:s.length)&&((S=r.createBuffer(2,w[0].length,48e3)).copyToChannel(w[0],0),S.copyToChannel(w[1],1),(m=r.createBufferSource()).buffer=S,m.connect(n),m.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),o=Math.max(r.currentTime,o),m.start(o),o+=S.duration/v.playbackRate),[2]}})})).apply(this,arguments)}return(0,a._)(this,function(e){return r||(n=(r=new AudioContext).createGain()).connect(r.destination),t=1e6*v.currentTime,o=0,u=!0,l=performance.now(),b(),w(),v.playing=!0,v.paused=!1,_=setInterval(c,1e3/60),[2]})})).apply(this,arguments)}function x(t){return E.apply(this,arguments)}function E(){return(E=(0,s._)(function(t){var e;return(0,a._)(this,function(r){switch(r.label){case 0:return[4,p.tick(1e6*t)];case 1:return(e=r.sent().video)&&(d.clearRect(0,0,f.width,f.height),d.drawImage(e,0,0,f.width,f.height),e.close()),[2]}})})).apply(this,arguments)}function U(){var t,r=null===(t=e.template)||void 0===t?void 0:t.$player;if(r&&!u.autoSize){var n=f.videoWidth/f.videoHeight,s=r.clientWidth,a=r.clientHeight,o=0,l=0;s/a>n?o=(s-a*n)/2:l=(a-s/n)/2,Object.assign(f.style,{padding:"".concat(l,"px ").concat(o,"px")})}}function T(){return(T=(0,s._)(function(){var r,n,s;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,(0,o.Combinator).isSupported()];case 1:if(!a.sent())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");b(),Object.assign(v,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:u.muted,volume:u.volume,autoplay:u.autoplay}),p&&(p.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"})),a.label=2;case 2:return a.trys.push([2,5,,6]),[4,Promise.resolve()];case 3:return a.sent(),v.readyState=1,e.emit("video:loadstart",{type:"loadstart"}),[4,fetch(u.url)];case 4:if(!(r=a.sent()).body)throw Error("No response body");return p=new o.MP4Clip(r.body,t),[3,6];case 5:throw n=a.sent(),v.readyState=0,e.emit("video:error",n),n;case 6:return[4,p.ready];case 7:return Object.assign(v,{readyState:4,duration:Math.round((s=a.sent()).duration/1e6),videoWidth:s.width,videoHeight:s.height}),f.width=v.videoWidth,f.height=v.videoHeight,[4,x(.1)];case 8:return a.sent(),U(),e.emit("video:loadedmetadata",{type:"loadedmetadata"}),e.emit("video:durationchange",{type:"durationchange"}),e.emit("video:loadeddata",{type:"loadeddata"}),e.emit("video:canplay",{type:"canplay"}),e.emit("video:canplaythrough",{type:"canplaythrough"}),[2]}})})).apply(this,arguments)}return h(f,"duration",{get:function(){return v.duration}}),h(f,"videoWidth",{get:function(){return v.videoWidth}}),h(f,"videoHeight",{get:function(){return v.videoHeight}}),h(f,"volume",{get:function(){return v.volume},set:function(t){v.volume=Math.max(0,Math.min(1,t)),w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(f,"currentTime",{get:function(){return v.currentTime},set:function(t){if(!(v.readyState<4)){var r=Math.max(0,Math.min(t,v.duration)),n=performance.now();n-g>16&&(g=n,y=r,v.currentTime=r,v.playing||x(r),e.emit("video:timeupdate",{type:"timeupdate"}))}}}),h(f,"autoplay",{get:function(){return v.autoplay},set:function(t){v.autoplay=t,t&&v.readyState>=4&&f.play()}}),h(f,"src",{get:function(){return u.url},set:function(t){u.url=t,(function(){return T.apply(this,arguments)})().then(function(){u.autoplay&&f.play()})}}),h(f,"playbackRate",{get:function(){return v.playbackRate},set:function(t){v.playbackRate=Math.max(.25,Math.min(2,t)),m&&m.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),e.emit("video:ratechange",{type:"ratechange"})}}),h(f,"playing",{get:function(){return v.playing}}),h(f,"paused",{get:function(){return v.paused}}),h(f,"ended",{get:function(){return v.ended}}),h(f,"readyState",{get:function(){return v.readyState}}),h(f,"muted",{get:function(){return v.muted},set:function(t){v.muted=t,w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(f,"buffered",{get:function(){return{start:function(){return 0},end:function(){return v.buffered},length:1}}}),h(f,"play",{value:/*#__PURE__*/(0,s._)(function(){return(0,a._)(this,function(t){switch(t.label){case 0:if(v.readyState<4)return[2,!1];return[4,function(){return S.apply(this,arguments)}()];case 1:return t.sent(),e.emit("video:play",{type:"play"}),e.emit("video:playing",{type:"playing"}),[2,!0]}})})}),h(f,"pause",{value:function(){b(),v.playing=!1,v.paused=!0,e.emit("video:pause",{type:"pause"})}}),e.on("destroy",function(){b(),p&&p.destroy()}),e.on("resize",U),f}}"undefined"!=typeof window&&(window.artplayerProxyWebAV=u)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@webav/av-cliper":"4iON5","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t,e,r,n,s,a,o){try{var u=t[a](o),l=u.value}catch(t){r(t);return}u.done?e(l):Promise.resolve(l).then(n,s)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var o=t.apply(e,r);function u(t){s(o,n,a,u,l,"next",t)}function l(t){s(o,n,a,u,l,"throw",t)}u(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return s.__generator});var s=t("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return o}),n.export(r,"__assign",function(){return u}),n.export(r,"__rest",function(){return l}),n.export(r,"__decorate",function(){return c}),n.export(r,"__param",function(){return h}),n.export(r,"__esDecorate",function(){return f}),n.export(r,"__runInitializers",function(){return d}),n.export(r,"__propKey",function(){return p}),n.export(r,"__setFunctionName",function(){return m}),n.export(r,"__metadata",function(){return _}),n.export(r,"__awaiter",function(){return y}),n.export(r,"__generator",function(){return g}),n.export(r,"__createBinding",function(){return v}),n.export(r,"__exportStar",function(){return b}),n.export(r,"__values",function(){return w}),n.export(r,"__read",function(){return S}),n.export(r,"__spread",function(){return x}),n.export(r,"__spreadArrays",function(){return E}),n.export(r,"__spreadArray",function(){return U}),n.export(r,"__await",function(){return T}),n.export(r,"__asyncGenerator",function(){return A}),n.export(r,"__asyncDelegator",function(){return I}),n.export(r,"__asyncValues",function(){return k}),n.export(r,"__makeTemplateObject",function(){return C}),n.export(r,"__importStar",function(){return P}),n.export(r,"__importDefault",function(){return R}),n.export(r,"__classPrivateFieldGet",function(){return F}),n.export(r,"__classPrivateFieldSet",function(){return D}),n.export(r,"__classPrivateFieldIn",function(){return z}),n.export(r,"__addDisposableResource",function(){return L}),n.export(r,"__disposeResources",function(){return M});var s=t("@swc/helpers/_/_type_of"),a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(t);se.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function c(t,e,r,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(o=(a<3?s(o):a>3?s(e,r,o):s(e,r))||o);return a>3&&o&&Object.defineProperty(e,r,o),o}function h(t,e){return function(r,n){e(r,n,t)}}function f(t,e,r,n,s,a){function o(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var u,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",h=!e&&t?n.static?t:t.prototype:null,f=e||(h?Object.getOwnPropertyDescriptor(h,n.name):{}),d=!1,p=r.length-1;p>=0;p--){var m={};for(var _ in n)m[_]="access"===_?{}:n[_];for(var _ in n.access)m.access[_]=n.access[_];m.addInitializer=function(t){if(d)throw TypeError("Cannot add initializers after decoration has completed");a.push(o(t||null))};var y=(0,r[p])("accessor"===l?{get:f.get,set:f.set}:f[c],m);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(u=o(y.get))&&(f.get=u),(u=o(y.set))&&(f.set=u),(u=o(y.init))&&s.unshift(u)}else(u=o(y))&&("field"===l?s.unshift(u):f[c]=u)}h&&Object.defineProperty(h,n.name,f),d=!0}function d(t,e,r){for(var n=arguments.length>2,s=0;s0&&s[s.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!s||u[1]>s[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 S(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,s,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){s={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(s)throw s.error}}return o}function x(){for(var t=[],e=0;e1||u(t,e)})},e&&(n[t]=e(n[t])))}function u(t,e){try{var r;(r=s[t](e)).value instanceof T?Promise.resolve(r.value.v).then(l,c):h(a[0][2],r)}catch(t){h(a[0][3],t)}}function l(t){u("next",t)}function c(t){u("throw",t)}function h(t,e){t(e),a.shift(),a.length&&u(a[0][0],a[0][1])}}function I(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,s){e[n]=t[n]?function(e){return(r=!r)?{value:T(t[n](e)),done:!1}:s?s(e):e}:s}}function k(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=w(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,s){!function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)}(n,s,(e=t[r](e)).done,e.value)})}}}function C(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var B=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function P(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 B(e,t),e}function R(t){return t&&t.__esModule?t:{default:t}}function F(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 D(t,e,r,n,s){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!s)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,r):s?s.value=r:e.set(t,r),r}function z(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 L(t,e,r){if(null!=e){var n,s;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],r&&(s=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var O="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var n=Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function M(t){function e(e){t.error=t.hasError?new O(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 s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(r,function(t){return e(t),r()})}catch(t){e(t)}}if(t.hasError)throw t.error}()}r.default={__extends:o,__assign:u,__rest:l,__decorate:c,__param:h,__metadata:_,__awaiter:y,__generator:g,__createBinding:v,__exportStar:b,__values:w,__read:S,__spread:x,__spreadArrays:E,__spreadArray:U,__await:T,__asyncGenerator:A,__asyncDelegator:I,__asyncValues:k,__makeTemplateObject:C,__importStar:P,__importDefault:R,__classPrivateFieldGet:F,__classPrivateFieldSet:D,__classPrivateFieldIn:z,__addDisposableResource:L,__disposeResources:M}},{"@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 s(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"4iON5":[function(t,e,r){var n,s,a,o,u,l,c,h,f,d,p,m,_,y,g,v,b,w,S,x,E,U,T,A,I,k,C,B,P,R,F,D,z,L,O,M,N,j,G,Y,W,V,H,X,Z,K,q,Q,J,$,tt,te,tr,ti,tn,ts,ta,to,tu,tl,tc,th,tf,td,tp,tm,t_,ty,tg,tv,tb,tw,tS,tx,tE,tU,tT,tA,tI,tk,tC,tB,tP,tR,tF,tD,tz,tL,tO,tM,tN,tj,tG,tY,tW,tV,tH,tX,tZ,tK,tq,tQ,tJ,t$,t0,t1,t2,t3,t4,t6,t8,t5,t9,t7,et,ee,er,ei,en,es,ea,eo,eu,el,ec,eh,ef,ed,ep=t("@parcel/transformer-js/src/esmodule-helpers.js");ep.defineInteropFlag(r),ep.export(r,"AudioClip",function(){return ih}),ep.export(r,"Combinator",function(){return i9}),ep.export(r,"DEFAULT_AUDIO_CONF",function(){return r$}),ep.export(r,"EmbedSubtitlesClip",function(){return iv}),ep.export(r,"EventTool",function(){return iw}),ep.export(r,"ImgClip",function(){return il}),ep.export(r,"Log",function(){return rw}),ep.export(r,"MP4Clip",function(){return r8}),ep.export(r,"MediaStreamClip",function(){return iy}),ep.export(r,"OffscreenSprite",function(){return i3}),ep.export(r,"Rect",function(){return i0}),ep.export(r,"VisibleSprite",function(){return i4}),ep.export(r,"adjustAudioDataVolume",function(){return rN}),ep.export(r,"audioResample",function(){return rW}),ep.export(r,"autoReadStream",function(){return rZ}),ep.export(r,"concatAudioClip",function(){return id}),ep.export(r,"concatFloat32Array",function(){return rz}),ep.export(r,"concatPCMFragments",function(){return rL}),ep.export(r,"createChromakey",function(){return iJ}),ep.export(r,"createEl",function(){return eY}),ep.export(r,"createHLSLoader",function(){return iX}),ep.export(r,"decodeImg",function(){return rj}),ep.export(r,"extractPCM4AudioBuffer",function(){return rM}),ep.export(r,"extractPCM4AudioData",function(){return rO}),ep.export(r,"fastConcatMP4",function(){return iB}),ep.export(r,"file2stream",function(){return ik}),ep.export(r,"fixFMP4Duration",function(){return iF}),ep.export(r,"mixinMP4AndAudio",function(){return iz}),ep.export(r,"mixinPCM",function(){return rY}),ep.export(r,"recodemux",function(){return iA}),ep.export(r,"renderTxt2Img",function(){return eW}),ep.export(r,"renderTxt2ImgBitmap",function(){return eV}),ep.export(r,"ringSliceFloat32Array",function(){return rX}),ep.export(r,"workerTimer",function(){return rA});var em=t("@swc/helpers/_/_assert_this_initialized"),e_=t("@swc/helpers/_/_async_iterator"),ey=t("@swc/helpers/_/_async_to_generator"),eg=t("@swc/helpers/_/_class_call_check"),ev=t("@swc/helpers/_/_create_class"),eb=t("@swc/helpers/_/_define_property"),ew=t("@swc/helpers/_/_get"),eS=t("@swc/helpers/_/_get_prototype_of"),ex=t("@swc/helpers/_/_inherits"),eE=t("@swc/helpers/_/_object_spread"),eU=t("@swc/helpers/_/_object_spread_props"),eT=t("@swc/helpers/_/_possible_constructor_return"),eA=t("@swc/helpers/_/_sliced_to_array"),eI=t("@swc/helpers/_/_to_consumable_array"),ek=t("@swc/helpers/_/_type_of"),eC=t("@swc/helpers/_/_create_super"),eB=t("@swc/helpers/_/_ts_generator"),eP=t("@swc/helpers/_/_ts_values"),eR=arguments[3],eF=t("718a311db185ef08").Buffer,eD=Object.defineProperty,ez=function(t){throw TypeError(t)},eL=function(t,e,r){var n;return(n=(void 0===e?"undefined":(0,ek._)(e))!="symbol"?e+"":e)in t?eD(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r},eO=function(t,e,r){return e.has(t)||ez("Cannot "+r)},eM=function(t,e,r){return eO(t,e,"read from private field"),r?r.call(t):e.get(t)},eN=function(t,e,r){return e.has(t)?ez("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r)},ej=function(t,e,r,n){return eO(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r},eG=function(t,e,r){return eO(t,e,"access private method"),r};function eY(t){return document.createElement(t)}function eW(t,e){var r=eY("pre");r.style.cssText="margin: 0; ".concat(e,"; visibility: hidden; position: fixed;"),r.textContent=t,document.body.appendChild(r);var n=r.getBoundingClientRect(),s=n.width,a=n.height;r.remove(),r.style.visibility="visible";var o=new Image;o.width=s,o.height=a;var u='\n\n\n
').concat(r.outerHTML,"
\n
\n
\n ").replace(/\t/g,"").replace(/#/g,"%23");return o.src="data:image/svg+xml;charset=utf-8,".concat(u),o}function eV(t,e){return eH.apply(this,arguments)}function eH(){return(eH=(0,ey._)(function(t,e){var r,n,s;return(0,eB._)(this,function(a){switch(a.label){case 0:return r=eW(t,e),[4,new Promise(function(t){r.onload=t})];case 1:return a.sent(),null==(s=(n=new OffscreenCanvas(r.width,r.height)).getContext("2d"))||s.drawImage(r,0,0,r.width,r.height),[4,createImageBitmap(n)];case 2:return[2,a.sent()]}})})).apply(this,arguments)}var eX=function(t){throw TypeError(t)},eZ=function(t,e,r){return e.has(t)||eX("Cannot "+r)},eK=function(t,e,r){return eZ(t,e,"read from private field"),r?r.call(t):e.get(t)},eq=function(t,e,r){return e.has(t)?eX("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r)},eQ=function(t,e,r,n){return eZ(t,e,"write to private field"),e.set(t,r),r},eJ="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHUobil7aWYobj09PSIvIilyZXR1cm57cGFyZW50Om51bGwsbmFtZToiIn07Y29uc3QgZT1uLnNwbGl0KCIvIikuZmlsdGVyKGk9PmkubGVuZ3RoPjApO2lmKGUubGVuZ3RoPT09MCl0aHJvdyBFcnJvcigiSW52YWxpZCBwYXRoIik7Y29uc3QgYT1lW2UubGVuZ3RoLTFdLHI9Ii8iK2Uuc2xpY2UoMCwtMSkuam9pbigiLyIpO3JldHVybntuYW1lOmEscGFyZW50OnJ9fWFzeW5jIGZ1bmN0aW9uIHcobixlKXtjb25zdHtwYXJlbnQ6YSxuYW1lOnJ9PXUobik7aWYoYT09bnVsbClyZXR1cm4gYXdhaXQgbmF2aWdhdG9yLnN0b3JhZ2UuZ2V0RGlyZWN0b3J5KCk7Y29uc3QgaT1hLnNwbGl0KCIvIikuZmlsdGVyKHQ9PnQubGVuZ3RoPjApO3RyeXtsZXQgdD1hd2FpdCBuYXZpZ2F0b3Iuc3RvcmFnZS5nZXREaXJlY3RvcnkoKTtmb3IoY29uc3QgcyBvZiBpKXQ9YXdhaXQgdC5nZXREaXJlY3RvcnlIYW5kbGUocyx7Y3JlYXRlOmUuY3JlYXRlfSk7aWYoZS5pc0ZpbGUpcmV0dXJuIGF3YWl0IHQuZ2V0RmlsZUhhbmRsZShyLHtjcmVhdGU6ZS5jcmVhdGV9KX1jYXRjaCh0KXtpZih0Lm5hbWU9PT0iTm90Rm91bmRFcnJvciIpcmV0dXJuIG51bGw7dGhyb3cgdH19Y29uc3QgZj17fTtzZWxmLm9ubWVzc2FnZT1hc3luYyBuPT57dmFyIGk7Y29uc3R7ZXZ0VHlwZTplLGFyZ3M6YX09bi5kYXRhO2xldCByPWZbYS5maWxlSWRdO3RyeXtsZXQgdDtjb25zdCBzPVtdO2lmKGU9PT0icmVnaXN0ZXIiKXtjb25zdCBsPWF3YWl0IHcoYS5maWxlUGF0aCx7Y3JlYXRlOiEwLGlzRmlsZTohMH0pO2lmKGw9PW51bGwpdGhyb3cgRXJyb3IoYG5vdCBmb3VuZCBmaWxlOiAke2EuZmlsZUlkfWApO3I9YXdhaXQgbC5jcmVhdGVTeW5jQWNjZXNzSGFuZGxlKHttb2RlOmEubW9kZX0pLGZbYS5maWxlSWRdPXJ9ZWxzZSBpZihlPT09ImNsb3NlIilhd2FpdCByLmNsb3NlKCksZGVsZXRlIGZbYS5maWxlSWRdO2Vsc2UgaWYoZT09PSJ0cnVuY2F0ZSIpYXdhaXQgci50cnVuY2F0ZShhLm5ld1NpemUpO2Vsc2UgaWYoZT09PSJ3cml0ZSIpe2NvbnN0e2RhdGE6bCxvcHRzOm99PW4uZGF0YS5hcmdzO3Q9YXdhaXQgci53cml0ZShsLG8pfWVsc2UgaWYoZT09PSJyZWFkIil7Y29uc3R7b2Zmc2V0Omwsc2l6ZTpvfT1uLmRhdGEuYXJncyxnPW5ldyBVaW50OEFycmF5KG8pLGQ9YXdhaXQgci5yZWFkKGcse2F0Omx9KSxjPWcuYnVmZmVyO3Q9ZD09PW8/YzooKGk9Yy50cmFuc2Zlcik9PW51bGw/dm9pZCAwOmkuY2FsbChjLGQpKT8/Yy5zbGljZSgwLGQpLHMucHVzaCh0KX1lbHNlIGU9PT0iZ2V0U2l6ZSI/dD1hd2FpdCByLmdldFNpemUoKTplPT09ImZsdXNoIiYmYXdhaXQgci5mbHVzaCgpO3NlbGYucG9zdE1lc3NhZ2Uoe2V2dFR5cGU6ImNhbGxiYWNrIixjYklkOm4uZGF0YS5jYklkLHJldHVyblZhbDp0fSxzKX1jYXRjaCh0KXtjb25zdCBzPXQ7c2VsZi5wb3N0TWVzc2FnZSh7ZXZ0VHlwZToidGhyb3dFcnJvciIsY2JJZDpuLmRhdGEuY2JJZCxlcnJNc2c6cy5uYW1lKyI6ICIrcy5tZXNzYWdlK2AKYCtKU09OLnN0cmluZ2lmeShuLmRhdGEpfSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPW9wZnMtd29ya2VyLUY0UldscWNfLmpzLm1hcAo=",e$=("undefined"==typeof self?"undefined":(0,ek._)(self))<"u"&&self.Blob&&new Blob([Uint8Array.from(atob(eJ),function(t){return t.charCodeAt(0)})],{type:"text/javascript;charset=utf-8"});function e0(t){var e;try{if(!(e=e$&&(self.URL||self.webkitURL).createObjectURL(e$)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch(e){return new Worker("data:text/javascript;base64,"+eJ,{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}function e1(){return(e1=(0,ey._)(function(t,e,r){var n;return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,(n=function(){if(e2.length<3){var t,e,r,n,s=(e=new e0,r=0,n={},e.onmessage=function(t){var e,r,s=t.data;"callback"===s.evtType?null==(e=n[s.cbId])||e.resolve(s.returnVal):"throwError"===s.evtType&&(null==(r=n[s.cbId])||r.reject(Error(s.errMsg))),delete n[s.cbId]},t=(0,ey._)(function(t,s){var a,o,u=arguments;return(0,eB._)(this,function(l){return a=u.length>2&&void 0!==u[2]?u[2]:[],r+=1,o=new Promise(function(t,e){n[r]={resolve:t,reject:e}}),[2,(e.postMessage({cbId:r,evtType:t,args:s},a),o)]})}),function(e,r){return t.apply(this,arguments)});return e2.push(s),s}var a=e2[e3];return e3=(e3+1)%e2.length,a}())("register",{fileId:t,filePath:e,mode:r})];case 1:var a,o,u;return[2,(s.sent(),{read:(a=(0,ey._)(function(e,r){return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,n("read",{fileId:t,offset:e,size:r})];case 1:return[2,s.sent()]}})}),function(t,e){return a.apply(this,arguments)}),write:(o=(0,ey._)(function(e,r){return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,n("write",{fileId:t,data:e,opts:r},[ArrayBuffer.isView(e)?e.buffer:e])];case 1:return[2,s.sent()]}})}),function(t,e){return o.apply(this,arguments)}),close:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,n("close",{fileId:t})];case 1:return[2,e.sent()]}})}),truncate:(u=(0,ey._)(function(e){return(0,eB._)(this,function(r){switch(r.label){case 0:return[4,n("truncate",{fileId:t,newSize:e})];case 1:return[2,r.sent()]}})}),function(t){return u.apply(this,arguments)}),getSize:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,n("getSize",{fileId:t})];case 1:return[2,e.sent()]}})}),flush:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,n("flush",{fileId:t})];case 1:return[2,e.sent()]}})})})]}})})).apply(this,arguments)}var e2=[],e3=0;function e4(t){if("/"===t)return{parent:null,name:""};var e=t.split("/").filter(function(t){return t.length>0});if(0===e.length)throw Error("Invalid path");return{name:e[e.length-1],parent:"/"+e.slice(0,-1).join("/")}}function e6(t,e){return e8.apply(this,arguments)}function e8(){return(e8=(0,ey._)(function(t,e){var r,n,s,a,o,u,l,c,h,f,d,p,m,_;return(0,eB._)(this,function(y){switch(y.label){case 0:if(n=(r=e4(t)).parent,s=r.name,null!=n)return[3,2];return[4,navigator.storage.getDirectory()];case 1:return[2,y.sent()];case 2:a=n.split("/").filter(function(t){return t.length>0}),y.label=3;case 3:return y.trys.push([3,17,,18]),[4,navigator.storage.getDirectory()];case 4:o=y.sent(),u=!0,l=!1,c=void 0,y.label=5;case 5:y.trys.push([5,10,11,12]),h=a[Symbol.iterator](),y.label=6;case 6:if(u=(f=h.next()).done)return[3,9];return d=f.value,[4,o.getDirectoryHandle(d,{create:e.create})];case 7:o=y.sent(),y.label=8;case 8:return u=!0,[3,6];case 9:return[3,12];case 10:return p=y.sent(),l=!0,c=p,[3,12];case 11:try{u||null==h.return||h.return()}finally{if(l)throw c}return[7];case 12:if(!e.isFile)return[3,14];return[4,o.getFileHandle(s,{create:e.create})];case 13:return m=y.sent(),[3,16];case 14:return[4,o.getDirectoryHandle(s,{create:e.create})];case 15:m=y.sent(),y.label=16;case 16:return[2,m];case 17:if("NotFoundError"===(_=y.sent()).name)return[2,null];throw _;case 18:return[2]}})})).apply(this,arguments)}function e5(t){return e9.apply(this,arguments)}function e9(){return(e9=(0,ey._)(function(t){var e,r,n,s,a,o,u,l,c,h,f,d;return(0,eB._)(this,function(p){switch(p.label){case 0:if(r=(e=e4(t)).parent,n=e.name,null!=r)return[3,15];return[4,navigator.storage.getDirectory()];case 1:s=p.sent(),a=!1,o=!1,p.label=2;case 2:p.trys.push([2,8,9,14]),l=(0,e_._)(s.keys()),p.label=3;case 3:return[4,l.next()];case 4:if(!(a=!(c=p.sent()).done))return[3,7];return h=c.value,[4,s.removeEntry(h,{recursive:!0})];case 5:p.sent(),p.label=6;case 6:return a=!1,[3,3];case 7:return[3,14];case 8:return f=p.sent(),o=!0,u=f,[3,14];case 9:if(p.trys.push([9,,12,13]),!(a&&null!=l.return))return[3,11];return[4,l.return()];case 10:p.sent(),p.label=11;case 11:return[3,13];case 12:if(o)throw u;return[7];case 13:return[7];case 14:return[2];case 15:return[4,e6(r,{create:!1,isFile:!1})];case 16:if(!(null!=(d=p.sent())))return[3,18];return[4,d.removeEntry(n,{recursive:!0})];case 17:p.sent(),p.label=18;case 18:return[2]}})})).apply(this,arguments)}function e7(t,e){return"".concat(t,"/").concat(e).replace("//","/")}function rt(t){return new re(t)}var re=/*#__PURE__*/function(){function t(e){(0,eg._)(this,t),eq(this,v),eq(this,b),eq(this,w),eQ(this,v,e);var r=e4(e),n=r.parent,s=r.name;eQ(this,b,s),eQ(this,w,n)}return(0,ev._)(t,[{key:"kind",get:function(){return"dir"}},{key:"name",get:function(){return eK(this,b)}},{key:"path",get:function(){return eK(this,v)}},{key:"parent",get:function(){return null==eK(this,w)?null:rt(eK(this,w))}},{key:"create",value:function(){var t=this;return(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,e6(eK(t,v),{create:!0,isFile:!1})];case 1:return[2,(e.sent(),rt(eK(t,v)))]}})})()}},{key:"exists",value:function(){var t=this;return(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,e6(eK(t,v),{create:!1,isFile:!1})];case 1:return[2,e.sent() instanceof FileSystemDirectoryHandle]}})})()}},{key:"remove",value:function(){var t=this;return(0,ey._)(function(){var e,r,n,s,a,o,u;return(0,eB._)(this,function(l){switch(l.label){case 0:e=!0,r=!1,n=void 0,l.label=1;case 1:return l.trys.push([1,9,10,11]),[4,t.children()];case 2:s=l.sent()[Symbol.iterator](),l.label=3;case 3:if(e=(a=s.next()).done)return[3,8];o=a.value,l.label=4;case 4:return l.trys.push([4,6,,7]),[4,o.remove()];case 5:return l.sent(),[3,7];case 6:return console.warn(l.sent()),[3,7];case 7:return e=!0,[3,3];case 8:return[3,11];case 9:return u=l.sent(),r=!0,n=u,[3,11];case 10:try{e||null==s.return||s.return()}finally{if(r)throw n}return[7];case 11:return l.trys.push([11,13,,14]),[4,e5(eK(t,v))];case 12:return l.sent(),[3,14];case 13:return console.warn(l.sent()),[3,14];case 14:return[2]}})})()}},{key:"children",value:function(){var t=this;return(0,ey._)(function(){var e,r,n,s,a,o,u,l,c;return(0,eB._)(this,function(h){switch(h.label){case 0:return[4,e6(eK(t,v),{create:!1,isFile:!1})];case 1:if(null==(e=h.sent()))return[2,[]];r=[],n=!1,s=!1,h.label=2;case 2:h.trys.push([2,7,8,13]),o=(0,e_._)(e.values()),h.label=3;case 3:return[4,o.next()];case 4:if(!(n=!(u=h.sent()).done))return[3,6];l=u.value,r.push(("file"===l.kind?ri:rt)(e7(eK(t,v),l.name))),h.label=5;case 5:return n=!1,[3,3];case 6:return[3,13];case 7:return c=h.sent(),s=!0,a=c,[3,13];case 8:if(h.trys.push([8,,11,12]),!(n&&null!=o.return))return[3,10];return[4,o.return()];case 9:h.sent(),h.label=10;case 10:return[3,12];case 11:if(s)throw a;return[7];case 12:return[7];case 13:return[2,r]}})})()}},{key:"copyTo",value:function(t){var e=this;return(0,ey._)(function(){var r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,e.exists()];case 1:if(!s.sent())throw Error("dir ".concat(e.path," not exists"));return[4,t.exists()];case 2:return[4,(r=s.sent()?rt(e7(t.path,e.name)):t).create()];case 3:return s.sent(),n=Promise.all,[4,e.children()];case 4:return[4,n.apply(Promise,[s.sent().map(function(t){return t.copyTo(r)})])];case 5:return[2,(s.sent(),r)]}})})()}},{key:"moveTo",value:function(t){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.copyTo(t)];case 1:return r=n.sent(),[4,e.remove()];case 2:return[2,(n.sent(),r)]}})})()}}]),t}();v=/* @__PURE__ */new WeakMap,b=/* @__PURE__ */new WeakMap,w=/* @__PURE__ */new WeakMap;var rr=/* @__PURE__ */new Map;function ri(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rw";if("rw"===e){var r,n=null!==(r=rr.get(t))&&void 0!==r?r:new ru(t,e);return rr.set(t,n),n}return new ru(t,e)}function rn(t,e){return rs.apply(this,arguments)}function rs(){return(rs=(0,ey._)(function(t,e){var r,n,s,a,o,u,l,c=arguments;return(0,eB._)(this,function(h){switch(h.label){case 0:if(r=c.length>2&&void 0!==c[2]?c[2]:{overwrite:!0},!(e instanceof ru))return[3,3];return n=[t],[4,e.stream()];case 1:return[4,rn.apply(void 0,n.concat([h.sent(),r]))];case 2:return h.sent(),[2];case 3:return[4,(t instanceof ru?t:ri(t,"rw")).createWriter()];case 4:s=h.sent(),h.label=5;case 5:if(h.trys.push([5,16,17,19]),!r.overwrite)return[3,7];return[4,s.truncate(0)];case 6:h.sent(),h.label=7;case 7:if(!(e instanceof ReadableStream))return[3,13];a=e.getReader(),h.label=8;case 8:return[4,a.read()];case 9:if(u=(o=h.sent()).done,l=o.value,u)return[3,12];return[4,s.write(l)];case 10:h.sent(),h.label=11;case 11:return[3,8];case 12:return[3,15];case 13:return[4,s.write(e)];case 14:h.sent(),h.label=15;case 15:return[3,19];case 16:throw h.sent();case 17:return[4,s.close()];case 18:return h.sent(),[7];case 19:return[2]}})})).apply(this,arguments)}var ra=0,ro=/*#__PURE__*/function(){function t(e,r){var n,s=this;(0,eg._)(this,t),eq(this,S),eq(this,x),eq(this,E),eq(this,U),eq(this,T),eq(this,A,0),eq(this,I,(n=null,function(){var t;return eQ(s,A,eK(s,A)+1),null!=n?n:n=new Promise((t=(0,ey._)(function(t,e){var r;return(0,eB._)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,function(t,e,r){return e1.apply(this,arguments)}(eK(s,T),eK(s,S),eK(s,U))];case 1:return t([r=a.sent(),/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:if(eQ(s,A,eK(s,A)-1),eK(s,A)>0)return[3,2];return n=null,[4,r.close()];case 1:t.sent(),t.label=2;case 2:return[2]}})})]),[3,3];case 2:return e(a.sent()),[3,3];case 3:return[2]}})}),function(e,r){return t.apply(this,arguments)}))})),eq(this,k,!1),eQ(this,T,++ra),eQ(this,S,e),eQ(this,U,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[r]);var a=e4(e),o=a.parent,u=a.name;eQ(this,E,u),eQ(this,x,o)}return(0,ev._)(t,[{key:"kind",get:function(){return"file"}},{key:"path",get:function(){return eK(this,S)}},{key:"name",get:function(){return eK(this,E)}},{key:"parent",get:function(){return null==eK(this,x)?null:rt(eK(this,x))}},{key:"createWriter",value:function(){var t=this;return(0,ey._)(function(){var e,r,n,s,a,o;return(0,eB._)(this,function(u){switch(u.label){case 0:if("read-only"===eK(t,U))throw Error("file is read-only");if(eK(t,k))throw Error("Other writer have not been closed");return eQ(t,k,!0),e=new TextEncoder,[4,eK(t,I).call(t)];case 1:return n=(r=(0,eA._).apply(void 0,[u.sent(),2]))[0],s=r[1],[4,n.getSize()];case 2:var l,c;return a=u.sent(),o=!1,[2,{write:(l=(0,ey._)(function(t){var r,s,u,l,c=arguments;return(0,eB._)(this,function(h){switch(h.label){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:{},o)throw Error("Writer is closed");return u="string"==typeof t?e.encode(t):t,a=(l=null!==(s=r.at)&&void 0!==s?s:a)+u.byteLength,[4,n.write(u,{at:l})];case 1:return[2,h.sent()]}})}),function(t){return l.apply(this,arguments)}),truncate:(c=(0,ey._)(function(t){return(0,eB._)(this,function(e){switch(e.label){case 0:if(o)throw Error("Writer is closed");return[4,n.truncate(t)];case 1:return e.sent(),a>t&&(a=t),[2]}})}),function(t){return c.apply(this,arguments)}),flush:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:if(o)throw Error("Writer is closed");return[4,n.flush()];case 1:return t.sent(),[2]}})}),close:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:if(o)throw Error("Writer is closed");return o=!0,eQ(t,k,!1),[4,s()];case 1:return e.sent(),[2]}})})}]}})})()}},{key:"createReader",value:function(){var t=this;return(0,ey._)(function(){var e,r,n,s,a;return(0,eB._)(this,function(o){switch(o.label){case 0:return[4,eK(t,I).call(t)];case 1:var u;return r=(e=(0,eA._).apply(void 0,[o.sent(),2]))[0],n=e[1],s=!1,a=0,[2,{read:(u=(0,ey._)(function(t){var e,n,o,u,l=arguments;return(0,eB._)(this,function(c){switch(c.label){case 0:if(e=l.length>1&&void 0!==l[1]?l[1]:{},s)throw Error("Reader is closed");return o=null!==(n=e.at)&&void 0!==n?n:a,[4,r.read(o,t)];case 1:return u=c.sent(),[2,(a=o+u.byteLength,u)]}})}),function(t){return u.apply(this,arguments)}),getSize:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:if(s)throw Error("Reader is closed");return[4,r.getSize()];case 1:return[2,t.sent()]}})}),close:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:if(s)return[3,2];return s=!0,[4,n()];case 1:t.sent(),t.label=2;case 2:return[2]}})})}]}})})()}},{key:"text",value:function(){var t=this;return(0,ey._)(function(){var e,r;return(0,eB._)(this,function(n){switch(n.label){case 0:return r=(e=new TextDecoder).decode,[4,t.arrayBuffer()];case 1:return[2,r.apply(e,[n.sent()])]}})})()}},{key:"arrayBuffer",value:function(){var t=this;return(0,ey._)(function(){var e,r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e6(eK(t,S),{create:!1,isFile:!0})];case 1:if(null!=(e=n.sent()))return[3,2];return r=new ArrayBuffer(0),[3,4];case 2:return[4,e.getFile()];case 3:r=n.sent().arrayBuffer(),n.label=4;case 4:return[2,r]}})})()}},{key:"stream",value:function(){var t=this;return(0,ey._)(function(){var e;return(0,eB._)(this,function(r){switch(r.label){case 0:return[4,t.getOriginFile()];case 1:return[2,null==(e=r.sent())?new ReadableStream({pull:function(t){t.close()}}):e.stream()]}})})()}},{key:"getOriginFile",value:function(){var t=this;return(0,ey._)(function(){var e;return(0,eB._)(this,function(r){switch(r.label){case 0:return[4,e6(eK(t,S),{create:!1,isFile:!0})];case 1:return[2,null==(e=r.sent())?void 0:e.getFile()]}})})()}},{key:"getSize",value:function(){var t=this;return(0,ey._)(function(){var e,r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e6(eK(t,S),{create:!1,isFile:!0})];case 1:if(null!=(e=n.sent()))return[3,2];return r=0,[3,4];case 2:return[4,e.getFile()];case 3:r=n.sent().size,n.label=4;case 4:return[2,r]}})})()}},{key:"exists",value:function(){var t=this;return(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,e6(eK(t,S),{create:!1,isFile:!0})];case 1:return[2,e.sent() instanceof FileSystemFileHandle]}})})()}},{key:"remove",value:function(){var t=this;return(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:if(eK(t,A))throw Error("exists unclosed reader/writer");return[4,e5(eK(t,S))];case 1:return e.sent(),[2]}})})()}},{key:"copyTo",value:function(e){var r=this;return(0,ey._)(function(){var n;return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,r.exists()];case 1:if(!s.sent())throw Error("file ".concat(r.path," not exists"));if(!(e instanceof t))return[3,5];if(ri(e.path)!==r)return[3,2];return n=r,[3,4];case 2:return[4,rn(e.path,r)];case 3:s.sent(),n=ri(e.path),s.label=4;case 4:return[2,n];case 5:if(!(e instanceof re))return[3,7];return[4,r.copyTo(ri(e7(e.path,r.name)))];case 6:return[2,s.sent()];case 7:throw Error("Illegal target type")}})})()}},{key:"moveTo",value:function(t){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.copyTo(t)];case 1:return r=n.sent(),[4,e.remove()];case 2:return[2,(n.sent(),r)]}})})()}}]),t}();S=/* @__PURE__ */new WeakMap,x=/* @__PURE__ */new WeakMap,E=/* @__PURE__ */new WeakMap,U=/* @__PURE__ */new WeakMap,T=/* @__PURE__ */new WeakMap,A=/* @__PURE__ */new WeakMap,I=/* @__PURE__ */new WeakMap,k=/* @__PURE__ */new WeakMap;var ru=ro,rl="/.opfs-tools-temp-dir";function rc(t){return rh.apply(this,arguments)}function rh(){return(rh=(0,ey._)(function(t){var e;return(0,eB._)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,9,,10]),"file"!==t.kind)return[3,6];return[4,t.exists()];case 1:if(!r.sent())return[2,!0];return[4,t.createWriter()];case 2:return[4,(e=r.sent()).truncate(0)];case 3:return r.sent(),[4,e.close()];case 4:return r.sent(),[4,t.remove()];case 5:return r.sent(),[3,8];case 6:return[4,t.remove()];case 7:r.sent(),r.label=8;case 8:return[2,!0];case 9:return[2,(console.warn(r.sent()),!1)];case 10:return[2]}})})).apply(this,arguments)}var rf=[],rd=!1;function rp(){return(rp=(0,ey._)(function(){var t,e,r,n,s,a,o,u,l,c,h;return(0,eB._)(this,function(f){switch(f.label){case 0:if(null==globalThis.localStorage)return[2];t="OPFS_TOOLS_EXPIRES_TMP_FILES",rd||(rd=!0,globalThis.addEventListener("unload",function(){var e;0!==rf.length&&localStorage.setItem(t,"".concat(null!==(e=localStorage.getItem(t))&&void 0!==e?e:"",",").concat(rf.join(",")))})),r=null!==(e=localStorage.getItem(t))&&void 0!==e?e:"",n=!0,s=!1,a=void 0,f.label=1;case 1:f.trys.push([1,7,8,9]),o=r.split(",")[Symbol.iterator](),f.label=2;case 2:if(n=(u=o.next()).done)return[3,6];if(!(c=0!==(l=u.value).length))return[3,4];return[4,rc(ri("".concat(rl,"/").concat(l)))];case 3:c=f.sent(),f.label=4;case 4:c&&(r=r.replace(l,"")),f.label=5;case 5:return n=!0,[3,2];case 6:return[3,9];case 7:return h=f.sent(),s=!0,a=h,[3,9];case 8:try{n||null==o.return||o.return()}finally{if(s)throw a}return[7];case 9:return localStorage.setItem(t,r.replace(/,{2,}/g,",")),[2]}})})).apply(this,arguments)}function rm(){var t="".concat(Math.random().toString().slice(2),"-").concat(Date.now());return rf.push(t),ri("".concat(rl,"/").concat(t))}(0,ey._)(function(){var t,e;return(0,eB._)(this,function(e){switch(e.label){case 0:if(!(!0!==globalThis.__opfs_tools_tmpfile_init__))return[3,3];if(globalThis.__opfs_tools_tmpfile_init__=!0,null==globalThis.FileSystemDirectoryHandle||null==globalThis.FileSystemFileHandle||(null==(t=globalThis.navigator)?void 0:t.storage.getDirectory)==null)return[3,2];return setInterval(/*#__PURE__*/(0,ey._)(function(){var t,e,r,n,s,a,o,u;return(0,eB._)(this,function(l){switch(l.label){case 0:t=!0,e=!1,r=void 0,l.label=1;case 1:return l.trys.push([1,8,9,10]),[4,rt(rl).children()];case 2:n=l.sent()[Symbol.iterator](),l.label=3;case 3:if(t=(s=n.next()).done)return[3,7];if(a=s.value,!(null==(o=/^\d+-(\d+)$/.exec(a.name))||Date.now()-Number(o[1])>2592e5))return[3,5];return[4,rc(a)];case 4:l.sent(),l.label=5;case 5:l.label=6;case 6:return t=!0,[3,3];case 7:return[3,10];case 8:return u=l.sent(),e=!0,r=u,[3,10];case 9:try{t||null==n.return||n.return()}finally{if(e)throw r}return[7];case 10:return[2]}})}),6e4),[4,function(){return rp.apply(this,arguments)}()];case 1:e.sent(),e.label=2;case 2:e.label=3;case 3:return[2]}})})();var r_=1,ry=rm(),rg=null,rv=["debug","info","warn","error"].reduce(function(t,e,r){return Object.assign(t,(0,eb._)({},e,function(){for(var t,n,s=arguments.length,a=Array(s),o=0;o3&&void 0!==arguments[3]?arguments[3]:{},s=(r-e)/e+1,a=new Float64Array(t.length*s);n.method=n.method||"cubic";var o=new rI(t.length,a.length,{method:n.method,tension:n.tension||0,sincFilterSize:n.sincFilterSize||6,sincWindow:n.sincWindow||void 0});if(void 0===n.LPF&&(n.LPF=rP[n.method]),n.LPF){n.LPFType=n.LPFType||"IIR";var u=rF[n.LPFType];r>e?function(t,e,r,n){for(var s=0,a=e.length;s=0;o--)e[o]=n.filter(e[o])}(t,a,o,new u(n.LPFOrder||rR[n.LPFType],r,e/2)):function(t,e,r,n){for(var s=0,a=t.length;s=0;o--)t[o]=n.filter(t[o]);rD(t,e,r)}(t,a,o,new u(n.LPFOrder||rR[n.LPFType],e,r/2))}else rD(t,a,o);return a}(t,e,r.rate,{method:"sinc",LPF:!1}))})];return l=(u=new globalThis.OfflineAudioContext(r.chanCount,o*r.rate/e,r.rate)).createBufferSource(),c=u.createBuffer(s,o,e),t.forEach(function(t,e){return c.copyToChannel(t,e)}),l.buffer=c,l.connect(u.destination),l.start(),[4,u.startRendering()];case 1:return[2,rM.apply(void 0,[h.sent()])]}})})).apply(this,arguments)}function rH(t){return new Promise(function(e){var r=rA(function(){r(),e()},t)})}function rX(t,e,r){for(var n=r-e,s=new Float32Array(n),a=0;a=a&&console.debug("["+o.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},log:function(t,e){this.debug(t.msg)},info:function(t,e){2>=a&&console.info("["+o.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},warn:function(t,e){3>=a&&console.warn("["+o.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)},error:function(t,e){4>=a&&console.error("["+o.getDurationString(/* @__PURE__ */new Date-s,1e3)+"]","["+t+"]",e)}}).getDurationString=function(t,e){function r(t,e){for(var r=(""+t).split(".");r[0].length0))return"(empty)";for(var r="",n=0;n0&&(r+=","),r+="["+o.getDurationString(t.start(n))+","+o.getDurationString(t.end(n))+"]";return r},rQ.Log=o,(u=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0}).prototype.getPosition=function(){return this.position},u.prototype.getEndPosition=function(){return this.buffer.byteLength},u.prototype.getLength=function(){return this.buffer.byteLength},u.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},u.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},u.prototype.readAnyInt=function(t,e){var r=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:r=e?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=e?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16|this.dataview.getUint8(this.position+1)<<8|this.dataview.getUint8(this.position+2);break;case 4:r=e?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32|this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,r}throw"Not enough bytes in buffer"},u.prototype.readUint8=function(){return this.readAnyInt(1,!1)},u.prototype.readUint16=function(){return this.readAnyInt(2,!1)},u.prototype.readUint24=function(){return this.readAnyInt(3,!1)},u.prototype.readUint32=function(){return this.readAnyInt(4,!1)},u.prototype.readUint64=function(){return this.readAnyInt(8,!1)},u.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",r=0;rthis._byteLength&&(this._byteLength=e);return}for(r<1&&(r=1);e>r;)r*=2;var n=new ArrayBuffer(r),s=new Uint8Array(this._buffer);new Uint8Array(n,0,s.length).set(s),this.buffer=n,this._byteLength=e}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),l.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(t){this._realloc(1*t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},l.prototype.readInt32Array=function(t,e){var r=new Int32Array(t=null!=t?t:this.byteLength-this.position/4);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readInt16Array=function(t,e){var r=new Int16Array(t=null!=t?t:this.byteLength-this.position/2);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readInt8Array=function(t){var e=new Int8Array(t=null!=t?t:this.byteLength-this.position);return l.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},l.prototype.readUint32Array=function(t,e){var r=new Uint32Array(t=null!=t?t:this.byteLength-this.position/4);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readUint16Array=function(t,e){var r=new Uint16Array(t=null!=t?t:this.byteLength-this.position/2);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readUint8Array=function(t){var e=new Uint8Array(t=null!=t?t:this.byteLength-this.position);return l.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},l.prototype.readFloat64Array=function(t,e){var r=new Float64Array(t=null!=t?t:this.byteLength-this.position/8);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readFloat32Array=function(t,e){var r=new Float32Array(t=null!=t?t:this.byteLength-this.position/4);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null!=e?e:this.endianness),this.position+=r.byteLength,r},l.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null!=t?t:this.endianness);return this.position+=4,e},l.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null!=t?t:this.endianness);return this.position+=2,e},l.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},l.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null!=t?t:this.endianness);return this.position+=4,e},l.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null!=t?t:this.endianness);return this.position+=2,e},l.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},l.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null!=t?t:this.endianness);return this.position+=4,e},l.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null!=t?t:this.endianness);return this.position+=8,e},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(t,e,r,n,s){var a=new Uint8Array(t,e,s),o=new Uint8Array(r,n,s);a.set(o)},l.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},l.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},l.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;rs;n--,s++){var a=e[s];e[s]=e[n],e[n]=a}return t},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=[],r=0;r>16),this.writeUint8((65280&t)>>8),this.writeUint8(255&t)},l.prototype.adjustUint32=function(t,e){var r=this.position;this.seek(t),this.writeUint32(e),this.seek(r)},l.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=4*t,r},l.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=2*t,r},l.prototype.mapInt8Array=function(t){this._realloc(1*t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},l.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=4*t,r},l.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=2*t,r},l.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=8*t,r},l.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return l.arrayToNative(r,null!=e?e:this.endianness),this.position+=4*t,r},(c=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)}).prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN),c.prototype.initialized=function(){var t;return this.bufferIndex>-1||(this.buffers.length>0?0===(t=this.buffers[0]).fileStart?(this.buffer=t,this.bufferIndex=0,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(t,e){o.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r.buffer},c.prototype.reduceBuffer=function(t,e,r){var n;return(n=new Uint8Array(r)).set(new Uint8Array(t,e,r)),n.buffer.fileStart=t.fileStart+e,n.buffer.usedBytes=0,n.buffer},c.prototype.insertBuffer=function(t){for(var e=!0,r=0;rn.byteLength){this.buffers.splice(r,1),r--;continue}o.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring")}else t.fileStart+t.byteLength<=n.fileStart||(t=this.reduceBuffer(t,0,n.fileStart-t.fileStart)),o.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(r,0,t),0===r&&(this.buffer=t);e=!1;break}if(t.fileStart0)t=this.reduceBuffer(t,s,a);else{e=!1;break}}}e&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),0===r&&(this.buffer=t))},c.prototype.logBufferLevel=function(t){var e,r,n,s,a,u=[],l="";for(n=0,s=0,e=0;e0&&(l+=a.end-1+"]"),(t?o.info:o.debug)("MultiBufferStream",0===this.buffers.length?"No more buffer in memory":""+this.buffers.length+" stored buffer(s) ("+n+"/"+s+" bytes), continuous ranges: "+l)},c.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0},c.prototype.findPosition=function(t,e,r){var n,s=null,a=-1;for(n=!0===t?0:this.bufferIndex;n=e?(o.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1},c.prototype.findEndContiguousBuf=function(t){var e,r,n,s=void 0!==t?t:this.bufferIndex;if(r=this.buffers[s],this.buffers.length>s+1)for(e=s+1;e>3;return 31===n&&r.data.length>=2&&(n=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),n},r.DecoderConfigDescriptor=function(t){r.Descriptor.call(this,4,t)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)},r.DecoderSpecificInfo=function(t){r.Descriptor.call(this,5,t)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(t){r.Descriptor.call(this,6,t)},r.SLConfigDescriptor.prototype=new r.Descriptor,this},rQ.MPEG4DescriptorParser=h,(f={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){f.FullBox.prototype=new f.Box,f.ContainerBox.prototype=new f.Box,f.SampleEntry.prototype=new f.Box,f.TrackGroupTypeBox.prototype=new f.FullBox,f.BASIC_BOXES.forEach(function(t){f.createBoxCtor(t)}),f.FULL_BOXES.forEach(function(t){f.createFullBoxCtor(t)}),f.CONTAINER_BOXES.forEach(function(t){f.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,r){this.type=t,this.size=e,this.uuid=r},FullBox:function(t,e,r){f.Box.call(this,t,e,r),this.flags=0,this.version=0},ContainerBox:function(t,e,r){f.Box.call(this,t,e,r),this.boxes=[]},SampleEntry:function(t,e,r,n){f.ContainerBox.call(this,t,e),this.hdr_size=r,this.start=n},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){f.FullBox.call(this,t,e)},createBoxCtor:function(t,e){f.boxCodes.push(t),f[t+"Box"]=function(e){f.Box.call(this,t,e)},f[t+"Box"].prototype=new f.Box,e&&(f[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){f[t+"Box"]=function(e){f.FullBox.call(this,t,e)},f[t+"Box"].prototype=new f.FullBox,f[t+"Box"].prototype.parse=function(t){this.parseFullHeader(t),e&&e.call(this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,r=0;rr?(o.error("BoxParser","Box of type '"+h+"' has a size "+c+" greater than its container size "+r),{code:f.ERR_NOT_ENOUGH_DATA,type:h,size:c,hdr_size:l,start:u}):0!==c&&u+c>t.getEndPosition()?(t.seek(u),o.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:f.ERR_NOT_ENOUGH_DATA,type:h,size:c,hdr_size:l,start:u}):e?{code:f.OK,type:h,size:c,hdr_size:l,start:u}:(f[h+"Box"]?n=new f[h+"Box"](c):"uuid"!==h?(o.warn("BoxParser","Unknown box type: '"+h+"'"),(n=new f.Box(h,c)).has_unparsed_data=!0):f.UUIDBoxes[a]?n=new f.UUIDBoxes[a](c):(o.warn("BoxParser","Unknown uuid type: '"+a+"'"),(n=new f.Box(h,c)).uuid=a,n.has_unparsed_data=!0),n.hdr_size=l,n.start=u,n.write===f.Box.prototype.write&&"mdat"!==n.type&&(o.info("BoxParser","'"+d+"' box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(t)),n.parse(t),(s=t.getPosition()-(n.start+n.size))<0?(o.warn("BoxParser","Parsing of box '"+d+"' did not read the entire indicated box data size (missing "+-s+" bytes), seeking forward"),t.seek(n.start+n.size)):s>0&&(o.error("BoxParser","Parsing of box '"+d+"' read "+s+" more bytes than the indicated box data size, seeking backwards"),0!==n.size&&t.seek(n.start+n.size)),{code:f.OK,box:n,size:n.size})},f.Box.prototype.parse=function(t){"mdat"!=this.type?this.data=t.readUint8Array(this.size-this.hdr_size):0===this.size?t.seek(t.getEndPosition()):t.seek(this.start+this.size)},f.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size},f.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size},f.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4},f.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},f.ContainerBox.prototype.parse=function(t){for(var e,r;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},f.SAMPLE_ENTRY_TYPE_VISUAL="Visual",f.SAMPLE_ENTRY_TYPE_AUDIO="Audio",f.SAMPLE_ENTRY_TYPE_HINT="Hint",f.SAMPLE_ENTRY_TYPE_METADATA="Metadata",f.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",f.SAMPLE_ENTRY_TYPE_SYSTEM="System",f.SAMPLE_ENTRY_TYPE_TEXT="Text",f.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8},f.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},f.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size},f.SampleEntry.prototype.parseFooter=function(t){f.ContainerBox.prototype.parse.call(this,t)},f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_HINT),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_METADATA),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SUBTITLE),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,this.parseFooter(t)}),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT,"enct"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_METADATA,"encm"),f.createBoxCtor("a1lx",function(t){var e=((1&(1&t.readUint8()))+1)*16;this.layer_size=[];for(var r=0;r<3;r++)16==e?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()}),f.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()}),f.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}),f.createBoxCtor("av1C",function(t){var e=t.readUint8();if(this.version=127&e,1!==this.version){o.error("av1C version "+this.version+" not supported");return}if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=31&e,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=3&e,e=t.readUint8(),this.reserved_1=e>>5&7,0!==this.reserved_1){o.error("av1C reserved_1 parsing problem");return}if(this.initial_presentation_delay_present=e>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&e;else if(this.reserved_2=15&e,0!==this.reserved_2){o.error("av1C reserved_2 parsing problem");return}var r=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(r)}),f.createBoxCtor("avcC",function(t){var e,r;for(this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=3&t.readUint8(),this.nb_SPS_nalus=31&t.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],e=0;e0&&(this.ext=t.readUint8Array(r))}),f.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}),f.createFullBoxCtor("ccst",function(t){var e=t.readUint8();this.all_ref_pics_intra=(128&e)==128,this.intra_pred_used=(64&e)==64,this.max_ref_per_pic=(63&e)>>2,t.readUint24()}),f.createBoxCtor("cdef",function(t){var e;for(this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],e=0;e=32768&&this.component_type_urls.push(t.readCString())}}),f.createFullBoxCtor("co64",function(t){var e,r;if(e=t.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else"rICC"===this.colour_type?this.ICC_profile=t.readUint8Array(this.size-4):"prof"===this.colour_type&&(this.ICC_profile=t.readUint8Array(this.size-4))}),f.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()}),f.createFullBoxCtor("cslg",function(t){0===this.version&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())}),f.createFullBoxCtor("ctts",function(t){var e,r;if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=e>>1&31,this.bsmod=(1&e)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|n>>5&7}),f.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=7&e,this.ind_subs=[];for(var r=0;r>6,n.bsid=s>>1&31,n.bsmod=(1&s)<<4|a>>4&15,n.acmod=a>>1&7,n.lfeon=1&a,n.num_dep_sub=o>>1&15,n.num_dep_sub>0&&(n.chan_loc=(1&o)<<8|t.readUint8())}}),f.createFullBoxCtor("dfLa",function(t){var e=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(t);;){var n=t.readUint8(),s=Math.min(127&n,r.length-1);if(s?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),e.push(r[s]),128&n)break}this.numMetadataBlocks=e.length+" ("+e.join(", ")+")"}),f.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()}),f.createBoxCtor("dmax",function(t){this.time=t.readUint32()}),f.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()}),f.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;e=4;)this.compatible_brands[r]=t.readString(4),e-=4,r++}),f.createFullBoxCtor("hdlr",function(t){0===this.version&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))}),f.createBoxCtor("hvcC",function(t){this.configurationVersion=t.readUint8(),s=t.readUint8(),this.general_profile_space=s>>6,this.general_tier_flag=(32&s)>>5,this.general_profile_idc=31&s,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),this.chroma_format_idc=3&t.readUint8(),this.bit_depth_luma_minus8=7&t.readUint8(),this.bit_depth_chroma_minus8=7&t.readUint8(),this.avgFrameRate=t.readUint16(),s=t.readUint8(),this.constantFrameRate=s>>6,this.numTemporalLayers=(13&s)>>3,this.temporalIdNested=(4&s)>>2,this.lengthSizeMinusOne=3&s,this.nalu_arrays=[];var e,r,n,s,a=t.readUint8();for(e=0;e>7,o.nalu_type=63&s;var u=t.readUint16();for(r=0;r>4&15,this.length_size=15&e,e=t.readUint8(),this.base_offset_size=e>>4&15,1===this.version||2===this.version?this.index_size=15&e:this.index_size=0,this.items=[];var e,r=0;if(this.version<2)r=t.readUint16();else if(2===this.version)r=t.readUint32();else throw"version of iloc box not supported";for(var n=0;n>7,this.axis=1&e}),f.createFullBoxCtor("infe",function(t){if((0===this.version||1===this.version)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),1===this.version){this.extension_type=t.readString(4),o.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(2===this.version?this.item_ID=t.readUint16():3===this.version&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),"mime"===this.item_type?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):"uri "===this.item_type&&(this.item_uri_type=t.readCString()))}),f.createFullBoxCtor("ipma",function(t){var e,r;for(entry_count=t.readUint32(),this.associations=[],e=0;e>7==1,1&this.flags?o.property_index=(127&a)<<8|t.readUint8():o.property_index=127&a}}}),f.createFullBoxCtor("iref",function(t){var e,r;for(this.references=[];t.getPosition()>7,n.assignment_type=127&s,n.assignment_type){case 0:n.grouping_type=t.readString(4);break;case 1:n.grouping_type=t.readString(4),n.grouping_type_parameter=t.readUint32();break;case 2:case 3:break;case 4:n.sub_track_id=t.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}}),f.createBoxCtor("lsel",function(t){this.layer_id=t.readUint16()}),f.createBoxCtor("maxr",function(t){this.period=t.readUint32(),this.bytes=t.readUint32()}),f.createBoxCtor("mdcv",function(t){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=t.readUint16(),this.display_primaries[0].y=t.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=t.readUint16(),this.display_primaries[1].y=t.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=t.readUint16(),this.display_primaries[2].y=t.readUint16(),this.white_point={},this.white_point.x=t.readUint16(),this.white_point.y=t.readUint16(),this.max_display_mastering_luminance=t.readUint32(),this.min_display_mastering_luminance=t.readUint32()}),f.createFullBoxCtor("mdhd",function(t){1==this.version?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.parseLanguage(t),t.readUint16()}),f.createFullBoxCtor("mehd",function(t){1&this.flags&&(o.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=t.readUint64():this.fragment_duration=t.readUint32()}),f.createFullBoxCtor("meta",function(t){this.boxes=[],f.ContainerBox.prototype.parse.call(this,t)}),f.createFullBoxCtor("mfhd",function(t){this.sequence_number=t.readUint32()}),f.createFullBoxCtor("mfro",function(t){this._size=t.readUint32()}),f.createFullBoxCtor("mvhd",function(t){1==this.version?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.rate=t.readUint32(),this.volume=t.readUint16()>>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}),f.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()}),f.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()}),f.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var r=0;r0){var e=t.readUint32();this.kid=[];for(var r=0;r0&&(this.data=t.readUint8Array(n))}),f.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),f.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),f.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),f.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),f.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}),f.createFullBoxCtor("saio",function(t){1&this.flags&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var r=t.readUint8(),n=0;n>7,this.num_leading_samples=127&e}),f.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)o.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=15&e,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=f.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}),f.createSampleGroupCtor("stsa",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),f.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=63&e}),f.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7}),f.createSampleGroupCtor("tsas",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),f.createSampleGroupCtor("tscl",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),f.createSampleGroupCtor("vipr",function(t){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),f.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),1===this.version?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),r=0;r>6,this.sample_depends_on[n]=e>>4&3,this.sample_is_depended_on[n]=e>>2&3,this.sample_has_redundancy[n]=3&e}),f.createFullBoxCtor("senc"),f.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),o.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e,r=t.readUint32(),n=0;n>31&1,n.referenced_size=2147483647&s,n.subsegment_duration=t.readUint32(),s=t.readUint32(),n.starts_with_SAP=s>>31&1,n.SAP_type=s>>28&7,n.SAP_delta_time=268435455&s}}),f.SingleItemTypeReferenceBox=function(t,e,r,n){f.Box.call(this,t,e),this.hdr_size=r,this.start=n},f.SingleItemTypeReferenceBox.prototype=new f.Box,f.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[e+1]=15&n}else if(8===this.field_size)for(e=0;e0)for(r=0;r>4&15,this.default_skip_byte_block=15&e}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=f.parseHex16(t),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}),f.createFullBoxCtor("tfdt",function(t){1==this.version?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}),f.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&f.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}),f.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=3&e,this.entries=[];for(var r=t.readUint32(),n=0;n>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}),f.createBoxCtor("tmax",function(t){this.time=t.readUint32()}),f.createBoxCtor("tmin",function(t){this.time=t.readUint32()}),f.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()}),f.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()}),f.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()}),f.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()},f.createTrackGroupCtor("msrc"),f.TrackReferenceTypeBox=function(t,e,r,n){f.Box.call(this,t,e),this.hdr_size=r,this.start=n},f.TrackReferenceTypeBox.prototype=new f.Box,f.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)},f.trefBox.prototype.parse=function(t){for(var e,r;t.getPosition()e&&this.flags&f.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&f.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=t.readUint8(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}),f.createFullBoxCtor("url ",function(t){1!==this.flags&&(this.location=t.readCString())}),f.createFullBoxCtor("urn ",function(t){this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}),f.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),f.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=f.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}),f.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),f.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=f.parseHex16(t)}),f.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=1&e,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8()):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=1&e),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}),f.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)}),f.createFullBoxCtor("vvcC",function(t){var e,r,n={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){this.held_bits=t.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(t){this.held_bits=t.readUint16(),this.num_held_bits=16},extract_bits:function(t){var e=this.held_bits>>this.num_held_bits-t&(1<1){for(n.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=n.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)n.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<"u"||null===e?e=2:e;r.length>=1;e+=f.decimalToHex(n,0)+".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var s=!1,a="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||s)&&(a="."+f.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+a,s=!0);e+=a}return e},f.vvc1SampleEntry.prototype.getCodec=f.vvi1SampleEntry.prototype.getCodec=function(){var t,e=f.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){e+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?e+=".H":e+=".L",e+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var n,s,a=[];for(s=0|this.vvcC.ptl_frame_only_constraint<<7|this.vvcC.ptl_multilayer_enabled<<6,t=0;t>2&63,a.push(s),s&&(n=t),s=this.vvcC.general_constraint_info[t]>>2&3;if(void 0===n)r=".CA";else{r=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",u=0,l=0;for(t=0;t<=n;++t)for(u=u<<8|a[t],l+=8;l>=5;)r+=o[u>>l-5&31],l-=5,u&=(1<4294967296&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>4294967296?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),"uuid"===this.type&&t.writeUint8Array(this.uuid),this.size>4294967296&&t.writeUint64(this.size)},f.FullBox.prototype.writeHeader=function(t){this.size+=4,f.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)},f.Box.prototype.write=function(t){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))},f.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+14294967295?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(t),1===this.version?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)},f.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&f.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&f.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&f.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&f.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&f.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)},f.tkhdBox.prototype.write=function(t){this.version=0,this.size=80,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)},f.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)},f.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&f.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&f.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&f.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&f.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&f.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&f.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&f.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&f.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)){if(t[r]instanceof f.Box||e[r]instanceof f.Box||(0,ek._)(t[r])>"u"||(0,ek._)(e[r])>"u"||"function"==typeof t[r]||"function"==typeof e[r]||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||f.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;if(t[r]!==e[r])return!1}return!0},f.boxEqual=function(t,e){if(!f.boxEqualFields(t,e))return!1;for(var r=0;r1)for(e=1;e-1&&this.fragmentedTracks.splice(e,1)},m.prototype.setExtractionOptions=function(t,e,r){var n=this.getTrackById(t);if(n){var s={};this.extractedTracks.push(s),s.id=t,s.user=e,s.trak=n,n.nextSample=0,s.nb_samples=1e3,s.samples=[],r&&r.nbSamples&&(s.nb_samples=r.nbSamples)}},m.prototype.unsetExtractionOptions=function(t){for(var e=-1,r=0;r-1&&this.extractedTracks.splice(e,1)},m.prototype.parse=function(){var t,e,r;if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else if(this.saveParsePosition&&this.saveParsePosition(),(e=f.parseOneBox(this.stream,!1)).code===f.ERR_NOT_ENOUGH_DATA){if(!this.processIncompleteBox)return;if(this.processIncompleteBox(e))continue;return}else{switch(t="uuid"!==(r=e.box).type?r.type:r.uuid,this.boxes.push(r),t){case"mdat":this.mdats.push(r);break;case"moof":this.moofs.push(r);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[t]&&o.warn("ISOFile","Duplicate Box of type: "+t+", overriding previous occurrence"),this[t]=r}this.updateUsedBytes&&this.updateUsedBytes(r,e)}},m.prototype.checkBuffer=function(t){if(null==t)throw"Buffer must be defined and non empty";if(void 0===t.fileStart)throw"Buffer must have a fileStart property";return 0===t.byteLength?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},m.prototype.appendBuffer=function(t,e){var r;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(o.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},m.prototype.getInfo=function(){var t,e,r,n,s,a,o={},u=/* @__PURE__ */new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(u+1e3*this.moov.mvhd.creation_time),o.modified=new Date(u+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],t=0;t0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',t=0;t=r.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+n.id+" for samples ["+Math.max(0,r.nextSample-n.nb_samples)+","+(r.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(n.id,n.user,n.segmentStream.buffer,r.nextSample,t||r.nextSample>=r.samples.length),n.segmentStream=null,n!==this.fragmentedTracks[e]))break}}if(null!==this.onSamples)for(e=0;e=r.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[e]))break}}}},m.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null},m.prototype.getBoxes=function(t,e){var r=[];return m._sweep.call(this,t,r,e),r},m._sweep=function(t,e,r){for(var n in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&r)return;m._sweep.call(this.boxes[n],t,e,r)}},m.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);if(e)return e.samples},m.prototype.getTrackSample=function(t,e){var r=this.getTrackById(t);return this.getSample(r,e)},m.prototype.releaseUsedSamples=function(t,e){var r=0,n=this.getTrackById(t);n.lastValidSample||(n.lastValidSample=0);for(var s=n.lastValidSample;st*s.timescale){c=n-1;break}e&&s.is_sync&&(l=n)}for(e&&(c=l),t=r.samples[c].cts,r.nextSample=c;r.samples[c].alreadyRead===r.samples[c].size&&r.samples[c+1];)c++;return u=r.samples[c].offset+r.samples[c].alreadyRead,o.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+o.getDurationString(t,a)+" and offset: "+u),{offset:u,time:t/a}},m.prototype.getTrackDuration=function(t){var e;return t.samples?((e=t.samples[t.samples.length-1]).cts+e.duration)/e.timescale:1/0},m.prototype.seek=function(t,e){var r,n,s,a=this.moov,u={offset:1/0,time:1/0};if(this.moov){for(s=0;sthis.getTrackDuration(r))&&((n=this.seekTrack(t,e,r)).offset-1){o=l;break}switch(o){case"Visual":if(s.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",e.width).set("height",e.height).set("horizresolution",4718592).set("vertresolution",4718592).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var d=new f.avcCBox;d.parse(new u(e.avcDecoderConfigRecord)),a.addBox(d)}else if(e.hevcDecoderConfigRecord){var p=new f.hvcCBox;p.parse(new u(e.hevcDecoderConfigRecord)),a.addBox(p)}break;case"Audio":s.add("smhd").set("balance",e.balance||0),a.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":s.add("hmhd");break;case"Subtitle":s.add("sthd"),"stpp"===e.type&&a.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break;default:s.add("nmhd")}e.description&&a.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(t){a.addBox(t)}),s.add("dinf").add("dref").addEntry(new f["url Box"]().set("flags",1));var m=s.add("stbl");return m.add("stsd").addEntry(a),m.add("stts").set("sample_counts",[]).set("sample_deltas",[]),m.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),m.add("stco").set("chunk_offsets",[]),m.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(r),e.id}},f.Box.prototype.computeSize=function(t){var e=t||new l;e.endianness=l.BIG_ENDIAN,this.write(e)},m.prototype.addSample=function(t,e,r){var n=r||{},s={},a=this.getTrackById(t);if(null!==a){s.number=a.samples.length,s.track_id=a.tkhd.track_id,s.timescale=a.mdia.mdhd.timescale,s.description_index=n.sample_description_index?n.sample_description_index-1:0,s.description=a.mdia.minf.stbl.stsd.entries[s.description_index],s.data=e,s.size=e.byteLength,s.alreadyRead=s.size,s.duration=n.duration||1,s.cts=n.cts||0,s.dts=n.dts||0,s.is_sync=n.is_sync||!1,s.is_leading=n.is_leading||0,s.depends_on=n.depends_on||0,s.is_depended_on=n.is_depended_on||0,s.has_redundancy=n.has_redundancy||0,s.degradation_priority=n.degradation_priority||0,s.offset=0,s.subsamples=n.subsamples,a.samples.push(s),a.samples_size+=s.size,a.samples_duration+=s.duration,void 0===a.first_dts&&(a.first_dts=n.dts),this.processSamples();var o=this.createSingleSampleMoof(s);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),s}},m.prototype.createSingleSampleMoof=function(t){var e=0;e=t.is_sync?33554432:65536;var r=new f.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var n=r.add("traf"),s=this.getTrackById(t.track_id);return n.add("tfhd").set("track_id",t.track_id).set("flags",f.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),n.add("tfdt").set("baseMediaDecodeTime",t.dts-(s.first_dts||0)),n.add("trun").set("flags",f.TRUN_FLAGS_DATA_OFFSET|f.TRUN_FLAGS_DURATION|f.TRUN_FLAGS_SIZE|f.TRUN_FLAGS_FLAGS|f.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),r},m.prototype.lastMoofIndex=0,m.prototype.samplesDataSize=0,m.prototype.resetTables=function(){var t,e,r,n,s,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,t=0;t=2&&(l=s[o].grouping_type+"/0",(u=new c(s[o].grouping_type,0)).is_fragment=!0,e.sample_groups_info[l]||(e.sample_groups_info[l]=u))}else for(o=0;o=2&&(l=n[o].grouping_type+"/0",u=new c(n[o].grouping_type,0),t.sample_groups_info[l]||(t.sample_groups_info[l]=u))},m.setSampleGroupProperties=function(t,e,r,n){var s,a,o;for(s in e.sample_groups=[],n)e.sample_groups[s]={},e.sample_groups[s].grouping_type=n[s].grouping_type,e.sample_groups[s].grouping_type_parameter=n[s].grouping_type_parameter,r>=n[s].last_sample_in_run&&(n[s].last_sample_in_run<0&&(n[s].last_sample_in_run=0),n[s].entry_index++,n[s].entry_index<=n[s].sbgp.entries.length-1&&(n[s].last_sample_in_run+=n[s].sbgp.entries[n[s].entry_index].sample_count)),n[s].entry_index<=n[s].sbgp.entries.length-1?e.sample_groups[s].group_description_index=n[s].sbgp.entries[n[s].entry_index].group_description_index:e.sample_groups[s].group_description_index=-1,0!==e.sample_groups[s].group_description_index&&(o=n[s].fragment_description?n[s].fragment_description:n[s].description,e.sample_groups[s].group_description_index>0?(a=e.sample_groups[s].group_description_index>65535?(e.sample_groups[s].group_description_index>>16)-1:e.sample_groups[s].group_description_index-1,o&&a>=0&&(e.sample_groups[s].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[s].description=o.entries[o.default_group_description_index-1]))},m.process_sdtp=function(t,e,r){e&&(t?(e.is_leading=t.is_leading[r],e.depends_on=t.sample_depends_on[r],e.is_depended_on=t.sample_is_depended_on[r],e.has_redundancy=t.sample_has_redundancy[r]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},m.prototype.buildSampleLists=function(){var t,e;for(t=0;t"u")){for(e=0;eb&&(w++,b<0&&(b=0),b+=a.sample_counts[w]),e>0?(t.samples[e-1].duration=a.sample_deltas[w],t.samples_duration+=t.samples[e-1].duration,A.dts=t.samples[e-1].dts+t.samples[e-1].duration):A.dts=0,o?(e>=S&&(x++,S<0&&(S=0),S+=o.sample_counts[x]),A.cts=t.samples[e].dts+o.sample_offsets[x]):A.cts=A.dts,u?(e==u.sample_numbers[E]-1?(A.is_sync=!0,E++):(A.is_sync=!1,A.degradation_priority=0),c&&c.entries[U].sample_delta+T==e+1&&(A.subsamples=c.entries[U].subsamples,T+=c.entries[U].sample_delta,U++)):A.is_sync=!0,m.process_sdtp(t.mdia.minf.stbl.sdtp,A,A.number),d?A.degradation_priority=d.priority[e]:A.degradation_priority=0,c&&c.entries[U].sample_delta+T==e&&(A.subsamples=c.entries[U].subsamples,T+=c.entries[U].sample_delta),(h.length>0||f.length>0)&&m.setSampleGroupProperties(t,A,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},m.prototype.updateSampleLists=function(){var t,e,r,n,s,a,o,u,l,c,h,d,p,_;if(void 0!==this.moov){for(;this.lastMoofIndex0&&m.initSampleGroups(h,c,c.sbgps,h.mdia.minf.stbl.sgpds,c.sgpds),e=0;e0?p.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(c.tfdt?p.dts=c.tfdt.baseMediaDecodeTime:p.dts=0,h.first_traf_merged=!0),p.cts=p.dts,y.flags&f.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+y.sample_composition_time_offset[r]),_=o,y.flags&f.TRUN_FLAGS_FLAGS?_=y.sample_flags[r]:0===r&&y.flags&f.TRUN_FLAGS_FIRST_FLAG&&(_=y.first_sample_flags),p.is_sync=!(_>>16&1),p.is_leading=_>>26&3,p.depends_on=_>>24&3,p.is_depended_on=_>>22&3,p.has_redundancy=_>>20&3,p.degradation_priority=65535&_;var g=!!(c.tfhd.flags&f.TFHD_FLAG_BASE_DATA_OFFSET),v=!!(c.tfhd.flags&f.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(y.flags&f.TRUN_FLAGS_DATA_OFFSET),w=0;w=g?c.tfhd.base_data_offset:v||0===e?l.start:u,0===e&&0===r?b?p.offset=w+y.data_offset:p.offset=w:p.offset=u,u=p.offset+p.size,(c.sbgps.length>0||c.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&m.setSampleGroupProperties(h,p,p.number_in_traf,c.sample_groups_info)}}if(c.subs){h.has_fragment_subsamples=!0;var S=c.first_sample_index;for(e=0;e-1))return null;var a=(r=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-r.fileStart);if(n.size-n.alreadyRead<=a)return o.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+(n.size-n.alreadyRead)+" full size: "+n.size+")"),l.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,n.size-n.alreadyRead),r.usedBytes+=n.size-n.alreadyRead,this.stream.logBufferLevel(),n.alreadyRead=n.size,n;if(0===a)return null;o.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+a+" full size: "+n.size+")"),l.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,a),n.alreadyRead+=a,r.usedBytes+=a,this.stream.logBufferLevel()}},m.prototype.releaseSample=function(t,e){var r=t.samples[e];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},m.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},m.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},m.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=s.ipro.protections[s.iinf.item_infos[t].protection_index-1]),s.iinf.item_infos[t].item_type?r.type=s.iinf.item_infos[t].item_type:r.type="mime",r.content_type=s.iinf.item_infos[t].content_type,r.content_encoding=s.iinf.item_infos[t].content_encoding;if(s.iloc)for(t=0;t0&&f.property_index-1-1))return null;var u=(e=this.stream.buffers[a]).byteLength-(s.offset+s.alreadyRead-e.fileStart);if(!(s.length-s.alreadyRead<=u))return o.debug("ISOFile","Getting item #"+t+" extent #"+n+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-e.fileStart)+" read size: "+u+" full extent size: "+s.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,e,s.offset+s.alreadyRead-e.fileStart,u),s.alreadyRead+=u,r.alreadyRead+=u,e.usedBytes+=u,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+t+" extent #"+n+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-e.fileStart)+" read size: "+(s.length-s.alreadyRead)+" full extent size: "+s.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,e,s.offset+s.alreadyRead-e.fileStart,s.length-s.alreadyRead),e.usedBytes+=s.length-s.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=s.length-s.alreadyRead,s.alreadyRead=s.length}}return r.alreadyRead===r.size?r:null},m.prototype.releaseItem=function(t){var e=this.items[t];if(!e.data)return 0;this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var r=0;r0?this.moov.traks[t].samples[0].duration:0),e.push(n)}return e},f.Box.prototype.printHeader=function(t){this.size+=8,this.size>4294967296&&(this.size+=8),"uuid"===this.type&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)},f.FullBox.prototype.printHeader=function(t){this.size+=4,f.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)},f.Box.prototype.print=function(t){this.printHeader(t)},f.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)},f.tkhdBox.prototype.print=function(t){f.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)},(_={}).createFile=function(t,e){var r=new m(e);return r.discardMdatData=!(void 0===t||t),r},rQ.createFile=_.createFile;var rJ=/* @__PURE__ */rq(rQ),r$={sampleRate:48e3,channelCount:2,codec:"mp4a.40.2"};function r0(t,e){var r=e.videoTracks[0],n={};if(null!=r){var s=function(t){var e=!0,r=!1,n=void 0;try{for(var s,a=t.mdia.minf.stbl.stsd.entries[Symbol.iterator]();!(e=(s=a.next()).done);e=!0){var o,u,l=s.value,c=null!==(u=null!==(o=l.avcC)&&void 0!==o?o:l.hvcC)&&void 0!==u?u:l.vpcC;if(null!=c){var h=new rJ.DataStream(void 0,0,rJ.DataStream.BIG_ENDIAN);return c.write(h),new Uint8Array(h.buffer.slice(8))}}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}throw Error("avcC, hvcC or VPX not found")}(t.getTrackById(r.id)).buffer,a=r.codec.startsWith("avc1")?{descKey:"avcDecoderConfigRecord",type:"avc1"}:r.codec.startsWith("hvc1")?{descKey:"hevcDecoderConfigRecord",type:"hvc1"}:{descKey:"",type:""},o=a.descKey,u=a.type;""!==o&&(n.videoTrackConf=(0,eb._)({timescale:r.timescale,duration:r.duration,width:r.video.width,height:r.video.height,brands:e.brands,type:u},o,s)),n.videoDecoderConf={codec:r.codec,codedHeight:r.video.height,codedWidth:r.video.width,description:s}}var l=e.audioTracks[0];if(null!=l){var c=r1(t);n.audioTrackConf={timescale:l.timescale,samplerate:l.audio.sample_rate,channel_count:l.audio.channel_count,hdlr:"soun",type:l.codec.startsWith("mp4a")?"mp4a":l.codec,description:r1(t)},n.audioDecoderConf=(0,eE._)({codec:l.codec.startsWith("mp4a")?r$.codec:l.codec,numberOfChannels:l.audio.channel_count,sampleRate:l.audio.sample_rate},null==c?{}:function(t){var e,r=null==(e=t.esd.descs[0])?void 0:e.descs[0];if(null==r)return{};var n=(0,eA._)(r.data,2),s=n[0],a=n[1];return{sampleRate:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][((7&s)<<1)+(a>>7)],numberOfChannels:(127&a)>>3}}(c))}return n}function r1(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mp4a",n=null==(e=t.moov)?void 0:e.traks.map(function(t){return t.mdia.minf.stbl.stsd.entries}).flat().find(function(t){return t.type===r});return null==n?void 0:n.esds}var r2=function t(){(0,eg._)(this,t),eL(this,"readable"),eL(this,"writable"),eN(this,C,0);var e,r=rJ.createFile(),n=!1,s=this;this.readable=new ReadableStream({start:function(t){r.onReady=function(e){var n,s,a=null==(n=e.videoTracks[0])?void 0:n.id;null!=a&&r.setExtractionOptions(a,"video",{nbSamples:100});var o=null==(s=e.audioTracks[0])?void 0:s.id;null!=o&&r.setExtractionOptions(o,"audio",{nbSamples:100}),t.enqueue({chunkType:"ready",data:{info:e,file:r}}),r.start()};var e={};r.onSamples=function(n,s,a){var o;t.enqueue({chunkType:"samples",data:{id:n,type:s,samples:a.map(function(t){return(0,eE._)({},t)})}}),e[n]=(null!==(o=e[n])&&void 0!==o?o:0)+a.length,r.releaseUsedSamples(n,e[n])},r.onFlush=function(){t.close()}},cancel:function(){r.stop(),n=!0}},{highWaterMark:50}),this.writable=new WritableStream({write:(e=(0,ey._)(function(t){var e;return(0,eB._)(this,function(a){return n?s.writable.abort():((e=t.buffer).fileStart=eM(s,C),ej(s,C,eM(s,C)+e.byteLength),r.appendBuffer(e)),[2]})}),function(t){return e.apply(this,arguments)}),close:function(){var t;r.flush(),r.stop(),null==(t=r.onFlush)||t.call(r)}})};C=new WeakMap;var r3=0;function r4(t){return"file"===t.kind&&t.createReader instanceof Function}var r6=/*#__PURE__*/function(){function t(e){var r,n,s,a=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{audio:!0};if((0,eg._)(this,t),eN(this,B,rw.create("MP4Clip id:".concat(r3++,","))),eL(this,"ready"),eN(this,P,!1),eN(this,R,{duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0}),eN(this,F),eN(this,D,1),eN(this,z,[]),eN(this,L,[]),eN(this,O,null),eN(this,M,null),eN(this,N,{video:null,audio:null}),eN(this,j,{audio:!0}),eL(this,"tickInterceptor",(r=(0,ey._)(function(t,e){return(0,eB._)(this,function(t){return[2,e]})}),function(t,e){return r.apply(this,arguments)})),eN(this,G,new AbortController),!(e instanceof ReadableStream)&&!r4(e)&&!Array.isArray(e.videoSamples))throw Error("Illegal argument");ej(this,j,(0,eE._)({},o)),ej(this,D,"object"==typeof o.audio&&"volume"in o.audio?o.audio.volume:1);var u=this,l=(n=(0,ey._)(function(t){return(0,eB._)(this,function(e){switch(e.label){case 0:return[4,rn(eM(u,F),t)];case 1:return e.sent(),[4,eM(u,F).stream()];case 2:return[2,e.sent()]}})}),function(t){return n.apply(this,arguments)}),c=this;ej(this,F,r4(e)?e:"localFile"in e?e.localFile:rm()),this.ready=(e instanceof ReadableStream?l(e).then(function(t){return r9(t,eM(a,j))}):r4(e)?e.stream().then(function(t){return r9(t,eM(a,j))}):Promise.resolve(e)).then((s=(0,ey._)(function(t){var e,r,n,s,a,o,u;return(0,eB._)(this,function(l){switch(l.label){case 0:return e=t.videoSamples,r=t.audioSamples,n=t.decoderConf,ej(c,z,e),ej(c,L,r),ej(c,N,n),u=[{video:null==n.video?null:(0,eU._)((0,eE._)({},n.video),{hardwareAcceleration:eM(c,j).__unsafe_hardwareAcceleration__}),audio:n.audio}],[4,eM(c,F).createReader()];case 1:return a=(s=r5.apply(void 0,u.concat([l.sent(),e,r,!1!==eM(c,j).audio?eM(c,D):null]))).videoFrameFinder,o=s.audioFrameFinder,[2,(ej(c,O,a),ej(c,M,o),ej(c,R,function(t,e,r){var n,s,a={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};null!=t.video&&e.length>0&&(a.width=null!==(n=t.video.codedWidth)&&void 0!==n?n:0,a.height=null!==(s=t.video.codedHeight)&&void 0!==s?s:0),null!=t.audio&&r.length>0&&(a.audioSampleRate=r$.sampleRate,a.audioChanCount=r$.channelCount);var o=0,u=0;if(e.length>0)for(var l=e.length-1;l>=0;l--){var c=e[l];if(!c.deleted){o=c.cts+c.duration;break}}if(r.length>0){var h=r.at(-1);u=h.cts+h.duration}return a.duration=Math.max(o,u),a}(n,e,r)),eM(c,B).info("MP4Clip meta:",eM(c,R)),(0,eE._)({},eM(c,R)))]}})}),function(t){return s.apply(this,arguments)}))}return(0,ev._)(t,[{key:"meta",get:function(){return(0,eE._)({},eM(this,R))}},{key:"tick",value:function(t){var e=this;return(0,ey._)(function(){var r,n,s,a,o,u,l;return(0,eB._)(this,function(c){switch(c.label){case 0:if(!(t>=eM(e,R).duration))return[3,2];return[4,e.tickInterceptor(t,{audio:[],state:"done"})];case 1:return[2,c.sent()];case 2:return[4,Promise.all([null!==(s=null==(r=eM(e,M))?void 0:r.find(t))&&void 0!==s?s:[],null==(n=eM(e,O))?void 0:n.find(t)])];case 3:if(o=(a=(0,eA._).apply(void 0,[c.sent(),2]))[0],null!=(u=a[1]))return[3,5];return[4,e.tickInterceptor(t,{audio:o,state:"success"})];case 4:return l=c.sent(),[3,7];case 5:return[4,e.tickInterceptor(t,{video:u,audio:o,state:"success"})];case 6:l=c.sent(),c.label=7;case 7:return[2,l]}})})()}},{key:"thumbnails",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,e=arguments.length>1?arguments[1]:void 0,r=this;return(0,ey._)(function(){var n,s,a,o;return(0,eB._)(this,function(u){switch(u.label){case 0:return eM(r,G).abort(),ej(r,G,new AbortController),n=eM(r,G).signal,[4,r.ready];case 1:var l,c,h,f,d,p;if(u.sent(),s="generate thumbnails aborted",n.aborted)throw Error(s);return c=Math.round(t/(a=eM(r,R)).width*a.height),h={quality:.1,type:"image/png"},p=(d=new OffscreenCanvas(t,c)).getContext("2d"),f=(0,ey._)(function(e){return(0,eB._)(this,function(r){switch(r.label){case 0:return p.drawImage(e,0,0,t,c),e.close(),[4,d.convertToBlob(h)];case 1:return[2,r.sent()]}})}),o=function(t){return f.apply(this,arguments)},[2,new Promise((l=(0,ey._)(function(t,a){var u,l,c,h,f,d,p,m,_,y,g,v;function b(){return w.apply(this,arguments)}function w(){return(w=(0,ey._)(function(){return(0,eB._)(this,function(e){switch(e.label){case 0:var r;if(n.aborted)return[3,2];return[4,Promise.all(u.map((r=(0,ey._)(function(t){var e;return(0,eB._)(this,function(r){switch(r.label){case 0:return e={ts:t.ts},[4,t.img];case 1:return[2,(e.img=r.sent(),e)]}})}),function(t){return r.apply(this,arguments)})))];case 1:t.apply(void 0,[e.sent()]),e.label=2;case 2:return[2]}})})).apply(this,arguments)}function S(t){u.push({ts:t.timestamp,img:o(t)})}return(0,eB._)(this,function(t){switch(t.label){case 0:if(u=[],null==(l=eM(r,N).video)||0===eM(r,z).length)return b(),[2];if(n.addEventListener("abort",function(){a(Error(s))}),f=void 0===(h=(c=null!=e?e:{}).start)?0:h,p=void 0===(d=c.end)?eM(r,R).duration:d,!(m=c.step))return[3,6];return _=f,g=it.bind,[4,eM(r,F).createReader()];case 1:y=new(g.apply(it,[void 0,t.sent(),eM(r,z),(0,eU._)((0,eE._)({},l),{hardwareAcceleration:eM(r,j).__unsafe_hardwareAcceleration__})])),t.label=2;case 2:if(!(_<=p&&!n.aborted))return[3,5];return[4,y.find(_)];case 3:(v=t.sent())&&S(v),_+=m,t.label=4;case 4:return[3,2];case 5:return y.destroy(),b(),[3,8];case 6:return[4,function(t,e,r,n,s,a){return io.apply(this,arguments)}(eM(r,z),eM(r,F),l,n,{start:f,end:p},function(t,e){S(t),e&&b()})];case 7:t.sent(),t.label=8;case 8:return[2]}})}),function(t,e){return l.apply(this,arguments)}))]}})})()}},{key:"split",value:function(e){var r=this;return(0,ey._)(function(){var n,s,a,o,u,l,c,h;return(0,eB._)(this,function(f){switch(f.label){case 0:return[4,r.ready];case 1:if(f.sent(),e<=0||e>=eM(r,R).duration)throw Error('"time" out of bounds');return s=(n=(0,eA._)(function(t,e){if(0===t.length)return[];for(var r=0,n=0,s=-1,a=0;a=0)break;g.deleted=!0,g.cts=-1}}catch(t){p=!0,m=t}finally{try{d||null==y.return||y.return()}finally{if(p)throw m}}return[l,f]}(eM(r,z),e),2))[0],a=n[1],u=(o=(0,eA._)(function(t,e){if(0===t.length)return[];for(var r=-1,n=0;nt[n].cts)){r=n;break}if(-1===r)throw Error("Not found audio sample by time");return[t.slice(0,r),t.slice(r).map(function(t){return(0,eU._)((0,eE._)({},t),{cts:t.cts-e})})]}(eM(r,L),e),2))[0],l=o[1],c=new t({localFile:eM(r,F),videoSamples:null!=s?s:[],audioSamples:null!=u?u:[],decoderConf:eM(r,N)},eM(r,j)),h=new t({localFile:eM(r,F),videoSamples:null!=a?a:[],audioSamples:null!=l?l:[],decoderConf:eM(r,N)},eM(r,j)),[4,Promise.all([c.ready,h.ready])];case 2:return[2,(f.sent(),[c,h])]}})})()}},{key:"clone",value:function(){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:return n.sent(),[4,(r=new t({localFile:eM(e,F),videoSamples:(0,eI._)(eM(e,z)),audioSamples:(0,eI._)(eM(e,L)),decoderConf:eM(e,N)},eM(e,j))).ready];case 2:return[2,(n.sent(),r.tickInterceptor=e.tickInterceptor,r)]}})})()}},{key:"splitTrack",value:function(){var e=this;return(0,ey._)(function(){var r,n,s;return(0,eB._)(this,function(a){switch(a.label){case 0:return[4,e.ready];case 1:if(a.sent(),r=[],!(eM(e,z).length>0))return[3,3];return[4,(n=new t({localFile:eM(e,F),videoSamples:(0,eI._)(eM(e,z)),audioSamples:[],decoderConf:{video:eM(e,N).video,audio:null}},eM(e,j))).ready];case 2:a.sent(),n.tickInterceptor=e.tickInterceptor,r.push(n),a.label=3;case 3:if(!(eM(e,L).length>0))return[3,5];return[4,(s=new t({localFile:eM(e,F),videoSamples:[],audioSamples:(0,eI._)(eM(e,L)),decoderConf:{audio:eM(e,N).audio,video:null}},eM(e,j))).ready];case 4:a.sent(),s.tickInterceptor=e.tickInterceptor,r.push(s),a.label=5;case 5:return[2,r]}})})()}},{key:"destroy",value:function(){var t,e;eM(this,P)||(eM(this,B).info("MP4Clip destroy"),ej(this,P,!0),null==(t=eM(this,O))||t.destroy(),null==(e=eM(this,M))||e.destroy())}}]),t}();B=new WeakMap,P=new WeakMap,R=new WeakMap,F=new WeakMap,D=new WeakMap,z=new WeakMap,L=new WeakMap,O=new WeakMap,M=new WeakMap,N=new WeakMap,j=new WeakMap,G=new WeakMap;var r8=r6;function r5(t,e,r,n,s){return{audioFrameFinder:null==s||null==t.audio||0===n.length?null:new ie(e,n,t.audio,{volume:s,targetSampleRate:r$.sampleRate}),videoFrameFinder:null==t.video||0===r.length?null:new it(e,r,t.video)}}function r9(t){return r7.apply(this,arguments)}function r7(){return(r7=(0,ey._)(function(t){var e,r,n,s,a,o=arguments;function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;return(0,eU._)((0,eE._)({},t),{is_idr:"video"===r&&t.is_sync&&function(t){for(var e=new DataView(t.buffer),r=0;r1&&void 0!==o[1]?o[1]:{},n={video:null,audio:null},s=[],a=[],[2,new Promise((c=(0,ey._)(function(o,l){var c,h,f;return(0,eB._)(this,function(d){var p;return c=-1,h=-1,f=rZ(t.pipeThrough(new r2),{onChunk:(p=(0,ey._)(function(t){var o,d,p,m,_,y,g,v,b,w,S,x,E,U,T,A,I;return(0,eB._)(this,function(k){if(o=t.chunkType,d=t.data,"ready"===o)r=d.info,m=(p=r0(d.file,d.info)).videoDecoderConf,_=p.audioDecoderConf,n.video=null!=m?m:null,n.audio=null!=_?_:null,null==m&&null==_&&(f(),l(Error("MP4Clip must contain at least one video or audio track"))),rw.info("mp4BoxFile moov ready",(0,eU._)((0,eE._)({},d.info),{tracks:null,videoTracks:null,audioTracks:null}),n);else if("samples"===o){if("video"===d.type){-1===c&&(c=d.samples[0].dts),y=!0,g=!1,v=void 0;try{for(b=d.samples[Symbol.iterator]();!(y=(w=b.next()).done);y=!0)S=w.value,s.push(u(S,c,"video"))}catch(t){g=!0,v=t}finally{try{y||null==b.return||b.return()}finally{if(g)throw v}}}else if("audio"===d.type&&e.audio){-1===h&&(h=d.samples[0].dts),x=!0,E=!1,U=void 0;try{for(T=d.samples[Symbol.iterator]();!(x=(A=T.next()).done);x=!0)I=A.value,a.push(u(I,h,"audio"))}catch(t){E=!0,U=t}finally{try{x||null==T.return||T.return()}finally{if(E)throw U}}}}return[2]})}),function(t){return p.apply(this,arguments)}),onDone:function(){var t,e=null!==(t=s.at(-1))&&void 0!==t?t:a.at(-1);if(null==r){l(Error("MP4Clip stream is done, but not emit ready"));return}if(null==e){l(Error("MP4Clip stream not contain any sample"));return}var u=s[0];null!=u&&u.cts<2e5&&(u.duration+=u.cts,u.cts=0),rw.info("mp4 stream parsed"),o({videoSamples:s,audioSamples:a,decoderConf:n})}}),[2]})}),function(t,e){return c.apply(this,arguments)}))]})})).apply(this,arguments)}var it=function t(e,r,n){var s,a,o,u=this;(0,eg._)(this,t),eN(this,Y,null),eN(this,W,0),eN(this,V,{abort:!1,st:performance.now()});var l=this;eL(this,"find",(s=(0,ey._)(function(t){return(0,eB._)(this,function(e){switch(e.label){case 0:return(null==eM(l,Y)||t<=eM(l,W)||t-eM(l,W)>3e6)&&eM(l,te).call(l,t),eM(l,V).abort=!0,ej(l,W,t),ej(l,V,{abort:!1,st:performance.now()}),[4,eM(l,J).call(l,t,eM(l,Y),eM(l,V))];case 1:return[2,e.sent()]}})}),function(t){return s.apply(this,arguments)})),eN(this,H,0),eN(this,X,!1),eN(this,Z,0),eN(this,K,[]),eN(this,q,0),eN(this,Q,0);var c=this;eN(this,J,(a=(0,ey._)(function(t,e,r){var n,s,a,o,u;return(0,eB._)(this,function(l){switch(l.label){case 0:if(null==e||"closed"===e.state||r.abort)return[2,null];if(!(eM(c,K).length>0))return[3,6];if(!(t<(n=eM(c,K)[0]).timestamp))return[3,1];return a=null,[3,5];case 1:if(eM(c,K).shift(),!(t>n.timestamp+(null!==(s=n.duration)&&void 0!==s?s:0)))return[3,3];return n.close(),[4,eM(c,J).call(c,t,e,r)];case 2:return o=l.sent(),[3,4];case 3:eM(c,K).length<10&&eM(c,tt).call(c,e).catch(function(e){throw eM(c,te).call(c,t),e}),o=n,l.label=4;case 4:a=o,l.label=5;case 5:return[2,a];case 6:if(!(eM(c,$)||eM(c,q)0))return[3,8];if(performance.now()-r.st>3e3)throw Error("MP4Clip.tick video timeout, ".concat(JSON.stringify(eM(c,tr).call(c))));return[4,rH(15)];case 7:return l.sent(),[3,12];case 8:if(eM(c,Z)>=c.samples.length)return[2,null];l.label=9;case 9:return l.trys.push([9,11,,12]),[4,eM(c,tt).call(c,e)];case 10:return l.sent(),[3,12];case 11:throw u=l.sent(),eM(c,te).call(c,t),u;case 12:return[4,eM(c,J).call(c,t,e,r)];case 13:return[2,l.sent()]}})}),function(t,e,r){return a.apply(this,arguments)})),eN(this,$,!1);var h=this;eN(this,tt,(o=(0,ey._)(function(t){var e,r,n,s,a,o,u,l;return(0,eB._)(this,function(c){switch(c.label){case 0:if(eM(h,$))return[2];for(ej(h,$,!0),n=eM(h,Z)+1,s=!1;n1e5){for(eM(l,tf).call(l),ej(l,to,t),e=0;e1&&void 0!==a[1]?a[1]:null,r=a.length>2?a[2]:void 0,null==e||r.abort||"closed"===e.state||0===(n=Math.ceil(t*(eM(c,tn)/1e6))))return[2,[]];if((s=eM(c,tl).frameCnt-n)>0)return[2,(se){var l=e-n;r[0].set(o.subarray(0,l),n),r[1].set(u.subarray(0,l),n),t.data[s][0]=o.subarray(l,o.length),t.data[s][1]=u.subarray(l,u.length);break}r[0].set(o,n),r[1].set(u,n),n+=o.length,s++}return t.data=t.data.slice(s),t.frameCnt-=e,r}(eM(c,tl),n))];if(!(e.decodeQueueSize>10))return[3,2];if(performance.now()-r.st>3e3)throw r.abort=!0,Error("MP4Clip.tick audio timeout, ".concat(JSON.stringify(eM(c,td).call(c))));return[4,rH(15)];case 1:return o.sent(),[3,3];case 2:if(eM(c,tu)>=c.samples.length-1)return[2,[]];eM(c,th).call(c,e),o.label=3;case 3:return[2,eM(c,tc).call(c,t,e,r)]}})}),function(t){return o.apply(this,arguments)})),eN(this,th,function(t){if(!(t.decodeQueueSize>100)){for(var e=[],r=eM(u,tu);r=10))break}ej(u,tu,r),t.decode(e.map(function(t){return new EncodedAudioChunk({type:"key",timestamp:t.cts,duration:t.duration,data:t.data})}))}}),eN(this,tf,function(){var t,e,r,n,s,a,o,l;ej(u,to,0),ej(u,tu,0),ej(u,tl,{frameCnt:0,data:[]}),null==(t=eM(u,ts))||t.close(),ej(u,ts,(e=u.conf,r={resampleRate:r$.sampleRate,volume:eM(u,ti)},n=function(t){eM(u,tl).data.push(t),eM(u,tl).frameCnt+=t[0].length},a=function(t){var e=[],r=0;function n(){var s=e[r];null!=s&&(t(s),r+=1,n())}var s=0;return function(t){var r=s;s+=1,t().then(function(t){e[r]=t,n()}).catch(function(t){e[r]=t,n()})}}(s=function(t){if(0!==t.length){var e=!0,s=!1,a=void 0;if(1!==r.volume)try{for(var o,u=t[Symbol.iterator]();!(e=(o=u.next()).done);e=!0)for(var l=o.value,c=0;c=s.start&&t.cts<=s.end}),o)];case 2:return 0===(c=h.sent()).length||n.aborted||(l.configure(r),is(l,c,{})),[2]}})})).apply(this,arguments)}ti=new WeakMap,tn=new WeakMap,ts=new WeakMap,ta=new WeakMap,to=new WeakMap,tu=new WeakMap,tl=new WeakMap,tc=new WeakMap,th=new WeakMap,tf=new WeakMap,td=new WeakMap;var iu=/*#__PURE__*/function(){function t(e){var r=this;(0,eg._)(this,t),eN(this,ty),eL(this,"ready"),eN(this,tp,{duration:0,width:0,height:0}),eN(this,tm,null),eN(this,t_,[]);var n=function(t){return ej(r,tm,t),eM(r,tp).width=t.width,eM(r,tp).height=t.height,eM(r,tp).duration=1/0,(0,eE._)({},eM(r,tp))};if(e instanceof ReadableStream)this.ready=new Response(e).blob().then(function(t){return createImageBitmap(t)}).then(n);else if(e instanceof ImageBitmap)this.ready=Promise.resolve(n(e));else if(Array.isArray(e)&&e.every(function(t){return t instanceof VideoFrame})){ej(this,t_,e);var s=eM(this,t_)[0];if(null==s)throw Error("The frame count must be greater than 0");ej(this,tp,{width:s.displayWidth,height:s.displayHeight,duration:eM(this,t_).reduce(function(t,e){var r;return t+(null!==(r=e.duration)&&void 0!==r?r:0)},0)}),this.ready=Promise.resolve((0,eU._)((0,eE._)({},eM(this,tp)),{duration:1/0}))}else if("type"in e)this.ready=eG(this,ty,tg).call(this,e.stream,e.type).then(function(){return{width:eM(r,tp).width,height:eM(r,tp).height,duration:1/0}});else throw Error("Illegal arguments")}return(0,ev._)(t,[{key:"meta",get:function(){return(0,eE._)({},eM(this,tp))}},{key:"tick",value:function(t){var e=this;return(0,ey._)(function(){var r,n,s;return(0,eB._)(this,function(a){switch(a.label){case 0:if(!(null!=eM(e,tm)))return[3,2];return r={},[4,createImageBitmap(eM(e,tm))];case 1:return[2,(r.video=a.sent(),r.state="success",r)];case 2:return n=t%eM(e,tp).duration,[2,{video:(null!==(s=eM(e,t_).find(function(t){var e;return n>=t.timestamp&&n<=t.timestamp+(null!==(e=t.duration)&&void 0!==e?e:0)}))&&void 0!==s?s:eM(e,t_)[0]).clone(),state:"success"}]}})})()}},{key:"split",value:function(e){var r=this;return(0,ey._)(function(){var n,s,a,o,u,l,c;return(0,eB._)(this,function(h){switch(h.label){case 0:return[4,r.ready];case 1:if(h.sent(),null==eM(r,tm))return[3,4];return n=t.bind,[4,createImageBitmap(eM(r,tm))];case 2:return s=[new(n.apply(t,[void 0,h.sent()]))],a=t.bind,[4,createImageBitmap(eM(r,tm))];case 3:return[2,s.concat([new(a.apply(t,[void 0,h.sent()]))])];case 4:for(u=0,o=-1;ueM(r,t_)[u].timestamp)){o=u;break}if(-1===o)throw Error("Not found frame by time");return l=eM(r,t_).slice(0,o).map(function(t){return new VideoFrame(t)}),c=eM(r,t_).slice(o).map(function(t){return new VideoFrame(t,{timestamp:t.timestamp-e})}),[2,[new t(l),new t(c)]]}})})()}},{key:"clone",value:function(){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:if(n.sent(),null!=eM(e,tm))return[3,2];return r=eM(e,t_).map(function(t){return t.clone()}),[3,4];case 2:return[4,createImageBitmap(eM(e,tm))];case 3:r=n.sent(),n.label=4;case 4:return[2,new t(r)]}})})()}},{key:"destroy",value:function(){var t;rw.info("ImgClip destroy"),null==(t=eM(this,tm))||t.close(),eM(this,t_).forEach(function(t){return t.close()})}}]),t}();tp=new WeakMap,tm=new WeakMap,t_=new WeakMap,ty=new WeakSet,y=(0,ey._)(function(t,e){var r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:return r=[this,t_],[4,rj(t,e)];case 1:if(ej.apply(void 0,r.concat([s.sent()])),null==(n=eM(this,t_)[0]))throw Error("No frame available in gif");return ej(this,tp,{duration:eM(this,t_).reduce(function(t,e){var r;return t+(null!==(r=e.duration)&&void 0!==r?r:0)},0),width:n.codedWidth,height:n.codedHeight}),rw.info("ImgClip ready:",eM(this,tp)),[2]}})}),tg=function(t,e){return y.apply(this,arguments)};var il=iu,ic=/*#__PURE__*/function(){function t(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,eg._)(this,t),eN(this,tx),eL(this,"ready"),eN(this,tv,{duration:0,width:0,height:0}),eN(this,tb,new Float32Array),eN(this,tw,new Float32Array),eN(this,tS),eN(this,tU,0),eN(this,tT,0),ej(this,tS,(0,eE._)({loop:!1,volume:1},n)),this.ready=eG(this,tx,tE).call(this,e).then(function(){return{width:0,height:0,duration:n.loop?1/0:eM(r,tv).duration}})}return(0,ev._)(t,[{key:"meta",get:function(){return(0,eU._)((0,eE._)({},eM(this,tv)),{sampleRate:r$.sampleRate,chanCount:2})}},{key:"getPCMData",value:function(){return[eM(this,tb),eM(this,tw)]}},{key:"tick",value:function(t){var e=this;return(0,ey._)(function(){var r,n,s,a;return(0,eB._)(this,function(o){return!eM(e,tS).loop&&t>=eM(e,tv).duration?[2,{audio:[],state:"done"}]:(r=t-eM(e,tU),t3e6)?[2,(ej(e,tU,t),ej(e,tT,Math.ceil(eM(e,tU)/1e6*r$.sampleRate)),{audio:[new Float32Array(0),new Float32Array(0)],state:"success"})]:(ej(e,tU,t),n=Math.ceil(r/1e6*r$.sampleRate),s=eM(e,tT)+n,a=eM(e,tS).loop?[rX(eM(e,tb),eM(e,tT),s),rX(eM(e,tw),eM(e,tT),s)]:[eM(e,tb).slice(eM(e,tT),s),eM(e,tw).slice(eM(e,tT),s)],[2,(ej(e,tT,s),{audio:a,state:"success"})])})})()}},{key:"split",value:function(e){var r=this;return(0,ey._)(function(){var n;return(0,eB._)(this,function(s){switch(s.label){case 0:return[4,r.ready];case 1:return s.sent(),n=Math.ceil(e/1e6*r$.sampleRate),[2,[new t(r.getPCMData().map(function(t){return t.slice(0,n)}),eM(r,tS)),new t(r.getPCMData().map(function(t){return t.slice(n)}),eM(r,tS))]]}})})()}},{key:"clone",value:function(){var e=this;return(0,ey._)(function(){var r;return(0,eB._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:return n.sent(),[4,(r=new t(e.getPCMData(),eM(e,tS))).ready];case 2:return[2,(n.sent(),r)]}})})()}},{key:"destroy",value:function(){ej(this,tb,new Float32Array(0)),ej(this,tw,new Float32Array(0)),rw.info("---- audioclip destroy ----")}}]),t}();tv=new WeakMap,tb=new WeakMap,tw=new WeakMap,tS=new WeakMap,tx=new WeakSet,g=(0,ey._)(function(t){var e,r,n,s,a,o,u,l,c,h,f,d;return(0,eB._)(this,function(p){switch(p.label){case 0:if(null==ic.ctx&&(ic.ctx=new AudioContext({sampleRate:r$.sampleRate})),e=performance.now(),!(t instanceof ReadableStream))return[3,2];return[4,function(t,e){return im.apply(this,arguments)}(t,ic.ctx)];case 1:return n=p.sent(),[3,3];case 2:n=t,p.label=3;case 3:if(r=n,rw.info("Audio clip decoded complete:",performance.now()-e),s=eM(this,tS).volume,a=!0,o=!1,u=void 0,1!==s)try{for(l=r[Symbol.iterator]();!(a=(c=l.next()).done);a=!0)for(f=0,h=c.value;f0}).map(function(t){return{lineStr:t,match:t.match(/(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/)}}).filter(function(t,e,r){var n,s=t.lineStr;return!(/^\d+$/.test(s)&&(null==(n=r[e+1])?void 0:n.match)!=null)}).reduce(function(t,e){var r=e.lineStr,n=e.match;if(null==n){var s=t.at(-1);if(null==s)return t;s.text+=0===s.text.length?r:"\n".concat(r)}else t.push({start:ib(n[1]),end:ib(n[2]),text:""});return t},[]).map(function(t){return{start:1e6*t.start,end:1e6*t.end,text:t.text}})),0===eM(this,tB).length)throw Error("No subtitles content");ej(this,tR,Object.assign(eM(this,tR),r)),ej(this,tO,null==r.textBgColor?0:(null!==(s=r.fontSize)&&void 0!==s?s:50)*.2);var n,s,a,o=eM(this,tR),u=o.fontSize,l=o.fontFamily,c=o.videoWidth,h=o.videoHeight,f=o.letterSpacing;ej(this,tL,u+2*eM(this,tO)),ej(this,tF,new OffscreenCanvas(c,h)),ej(this,tD,eM(this,tF).getContext("2d")),eM(this,tD).font="".concat(u,"px ").concat(l),eM(this,tD).textAlign="center",eM(this,tD).textBaseline="top",eM(this,tD).letterSpacing=null!=f?f:"0px",ej(this,tP,{width:c,height:h,duration:null!==(a=null==(n=eM(this,tB).at(-1))?void 0:n.end)&&void 0!==a?a:0}),this.ready=Promise.resolve(this.meta)}return(0,ev._)(t,[{key:"meta",get:function(){return(0,eE._)({},eM(this,tP))}},{key:"tick",value:function(t){var e=this;return(0,ey._)(function(){var r,n,s,a,o,u,l,c;return(0,eB._)(this,function(h){if(null!=eM(e,tz)&&t>=eM(e,tz).timestamp&&t<=eM(e,tz).timestamp+(null!==(s=eM(e,tz).duration)&&void 0!==s?s:0))return[2,{video:eM(e,tz).clone(),state:"success"}];for(a=0;a(u=null!==(o=eM(e,tB)[a])&&void 0!==o?o:eM(e,tB).at(-1)).end?[2,{state:"done"}]:teM(r,tB)[s].start)){n=s;break}if(-1===n)throw Error("Not found subtitle by time");return o=(a=eM(r,tB).slice(0,n).map(function(t){return(0,eE._)({},t)})).at(-1),u=null,null!=o&&o.end>e&&(u={start:0,end:o.end-e,text:o.text},o.end=e),l=eM(r,tB).slice(n).map(function(t){return(0,eU._)((0,eE._)({},t),{start:t.start-e,end:t.end-e})}),[2,(null!=u&&l.unshift(u),[new t(a,eM(r,tR)),new t(l,eM(r,tR))])]}})})()}},{key:"clone",value:function(){var e=this;return(0,ey._)(function(){return(0,eB._)(this,function(r){return[2,new t(eM(e,tB).slice(0),eM(e,tR))]})})()}},{key:"destroy",value:function(){var t;null==(t=eM(this,tz))||t.close()}}]),t}();tB=new WeakMap,tP=new WeakMap,tR=new WeakMap,tF=new WeakMap,tD=new WeakMap,tz=new WeakMap,tL=new WeakMap,tO=new WeakMap,tM=new WeakSet,tN=function(t){var e=t.split("\n").reverse().map(function(t){return t.trim()}),r=eM(this,tF),n=r.width,s=r.height,a=eM(this,tR),o=a.color,u=a.fontSize,l=a.textBgColor,c=a.textShadow,h=a.strokeStyle,f=a.lineWidth,d=a.lineCap,p=a.lineJoin,m=a.bottomOffset,_=eM(this,tD);_.clearRect(0,0,n,s),_.globalAlpha=.6;var y=m,g=!0,v=!1,b=void 0;try{for(var w,S=e[Symbol.iterator]();!(g=(w=S.next()).done);g=!0){var x=w.value,E=_.measureText(x),U=n/2;null!=l&&(_.shadowOffsetX=0,_.shadowOffsetY=0,_.shadowBlur=0,_.fillStyle=l,_.globalAlpha=.5,_.fillRect(U-E.actualBoundingBoxLeft-eM(this,tO),s-y-eM(this,tL),E.width+2*eM(this,tO),eM(this,tL))),_.shadowColor=c.color,_.shadowOffsetX=c.offsetX,_.shadowOffsetY=c.offsetY,_.shadowBlur=c.blur,_.globalAlpha=1,null!=h&&(_.lineWidth=null!=f?f:u/6,null!=d&&(_.lineCap=d),null!=p&&(_.lineJoin=p),_.strokeStyle=h,_.strokeText(x,U,s-y-eM(this,tL)+eM(this,tO))),_.fillStyle=o,_.fillText(x,U,s-y-eM(this,tL)+eM(this,tO)),y+=eM(this,tL)+.2*u}}catch(t){v=!0,b=t}finally{try{g||null==S.return||S.return()}finally{if(v)throw b}}};var iv=ig;function ib(t){var e=t.match(/(\d{2}):(\d{2}):(\d{2}),(\d{3})/);if(null==e)throw Error("time format error: ".concat(t));return 3600*Number(e[1])+60*Number(e[2])+Number(e[3])+Number(e[4])/1e3}var iw=/*#__PURE__*/function(){function t(){var e=this,r=this;(0,eg._)(this,t),eN(this,tj,/* @__PURE__ */new Map),eL(this,"on",function(t,r){var n,s=null!==(n=eM(e,tj).get(t))&&void 0!==n?n:/* @__PURE__ */new Set;return s.add(r),eM(e,tj).has(t)||eM(e,tj).set(t,s),function(){s.delete(r),0===s.size&&eM(e,tj).delete(t)}}),eL(this,"once",function(t,r){var n=e.on(t,function(){for(var t=arguments.length,e=Array(t),s=0;s1?e-1:0),s=1;s0&&a.is_sync)break;e.addSample(s,a.data,a),r=a.cts+a.duration}return t.splice(0,n),r}(r);f>c&&(c=f)}var d=n[0];null!=d&&d.cts-c<1e4&&(l=t,h())}}}var f=rA(h,15),d=iI(t,function(t,e){return u("encoder0",t,e)}),p=iI(t,function(t,e){return u("encoder1",t,e)}),m=0;return{get encodeQueueSize(){return d.encodeQueueSize+p.encodeQueueSize},encode:function(t,e){e.keyFrame&&(m+=1),(m%2==0?d:p).encode(t,e)},flush:/*#__PURE__*/(0,ey._)(function(){var t,e,r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:if(t=Promise.all,"configured"!==d.state)return[3,2];return[4,d.flush()];case 1:return e=s.sent(),[3,3];case 2:e=null,s.label=3;case 3:if(r=[e],"configured"!==p.state)return[3,5];return[4,p.flush()];case 4:return n=s.sent(),[3,6];case 5:n=null,s.label=6;case 6:return[4,t.apply(Promise,[r.concat([n])])];case 7:return s.sent(),f(),h(),[2]}})}),close:function(){"configured"===d.state&&d.close(),"configured"===p.state&&p.close()}}}(t.video,e,r):null,u=null!=t.audio?function(t,e,r){var n={timescale:1e6,samplerate:t.sampleRate,channel_count:t.channelCount,hdlr:"soun",type:"aac"===t.codec?"mp4a":"Opus",name:"Track created with WebAV"},s=-1,a=[],o=!1;r.once("VideoReady",function(){o=!0,a.forEach(function(t){var r=iC(t);e.addSample(s,r.data,r)}),a=[]});var u=new AudioEncoder({error:rw.error,output:function(t,u){var l;if(-1===s){var c,h,f,d=null==(l=u.decoderConfig)?void 0:l.description;s=e.addTrack((0,eU._)((0,eE._)({},n),{description:null==d?void 0:(h=new Uint8Array([0,0,0,0,3,23+(c=d.byteLength),0,2,0,4,18+c,64,21,0,0,0,0,0,0,0,0,0,0,0,5,c].concat((0,eI._)(new Uint8Array(d instanceof ArrayBuffer?d:d.buffer)),[6,1,2])),(f=new rJ.BoxParser.esdsBox(h.byteLength)).hdr_size=0,f.parse(new rJ.DataStream(h,0,rJ.DataStream.BIG_ENDIAN)),f)})),r.emit("AudioReady"),rw.info("AudioEncoder, audio track ready, trackId:",s)}if(o){var p=iC(t);e.addSample(s,p.data,p)}else a.push(t)}});return u.configure({codec:"aac"===t.codec?r$.codec:"opus",sampleRate:t.sampleRate,numberOfChannels:t.channelCount,bitrate:128e3}),u}(t.audio,e,r):null;return null==t.video&&r.emit("VideoReady"),null==t.audio&&r.emit("AudioReady"),{encodeVideo:function(t,e){null==o||o.encode(t,e),t.close()},encodeAudio:function(t){null!=u&&(u.encode(t),t.close())},getEncodeQueueSize:function(){var t,e;return null!==(e=null!==(t=null==o?void 0:o.encodeQueueSize)&&void 0!==t?t:null==u?void 0:u.encodeQueueSize)&&void 0!==e?e:0},flush:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:return[4,Promise.all([null==o?void 0:o.flush(),(null==u?void 0:u.state)==="configured"?u.flush():null])];case 1:return t.sent(),[2]}})}),close:function(){r.destroy(),null==o||o.close(),(null==u?void 0:u.state)==="configured"&&u.close()},mp4file:e}}function iI(t,e){var r=new VideoEncoder({error:rw.error,output:e});return r.configure({codec:t.codec,framerate:t.expectFPS,hardwareAcceleration:t.__unsafe_hardwareAcceleration__,bitrate:t.bitrate,width:t.width,height:t.height,alpha:"discard",avc:{format:"avc"}}),r}function ik(t,e,r){var n=0,s=0,a=t.boxes,o=!1,u=function(){if(!o){if(null==a.find(function(t){return"moof"===t.type}))return null;o=!0}if(s>=a.length)return null;var e=new rJ.DataStream;e.endianness=rJ.DataStream.BIG_ENDIAN;var r=s;try{for(;r0)return!0;var s=r.findIndex(function(t){return"moov"===t.type});if(-1===s)return!1;if(u=r.slice(0,s+1),e=s+1,0===n.length)for(var a=1;;a+=1){var o=t.getTrackById(a);if(null==o)break;n.push({track:o,id:a})}return!0}var c=0,h=rm(),f=null,d=(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:return[4,h.createWriter()];case 1:return f=t.sent(),c=self.setInterval(function(){l()&&a()},100),[2]}})})(),p=!1;return/*#__PURE__*/(0,ey._)(function(){var e,r,n;return(0,eB._)(this,function(o){switch(o.label){case 0:if(p)throw Error("File exported");return p=!0,[4,d];case 1:if(o.sent(),clearInterval(c),!l()||null==f)return[2,null];return t.flush(),[4,a()];case 2:return o.sent(),[4,null==f?void 0:f.close()];case 3:if(o.sent(),null==(e=u.find(function(t){return"moov"===t.type})))return[2,null];return e.mvhd.duration=s,r=rm(),n=m(u,0),[4,rn(r,n)];case 4:return o.sent(),[4,rn(r,h,{overwrite:!1})];case 5:return o.sent(),[4,r.stream()];case 6:return[2,o.sent()]}})});function m(t,e){if(e>=t.length)return null;var r=new rJ.DataStream;r.endianness=rJ.DataStream.BIG_ENDIAN;for(var n=e;n-1},e.trigger=function(t){var e=this.listeners[t];if(e){if(2==arguments.length)for(var r=e.length,n=0;n-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)}}]),r}(iL),ij=function(t){var e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),r={};return e[1]&&(r.length=parseInt(e[1],10)),e[2]&&(r.offset=parseInt(e[2],10)),r},iG=function(t){var e={};if(!t)return e;for(var r,n=t.split(RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),s=n.length;s--;)""!==n[s]&&((r=/([^=]*)=(.*)/.exec(n[s]).slice(1))[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),e[r[0]]=r[1]);return e},iY=/*#__PURE__*/function(t){(0,ex._)(r,t);var e=(0,eC._)(r);function r(){var t;return(0,eg._)(this,r),(t=e.call(this)).customParsers=[],t.tagMappers=[],(0,eT._)(t)}return(0,ev._)(r,[{key:"push",value:function(t){var e,r,n=this;if(0!==(t=t.trim()).length){if("#"!==t[0]){this.trigger("data",{type:"uri",uri:t});return}this.tagMappers.reduce(function(e,r){var n=r(t);return n===t?e:e.concat([n])},[t]).forEach(function(t){for(var s=0;s0&&(u.duration=t.duration),0===t.duration&&(u.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(!t.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if("NONE"===t.attributes.METHOD){s=null;return}if(!t.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if("com.apple.streamingkeydelivery"===t.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:t.attributes};return}if("com.microsoft.playready"===t.attributes.KEYFORMAT){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:t.attributes.URI};return}if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT){if(-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2))){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:function(t){for(var e=iM.atob?iM.atob(t):eF.from(t,"base64").toString("binary"),r=new Uint8Array(e.length),n=0;n(0,ek._)(t.attributes.IV)&&(s.iv=t.attributes.IV)},"media-sequence":function(){if(!isFinite(t.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number});return}this.manifest.mediaSequence=t.number},"discontinuity-sequence":function(){if(!isFinite(t.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number});return}this.manifest.discontinuitySequence=t.number,f=t.number},"playlist-type":function(){if(!/VOD|EVENT/.test(t.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist});return}this.manifest.playlistType=t.playlistType},map:function(){n={},t.uri&&(n.uri=t.uri),t.byterange&&(n.byterange=t.byterange),s&&(n.key=s)},"stream-inf":function(){if(this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||h,!t.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}u.attributes||(u.attributes={}),iO(u.attributes,t.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var n=this.manifest.mediaGroups[t.attributes.TYPE];n[t.attributes["GROUP-ID"]]=n[t.attributes["GROUP-ID"]]||{},e=n[t.attributes["GROUP-ID"]],(r={default:/yes/i.test(t.attributes.DEFAULT)}).default?r.autoselect=!0:r.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(r.language=t.attributes.LANGUAGE),t.attributes.URI&&(r.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(r.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(r.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(r.forced=/yes/i.test(t.attributes.FORCED)),e[t.attributes.NAME]=r},discontinuity:function(){f+=1,u.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){(0,ek._)(this.manifest.dateTimeString)>"u"&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),u.dateTimeString=t.dateTimeString,u.dateTimeObject=t.dateTimeObject;var e=this.lastProgramDateTime;this.lastProgramDateTime=new Date(t.dateTimeString).getTime(),null===e&&this.manifest.segments.reduceRight(function(t,e){return e.programDateTime=t-1e3*e.duration,e.programDateTime},this.lastProgramDateTime)},targetduration:function(){if(!isFinite(t.duration)||t.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration});return}this.manifest.targetDuration=t.duration,iV.call(this,this.manifest)},start:function(){if(!t.attributes||isNaN(t.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}},"cue-out":function(){u.cueOut=t.data},"cue-out-cont":function(){u.cueOutCont=t.data},"cue-in":function(){u.cueIn=t.data},skip:function(){this.manifest.skip=iW(t.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",t.attributes,["SKIPPED-SEGMENTS"])},part:function(){var e=this;l=!0;var r=this.manifest.segments.length,n=iW(t.attributes);u.parts=u.parts||[],u.parts.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=p),p=n.byterange.offset+n.byterange.length);var s=u.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #".concat(s," for segment #").concat(r),t.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(t,r){t.hasOwnProperty("lastPart")||e.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #".concat(r," lacks required attribute(s): LAST-PART")})})},"server-control":function(){var e=this.manifest.serverControl=iW(t.attributes);e.hasOwnProperty("canBlockReload")||(e.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),iV.call(this,this.manifest),e.canSkipDateranges&&!e.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var e=this.manifest.segments.length,r=iW(t.attributes),n=r.type&&"PART"===r.type;u.preloadHints=u.preloadHints||[],u.preloadHints.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=n?p:0,n&&(p=r.byterange.offset+r.byterange.length)));var s=u.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #".concat(s," for segment #").concat(e),t.attributes,["TYPE","URI"]),r.type)for(var a=0;a1&&void 0!==u[1]?u[1]:10,n=(r=new iH).push,[4,fetch(t)];case 1:return[4,h.sent().text()];case 2:return n.apply(r,[h.sent()]),r.end(),s=r.manifest.segments.reduce(function(t,e){var r;return t[e.map.uri]=null!==(r=t[e.map.uri])&&void 0!==r?r:[],t[e.map.uri].push(e),t},{}),a=new URL(t,location.href),o={},[2,{load:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r={},n=0,o=0,u=!0,h=!1,f=void 0;try{for(var d,p=Object.entries(s)[Symbol.iterator]();!(u=(d=p.next()).done);u=!0){for(var m=(0,eA._)(d.value,2),_=m[0],y=m[1],g=0,v=[],b=-1,w=-1,S=0;St/1e6&&(b=S,n=(g-x.duration)*1e6),b>-1&&-1===w&&g>=e/1e6){w=S+1,o=1e6*g;break}}e>=1e6*g&&(w=y.length,o=1e6*g),w>b&&(v=v.concat(y.slice(b,w))),v.length>0&&(r[_]={actualStartTime:n,actualEndTime:o,segments:v})}}catch(t){h=!0,f=t}finally{try{u||null==p.return||p.return()}finally{if(h)throw f}}return 0===Object.keys(r).length?null:Object.entries(r).map(function(t){var e,r,n=(0,eA._)(t,2),s=n[0],o=n[1],u=o.actualStartTime,h=o.actualEndTime,f=o.segments,d=0,p=new iw;return{actualStartTime:u,actualEndTime:h,on:p.on,stream:new ReadableStream({start:(e=(0,ey._)(function(t){var e,r;return(0,eB._)(this,function(n){switch(n.label){case 0:return function(t,e,r){l.apply(this,arguments)}(f,t,p),e=t.enqueue,r=Uint8Array.bind,[4,fetch(new URL(s,a).href)];case 1:return[4,n.sent().arrayBuffer()];case 2:return e.apply(t,[new(r.apply(Uint8Array,[void 0,n.sent()]))]),[2]}})}),function(t){return e.apply(this,arguments)}),pull:(r=(0,ey._)(function(t){var e,r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:return e=new URL(f[d].uri,a).href,r=t.enqueue,n=Uint8Array.bind,[4,function(t){return c.apply(this,arguments)}(e)];case 1:return r.apply(t,[new(n.apply(Uint8Array,[void 0,s.sent()]))]),(d+=1)>=f.length&&(t.close(),p.destroy()),[2]}})}),function(t){return r.apply(this,arguments)})})}})}}]}})})).apply(this,arguments)}var iK=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1],iq=[0,1,0,0,1,0,1,0,1,1,0,1];function iQ(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS)){var s=t.getShaderInfoLog(n);throw t.deleteShader(n),Error(null!=s?s:"An error occurred compiling the shaders")}return n}var iJ=function(t){var e,r=null,n=null,s=t.keyColor,a=null;return e=(0,ey._)(function(e){var o,u,l;return(0,eB._)(this,function(c){var h,f,d,p,m;return((null==r||null==n||null==a)&&(null==s&&((h=new OffscreenCanvas(1,1).getContext("2d")).drawImage(e,0,0),f=h.getImageData(0,0,1,1),s=[(d=(0,eA._)(f.data,3))[0],d[1],d[2]]),r=(o=function(t){var e="document"in globalThis?globalThis.document.createElement("canvas"):new OffscreenCanvas(t.width,t.height);e.width=t.width,e.height=t.height;var r=e.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0});if(null==r)throw Error("Cant create gl context");var n=function(t,e,r){var n,s=iQ(t,t.VERTEX_SHADER,e),a=iQ(t,t.FRAGMENT_SHADER,r),o=t.createProgram();if(t.attachShader(o,s),t.attachShader(o,a),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))throw Error(null!==(n=t.getProgramInfoLog(o))&&void 0!==n?n:"Unable to initialize the shader program");return o}(r,"#version 300 es\n layout (location = 0) in vec4 a_position;\n layout (location = 1) in vec2 a_texCoord;\n out vec2 v_texCoord;\n void main () {\n gl_Position = a_position;\n v_texCoord = a_texCoord;\n }\n","#version 300 es\nprecision mediump float;\nout vec4 FragColor;\nin vec2 v_texCoord;\n\nuniform sampler2D frameTexture;\nuniform vec3 keyColor;\n\n// 色度的相似度计算\nuniform float similarity;\n// 透明度的平滑度计算\nuniform float smoothness;\n// 降低绿幕饱和度,提高抠图准确度\nuniform float spill;\n\nvec2 RGBtoUV(vec3 rgb) {\n return vec2(\n rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5,\n rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5\n );\n}\n\nvoid main() {\n // 获取当前像素的rgba值\n vec4 rgba = texture(frameTexture, v_texCoord);\n // 计算当前像素与绿幕像素的色度差值\n vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor);\n // 计算当前像素与绿幕像素的色度距离(向量长度), 越相像则色度距离越小\n float chromaDist = sqrt(dot(chromaVec, chromaVec));\n // 设置了一个相似度阈值,baseMask为负,则表明是绿幕,为正则表明不是绿幕\n float baseMask = chromaDist - similarity;\n // 如果baseMask为负数,fullMask等于0;baseMask为正数,越大,则透明度越低\n float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5);\n rgba.a = fullMask; // 设置透明度\n // 如果baseMask为负数,spillVal等于0;baseMask为整数,越小,饱和度越低\n float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5);\n float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.); // 计算当前像素的灰度值\n rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal);\n FragColor = rgba;\n}\n");r.useProgram(n),r.uniform3fv(r.getUniformLocation(n,"keyColor"),t.keyColor.map(function(t){return t/255})),r.uniform1f(r.getUniformLocation(n,"similarity"),t.similarity),r.uniform1f(r.getUniformLocation(n,"smoothness"),t.smoothness),r.uniform1f(r.getUniformLocation(n,"spill"),t.spill);var s=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,s),r.bufferData(r.ARRAY_BUFFER,new Float32Array(iK),r.STATIC_DRAW);var a=r.getAttribLocation(n,"a_position");r.vertexAttribPointer(a,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(a);var o=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,o),r.bufferData(r.ARRAY_BUFFER,new Float32Array(iq),r.STATIC_DRAW);var u=r.getAttribLocation(n,"a_texCoord");return r.vertexAttribPointer(u,2,r.FLOAT,!1,2*Float32Array.BYTES_PER_ELEMENT,0),r.enableVertexAttribArray(u),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1),{cvs:e,gl:r}}((0,eE._)((0,eU._)((0,eE._)({},e instanceof VideoFrame?{width:e.codedWidth,height:e.codedHeight}:{width:e.width,height:e.height}),{keyColor:s}),t))).cvs,a=function(t){var e=t.createTexture();if(null==e)throw Error("Create WebGL texture error");t.bindTexture(t.TEXTURE_2D,e);var r=t.RGBA,n=t.RGBA,s=t.UNSIGNED_BYTE,a=new Uint8Array([0,0,255,255]);return t.texImage2D(t.TEXTURE_2D,0,r,1,1,0,n,s,a),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}(n=o.gl)),p=n,m=a,p.bindTexture(p.TEXTURE_2D,m),p.texImage2D(p.TEXTURE_2D,0,p.RGBA,p.RGBA,p.UNSIGNED_BYTE,e),p.drawArrays(p.TRIANGLES,0,6),null!=globalThis.VideoFrame&&e instanceof globalThis.VideoFrame)?(l=new VideoFrame(r,{alpha:"keep",timestamp:e.timestamp,duration:null!==(u=e.duration)&&void 0!==u?u:void 0}),[2,(e.close(),l)]):[2,createImageBitmap(r,{imageOrientation:e instanceof ImageBitmap?"flipY":"none"})]})}),function(t){return e.apply(this,arguments)}},i$=/*#__PURE__*/function(){function t(e,r,n,s,a){(0,eg._)(this,t),eN(this,tK),eN(this,tY,new iw),eL(this,"on",eM(this,tY).on),eN(this,tW,0),eN(this,tV,0),eN(this,tH,0),eN(this,tX,0),eN(this,tZ,0),eL(this,"master",null),eL(this,"fixedAspectRatio",!1),this.x=null!=e?e:0,this.y=null!=r?r:0,this.w=null!=n?n:0,this.h=null!=s?s:0,this.master=null!=a?a:null}return(0,ev._)(t,[{key:"x",get:function(){return eM(this,tW)},set:function(t){eG(this,tK,tq).call(this,"x",t)}},{key:"y",get:function(){return eM(this,tV)},set:function(t){eG(this,tK,tq).call(this,"y",t)}},{key:"w",get:function(){return eM(this,tH)},set:function(t){eG(this,tK,tq).call(this,"w",t)}},{key:"h",get:function(){return eM(this,tX)},set:function(t){eG(this,tK,tq).call(this,"h",t)}},{key:"angle",get:function(){return eM(this,tZ)},set:function(t){eG(this,tK,tq).call(this,"angle",t)}},{key:"center",get:function(){var t=this.x,e=this.y;return{x:t+this.w/2,y:e+this.h/2}}},{key:"ctrls",get:function(){var e=this.w,r=this.h,n=t.CTRL_SIZE,s=n/2,a=e/2,o=r/2,u=1.5*n,l=u/2;return(0,eU._)((0,eE._)({},this.fixedAspectRatio?{}:{t:new t(-s,-o-s,n,n,this),b:new t(-s,o-s,n,n,this),l:new t(-a-s,-s,n,n,this),r:new t(a-s,-s,n,n,this)}),{lt:new t(-a-s,-o-s,n,n,this),lb:new t(-a-s,o-s,n,n,this),rt:new t(a-s,-o-s,n,n,this),rb:new t(a-s,o-s,n,n,this),rotate:new t(-l,-o-2*n-l,u,u,this)})}},{key:"clone",value:function(){var e=new t(this.x,this.y,this.w,this.h,this.master);return e.angle=this.angle,e.fixedAspectRatio=this.fixedAspectRatio,e}},{key:"checkHit",value:function(t,e){var r,n,s=this.angle,a=this.center,o=this.x,u=this.y,l=this.w,c=this.h,h=this.master,f=null!==(r=null==h?void 0:h.center)&&void 0!==r?r:a,d=null!==(n=null==h?void 0:h.angle)&&void 0!==n?n:s;null==h&&(o-=f.x,u-=f.y);var p=t-f.x,m=e-f.y,_=p,y=m;return 0!==d&&(_=p*Math.cos(d)+m*Math.sin(d),y=m*Math.cos(d)-p*Math.sin(d)),!(_o+l||yu+c)}}]),t}();tY=new WeakMap,tW=new WeakMap,tV=new WeakMap,tH=new WeakMap,tX=new WeakMap,tZ=new WeakMap,tK=new WeakSet,tq=function(t,e){var r=this[t]!==e;switch(t){case"x":ej(this,tW,e);break;case"y":ej(this,tV,e);break;case"w":ej(this,tH,e);break;case"h":ej(this,tX,e);break;case"angle":ej(this,tZ,e)}r&&eM(this,tY).emit("propsChange",(0,eb._)({},t,e))},eL(i$,"CTRL_SIZE",16),eL(i$,"CTRL_KEYS",["t","b","l","r","lt","lb","rt","rb","rotate"]);var i0=i$,i1=/*#__PURE__*/function(){function t(){var e=this;(0,eg._)(this,t),eL(this,"rect",new i0),eL(this,"time",{offset:0,duration:0}),eL(this,"visible",!0),eN(this,tQ,new iw),eL(this,"on",eM(this,tQ).on),eN(this,tJ,0),eL(this,"opacity",1),eL(this,"flip",null),eN(this,t$,null),eN(this,t0,null),eL(this,"ready",Promise.resolve()),this.rect.on("propsChange",function(t){eM(e,tQ).emit("propsChange",{rect:t})})}return(0,ev._)(t,[{key:"zIndex",get:function(){return eM(this,tJ)},set:function(t){var e=eM(this,tJ)!==t;ej(this,tJ,t),e&&eM(this,tQ).emit("propsChange",{zIndex:t})}},{key:"_render",value:function(t){var e=this.rect,r=e.center,n=e.angle;t.setTransform("horizontal"===this.flip?-1:1,0,0,"vertical"===this.flip?-1:1,r.x,r.y),t.rotate((null==this.flip?1:-1)*n),t.globalAlpha=this.opacity}},{key:"setAnimation",value:function(t,e){var r,n;ej(this,t$,Object.entries(t).map(function(t){var e,r=(0,eA._)(t,2),n=r[0],s=r[1],a=null!==(e=({from:0,to:100})[n])&&void 0!==e?e:Number(n.slice(0,-1));if(isNaN(a)||a>100||a<0)throw Error("keyFrame must between 0~100");return[a/100,s]})),ej(this,t0,Object.assign({},eM(this,t0),{duration:1e6*e.duration,delay:(null!==(r=e.delay)&&void 0!==r?r:0)*1e6,iterCount:null!==(n=e.iterCount)&&void 0!==n?n:1/0}))}},{key:"animate",value:function(t){if(null!=eM(this,t$)&&null!=eM(this,t0)&&!(t=r.iterCount)return{};var n=t%r.duration,s=t===r.duration?1:n/r.duration,a=e.findIndex(function(t){return t[0]>=s});if(-1===a)return{};var o=e[a-1],u=e[a],l=u[1];if(null==o)return l;var c=o[1],h={},f=(s-o[0])/(u[0]-o[0]);for(var d in l)null!=c[d]&&(h[d]=(l[d]-c[d])*f+c[d]);return h}(t,eM(this,t$),eM(this,t0));for(var r in e)switch(r){case"opacity":this.opacity=e[r];break;case"x":case"y":case"w":case"h":case"angle":this.rect[r]=e[r]}}}},{key:"copyStateTo",value:function(t){ej(t,t$,eM(this,t$)),ej(t,t0,eM(this,t0)),t.visible=this.visible,t.zIndex=this.zIndex,t.opacity=this.opacity,t.flip=this.flip,t.rect=this.rect.clone(),t.time=(0,eE._)({},this.time)}},{key:"destroy",value:function(){eM(this,tQ).destroy()}}]),t}();tQ=new WeakMap,tJ=new WeakMap,t$=new WeakMap,t0=new WeakMap;var i2=/*#__PURE__*/function(t){(0,ex._)(r,t);var e=(0,eC._)(r);function r(t){var n;return(0,eg._)(this,r),n=e.call(this),eN((0,em._)(n),t1),eN((0,em._)(n),t2,null),eN((0,em._)(n),t3,!1),ej((0,em._)(n),t1,t),n.ready=t.ready.then(function(t){var e=t.width,r=t.height,s=t.duration;n.rect.w=0===n.rect.w?e:n.rect.w,n.rect.h=0===n.rect.h?r:n.rect.h,n.time.duration=0===n.time.duration?s:n.time.duration}),n}return(0,ev._)(r,[{key:"offscreenRender",value:function(t,e){var n=this,s=this;return(0,ey._)(function(){var a,o,u,l,c,h,f,d;return(0,eB._)(this,function(p){switch(p.label){case 0:return s.animate(e),(0,ew._)((0,eS._)(r.prototype),"_render",n).call(s,t),u=(o=s.rect).w,l=o.h,[4,eM(s,t1).tick(e)];case 1:if(h=(c=p.sent()).video,f=c.audio,"done"===c.state)return[2,{audio:null!=f?f:[],done:!0}];return[2,(null!=(d=null!=h?h:eM(s,t2))&&t.drawImage(d,-u/2,-l/2,u,l),null!=h&&(null==(a=eM(s,t2))||a.close(),ej(s,t2,h)),{audio:null!=f?f:[],done:!1})]}})})()}},{key:"clone",value:function(){var t=this;return(0,ey._)(function(){var e,n;return(0,eB._)(this,function(s){switch(s.label){case 0:return n=r.bind,[4,eM(t,t1).clone()];case 1:return[4,(e=new(n.apply(r,[void 0,s.sent()]))).ready];case 2:return[2,(s.sent(),t.copyStateTo(e),e)]}})})()}},{key:"destroy",value:function(){var t;eM(this,t3)||(ej(this,t3,!0),rw.info("OffscreenSprite destroy"),(0,ew._)((0,eS._)(r.prototype),"destroy",this).call(this),null==(t=eM(this,t2))||t.close(),ej(this,t2,null),eM(this,t1).destroy())}}]),r}(i1);t1=new WeakMap,t2=new WeakMap,t3=new WeakMap;var i3=i2,i4=/*#__PURE__*/function(t){(0,ex._)(r,t);var e=(0,eC._)(r);function r(t){var n;return(0,eg._)(this,r),n=e.call(this),eN((0,em._)(n),t9),eN((0,em._)(n),t4),eN((0,em._)(n),t6,null),eN((0,em._)(n),t8,[]),eN((0,em._)(n),t5,!1),eN((0,em._)(n),et,-1),eN((0,em._)(n),ee,!1),ej((0,em._)(n),t4,t),n.ready=t.ready.then(function(t){var e=t.width,r=t.height,s=t.duration;n.rect.w=0===n.rect.w?e:n.rect.w,n.rect.h=0===n.rect.h?r:n.rect.h,n.time.duration=0===n.time.duration?s:n.time.duration}),n}return(0,ev._)(r,[{key:"getClip",value:function(){return eM(this,t4)}},{key:"preFrame",value:function(t){eG(this,t9,t7).call(this,t)}},{key:"render",value:function(t,e){this.animate(e),(0,ew._)((0,eS._)(r.prototype),"_render",this).call(this,t);var n=this.rect,s=n.w,a=n.h;eM(this,et)!==e&&eG(this,t9,t7).call(this,e),ej(this,et,e);var o=eM(this,t8);ej(this,t8,[]);var u=eM(this,t6);return null!=u&&t.drawImage(u,-s/2,-a/2,s,a),{audio:o}}},{key:"destroy",value:function(){var t;eM(this,ee)||(ej(this,ee,!0),rw.info("VisibleSprite destroy"),(0,ew._)((0,eS._)(r.prototype),"destroy",this).call(this),null==(t=eM(this,t6))||t.close(),ej(this,t6,null),eM(this,t4).destroy())}}]),r}(i1);t4=new WeakMap,t6=new WeakMap,t8=new WeakMap,t5=new WeakMap,t9=new WeakSet,t7=function(t){var e=this;eM(this,t5)||(ej(this,t5,!0),eM(this,t4).tick(t).then(function(t){var r,n=t.video,s=t.audio;null!=n&&(null==(r=eM(e,t6))||r.close(),ej(e,t6,null!=n?n:null)),ej(e,t8,null!=s?s:[])}).finally(function(){ej(e,t5,!1)}))},et=new WeakMap,ee=new WeakMap;var i6=0;function i8(t){return i5.apply(this,arguments)}function i5(){return(i5=(0,ey._)(function(t){return(0,eB._)(this,function(e){switch(e.label){case 0:if(!(t()>50))return[3,3];return[4,rH(15)];case 1:return e.sent(),[4,i8(t)];case 2:e.sent(),e.label=3;case 3:return[2]}})})).apply(this,arguments)}var i9=/*#__PURE__*/function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,eg._)(this,t),eN(this,eh),eN(this,er,rw.create("id:".concat(i6++,","))),eN(this,ei,!1),eN(this,en,[]),eN(this,es),eN(this,ea),eN(this,eo,null),eN(this,eu),eN(this,el),eN(this,ec,new iw),eL(this,"on",eM(this,ec).on);var r=e.width,n=void 0===r?0:r,s=e.height,a=void 0===s?0:s;ej(this,es,new OffscreenCanvas(n,a));var o=eM(this,es).getContext("2d",{alpha:!1});if(null==o)throw Error("Can not create 2d offscreen context");ej(this,ea,o),ej(this,eu,Object.assign({bgColor:"#000",width:0,height:0,videoCodec:"avc1.42E032",audio:!0,bitrate:5e6,metaDataTags:null},e)),ej(this,el,n*a>0)}return(0,ev._)(t,[{key:"addSprite",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,ey._)(function(){var n,s;return(0,eB._)(this,function(a){switch(a.label){case 0:return eM(r,er).info("Combinator add sprite",t),[4,t.clone()];case 1:return n=a.sent(),eM(r,er).info("Combinator add sprite ready",t),eM(r,en).push(Object.assign(n,{main:null!==(s=e.main)&&void 0!==s&&s,expired:!1})),eM(r,en).sort(function(t,e){return t.zIndex-e.zIndex}),[2]}})})()}},{key:"output",value:function(){var t,e=this;if(0===eM(this,en).length)throw Error("No sprite added");var r=eM(this,en).find(function(t){return t.main}),n=null!=r?r.time.offset+r.time.duration:(t=Math).max.apply(t,(0,eI._)(eM(this,en).map(function(t){return t.time.offset+t.time.duration})));if(n===1/0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of ImgClip, AudioCli");-1===n&&eM(this,er).warn("Unable to determine the end time, process value don't update"),eM(this,er).info("start combinate video, maxTime:".concat(n));var s=eG(this,eh,ef).call(this,n),a=performance.now(),o=this,u=eG(this,eh,ed).call(this,s,n,{onProgress:function(t){eM(e,er).debug("OutputProgress:",t),eM(e,ec).emit("OutputProgress",t)},onEnded:/*#__PURE__*/(0,ey._)(function(){return(0,eB._)(this,function(t){switch(t.label){case 0:return[4,s.flush()];case 1:return t.sent(),eM(o,er).info("===== output ended =====, cost:",performance.now()-a),eM(o,ec).emit("OutputProgress",1),o.destroy(),[2]}})}),onError:function(t){eM(e,ec).emit("error",t),h(t),e.destroy()}});ej(this,eo,function(){u(),s.close(),h()});var l=ik(s.mp4file,500,this.destroy),c=l.stream,h=l.stop;return c}},{key:"destroy",value:function(){var t;eM(this,ei)||(ej(this,ei,!0),null==(t=eM(this,eo))||t.call(this),eM(this,ec).destroy())}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{videoCodec:"avc1.42E032"};return(0,ey._)(function(){var e,r,n;return(0,eB._)(this,function(s){switch(s.label){case 0:if(!(n=null!=self.OffscreenCanvas&&null!=self.VideoEncoder&&null!=self.VideoDecoder&&null!=self.VideoFrame&&null!=self.AudioEncoder&&null!=self.AudioDecoder&&null!=self.AudioData))return[3,2];return[4,self.VideoEncoder.isConfigSupported({codec:t.videoCodec,width:1280,height:720})];case 1:n=null!==(e=s.sent().supported)&&void 0!==e&&e,s.label=2;case 2:if(!(r=n))return[3,4];return[4,self.AudioEncoder.isConfigSupported({codec:r$.codec,sampleRate:r$.sampleRate,numberOfChannels:r$.channelCount})];case 3:r=s.sent().supported,s.label=4;case 4:return[2,r]}})})()}}]),t}();er=new WeakMap,ei=new WeakMap,en=new WeakMap,es=new WeakMap,ea=new WeakMap,eo=new WeakMap,eu=new WeakMap,el=new WeakMap,ec=new WeakMap,eh=new WeakSet,ef=function(t){var e=eM(this,eu),r=e.width,n=e.height,s=e.videoCodec,a=e.bitrate,o=e.audio,u=e.metaDataTags;return iA({video:eM(this,el)?{width:r,height:n,expectFPS:30,codec:s,bitrate:a,__unsafe_hardwareAcceleration__:eM(this,eu).__unsafe_hardwareAcceleration__}:null,audio:!1===o?null:{codec:"aac",sampleRate:r$.sampleRate,channelCount:r$.channelCount},duration:t,metaDataTags:u})},ed=function(t,e,r){var n=this,s=r.onProgress,a=r.onEnded,o=r.onError,u=0,l=!1,c=null,h=this;(0,ey._)(function(){var r,n,s,o,f,p,m,_;return(0,eB._)(this,function(y){switch(y.label){case 0:r=function(){var r,s,_,y,g,v,b,w,S,x,E,U,T;return(0,eB._)(this,function(A){switch(A.label){case 0:if(null!=c)return[2,{v:void 0}];if(!(l||-1!==e&&m>e||0===eM(h,en).length))return[3,2];return d(),[4,a()];case 1:return A.sent(),[2,{v:void 0}];case 2:u=m/e,p.fillStyle=eM(h,eu).bgColor,p.fillRect(0,0,o,f),r=[],s=!0,_=!1,y=void 0,A.label=3;case 3:A.trys.push([3,10,11,12]),g=eM(h,en)[Symbol.iterator](),A.label=4;case 4:if((s=(v=g.next()).done)||(b=v.value,l))return[3,9];if(m0)||!(m>b.time.offset+b.time.duration))&&!x)return[3,8];if(!b.main)return[3,7];return d(),[4,a()];case 6:return A.sent(),[2,{v:void 0}];case 7:b.destroy(),b.expired=!0,A.label=8;case 8:return s=!0,[3,4];case 9:return[3,12];case 10:return E=A.sent(),_=!0,y=E,[3,12];case 11:try{s||null==g.return||g.return()}finally{if(_)throw y}return[7];case 12:var I,k,C;if(l)return[2,{v:void 0}];return!1!==eM(h,eu).audio&&(r.flat().every(function(t){return 0===t.length})?t.encodeAudio((I=m,C=Math.floor(33e3*(k=r$.sampleRate)/1e6),new AudioData({timestamp:I,numberOfChannels:r$.channelCount,numberOfFrames:C,sampleRate:k,format:"f32-planar",data:new Float32Array(2*C)}))):(U=rY(r),t.encodeAudio(new AudioData({timestamp:m,numberOfChannels:r$.channelCount,numberOfFrames:U.length/r$.channelCount,sampleRate:r$.sampleRate,format:"f32-planar",data:U})))),eM(h,el)&&(T=new VideoFrame(eM(h,es),{duration:33e3,timestamp:m}),t.encodeVideo(T,{keyFrame:n%150==0}),p.resetTransform(),p.clearRect(0,0,o,f),n+=1),m+=33e3,[4,i8(t.getEncodeQueueSize)];case 13:return A.sent(),[2]}})},n=0,o=(s=eM(h,es)).width,f=s.height,p=eM(h,ea),m=0,y.label=1;case 1:return[5,(0,eP._)(r())];case 2:if(_=y.sent(),"object"===(0,ek._)(_))return[2,_.v];y.label=3;case 3:return[3,1];case 4:return[2]}})})().catch(function(t){c=t,eM(n,er).error(t),d(),o(t)});var f=setInterval(function(){s(u)},500),d=function(){l||(l=!0,clearInterval(f),eM(n,en).forEach(function(t){return t.destroy()}))};return d}},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_async_iterator":"kdyGG","@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_define_property":"3NGsL","@swc/helpers/_/_get":"hMhPd","@swc/helpers/_/_get_prototype_of":"dAKgy","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_possible_constructor_return":"iVdhB","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_create_super":"86fte","@swc/helpers/_/_ts_generator":"6Xyd0","@swc/helpers/_/_ts_values":"1Y0br","718a311db185ef08":"gp9kd","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kdyGG:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t){var e,r,n,s=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);s--;){if(r&&null!=(e=t[r]))return e.call(t);if(n&&null!=(e=t[n]))return new a(e.call(t));r="@@asyncIterator",n="@@iterator"}throw TypeError("Object is not async iterable")}function a(t){function e(t){if(Object(t)!==t)return Promise.reject(TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then(function(t){return{value:t,done:e}})}return(a=function(t){this.s=t,this.n=t.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var r=this.s.return;return void 0===r?Promise.resolve({value:t,done:!0}):e(r.apply(this.s,arguments))},throw:function(t){var r=this.s.return;return void 0===r?Promise.reject(t):e(r.apply(this.s,arguments))}},new a(t)}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9iJMm":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function s(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=Array(e);r* @license MIT */var n=t("@swc/helpers/_/_type_of"),s=t("9c62938f1dccc73c"),a=t("aceacb6a4531a9d2"),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function u(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return f(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!l.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|_(t,e),n=u(r),s=n.write(t,e);return s!==r&&(n=n.slice(0,s)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(B(t,Uint8Array)){var e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,n._)(t)));if(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(B(t,SharedArrayBuffer)||t&&B(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var s=t.valueOf&&t.valueOf();if(null!=s&&s!==t)return l.from(s,e,r);var a=function(t){if(l.isBuffer(t)){var e,r=0|m(t.length),n=u(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?u(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===t?"undefined":(0,n._)(t)))}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return h(t),u(t<0?0:0|m(t))}function d(t){for(var e=t.length<0?0:0|m(t.length),r=u(e),n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function _(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===t?"undefined":(0,n._)(t)));var r=t.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===r)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(t).length;default:if(a)return s?-1:I(t).length;e=(""+e).toLowerCase(),a=!0}}function y(t,e,r){var n,a,o=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var s="",a=e;a2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(a=r=+r)!=a&&(r=s?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(s)return -1;r=t.length-1}else if(r<0){if(!s)return -1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,s);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?s?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,s);throw TypeError("val must be string, number or Buffer")}function b(t,e,r,n,s){var a,o=1,u=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;o=2,u/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(s){var h=-1;for(a=r;au&&(r=u-l),a=r;a>=0;a--){for(var f=!0,d=0;d239?4:c>223?3:c>191?2:1;if(s+f<=r)switch(f){case 1:c<128&&(h=c);break;case 2:(192&(a=t[s+1]))==128&&(l=(31&c)<<6|63&a)>127&&(h=l);break;case 3:a=t[s+1],o=t[s+2],(192&a)==128&&(192&o)==128&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:a=t[s+1],o=t[s+2],u=t[s+3],(192&a)==128&&(192&o)==128&&(192&u)==128&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&u)>65535&&l<1114112&&(h=l)}null===h?(h=65533,f=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),s+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function x(t,e,r,n,s,a){if(!l.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>s||et.length)throw RangeError("Index out of range")}function E(t,e,r,n,s,a){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function U(t,e,r,n,s){return e=+e,r>>>=0,s||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),a.write(t,e,r,n,23,4),r+4}function T(t,e,r,n,s){return e=+e,r>>>=0,s||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),a.write(t,e,r,n,52,8),r+8}r.Buffer=l,r.SlowBuffer=function(t){return+t!=t&&(t=0),l.alloc(+t)},r.INSPECT_MAX_BYTES=50,r.kMaxLength=2147483647,l.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,r){return(h(t),t<=0)?u(t):void 0!==e?"string"==typeof r?u(t).fill(e,r):u(t).fill(e):u(t)},l.allocUnsafe=function(t){return f(t)},l.allocUnsafeSlow=function(t){return f(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(B(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),B(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,s=0,a=Math.min(r,n);sn.length?l.from(a).copy(n,s):Uint8Array.prototype.set.call(n,a,s);else if(l.isBuffer(a))a.copy(n,s);else throw TypeError('"list" argument must be an Array of Buffers');s+=a.length}return n},l.byteLength=_,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;ee&&(t+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,r,s,a){if(B(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===t?"undefined":(0,n._)(t)));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===s&&(s=0),void 0===a&&(a=this.length),e<0||r>t.length||s<0||a>this.length)throw RangeError("out of range index");if(s>=a&&e>=r)return 0;if(s>=a)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,s>>>=0,a>>>=0,this===t)return 0;for(var o=a-s,u=r-e,c=Math.min(o,u),h=this.slice(s,a),f=t.slice(e,r),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s,a,o,u,l,c,h,f,d=this.length-e;if((void 0===r||r>d)&&(r=d),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var s=t.length-r;n?(n=Number(n))>s&&(n=s):n=s;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,s.push(r%256),s.push(n);return s}(t,this.length-h),this,h,f);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t],s=1,a=0;++a>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t+--e],s=1;e>0&&(s*=256);)n+=this[t+--e]*s;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||S(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=this[t],s=1,a=0;++a=(s*=128)&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||S(t,e,this.length);for(var n=e,s=1,a=this[t+--n];n>0&&(s*=256);)a+=this[t+--n]*s;return a>=(s*=128)&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return(t>>>=0,e||S(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||S(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||S(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return t>>>=0,e||S(t,4,this.length),a.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||S(t,4,this.length),a.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||S(t,8,this.length),a.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||S(t,8,this.length),a.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var s=Math.pow(2,8*r)-1;x(this,t,e,r,s,0)}var a=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){var s=Math.pow(2,8*r)-1;x(this,t,e,r,s,0)}var a=r-1,o=1;for(this[e+a]=255&t;--a>=0&&(o*=256);)this[e+a]=t/o&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var s=Math.pow(2,8*r-1);x(this,t,e,r,s-1,-s)}var a=0,o=1,u=0;for(this[e]=255&t;++a>0)-u&255;return e+r},l.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var s=Math.pow(2,8*r-1);x(this,t,e,r,s-1,-s)}var a=r-1,o=1,u=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===u&&0!==this[e+a+1]&&(u=1),this[e+a]=(t/o>>0)-u&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return T(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return T(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(!l.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&r<57344){if(!s){if(r>56319||o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}s=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),s=r;continue}r=(s-55296<<10|r-56320)+65536}else s&&(e-=3)>-1&&a.push(239,191,189);if(s=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function k(t){return s.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(A,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function C(t,e,r,n){for(var s=0;s=e.length)&&!(s>=t.length);++s)e[s+r]=t[s];return s}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var P=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,s=0;s<16;++s)e[n+s]=t[r]+t[s];return e}()},{"@swc/helpers/_/_type_of":"felZi","9c62938f1dccc73c":"8CZvr",aceacb6a4531a9d2:"kxjGq"}],"8CZvr":[function(t,e,r){r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return(r+n)*3/4-n},r.toByteArray=function(t){var e,r,n=c(t),o=n[0],u=n[1],l=new a((o+u)*3/4-u),h=0,f=u>0?o-4:o;for(r=0;r>16&255,l[h++]=e>>8&255,l[h++]=255&e;return 2===u&&(e=s[t.charCodeAt(r)]<<2|s[t.charCodeAt(r+1)]>>4,l[h++]=255&e),1===u&&(e=s[t.charCodeAt(r)]<<10|s[t.charCodeAt(r+1)]<<4|s[t.charCodeAt(r+2)]>>2,l[h++]=e>>8&255,l[h++]=255&e),l},r.fromByteArray=function(t){for(var e,r=t.length,s=r%3,a=[],o=0,u=r-s;o>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return a.join("")}(t,o,o+16383>u?u:o+16383));return 1===s?a.push(n[(e=t[r-1])>>2]+n[e<<4&63]+"=="):2===s&&a.push(n[(e=(t[r-2]<<8)+t[r-1])>>10]+n[e>>4&63]+n[e<<2&63]+"="),a.join("")};for(var n=[],s=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,l=o.length;u0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],kxjGq:[function(t,e,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh*/r.read=function(t,e,r,n,s){var a,o,u=8*s-n-1,l=(1<>1,h=-7,f=r?s-1:0,d=r?-1:1,p=t[e+f];for(f+=d,a=p&(1<<-h)-1,p>>=-h,h+=u;h>0;a=256*a+t[e+f],f+=d,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+t[e+f],f+=d,h-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,s,a){var o,u,l,c=8*a-s-1,h=(1<>1,d=23===s?5960464477539062e-23:0,p=n?0:a-1,m=n?1:-1,_=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(u=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?e+=d/l:e+=d*Math.pow(2,1-f),e*l>=2&&(o++,l/=2),o+f>=h?(u=0,o=h):o+f>=1?(u=(e*l-1)*Math.pow(2,s),o+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,s),o=0));s>=8;t[r+p]=255&u,p+=m,u/=256,s-=8);for(o=o<0;t[r+p]=255&o,p+=m,o/=256,c-=8);t[r+p-m]|=128*_}},{}]},["c4SNP"],"c4SNP","parcelRequire4dc0"); \ No newline at end of file +!function(t,e,r,n,s,a,o,l){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof u[n]&&u[n],h=c.i||{},f=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(e,r){if(!f[e]){if(!t[e]){if(s[e])return s[e];var a="function"==typeof u[n]&&u[n];if(!r&&a)return a(e,!0);if(c)return c(e,!0);if(d&&"string"==typeof e)return d(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}h.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},h.cache={};var l=f[e]=new p.Module(e);t[e][0].call(l.exports,h,l,l.exports,u)}return f[e].exports;function h(t){var e=h.resolve(t);return!1===e?{}:p(e)}}p.isParcelRequire=!0,p.Module=function(t){this.id=t,this.bundle=p,this.require=d,this.exports={}},p.modules=t,p.cache=f,p.parent=c,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=h,p.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return u[n]}}),u[n]=p;for(var _=0;_0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var r,n,s=e.option,u=e.constructor.utils,c=u.createElement,h=u.def,f=c("canvas"),d=f.getContext("2d"),p=null,_=null,m=null,y=null,g=0,v={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:s.muted,volume:s.volume,autoplay:s.autoplay};function b(){m&&(clearInterval(m),m=null),_&&(_.stop(),_=null)}function w(){if(n){var t=v.muted?0:v.volume;n.gain.setValueAtTime(t,r.currentTime)}}function S(){return(S=(0,a._)(function(){var t,s,l,u;function c(){return h.apply(this,arguments)}function h(){return(h=(0,a._)(function(){var a,c,h,f,m,g,w,S;return(0,o._)(this,function(o){switch(o.label){case 0:if(!v.playing)return[2];return h=(c=performance.now())-u,u=c,null!==y?(t=1e6*y,y=null,l=!0):t+=1e3*h*v.playbackRate,v.currentTime=t/1e6,[4,p.tick(Math.round(t))];case 1:if(m=(f=o.sent()).state,g=f.video,w=f.audio,e.emit("video:timeupdate",{type:"timeupdate"}),"done"===m)return b(),v.ended=!0,v.playing=!1,v.paused=!0,e.emit("video:ended",{type:"ended"}),[2];return g&&"success"===m&&(d.clearRect(0,0,v.videoWidth,v.videoHeight),d.drawImage(g,0,0,v.videoWidth,v.videoHeight),g.close()),l?l=!1:(null==w||null==(a=w[0])?void 0:a.length)&&((S=r.createBuffer(2,w[0].length,48e3)).copyToChannel(w[0],0),S.copyToChannel(w[1],1),(_=r.createBufferSource()).buffer=S,_.connect(n),_.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),s=Math.max(r.currentTime,s),_.start(s),s+=S.duration/v.playbackRate),[2]}})})).apply(this,arguments)}return(0,o._)(this,function(e){return r||(n=(r=new AudioContext).createGain()).connect(r.destination),t=1e6*v.currentTime,s=0,l=!0,u=performance.now(),b(),w(),v.playing=!0,v.paused=!1,m=setInterval(c,1e3/60),[2]})})).apply(this,arguments)}function x(t){return U.apply(this,arguments)}function U(){return(U=(0,a._)(function(t){var e;return(0,o._)(this,function(r){switch(r.label){case 0:return[4,p.tick(1e6*t)];case 1:return(e=r.sent().video)&&(d.clearRect(0,0,f.width,f.height),d.drawImage(e,0,0,f.width,f.height),e.close()),[2]}})})).apply(this,arguments)}function E(){var t,r=null==(t=e.template)?void 0:t.$player;if(r&&!s.autoSize){var n=f.videoWidth/f.videoHeight,a=r.clientWidth,o=r.clientHeight,l=0,u=0;a/o>n?l=(a-o*n)/2:u=(o-a/n)/2,Object.assign(f.style,{padding:"".concat(u,"px ").concat(l,"px")})}}function k(){return(k=(0,a._)(function(){var r,n,a;return(0,o._)(this,function(o){switch(o.label){case 0:return[4,l.Combinator.isSupported()];case 1:if(!o.sent())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");b(),Object.assign(v,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:s.muted,volume:s.volume,autoplay:s.autoplay}),p&&(p.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"})),o.label=2;case 2:return o.trys.push([2,5,,6]),[4,Promise.resolve()];case 3:return o.sent(),v.readyState=1,e.emit("video:loadstart",{type:"loadstart"}),[4,fetch(s.url)];case 4:if(!(r=o.sent()).body)throw Error("No response body");return p=new(0,l.MP4Clip)(r.body,t),[3,6];case 5:throw n=o.sent(),v.readyState=0,e.emit("video:error",n),n;case 6:return[4,p.ready];case 7:return Object.assign(v,{readyState:4,duration:Math.round((a=o.sent()).duration/1e6),videoWidth:a.width,videoHeight:a.height}),f.width=v.videoWidth,f.height=v.videoHeight,[4,x(.1)];case 8:return o.sent(),E(),e.emit("video:loadedmetadata",{type:"loadedmetadata"}),e.emit("video:durationchange",{type:"durationchange"}),e.emit("video:loadeddata",{type:"loadeddata"}),e.emit("video:canplay",{type:"canplay"}),e.emit("video:canplaythrough",{type:"canplaythrough"}),[2]}})})).apply(this,arguments)}return h(f,"duration",{get:function(){return v.duration}}),h(f,"videoWidth",{get:function(){return v.videoWidth}}),h(f,"videoHeight",{get:function(){return v.videoHeight}}),h(f,"volume",{get:function(){return v.volume},set:function(t){v.volume=Math.max(0,Math.min(1,t)),w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(f,"currentTime",{get:function(){return v.currentTime},set:function(t){if(!(v.readyState<4)){var r=Math.max(0,Math.min(t,v.duration)),n=performance.now();n-g>16&&(g=n,y=r,v.currentTime=r,v.playing||x(r),e.emit("video:timeupdate",{type:"timeupdate"}))}}}),h(f,"autoplay",{get:function(){return v.autoplay},set:function(t){v.autoplay=t,t&&v.readyState>=4&&f.play()}}),h(f,"src",{get:function(){return s.url},set:function(t){s.url=t,(function(){return k.apply(this,arguments)})().then(function(){s.autoplay&&f.play()})}}),h(f,"playbackRate",{get:function(){return v.playbackRate},set:function(t){v.playbackRate=Math.max(.25,Math.min(2,t)),_&&_.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),e.emit("video:ratechange",{type:"ratechange"})}}),h(f,"playing",{get:function(){return v.playing}}),h(f,"paused",{get:function(){return v.paused}}),h(f,"ended",{get:function(){return v.ended}}),h(f,"readyState",{get:function(){return v.readyState}}),h(f,"muted",{get:function(){return v.muted},set:function(t){v.muted=t,w(),e.emit("video:volumechange",{type:"volumechange"})}}),h(f,"buffered",{get:function(){return{start:function(){return 0},end:function(){return v.buffered},length:1}}}),h(f,"play",{value:(0,a._)(function(){return(0,o._)(this,function(t){switch(t.label){case 0:if(v.readyState<4)return[2,!1];return[4,function(){return S.apply(this,arguments)}()];case 1:return t.sent(),e.emit("video:play",{type:"play"}),e.emit("video:playing",{type:"playing"}),[2,!0]}})})}),h(f,"pause",{value:function(){b(),v.playing=!1,v.paused=!0,e.emit("video:pause",{type:"pause"})}}),e.on("destroy",function(){b(),p&&p.destroy()}),e.on("resize",E),f}}"undefined"!=typeof window&&(window.artplayerProxyWebAV=u)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@webav/av-cliper":"zMdV7","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e,r,n,s,a,o){try{var l=t[a](o),u=l.value}catch(t){r(t);return}l.done?e(u):Promise.resolve(u).then(n,s)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var o=t.apply(e,r);function l(t){a(o,n,s,l,u,"next",t)}function u(t){a(o,n,s,l,u,"throw",t)}l(void 0)})}}s.defineInteropFlag(r),s.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(t,e,r,n){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}],"6Xyd0":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"_",function(){return a.__generator});var a=t("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"__extends",function(){return l}),s.export(r,"__assign",function(){return u}),s.export(r,"__rest",function(){return c}),s.export(r,"__decorate",function(){return h}),s.export(r,"__param",function(){return f}),s.export(r,"__esDecorate",function(){return d}),s.export(r,"__runInitializers",function(){return p}),s.export(r,"__propKey",function(){return _}),s.export(r,"__setFunctionName",function(){return m}),s.export(r,"__metadata",function(){return y}),s.export(r,"__awaiter",function(){return g}),s.export(r,"__generator",function(){return v}),s.export(r,"__createBinding",function(){return b}),s.export(r,"__exportStar",function(){return w}),s.export(r,"__values",function(){return S}),s.export(r,"__read",function(){return x}),s.export(r,"__spread",function(){return U}),s.export(r,"__spreadArrays",function(){return E}),s.export(r,"__spreadArray",function(){return k}),s.export(r,"__await",function(){return A}),s.export(r,"__asyncGenerator",function(){return T}),s.export(r,"__asyncDelegator",function(){return C}),s.export(r,"__asyncValues",function(){return I}),s.export(r,"__makeTemplateObject",function(){return B}),s.export(r,"__importStar",function(){return P}),s.export(r,"__importDefault",function(){return L}),s.export(r,"__classPrivateFieldGet",function(){return R}),s.export(r,"__classPrivateFieldSet",function(){return D}),s.export(r,"__classPrivateFieldIn",function(){return M}),s.export(r,"__addDisposableResource",function(){return O}),s.export(r,"__disposeResources",function(){return N}),s.export(r,"__rewriteRelativeImportExtension",function(){return G});var a=t("@swc/helpers/_/_type_of"),o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(t);se.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function h(t,e,r,n){var s,o=arguments.length,l=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if(("undefined"==typeof Reflect?"undefined":(0,a._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(l=(o<3?s(l):o>3?s(e,r,l):s(e,r))||l);return o>3&&l&&Object.defineProperty(e,r,l),l}function f(t,e){return function(r,n){e(r,n,t)}}function d(t,e,r,n,s,o){function l(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var u,c=n.kind,h="getter"===c?"get":"setter"===c?"set":"value",f=!e&&t?n.static?t:t.prototype:null,d=e||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,_=r.length-1;_>=0;_--){var m={};for(var y in n)m[y]="access"===y?{}:n[y];for(var y in n.access)m.access[y]=n.access[y];m.addInitializer=function(t){if(p)throw TypeError("Cannot add initializers after decoration has completed");o.push(l(t||null))};var g=(0,r[_])("accessor"===c?{get:d.get,set:d.set}:d[h],m);if("accessor"===c){if(void 0===g)continue;if(null===g||(void 0===g?"undefined":(0,a._)(g))!=="object")throw TypeError("Object expected");(u=l(g.get))&&(d.get=u),(u=l(g.set))&&(d.set=u),(u=l(g.init))&&s.unshift(u)}else(u=l(g))&&("field"===c?s.unshift(u):d[h]=u)}f&&Object.defineProperty(f,n.name,d),p=!0}function p(t,e,r){for(var n=arguments.length>2,s=0;s0&&s[s.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!s||c[1]>s[0]&&c[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 x(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,s,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){s={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(s)throw s.error}}return o}function U(){for(var t=[],e=0;e1||l(t,e)})},e&&(n[t]=e(n[t])))}function l(t,e){try{var r;(r=s[t](e)).value instanceof A?Promise.resolve(r.value.v).then(u,c):h(a[0][2],r)}catch(t){h(a[0][3],t)}}function u(t){l("next",t)}function c(t){l("throw",t)}function h(t,e){t(e),a.shift(),a.length&&l(a[0][0],a[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,s){e[n]=t[n]?function(e){return(r=!r)?{value:A(t[n](e)),done:!1}:s?s(e):e}:s}}function I(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=S(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,s){var a,o,l;a=n,o=s,l=(e=t[r](e)).done,Promise.resolve(e.value).then(function(t){a({value:t,done:l})},o)})}}}function B(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var F=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},z=function(t){return(z=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e})(t)};function P(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=z(t),n=0;n\n\n
').concat(o.outerHTML,"
\n
\n\n ").replace(/\t/g,"").replace(/#/g,"%23"),h.src="data:image/svg+xml;charset=utf-8,".concat(f),r=h,[4,new Promise(function(t){r.onload=t})];case 1:return a.sent(),null==(s=(n=new OffscreenCanvas(r.width,r.height)).getContext("2d"))||s.drawImage(r,0,0,r.width,r.height),[4,createImageBitmap(n)];case 2:return[2,a.sent()]}})})).apply(this,arguments)}function eA(t){var e=new Float32Array(t.map(function(t){return t.length}).reduce(function(t,e){return t+e})),r=0,n=!0,s=!1,a=void 0;try{for(var o,l=t[Symbol.iterator]();!(n=(o=l.next()).done);n=!0){var u=o.value;e.set(u,r),r+=u.length}}catch(t){s=!0,a=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw a}}return e}function eT(t){if("f32-planar"===t.format){for(var e=[],r=0;r>7)],numberOfChannels:(127&a)>>3}}(c))}return n}function eM(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mp4a",n=null==(e=t.moov)?void 0:e.traks.map(function(t){return t.mdia.minf.stbl.stsd.entries}).flat().find(function(t){return t.type===r});return null==n?void 0:n.esds}function eO(){return(eO=(0,t5._)(function(t,e,r){var n;function s(){return(s=(0,t5._)(function(){var e,r,s,a;return(0,ec._)(this,function(o){switch(o.label){case 0:e=0,r=0x1e00000,o.label=1;case 1:return[4,t.read(r,{at:e})];case 2:if(0===(s=o.sent()).byteLength||(s.fileStart=e,null==(a=n.appendBuffer(s))))return[3,4];e=a,o.label=3;case 3:return[3,1];case 4:return n.stop(),[2]}})})).apply(this,arguments)}return(0,ec._)(this,function(t){switch(t.label){case 0:return(n=ed.default.createFile(!1)).onReady=function(t){e({mp4boxFile:n,info:t});var r,s,a=null==(r=t.videoTracks[0])?void 0:r.id;null!=a&&n.setExtractionOptions(a,"video",{nbSamples:100});var o=null==(s=t.audioTracks[0])?void 0:s.id;null!=o&&n.setExtractionOptions(o,"audio",{nbSamples:100}),n.start()},n.onSamples=r,[4,function(){return s.apply(this,arguments)}()];case 1:return t.sent(),[2]}})})).apply(this,arguments)}var ej=0;function eN(t){return"file"===t.kind&&t.createReader instanceof Function}var eG=function(){"use strict";function t(e){var r,n,s,a=this,w=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,t9._)(this,t);var S=this;if(eS(this,o,ej++),eS(this,l,ep.Log.create("MP4Clip id:".concat(ew(this,o),","))),ev(this,"ready"),eS(this,u,!1),eS(this,c,{duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0}),eS(this,h),eS(this,f,[]),eS(this,d,1),eS(this,p,[]),eS(this,_,[]),eS(this,m,null),eS(this,y,null),eS(this,g,{video:null,audio:null}),eS(this,v,{audio:!0}),ev(this,"tickInterceptor",(r=(0,t5._)(function(t,e){return(0,ec._)(this,function(t){return[2,e]})}),function(t,e){return r.apply(this,arguments)})),eS(this,b,new AbortController),!(e instanceof ReadableStream)&&!eN(e)&&!Array.isArray(e.videoSamples))throw Error("Illegal argument");ex(this,v,(0,es._)({audio:!0},w)),ex(this,d,"object"==(0,eu._)(w.audio)&&"volume"in w.audio?w.audio.volume:1);var x=(n=(0,t5._)(function(t){return(0,ec._)(this,function(e){switch(e.label){case 0:return[4,(0,em.write)(ew(S,h),t)];case 1:return[2,(e.sent(),ew(S,h))]}})}),function(t){return n.apply(this,arguments)});ex(this,h,eN(e)?e:"localFile"in e?e.localFile:(0,em.tmpfile)()),this.ready=(e instanceof ReadableStream?x(e).then(function(t){return eH(t,ew(a,v))}):eN(e)?eH(e,ew(this,v)):Promise.resolve(e)).then((s=(0,t5._)(function(t){var e,r,n,s,a,o,u,b;return(0,ec._)(this,function(w){switch(w.label){case 0:return e=t.videoSamples,r=t.audioSamples,n=t.decoderConf,s=t.headerBoxPos,ex(S,p,e),ex(S,_,r),ex(S,g,n),ex(S,f,s),b=[{video:null==n.video?null:(0,ea._)((0,es._)({},n.video),{hardwareAcceleration:ew(S,v).__unsafe_hardwareAcceleration__}),audio:n.audio}],[4,ew(S,h).createReader()];case 1:return o=(a=eY.apply(void 0,b.concat([w.sent(),e,r,!1!==ew(S,v).audio?ew(S,d):0]))).videoFrameFinder,u=a.audioFrameFinder,[2,(ex(S,m,o),ex(S,y,u),ex(S,c,function(t,e,r){var n,s,a={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};null!=t.video&&e.length>0&&(a.width=null!=(n=t.video.codedWidth)?n:0,a.height=null!=(s=t.video.codedHeight)?s:0),null!=t.audio&&r.length>0&&(a.audioSampleRate=eR.sampleRate,a.audioChanCount=eR.channelCount);var o=0,l=0;if(e.length>0)for(var u=e.length-1;u>=0;u--){var c=e[u];if(!c.deleted){o=c.cts+c.duration;break}}if(r.length>0){var h=r.at(-1);l=h.cts+h.duration}return a.duration=Math.max(o,l),a}(n,e,r)),ew(S,l).info("MP4Clip meta:",ew(S,c)),(0,es._)({},ew(S,c)))]}})}),function(t){return s.apply(this,arguments)}))}return(0,et._)(t,[{key:"meta",get:function(){return(0,es._)({},ew(this,c))}},{key:"getFileHeaderBinData",value:function(){var t=this;return(0,t5._)(function(){var e;return(0,ec._)(this,function(r){switch(r.label){case 0:return[4,t.ready];case 1:return r.sent(),[4,ew(t,h).getOriginFile()];case 2:if(null==(e=r.sent()))throw Error("MP4Clip localFile is not origin file");return[4,new Blob(ew(t,f).map(function(t){var r=t.start,n=t.size;return e.slice(r,r+n)})).arrayBuffer()];case 3:return[2,r.sent()]}})})()}},{key:"tick",value:function(t){var e=this;return(0,t5._)(function(){var r,n,s,a,o,l,u,h,f,d,p,_;return(0,ec._)(this,function(g){switch(g.label){case 0:if(!(t>=ew(e,c).duration))return[3,3];return o=e.tickInterceptor,l=[t],u={},[4,null==(r=ew(e,y))?void 0:r.find(t)];case 1:return[4,o.apply(e,l.concat([(u.audio=null!=(a=g.sent())?a:[],u.state="done",u)]))];case 2:return[2,g.sent()];case 3:return[4,Promise.all([null!=(h=null==(n=ew(e,y))?void 0:n.find(t))?h:[],null==(s=ew(e,m))?void 0:s.find(t)])];case 4:if(d=(f=eo._.apply(void 0,[g.sent(),2]))[0],null!=(p=f[1]))return[3,6];return[4,e.tickInterceptor(t,{audio:d,state:"success"})];case 5:return _=g.sent(),[3,8];case 6:return[4,e.tickInterceptor(t,{video:p,audio:d,state:"success"})];case 7:_=g.sent(),g.label=8;case 8:return[2,_]}})})()}},{key:"thumbnails",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,e=arguments.length>1?arguments[1]:void 0,r=this;return(0,t5._)(function(){var n,s,a,o,l;return(0,ec._)(this,function(u){switch(u.label){case 0:return ew(r,b).abort(),ex(r,b,new AbortController),n=ew(r,b).signal,[4,r.ready];case 1:var f,d,_,m,y,w,S;if(u.sent(),s="generate thumbnails aborted",n.aborted)throw Error(s);return o=(a=ew(r,c)).width,d=t,_=Math.round(t/o*a.height),m={quality:.1,type:"image/png"},S=(w=new OffscreenCanvas(d,_)).getContext("2d"),y=(0,t5._)(function(t){return(0,ec._)(this,function(e){switch(e.label){case 0:return S.drawImage(t,0,0,d,_),t.close(),[4,w.convertToBlob(m)];case 1:return[2,e.sent()]}})}),l=function(t){return y.apply(this,arguments)},[2,new Promise((f=(0,t5._)(function(t,a){var o,u,f,d,_,m,y,b,w,S,x,U;function E(){return k.apply(this,arguments)}function k(){return(k=(0,t5._)(function(){var e;return(0,ec._)(this,function(e){switch(e.label){case 0:var r;if(n.aborted)return[3,2];return[4,Promise.all(o.map((r=(0,t5._)(function(t){var e;return(0,ec._)(this,function(r){switch(r.label){case 0:return e={ts:t.ts},[4,t.img];case 1:return[2,(e.img=r.sent(),e)]}})}),function(t){return r.apply(this,arguments)})))];case 1:t.apply(void 0,[e.sent()]),e.label=2;case 2:return[2]}})})).apply(this,arguments)}function A(t){o.push({ts:t.timestamp,img:l(t)})}return(0,ec._)(this,function(t){switch(t.label){case 0:if(o=[],null==(u=ew(r,g).video)||0===ew(r,p).length)return E(),[2];if(n.addEventListener("abort",function(){a(Error(s))}),_=void 0===(d=(f=null!=e?e:{}).start)?0:d,y=void 0===(m=f.end)?ew(r,c).duration:m,!(b=f.step))return[3,6];return w=_,x=eZ.bind,[4,ew(r,h).createReader()];case 1:S=new(x.apply(eZ,[void 0,t.sent(),ew(r,p),(0,ea._)((0,es._)({},u),{hardwareAcceleration:ew(r,v).__unsafe_hardwareAcceleration__})])),t.label=2;case 2:if(!(w<=y&&!n.aborted))return[3,5];return[4,S.find(w)];case 3:(U=t.sent())&&A(U),w+=b,t.label=4;case 4:return[3,2];case 5:return S.destroy(),E(),[3,8];case 6:return[4,function(t,e,r,n,s,a){return e$.apply(this,arguments)}(ew(r,p),ew(r,h),u,n,{start:_,end:y},function(t,e){null!=t&&A(t),e&&E()})];case 7:t.sent(),t.label=8;case 8:return[2]}})}),function(t,e){return f.apply(this,arguments)}))]}})})()}},{key:"split",value:function(e){var r=this;return(0,t5._)(function(){var n,s,a,o,l,u,d,m;return(0,ec._)(this,function(y){switch(y.label){case 0:return[4,r.ready];case 1:if(y.sent(),e<=0||e>=ew(r,c).duration)throw Error('"time" out of bounds');return s=(n=(0,eo._)(function(t,e){if(0===t.length)return[];for(var r=0,n=0,s=-1,a=0;at[n].cts)){r=n;break}if(-1===r)throw Error("Not found audio sample by time");return[t.slice(0,r).map(function(t){return(0,es._)({},t)}),t.slice(r).map(function(t){return(0,ea._)((0,es._)({},t),{cts:t.cts-e})})]}(ew(r,_),e),2))[0],u=o[1],d=new t({localFile:ew(r,h),videoSamples:null!=s?s:[],audioSamples:null!=l?l:[],decoderConf:ew(r,g),headerBoxPos:ew(r,f)},ew(r,v)),m=new t({localFile:ew(r,h),videoSamples:null!=a?a:[],audioSamples:null!=u?u:[],decoderConf:ew(r,g),headerBoxPos:ew(r,f)},ew(r,v)),[4,Promise.all([d.ready,m.ready])];case 2:return[2,(y.sent(),[d,m])]}})})()}},{key:"clone",value:function(){var e=this;return(0,t5._)(function(){var r;return(0,ec._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:return n.sent(),[4,(r=new t({localFile:ew(e,h),videoSamples:(0,el._)(ew(e,p)),audioSamples:(0,el._)(ew(e,_)),decoderConf:ew(e,g),headerBoxPos:ew(e,f)},ew(e,v))).ready];case 2:return[2,(n.sent(),r.tickInterceptor=e.tickInterceptor,r)]}})})()}},{key:"splitTrack",value:function(){var e=this;return(0,t5._)(function(){var r,n,s;return(0,ec._)(this,function(a){switch(a.label){case 0:return[4,e.ready];case 1:if(a.sent(),r=[],!(ew(e,p).length>0))return[3,3];return[4,(n=new t({localFile:ew(e,h),videoSamples:(0,el._)(ew(e,p)),audioSamples:[],decoderConf:{video:ew(e,g).video,audio:null},headerBoxPos:ew(e,f)},ew(e,v))).ready];case 2:a.sent(),n.tickInterceptor=e.tickInterceptor,r.push(n),a.label=3;case 3:if(!(ew(e,_).length>0))return[3,5];return[4,(s=new t({localFile:ew(e,h),videoSamples:[],audioSamples:(0,el._)(ew(e,_)),decoderConf:{audio:ew(e,g).audio,video:null},headerBoxPos:ew(e,f)},ew(e,v))).ready];case 4:a.sent(),s.tickInterceptor=e.tickInterceptor,r.push(s),a.label=5;case 5:return[2,r]}})})()}},{key:"destroy",value:function(){var t,e;ew(this,u)||(ew(this,l).info("MP4Clip destroy"),ex(this,u,!0),null==(t=ew(this,m))||t.destroy(),null==(e=ew(this,y))||e.destroy())}}]),t}();o=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,_=new WeakMap,m=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,b=new WeakMap;var eW=eG;function eY(t,e,r,n,s){return{audioFrameFinder:0===s||null==t.audio||0===n.length?null:new eX(e,n,t.audio,{volume:s,targetSampleRate:eR.sampleRate}),videoFrameFinder:null==t.video||0===r.length?null:new eZ(e,r,t.video)}}function eH(t){return eV.apply(this,arguments)}function eV(){return(eV=(0,t5._)(function(t){var e,r,n,s,a,o,l,u,c,h,f,d=arguments;function p(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n="video"===r&&t.is_sync?function(t,e){if("avc1"!==e&&"hvc1"!==e)return 0;for(var r=new DataView(t.buffer),n=0;n>1&63;if(19===s||20===s)return n}n+=r.getUint32(n)+4}return -1}(t.data,t.description.type):-1,s=t.offset,a=t.size;return n>=0&&(s+=n,a-=n),(0,ea._)((0,es._)({},t),{is_idr:n>=0,offset:s,size:a,cts:(t.cts-e)/t.timescale*1e6,dts:(t.dts-e)/t.timescale*1e6,duration:t.duration/t.timescale*1e6,timescale:1e6,data:"video"===r?null:t.data})}return(0,ec._)(this,function(_){switch(_.label){case 0:return e=d.length>1&&void 0!==d[1]?d[1]:{},r=null,n={video:null,audio:null},s=[],a=[],o=[],l=-1,u=-1,[4,t.createReader()];case 1:return[4,function(t,e,r){return eO.apply(this,arguments)}(c=_.sent(),function(t){r=t.info;var e=t.mp4boxFile.ftyp;o.push({start:e.start,size:e.size});var s=t.mp4boxFile.moov;o.push({start:s.start,size:s.size});var a=eD(t.mp4boxFile,t.info),l=a.videoDecoderConf,u=a.audioDecoderConf;n.video=null!=l?l:null,n.audio=null!=u?u:null,null==l&&null==u&&ep.Log.error("MP4Clip no video and audio track"),ep.Log.info("mp4BoxFile moov ready",(0,ea._)((0,es._)({},t.info),{tracks:null,videoTracks:null,audioTracks:null}),n)},function(t,r,n){if("video"===r){-1===l&&(l=n[0].dts);var o=!0,c=!1,h=void 0;try{for(var f,d=n[Symbol.iterator]();!(o=(f=d.next()).done);o=!0){var _=f.value;s.push(p(_,l,"video"))}}catch(t){c=!0,h=t}finally{try{o||null==d.return||d.return()}finally{if(c)throw h}}}else if("audio"===r&&e.audio){-1===u&&(u=n[0].dts);var m=!0,y=!1,g=void 0;try{for(var v,b=n[Symbol.iterator]();!(m=(v=b.next()).done);m=!0){var w=v.value;a.push(p(w,u,"audio"))}}catch(t){y=!0,g=t}finally{try{m||null==b.return||b.return()}finally{if(y)throw g}}}})];case 2:return _.sent(),[4,c.close()];case 3:if(_.sent(),f=null!=(h=s.at(-1))?h:a.at(-1),null==r)throw Error("MP4Clip stream is done, but not emit ready");if(null==f)throw Error("MP4Clip stream not contain any sample");return[2,(e0(s),ep.Log.info("mp4 stream parsed"),{videoSamples:s,audioSamples:a,decoderConf:n,headerBoxPos:o})]}})})).apply(this,arguments)}var eZ=function t(e,r,n){"use strict";var s,a,o,l=this;(0,t9._)(this,t);var u=this;eS(this,w,null),eS(this,S,0),eS(this,x,{abort:!1,st:performance.now()}),ev(this,"find",(s=(0,t5._)(function(t){var e;return(0,ec._)(this,function(r){switch(r.label){case 0:return(null==ew(u,w)||"closed"===ew(u,w).state||t<=ew(u,S)||t-ew(u,S)>3e6)&&ew(u,L).call(u,t),ew(u,x).abort=!0,ex(u,S,t),ex(u,x,{abort:!1,st:performance.now()}),[4,ew(u,F).call(u,t,ew(u,w),ew(u,x))];case 1:return e=r.sent(),[2,(ex(u,I,0),e)]}})}),function(t){return s.apply(this,arguments)})),eS(this,U,0),eS(this,E,!1),eS(this,k,0),eS(this,A,[]),eS(this,T,0),eS(this,C,0),eS(this,I,0),eS(this,B,!1),eS(this,F,(a=(0,t5._)(function(t,e,r){var n,s,a,o,l;return(0,ec._)(this,function(c){switch(c.label){case 0:if(null==e||"closed"===e.state||r.abort)return[2,null];if(!(ew(u,A).length>0))return[3,6];if(!(t<(n=ew(u,A)[0]).timestamp))return[3,1];return a=null,[3,5];case 1:if(ew(u,A).shift(),!(t>n.timestamp+(null!=(s=n.duration)?s:0)))return[3,3];return n.close(),[4,ew(u,F).call(u,t,e,r)];case 2:return o=c.sent(),[3,4];case 3:!ew(u,B)&&ew(u,A).length<10&&ew(u,P).call(u,e).catch(function(e){throw ex(u,B,!0),ew(u,L).call(u,t),e}),o=n,c.label=4;case 4:a=o,c.label=5;case 5:return[2,a];case 6:if(!(ew(u,z)||ew(u,T)0))return[3,8];if(performance.now()-r.st>6e3)throw Error("MP4Clip.tick video timeout, ".concat(JSON.stringify(ew(u,R).call(u))));return ex(u,I,ew(u,I)+1),[4,ez(15)];case 7:return c.sent(),[3,12];case 8:if(ew(u,k)>=u.samples.length)return[2,null];c.label=9;case 9:return c.trys.push([9,11,,12]),[4,ew(u,P).call(u,e)];case 10:return c.sent(),[3,12];case 11:throw l=c.sent(),ew(u,L).call(u,t),l;case 12:return[4,ew(u,F).call(u,t,e,r)];case 13:return[2,c.sent()]}})}),function(t,e,r){return a.apply(this,arguments)})),eS(this,z,!1),eS(this,P,(o=(0,t5._)(function(t){var e,r,n,s,a,o,l,c,h,f,d,p,_;return(0,ec._)(this,function(m){switch(m.label){case 0:if(ew(u,z)||t.decodeQueueSize>600||(n=ew(u,k)+1)>u.samples.length)return[2];for(ex(u,z,!0),s=!1;n1e3&&(f=o[0],p=(d=o.at(-1)).offset+d.size-f.offset,ep.Log.warn("Read video samples time cost: ".concat(Math.round(h),"ms, file chunk size: ").concat(p))),"closed"===t.state)return[2];ex(u,U,null!=(_=null==(r=c[0])?void 0:r.duration)?_:0),eq(t,c,{onDecodingError:function(t){if(ew(u,E))throw t;0===ew(u,T)&&(ex(u,E,!0),ep.Log.warn("Downgrade to software decode"),ew(u,L).call(u))}}),ex(u,C,ew(u,C)+c.length),m.label=3;case 3:return ex(u,k,n),ex(u,z,!1),[2]}})}),function(t){return o.apply(this,arguments)})),eS(this,L,function(t){if(ex(l,z,!1),ew(l,A).forEach(function(t){return t.close()}),ex(l,A,[]),null==t||0===t)ex(l,k,0);else for(var e,r,n=0,s=0;s1e5,(null==ew(u,O)||"closed"===ew(u,O).state||e)&&ew(u,Z).call(u),e&&(ex(u,N,t),ex(u,G,function(t,e){for(var r=0;r=n.cts&&tt)break}return 0}(t,u.samples))),ew(u,j).abort=!0,r=t-ew(u,N),ex(u,N,t),ex(u,j,{abort:!1,st:performance.now()}),[4,ew(u,H).call(u,Math.ceil(r*(ew(u,M)/1e6)),ew(u,O),ew(u,j))];case 1:return n=s.sent(),[2,(ex(u,Y,0),n)]}})}),function(t){return a.apply(this,arguments)})),eS(this,N,0),eS(this,G,0),eS(this,W,{frameCnt:0,data:[]}),eS(this,Y,0),eS(this,H,(o=(0,t5._)(function(t){var e,r,n,s=arguments;return(0,ec._)(this,function(a){switch(a.label){case 0:if(e=s.length>1&&void 0!==s[1]?s[1]:null,r=s.length>2?s[2]:void 0,null==e||r.abort||"closed"===e.state||0===t)return[2,[]];if((n=ew(u,W).frameCnt-t)>0)return[2,(n3e3)throw r.abort=!0,Error("MP4Clip.tick audio timeout, ".concat(JSON.stringify(ew(u,X).call(u))));return ex(u,Y,ew(u,Y)+1),[4,ez(15)];case 1:return a.sent(),[3,3];case 2:if(ew(u,G)>=u.samples.length-1)return[2,eK(ew(u,W),ew(u,W).frameCnt)];ew(u,V).call(u,e),a.label=3;case 3:return[2,ew(u,H).call(u,t,e,r)]}})}),function(t){return o.apply(this,arguments)})),eS(this,V,function(t){if(!(t.decodeQueueSize>10)){for(var e=[],r=ew(l,G);r=10))break}ex(l,G,r),t.decode(e.map(function(t){return new EncodedAudioChunk({type:"key",timestamp:t.cts,duration:t.duration,data:t.data})}))}}),eS(this,Z,function(){var t;ex(l,N,0),ex(l,G,0),ex(l,W,{frameCnt:0,data:[]}),null==(t=ew(l,O))||t.close(),ex(l,O,function(t,e,r){var n=0,s=0,a=function(t){if(s+=1,0!==t.length){var n=!0,a=!1,o=void 0;if(1!==e.volume)try{for(var l,u=t[Symbol.iterator]();!(n=(l=u.next()).done);n=!0)for(var c=l.value,h=0;hs&&u.decodeQueueSize>0},get state(){return u.state},get decodeQueueSize(){return u.decodeQueueSize}}}(l.conf,{resampleRate:eR.sampleRate,volume:ew(l,D)},function(t){ew(l,W).data.push(t),ew(l,W).frameCnt+=t[0].length}))}),eS(this,X,function(){var t,e;return{time:ew(l,N),decState:null==(t=ew(l,O))?void 0:t.state,decQSize:null==(e=ew(l,O))?void 0:e.decodeQueueSize,decCusorIdx:ew(l,G),sampleLen:l.samples.length,pcmLen:ew(l,W).frameCnt,clipIdCnt:ej,sleepCnt:ew(l,Y),memInfo:e1()}}),ev(this,"destroy",function(){ex(l,O,null),ew(l,j).abort=!0,ex(l,W,{frameCnt:0,data:[]}),l.localFileReader.close()}),this.localFileReader=e,this.samples=r,this.conf=n,ex(this,D,s.volume),ex(this,M,s.targetSampleRate)};function eK(t,e){for(var r=[new Float32Array(e),new Float32Array(e)],n=0,s=0;se){var u=e-n;r[0].set(o.subarray(0,u),n),r[1].set(l.subarray(0,u),n),t.data[s][0]=o.subarray(u,o.length),t.data[s][1]=l.subarray(u,l.length);break}r[0].set(o,n),r[1].set(l,n),n+=o.length,s++}return t.data=t.data.slice(s),t.frameCnt-=e,r}function eJ(t,e){return eQ.apply(this,arguments)}function eQ(){return(eQ=(0,t5._)(function(t,e){var r,n,s,a,o;return(0,ec._)(this,function(l){switch(l.label){case 0:if(r=t[0],null==(n=t.at(-1)))return[2,[]];if(!((s=n.offset+n.size-r.offset)<3e7))return[3,2];return o=Uint8Array.bind,[4,e.read(s,{at:r.offset})];case 1:return a=new(o.apply(Uint8Array,[void 0,l.sent()])),[2,t.map(function(t){var e=t.offset-r.offset;return new EncodedVideoChunk({type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration,data:a.subarray(e,e+t.size)})})];case 2:var u;return[4,Promise.all(t.map((u=(0,t5._)(function(t){var r,n;return(0,ec._)(this,function(s){switch(s.label){case 0:return r=EncodedVideoChunk.bind,n={type:t.is_sync?"key":"delta",timestamp:t.cts,duration:t.duration},[4,e.read(t.size,{at:t.offset})];case 1:return[2,new(r.apply(EncodedVideoChunk,[void 0,(n.data=s.sent(),n)]))]}})}),function(t){return u.apply(this,arguments)})))];case 3:return[2,l.sent()]}})})).apply(this,arguments)}function eq(t,e,r){var n=0;if("configured"===t.state){for(;n0&&void 0!==arguments[0]&&arguments[0],e=(0,es._)({},r,t?{hardwareAcceleration:"prefer-software"}:{}),s=new VideoDecoder({output:function(t){var e=(u+=1)===l.length;a(t,e),e&&(o.close(),"closed"!==s.state&&s.close())},error:function(t){var r="thumbnails decoder error: ".concat(t.message,", config: ").concat(JSON.stringify(e),", state: ").concat(JSON.stringify({qSize:s.decodeQueueSize,state:s.state,outputCnt:u,inputCnt:l.length}));throw ep.Log.error(r),Error(r)}});return n.addEventListener("abort",function(){o.close(),"closed"!==s.state&&s.close()}),s.configure(e),s}return(0,ec._)(this,function(r){switch(r.label){case 0:return[4,e.createReader()];case 1:return o=r.sent(),[4,eJ(t.filter(function(t){return!t.deleted&&t.is_sync&&t.cts>=s.start&&t.cts<=s.end}),o)];case 2:if(0===(l=r.sent()).length||n.aborted)return[2];return u=0,eq(c(),l,{onDecodingError:function(t){ep.Log.warn("thumbnailsByKeyFrame",t),0===u?eq(c(!0),l,{onDecodingError:function(t){o.close(),ep.Log.error("thumbnailsByKeyFrame retry soft deocde",t)}}):(a(null,!0),o.close())}}),[2]}})})).apply(this,arguments)}function e0(t){var e=0,r=null,n=!0,s=!1,a=void 0;try{for(var o,l=t[Symbol.iterator]();!(n=(o=l.next()).done);n=!0){var u=o.value;if(!u.deleted){if(u.is_sync&&(e+=1),e>=2)break;(null==r||u.cts=t.timestamp&&a<=t.timestamp+(null!=(e=t.duration)?e:0)}))?o:ew(e,Q)[0]).clone(),state:"success"})]}})})()}},{key:"split",value:function(e){var r=this;return(0,t5._)(function(){var n,s,a,o,l,u,c;return(0,ec._)(this,function(h){switch(h.label){case 0:return[4,r.ready];case 1:if(h.sent(),null==ew(r,J))return[3,4];return n=t.bind,[4,createImageBitmap(ew(r,J))];case 2:return s=[new(n.apply(t,[void 0,h.sent()]))],a=t.bind,[4,createImageBitmap(ew(r,J))];case 3:return[2,s.concat([new(a.apply(t,[void 0,h.sent()]))])];case 4:for(l=0,o=-1;lew(r,Q)[l].timestamp)){o=l;break}if(-1===o)throw Error("Not found frame by time");return u=ew(r,Q).slice(0,o).map(function(t){return new VideoFrame(t)}),c=ew(r,Q).slice(o).map(function(t){return new VideoFrame(t,{timestamp:t.timestamp-e})}),[2,[new t(u),new t(c)]]}})})()}},{key:"clone",value:function(){var e=this;return(0,t5._)(function(){var r;return(0,ec._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:if(n.sent(),null!=ew(e,J))return[3,2];return r=ew(e,Q).map(function(t){return t.clone()}),[3,4];case 2:return[4,createImageBitmap(ew(e,J))];case 3:r=n.sent(),n.label=4;case 4:return[2,new t(r)]}})})()}},{key:"destroy",value:function(){var t;ep.Log.info("ImgClip destroy"),null==(t=ew(this,J))||t.close(),ew(this,Q).forEach(function(t){return t.close()})}}]),t}();K=new WeakMap,J=new WeakMap,Q=new WeakMap,q=new WeakSet,s=(0,t5._)(function(t,e){var r,n;return(0,ec._)(this,function(s){switch(s.label){case 0:return r=[this,Q],[4,function(t,e){return eI.apply(this,arguments)}(t,e)];case 1:if(ex.apply(void 0,r.concat([s.sent()])),null==(n=ew(this,Q)[0]))throw Error("No frame available in gif");return ex(this,K,{duration:ew(this,Q).reduce(function(t,e){var r;return t+(null!=(r=e.duration)?r:0)},0),width:n.codedWidth,height:n.codedHeight}),ep.Log.info("ImgClip ready:",ew(this,K)),[2]}})}),$=function(t,e){return s.apply(this,arguments)};var e3=e2,e4=function(){"use strict";function t(e){var r,n=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,t9._)(this,t),eS(this,tn),ev(this,"ready"),eS(this,tt,{duration:0,width:0,height:0}),eS(this,te,new Float32Array),eS(this,tr,new Float32Array),eS(this,ti),ev(this,"tickInterceptor",(r=(0,t5._)(function(t,e){return(0,ec._)(this,function(t){return[2,e]})}),function(t,e){return r.apply(this,arguments)})),eS(this,ta,0),eS(this,to,0),ex(this,ti,(0,es._)({loop:!1,volume:1},s)),this.ready=eU(this,tn,ts).call(this,e).then(function(){return{width:0,height:0,duration:s.loop?1/0:ew(n,tt).duration}})}return(0,et._)(t,[{key:"meta",get:function(){return(0,ea._)((0,es._)({},ew(this,tt)),{sampleRate:eR.sampleRate,chanCount:2})}},{key:"getPCMData",value:function(){return[ew(this,te),ew(this,tr)]}},{key:"tick",value:function(t){var e=this;return(0,t5._)(function(){var r,n,s,a;return(0,ec._)(this,function(o){switch(o.label){case 0:if(!(!ew(e,ti).loop&&t>=ew(e,tt).duration))return[3,2];return[4,e.tickInterceptor(t,{audio:[],state:"done"})];case 1:case 3:case 5:return[2,o.sent()];case 2:if(r=t-ew(e,ta),!(t3e6))return[3,4];return ex(e,ta,t),ex(e,to,Math.ceil(ew(e,ta)/1e6*eR.sampleRate)),[4,e.tickInterceptor(t,{audio:[new Float32Array(0),new Float32Array(0)],state:"success"})];case 4:return ex(e,ta,t),n=Math.ceil(r/1e6*eR.sampleRate),s=ew(e,to)+n,a=ew(e,ti).loop?[eP(ew(e,te),ew(e,to),s),eP(ew(e,tr),ew(e,to),s)]:[ew(e,te).slice(ew(e,to),s),ew(e,tr).slice(ew(e,to),s)],ex(e,to,s),[4,e.tickInterceptor(t,{audio:a,state:"success"})]}})})()}},{key:"split",value:function(e){var r=this;return(0,t5._)(function(){var n;return(0,ec._)(this,function(s){switch(s.label){case 0:return[4,r.ready];case 1:return s.sent(),n=Math.ceil(e/1e6*eR.sampleRate),[2,[new t(r.getPCMData().map(function(t){return t.slice(0,n)}),ew(r,ti)),new t(r.getPCMData().map(function(t){return t.slice(n)}),ew(r,ti))]]}})})()}},{key:"clone",value:function(){var e=this;return(0,t5._)(function(){var r;return(0,ec._)(this,function(n){switch(n.label){case 0:return[4,e.ready];case 1:return n.sent(),[4,(r=new t(e.getPCMData(),ew(e,ti))).ready];case 2:return[2,(n.sent(),r)]}})})()}},{key:"destroy",value:function(){ex(this,te,new Float32Array(0)),ex(this,tr,new Float32Array(0)),ep.Log.info("---- audioclip destroy ----")}}]),t}();tt=new WeakMap,te=new WeakMap,tr=new WeakMap,ti=new WeakMap,tn=new WeakSet,a=(0,t5._)(function(t){var e,r,n,s,a,o,l,u,c,h,f,d;return(0,ec._)(this,function(p){switch(p.label){case 0:if(null==e4.ctx&&(e4.ctx=new AudioContext({sampleRate:eR.sampleRate})),e=performance.now(),!(t instanceof ReadableStream))return[3,2];return[4,function(t,e){return e8.apply(this,arguments)}(t,e4.ctx)];case 1:return n=p.sent(),[3,3];case 2:n=t,p.label=3;case 3:if(r=n,ep.Log.info("Audio clip decoded complete:",performance.now()-e),s=ew(this,ti).volume,a=!0,o=!1,l=void 0,1!==s)try{for(u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0)for(f=0,h=c.value;f0}).map(function(t){return{lineStr:t,match:t.match(/(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/)}}).filter(function(t,e,r){var n,s=t.lineStr;return!(/^\d+$/.test(s)&&(null==(n=r[e+1])?void 0:n.match)!=null)}).reduce(function(t,e){var r=e.lineStr,n=e.match;if(null==n){var s=t.at(-1);if(null==s)return t;s.text+=0===s.text.length?r:"\n".concat(r)}else t.push({start:re(n[1]),end:re(n[2]),text:""});return t},[]).map(function(t){return{start:1e6*t.start,end:1e6*t.end,text:t.text}})),0===ew(this,tf).length)throw Error("No subtitles content");ex(this,tp,Object.assign(ew(this,tp),r)),ex(this,tv,null==r.textBgColor?0:(null!=(s=r.fontSize)?s:50)*.2);var n,s,a,o=ew(this,tp),l=o.fontSize,u=o.fontFamily,c=o.videoWidth,h=o.videoHeight,f=o.letterSpacing;ex(this,tg,l+2*ew(this,tv)),ex(this,t_,new OffscreenCanvas(c,h)),ex(this,tm,ew(this,t_).getContext("2d")),ew(this,tm).font="".concat(l,"px ").concat(u),ew(this,tm).textAlign="center",ew(this,tm).textBaseline="top",ew(this,tm).letterSpacing=null!=f?f:"0px",ex(this,td,{width:c,height:h,duration:null!=(a=null==(n=ew(this,tf).at(-1))?void 0:n.end)?a:0}),this.ready=Promise.resolve(this.meta)}return(0,et._)(t,[{key:"meta",get:function(){return(0,es._)({},ew(this,td))}},{key:"tick",value:function(t){var e=this;return(0,t5._)(function(){var r,n,s,a,o,l,u,c;return(0,ec._)(this,function(h){if(null!=ew(e,ty)&&t>=ew(e,ty).timestamp&&t<=ew(e,ty).timestamp+(null!=(s=ew(e,ty).duration)?s:0))return[2,{video:ew(e,ty).clone(),state:"success"}];for(a=0;a(l=null!=(o=ew(e,tf)[a])?o:ew(e,tf).at(-1)).end?[2,{state:"done"}]:tew(r,tf)[s].start)){n=s;break}if(-1===n)throw Error("Not found subtitle by time");return o=(a=ew(r,tf).slice(0,n).map(function(t){return(0,es._)({},t)})).at(-1),l=null,null!=o&&o.end>e&&(l={start:0,end:o.end-e,text:o.text},o.end=e),u=ew(r,tf).slice(n).map(function(t){return(0,ea._)((0,es._)({},t),{start:t.start-e,end:t.end-e})}),[2,(null!=l&&u.unshift(l),[new t(a,ew(r,tp)),new t(u,ew(r,tp))])]}})})()}},{key:"clone",value:function(){var e=this;return(0,t5._)(function(){return(0,ec._)(this,function(r){return[2,new t(ew(e,tf).slice(0),ew(e,tp))]})})()}},{key:"destroy",value:function(){var t;null==(t=ew(this,ty))||t.close()}}]),t}();tf=new WeakMap,td=new WeakMap,tp=new WeakMap,t_=new WeakMap,tm=new WeakMap,ty=new WeakMap,tg=new WeakMap,tv=new WeakMap,tb=new WeakSet,tw=function(t){var e=t.split("\n").reverse().map(function(t){return t.trim()}),r=ew(this,t_),n=r.width,s=r.height,a=ew(this,tp),o=a.color,l=a.fontSize,u=a.textBgColor,c=a.textShadow,h=a.strokeStyle,f=a.lineWidth,d=a.lineCap,p=a.lineJoin,_=a.bottomOffset,m=ew(this,tm);m.clearRect(0,0,n,s),m.globalAlpha=.6;var y=_,g=!0,v=!1,b=void 0;try{for(var w,S=e[Symbol.iterator]();!(g=(w=S.next()).done);g=!0){var x=w.value,U=m.measureText(x),E=n/2;null!=u&&(m.shadowOffsetX=0,m.shadowOffsetY=0,m.shadowBlur=0,m.fillStyle=u,m.globalAlpha=.5,m.fillRect(E-U.actualBoundingBoxLeft-ew(this,tv),s-y-ew(this,tg),U.width+2*ew(this,tv),ew(this,tg))),m.shadowColor=c.color,m.shadowOffsetX=c.offsetX,m.shadowOffsetY=c.offsetY,m.shadowBlur=c.blur,m.globalAlpha=1,null!=h&&(m.lineWidth=null!=f?f:l/6,null!=d&&(m.lineCap=d),null!=p&&(m.lineJoin=p),m.strokeStyle=h,m.strokeText(x,E,s-y-ew(this,tg)+ew(this,tv))),m.fillStyle=o,m.fillText(x,E,s-y-ew(this,tg)+ew(this,tv)),y+=ew(this,tg)+.2*l}}catch(t){v=!0,b=t}finally{try{g||null==S.return||S.return()}finally{if(v)throw b}}};var rt=e9;function re(t){var e=t.match(/(\d{2}):(\d{2}):(\d{2}),(\d{3})/);if(null==e)throw Error("time format error: ".concat(t));return 3600*Number(e[1])+60*Number(e[2])+Number(e[3])+Number(e[4])/1e3}var rr=function t(){"use strict";(0,t9._)(this,t);var e,r=this;ev(this,"readable"),ev(this,"writable"),eS(this,tS,0);var n=ed.default.createFile(),s=!1;this.readable=new ReadableStream({start:function(t){n.onReady=function(e){var r,s,a=null==(r=e.videoTracks[0])?void 0:r.id;null!=a&&n.setExtractionOptions(a,"video",{nbSamples:100});var o=null==(s=e.audioTracks[0])?void 0:s.id;null!=o&&n.setExtractionOptions(o,"audio",{nbSamples:100}),t.enqueue({chunkType:"ready",data:{info:e,file:n}}),n.start()};var e={};n.onSamples=function(r,s,a){var o;t.enqueue({chunkType:"samples",data:{id:r,type:s,samples:a.map(function(t){return(0,es._)({},t)})}}),e[r]=(null!=(o=e[r])?o:0)+a.length,n.releaseUsedSamples(r,e[r])},n.onFlush=function(){t.close()}},cancel:function(){n.stop(),s=!0}},{highWaterMark:50}),this.writable=new WritableStream({write:(e=(0,t5._)(function(t){var e;return(0,ec._)(this,function(a){return s?r.writable.abort():((e=t.buffer).fileStart=ew(r,tS),ex(r,tS,ew(r,tS)+e.byteLength),n.appendBuffer(e)),[2]})}),function(t){return e.apply(this,arguments)}),close:function(){var t;n.flush(),n.stop(),null==(t=n.onFlush)||t.call(n)}})};function ri(t){return rn.apply(this,arguments)}function rn(){return(rn=(0,t5._)(function(t){var e,r,n;return(0,ec._)(this,function(s){switch(s.label){case 0:return r=function(t){var e=0,r=t.boxes,n=[],s=0;function a(){return o.apply(this,arguments)}function o(){return(o=(0,t5._)(function(){var a,o;return(0,ec._)(this,function(o){switch(o.label){case 0:if(a=_(r,e),e=r.length,n.forEach(function(e){var r=e.track,n=e.id,a=r.samples.at(-1);null!=a&&(s=Math.max(s,a.cts+a.duration)),t.releaseUsedSamples(n,r.samples.length),r.samples=[]}),t.mdats=[],t.moofs=[],null==a)return[3,2];return[4,null==f?void 0:f.write(a)];case 1:o.sent(),o.label=2;case 2:return[2]}})})).apply(this,arguments)}var l=[];function u(){if(l.length>0)return!0;var s=r.findIndex(function(t){return"moov"===t.type});if(-1===s)return!1;if(l=r.slice(0,s+1),e=s+1,0===n.length)for(var a=1;;a+=1){var o=t.getTrackById(a);if(null==o)break;n.push({track:o,id:a})}return!0}var c=0,h=(0,em.tmpfile)(),f=null,d=(0,t5._)(function(){return(0,ec._)(this,function(t){switch(t.label){case 0:return[4,h.createWriter()];case 1:return f=t.sent(),c=self.setInterval(function(){u()&&a()},100),[2]}})})(),p=!1;return(0,t5._)(function(){var e,r,n;return(0,ec._)(this,function(o){switch(o.label){case 0:if(p)throw Error("File exported");return p=!0,[4,d];case 1:if(o.sent(),clearInterval(c),!u()||null==f)return[2,null];return t.flush(),[4,a()];case 2:return o.sent(),[4,null==f?void 0:f.close()];case 3:if(o.sent(),null==(e=l.find(function(t){return"moov"===t.type})))return[2,null];return e.mvhd.duration=s,r=(0,em.tmpfile)(),n=_(l,0),[4,(0,em.write)(r,n)];case 4:return o.sent(),[4,(0,em.write)(r,h,{overwrite:!1})];case 5:return o.sent(),[4,r.stream()];case 6:return[2,o.sent()]}})});function _(t,e){if(e>=t.length)return null;var r=new ed.default.DataStream;r.endianness=ed.default.DataStream.BIG_ENDIAN;for(var n=e;nu+h||gc+f)}}]),t}();tx=new WeakMap,tU=new WeakMap,tE=new WeakMap,tk=new WeakMap,tA=new WeakMap,tT=new WeakMap,tC=new WeakSet,tI=function(t,e){var r=this[t]!==e;switch(t){case"x":ex(this,tU,e);break;case"y":ex(this,tE,e);break;case"w":ex(this,tk,e);break;case"h":ex(this,tA,e);break;case"angle":ex(this,tT,e)}r&&ew(this,tx).emit("propsChange",(0,ee._)({},t,e))},tB=new WeakMap;var rp=rd,r_=function(){"use strict";function t(){var e=this;(0,t9._)(this,t),ev(this,"rect",new rp),eS(this,tF,{offset:0,duration:0,playbackRate:1}),eS(this,tz,new(0,ep.EventTool)),ev(this,"on",ew(this,tz).on),eS(this,tP,0),ev(this,"opacity",1),ev(this,"flip",null),eS(this,tL,null),eS(this,tR,null),ev(this,"ready",Promise.resolve()),this.rect.on("propsChange",function(t){ew(e,tz).emit("propsChange",{rect:t})})}return(0,et._)(t,[{key:"time",get:function(){return ew(this,tF)},set:function(t){Object.assign(ew(this,tF),t)}},{key:"zIndex",get:function(){return ew(this,tP)},set:function(t){var e=ew(this,tP)!==t;ex(this,tP,t),e&&ew(this,tz).emit("propsChange",{zIndex:t})}},{key:"_render",value:function(t){var e=this.rect,r=e.center,n=e.angle;t.setTransform("horizontal"===this.flip?-1:1,0,0,"vertical"===this.flip?-1:1,r.x,r.y),t.rotate((null==this.flip?1:-1)*n),t.globalAlpha=this.opacity}},{key:"setAnimation",value:function(t,e){var r,n;ex(this,tL,Object.entries(t).map(function(t){var e,r=(0,eo._)(t,2),n=r[0],s=r[1],a=null!=(e=({from:0,to:100})[n])?e:Number(n.slice(0,-1));if(isNaN(a)||a>100||a<0)throw Error("keyFrame must between 0~100");return[a/100,s]})),ex(this,tR,Object.assign({},ew(this,tR),{duration:e.duration,delay:null!=(r=e.delay)?r:0,iterCount:null!=(n=e.iterCount)?n:1/0}))}},{key:"animate",value:function(t){if(null!=ew(this,tL)&&null!=ew(this,tR)&&!(t=r.iterCount)return{};var s=n%r.duration,a=n===r.duration?1:s/r.duration,o=e.findIndex(function(t){return t[0]>=a});if(-1===o)return{};var l=e[o-1],u=e[o],c=u[1];if(null==l)return c;var h=l[1],f={},d=(a-l[0])/(u[0]-l[0]);for(var p in c)null!=h[p]&&(f[p]=(c[p]-h[p])*d+h[p]);return f}(t,ew(this,tL),ew(this,tR));for(var r in e)switch(r){case"opacity":this.opacity=e[r];break;case"x":case"y":case"w":case"h":case"angle":this.rect[r]=e[r]}}}},{key:"copyStateTo",value:function(t){ex(t,tL,ew(this,tL)),ex(t,tR,ew(this,tR)),t.zIndex=this.zIndex,t.opacity=this.opacity,t.flip=this.flip,t.rect=this.rect.clone(),t.time=(0,es._)({},this.time)}},{key:"destroy",value:function(){ew(this,tz).destroy()}}]),t}();tF=new WeakMap,tz=new WeakMap,tP=new WeakMap,tL=new WeakMap,tR=new WeakMap;var rm=function(t){"use strict";function e(t){var r;return(0,t9._)(this,e),eS(r=(0,t7._)(this,e),tD),eS(r,tM,null),eS(r,tO,!1),ex(r,tD,t),r.ready=t.ready.then(function(t){var e=t.width,n=t.height,s=t.duration;r.rect.w=0===r.rect.w?e:r.rect.w,r.rect.h=0===r.rect.h?n:r.rect.h,r.time.duration=0===r.time.duration?s:r.time.duration}),r}return(0,en._)(e,t),(0,et._)(e,[{key:"offscreenRender",value:function(t,r){var n=this,s=this;return(0,t5._)(function(){var a,o,l,u,c,h,f,d,p,_,m;return(0,ec._)(this,function(y){switch(y.label){case 0:return o=r*s.time.playbackRate,s.animate(o),(0,er._)((0,ei._)(e.prototype),"_render",n).call(s,t),u=(l=s.rect).w,c=l.h,[4,ew(s,tD).tick(o)];case 1:if(f=(h=y.sent()).video,d=h.audio,p=h.state,_=null!=d?d:[],null!=d&&1!==s.time.playbackRate&&(_=d.map(function(t){return eL(t,s.time.playbackRate)})),"done"===p)return[2,{audio:_,done:!0}];return[2,(null!=(m=null!=f?f:ew(s,tM))&&t.drawImage(m,-u/2,-c/2,u,c),null!=f&&(null==(a=ew(s,tM))||a.close(),ex(s,tM,f)),{audio:_,done:!1})]}})})()}},{key:"clone",value:function(){var t=this;return(0,t5._)(function(){var r,n;return(0,ec._)(this,function(s){switch(s.label){case 0:return n=e.bind,[4,ew(t,tD).clone()];case 1:return[4,(r=new(n.apply(e,[void 0,s.sent()]))).ready];case 2:return[2,(s.sent(),t.copyStateTo(r),r)]}})})()}},{key:"destroy",value:function(){var t;ew(this,tO)||(ex(this,tO,!0),ep.Log.info("OffscreenSprite destroy"),(0,er._)((0,ei._)(e.prototype),"destroy",this).call(this),null==(t=ew(this,tM))||t.close(),ex(this,tM,null),ew(this,tD).destroy())}}]),e}(r_);tD=new WeakMap,tM=new WeakMap,tO=new WeakMap;var ry=rm,rg=function(t){"use strict";function e(t){var r;return(0,t9._)(this,e),eS(r=(0,t7._)(this,e),tY),eS(r,tj),ev(r,"visible",!0),eS(r,tN,null),eS(r,tG,[]),eS(r,tW,!1),eS(r,tV,-1),eS(r,tZ,!1),ex(r,tj,t),r.ready=t.ready.then(function(t){var e=t.width,n=t.height,s=t.duration;r.rect.w=0===r.rect.w?e:r.rect.w,r.rect.h=0===r.rect.h?n:r.rect.h,r.time.duration=0===r.time.duration?s:r.time.duration}),r}return(0,en._)(e,t),(0,et._)(e,[{key:"getClip",value:function(){return ew(this,tj)}},{key:"preFrame",value:function(t){eU(this,tY,tH).call(this,t)}},{key:"render",value:function(t,r){this.animate(r),(0,er._)((0,ei._)(e.prototype),"_render",this).call(this,t);var n=this.rect,s=n.w,a=n.h;ew(this,tV)!==r&&eU(this,tY,tH).call(this,r),ex(this,tV,r);var o=ew(this,tG);ex(this,tG,[]);var l=ew(this,tN);return null!=l&&t.drawImage(l,-s/2,-a/2,s,a),{audio:o}}},{key:"copyStateTo",value:function(t){(0,er._)((0,ei._)(e.prototype),"copyStateTo",this).call(this,t),t instanceof e&&(t.visible=this.visible)}},{key:"destroy",value:function(){var t;ew(this,tZ)||(ex(this,tZ,!0),ep.Log.info("VisibleSprite destroy"),(0,er._)((0,ei._)(e.prototype),"destroy",this).call(this),null==(t=ew(this,tN))||t.close(),ex(this,tN,null),ew(this,tj).destroy())}}]),e}(r_);tj=new WeakMap,tN=new WeakMap,tG=new WeakMap,tW=new WeakMap,tY=new WeakSet,tH=function(t){var e=this;ew(this,tW)||(ex(this,tW,!0),ew(this,tj).tick(t*this.time.playbackRate).then(function(t){var r,n=t.video,s=t.audio;null!=n&&(null==(r=ew(e,tN))||r.close(),ex(e,tN,null!=n?n:null)),ex(e,tG,null!=s?s:[]),null!=s&&1!==e.time.playbackRate&&ex(e,tG,s.map(function(t){return eL(t,e.time.playbackRate)}))}).finally(function(){ex(e,tW,!1)}))},tV=new WeakMap,tZ=new WeakMap;var rv=rg,rb=0;function rw(t){return rS.apply(this,arguments)}function rS(){return(rS=(0,t5._)(function(t){var e;return(0,ec._)(this,function(e){switch(e.label){case 0:if(!(t()>50))return[3,3];return[4,ez(15)];case 1:return e.sent(),[4,rw(t)];case 2:e.sent(),e.label=3;case 3:return[2]}})})).apply(this,arguments)}var rx=function(){"use strict";function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,t9._)(this,t),eS(this,t3),eS(this,tX,ep.Log.create("id:".concat(rb++,","))),eS(this,tK,!1),eS(this,tJ,[]),eS(this,tQ),eS(this,tq),eS(this,t$,null),eS(this,t0),eS(this,t1),eS(this,t2,new(0,ep.EventTool)),ev(this,"on",ew(this,t2).on);var r=e.width,n=void 0===r?0:r,s=e.height,a=void 0===s?0:s;ex(this,tQ,new OffscreenCanvas(n,a));var o=ew(this,tQ).getContext("2d",{alpha:!1});if(null==o)throw Error("Can not create 2d offscreen context");ex(this,tq,o),ex(this,t0,Object.assign({bgColor:"#000",width:0,height:0,videoCodec:"avc1.42E032",audio:!0,bitrate:5e6,fps:30,metaDataTags:null},e)),ex(this,t1,n*a>0)}return(0,et._)(t,[{key:"addSprite",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,t5._)(function(){var n,s,a;return(0,ec._)(this,function(o){switch(o.label){case 0:var l,u;return n={rect:(l=["x","y","w","h"],u=t.rect,l.reduce(function(t,e){return t[e]=u[e],t},{})),time:(0,es._)({},t.time),zIndex:t.zIndex},ew(r,tX).info("Combinator add sprite",n),[4,t.clone()];case 1:return s=o.sent(),ew(r,tX).info("Combinator add sprite ready"),ew(r,tJ).push(Object.assign(s,{main:null!=(a=e.main)&&a,expired:!1})),ew(r,tJ).sort(function(t,e){return t.zIndex-e.zIndex}),[2]}})})()}},{key:"output",value:function(){var t,e=this;if(0===ew(this,tJ).length)throw Error("No sprite added");var r=ew(this,tJ).find(function(t){return t.main}),n=null!=r?r.time.offset+r.time.duration:(t=Math).max.apply(t,(0,el._)(ew(this,tJ).map(function(t){return t.time.offset+t.time.duration})));if(n===1/0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of ImgClip, AudioCli");-1===n&&ew(this,tX).warn("Unable to determine the end time, process value don't update"),ew(this,tX).info("start combinate video, maxTime:".concat(n));var s=eU(this,t3,t4).call(this,n),a=performance.now(),o=this,l=eU(this,t3,t6).call(this,s,n,{onProgress:function(t){ew(e,tX).debug("OutputProgress:",t),ew(e,t2).emit("OutputProgress",t)},onEnded:(0,t5._)(function(){return(0,ec._)(this,function(t){switch(t.label){case 0:return[4,s.flush()];case 1:return t.sent(),ew(o,tX).info("===== output ended =====, cost:",performance.now()-a),ew(o,t2).emit("OutputProgress",1),o.destroy(),[2]}})}),onError:function(t){ew(e,t2).emit("error",t),h(t),e.destroy()}});ex(this,t$,function(){l(),s.close(),h()});var u=(0,ep.file2stream)(s.mp4file,500,this.destroy),c=u.stream,h=u.stop;return c}},{key:"destroy",value:function(){var t;ew(this,tK)||(ex(this,tK,!0),null==(t=ew(this,t$))||t.call(this),ew(this,t2).destroy())}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,t5._)(function(){var e,r,n,s,a,o,l,u;return(0,ec._)(this,function(c){switch(c.label){case 0:if(!(u=null!=self.OffscreenCanvas&&null!=self.VideoEncoder&&null!=self.VideoDecoder&&null!=self.VideoFrame&&null!=self.AudioEncoder&&null!=self.AudioDecoder&&null!=self.AudioData))return[3,2];return[4,self.VideoEncoder.isConfigSupported({codec:null!=(e=t.videoCodec)?e:"avc1.42E032",width:null!=(r=t.width)?r:1920,height:null!=(n=t.height)?n:1080,bitrate:null!=(s=t.bitrate)?s:7e6})];case 1:u=null!=(a=c.sent().supported)&&a,c.label=2;case 2:if(!(l=u))return[3,4];return[4,self.AudioEncoder.isConfigSupported({codec:eR.codec,sampleRate:eR.sampleRate,numberOfChannels:eR.channelCount})];case 3:l=c.sent().supported,c.label=4;case 4:return[2,null!=(o=l)&&o]}})})()}}]),t}();tX=new WeakMap,tK=new WeakMap,tJ=new WeakMap,tQ=new WeakMap,tq=new WeakMap,t$=new WeakMap,t0=new WeakMap,t1=new WeakMap,t2=new WeakMap,t3=new WeakSet,t4=function(t){var e=ew(this,t0),r=e.fps,n=e.width,s=e.height,a=e.videoCodec,o=e.bitrate,l=e.audio,u=e.metaDataTags;return(0,ep.recodemux)({video:ew(this,t1)?{width:n,height:s,expectFPS:r,codec:a,bitrate:o,__unsafe_hardwareAcceleration__:ew(this,t0).__unsafe_hardwareAcceleration__}:null,audio:!1===l?null:{codec:"aac",sampleRate:eR.sampleRate,channelCount:eR.channelCount},duration:t,metaDataTags:u})},t6=function(t,e,r){var n=this,s=r.onProgress,a=r.onEnded,o=r.onError,l=0,u={aborted:!1},c=null,h=this;(0,t5._)(function(){var r,n,s,o,f,p,_,m,y,g,v;return(0,ec._)(this,function(b){switch(b.label){case 0:var w,S,x,U,E,k,A,T,C,I,B,F,z,P,L,R,D,M,O,j,N,G,W,Y,H,V,Z,X,K;n=(r=ew(h,t0)).fps,s=r.bgColor,o=r.audio,f=Math.round(1e6/n),x=(w={ctx:p=ew(h,tq),bgColor:s,sprites:ew(h,tJ),aborter:u}).ctx,U=w.bgColor,E=w.sprites,k=w.aborter,T=(A=x.canvas).width,C=A.height,S=(0,t5._)(function(t){var e,r,n,s,a,o,l,u,c,h,f,d;return(0,ec._)(this,function(p){switch(p.label){case 0:x.fillStyle=U,x.fillRect(0,0,T,C),e=[],r=!1,n=!0,s=!1,a=void 0,p.label=1;case 1:p.trys.push([1,6,7,8]),o=E[Symbol.iterator](),p.label=2;case 2:if((n=(l=o.next()).done)||(u=l.value,k.aborted))return[3,5];if(t0&&t>u.time.offset+u.time.duration||f)&&(u.main&&(r=!0),u.destroy(),u.expired=!0),p.label=4;case 4:return n=!0,[3,2];case 5:return[3,8];case 6:return d=p.sent(),s=!0,a=d,[3,8];case 7:try{n||null==o.return||o.return()}finally{if(s)throw a}return[7];case 8:return[2,{audios:e,mainSprDone:r}]}})}),_=function(t){return S.apply(this,arguments)},O=(I={remux:t,ctx:p,cvs:ew(h,tQ),outputAudio:o,hasVideoTrack:ew(h,t1),timeSlice:f,fps:n}).ctx,j=I.cvs,N=I.outputAudio,G=I.remux,W=I.hasVideoTrack,Y=I.timeSlice,H=j.width,V=j.height,Z=0,X=Math.floor(3*I.fps),K=(B=1024,z=new Float32Array(3*(F=1024*eR.channelCount)),P=0,L=0,R=B/eR.sampleRate*1e6,D=new Float32Array(F),M=function(t){for(var e=0,r=Math.floor(P/F),n=[],s=0;sR;)n.push(new AudioData({timestamp:L,numberOfChannels:eR.channelCount,numberOfFrames:B,sampleRate:eR.sampleRate,format:"f32",data:D})),L+=R;return n},function(t,e){for(var r=(l=Math).max.apply(l,(0,el._)(e.map(function(t){var e,r;return null!=(r=null==(e=t[0])?void 0:e.length)?r:0}))),n=0;ne||0===ew(h,tJ).length))return[3,3];return d(),[4,a()];case 2:case 5:return b.sent(),[2];case 3:return l=y/e,[4,_(y)];case 4:if(v=(g=b.sent()).audios,!g.mainSprDone)return[3,6];return d(),[4,a()];case 6:if(u.aborted)return[2];return m(y,v),y+=f,[4,rw(t.getEncodeQueueSize)];case 7:b.sent(),b.label=8;case 8:return[3,1];case 9:return[2]}})})().catch(function(t){c=t,ew(n,tX).error(t),d(),o(t)});var f=setInterval(function(){s(l)},500),d=function(){u.aborted||(u.aborted=!0,clearInterval(f),ew(n,tJ).forEach(function(t){return t.destroy()}))};return d}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_define_property":"3NGsL","@swc/helpers/_/_get":"hMhPd","@swc/helpers/_/_get_prototype_of":"dAKgy","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","@swc/helpers/_/_ts_values":"1Y0br","@webav/mp4box.js":"4DT2A","@webav/internal-utils":"iUw0l","wave-resampler":"7uqUv","opfs-tools":"15Czp","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jZCCG:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"_",function(){return u});var a=t("./_get_prototype_of.js"),o=t("./_is_native_reflect_construct.js"),l=t("./_possible_constructor_return.js");function u(t,e,r){return e=(0,a._)(e),(0,l._)(t,(0,o._)()?Reflect.construct(e,r||[],(0,a._)(t).constructor):e.apply(t,r))}},{"./_get_prototype_of.js":"dAKgy","./_is_native_reflect_construct.js":"7fioR","./_possible_constructor_return.js":"iVdhB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dAKgy:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7fioR":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iVdhB:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"_",function(){return l});var a=t("./_assert_this_initialized.js"),o=t("./_type_of.js");function l(t,e){return e&&("object"===(0,o._)(e)||"function"==typeof e)?e:(0,a._)(t)}},{"./_assert_this_initialized.js":"jgeid","./_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9iJMm":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=Array(e);r=a&&console.debug("["+l.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)},log:function(t,e){this.debug(t.msg)},info:function(t,e){2>=a&&console.info("["+l.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)},warn:function(t,e){3>=a&&console.warn("["+l.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)},error:function(t,e){4>=a&&console.error("["+l.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)}});l.getDurationString=function(t,e){function r(t,e){for(var r=(""+t).split(".");r[0].length0))return"(empty)";for(var r="",n=0;n0&&(r+=","),r+="["+l.getDurationString(t.start(n))+","+l.getDurationString(t.end(n))+"]";return r},r.Log=l;var u=function(t){if(t instanceof ArrayBuffer)this.buffer=t,this.dataview=new DataView(t);else throw"Needs an array buffer";this.position=0};u.prototype.getPosition=function(){return this.position},u.prototype.getEndPosition=function(){return this.buffer.byteLength},u.prototype.getLength=function(){return this.buffer.byteLength},u.prototype.seek=function(t){var e=Math.max(0,Math.min(this.buffer.byteLength,t));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},u.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},u.prototype.readAnyInt=function(t,e){var r=0;if(this.position+t<=this.buffer.byteLength){switch(t){case 1:r=e?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=e?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16|this.dataview.getUint8(this.position+1)<<8|this.dataview.getUint8(this.position+2);break;case 4:r=e?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32|this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+t}return this.position+=t,r}throw"Not enough bytes in buffer"},u.prototype.readUint8=function(){return this.readAnyInt(1,!1)},u.prototype.readUint16=function(){return this.readAnyInt(2,!1)},u.prototype.readUint24=function(){return this.readAnyInt(3,!1)},u.prototype.readUint32=function(){return this.readAnyInt(4,!1)},u.prototype.readUint64=function(){return this.readAnyInt(8,!1)},u.prototype.readString=function(t){if(this.position+t<=this.buffer.byteLength){for(var e="",r=0;rthis._byteLength&&(this._byteLength=e);return}for(r<1&&(r=1);e>r;)r*=2;var n=new ArrayBuffer(r),s=new Uint8Array(this._buffer);new Uint8Array(n,0,s.length).set(s),this.buffer=n,this._byteLength=e}},c.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},c.BIG_ENDIAN=!1,c.LITTLE_ENDIAN=!0,c.prototype._byteLength=0,Object.defineProperty(c.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(c.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(c.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(c.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),c.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},c.prototype.isEof=function(){return this.position>=this._byteLength},c.prototype.mapUint8Array=function(t){this._realloc(+t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=+t,e},c.prototype.readInt32Array=function(t,e){var r=new Int32Array(t=null==t?this.byteLength-this.position/4:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readInt16Array=function(t,e){var r=new Int16Array(t=null==t?this.byteLength-this.position/2:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readInt8Array=function(t){var e=new Int8Array(t=null==t?this.byteLength-this.position:t);return c.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},c.prototype.readUint32Array=function(t,e){var r=new Uint32Array(t=null==t?this.byteLength-this.position/4:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readUint16Array=function(t,e){var r=new Uint16Array(t=null==t?this.byteLength-this.position/2:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readUint8Array=function(t){var e=new Uint8Array(t=null==t?this.byteLength-this.position:t);return c.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},c.prototype.readFloat64Array=function(t,e){var r=new Float64Array(t=null==t?this.byteLength-this.position/8:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readFloat32Array=function(t,e){var r=new Float32Array(t=null==t?this.byteLength-this.position/4:t);return c.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),c.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},c.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null==t?this.endianness:t);return this.position+=4,e},c.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null==t?this.endianness:t);return this.position+=2,e},c.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},c.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null==t?this.endianness:t);return this.position+=4,e},c.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null==t?this.endianness:t);return this.position+=2,e},c.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},c.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null==t?this.endianness:t);return this.position+=4,e},c.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null==t?this.endianness:t);return this.position+=8,e},c.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,c.memcpy=function(t,e,r,n,s){var a=new Uint8Array(t,e,s),o=new Uint8Array(r,n,s);a.set(o)},c.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},c.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},c.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;rs;n--,s++){var a=e[s];e[s]=e[n],e[n]=a}return t},c.prototype.failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=[],r=0;r>16),this.writeUint8((65280&t)>>8),this.writeUint8(255&t)},c.prototype.adjustUint32=function(t,e){var r=this.position;this.seek(t),this.writeUint32(e),this.seek(r)},c.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},c.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},c.prototype.mapInt8Array=function(t){this._realloc(+t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=+t,e},c.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},c.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},c.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=8*t,r},c.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return c.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r};var h=function(t){this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)};h.prototype=new c(new ArrayBuffer,0,c.BIG_ENDIAN),h.prototype.initialized=function(){var t;return!!(this.bufferIndex>-1)||(this.buffers.length>0?0===(t=this.buffers[0]).fileStart?(this.buffer=t,this.bufferIndex=0,l.debug("MultiBufferStream","Stream ready for parsing"),!0):(l.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(l.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(t,e){l.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r.buffer},h.prototype.reduceBuffer=function(t,e,r){var n;return(n=new Uint8Array(r)).set(new Uint8Array(t,e,r)),n.buffer.fileStart=t.fileStart+e,n.buffer.usedBytes=0,n.buffer},h.prototype.insertBuffer=function(t){for(var e=!0,r=0;rn.byteLength){this.buffers.splice(r,1),r--;continue}else l.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring");else t.fileStart+t.byteLength<=n.fileStart||(t=this.reduceBuffer(t,0,n.fileStart-t.fileStart)),l.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(r,0,t),0===r&&(this.buffer=t);e=!1;break}if(t.fileStart0)t=this.reduceBuffer(t,s,a);else{e=!1;break}}}e&&(l.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),0===r&&(this.buffer=t))},h.prototype.logBufferLevel=function(t){var e,r,n,s,a,o=[],u="";for(e=0,n=0,s=0;e0&&(u+=a.end-1+"]"),(t?l.info:l.debug)("MultiBufferStream",0===this.buffers.length?"No more buffer in memory":""+this.buffers.length+" stored buffer(s) ("+n+"/"+s+" bytes), continuous ranges: "+u)},h.prototype.cleanBuffers=function(){var t,e;for(t=0;t"+this.buffer.byteLength+")"),!0},h.prototype.findPosition=function(t,e,r){var n,s=null,a=-1;for(n=!0===t?0:this.bufferIndex;n=e?(l.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1},h.prototype.findEndContiguousBuf=function(t){var e,r,n,s=void 0!==t?t:this.bufferIndex;if(r=this.buffers[s],this.buffers.length>s+1)for(e=s+1;e>3;return 31===n&&r.data.length>=2&&(n=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),n},r.DecoderConfigDescriptor=function(t){r.Descriptor.call(this,4,t)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.upStream=(this.streamType>>1&1)!=0,this.streamType=this.streamType>>>2,this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)},r.DecoderSpecificInfo=function(t){r.Descriptor.call(this,5,t)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(t){r.Descriptor.call(this,6,t)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};r.MPEG4DescriptorParser=f;var d={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){d.FullBox.prototype=new d.Box,d.ContainerBox.prototype=new d.Box,d.SampleEntry.prototype=new d.Box,d.TrackGroupTypeBox.prototype=new d.FullBox,d.BASIC_BOXES.forEach(function(t){d.createBoxCtor(t)}),d.FULL_BOXES.forEach(function(t){d.createFullBoxCtor(t)}),d.CONTAINER_BOXES.forEach(function(t){d.createContainerBoxCtor(t[0],null,t[1])})},Box:function(t,e,r){this.type=t,this.size=e,this.uuid=r},FullBox:function(t,e,r){d.Box.call(this,t,e,r),this.flags=0,this.version=0},ContainerBox:function(t,e,r){d.Box.call(this,t,e,r),this.boxes=[]},SampleEntry:function(t,e,r,n){d.ContainerBox.call(this,t,e),this.hdr_size=r,this.start=n},SampleGroupEntry:function(t){this.grouping_type=t},TrackGroupTypeBox:function(t,e){d.FullBox.call(this,t,e)},createBoxCtor:function(t,e){d.boxCodes.push(t),d[t+"Box"]=function(e){d.Box.call(this,t,e)},d[t+"Box"].prototype=new d.Box,e&&(d[t+"Box"].prototype.parse=e)},createFullBoxCtor:function(t,e){d[t+"Box"]=function(e){d.FullBox.call(this,t,e)},d[t+"Box"].prototype=new d.FullBox,d[t+"Box"].prototype.parse=function(t){this.parseFullHeader(t),e&&e.call(this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,r=0;rr?(l.error("BoxParser","Box of type '"+h+"' has a size "+c+" greater than its container size "+r),{code:d.ERR_NOT_ENOUGH_DATA,type:h,size:c,hdr_size:u,start:o}):0!==c&&o+c>t.getEndPosition()?(t.seek(o),l.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:d.ERR_NOT_ENOUGH_DATA,type:h,size:c,hdr_size:u,start:o}):e?{code:d.OK,type:h,size:c,hdr_size:u,start:o}:(d[h+"Box"]?n=new d[h+"Box"](c):"uuid"!==h?(l.warn("BoxParser","Unknown box type: '"+h+"'"),(n=new d.Box(h,c)).has_unparsed_data=!0):d.UUIDBoxes[a]?n=new d.UUIDBoxes[a](c):(l.warn("BoxParser","Unknown uuid type: '"+a+"'"),(n=new d.Box(h,c)).uuid=a,n.has_unparsed_data=!0),n.hdr_size=u,n.start=o,n.write===d.Box.prototype.write&&"mdat"!==n.type&&(l.info("BoxParser","'"+f+"' box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(t)),n.parse(t),(s=t.getPosition()-(n.start+n.size))<0?(l.warn("BoxParser","Parsing of box '"+f+"' did not read the entire indicated box data size (missing "+-s+" bytes), seeking forward"),t.seek(n.start+n.size)):s>0&&(l.error("BoxParser","Parsing of box '"+f+"' read "+s+" more bytes than the indicated box data size, seeking backwards"),0!==n.size&&t.seek(n.start+n.size)),{code:d.OK,box:n,size:n.size})},d.Box.prototype.parse=function(t){"mdat"!=this.type?this.data=t.readUint8Array(this.size-this.hdr_size):0===this.size?t.seek(t.getEndPosition()):t.seek(this.start+this.size)},d.Box.prototype.parseDataAndRewind=function(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.position-=this.size-this.hdr_size},d.FullBox.prototype.parseDataAndRewind=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.position-=this.size-this.hdr_size},d.FullBox.prototype.parseFullHeader=function(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4},d.FullBox.prototype.parse=function(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},d.ContainerBox.prototype.parse=function(t){for(;t.getPosition()>10&31,e[1]=this.language>>5&31,e[2]=31&this.language,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},d.SAMPLE_ENTRY_TYPE_VISUAL="Visual",d.SAMPLE_ENTRY_TYPE_AUDIO="Audio",d.SAMPLE_ENTRY_TYPE_HINT="Hint",d.SAMPLE_ENTRY_TYPE_METADATA="Metadata",d.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",d.SAMPLE_ENTRY_TYPE_SYSTEM="System",d.SAMPLE_ENTRY_TYPE_TEXT="Text",d.SampleEntry.prototype.parseHeader=function(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8},d.SampleEntry.prototype.parse=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)},d.SampleEntry.prototype.parseDataAndRewind=function(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.position-=this.size-this.hdr_size},d.SampleEntry.prototype.parseFooter=function(t){d.ContainerBox.prototype.parse.call(this,t)},d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_HINT),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_METADATA),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SUBTITLE),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SYSTEM),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,function(t){var e;this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16(),e=Math.min(31,t.readUint8()),this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,function(t){this.parseHeader(t),t.readUint32Array(2),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,this.parseFooter(t)}),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"fLaC"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT,"enct"),d.createEncryptedSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_METADATA,"encm"),d.createBoxCtor("a1lx",function(t){var e=((1&(1&t.readUint8()))+1)*16;this.layer_size=[];for(var r=0;r<3;r++)16==e?this.layer_size[r]=t.readUint16():this.layer_size[r]=t.readUint32()}),d.createBoxCtor("a1op",function(t){this.op_index=t.readUint8()}),d.createFullBoxCtor("auxC",function(t){this.aux_type=t.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}),d.createBoxCtor("av1C",function(t){var e=t.readUint8();if(e>>7&!1)return void l.error("av1C marker problem");if(this.version=127&e,1!==this.version)return void l.error("av1C version "+this.version+" not supported");if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=31&e,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=3&e,e=t.readUint8(),this.reserved_1=e>>5&7,0!==this.reserved_1)return void l.error("av1C reserved_1 parsing problem");if(this.initial_presentation_delay_present=e>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&e;else if(this.reserved_2=15&e,0!==this.reserved_2)return void l.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(r)}),d.createBoxCtor("avcC",function(t){var e,r;for(e=0,this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=3&t.readUint8(),this.nb_SPS_nalus=31&t.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[];e0&&(this.ext=t.readUint8Array(r))}),d.createBoxCtor("btrt",function(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}),d.createFullBoxCtor("ccst",function(t){var e=t.readUint8();this.all_ref_pics_intra=(128&e)==128,this.intra_pred_used=(64&e)==64,this.max_ref_per_pic=(63&e)>>2,t.readUint24()}),d.createBoxCtor("cdef",function(t){var e;for(e=0,this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[];e=32768&&this.component_type_urls.push(t.readCString())}}),d.createFullBoxCtor("co64",function(t){var e,r;if(e=t.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else"rICC"===this.colour_type?this.ICC_profile=t.readUint8Array(this.size-4):"prof"===this.colour_type&&(this.ICC_profile=t.readUint8Array(this.size-4))}),d.createFullBoxCtor("cprt",function(t){this.parseLanguage(t),this.notice=t.readCString()}),d.createFullBoxCtor("cslg",function(t){0===this.version&&(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32())}),d.createFullBoxCtor("ctts",function(t){if(e=t.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=e>>1&31,this.bsmod=(1&e)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|n>>5&7}),d.createBoxCtor("dec3",function(t){var e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=7&e,this.ind_subs=[];for(var r=0;r>6,n.bsid=s>>1&31,n.bsmod=(1&s)<<4|a>>4&15,n.acmod=a>>1&7,n.lfeon=1&a,n.num_dep_sub=o>>1&15,n.num_dep_sub>0&&(n.chan_loc=(1&o)<<8|t.readUint8())}}),d.createFullBoxCtor("dfLa",function(t){for(var e=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];;){var n=t.readUint8(),s=Math.min(127&n,r.length-1);if(s?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),e.push(r[s]),128&n)break}this.numMetadataBlocks=e.length+" ("+e.join(", ")+")"}),d.createBoxCtor("dimm",function(t){this.bytessent=t.readUint64()}),d.createBoxCtor("dmax",function(t){this.time=t.readUint32()}),d.createBoxCtor("dmed",function(t){this.bytessent=t.readUint64()}),d.createBoxCtor("dOps",function(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(var e=0;e=4;)this.compatible_brands[r]=t.readString(4),e-=4,r++}),d.createFullBoxCtor("hdlr",function(t){0===this.version&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),this.name=t.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))}),d.createBoxCtor("hvcC",function(t){this.configurationVersion=t.readUint8(),s=t.readUint8(),this.general_profile_space=s>>6,this.general_tier_flag=(32&s)>>5,this.general_profile_idc=31&s,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),this.chroma_format_idc=3&t.readUint8(),this.bit_depth_luma_minus8=7&t.readUint8(),this.bit_depth_chroma_minus8=7&t.readUint8(),this.avgFrameRate=t.readUint16(),s=t.readUint8(),this.constantFrameRate=s>>6,this.numTemporalLayers=(13&s)>>3,this.temporalIdNested=(4&s)>>2,this.lengthSizeMinusOne=3&s,this.nalu_arrays=[];var e,r,n,s,a=t.readUint8();for(e=0;e>7,o.nalu_type=63&s;var l=t.readUint16();for(r=0;r>4&15,this.length_size=15&e,e=t.readUint8(),this.base_offset_size=e>>4&15,1===this.version||2===this.version?this.index_size=15&e:this.index_size=0,this.items=[];var e,r=0;if(this.version<2)r=t.readUint16();else if(2===this.version)r=t.readUint32();else throw"version of iloc box not supported";for(var n=0;n>7,this.axis=1&e}),d.createFullBoxCtor("infe",function(t){if((0===this.version||1===this.version)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.content_encoding=t.readCString()),1===this.version){this.extension_type=t.readString(4),l.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(2===this.version?this.item_ID=t.readUint16():3===this.version&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),"mime"===this.item_type?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):"uri "===this.item_type&&(this.item_uri_type=t.readCString()))}),d.createFullBoxCtor("ipma",function(t){var e,r;for(e=0,entry_count=t.readUint32(),this.associations=[];e>7==1,1&this.flags?o.property_index=(127&a)<<8|t.readUint8():o.property_index=127&a}}}),d.createFullBoxCtor("iref",function(t){var e,r;for(this.references=[];t.getPosition()>7,n.assignment_type=127&s,n.assignment_type){case 0:n.grouping_type=t.readString(4);break;case 1:n.grouping_type=t.readString(4),n.grouping_type_parameter=t.readUint32();break;case 2:case 3:break;case 4:n.sub_track_id=t.readUint32();break;default:l.warn("BoxParser","Unknown leva assignement type")}}}),d.createBoxCtor("lhvC",function(t){this.configurationVersion=t.readUint8(),this.min_spatial_segmentation_idc=4095&t.readUint16(),this.parallelismType=3&t.readUint8(),n=t.readUint8(),this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var e,r,n,s=t.readUint8();for(e=0;e>7,a.nalu_type=63&n;var o=t.readUint16();for(r=0;r>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readUint32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}),d.createBoxCtor("npck",function(t){this.packetssent=t.readUint32()}),d.createBoxCtor("nump",function(t){this.packetssent=t.readUint64()}),d.createFullBoxCtor("padb",function(t){var e=t.readUint32();this.padbits=[];for(var r=0;r0){var e=t.readUint32();this.kid=[];for(var r=0;r0&&(this.data=t.readUint8Array(n))}),d.createFullBoxCtor("clef",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createFullBoxCtor("enof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createFullBoxCtor("prof",function(t){this.width=t.readUint32(),this.height=t.readUint32()}),d.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),d.createBoxCtor("rtp ",function(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}),d.createFullBoxCtor("saio",function(t){1&this.flags&&(this.aux_info_type=t.readUint32(),this.aux_info_type_parameter=t.readUint32());var e=t.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];for(var r=t.readUint8(),n=0;n>7,this.num_leading_samples=127&e}),d.createSampleGroupCtor("rash",function(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)l.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e>4,this.skip_byte_block=15&e,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=d.parseHex16(t),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}),d.createSampleGroupCtor("stsa",function(t){l.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("sync",function(t){var e=t.readUint8();this.NAL_unit_type=63&e}),d.createSampleGroupCtor("tele",function(t){var e=t.readUint8();this.level_independently_decodable=e>>7}),d.createSampleGroupCtor("tsas",function(t){l.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("tscl",function(t){l.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createSampleGroupCtor("vipr",function(t){l.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),d.createFullBoxCtor("sbgp",function(t){this.grouping_type=t.readString(4),1===this.version?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=t.readUint32(),r=0;r>6,this.sample_depends_on[n]=e>>4&3,this.sample_is_depended_on[n]=e>>2&3,this.sample_has_redundancy[n]=3&e}),d.createFullBoxCtor("senc"),d.createFullBoxCtor("sgpd",function(t){this.grouping_type=t.readString(4),l.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];for(var e,r=t.readUint32(),n=0;n>31&1,n.referenced_size=0x7fffffff&s,n.subsegment_duration=t.readUint32(),n.starts_with_SAP=(s=t.readUint32())>>31&1,n.SAP_type=s>>28&7,n.SAP_delta_time=0xfffffff&s}}),d.SingleItemTypeReferenceBox=function(t,e,r,n){d.Box.call(this,t,e),this.hdr_size=r,this.start=n},d.SingleItemTypeReferenceBox.prototype=new d.Box,d.SingleItemTypeReferenceBox.prototype.parse=function(t){this.from_item_ID=t.readUint16();var e=t.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[e+1]=15&n}else if(8===this.field_size)for(e=0;e0)for(r=0;r>4&15,this.default_skip_byte_block=15&e}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=d.parseHex16(t),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}),d.createFullBoxCtor("tfdt",function(t){1==this.version?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}),d.createFullBoxCtor("tfhd",function(t){var e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&d.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}),d.createFullBoxCtor("tfra",function(t){this.track_ID=t.readUint32(),t.readUint24();var e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=3&e,this.entries=[];for(var r=t.readUint32(),n=0;n>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}),d.createBoxCtor("tmax",function(t){this.time=t.readUint32()}),d.createBoxCtor("tmin",function(t){this.time=t.readUint32()}),d.createBoxCtor("totl",function(t){this.bytessent=t.readUint32()}),d.createBoxCtor("tpay",function(t){this.bytessent=t.readUint32()}),d.createBoxCtor("tpyl",function(t){this.bytessent=t.readUint64()}),d.TrackGroupTypeBox.prototype.parse=function(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()},d.createTrackGroupCtor("msrc"),d.TrackReferenceTypeBox=function(t,e,r,n){d.Box.call(this,t,e),this.hdr_size=r,this.start=n},d.TrackReferenceTypeBox.prototype=new d.Box,d.TrackReferenceTypeBox.prototype.parse=function(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)},d.trefBox.prototype.parse=function(t){for(var e,r;t.getPosition()e&&this.flags&d.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&d.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=t.readUint32(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}}),d.createFullBoxCtor("url ",function(t){1!==this.flags&&(this.location=t.readCString())}),d.createFullBoxCtor("urn ",function(t){this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}),d.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(t){this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}),d.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(t){this.system_id=d.parseHex16(t);var e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}),d.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),d.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(t){this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=d.parseHex16(t)}),d.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(t){this.fragment_count=t.readUint8(),this.entries=[];for(var e=0;e>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=1&e,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8()):(this.profile=t.readUint8(),this.level=t.readUint8(),e=t.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=1&e),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}),d.createBoxCtor("vttC",function(t){this.text=t.readString(this.size-this.hdr_size)}),d.createFullBoxCtor("vvcC",function(t){var e,r,n={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){this.held_bits=t.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(t){this.held_bits=t.readUint16(),this.num_held_bits=16},extract_bits:function(t){var e=this.held_bits>>this.num_held_bits-t&(1<1){for(n.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=n.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)n.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;e+=d.decimalToHex(n,0),e+=".",0===this.hvcC.general_tier_flag?e+="L":e+="H",e+=this.hvcC.general_level_idc;var s=!1,a="";for(t=5;t>=0;t--)(this.hvcC.general_constraint_indicator[t]||s)&&(a="."+d.decimalToHex(this.hvcC.general_constraint_indicator[t],0)+a,s=!0);e+=a}return e},d.vvc1SampleEntry.prototype.getCodec=d.vvi1SampleEntry.prototype.getCodec=function(){var t=d.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var e="";if(this.vvcC.general_constraint_info){var r,n,s,a=[];for(n=0,r=this.vvcC.ptl_frame_only_constraint<<7|this.vvcC.ptl_multilayer_enabled<<6;n>2&63,a.push(r),r&&(s=n),r=this.vvcC.general_constraint_info[n]>>2&3;if(void 0===s)e=".CA";else{e=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l=0,u=0;for(n=0;n<=s;++n)for(l=l<<8|a[n],u+=8;u>=5;)e+=o[l>>u-5&31],u-=5,l&=(1<0x100000000&&(this.size+=8),"uuid"===this.type&&(this.size+=16),l.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.size>0x100000000?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,null,4),"uuid"===this.type&&t.writeUint8Array(this.uuid),this.size>0x100000000&&t.writeUint64(this.size)},d.FullBox.prototype.writeHeader=function(t){this.size+=4,d.Box.prototype.writeHeader.call(this,t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)},d.Box.prototype.write=function(t){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(t),t.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data))},d.ContainerBox.prototype.write=function(t){this.size=0,this.writeHeader(t);for(var e=0;e=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length),e=0;e0)for(e=0;e+10xffffffff),this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(t),1===this.version?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)},d.tfhdBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&d.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&d.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&d.TFHD_FLAG_BASE_DATA_OFFSET&&t.writeUint64(this.base_data_offset),this.flags&d.TFHD_FLAG_SAMPLE_DESC&&t.writeUint32(this.default_sample_description_index),this.flags&d.TFHD_FLAG_SAMPLE_DUR&&t.writeUint32(this.default_sample_duration),this.flags&d.TFHD_FLAG_SAMPLE_SIZE&&t.writeUint32(this.default_sample_size),this.flags&d.TFHD_FLAG_SAMPLE_FLAGS&&t.writeUint32(this.default_sample_flags)},d.tkhdBox.prototype.write=function(t){this.version=0,this.size=80,this.writeHeader(t),t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration),t.writeUint32(0),t.writeUint32(0),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeUint16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)},d.trexBox.prototype.write=function(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)},d.trunBox.prototype.write=function(t){this.version=0,this.size=4,this.flags&d.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&d.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&d.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&d.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&d.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&d.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&d.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&d.TRUN_FLAGS_FIRST_FLAG&&t.writeUint32(this.first_sample_flags);for(var e=0;e-1)continue;else if(t[r]instanceof d.Box||e[r]instanceof d.Box)continue;else if(void 0===t[r]||void 0===e[r])continue;else if("function"==typeof t[r]||"function"==typeof e[r])continue;else if(t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1)continue;else if("data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r)continue;else if(d.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1)continue;else if(t[r]!==e[r])return!1;return!0},d.boxEqual=function(t,e){if(!d.boxEqualFields(t,e))return!1;for(var r=0;r=e?t:Array(e-t.length+1).join(r)+t}function s(t){var e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),s=Math.floor(t-3600*e-60*r),a=Math.floor((t-3600*e-60*r-s)*1e3);return""+n(e,2)+":"+n(r,2)+":"+n(s,2)+"."+n(a,3)}for(var a=this.parseSample(r),o="",l=0;l1)for(e=1;e-1&&this.fragmentedTracks.splice(e,1)},v.prototype.setExtractionOptions=function(t,e,r){var n=this.getTrackById(t);if(n){var s={};this.extractedTracks.push(s),s.id=t,s.user=e,s.trak=n,n.nextSample=0,s.nb_samples=1e3,s.samples=[],r&&r.nbSamples&&(s.nb_samples=r.nbSamples)}},v.prototype.unsetExtractionOptions=function(t){for(var e=-1,r=0;r-1&&this.extractedTracks.splice(e,1)},v.prototype.parse=function(){var t,e,r;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat())if(this.processIncompleteMdat())continue;else return;else{if(this.saveParsePosition&&this.saveParsePosition(),(t=d.parseOneBox(this.stream,!1)).code===d.ERR_NOT_ENOUGH_DATA)if(!this.processIncompleteBox)return;else if(this.processIncompleteBox(t))continue;else return;switch(r="uuid"!==(e=t.box).type?e.type:e.uuid,this.boxes.push(e),r){case"mdat":this.mdats.push(e);break;case"moof":this.moofs.push(e);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&l.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=e}this.updateUsedBytes&&this.updateUsedBytes(e,t)}},v.prototype.checkBuffer=function(t){if(null==t)throw"Buffer must be defined and non empty";if(void 0===t.fileStart)throw"Buffer must have a fileStart property";return 0===t.byteLength?(l.warn("ISOFile","Ignoring empty buffer (fileStart: "+t.fileStart+")"),this.stream.logBufferLevel(),!1):(l.info("ISOFile","Processing buffer (fileStart: "+t.fileStart+")"),t.usedBytes=0,this.stream.insertBuffer(t),this.stream.logBufferLevel(),!!this.stream.initialized()||(l.warn("ISOFile","Not ready to start parsing"),!1))},v.prototype.appendBuffer=function(t,e){var r;if(this.checkBuffer(t))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(l.info("ISOFile","Done processing buffer (fileStart: "+t.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),l.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},v.prototype.getInfo=function(){var t,e,r,n,s,a,o={},l=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(l+1e3*this.moov.mvhd.creation_time),o.modified=new Date(l+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],t=0;t0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',t=0;t=r.samples.length)&&(l.info("ISOFile","Sending fragmented data on track #"+n.id+" for samples ["+Math.max(0,r.nextSample-n.nb_samples)+","+(r.nextSample-1)+"]"),l.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(n.id,n.user,n.segmentStream.buffer,r.nextSample,t||r.nextSample>=r.samples.length),n.segmentStream=null,n!==this.fragmentedTracks[e]))break}}if(null!==this.onSamples)for(e=0;e=r.samples.length)&&(l.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[e]))break}}}},v.prototype.getBox=function(t){var e=this.getBoxes(t,!0);return e.length?e[0]:null},v.prototype.getBoxes=function(t,e){var r=[];return v._sweep.call(this,t,r,e),r},v._sweep=function(t,e,r){for(var n in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&r)return;v._sweep.call(this.boxes[n],t,e,r)}},v.prototype.getTrackSamplesInfo=function(t){var e=this.getTrackById(t);return e?e.samples:void 0},v.prototype.getTrackSample=function(t,e){var r=this.getTrackById(t);return this.getSample(r,e)},v.prototype.releaseUsedSamples=function(t,e){var r=0,n=this.getTrackById(t);n.lastValidSample||(n.lastValidSample=0);for(var s=n.lastValidSample;st*s.timescale){c=n-1;break}e&&s.is_sync&&(u=n)}for(e&&(c=u),t=r.samples[c].cts,r.nextSample=c;r.samples[c].alreadyRead===r.samples[c].size&&r.samples[c+1];)c++;return o=r.samples[c].offset+r.samples[c].alreadyRead,l.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+l.getDurationString(t,a)+" and offset: "+o),{offset:o,time:t/a}},v.prototype.getTrackDuration=function(t){var e;return t.samples?((e=t.samples[t.samples.length-1]).cts+e.duration)/e.timescale:1/0},v.prototype.seek=function(t,e){var r,n,s,a=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(s=0;sthis.getTrackDuration(r))&&((n=this.seekTrack(t,e,r)).offset-1){o=l;break}switch(o){case"Visual":if(s.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",e.width).set("height",e.height).set("horizresolution",4718592).set("vertresolution",4718592).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var f=new d.avcCBox;f.parse(new u(e.avcDecoderConfigRecord)),a.addBox(f)}else if(e.hevcDecoderConfigRecord){var p=new d.hvcCBox;p.parse(new u(e.hevcDecoderConfigRecord)),a.addBox(p)}break;case"Audio":s.add("smhd").set("balance",e.balance||0),a.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":s.add("hmhd");break;case"Subtitle":s.add("sthd"),"stpp"===e.type&&a.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break;default:s.add("nmhd")}e.description&&a.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(t){a.addBox(t)}),s.add("dinf").add("dref").addEntry(new d["url Box"]().set("flags",1));var _=s.add("stbl");return _.add("stsd").addEntry(a),_.add("stts").set("sample_counts",[]).set("sample_deltas",[]),_.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),_.add("stco").set("chunk_offsets",[]),_.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(r),e.id}},d.Box.prototype.computeSize=function(t){var e=t||new c;e.endianness=c.BIG_ENDIAN,this.write(e)},v.prototype.addSample=function(t,e,r){var n=r||{},s={},a=this.getTrackById(t);if(null!==a){s.number=a.samples.length,s.track_id=a.tkhd.track_id,s.timescale=a.mdia.mdhd.timescale,s.description_index=n.sample_description_index?n.sample_description_index-1:0,s.description=a.mdia.minf.stbl.stsd.entries[s.description_index],s.data=e,s.size=e.byteLength,s.alreadyRead=s.size,s.duration=n.duration||1,s.cts=n.cts||0,s.dts=n.dts||0,s.is_sync=n.is_sync||!1,s.is_leading=n.is_leading||0,s.depends_on=n.depends_on||0,s.is_depended_on=n.is_depended_on||0,s.has_redundancy=n.has_redundancy||0,s.degradation_priority=n.degradation_priority||0,s.offset=0,s.subsamples=n.subsamples,a.samples.push(s),a.samples_size+=s.size,a.samples_duration+=s.duration,void 0===a.first_dts&&(a.first_dts=n.dts),this.processSamples();var o=this.createSingleSampleMoof(s);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(e),s}},v.prototype.createSingleSampleMoof=function(t){var e=0;e=t.is_sync?0x2000000:65536;var r=new d.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var n=r.add("traf"),s=this.getTrackById(t.track_id);return n.add("tfhd").set("track_id",t.track_id).set("flags",d.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),n.add("tfdt").set("baseMediaDecodeTime",t.dts-(s.first_dts||0)),n.add("trun").set("flags",d.TRUN_FLAGS_DATA_OFFSET|d.TRUN_FLAGS_DURATION|d.TRUN_FLAGS_SIZE|d.TRUN_FLAGS_FLAGS|d.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[t.duration]).set("sample_size",[t.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[t.cts-t.dts]),r},v.prototype.lastMoofIndex=0,v.prototype.samplesDataSize=0,v.prototype.resetTables=function(){for(t=0,this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0;t=2&&(u=s[o].grouping_type+"/0",(l=new c(s[o].grouping_type,0)).is_fragment=!0,e.sample_groups_info[u]||(e.sample_groups_info[u]=l))}else for(o=0;o=2&&(u=n[o].grouping_type+"/0",l=new c(n[o].grouping_type,0),t.sample_groups_info[u]||(t.sample_groups_info[u]=l))},v.setSampleGroupProperties=function(t,e,r,n){var s,a,o;for(s in e.sample_groups=[],n)e.sample_groups[s]={},e.sample_groups[s].grouping_type=n[s].grouping_type,e.sample_groups[s].grouping_type_parameter=n[s].grouping_type_parameter,r>=n[s].last_sample_in_run&&(n[s].last_sample_in_run<0&&(n[s].last_sample_in_run=0),n[s].entry_index++,n[s].entry_index<=n[s].sbgp.entries.length-1&&(n[s].last_sample_in_run+=n[s].sbgp.entries[n[s].entry_index].sample_count)),n[s].entry_index<=n[s].sbgp.entries.length-1?e.sample_groups[s].group_description_index=n[s].sbgp.entries[n[s].entry_index].group_description_index:e.sample_groups[s].group_description_index=-1,0!==e.sample_groups[s].group_description_index&&(o=n[s].fragment_description?n[s].fragment_description:n[s].description,e.sample_groups[s].group_description_index>0?(a=e.sample_groups[s].group_description_index>65535?(e.sample_groups[s].group_description_index>>16)-1:e.sample_groups[s].group_description_index-1,o&&a>=0&&(e.sample_groups[s].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(e.sample_groups[s].description=o.entries[o.default_group_description_index-1]))},v.process_sdtp=function(t,e,r){e&&(t?(e.is_leading=t.is_leading[r],e.depends_on=t.sample_depends_on[r],e.is_depended_on=t.sample_is_depended_on[r],e.has_redundancy=t.sample_has_redundancy[r]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},v.prototype.buildSampleLists=function(){var t,e;for(t=0;tb&&(w++,b<0&&(b=0),b+=a.sample_counts[w]),e>0?(t.samples[e-1].duration=a.sample_deltas[w],t.samples_duration+=t.samples[e-1].duration,A.dts=t.samples[e-1].dts+t.samples[e-1].duration):A.dts=0,o?(e>=S&&(x++,S<0&&(S=0),S+=o.sample_counts[x]),A.cts=t.samples[e].dts+o.sample_offsets[x]):A.cts=A.dts,l?(e==l.sample_numbers[U]-1?(A.is_sync=!0,U++):(A.is_sync=!1,A.degradation_priority=0),c&&c.entries[E].sample_delta+k==e+1&&(A.subsamples=c.entries[E].subsamples,k+=c.entries[E].sample_delta,E++)):A.is_sync=!0,v.process_sdtp(t.mdia.minf.stbl.sdtp,A,A.number),d?A.degradation_priority=d.priority[e]:A.degradation_priority=0,c&&c.entries[E].sample_delta+k==e&&(A.subsamples=c.entries[E].subsamples,k+=c.entries[E].sample_delta),(h.length>0||f.length>0)&&v.setSampleGroupProperties(t,A,e,t.sample_groups_info)}e>0&&(t.samples[e-1].duration=Math.max(t.mdia.mdhd.duration-t.samples[e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},v.prototype.updateSampleLists=function(){if(void 0!==this.moov){for(;this.lastMoofIndex0&&v.initSampleGroups(h,c,c.sbgps,h.mdia.minf.stbl.sgpds,c.sgpds),e=0;e0?p.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(c.tfdt?p.dts=c.tfdt.baseMediaDecodeTime:p.dts=0,h.first_traf_merged=!0),p.cts=p.dts,m.flags&d.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+m.sample_composition_time_offset[r]),_=o,m.flags&d.TRUN_FLAGS_FLAGS?_=m.sample_flags[r]:0===r&&m.flags&d.TRUN_FLAGS_FIRST_FLAG&&(_=m.first_sample_flags),p.is_sync=!(_>>16&1),p.is_leading=_>>26&3,p.depends_on=_>>24&3,p.is_depended_on=_>>22&3,p.has_redundancy=_>>20&3,p.degradation_priority=65535&_;var y=!!(c.tfhd.flags&d.TFHD_FLAG_BASE_DATA_OFFSET),g=!!(c.tfhd.flags&d.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(m.flags&d.TRUN_FLAGS_DATA_OFFSET),w=0;w=y?c.tfhd.base_data_offset:g||0===e?u.start:l,0===e&&0===r?b?p.offset=w+m.data_offset:p.offset=w:p.offset=l,l=p.offset+p.size,(c.sbgps.length>0||c.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&v.setSampleGroupProperties(h,p,p.number_in_traf,c.sample_groups_info)}}if(c.subs){h.has_fragment_subsamples=!0;var S=c.first_sample_index;for(e=0;e-1))return null;var a=(r=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-r.fileStart);if(n.size-n.alreadyRead<=a)return l.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+(n.size-n.alreadyRead)+" full size: "+n.size+")"),c.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,n.size-n.alreadyRead),r.usedBytes+=n.size-n.alreadyRead,this.stream.logBufferLevel(),n.alreadyRead=n.size,n;if(0===a)return null;l.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-r.fileStart)+" read size: "+a+" full size: "+n.size+")"),c.memcpy(n.data.buffer,n.alreadyRead,r,n.offset+n.alreadyRead-r.fileStart,a),n.alreadyRead+=a,r.usedBytes+=a,this.stream.logBufferLevel()}},v.prototype.releaseSample=function(t,e){var r=t.samples[e];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},v.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},v.prototype.getCodecs=function(){var t,e="";for(t=0;t0&&(e+=","),e+=r.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},v.prototype.getTrexById=function(t){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e0&&(r.protection=a.ipro.protections[a.iinf.item_infos[t].protection_index-1]),a.iinf.item_infos[t].item_type?r.type=a.iinf.item_infos[t].item_type:r.type="mime",r.content_type=a.iinf.item_infos[t].content_type,r.content_encoding=a.iinf.item_infos[t].content_encoding;if(a.grpl)for(t=0;t0&&d.property_index-1-1))return null;var o=(e=this.stream.buffers[a]).byteLength-(s.offset+s.alreadyRead-e.fileStart);if(!(s.length-s.alreadyRead<=o))return l.debug("ISOFile","Getting item #"+t+" extent #"+n+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-e.fileStart)+" read size: "+o+" full extent size: "+s.length+" full item size: "+r.size+")"),c.memcpy(r.data.buffer,r.alreadyRead,e,s.offset+s.alreadyRead-e.fileStart,o),s.alreadyRead+=o,r.alreadyRead+=o,e.usedBytes+=o,this.stream.logBufferLevel(),null;l.debug("ISOFile","Getting item #"+t+" extent #"+n+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-e.fileStart)+" read size: "+(s.length-s.alreadyRead)+" full extent size: "+s.length+" full item size: "+r.size+")"),c.memcpy(r.data.buffer,r.alreadyRead,e,s.offset+s.alreadyRead-e.fileStart,s.length-s.alreadyRead),e.usedBytes+=s.length-s.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=s.length-s.alreadyRead,s.alreadyRead=s.length}}return r.alreadyRead===r.size?r:null},v.prototype.releaseItem=function(t){var e=this.items[t];if(!e.data)return 0;this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var r=0;r0?this.moov.traks[t].samples[0].duration:0),e.push(n)}return e},d.Box.prototype.printHeader=function(t){this.size+=8,this.size>0x100000000&&(this.size+=8),"uuid"===this.type&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)},d.FullBox.prototype.printHeader=function(t){this.size+=4,d.Box.prototype.printHeader.call(this,t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)},d.Box.prototype.print=function(t){this.printHeader(t)},d.ContainerBox.prototype.print=function(t){this.printHeader(t);for(var e=0;e>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)},d.tkhdBox.prototype.print=function(t){d.FullBox.prototype.printHeader.call(this,t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)};var b={};b.createFile=function(t,e){var r=new v(e);return r.discardMdatData=!(void 0===t||t),r},r.createFile=b.createFile},{"@swc/helpers/_/_type_of":"felZi"}],iUw0l:[function(t,e,r,n){var s,a,o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"EventTool",function(){return U}),o.export(r,"Log",function(){return j}),o.export(r,"autoReadStream",function(){return C}),o.export(r,"file2stream",function(){return I}),o.export(r,"recodemux",function(){return N}),o.export(r,"workerTimer",function(){return T});var l=t("@swc/helpers/_/_async_to_generator"),u=t("@swc/helpers/_/_class_call_check"),c=t("@swc/helpers/_/_create_class"),h=t("@swc/helpers/_/_define_property"),f=t("@swc/helpers/_/_object_spread"),d=t("@swc/helpers/_/_object_spread_props"),p=t("@swc/helpers/_/_sliced_to_array"),_=t("@swc/helpers/_/_to_consumable_array"),m=t("@swc/helpers/_/_type_of"),y=t("@swc/helpers/_/_ts_generator"),g=t("@webav/mp4box.js"),v=o.interopDefault(g),b=Object.defineProperty,w=function(t){throw TypeError(t)},S=function(t,e,r){var n;return n=(void 0===e?"undefined":(0,m._)(e))!="symbol"?e+"":e,n in t?b(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r},x=function(t,e,r){return e.has(t)||w("Cannot read from private field"),r?r.call(t):e.get(t)},U=function(){"use strict";function t(){var e,r,n=this,s=this;(0,u._)(this,t),e=a,r=new Map,e.has(this)?w("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(this):e.set(this,r),S(this,"on",function(t,e){var r,s=null!=(r=x(n,a).get(t))?r:new Set;return s.add(e),x(n,a).has(t)||x(n,a).set(t,s),function(){s.delete(e),0===s.size&&x(n,a).delete(t)}}),S(this,"once",function(t,e){var r=n.on(t,function(){for(var t=arguments.length,n=Array(t),s=0;s1?e-1:0),n=1;n=a.length)return null;var e=new v.default.DataStream;e.endianness=v.default.DataStream.BIG_ENDIAN;var r=s;try{for(;rh&&(h=s)}var l=r[0];if(null!=l&&l.is_sync&&l.cts-hh&&(h=u)}else{c=t,d();return}}}}function p(t){for(var r=-1,n=0;n0&&a.is_sync)break;e.addSample(s,a.data,a),r=a.cts+a.duration}return t.splice(0,n),r}var _=T(d,15),m=G(t,function(t,e){return u("encoder0",t,e)}),g=G(t,function(t,e){return u("encoder1",t,e)}),v=0;return{get encodeQueueSize(){return m.encodeQueueSize+g.encodeQueueSize},encode:function(t,e){try{e.keyFrame&&(v+=1),(v%2==0?m:g).encode(t,e)}catch(n){var r="encode video frame error: ".concat(n.message,", state: ").concat(JSON.stringify({ts:t.timestamp,keyFrame:e.keyFrame,duration:t.duration,gopId:v}));throw j.error(r),Error(r)}},flush:(0,l._)(function(){var t,e,r,n;return(0,y._)(this,function(s){switch(s.label){case 0:if(t=Promise.all,"configured"!==m.state)return[3,2];return[4,m.flush()];case 1:return e=s.sent(),[3,3];case 2:e=null,s.label=3;case 3:if(r=[e],"configured"!==g.state)return[3,5];return[4,g.flush()];case 4:return n=s.sent(),[3,6];case 5:n=null,s.label=6;case 6:return[4,t.apply(Promise,[r.concat([n])])];case 7:return s.sent(),_(),d(),[2]}})}),close:function(){"configured"===m.state&&m.close(),"configured"===g.state&&g.close()}}}(t.video,p,m):null,x=null!=t.audio?(e=t.audio,r=p,n=m,s={timescale:1e6,samplerate:e.sampleRate,channel_count:e.channelCount,hdlr:"soun",type:"aac"===e.codec?"mp4a":"Opus",name:"Track created with WebAV"},a=-1,o=[],u=!1,n.once("VideoReady",function(){u=!0,o.forEach(function(t){var e=W(t);r.addSample(a,e.data,e)}),o=[]}),c={codec:"aac"===e.codec?"mp4a.40.2":"opus",sampleRate:e.sampleRate,numberOfChannels:e.channelCount,bitrate:128e3},(h=new AudioEncoder({error:function(t){var e="AudioEncoder error: ".concat(t.message,", config: ").concat(JSON.stringify(c),", state: ").concat(JSON.stringify({qSize:h.encodeQueueSize,state:h.state}));throw j.error(e),Error(e)},output:function(t,e){var l;if(-1===a){var c,h,p,m,y=null==(l=e.decoderConfig)?void 0:l.description;a=r.addTrack((0,d._)((0,f._)({},s),{description:null==y?void 0:(p=new Uint8Array([0,0,0,0,3,23+(h=(c=y).byteLength),0,2,0,4,18+h,64,21,0,0,0,0,0,0,0,0,0,0,0,5,h].concat((0,_._)(new Uint8Array(c instanceof ArrayBuffer?c:c.buffer)),[6,1,2])),(m=new v.default.BoxParser.esdsBox(p.byteLength)).hdr_size=0,m.parse(new v.default.DataStream(p,0,v.default.DataStream.BIG_ENDIAN)),m)})),n.emit("AudioReady"),j.info("AudioEncoder, audio track ready, trackId:",a)}if(u){var g=W(t);r.addSample(a,g.data,g)}else o.push(t)}})).configure(c),h):null;return null==t.video&&m.emit("VideoReady"),null==t.audio&&m.emit("AudioReady"),{encodeVideo:function(t,e){null==S||S.encode(t,e),t.close()},encodeAudio:function(t){if(null!=x)try{x.encode(t),t.close()}catch(t){var e="encode audio chunk error: ".concat(t.message,", state: ").concat(JSON.stringify({qSize:x.encodeQueueSize,state:x.state}));throw j.error(e),Error(e)}},getEncodeQueueSize:function(){var t,e;return null!=(e=null!=(t=null==S?void 0:S.encodeQueueSize)?t:null==x?void 0:x.encodeQueueSize)?e:0},flush:(0,l._)(function(){return(0,y._)(this,function(t){switch(t.label){case 0:return[4,Promise.all([null==S?void 0:S.flush(),(null==x?void 0:x.state)==="configured"?x.flush():null])];case 1:return t.sent(),[2]}})}),close:function(){m.destroy(),null==S||S.close(),(null==x?void 0:x.state)==="configured"&&x.close()},mp4file:p}}function G(t,e){var r={codec:t.codec,framerate:t.expectFPS,hardwareAcceleration:t.__unsafe_hardwareAcceleration__,bitrate:t.bitrate,width:t.width,height:t.height,alpha:"discard",avc:{format:"avc"}},n=new VideoEncoder({error:function(t){var e="VideoEncoder error: ".concat(t.message,", config: ").concat(JSON.stringify(r),", state: ").concat(JSON.stringify({qSize:n.encodeQueueSize,state:n.state}));throw j.error(e),Error(e)},output:e});return n.configure(r),n}function W(t){var e,r=new ArrayBuffer(t.byteLength);t.copyTo(r);var n=t.timestamp;return{duration:null!=(e=t.duration)?e:0,dts:n,cts:n,is_sync:"key"===t.type,data:r}}O.set(j.debug,0),O.set(j.info,1),O.set(j.warn,2),O.set(j.error,3),(0,l._)(function(){return(0,y._)(this,function(t){switch(t.label){case 0:return[4,Promise.resolve()];case 1:return t.sent(),null!=globalThis.navigator&&null!=globalThis.document&&(j.info("@webav version: 1.1.0, date: ".concat(new Date().toLocaleDateString())),j.info(globalThis.navigator.userAgent),document.addEventListener("visibilitychange",function(){j.info("visibilitychange: ".concat(document.visibilityState))}),"PressureObserver"in globalThis&&new PressureObserver(function(t){j.info("cpu state change: ".concat(JSON.stringify(t.map(function(t){return t.state}))))}).observe("cpu")),[2]}})})()},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_define_property":"3NGsL","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","@webav/mp4box.js":"4DT2A","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7uqUv":[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"resample",function(){return f});var a=t("./lib/interpolator"),o=t("./lib/fir-lpf"),l=t("./lib/butterworth-lpf"),u={point:!1,linear:!1,cubic:!0,sinc:!0},c={IIR:16,FIR:71},h={IIR:l.ButterworthLPF,FIR:o.FIRLPF};function f(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=(r-e)/e+1,o=new Float64Array(t.length*s);n.method=n.method||"cubic";var l=new(0,a.Interpolator)(t.length,o.length,{method:n.method,tension:n.tension||0,sincFilterSize:n.sincFilterSize||6,sincWindow:n.sincWindow||void 0});if(void 0===n.LPF&&(n.LPF=u[n.method]),n.LPF){n.LPFType=n.LPFType||"IIR";var f=h[n.LPFType];r>e?function(t,e,r,n){for(var s=0,a=e.length;s=0;o--)e[o]=n.filter(e[o])}(t,o,l,new f(n.LPFOrder||c[n.LPFType],r,e/2)):function(t,e,r,n){for(var s=0,a=t.length;s=0;o--)t[o]=n.filter(t[o]);d(t,e,r)}(t,o,l,new f(n.LPFOrder||c[n.LPFType],e,r/2))}else d(t,o,l);return o}function d(t,e,r){for(var n=0,s=e.length;n2&&void 0!==l[2]?l[2]:[],r+=1,o=new Promise(function(t,e){n[r]={resolve:t,reject:e}}),[2,(e.postMessage({cbId:r,evtType:t,args:s},a),o)]})}),function(e,r){return t.apply(this,arguments)});return z.push(s),s}var a=z[P];return P=(P+1)%z.length,a}())("register",{fileId:t,filePath:e,mode:r})];case 1:var a,o,l;return[2,(s.sent(),{read:(a=(0,g._)(function(e,r){return(0,x._)(this,function(s){switch(s.label){case 0:return[4,n("read",{fileId:t,offset:e,size:r})];case 1:return[2,s.sent()]}})}),function(t,e){return a.apply(this,arguments)}),write:(o=(0,g._)(function(e,r){return(0,x._)(this,function(s){switch(s.label){case 0:return[4,n("write",{fileId:t,data:e,opts:r},[ArrayBuffer.isView(e)?e.buffer:e])];case 1:return[2,s.sent()]}})}),function(t,e){return o.apply(this,arguments)}),close:(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,n("close",{fileId:t})];case 1:return[2,e.sent()]}})}),truncate:(l=(0,g._)(function(e){return(0,x._)(this,function(r){switch(r.label){case 0:return[4,n("truncate",{fileId:t,newSize:e})];case 1:return[2,r.sent()]}})}),function(t){return l.apply(this,arguments)}),getSize:(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,n("getSize",{fileId:t})];case 1:return[2,e.sent()]}})}),flush:(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,n("flush",{fileId:t})];case 1:return[2,e.sent()]}})})})]}})})).apply(this,arguments)}var z=[],P=0;function L(t){if("/"===t)return{parent:null,name:""};var e=t.split("/").filter(function(t){return t.length>0});if(0===e.length)throw Error("Invalid path");return{name:e[e.length-1],parent:"/"+e.slice(0,-1).join("/")}}function R(t,e){return D.apply(this,arguments)}function D(){return(D=(0,g._)(function(t,e){var r,n,s,a,o,l,u,c,h,f,d,p,_,m;return(0,x._)(this,function(y){switch(y.label){case 0:if(n=(r=L(t)).parent,s=r.name,null!=n)return[3,2];return[4,navigator.storage.getDirectory()];case 1:return[2,y.sent()];case 2:a=n.split("/").filter(function(t){return t.length>0}),y.label=3;case 3:return y.trys.push([3,17,,18]),[4,navigator.storage.getDirectory()];case 4:o=y.sent(),l=!0,u=!1,c=void 0,y.label=5;case 5:y.trys.push([5,10,11,12]),h=a[Symbol.iterator](),y.label=6;case 6:if(l=(f=h.next()).done)return[3,9];return d=f.value,[4,o.getDirectoryHandle(d,{create:e.create})];case 7:o=y.sent(),y.label=8;case 8:return l=!0,[3,6];case 9:return[3,12];case 10:return p=y.sent(),u=!0,c=p,[3,12];case 11:try{l||null==h.return||h.return()}finally{if(u)throw c}return[7];case 12:if(!e.isFile)return[3,14];return[4,o.getFileHandle(s,{create:e.create})];case 13:return _=y.sent(),[3,16];case 14:return[4,o.getDirectoryHandle(s,{create:e.create})];case 15:_=y.sent(),y.label=16;case 16:return[2,_];case 17:if("NotFoundError"===(m=y.sent()).name)return[2,null];throw m;case 18:return[2]}})})).apply(this,arguments)}function M(t){return O.apply(this,arguments)}function O(){return(O=(0,g._)(function(t){var e,r,n,s,a,o,l,u,c,h,f,d,p;return(0,x._)(this,function(_){switch(_.label){case 0:if(r=(e=L(t)).parent,n=e.name,null!=r)return[3,15];return[4,navigator.storage.getDirectory()];case 1:s=_.sent(),a=!1,o=!1,_.label=2;case 2:_.trys.push([2,8,9,14]),u=(0,y._)(s.keys()),_.label=3;case 3:return[4,u.next()];case 4:if(!(a=!(c=_.sent()).done))return[3,7];return h=c.value,[4,s.removeEntry(h,{recursive:!0})];case 5:_.sent(),_.label=6;case 6:return a=!1,[3,3];case 7:return[3,14];case 8:return f=_.sent(),o=!0,l=f,[3,14];case 9:if(_.trys.push([9,,12,13]),!(a&&null!=u.return))return[3,11];return[4,u.return()];case 10:_.sent(),_.label=11;case 11:return[3,13];case 12:if(o)throw l;return[7];case 13:return[7];case 14:return[2];case 15:return[4,R(r,{create:!1,isFile:!1})];case 16:if(null==(d=_.sent()))return[3,20];_.label=17;case 17:return _.trys.push([17,19,,20]),[4,d.removeEntry(n,{recursive:!0})];case 18:return _.sent(),[3,20];case 19:if("NotFoundError"===(p=_.sent()).name)return[2];throw p;case 20:return[2]}})})).apply(this,arguments)}function j(t,e){return"".concat(t,"/").concat(e).replace("//","/")}function N(t){return new W(t)}var G=function(){"use strict";function t(e){(0,v._)(this,t),A(this,s),A(this,a),A(this,o),T(this,s,e);var r=L(e),n=r.parent,l=r.name;T(this,a,l),T(this,o,n)}return(0,b._)(t,[{key:"kind",get:function(){return"dir"}},{key:"name",get:function(){return k(this,a)}},{key:"path",get:function(){return k(this,s)}},{key:"parent",get:function(){return null==k(this,o)?null:N(k(this,o))}},{key:"create",value:function(){var t=this;return(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,R(k(t,s),{create:!0,isFile:!1})];case 1:return[2,(e.sent(),N(k(t,s)))]}})})()}},{key:"exists",value:function(){var t=this;return(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,R(k(t,s),{create:!1,isFile:!1})];case 1:return[2,e.sent()instanceof FileSystemDirectoryHandle]}})})()}},{key:"remove",value:function(){var t=this;return(0,g._)(function(){var e,r,n,a,o,l,u;return(0,x._)(this,function(c){switch(c.label){case 0:e=!0,r=!1,n=void 0,c.label=1;case 1:return c.trys.push([1,9,10,11]),[4,t.children()];case 2:a=c.sent()[Symbol.iterator](),c.label=3;case 3:if(e=(o=a.next()).done)return[3,8];l=o.value,c.label=4;case 4:return c.trys.push([4,6,,7]),[4,l.remove()];case 5:return c.sent(),[3,7];case 6:return console.warn(c.sent()),[3,7];case 7:return e=!0,[3,3];case 8:return[3,11];case 9:return u=c.sent(),r=!0,n=u,[3,11];case 10:try{e||null==a.return||a.return()}finally{if(r)throw n}return[7];case 11:return c.trys.push([11,13,,14]),[4,M(k(t,s))];case 12:return c.sent(),[3,14];case 13:return console.warn(c.sent()),[3,14];case 14:return[2]}})})()}},{key:"children",value:function(){var t=this;return(0,g._)(function(){var e,r,n,a,o,l,u,c,h;return(0,x._)(this,function(f){switch(f.label){case 0:return[4,R(k(t,s),{create:!1,isFile:!1})];case 1:if(null==(e=f.sent()))return[2,[]];r=[],n=!1,a=!1,f.label=2;case 2:f.trys.push([2,7,8,13]),l=(0,y._)(e.values()),f.label=3;case 3:return[4,l.next()];case 4:if(!(n=!(u=f.sent()).done))return[3,6];c=u.value,r.push(("file"===c.kind?H:N)(j(k(t,s),c.name))),f.label=5;case 5:return n=!1,[3,3];case 6:return[3,13];case 7:return h=f.sent(),a=!0,o=h,[3,13];case 8:if(f.trys.push([8,,11,12]),!(n&&null!=l.return))return[3,10];return[4,l.return()];case 9:f.sent(),f.label=10;case 10:return[3,12];case 11:if(a)throw o;return[7];case 12:return[7];case 13:return[2,r]}})})()}},{key:"copyTo",value:function(e){var r=this;return(0,g._)(function(){var n,s,a;return(0,x._)(this,function(o){switch(o.label){case 0:return[4,r.exists()];case 1:if(!o.sent())throw Error("dir ".concat(r.path," not exists"));if(!(e instanceof t))return[3,6];return[4,e.exists()];case 2:return[4,(n=o.sent()?N(j(e.path,r.name)):e).create()];case 3:return o.sent(),s=Promise.all,[4,r.children()];case 4:return[4,s.apply(Promise,[o.sent().map(function(t){return t.copyTo(n)})])];case 5:return[2,(o.sent(),n)];case 6:if(!(e instanceof FileSystemDirectoryHandle))return[3,9];return a=Promise.all,[4,r.children()];case 7:var l;return[4,a.apply(Promise,[o.sent().map((l=(0,g._)(function(t){var r,n;return(0,x._)(this,function(s){switch(s.label){case 0:if("file"!==t.kind)return[3,3];return r=t.copyTo,[4,e.getFileHandle(t.name,{create:!0})];case 1:return[4,r.apply(t,[s.sent()])];case 2:return s.sent(),[3,6];case 3:return n=t.copyTo,[4,e.getDirectoryHandle(t.name,{create:!0})];case 4:return[4,n.apply(t,[s.sent()])];case 5:s.sent(),s.label=6;case 6:return[2]}})}),function(t){return l.apply(this,arguments)}))])];case 8:return[2,(o.sent(),null)];case 9:throw Error("Illegal target type")}})})()}},{key:"moveTo",value:function(t){var e=this;return(0,g._)(function(){var r;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,e.copyTo(t)];case 1:return r=n.sent(),[4,e.remove()];case 2:return[2,(n.sent(),r)]}})})()}}]),t}();s=new WeakMap,a=new WeakMap,o=new WeakMap;var W=G,Y=new Map;function H(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rw";if("rw"===e){var r,n=null!=(r=Y.get(t))?r:new J(t,e);return Y.set(t,n),n}return new J(t,e)}function V(t,e){return Z.apply(this,arguments)}function Z(){return(Z=(0,g._)(function(t,e){var r,n,s,a,o,l,u,c,h=arguments;return(0,x._)(this,function(a){switch(a.label){case 0:if(r=h.length>2&&void 0!==h[2]?h[2]:{overwrite:!0},!(e instanceof J))return[3,3];return n=[t],[4,e.stream()];case 1:return[4,V.apply(void 0,n.concat([a.sent(),r]))];case 2:return a.sent(),[2];case 3:return[4,(t instanceof J?t:H(t,"rw")).createWriter()];case 4:s=a.sent(),a.label=5;case 5:if(a.trys.push([5,16,17,19]),!r.overwrite)return[3,7];return[4,s.truncate(0)];case 6:a.sent(),a.label=7;case 7:if(!(e instanceof ReadableStream))return[3,13];o=e.getReader(),a.label=8;case 8:return[4,o.read()];case 9:if(u=(l=a.sent()).done,c=l.value,u)return[3,12];return[4,s.write(c)];case 10:a.sent(),a.label=11;case 11:return[3,8];case 12:return[3,15];case 13:return[4,s.write(e)];case 14:a.sent(),a.label=15;case 15:return[3,19];case 16:throw a.sent();case 17:return[4,s.close()];case 18:return a.sent(),[7];case 19:return[2]}})})).apply(this,arguments)}var X=0,K=function(){"use strict";function t(e,r){var n,s=this;(0,v._)(this,t),A(this,l),A(this,u),A(this,c),A(this,h),A(this,f),A(this,d,0),A(this,p,(n=null,function(){var t;return T(s,d,k(s,d)+1),null!=n?n:n=new Promise((t=(0,g._)(function(t,e){var r;return(0,x._)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,function(t,e,r){return F.apply(this,arguments)}(k(s,f),k(s,l),k(s,h))];case 1:return t([r=a.sent(),(0,g._)(function(){var t;return(0,x._)(this,function(t){switch(t.label){case 0:if(T(s,d,k(s,d)-1),k(s,d)>0)return[3,2];return n=null,[4,r.close()];case 1:t.sent(),t.label=2;case 2:return[2]}})})]),[3,3];case 2:return e(a.sent()),[3,3];case 3:return[2]}})}),function(e,r){return t.apply(this,arguments)}))})),A(this,_,!1),T(this,f,++X),T(this,l,e),T(this,h,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[r]);var a=L(e),o=a.parent,m=a.name;if(null==o)throw Error("Invalid path");T(this,c,m),T(this,u,o)}return(0,b._)(t,[{key:"kind",get:function(){return"file"}},{key:"path",get:function(){return k(this,l)}},{key:"name",get:function(){return k(this,c)}},{key:"parent",get:function(){return null==k(this,u)?null:N(k(this,u))}},{key:"createWriter",value:function(){var t=this;return(0,g._)(function(){var e,r,n,s,a,o;return(0,x._)(this,function(l){switch(l.label){case 0:if("read-only"===k(t,h))throw Error("file is read-only");if(k(t,_))throw Error("Other writer have not been closed");return T(t,_,!0),e=new TextEncoder,[4,k(t,p).call(t)];case 1:return n=(r=w._.apply(void 0,[l.sent(),2]))[0],s=r[1],[4,n.getSize()];case 2:var u,c;return a=l.sent(),o=!1,[2,{write:(u=(0,g._)(function(t){var r,s,l,u,c=arguments;return(0,x._)(this,function(h){switch(h.label){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:{},o)throw Error("Writer is closed");return l="string"==typeof t?e.encode(t):t,a=(u=null!=(s=r.at)?s:a)+l.byteLength,[4,n.write(l,{at:u})];case 1:return[2,h.sent()]}})}),function(t){return u.apply(this,arguments)}),truncate:(c=(0,g._)(function(t){return(0,x._)(this,function(e){switch(e.label){case 0:if(o)throw Error("Writer is closed");return[4,n.truncate(t)];case 1:return e.sent(),a>t&&(a=t),[2]}})}),function(t){return c.apply(this,arguments)}),flush:(0,g._)(function(){return(0,x._)(this,function(t){switch(t.label){case 0:if(o)throw Error("Writer is closed");return[4,n.flush()];case 1:return t.sent(),[2]}})}),close:(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:if(o)throw Error("Writer is closed");return o=!0,T(t,_,!1),[4,s()];case 1:return e.sent(),[2]}})})}]}})})()}},{key:"createReader",value:function(){var t=this;return(0,g._)(function(){var e,r,n,s,a;return(0,x._)(this,function(o){switch(o.label){case 0:return[4,k(t,p).call(t)];case 1:var l;return r=(e=w._.apply(void 0,[o.sent(),2]))[0],n=e[1],s=!1,a=0,[2,{read:(l=(0,g._)(function(t){var e,n,o,l,u=arguments;return(0,x._)(this,function(c){switch(c.label){case 0:if(e=u.length>1&&void 0!==u[1]?u[1]:{},s)throw Error("Reader is closed");return o=null!=(n=e.at)?n:a,[4,r.read(o,t)];case 1:return l=c.sent(),[2,(a=o+l.byteLength,l)]}})}),function(t){return l.apply(this,arguments)}),getSize:(0,g._)(function(){return(0,x._)(this,function(t){switch(t.label){case 0:if(s)throw Error("Reader is closed");return[4,r.getSize()];case 1:return[2,t.sent()]}})}),close:(0,g._)(function(){var t;return(0,x._)(this,function(t){switch(t.label){case 0:if(s)return[3,2];return s=!0,[4,n()];case 1:t.sent(),t.label=2;case 2:return[2]}})})}]}})})()}},{key:"text",value:function(){var t=this;return(0,g._)(function(){var e,r;return(0,x._)(this,function(n){switch(n.label){case 0:return r=(e=new TextDecoder).decode,[4,t.arrayBuffer()];case 1:return[2,r.apply(e,[n.sent()])]}})})()}},{key:"arrayBuffer",value:function(){var t=this;return(0,g._)(function(){var e,r;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,R(k(t,l),{create:!1,isFile:!0})];case 1:if(null!=(e=n.sent()))return[3,2];return r=new ArrayBuffer(0),[3,4];case 2:return[4,e.getFile()];case 3:r=n.sent().arrayBuffer(),n.label=4;case 4:return[2,r]}})})()}},{key:"stream",value:function(){var t=this;return(0,g._)(function(){var e;return(0,x._)(this,function(r){switch(r.label){case 0:return[4,t.getOriginFile()];case 1:return[2,null==(e=r.sent())?new ReadableStream({pull:function(t){t.close()}}):e.stream()]}})})()}},{key:"getOriginFile",value:function(){var t=this;return(0,g._)(function(){var e;return(0,x._)(this,function(r){switch(r.label){case 0:return[4,R(k(t,l),{create:!1,isFile:!0})];case 1:return[2,null==(e=r.sent())?void 0:e.getFile()]}})})()}},{key:"getSize",value:function(){var t=this;return(0,g._)(function(){var e,r;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,R(k(t,l),{create:!1,isFile:!0})];case 1:if(null!=(e=n.sent()))return[3,2];return r=0,[3,4];case 2:return[4,e.getFile()];case 3:r=n.sent().size,n.label=4;case 4:return[2,r]}})})()}},{key:"exists",value:function(){var t=this;return(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:return[4,R(k(t,l),{create:!1,isFile:!0})];case 1:return[2,e.sent()instanceof FileSystemFileHandle]}})})()}},{key:"remove",value:function(){var t=this;return(0,g._)(function(){return(0,x._)(this,function(e){switch(e.label){case 0:if(k(t,d))throw Error("exists unclosed reader/writer");return[4,M(k(t,l))];case 1:return e.sent(),[2]}})})()}},{key:"copyTo",value:function(e){var r=this;return(0,g._)(function(){var n,s,a;return(0,x._)(this,function(o){switch(o.label){case 0:if(!(e instanceof t))return[3,4];if(e.path!==r.path)return[3,1];return n=r,[3,3];case 1:return[4,V(e.path,r)];case 2:o.sent(),n=H(e.path),o.label=3;case 3:return[2,n];case 4:if(!(e instanceof W))return[3,7];return[4,r.exists()];case 5:if(!o.sent())throw Error("file ".concat(r.path," not exists"));return[4,r.copyTo(H(j(e.path,r.name)))];case 6:return[2,o.sent()];case 7:if(!(e instanceof FileSystemFileHandle))return[3,11];return[4,r.stream()];case 8:return a=(s=o.sent()).pipeTo,[4,e.createWritable()];case 9:return[4,a.apply(s,[o.sent()])];case 10:return[2,(o.sent(),null)];case 11:throw Error("Illegal target type")}})})()}},{key:"moveTo",value:function(t){var e=this;return(0,g._)(function(){var r;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,e.copyTo(t)];case 1:return r=n.sent(),[4,e.remove()];case 2:return[2,(n.sent(),r)]}})})()}}]),t}();l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakMap,d=new WeakMap,p=new WeakMap,_=new WeakMap;var J=K,Q="/.opfs-tools-temp-dir";function q(t){return $.apply(this,arguments)}function $(){return($=(0,g._)(function(t){var e;return(0,x._)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,9,,10]),"file"!==t.kind)return[3,6];return[4,t.exists()];case 1:if(!r.sent())return[2,!0];return[4,t.createWriter()];case 2:return[4,(e=r.sent()).truncate(0)];case 3:return r.sent(),[4,e.close()];case 4:return r.sent(),[4,t.remove()];case 5:return r.sent(),[3,8];case 6:return[4,t.remove()];case 7:r.sent(),r.label=8;case 8:return[2,!0];case 9:return[2,(console.warn(r.sent()),!1)];case 10:return[2]}})})).apply(this,arguments)}var tt=[],te=!1;function tr(){return(tr=(0,g._)(function(){var t,e,r,n,s,a,o,l,u,c,h;return(0,x._)(this,function(f){switch(f.label){case 0:if(null==globalThis.localStorage)return[2];t="OPFS_TOOLS_EXPIRES_TMP_FILES",te||(te=!0,globalThis.addEventListener("unload",function(){var e;0!==tt.length&&localStorage.setItem(t,"".concat(null!=(e=localStorage.getItem(t))?e:"",",").concat(tt.join(",")))})),r=null!=(e=localStorage.getItem(t))?e:"",n=!0,s=!1,a=void 0,f.label=1;case 1:f.trys.push([1,7,8,9]),o=r.split(",")[Symbol.iterator](),f.label=2;case 2:if(n=(l=o.next()).done)return[3,6];if(!(c=0!==(u=l.value).length))return[3,4];return[4,q(H("".concat(Q,"/").concat(u)))];case 3:c=f.sent(),f.label=4;case 4:c&&(r=r.replace(u,"")),f.label=5;case 5:return n=!0,[3,2];case 6:return[3,9];case 7:return h=f.sent(),s=!0,a=h,[3,9];case 8:try{n||null==o.return||o.return()}finally{if(s)throw a}return[7];case 9:return localStorage.setItem(t,r.replace(/,{2,}/g,",")),[2]}})})).apply(this,arguments)}function ti(){var t="".concat(Math.random().toString().slice(2),"-").concat(Date.now());return tt.push(t),H("".concat(Q,"/").concat(t))}function tn(t,e){var r,n,s=H(t),a=0,o=s.createWriter(),l=s.createReader(),u=(r=(0,g._)(function(t){var e;return(0,x._)(this,function(r){switch(r.label){case 0:return[4,l];case 1:return[4,r.sent().read(a,{at:Math.round(.3*a)})];case 2:return e=r.sent(),[4,t.write(e,{at:0})];case 3:return a=r.sent(),[4,t.truncate(a)];case 4:return r.sent(),[2]}})}),function(t){return r.apply(this,arguments)});return{append:(n=(0,g._)(function(t){var r,n;return(0,x._)(this,function(n){switch(n.label){case 0:return[4,o];case 1:return[4,(r=n.sent()).write(t)];case 2:if(!((a+=n.sent())>=e))return[3,4];return[4,u(r)];case 3:n.sent(),n.label=4;case 4:return[2]}})}),function(t){return n.apply(this,arguments)}),text:s.text.bind(s),remove:(0,g._)(function(){return(0,x._)(this,function(t){switch(t.label){case 0:return[4,l];case 1:case 3:return[4,t.sent().close()];case 2:return t.sent(),[4,o];case 4:return t.sent(),[4,s.remove()];case 5:return t.sent(),[2]}})}),getSize:(0,g._)(function(){return(0,x._)(this,function(t){return[2,a]})})}}(0,g._)(function(){var t,e,r;return(0,x._)(this,function(e){switch(e.label){case 0:if(!0===globalThis.__opfs_tools_tmpfile_init__)return[3,3];if(globalThis.__opfs_tools_tmpfile_init__=!0,!(r=null!=globalThis.FileSystemDirectoryHandle&&null!=globalThis.FileSystemFileHandle&&(null==(t=globalThis.navigator)?void 0:t.storage.getDirectory)!=null))return[3,2];return setInterval((0,g._)(function(){var t,e,r,n,s,a,o,l,u;return(0,x._)(this,function(l){switch(l.label){case 0:t=!0,e=!1,r=void 0,l.label=1;case 1:return l.trys.push([1,8,9,10]),[4,N(Q).children()];case 2:n=l.sent()[Symbol.iterator](),l.label=3;case 3:if(t=(s=n.next()).done)return[3,7];if(a=s.value,!(null==(o=/^\d+-(\d+)$/.exec(a.name))||Date.now()-Number(o[1])>2592e5))return[3,5];return[4,q(a)];case 4:l.sent(),l.label=5;case 5:l.label=6;case 6:return t=!0,[3,3];case 7:return[3,10];case 8:return u=l.sent(),e=!0,r=u,[3,10];case 9:try{t||null==n.return||n.return()}finally{if(e)throw r}return[7];case 10:return[2]}})}),6e4),[4,function(){return tr.apply(this,arguments)}()];case 1:r=e.sent(),e.label=2;case 2:e.label=3;case 3:return[2]}})})()},{"@swc/helpers/_/_async_iterator":"kdyGG","@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_sliced_to_array":"uVQht","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kdyGG:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){var e,r,n,s=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);s--;){if(r&&null!=(e=t[r]))return e.call(t);if(n&&null!=(e=t[n]))return new o(e.call(t));r="@@asyncIterator",n="@@iterator"}throw TypeError("Object is not async iterable")}function o(t){function e(t){if(Object(t)!==t)return Promise.reject(TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then(function(t){return{value:t,done:e}})}return(o=function(t){this.s=t,this.n=t.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var r=this.s.return;return void 0===r?Promise.resolve({value:t,done:!0}):e(r.apply(this.s,arguments))},throw:function(t){var r=this.s.return;return void 0===r?Promise.reject(t):e(r.apply(this.s,arguments))}},new o(t)}s.defineInteropFlag(r),s.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["c4SNP"],"c4SNP","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-proxy-webav/package.json b/packages/artplayer-proxy-webav/package.json index 28284e17f..a41b80976 100644 --- a/packages/artplayer-proxy-webav/package.json +++ b/packages/artplayer-proxy-webav/package.json @@ -1,27 +1,27 @@ { - "license": "MIT", - "version": "1.0.0", - "name": "artplayer-proxy-webav", - "types": "types/artplayer-proxy-webav.d.ts", - "description": "webav proxy for ArtPlayer", - "main": "dist/artplayer-proxy-webav.js", - "legacy": "dist/artplayer-proxy-webav.legacy.js", - "author": "Harvey Zack ", - "browserslist": "last 1 Chrome version", - "homepage": "https://artplayer.org", - "repository": { - "type": "git", - "url": "git+https://github.com/zhw2590582/ArtPlayer.git" - }, - "bugs": { - "url": "https://github.com/zhw2590582/ArtPlayer/issues" - }, - "keywords": [ - "html5", - "video", - "player" - ], - "dependencies": { - "@webav/av-cliper": "^1.0.17" - } + "license": "MIT", + "version": "1.0.0", + "name": "artplayer-proxy-webav", + "types": "types/artplayer-proxy-webav.d.ts", + "description": "webav proxy for ArtPlayer", + "main": "dist/artplayer-proxy-webav.js", + "legacy": "dist/artplayer-proxy-webav.legacy.js", + "author": "Harvey Zack ", + "browserslist": "last 1 Chrome version", + "homepage": "https://artplayer.org", + "repository": { + "type": "git", + "url": "git+https://github.com/zhw2590582/ArtPlayer.git" + }, + "bugs": { + "url": "https://github.com/zhw2590582/ArtPlayer/issues" + }, + "keywords": [ + "html5", + "video", + "player" + ], + "dependencies": { + "@webav/av-cliper": "^1.0.17" + } } diff --git a/packages/artplayer-template/next.js/README.md b/packages/artplayer-template/next.js/README.md index 5fbb30d5a..b12f3e33e 100644 --- a/packages/artplayer-template/next.js/README.md +++ b/packages/artplayer-template/next.js/README.md @@ -22,8 +22,8 @@ The `pages/api` directory is mapped to `/api/*`. Files in this directory are tre To learn more about Next.js, take a look at the following resources: -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! diff --git a/packages/artplayer-template/react.js/src/index.css b/packages/artplayer-template/react.js/src/index.css index b232c8411..4b9042860 100644 --- a/packages/artplayer-template/react.js/src/index.css +++ b/packages/artplayer-template/react.js/src/index.css @@ -1,6 +1,7 @@ body { margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', + font-family: + -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; diff --git a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js index 697ac1f3d..08c9598b9 100644 --- a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js +++ b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],l=s.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(a&&"string"==typeof t)return a(t);var d=Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},p.cache={};var u=l[t]=new h.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r[n]}}),r[n]=h;for(var d=0;d{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)}),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){let e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){let t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){let t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);let i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then(()=>this.start());let{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);let r=this.creatScreenshotDate(),l=this.creatCanvas(),a=l.getContext("2d");this.emit("canvas",l);let h=r.map((i,n)=>()=>new Promise(r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),l.toBlob(e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()})},this.video.currentTime=i.time}));return this.processing=!0,(0,s.runPromisesInSeries)(h).then(()=>{this.processing=!1,this.emit("done")}).catch(e=>{throw this.processing=!1,this.emit("error",e.message),e})}creatScreenshotDate(){let{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i}))}creatCanvas(){let{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}download(){this.errorHandle(this.file&&this.thumbnailUrl,"Download does not seem to be ready, please create preview first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment...");let e=document.createElement("a"),t=`${(0,s.getFileName)(this.file.name)}.png`;return e.download=t,e.href=this.thumbnailUrl,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.emit("download",t),this}errorHandle(e,t){if(!e)throw this.emit("error",t),Error(t)}destroy(){this.option.fileInput.removeEventListener("change",this.inputChange),this.option.fileInput.removeEventListener("dragover",l.ondragover),this.option.fileInput.removeEventListener("drop",l.ondrop),document.body.removeChild(this.video),this.videoUrl&&URL.revokeObjectURL(this.videoUrl),this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.emit("destroy")}}i.default=l,window.ArtplayerToolThumbnail=l},{"./emitter":"f2NWK","./utils":"kQTVz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f2NWK:[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=class{on(e,t,i){let n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){let n=this;function o(...r){n.off(e,o),t.apply(i,r)}return o._=t,this.on(e,o,i)}emit(e,...t){let i=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;esetTimeout(t,e))}function r(e){return e.reduce((e,t)=>e.then(t),Promise.resolve())}function s(e){let t=e.split(".");return t.pop(),t.join(".")}function l(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}n.defineInteropFlag(i),n.export(i,"sleep",()=>o),n.export(i,"runPromisesInSeries",()=>r),n.export(i,"getFileName",()=>s),n.export(i,"clamp",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["eoujN"],"eoujN","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,i,n,o,r,s,l){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},h="function"==typeof a[n]&&a[n],d=h.i||{},u=h.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,i){if(!u[t]){if(!e[t]){if(o[t])return o[t];var r="function"==typeof a[n]&&a[n];if(!i&&r)return r(t,!0);if(h)return h(t,!0);if(p&&"string"==typeof t)return p(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},d.cache={};var l=u[t]=new c.Module(t);e[t][0].call(l.exports,d,l,l.exports,a)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.require=p,this.exports={}},c.modules=e,c.cache=u,c.parent=h,c.distDir=void 0,c.publicUrl=void 0,c.devServer=void 0,c.i=d,c.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(c,"root",{get:function(){return a[n]}}),a[n]=c;for(var f=0;f{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)}),this.option.number=(0,l.clamp)(i,10,1e3),this.option.width=(0,l.clamp)(n,10,1e3),this.option.column=(0,l.clamp)(o,1,1e3),this}static creatVideo(){let e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){let t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){let t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);let i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,l.sleep)(1e3).then(()=>this.start());let{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,l.clamp)(i,0,this.video.duration),this.option.end=(0,l.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);let r=this.creatScreenshotDate(),s=this.creatCanvas(),a=s.getContext("2d");this.emit("canvas",s);let h=r.map((i,n)=>()=>new Promise(r=>{this.video.oncanplay=()=>{a.drawImage(this.video,i.x,i.y,e,o),s.toBlob(e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()})},this.video.currentTime=i.time}));return this.processing=!0,(0,l.runPromisesInSeries)(h).then(()=>{this.processing=!1,this.emit("done")}).catch(e=>{throw this.processing=!1,this.emit("error",e.message),e})}creatScreenshotDate(){let{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i}))}creatCanvas(){let{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}download(){this.errorHandle(this.file&&this.thumbnailUrl,"Download does not seem to be ready, please create preview first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment...");let e=document.createElement("a"),t=`${(0,l.getFileName)(this.file.name)}.png`;return e.download=t,e.href=this.thumbnailUrl,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.emit("download",t),this}errorHandle(e,t){if(!e)throw this.emit("error",t),Error(t)}destroy(){this.option.fileInput.removeEventListener("change",this.inputChange),this.option.fileInput.removeEventListener("dragover",a.ondragover),this.option.fileInput.removeEventListener("drop",a.ondrop),document.body.removeChild(this.video),this.videoUrl&&URL.revokeObjectURL(this.videoUrl),this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.emit("destroy")}}i.default=a,window.ArtplayerToolThumbnail=a},{"./emitter":"f2NWK","./utils":"kQTVz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f2NWK:[function(e,t,i,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=class{on(e,t,i){let n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){let n=this;function o(...r){n.off(e,o),t.apply(i,r)}return o._=t,this.on(e,o,i)}emit(e,...t){let i=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;esetTimeout(t,e))}function s(e){return e.reduce((e,t)=>e.then(t),Promise.resolve())}function l(e){let t=e.split(".");return t.pop(),t.join(".")}function a(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}o.defineInteropFlag(i),o.export(i,"sleep",()=>r),o.export(i,"runPromisesInSeries",()=>s),o.export(i,"getFileName",()=>l),o.export(i,"clamp",()=>a)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["eoujN"],"eoujN","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js index 0a31c8b11..4b5f7927f 100644 --- a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js +++ b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof i[n]&&i[n],a=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!a[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=a[t]=new c.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return a[t].exports;function p(e){var t=p.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=a,c.parent=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i[n]}}),i[n]=c;for(var u=0;u0&&void 0!==arguments[0]?arguments[0]:{};return(0,i._)(this,r),(e=t.call(this)).processing=!1,e.option={},e.setup(Object.assign({},r.DEFAULTS,n)),e.video=r.creatVideo(),e.duration=0,e.inputChange=e.inputChange.bind((0,o._)(e)),e.ondrop=e.ondrop.bind((0,o._)(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",r.ondragover),e.option.fileInput.addEventListener("drop",r.ondrop),e}return(0,s._)(r,[{key:"ondrop",value:function(e){e.preventDefault();var t=e.dataTransfer.files[0];this.loadVideo(t)}},{key:"setup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=Object.assign({},this.option,t);var r=this.option,n=r.fileInput,o=r.number,i=r.width,s=r.column;if(this.errorHandle(n instanceof Element,"The 'fileInput' is not a Element"),!("INPUT"===n.tagName&&"file"===n.type)){n.style.position="relative";var a=document.createElement("input");a.type="file",a.style.position="absolute",a.style.width="100%",a.style.height="100%",a.style.left="0",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.opacity="0",n.appendChild(a),this.option.fileInput=a}return["number","width","column","begin","end"].forEach(function(t){e.errorHandle("number"==typeof e.option[t],"The '".concat(t,"' is not a number"))}),this.option.number=(0,f.clamp)(o,10,1e3),this.option.width=(0,f.clamp)(i,10,1e3),this.option.column=(0,f.clamp)(s,1,1e3),this}},{key:"inputChange",value:function(e){var t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}},{key:"loadVideo",value:function(e){if(e){var t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,"Playback of this file format is not supported: ".concat(e.type));var r=URL.createObjectURL(e);this.videoUrl=r,this.file=e,this.emit("file",this.file),this.video.src=r,this.emit("video",this.video)}}},{key:"start",value:function(){var e=this;if(!this.video.duration)return(0,f.sleep)(1e3).then(function(){return e.start()});var t=this.option,r=t.width,n=t.number,o=t.begin,i=t.end,s=this.video.videoHeight/this.video.videoWidth*r;this.option.height=s,this.option.begin=(0,f.clamp)(o,0,this.video.duration),this.option.end=(0,f.clamp)(i||this.video.duration,o,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=n/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but got ".concat(this.density));var a=this.creatScreenshotDate(),l=this.creatCanvas(),c=l.getContext("2d");this.emit("canvas",l);var u=a.map(function(t,o){return function(){return new Promise(function(i){e.video.oncanplay=function(){c.drawImage(e.video,t.x,t.y,r,s),l.toBlob(function(t){e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl),e.thumbnailUrl=URL.createObjectURL(t),e.emit("update",e.thumbnailUrl,(o+1)/n),e.video.oncanplay=null,i()})},e.video.currentTime=t.time})}});return this.processing=!0,(0,f.runPromisesInSeries)(u).then(function(){e.processing=!1,e.emit("done")}).catch(function(t){throw e.processing=!1,e.emit("error",t.message),t})}},{key:"creatScreenshotDate",value:function(){for(var e=this.option,t=e.number,r=e.width,n=e.height,o=e.column,i=e.begin,s=this.duration/t,a=[i+s];a.length1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};return(0,s._)(this,t),(e=(0,i._)(this,t)).processing=!1,e.option={},e.setup(Object.assign({},t.DEFAULTS,r)),e.video=t.creatVideo(),e.duration=0,e.inputChange=e.inputChange.bind(e),e.ondrop=e.ondrop.bind(e),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",t.ondragover),e.option.fileInput.addEventListener("drop",t.ondrop),e}return(0,a._)(t,e),(0,l._)(t,[{key:"ondrop",value:function(e){e.preventDefault();var t=e.dataTransfer.files[0];this.loadVideo(t)}},{key:"setup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=Object.assign({},this.option,t);var r=this.option,n=r.fileInput,o=r.number,i=r.width,s=r.column;if(this.errorHandle(n instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==n.tagName||"file"!==n.type){n.style.position="relative";var l=document.createElement("input");l.type="file",l.style.position="absolute",l.style.width="100%",l.style.height="100%",l.style.left="0",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.opacity="0",n.appendChild(l),this.option.fileInput=l}return["number","width","column","begin","end"].forEach(function(t){e.errorHandle("number"==typeof e.option[t],"The '".concat(t,"' is not a number"))}),this.option.number=(0,f.clamp)(o,10,1e3),this.option.width=(0,f.clamp)(i,10,1e3),this.option.column=(0,f.clamp)(s,1,1e3),this}},{key:"inputChange",value:function(e){var t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}},{key:"loadVideo",value:function(e){if(e){var t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,"Playback of this file format is not supported: ".concat(e.type));var r=URL.createObjectURL(e);this.videoUrl=r,this.file=e,this.emit("file",this.file),this.video.src=r,this.emit("video",this.video)}}},{key:"start",value:function(){var e=this;if(!this.video.duration)return(0,f.sleep)(1e3).then(function(){return e.start()});var t=this.option,r=t.width,n=t.number,o=t.begin,i=t.end,s=this.video.videoHeight/this.video.videoWidth*r;this.option.height=s,this.option.begin=(0,f.clamp)(o,0,this.video.duration),this.option.end=(0,f.clamp)(i||this.video.duration,o,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=n/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but got ".concat(this.density));var l=this.creatScreenshotDate(),a=this.creatCanvas(),u=a.getContext("2d");this.emit("canvas",a);var c=l.map(function(t,o){return function(){return new Promise(function(i){e.video.oncanplay=function(){u.drawImage(e.video,t.x,t.y,r,s),a.toBlob(function(t){e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl),e.thumbnailUrl=URL.createObjectURL(t),e.emit("update",e.thumbnailUrl,(o+1)/n),e.video.oncanplay=null,i()})},e.video.currentTime=t.time})}});return this.processing=!0,(0,f.runPromisesInSeries)(c).then(function(){e.processing=!1,e.emit("done")}).catch(function(t){throw e.processing=!1,e.emit("error",t.message),t})}},{key:"creatScreenshotDate",value:function(){for(var e=this.option,t=e.number,r=e.width,n=e.height,o=e.column,i=e.begin,s=this.duration/t,l=[i+s];l.length1?t-1:0),n=1;nt.call(this,this)),G.DEBUG){let e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+G.version),e("Env@"+G.env),e("Build@"+G.build);for(let t=0;te("Event@"+t.type))}X.push(this)}static get instances(){return X}static get version(){return"5.2.3"}static get env(){return"production"}static get build(){return"2025-04-20 09:53:52"}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 g.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:e=>e},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),X.splice(X.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=G,G.STYLE=i.default,G.DEBUG=!1,G.CONTEXTMENU=!0,G.NOTICE_TIME=2e3,G.SETTING_WIDTH=250,G.SETTING_ITEM_WIDTH=200,G.SETTING_ITEM_HEIGHT=35,G.RESIZE_TIME=200,G.SCROLL_TIME=200,G.SCROLL_GAP=50,G.AUTO_PLAYBACK_MAX=10,G.AUTO_PLAYBACK_MIN=5,G.AUTO_PLAYBACK_TIMEOUT=3e3,G.RECONNECT_TIME_MAX=5,G.RECONNECT_SLEEP_TIME=1e3,G.CONTROL_HIDE_TIME=3e3,G.DBCLICK_TIME=300,G.DBCLICK_FULLSCREEN=!0,G.MOBILE_DBCLICK_PLAY=!0,G.MOBILE_CLICK_PLAY=!1,G.AUTO_ORIENTATION_TIME=200,G.INFO_LOOP_TIME=1e3,G.FAST_FORWARD_VALUE=3,G.FAST_FORWARD_TIME=1e3,G.TOUCH_MOVE_RATIO=.5,G.VOLUME_STEP=.1,G.SEEK_STEP=5,G.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],G.ASPECT_RATIO=["default","4:3","16:9"],G.FLIP=["normal","horizontal","vertical"],G.FULLSCREEN_WEB_IN_BODY=!1,G.LOG_VERSION=!0,G.USE_RAF=!1,p.isBrowser&&(window.Artplayer=G,p.setStyleText("artplayer-style",i.default),setTimeout(()=>{G.LOG_VERSION&&console.log(`%c ArtPlayer %c ${G.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"bundle-text:./style/index.less":"0016T","option-validator":"bAWi2","./utils/emitter":"66mFZ","./utils":"71aH7","./scheme":"AKEiO","./config":"lyjeQ","./template":"X13Zf","./i18n":"3jKkj","./player":"a90nx","./control":"8Z0Uf","./contextmenu":"2KYsr","./info":"02ajl","./subtitle":"eSWto","./events":"jo4S1","./hotkey":"6NoFy","./layer":"6G6hZ","./loading":"3dsEe","./notice":"dWGTw","./mask":"5POkG","./icons":"6OeNg","./setting":"3eYNH","./storage":"2aaJe","./plugins":"8MTUM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"0016T":[function(e,t,r){t.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#ffffff40;--art-hover-color:#ffffff40;--art-loaded-color:#ffffff40;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#000000b3;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{zoom:1;text-align:left;user-select:none;box-sizing:border-box;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;direction:ltr;outline:0;width:100%;height:100%;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{vertical-align:top;max-width:100%}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.art-poster{z-index:11;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;width:100%;height:100%;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;width:100%;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;pointer-events:none;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;opacity:0;pointer-events:none;padding:0 var(--art-padding);transition:all var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:flex-end;width:100%;height:100%;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;padding-bottom:var(--art-bottom-gap);position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;width:100%;height:50%;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;background-color:var(--art-hover-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;background-color:var(--art-loaded-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;background-color:var(--art-theme);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;pointer-events:auto;transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);width:100%;height:100%;position:absolute;inset:0 auto 0 0;width:var(--art-highlight-width)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{pointer-events:none;width:100%;height:100%}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 10px);border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{flex:1;justify-content:center;align-items:center;height:100%;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{cursor:pointer;flex:1;justify-content:center;width:100%;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;width:2px;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;background-color:var(--art-theme);width:100%;height:100%;position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;padding:var(--art-padding);pointer-events:none;width:100%;height:auto;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.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{flex-shrink:0;justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;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}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{justify-content:center;align-items:center;min-width:32px;height:24px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{appearance:none;background-color:#fff3;outline:none;width:80px;height:3px}.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:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{text-align:right;width:100px}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;user-select:all;width:250px;overflow:hidden}.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-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;width:320px;height:180px;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.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-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{fill:var(--art-theme);width:15px;height:15px}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-mini-progress-bar .art-bottom,.art-video-player.art-lock .art-bottom{opacity:1;background-image:none;padding:0}.art-video-player.art-mini-progress-bar .art-bottom .art-controls,.art-video-player.art-lock .art-bottom .art-controls,.art-video-player.art-mini-progress-bar .art-bottom .art-progress,.art-video-player.art-lock .art-bottom .art-progress{transform:translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height)/4))}.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,.art-video-player.art-lock .art-bottom .art-progress-indicator{display:none!important}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{justify-content:center;display:flex;position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{flex-shrink:0;justify-content:center;align-items:center;width:100%;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[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:1000001;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}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(e,t,r){var a;a=function(){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 o=e(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(Array.isArray?Array.isArray(r):r instanceof Array)return"array";if(r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(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(r instanceof Date||"function"==typeof r.toDateString&&"function"==typeof r.getDate&&"function"==typeof r.setDate)return"date";if(r instanceof Error||"string"==typeof r.message&&r.constructor&&"number"==typeof r.constructor.stackTraceLimit)return"error";if(r instanceof RegExp||"string"==typeof r.flags&&"boolean"==typeof r.ignoreCase&&"boolean"==typeof r.multiline&&"boolean"==typeof r.global)return"regexp";switch(a(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"==typeof r.throw&&"function"==typeof r.return&&"function"==typeof r.next)return"generator";switch(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(e){return e.constructor?e.constructor.name:null}function o(e,t){var a=2i),a.export(r,"queryAll",()=>n),a.export(r,"addClass",()=>s),a.export(r,"removeClass",()=>l),a.export(r,"hasClass",()=>c),a.export(r,"append",()=>p),a.export(r,"remove",()=>u),a.export(r,"setStyle",()=>d),a.export(r,"setStyles",()=>f),a.export(r,"getStyle",()=>h),a.export(r,"sublings",()=>m),a.export(r,"inverseClass",()=>g),a.export(r,"tooltip",()=>v),a.export(r,"isInViewport",()=>y),a.export(r,"includeFromEvent",()=>b),a.export(r,"replaceElement",()=>x),a.export(r,"createElement",()=>w),a.export(r,"getIcon",()=>j),a.export(r,"setStyleText",()=>k),a.export(r,"supportsFlex",()=>C),a.export(r,"getRect",()=>S),a.export(r,"loadImg",()=>I);var o=e("./compatibility");function i(e,t=document){return t.querySelector(e)}function n(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){for(let r in t)d(e,r,t[r]);return e}function h(e,t,r=!0){let a=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(a):a}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 v(e,t,r="top"){o.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,`hint--${r}`))}function y(e,t=0){let r=e.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,i=r.top-t<=a&&r.top+r.height+t>=0,n=r.left-t<=o+t&&r.left+r.width+t>=0;return i&&n}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function x(e,t){return t.parentNode.replaceChild(e,t),e}function w(e){return document.createElement(e)}function j(e="",t=""){let r=w("i");return s(r,"art-icon"),s(r,`art-icon-${e}`),p(r,t),r}function k(e,t){let r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function C(){let e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function S(e){return e.getBoundingClientRect()}function I(e,t){return new Promise((r,a)=>{let o=new Image;o.onload=function(){if(t&&1!==t){let i=document.createElement("canvas"),n=i.getContext("2d");i.width=o.width*t,i.height=o.height*t,n.drawImage(o,0,0,i.width,i.height),i.toBlob(t=>{let o=URL.createObjectURL(t),i=new Image;i.onload=function(){r(i)},i.onerror=function(){URL.revokeObjectURL(o),a(Error(`Image load failed: ${e}`))},i.src=o})}else r(o)},o.onerror=function(){a(Error(`Image load failed: ${e}`))},o.src=e})}},{"./compatibility":"6ZTr6","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6ZTr6":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"userAgent",()=>o),a.export(r,"isSafari",()=>i),a.export(r,"isWechat",()=>n),a.export(r,"isIE",()=>s),a.export(r,"isAndroid",()=>l),a.export(r,"isIOS",()=>c),a.export(r,"isIOS13",()=>p),a.export(r,"isMobile",()=>u),a.export(r,"isBrowser",()=>d);let o="undefined"!=typeof navigator?navigator.userAgent:"",i=/^((?!chrome|android).)*safari/i.test(o),n=/MicroMessenger/i.test(o),s=/MSIE|Trident/i.test(o),l=/android/i.test(o),c=/iPad|iPhone|iPod/i.test(o)&&!window.MSStream,p=c||o.includes("Macintosh")&&navigator.maxTouchPoints>=1,u=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)||p,d="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hwmZz:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"ArtPlayerError",()=>o),a.export(r,"errorHandle",()=>i);class o extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t||this.constructor),this.name="ArtPlayerError"}}function i(e,t){if(!e)throw new o(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],inzwq:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(e,t,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=r+"00"),2===r.length&&(a=r+"0"),`${t},${a}`}).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"))}function i(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function n(e){let t=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=>{let a=e.match(t);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[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} --> ${e.end}`+"\n"+`${e.text}`:"").filter(e=>e.trim()).join("\n\n")}a.defineInteropFlag(r),a.export(r,"srtToVtt",()=>o),a.export(r,"vttToBlob",()=>i),a.export(r,"assToVtt",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6b7Ip":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){let r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}a.defineInteropFlag(r),a.export(r,"getExt",()=>function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}),a.export(r,"download",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5NSdr":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"def",()=>o),a.export(r,"has",()=>n),a.export(r,"get",()=>s),a.export(r,"mergeDeep",()=>function e(...t){let r=e=>e&&"object"==typeof e&&!Array.isArray(e);return t.reduce((t,a)=>(Object.keys(a).forEach(o=>{let i=t[o],n=a[o];Array.isArray(i)&&Array.isArray(n)?t[o]=i.concat(...n):r(i)&&r(n)?t[o]=e(i,n):t[o]=n}),t),{})});let o=Object.defineProperty,{hasOwnProperty:i}=Object.prototype;function n(e,t){return i.call(e,t)}function s(e,t){return Object.getOwnPropertyDescriptor(e,t)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],epmNy:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e=0){return new Promise(t=>setTimeout(t,e))}function i(e,t){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,e.apply(this,a)),t)}}function n(e,t){let r=!1;return function(...a){r||(e.apply(this,a),r=!0,setTimeout(function(){r=!1},t))}}a.defineInteropFlag(r),a.export(r,"sleep",()=>o),a.export(r,"debounce",()=>i),a.export(r,"throttle",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gapRl:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}function n(e){if(!e)return"00:00";let t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),a=Math.floor(e-3600*t-60*r);return(t>0?[t,r,a]:[r,a]).map(e=>e<10?`0${e}`:String(e)).join(":")}function s(e){return e.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e)}function l(e){let t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp(`(${Object.keys(t).join("|")})`,"g");return e.replace(r,e=>t[e]||e)}a.defineInteropFlag(r),a.export(r,"clamp",()=>o),a.export(r,"capitalize",()=>i),a.export(r,"secondToTime",()=>n),a.export(r,"escape",()=>s),a.export(r,"unescape",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],AKEiO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"ComponentOption",()=>d);var o=e("../utils");let i="array",n="boolean",s="string",l="number",c="object",p="function";function u(e,t,r){return(0,o.errorHandle)(t===s||t===l||e instanceof Element,`${r.join(".")} require '${s}' or 'Element' type`)}let d={html:u,disable:`?${n}`,name:`?${s}`,index:`?${l}`,style:`?${c}`,click:`?${p}`,mounted:`?${p}`,tooltip:`?${s}|${l}`,width:`?${l}`,selector:`?${i}`,onSelect:`?${p}`,switch:`?${n}`,onSwitch:`?${p}`,range:`?${i}`,onRange:`?${p}`,onChange:`?${p}`};r.default={id:s,container:u,url:s,poster:s,type:s,theme:s,lang:s,volume:l,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,gesture:n,fastForward:n,autoPlayback:n,autoOrientation:n,airplay:n,proxy:`?${p}`,plugins:[p],layers:[d],contextmenu:[d],settings:[d],controls:[{...d,position:(e,t,r)=>{let a=["top","left","right"];return(0,o.errorHandle)(a.includes(e),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${n}`,html:s,url:s}],highlight:[{time:l,text:s}],thumbnails:{url:s,number:l,column:l,width:l,height:l,scale:l},subtitle:{url:s,name:s,type:s,style:c,escape:n,encoding:s,onVttLoad:p},moreVideoAttr:c,i18n:c,icons:c,cssVar:c,customType:c}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lyjeQ:[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":"9pCYc"}],X13Zf:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var a=e("./utils");class o{constructor(e){this.art=e;let{option:t,constructor:r}=e;t.container instanceof Element?this.$container=t.container:(this.$container=(0,a.query)(t.container),(0,a.errorHandle)(this.$container,`No container element found by ${t.container}`)),(0,a.errorHandle)((0,a.supportsFlex)(),"The current browser does not support flex layout");let o=this.$container.tagName.toLowerCase();(0,a.errorHandle)("div"===o,`Unsupported container element type, only support 'div' but got '${o}'`),(0,a.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.init()}static get html(){return`
Player version:
5.2.3
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
`}query(e){return(0,a.query)(e,this.$container)}init(){let{option:e}=this.art;if(e.useSSR||(this.$container.innerHTML=o.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),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.$controlsCenter=this.query(".art-controls-center"),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.$contextmenu=this.query(".art-contextmenus"),e.proxy){let t=e.proxy.call(this.art,this.art);(0,a.errorHandle)(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),(0,a.replaceElement)(t,this.$video),t.className="art-video",this.$video=t}e.backdrop&&(0,a.addClass)(this.$player,"art-backdrop"),a.isMobile&&(0,a.addClass)(this.$player,"art-mobile")}destroy(e){this.$video.src="",e?this.$container.innerHTML="":(0,a.addClass)(this.$player,"art-destroy")}}r.default=o},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3jKkj":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("./zh-cn"),n=a.interopDefault(i);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":n.default},this.language={},this.update(e.option.i18n)}init(){let e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=(0,o.mergeDeep)(this.languages,e),this.init()}}},{"../utils":"71aH7","./zh-cn":"5Y91w","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5Y91w":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let a={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","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":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=a,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=a)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],a90nx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./urlMix"),i=a.interopDefault(o),n=e("./attrMix"),s=a.interopDefault(n),l=e("./playMix"),c=a.interopDefault(l),p=e("./pauseMix"),u=a.interopDefault(p),d=e("./toggleMix"),f=a.interopDefault(d),h=e("./seekMix"),m=a.interopDefault(h),g=e("./volumeMix"),v=a.interopDefault(g),y=e("./currentTimeMix"),b=a.interopDefault(y),x=e("./durationMix"),w=a.interopDefault(x),j=e("./switchMix"),k=a.interopDefault(j),C=e("./playbackRateMix"),S=a.interopDefault(C),I=e("./aspectRatioMix"),T=a.interopDefault(I),$=e("./screenshotMix"),E=a.interopDefault($),M=e("./fullscreenMix"),F=a.interopDefault(M),H=e("./fullscreenWebMix"),D=a.interopDefault(H),z=e("./pipMix"),A=a.interopDefault(z),R=e("./loadedMix"),O=a.interopDefault(R),L=e("./playedMix"),Y=a.interopDefault(L),P=e("./playingMix"),V=a.interopDefault(P),q=e("./autoSizeMix"),_=a.interopDefault(q),N=e("./rectMix"),B=a.interopDefault(N),W=e("./flipMix"),U=a.interopDefault(W),K=e("./miniMix"),Z=a.interopDefault(K),X=e("./posterMix"),G=a.interopDefault(X),Q=e("./autoHeightMix"),J=a.interopDefault(Q),ee=e("./cssVarMix"),et=a.interopDefault(ee),er=e("./themeMix"),ea=a.interopDefault(er),eo=e("./typeMix"),ei=a.interopDefault(eo),en=e("./stateMix"),es=a.interopDefault(en),el=e("./subtitleOffsetMix"),ec=a.interopDefault(el),ep=e("./airplayMix"),eu=a.interopDefault(ep),ed=e("./qualityMix"),ef=a.interopDefault(ed),eh=e("./thumbnailsMix"),em=a.interopDefault(eh),eg=e("./optionInit"),ev=a.interopDefault(eg),ey=e("./eventInit"),eb=a.interopDefault(ey);r.default=class{constructor(e){(0,i.default)(e),(0,s.default)(e),(0,c.default)(e),(0,u.default)(e),(0,f.default)(e),(0,m.default)(e),(0,v.default)(e),(0,b.default)(e),(0,w.default)(e),(0,k.default)(e),(0,S.default)(e),(0,T.default)(e),(0,E.default)(e),(0,F.default)(e),(0,D.default)(e),(0,A.default)(e),(0,O.default)(e),(0,Y.default)(e),(0,V.default)(e),(0,_.default)(e),(0,B.default)(e),(0,U.default)(e),(0,Z.default)(e),(0,G.default)(e),(0,J.default)(e),(0,et.default)(e),(0,ea.default)(e),(0,ei.default)(e),(0,es.default)(e),(0,ec.default)(e),(0,eu.default)(e),(0,ef.default)(e),(0,em.default)(e),(0,eb.default)(e),(0,ev.default)(e)}}},{"./urlMix":"kQoac","./attrMix":"deCma","./playMix":"fOJuP","./pauseMix":"fzHAy","./toggleMix":"cBHxQ","./seekMix":"koAPr","./volumeMix":"6eyuR","./currentTimeMix":"faaWv","./durationMix":"5y91K","./switchMix":"iceD8","./playbackRateMix":"keKwh","./aspectRatioMix":"jihET","./screenshotMix":"36kPY","./fullscreenMix":"2GYOJ","./fullscreenWebMix":"5aYAP","./pipMix":"7EnIB","./loadedMix":"3N9mP","./playedMix":"et96R","./playingMix":"9DzzM","./autoSizeMix":"i1LDY","./rectMix":"IqARI","./flipMix":"7E7Vs","./miniMix":"gpugx","./posterMix":"1SuFS","./autoHeightMix":"8x4te","./cssVarMix":"1CaTA","./themeMix":"2FqhO","./typeMix":"1fQQs","./stateMix":"iBOQW","./subtitleOffsetMix":"6vlBV","./airplayMix":"eftqT","./qualityMix":"5SdyX","./thumbnailsMix":"4HcqV","./optionInit":"fCWZK","./eventInit":"f8Lv3","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kQoac:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{option:t,template:{$video:r}}=e;(0,o.def)(e,"url",{get:()=>r.src,async set(a){if(a){let i=e.url,n=t.type||(0,o.getExt)(a),s=t.customType[n];n&&s?(await (0,o.sleep)(),e.loading.show=!0,s.call(e,r,a,e)):(URL.revokeObjectURL(i),r.src=a),i!==e.url&&(e.option.url=a,e.isReady&&i&&e.once("video:canplay",()=>{e.emit("restart",a)}))}else await (0,o.sleep)(),e.loading.show=!0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],deCma:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t}}=e;(0,o.def)(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fOJuP:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,option:a,constructor:{instances:i},template:{$video:n}}=e;(0,o.def)(e,"play",{value:async function(){let o=await n.play();if(r.show=t.get("Play"),e.emit("play"),a.mutex)for(let t=0;ti);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,o.def)(e,"pause",{value(){let o=t.pause();return a.show=r.get("Pause"),e.emit("pause"),o}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cBHxQ:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"toggle",{value:()=>e.playing?e.pause():e.play()})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],koAPr:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{notice:t}=e;(0,o.def)(e,"seek",{set(r){e.currentTime=r,e.duration&&(t.show=`${(0,o.secondToTime)(e.currentTime)} / ${(0,o.secondToTime)(e.duration)}`),e.emit("seek",e.currentTime)}}),(0,o.def)(e,"forward",{set(t){e.seek=e.currentTime+t}}),(0,o.def)(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6eyuR":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a,storage:i}=e;(0,o.def)(e,"volume",{get:()=>t.volume||0,set:e=>{t.volume=(0,o.clamp)(e,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&i.set("volume",t.volume)}}),(0,o.def)(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("muted",r)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],faaWv:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{Number.isNaN(r=parseFloat(r))||(t.currentTime=(0,o.clamp)(r,0,e.duration))}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5y91K":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"duration",{get:()=>{let{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iceD8:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){function t(t,r){return new Promise((a,o)=>{if(t===e.url)return;let{playing:i,aspectRatio:n,playbackRate:s}=e;e.pause(),e.url=t,e.notice.show="",e.once("video:error",o),e.once("video:loadedmetadata",()=>{e.currentTime=r}),e.once("video:canplay",async()=>{e.playbackRate=s,e.aspectRatio=n,i&&await e.play(),e.notice.show="",a()})})}(0,o.def)(e,"switchQuality",{value:r=>t(r,e.currentTime)}),(0,o.def)(e,"switchUrl",{value:e=>t(e,0)}),(0,o.def)(e,"switch",{set:e.switchUrl})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],keKwh:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,o.def)(e,"playbackRate",{get:()=>t.playbackRate,set(o){o?o!==t.playbackRate&&(t.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`):e.playbackRate=1}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jihET:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,template:{$video:a,$player:i}}=e;(0,o.def)(e,"aspectRatio",{get:()=>i.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)(0,o.setStyle)(a,"width",null),(0,o.setStyle)(a,"height",null),(0,o.setStyle)(a,"margin",null),delete i.dataset.aspectRatio;else{let e=n.split(":").map(Number),{clientWidth:t,clientHeight:r}=i,s=e[0]/e[1];t/r>s?((0,o.setStyle)(a,"width",`${s*r}px`),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height",`${t/s}px`),(0,o.setStyle)(a,"margin","auto 0")),i.dataset.aspectRatio=n}r.show=`${t.get("Aspect Ratio")}: ${"default"===n?t.get("Default"):n}`,e.emit("aspectRatio",n)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"36kPY":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{notice:t,template:{$video:r}}=e,a=(0,o.createElement)("canvas");(0,o.def)(e,"getDataURL",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),e(a.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}),(0,o.def)(e,"getBlobUrl",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(t=>{e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}),(0,o.def)(e,"screenshot",{value:async t=>{let a=await e.getDataURL(),i=t||`artplayer_${(0,o.secondToTime)(r.currentTime)}`;return(0,o.download)(a,`${i}.png`),e.emit("screenshot",a),a}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2GYOJ":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>s);var o=e("../libs/screenfull"),i=a.interopDefault(o),n=e("../utils");function s(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e,s=e=>{(0,i.default).on("change",()=>{e.emit("fullscreen",i.default.isFullscreen),i.default.isFullscreen?(e.state="fullscreen",(0,n.addClass)(o,"art-fullscreen")):(0,n.removeClass)(o,"art-fullscreen"),e.emit("resize")}),(0,i.default).on("error",t=>{e.emit("fullscreenError",t)}),(0,n.def)(e,"fullscreen",{get:()=>i.default.isFullscreen,async set(e){e?await (0,i.default).request(o):await (0,i.default).exit()}})},l=e=>{e.proxy(document,"webkitfullscreenchange",()=>{e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,n.def)(e,"fullscreen",{get:()=>document.fullscreenElement===a,set(t){t?(e.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})};e.once("video:loadedmetadata",()=>{i.default.isEnabled?s(e):a.webkitSupportsFullscreen?l(e):(0,n.def)(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),(0,n.def)(e,"fullscreen",(0,n.get)(e,"fullscreen"))})}},{"../libs/screenfull":"8v40z","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8v40z":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let a=[["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"]],o=(()=>{if("undefined"==typeof document)return!1;let e=a[0],t={};for(let r of a)if(r[1]in document){for(let[a,o]of r.entries())t[e[a]]=o;return t}return!1})(),i={change:o.fullscreenchange,error:o.fullscreenerror},n={request:(e=document.documentElement,t)=>new Promise((r,a)=>{let i=()=>{n.off("change",i),r()};n.on("change",i);let s=e[o.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(a)}),exit:()=>new Promise((e,t)=>{if(!n.isFullscreen){e();return}let r=()=>{n.off("change",r),e()};n.on("change",r);let a=document[o.exitFullscreen]();a instanceof Promise&&a.then(r).catch(t)}),toggle:(e,t)=>n.isFullscreen?n.exit():n.request(e,t),onchange(e){n.on("change",e)},onerror(e){n.on("error",e)},on(e,t){let r=i[e];r&&document.addEventListener(r,t,!1)},off(e,t){let r=i[e];r&&document.removeEventListener(r,t,!1)},raw:o};Object.defineProperties(n,{isFullscreen:{get:()=>!!document[o.fullscreenElement]},element:{enumerable:!0,get:()=>document[o.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>!!document[o.fullscreenEnabled]}}),o||(n={isEnabled:!1}),r.default=n},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aYAP":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,template:{$container:r,$player:a}}=e,i="";(0,o.def)(e,"fullscreenWeb",{get:()=>(0,o.hasClass)(a,"art-fullscreen-web"),set(n){n?(i=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),e.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(r,a),i&&(a.style.cssText=i,i=""),(0,o.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7EnIB":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,template:{$video:a}}=e;document.pictureInPictureEnabled?function(e){let{template:{$video:t},proxy:r,notice:a}=e;t.disablePictureInPicture=!1,(0,o.def)(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.state="pip",t.requestPictureInPicture().catch(e=>{throw a.show=e,e})):document.exitPictureInPicture().catch(e=>{throw a.show=e,e})}}),r(t,"enterpictureinpicture",()=>{e.emit("pip",!0)}),r(t,"leavepictureinpicture",()=>{e.emit("pip",!1)})}(e):a.webkitSupportsPresentationMode?function(e){let{$video:t}=e.template;t.webkitSetPresentationMode("inline"),(0,o.def)(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}(e):(0,o.def)(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3N9mP":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"loaded",{get:()=>e.loadedTime/t.duration}),(0,o.def)(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],et96R:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9DzzM":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"playing",{get:()=>"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],i1LDY:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$container:t,$player:r,$video:a}=e.template;(0,o.def)(e,"autoSize",{value(){let{videoWidth:i,videoHeight:n}=a,{width:s,height:l}=(0,o.getRect)(t),c=i/n;s/l>c?((0,o.setStyle)(r,"width",`${l*c/s*100}%`),(0,o.setStyle)(r,"height","100%")):((0,o.setStyle)(r,"width","100%"),(0,o.setStyle)(r,"height",`${s/c/l*100}%`)),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],IqARI:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"rect",{get:()=>(0,o.getRect)(e.template.$player)});let t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[a]})}(0,o.def)(e,"x",{get:()=>e.left+window.pageXOffset}),(0,o.def)(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7E7Vs":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$player:t},i18n:r,notice:a}=e;(0,o.def)(e,"flip",{get:()=>t.dataset.flip||"normal",set(i){i||(i="normal"),"normal"===i?delete t.dataset.flip:t.dataset.flip=i,a.show=`${r.get("Video Flip")}: ${r.get((0,o.capitalize)(i))}`,e.emit("flip",i)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gpugx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{icons:t,proxy:r,storage:a,template:{$player:i,$video:n}}=e,s=!1,l=0,c=0;function p(){let{$mini:t}=e.template;t&&((0,o.removeClass)(i,"art-mini"),(0,o.setStyle)(t,"display","none"),i.prepend(n),e.emit("mini",!1))}function u(t,r){e.playing?((0,o.setStyle)(t,"display","none"),(0,o.setStyle)(r,"display","flex")):((0,o.setStyle)(t,"display","flex"),(0,o.setStyle)(r,"display","none"))}function d(){let{$mini:t}=e.template,r=(0,o.getRect)(t),i=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",i),a.set("left",n),(0,o.setStyle)(t,"top",`${i}px`),(0,o.setStyle)(t,"left",`${n}px`)}(0,o.def)(e,"mini",{get:()=>(0,o.hasClass)(i,"art-mini"),set(f){if(f){e.state="mini",(0,o.addClass)(i,"art-mini");let f=function(){let{$mini:i}=e.template;if(i)return(0,o.append)(i,n),(0,o.setStyle)(i,"display","flex");{let i=(0,o.createElement)("div");(0,o.addClass)(i,"art-mini-popup"),(0,o.append)(document.body,i),e.template.$mini=i,(0,o.append)(i,n);let d=(0,o.append)(i,'
');(0,o.append)(d,t.close),r(d,"click",p);let f=(0,o.append)(i,'
'),h=(0,o.append)(f,t.play),m=(0,o.append)(f,t.pause);return r(h,"click",()=>e.play()),r(m,"click",()=>e.pause()),u(h,m),e.on("video:playing",()=>u(h,m)),e.on("video:pause",()=>u(h,m)),e.on("video:timeupdate",()=>u(h,m)),r(i,"mousedown",e=>{s=0===e.button,l=e.pageX,c=e.pageY}),e.on("document:mousemove",e=>{if(s){(0,o.addClass)(i,"art-mini-droging");let t=e.pageX-l,r=e.pageY-c;(0,o.setStyle)(i,"transform",`translate(${t}px, ${r}px)`)}}),e.on("document:mouseup",()=>{if(s){s=!1,(0,o.removeClass)(i,"art-mini-droging");let e=(0,o.getRect)(i);a.set("left",e.left),a.set("top",e.top),(0,o.setStyle)(i,"left",`${e.left}px`),(0,o.setStyle)(i,"top",`${e.top}px`),(0,o.setStyle)(i,"transform",null)}}),i}}(),h=a.get("top"),m=a.get("left");h&&m?((0,o.setStyle)(f,"top",`${h}px`),(0,o.setStyle)(f,"left",`${m}px`),(0,o.isInViewport)(f)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1SuFS":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$poster:t}}=e;(0,o.def)(e,"poster",{get:()=>{try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set(e){(0,o.setStyle)(t,"backgroundImage",`url(${e})`)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8x4te":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$container:t,$video:r}}=e;(0,o.def)(e,"autoHeight",{value(){let{clientWidth:a}=t,{videoHeight:i,videoWidth:n}=r,s=a/n*i;(0,o.setStyle)(t,"height",s+"px"),e.emit("autoHeight",s)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1CaTA":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$player:t}=e.template;(0,o.def)(e,"cssVar",{value:(e,r)=>r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2FqhO":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"theme",{get:()=>e.cssVar("--art-theme"),set(t){e.cssVar("--art-theme",t)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1fQQs":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"type",{get:()=>e.option.type,set(t){e.option.type=t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iBOQW:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let t=["mini","pip","fullscreen","fullscreenWeb"];(0,o.def)(e,"state",{get:()=>t.find(t=>e[t])||"standard",set(r){for(let a=0;ai);var o=e("../utils");function i(e){let{notice:t,i18n:r,template:a}=e;(0,o.def)(e,"subtitleOffset",{get:()=>a.$track?.offset||0,set(i){let{cues:n}=e.subtitle;if(!a.$track||0===n.length)return;let s=(0,o.clamp)(i,-10,10);a.$track.offset=s;for(let t=0;ti);var o=e("../utils");function i(e){let{i18n:t,notice:r,proxy:a,template:{$video:i}}=e,n=!0;window.WebKitPlaybackTargetAvailabilityEvent&&i.webkitShowPlaybackTargetPicker?a(i,"webkitplaybacktargetavailabilitychanged",e=>{switch(e.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,(0,o.def)(e,"airplay",{value(){n?(i.webkitShowPlaybackTargetPicker(),e.emit("airplay")):r.show=t.get("AirPlay Not Available")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5SdyX":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"quality",{set(t){let{controls:r,notice:a,i18n:o}=e,i=t.find(e=>e.default)||t[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:i?.html||"",selector:t,onSelect:async t=>(await e.switchQuality(t.url),a.show=`${o.get("Switch Video")}: ${t.html}`,t.html)})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4HcqV":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{events:t,option:r,template:{$progress:a,$video:i}}=e,n=null,s=null,l=!1,c=!1,p=!1;t.hover(a,()=>{p=!0},()=>{p=!1}),e.on("setBar",async(t,u,d)=>{let f=e.controls?.thumbnails,{url:h,scale:m}=r.thumbnails;if(!f||!h)return;let g="played"===t&&d&&o.isMobile;if("hover"===t||g){if(l||(l=!0,s=await (0,o.loadImg)(h,m),c=!0),!c||!p)return;let t=a.clientWidth*u;(0,o.setStyle)(f,"display","flex"),t>0&&ta.clientWidth-f/2?(0,o.setStyle)(n,"left",`${a.clientWidth-f}px`):(0,o.setStyle)(n,"left",`${t-f/2}px`)}(t):o.isMobile||(0,o.setStyle)(f,"display","none"),g&&(clearTimeout(n),n=setTimeout(()=>{(0,o.setStyle)(f,"display","none")},500))}}),(0,o.def)(e,"thumbnails",{get:()=>e.option.thumbnails,set(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(n),n=null,s=null,l=!1,c=!1)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fCWZK:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{option:t,storage:r,template:{$video:a,$poster:i}}=e;for(let r in t.moreVideoAttr)e.attr(r,t.moreVideoAttr[r]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,o.clamp)(t.volume,0,1));let n=r.get("volume");for(let r in"number"==typeof n&&(a.volume=(0,o.clamp)(n,0,1)),t.poster&&(0,o.setStyle)(i,"backgroundImage",`url(${t.poster})`),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(r,t.cssVar[r]);e.url=t.url}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f8Lv3:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>s);var o=e("../config"),i=a.interopDefault(o),n=e("../utils");function s(e){let{i18n:t,notice:r,option:a,constructor:o,proxy:s,template:{$player:l,$video:c,$poster:p}}=e,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",()=>{a.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 i=>{u{e.emit("resize"),n.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",()=>{e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",()=>{e.controls.show=!0,e.mask.show=!0}),e.on("video:play",()=>{e.mask.show=!1,(0,n.setStyle)(p,"display","none")}),e.on("video:playing",()=>{e.mask.show=!1}),e.on("video:progress",()=>{e.playing&&(e.loading.show=!1)}),e.on("video:seeked",()=>{e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",()=>{e.loading.show=!0,e.mask.show=!1}),e.on("video:timeupdate",()=>{e.mask.show=!1}),e.on("video:waiting",()=>{e.loading.show=!0,e.mask.show=!1})}},{"../config":"lyjeQ","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8Z0Uf":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils/component"),i=a.interopDefault(o),n=e("./fullscreen"),s=a.interopDefault(n),l=e("./fullscreenWeb"),c=a.interopDefault(l),p=e("./pip"),u=a.interopDefault(p),d=e("./playAndPause"),f=a.interopDefault(d),h=e("./progress"),m=a.interopDefault(h),g=e("./time"),v=a.interopDefault(g),y=e("./volume"),b=a.interopDefault(y),x=e("./setting"),w=a.interopDefault(x),j=e("./screenshot"),k=a.interopDefault(j),C=e("./airplay"),S=a.interopDefault(C),I=e("../utils");class T extends i.default{constructor(e){super(e),this.isHover=!1,this.name="control",this.timer=Date.now();let{constructor:t}=e,{$player:r,$bottom:a}=this.art.template;e.on("mousemove",()=>{I.isMobile||(this.show=!0)}),e.on("click",()=>{I.isMobile?this.toggle():this.show=!0}),e.on("document:mousemove",e=>{this.isHover=(0,I.includeFromEvent)(e,a)}),e.on("video:timeupdate",()=>{!e.setting.show&&!this.isHover&&!e.isInput&&e.playing&&this.show&&Date.now()-this.timer>=t.CONTROL_HIDE_TIME&&(this.show=!1)}),e.on("control",e=>{e?((0,I.removeClass)(r,"art-hide-cursor"),(0,I.addClass)(r,"art-hover"),this.timer=Date.now()):((0,I.addClass)(r,"art-hide-cursor"),(0,I.removeClass)(r,"art-hover"))}),this.init()}init(){let{option:e}=this.art;e.isLive||this.add((0,m.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,f.default)({name:"playAndPause",position:"left",index:10})),this.add((0,b.default)({name:"volume",position:"left",index:20})),e.isLive||this.add((0,v.default)({name:"time",position:"left",index:30})),e.quality.length&&(0,I.sleep)().then(()=>{this.art.quality=e.quality}),e.screenshot&&!I.isMobile&&this.add((0,k.default)({name:"screenshot",position:"right",index:20})),e.setting&&this.add((0,w.default)({name:"setting",position:"right",index:30})),e.pip&&this.add((0,u.default)({name:"pip",position:"right",index:40})),e.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,S.default)({name:"airplay",position:"right",index:50})),e.fullscreenWeb&&this.add((0,c.default)({name:"fullscreenWeb",position:"right",index:60})),e.fullscreen&&this.add((0,s.default)({name:"fullscreen",position:"right",index:70}));for(let t=0;te.selector}),(0,I.def)(r,"$control_item",{get:()=>a}),(0,I.def)(r,"$control_value",{get:()=>o})}let n=a(i,"click",async t=>{let r=t.composedPath()||[],a=e.selector.find(e=>e.$control_item===r.find(t=>e.$control_item===t));this.check(a),e.onSelect&&(o.innerHTML=await e.onSelect.call(this.art,a,a.$control_item,t))});r.push(n)}}r.default=T},{"../utils/component":"18nVI","./fullscreen":"c61Lj","./fullscreenWeb":"03jeB","./pip":"u8l8e","./playAndPause":"ebXtb","./progress":"bgoVP","./time":"ikc2j","./volume":"b8NFx","./setting":"03o9l","./screenshot":"4KCF5","./airplay":"4IS2d","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"18nVI":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./dom"),i=e("./error"),n=e("option-validator"),s=a.interopDefault(n),l=e("../scheme");r.default=class{constructor(e){this.id=0,this.art=e,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return(0,o.hasClass)(this.art.template.$player,`art-${this.name}-show`)}set show(e){let{$player:t}=this.art.template,r=`art-${this.name}-show`;e?(0,o.addClass)(t,r):(0,o.removeClass)(t,r),this.art.emit(this.name,e)}toggle(){this.show=!this.show}add(e){let t="function"==typeof e?e(this.art):e;if(t.html=t.html||"",(0,s.default)(t,l.ComponentOption),!this.$parent||!this.name||t.disable)return;let r=t.name||`${this.name}${this.id}`,a=this.cache.get(r);(0,i.errorHandle)(!a,`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;let n=(0,o.createElement)("div");(0,o.addClass)(n,`art-${this.name}`),(0,o.addClass)(n,`art-${this.name}-${r}`);let c=Array.from(this.$parent.children);n.dataset.index=t.index||this.id;let p=c.find(e=>Number(e.dataset.index)>=Number(n.dataset.index));p?p.insertAdjacentElement("beforebegin",n):(0,o.append)(this.$parent,n),t.html&&(0,o.append)(n,t.html),t.style&&(0,o.setStyles)(n,t.style),t.tooltip&&(0,o.tooltip)(n,t.tooltip);let u=[];if(t.click){let e=this.art.events.proxy(n,"click",e=>{e.preventDefault(),t.click.call(this.art,this,e)});u.push(e)}return t.selector&&["left","right"].includes(t.position)&&this.selector(t,n,u),this[r]=n,this.cache.set(r,{$ref:n,events:u,option:t}),t.mounted&&t.mounted.call(this.art,n),n}remove(e){let t=this.cache.get(e);(0,i.errorHandle)(t,`Can't find [${e}] from the [${this.name}]`),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(let e=0;ei);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.fullscreenOn),s=(0,o.append)(e,a.fullscreenOff);(0,o.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreen=!t.fullscreen}),t.on("fullscreen",t=>{t?((0,o.tooltip)(e,i.get("Exit Fullscreen")),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(e,i.get("Fullscreen")),(0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03jeB":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.fullscreenWebOn),s=(0,o.append)(e,a.fullscreenWebOff);(0,o.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreenWeb=!t.fullscreenWeb}),t.on("fullscreenWeb",t=>{t?((0,o.tooltip)(e,i.get("Exit Web Fullscreen")),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(e,i.get("Web Fullscreen")),(0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],u8l8e:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t;(0,o.append)(e,a.pip),r(e,"click",()=>{t.pip=!t.pip}),t.on("pip",t=>{(0,o.tooltip)(e,i.get(t?"Exit PIP Mode":"PIP Mode"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ebXtb:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.play),s=(0,o.append)(e,a.pause);function l(){(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(s,"display","none")}function c(){(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","flex")}(0,o.tooltip)(n,i.get("Play")),(0,o.tooltip)(s,i.get("Pause")),r(n,"click",()=>{t.play()}),r(s,"click",()=>{t.pause()}),t.playing?c():l(),t.on("video:playing",()=>{c()}),t.on("video:pause",()=>{l()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bgoVP:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"getPosFromEvent",()=>i),a.export(r,"setCurrentTime",()=>n),a.export(r,"default",()=>s);var o=e("../utils");function i(e,t){let{$progress:r}=e.template,{left:a}=(0,o.getRect)(r),i=o.isMobile?t.touches[0].clientX:t.clientX,n=(0,o.clamp)(i-a,0,r.clientWidth),s=n/r.clientWidth*e.duration,l=(0,o.secondToTime)(s),c=(0,o.clamp)(n/r.clientWidth,0,1);return{second:s,time:l,width:n,percentage:c}}function n(e,t){if(e.isRotate){let r=t.touches[0].clientY/e.height,a=r*e.duration;e.emit("setBar","played",r,t),e.seek=a}else{let{second:r,percentage:a}=i(e,t);e.emit("setBar","played",a,t),e.seek=r}}function s(e){return t=>{let{icons:r,option:a,proxy:s}=t;return{...e,html:`
`,mounted:e=>{let l=null,c=!1,p=(0,o.query)(".art-progress-hover",e),u=(0,o.query)(".art-progress-loaded",e),d=(0,o.query)(".art-progress-played",e),f=(0,o.query)(".art-progress-highlight",e),h=(0,o.query)(".art-progress-indicator",e),m=(0,o.query)(".art-progress-tip",e);function g(r,a){let{width:n,time:s}=a||i(t,r);m.innerText=s;let l=m.clientWidth;n<=l/2?(0,o.setStyle)(m,"left",0):n>e.clientWidth-l/2?(0,o.setStyle)(m,"left",`${e.clientWidth-l}px`):(0,o.setStyle)(m,"left",`${n-l/2}px`)}r.indicator?(0,o.append)(h,r.indicator):(0,o.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,a,i){let n="played"===r&&i&&o.isMobile;"loaded"===r&&(0,o.setStyle)(u,"width",`${100*a}%`),"hover"===r&&(0,o.setStyle)(p,"width",`${100*a}%`),"played"===r&&((0,o.setStyle)(d,"width",`${100*a}%`),(0,o.setStyle)(h,"left",`${100*a}%`)),n&&((0,o.setStyle)(m,"display","flex"),g(i,{width:e.clientWidth*a,time:(0,o.secondToTime)(a*t.duration)}),clearTimeout(l),l=setTimeout(()=>{(0,o.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){f.innerText="";for(let e=0;e
`;(0,o.append)(f,n)}}),t.on("video:progress",()=>{t.emit("setBar","loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",()=>{t.emit("setBar","played",t.played)}):t.on("video:timeupdate",()=>{t.emit("setBar","played",t.played)}),t.on("video:ended",()=>{t.emit("setBar","played",1)}),t.emit("setBar","loaded",t.loaded||0),o.isMobile||(s(e,"click",e=>{e.target!==h&&n(t,e)}),s(e,"mousemove",r=>{let{percentage:a}=i(t,r);t.emit("setBar","hover",a,r),(0,o.setStyle)(m,"display","flex"),(0,o.includeFromEvent)(r,f)?function(r){let{width:a}=i(t,r),{text:n}=r.target.dataset;m.innerText=n;let s=m.clientWidth;a<=s/2?(0,o.setStyle)(m,"left",0):a>e.clientWidth-s/2?(0,o.setStyle)(m,"left",`${e.clientWidth-s}px`):(0,o.setStyle)(m,"left",`${a-s/2}px`)}(r):g(r)}),s(e,"mouseleave",e=>{(0,o.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),s(e,"mousedown",e=>{c=0===e.button}),t.on("document:mousemove",e=>{if(c){let{second:r,percentage:a}=i(t,e);t.emit("setBar","played",a,e),t.seek=r}}),t.on("document:mouseup",()=>{c&&(c=!1)}))}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ikc2j:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,style:o.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:e=>{function r(){let r=`${(0,o.secondToTime)(t.currentTime)} / ${(0,o.secondToTime)(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();let a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;ei);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a}=t,i=(0,o.append)(e,a.volume),n=(0,o.append)(e,a.volumeClose),s=(0,o.append)(e,'
'),l=(0,o.append)(s,'
'),c=(0,o.append)(l,'
'),p=(0,o.append)(l,'
'),u=(0,o.append)(p,'
'),d=(0,o.append)(u,'
'),f=(0,o.append)(p,'
');function h(e){let{top:t,height:r}=(0,o.getRect)(p);return 1-(e.clientY-t)/r}function m(){if(t.muted||0===t.volume)(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(f,"top","100%"),(0,o.setStyle)(d,"top","100%"),c.innerText=0;else{let e=100*t.volume;(0,o.setStyle)(i,"display","flex"),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(f,"top",`${100-e}%`),(0,o.setStyle)(d,"top",`${100-e}%`),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(i,"click",()=>{t.muted=!0}),r(n,"click",()=>{t.muted=!1}),o.isMobile)(0,o.setStyle)(s,"display","none");else{let e=!1;r(p,"mousedown",r=>{e=0===r.button,t.volume=h(r)}),t.on("document:mousemove",r=>{e&&(t.muted=!1,t.volume=h(r))}),t.on("document:mouseup",()=>{e&&(e=!1)})}}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03o9l":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t;(0,o.append)(e,a.setting),r(e,"click",()=>{t.setting.toggle(),t.setting.resize()}),t.on("setting",t=>{(0,o.tooltip)(e,i.get(t?"Hide Setting":"Show Setting"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4KCF5":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{let{proxy:r,icons:a}=t;(0,o.append)(e,a.screenshot),r(e,"click",()=>{t.screenshot()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IS2d":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("AirPlay"),mounted:e=>{let{proxy:r,icons:a}=t;(0,o.append)(e,a.airplay),r(e,"click",()=>t.airplay())}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2KYsr":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("../utils/component"),n=a.interopDefault(i),s=e("./playbackRate"),l=a.interopDefault(s),c=e("./aspectRatio"),p=a.interopDefault(c),u=e("./flip"),d=a.interopDefault(u),f=e("./info"),h=a.interopDefault(f),m=e("./version"),g=a.interopDefault(m),v=e("./close"),y=a.interopDefault(v);class b extends n.default{constructor(e){super(e),this.name="contextmenu",this.$parent=e.template.$contextmenu,o.isMobile||this.init()}init(){let{option:e,proxy:t,template:{$player:r,$contextmenu:a}}=this.art;e.playbackRate&&this.add((0,l.default)({name:"playbackRate",index:10})),e.aspectRatio&&this.add((0,p.default)({name:"aspectRatio",index:20})),e.flip&&this.add((0,d.default)({name:"flip",index:30})),this.add((0,h.default)({name:"info",index:40})),this.add((0,g.default)({name:"version",index:50})),this.add((0,y.default)({name:"close",index:60}));for(let t=0;t{if(!this.art.constructor.CONTEXTMENU)return;e.preventDefault(),this.show=!0;let t=e.clientX,i=e.clientY,{height:n,width:s,left:l,top:c}=(0,o.getRect)(r),{height:p,width:u}=(0,o.getRect)(a),d=t-l,f=i-c;t+u>l+s&&(d=s-u),i+p>c+n&&(f=n-p),(0,o.setStyles)(a,{top:`${f}px`,left:`${d}px`})}),t(r,"click",e=>{(0,o.includeFromEvent)(e,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}r.default=b},{"../utils":"71aH7","../utils/component":"18nVI","./playbackRate":"69eLi","./aspectRatio":"lUefg","./flip":"kysiM","./info":"gqIgJ","./version":"kRU7C","./close":"jQ8Pm","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"69eLi":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{PLAYBACK_RATE:a}}=t,i=a.map(e=>`${1===e?r.get("Normal"):e.toFixed(1)}`).join("");return{...e,html:`${r.get("Play Speed")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.playbackRate=Number(a),e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="1"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("video:ratechange",()=>{let r=(0,o.queryAll)("span",e).find(e=>Number(e.dataset.value)===t.playbackRate);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lUefg:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{ASPECT_RATIO:a}}=t,i=a.map(e=>`${"default"===e?r.get("Default"):e}`).join("");return{...e,html:`${r.get("Aspect Ratio")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.aspectRatio=a,e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="default"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("aspectRatio",t=>{let r=(0,o.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kysiM:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{FLIP:a}}=t,i=a.map(e=>`${r.get((0,o.capitalize)(e))}`).join("");return{...e,html:`${r.get("Video Flip")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.flip=a.toLowerCase(),e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="normal"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("flip",t=>{let r=(0,o.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gqIgJ:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kRU7C:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return{...e,html:'ArtPlayer 5.2.3'}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jQ8Pm:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"02ajl":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./utils"),i=e("./utils/component"),n=a.interopDefault(i);class s extends n.default{constructor(e){super(e),this.name="info",o.isMobile||this.init()}init(){let{proxy:e,constructor:t,template:{$infoPanel:r,$infoClose:a,$video:i}}=this.art;e(a,"click",()=>{this.show=!1});let n=null,s=(0,o.queryAll)("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),function e(){for(let e=0;enull,this.init(e.option.subtitle);let t=!1;e.on("video:timeupdate",()=>{if(!this.url)return;let e=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof e&&e!==t&&(t=e,this.createTrack(e?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(e,t){let{$subtitle:r}=this.art.template;return"object"==typeof e?(0,o.setStyles)(r,e):(0,o.setStyle)(r,e,t)}update(){let{option:{subtitle:e},template:{$subtitle:t}}=this.art;t.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),t.innerHTML=this.activeCues.map((t,r)=>t.text.split(/\r?\n/).filter(e=>e.trim()).map(t=>`
${e.escape?(0,o.escape)(t):t}
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(e,t={}){let{i18n:r,notice:a,option:o}=this.art,i={...o.subtitle,...t,url:e},n=await this.init(i);return t.name&&(a.show=`${r.get("Switch Subtitle")}: ${t.name}`),n}createTrack(e,t){let{template:r,proxy:a,option:i}=this.art,{$video:n,$track:s}=r,l=(0,o.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.label=i.subtitle.name||"Artplayer",l.track.mode="hidden",l.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),s.onload=null,(0,o.remove)(s),(0,o.append)(n,l),r.$track=l,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(e){let{notice:t,template:{$subtitle:r}}=this.art;return this.textTrack?((0,l.default)(e,p.default.subtitle),e.url)?(this.option=e,this.style(e.style),fetch(e.url).then(e=>e.arrayBuffer()).then(t=>{let r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,o.getExt)(e.url)){case"srt":{let t=(0,o.srtToVtt)(r),a=e.onVttLoad(t);return(0,o.vttToBlob)(a)}case"ass":{let t=(0,o.assToVtt)(r),a=e.onVttLoad(t);return(0,o.vttToBlob)(a)}case"vtt":{let t=e.onVttLoad(r);return(0,o.vttToBlob)(t)}default:return e.url}}).then(e=>(r.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.createTrack("metadata",e)),e)).catch(e=>{throw r.innerHTML="",t.show=e,e})):void 0:null}}r.default=u},{"./utils":"71aH7","./utils/component":"18nVI","option-validator":"bAWi2","./scheme":"AKEiO","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jo4S1:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./clickInit"),i=a.interopDefault(o),n=e("./hoverInit"),s=a.interopDefault(n),l=e("./moveInit"),c=a.interopDefault(l),p=e("./resizeInit"),u=a.interopDefault(p),d=e("./gestureInit"),f=a.interopDefault(d),h=e("./viewInit"),m=a.interopDefault(h),g=e("./documentInit"),v=a.interopDefault(g),y=e("./updateInit"),b=a.interopDefault(y),x=e("./restoreInit"),w=a.interopDefault(x);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,i.default)(e,this),(0,s.default)(e,this),(0,c.default)(e,this),(0,u.default)(e,this),(0,f.default)(e,this),(0,m.default)(e,this),(0,v.default)(e,this),(0,b.default)(e,this),(0,w.default)(e,this)}proxy(e,t,r,a={}){if(Array.isArray(t))return t.map(t=>this.proxy(e,t,r,a));e.addEventListener(t,r,a);let o=()=>e.removeEventListener(t,r,a);return this.destroyEvents.push(o),o}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}remove(e){let t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}destroy(){for(let e=0;ei);var o=e("../utils");function i(e,t){let{constructor:r,template:{$player:a,$video:i}}=e;t.proxy(document,["click","contextmenu"],t=>{(0,o.includeFromEvent)(t,a)?(e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit("focus",t)):(e.isInput=!1,e.isFocus=!1,e.emit("blur",t))});let n=[];t.proxy(i,"click",t=>{let a=Date.now();n.push(a);let{MOBILE_CLICK_PLAY:i,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r,p=n.filter(e=>a-e<=s);switch(p.length){case 1:e.emit("click",t),o.isMobile?!e.isLock&&i&&e.toggle():e.toggle(),n=p;break;case 2:e.emit("dblclick",t),o.isMobile?!e.isLock&&l&&e.toggle():c&&(e.fullscreen=!e.fullscreen),n=[];break;default:n=[]}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4jWHi":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{$player:r}=e.template;t.hover(r,t=>{(0,o.addClass)(r,"art-hover"),e.emit("hover",!0,t)},t=>{(0,o.removeClass)(r,"art-hover"),e.emit("hover",!1,t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eqaUm:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){let{$player:r}=e.template;t.proxy(r,"mousemove",t=>{e.emit("mousemove",t)})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eDXPO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{option:r,constructor:a}=e;e.on("resize",()=>{let{aspectRatio:t,notice:a}=e;"standard"===e.state&&r.autoSize&&e.autoSize(),e.aspectRatio=t,a.show=""});let i=(0,o.debounce)(()=>e.emit("resize"),a.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],()=>i()),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",()=>i())}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"95GtS":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>n);var o=e("../utils"),i=e("../control/progress");function n(e,t){if(o.isMobile&&!e.option.isLive){let{$video:r,$progress:a}=e.template,n=null,s=!1,l=0,c=0,p=0,u=t=>{if(1===t.touches.length&&!e.isLock){n===a&&(0,i.setCurrentTime)(e,t),s=!0;let{pageX:r,pageY:o}=t.touches[0];l=r,c=o,p=e.currentTime}},d=t=>{if(1===t.touches.length&&s&&e.duration){let{pageX:a,pageY:i}=t.touches[0],s=function(e,t,r,a){var o=t-a,i=r-e,n=0;if(2>Math.abs(i)&&2>Math.abs(o))return n;var s=180*Math.atan2(o,i)/Math.PI;return s>=-45&&s<45?n=4:s>=45&&s<135?n=1:s>=-135&&s<-45?n=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(n=3),n}(l,c,a,i),u=[3,4].includes(s),d=[1,2].includes(s);if(u&&!e.isRotate||d&&e.isRotate){let s=(0,o.clamp)((a-l)/e.width,-1,1),u=(0,o.clamp)((i-c)/e.height,-1,1),d=e.isRotate?u:s,f=n===r?e.constructor.TOUCH_MOVE_RATIO:1,h=(0,o.clamp)(p+e.duration*d*f,0,e.duration);e.seek=h,e.emit("setBar","played",(0,o.clamp)(h/e.duration,0,1),t),e.notice.show=`${(0,o.secondToTime)(h)} / ${(0,o.secondToTime)(e.duration)}`}}};e.option.gesture&&(t.proxy(r,"touchstart",e=>{n=r,u(e)}),t.proxy(r,"touchmove",d)),t.proxy(a,"touchstart",e=>{n=a,u(e)}),t.proxy(a,"touchmove",d),t.proxy(document,"touchend",()=>{s&&(l=0,c=0,p=0,s=!1,n=null)})}}},{"../utils":"71aH7","../control/progress":"bgoVP","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],InUBx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{option:r,constructor:a,template:{$container:i}}=e,n=(0,o.throttle)(()=>{e.emit("view",(0,o.isInViewport)(i,a.SCROLL_GAP))},a.SCROLL_TIME);t.proxy(window,"scroll",()=>n()),e.on("view",t=>{r.autoMini&&(e.mini=!t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hoLfM:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){t.proxy(document,"mousemove",t=>{e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",t=>{e.emit("document:mouseup",t)})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cl8m3:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(e.constructor.USE_RAF){let t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",()=>{cancelAnimationFrame(t)})}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bK8As:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6NoFy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var a=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.option.hotkey&&!a.isMobile&&this.init()}init(){let{proxy:e,constructor:t}=this.art;this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP}),e(document,"keydown",e=>{if(this.art.isFocus){let t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey){let t=this.keys[e.code];if(t){e.preventDefault();for(let r=0;r{o.innerText="",(0,a.removeClass)(r,"art-notice-show")},t.NOTICE_TIME)):(0,a.removeClass)(r,"art-notice-show")}}},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5POkG":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./utils"),i=e("./utils/component"),n=a.interopDefault(i);class s extends n.default{constructor(e){super(e),this.name="mask";let{template:t,icons:r,events:a}=e,i=(0,o.append)(t.$state,r.state),n=(0,o.append)(t.$state,r.error);(0,o.setStyle)(n,"display","none"),e.on("destroy",()=>{(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(n,"display",null)}),a.proxy(t.$state,"click",()=>e.play())}}r.default=s},{"./utils":"71aH7","./utils/component":"18nVI","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6OeNg":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("bundle-text:./loading.svg"),n=a.interopDefault(i),s=e("bundle-text:./state.svg"),l=a.interopDefault(s),c=e("bundle-text:./check.svg"),p=a.interopDefault(c),u=e("bundle-text:./play.svg"),d=a.interopDefault(u),f=e("bundle-text:./pause.svg"),h=a.interopDefault(f),m=e("bundle-text:./volume.svg"),g=a.interopDefault(m),v=e("bundle-text:./volume-close.svg"),y=a.interopDefault(v),b=e("bundle-text:./screenshot.svg"),x=a.interopDefault(b),w=e("bundle-text:./setting.svg"),j=a.interopDefault(w),k=e("bundle-text:./arrow-left.svg"),C=a.interopDefault(k),S=e("bundle-text:./arrow-right.svg"),I=a.interopDefault(S),T=e("bundle-text:./playback-rate.svg"),$=a.interopDefault(T),E=e("bundle-text:./aspect-ratio.svg"),M=a.interopDefault(E),F=e("bundle-text:./config.svg"),H=a.interopDefault(F),D=e("bundle-text:./pip.svg"),z=a.interopDefault(D),A=e("bundle-text:./lock.svg"),R=a.interopDefault(A),O=e("bundle-text:./unlock.svg"),L=a.interopDefault(O),Y=e("bundle-text:./fullscreen-off.svg"),P=a.interopDefault(Y),V=e("bundle-text:./fullscreen-on.svg"),q=a.interopDefault(V),_=e("bundle-text:./fullscreen-web-off.svg"),N=a.interopDefault(_),B=e("bundle-text:./fullscreen-web-on.svg"),W=a.interopDefault(B),U=e("bundle-text:./switch-on.svg"),K=a.interopDefault(U),Z=e("bundle-text:./switch-off.svg"),X=a.interopDefault(Z),G=e("bundle-text:./flip.svg"),Q=a.interopDefault(G),J=e("bundle-text:./error.svg"),ee=a.interopDefault(J),et=e("bundle-text:./close.svg"),er=a.interopDefault(et),ea=e("bundle-text:./airplay.svg"),eo=a.interopDefault(ea);r.default=class{constructor(e){let t={loading:n.default,state:l.default,play:d.default,pause:h.default,check:p.default,volume:g.default,volumeClose:y.default,screenshot:x.default,setting:j.default,pip:z.default,arrowLeft:C.default,arrowRight:I.default,playbackRate:$.default,aspectRatio:M.default,config:H.default,lock:R.default,flip:Q.default,unlock:L.default,fullscreenOff:P.default,fullscreenOn:q.default,fullscreenWebOff:N.default,fullscreenWebOn:W.default,switchOn:K.default,switchOff:X.default,error:ee.default,close:er.default,airplay:eo.default,...e.option.icons};for(let e in t)(0,o.def)(this,e,{get:()=>(0,o.getIcon)(e,t[e])})}}},{"../utils":"71aH7","bundle-text:./loading.svg":"7tDub","bundle-text:./state.svg":"1ElZc","bundle-text:./check.svg":"lmgoP","bundle-text:./play.svg":"lVWoQ","bundle-text:./pause.svg":"5Mnax","bundle-text:./volume.svg":"w3eIa","bundle-text:./volume-close.svg":"rHjo1","bundle-text:./screenshot.svg":"2KcqM","bundle-text:./setting.svg":"8rQMV","bundle-text:./arrow-left.svg":"kqGBE","bundle-text:./arrow-right.svg":"aFjpC","bundle-text:./playback-rate.svg":"lx7ZM","bundle-text:./aspect-ratio.svg":"2sEjf","bundle-text:./config.svg":"fQTgE","bundle-text:./pip.svg":"2CaxO","bundle-text:./lock.svg":"aCGnW","bundle-text:./unlock.svg":"bTrAV","bundle-text:./fullscreen-off.svg":"bA3p0","bundle-text:./fullscreen-on.svg":"fTuY8","bundle-text:./fullscreen-web-off.svg":"tvKf4","bundle-text:./fullscreen-web-on.svg":"1F1oB","bundle-text:./switch-on.svg":"7qNHs","bundle-text:./switch-off.svg":"28aV8","bundle-text:./flip.svg":"1uXI6","bundle-text:./error.svg":"9f4dh","bundle-text:./close.svg":"4nTtS","bundle-text:./airplay.svg":"cDPXC","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7tDub":[function(e,t,r){t.exports=''},{}],"1ElZc":[function(e,t,r){t.exports=''},{}],lmgoP:[function(e,t,r){t.exports=''},{}],lVWoQ:[function(e,t,r){t.exports=''},{}],"5Mnax":[function(e,t,r){t.exports=''},{}],w3eIa:[function(e,t,r){t.exports=''},{}],rHjo1:[function(e,t,r){t.exports=''},{}],"2KcqM":[function(e,t,r){t.exports=''},{}],"8rQMV":[function(e,t,r){t.exports=''},{}],kqGBE:[function(e,t,r){t.exports=''},{}],aFjpC:[function(e,t,r){t.exports=''},{}],lx7ZM:[function(e,t,r){t.exports=''},{}],"2sEjf":[function(e,t,r){t.exports=''},{}],fQTgE:[function(e,t,r){t.exports=''},{}],"2CaxO":[function(e,t,r){t.exports=''},{}],aCGnW:[function(e,t,r){t.exports=''},{}],bTrAV:[function(e,t,r){t.exports=''},{}],bA3p0:[function(e,t,r){t.exports=''},{}],fTuY8:[function(e,t,r){t.exports=''},{}],tvKf4:[function(e,t,r){t.exports=''},{}],"1F1oB":[function(e,t,r){t.exports=''},{}],"7qNHs":[function(e,t,r){t.exports=''},{}],"28aV8":[function(e,t,r){t.exports=''},{}],"1uXI6":[function(e,t,r){t.exports=''},{}],"9f4dh":[function(e,t,r){t.exports=''},{}],"4nTtS":[function(e,t,r){t.exports=''},{}],cDPXC:[function(e,t,r){t.exports=''},{}],"3eYNH":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./flip"),i=a.interopDefault(o),n=e("./aspectRatio"),s=a.interopDefault(n),l=e("./playbackRate"),c=a.interopDefault(l),p=e("./subtitleOffset"),u=a.interopDefault(p),d=e("../utils/component"),f=a.interopDefault(d),h=e("../utils");class m extends f.default{constructor(e){super(e);let{option:t,controls:r,template:{$setting:a}}=e;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...t.settings],t.setting&&(this.format(),this.render(),e.on("blur",()=>{this.show&&(this.show=!1,this.render())}),e.on("focus",e=>{let t=(0,h.includeFromEvent)(e,r.setting),a=(0,h.includeFromEvent)(e,this.$parent);!this.show||t||a||(this.show=!1,this.render())}),e.on("resize",()=>this.resize()))}get builtin(){let e=[],{option:t}=this.art;return t.playbackRate&&e.push((0,c.default)(this.art)),t.aspectRatio&&e.push((0,s.default)(this.art)),t.flip&&e.push((0,i.default)(this.art)),t.subtitleOffset&&e.push((0,u.default)(this.art)),e}traverse(e,t=this.option){for(let r=0;r{t.default=t===e,t.default&&t.$item&&(0,h.inverseClass)(t.$item,"art-current")},e.$option),this.render(e.$parents)}format(e=this.option,t,r,a=[]){for(let o=0;ot}),(0,h.def)(i,"$parents",{get:()=>r}),(0,h.def)(i,"$option",{get:()=>e});let a=[];(0,h.def)(i,"$events",{get:()=>a}),(0,h.def)(i,"$formatted",{get:()=>!0})}this.format(i.selector||[],i,e,a)}this.option=e}find(e=""){let t=null;return this.traverse(r=>{r.name===e&&(t=r)}),t}resize(){let{controls:e,constructor:{SETTING_WIDTH:t,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(e.setting&&this.show){let i=this.active[0]?.$parent?.width||t,{left:n,width:s}=(0,h.getRect)(e.setting),{left:l,width:c}=(0,h.getRect)(a),p=n-l+s/2-i/2,u=this.active===this.option?this.active.length*r:(this.active.length+1)*r;if((0,h.setStyle)(o,"height",`${u}px`),(0,h.setStyle)(o,"width",`${i}px`),this.art.isRotate||h.isMobile)return;p+i>c?((0,h.setStyle)(o,"left",null),(0,h.setStyle)(o,"right",null)):((0,h.setStyle)(o,"left",`${p}px`),(0,h.setStyle)(o,"right","auto"))}}inactivate(e){for(let t=0;t'),s=(0,h.createElement)("div");(0,h.addClass)(s,"art-setting-item-left-icon"),(0,h.append)(s,a),(0,h.append)(n,s),(0,h.append)(n,e.$parent.html);let l=r(i,"click",()=>this.render(e.$parents));e.$parent.$events.push(l),(0,h.append)(t,i)}creatItem(e,t=!1){if(!this.cache.has(e.$option))return;let r=this.cache.get(e.$option),a=e.$item,o="selector";(0,h.has)(e,"switch")&&(o="switch"),(0,h.has)(e,"range")&&(o="range"),(0,h.has)(e,"onClick")&&(o="button");let{icons:i,proxy:n,constructor:s}=this.art,l=(0,h.createElement)("div");(0,h.addClass)(l,"art-setting-item"),(0,h.setStyle)(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=e.name||"",l.dataset.value=e.value||"";let c=(0,h.append)(l,'
'),p=(0,h.append)(l,'
'),u=(0,h.createElement)("div");switch((0,h.addClass)(u,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":(0,h.append)(u,e.icon||i.config);break;case"selector":e.selector?.length?(0,h.append)(u,e.icon||i.config):(0,h.append)(u,i.check)}(0,h.append)(c,u),(0,h.def)(e,"$icon",{configurable:!0,get:()=>u}),(0,h.def)(e,"icon",{configurable:!0,get:()=>u.innerHTML,set(e){u.innerHTML="",(0,h.append)(u,e)}});let d=(0,h.createElement)("div");(0,h.addClass)(d,"art-setting-item-left-text"),(0,h.append)(d,e.html||""),(0,h.append)(c,d),(0,h.def)(e,"$html",{configurable:!0,get:()=>d}),(0,h.def)(e,"html",{configurable:!0,get:()=>d.innerHTML,set(e){d.innerHTML="",(0,h.append)(d,e)}});let f=(0,h.createElement)("div");switch((0,h.addClass)(f,"art-setting-item-right-tooltip"),(0,h.append)(f,e.tooltip||""),(0,h.append)(p,f),(0,h.def)(e,"$tooltip",{configurable:!0,get:()=>f}),(0,h.def)(e,"tooltip",{configurable:!0,get:()=>f.innerHTML,set(e){f.innerHTML="",(0,h.append)(f,e)}}),o){case"switch":{let t=(0,h.createElement)("div");(0,h.addClass)(t,"art-setting-item-right-icon");let r=(0,h.append)(t,i.switchOn),a=(0,h.append)(t,i.switchOff);(0,h.setStyle)(e.switch?a:r,"display","none"),(0,h.append)(p,t),(0,h.def)(e,"$switch",{configurable:!0,get:()=>t});let o=e.switch;(0,h.def)(e,"switch",{configurable:!0,get:()=>o,set(e){o=e,e?((0,h.setStyle)(a,"display","none"),(0,h.setStyle)(r,"display",null)):((0,h.setStyle)(a,"display",null),(0,h.setStyle)(r,"display","none"))}});break}case"range":{let t=(0,h.createElement)("div");(0,h.addClass)(t,"art-setting-item-right-icon");let r=(0,h.append)(t,'');r.value=e.range[0],r.min=e.range[1],r.max=e.range[2],r.step=e.range[3],(0,h.addClass)(r,"art-setting-range"),(0,h.append)(p,t),(0,h.def)(e,"$range",{configurable:!0,get:()=>r});let a=[...e.range];(0,h.def)(e,"range",{configurable:!0,get:()=>a,set(e){a=[...e],r.value=e[0],r.min=e[1],r.max=e[2],r.step=e[3]}})}break;case"selector":if(e.selector?.length){let e=(0,h.createElement)("div");(0,h.addClass)(e,"art-setting-item-right-icon"),(0,h.append)(e,i.arrowRight),(0,h.append)(p,e)}}switch(o){case"switch":if(e.onSwitch){let t=n(l,"click",async t=>{e.switch=await e.onSwitch.call(this.art,e,l,t)});e.$events.push(t)}break;case"range":if(e.$range){if(e.onRange){let t=n(e.$range,"change",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onRange.call(this.art,e,l,t)});e.$events.push(t)}if(e.onChange){let t=n(e.$range,"input",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onChange.call(this.art,e,l,t)});e.$events.push(t)}}break;case"selector":{let t=n(l,"click",async t=>{e.selector?.length?this.render(e.selector):(this.check(e),e.$parent.onSelect&&(e.$parent.tooltip=await e.$parent.onSelect.call(this.art,e,l,t)))});e.$events.push(t),e.default&&(0,h.addClass)(l,"art-current")}break;case"button":if(e.onClick){let t=n(l,"click",async t=>{e.tooltip=await e.onClick.call(this.art,e,l,t)});e.$events.push(t)}}(0,h.def)(e,"$item",{configurable:!0,get:()=>l}),t?(0,h.replaceElement)(l,a):(0,h.append)(r,l),e.mounted&&setTimeout(()=>e.mounted.call(this.art,e.$item,e),0)}render(e=this.option){if(this.active=e,this.cache.has(e)){let t=this.cache.get(e);(0,h.inverseClass)(t,"art-current")}else{let t=(0,h.createElement)("div");this.cache.set(e,t),(0,h.addClass)(t,"art-setting-panel"),(0,h.append)(this.$parent,t),(0,h.inverseClass)(t,"art-current"),e[0]?.$parent&&this.creatHeader(e[0]);for(let t=0;ti);var o=e("../utils");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:i}}=e;function n(e){return t.get((0,o.capitalize)(e))}function s(){let t=e.setting.find(`flip-${e.flip}`);e.setting.check(t)}return{width:a,name:"flip",html:t.get("Video Flip"),tooltip:n(e.flip),icon:r.flip,selector:i.map(t=>({value:t,name:`flip-${t}`,default:t===e.flip,html:n(t)})),onSelect:t=>(e.flip=t.value,t.html),mounted:()=>{s(),e.on("flip",()=>s())}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"84NBV":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=e;function i(e){return"default"===e?t.get("Default"):e}function n(){let t=e.setting.find(`aspect-ratio-${e.aspectRatio}`);e.setting.check(t)}return{width:a,name:"aspect-ratio",html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:i(e.aspectRatio),selector:o.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.aspectRatio,html:i(t)})),onSelect:t=>(e.aspectRatio=t.value,t.html),mounted:()=>{n(),e.on("aspectRatio",()=>n())}}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aetWt:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=e;function i(e){return 1===e?t.get("Normal"):e.toFixed(1)}function n(){let t=e.setting.find(`playback-rate-${e.playbackRate}`);e.setting.check(t)}return{width:a,name:"playback-rate",html:t.get("Play Speed"),tooltip:i(e.playbackRate),icon:r.playbackRate,selector:o.map(t=>({value:t,name:`playback-rate-${t}`,default:t===e.playbackRate,html:i(t)})),onSelect:t=>(e.playbackRate=t.value,t.html),mounted:()=>{n(),e.on("video:ratechange",()=>n())}}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fIBkO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){let{i18n:t,icons:r,constructor:a}=e;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:t.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:t=>(e.subtitleOffset=t.range[0],t.range[0]+"s"),mounted:(t,r)=>{e.on("subtitleOffset",e=>{r.$range.value=e,r.tooltip=e+"s"})}}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2aaJe":[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{let 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{let r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{let 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":"9pCYc"}],"8MTUM":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("./miniProgressBar"),n=a.interopDefault(i),s=e("./autoOrientation"),l=a.interopDefault(s),c=e("./autoPlayback"),p=a.interopDefault(c),u=e("./fastForward"),d=a.interopDefault(u),f=e("./lock"),h=a.interopDefault(f);r.default=class{constructor(e){this.art=e,this.id=0;let{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(n.default),t.lock&&o.isMobile&&this.add(h.default),t.autoPlayback&&!t.isLive&&this.add(p.default),t.autoOrientation&&o.isMobile&&this.add(l.default),t.fastForward&&o.isMobile&&!t.isLive&&this.add(d.default);for(let e=0;ethis.next(e,t)):this.next(e,t)}next(e,t){let r=t&&t.name||e.name||`plugin${this.id}`;return(0,o.errorHandle)(!(0,o.has)(this,r),`Cannot add a plugin that already has the same name: ${r}`),(0,o.def)(this,r,{value:t}),this}}},{"../utils":"71aH7","./miniProgressBar":"87pSL","./autoOrientation":"ePEg5","./autoPlayback":"cVO99","./fastForward":"hFDwt","./lock":"1hsTH","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"87pSL":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return e.on("control",t=>{t?(0,o.removeClass)(e.template.$player,"art-mini-progress-bar"):(0,o.addClass)(e.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ePEg5:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,template:{$player:r,$video:a}}=e;return e.on("fullscreenWeb",i=>{if(i){let{videoWidth:i,videoHeight:n}=a,{clientWidth:s,clientHeight:l}=document.documentElement;(i>n&&sl)&&setTimeout(()=>{(0,o.setStyle)(r,"width",`${l}px`),(0,o.setStyle)(r,"height",`${s}px`),(0,o.setStyle)(r,"transform-origin","0 0"),(0,o.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,o.addClass)(r,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},t.AUTO_ORIENTATION_TIME)}else(0,o.hasClass)(r,"art-auto-orientation")&&((0,o.removeClass)(r,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",async e=>{if(!screen?.orientation?.lock)return;let t=screen.orientation.type;if(e){let{videoWidth:e,videoHeight:i}=a,{clientWidth:n,clientHeight:s}=document.documentElement;if(e>i&&ns){let e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),(0,o.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,o.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),(0,o.removeClass)(r,"art-auto-orientation-fullscreen"))}),{name:"autoOrientation",get state(){return(0,o.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cVO99:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,icons:r,storage:a,constructor:i,proxy:n,template:{$poster:s}}=e,l=e.layers.add({name:"auto-playback",html:`
`}),c=(0,o.query)(".art-auto-playback-last",l),p=(0,o.query)(".art-auto-playback-jump",l),u=(0,o.query)(".art-auto-playback-close",l);(0,o.append)(u,r.close);let d=null;function f(){let r=(a.get("times")||{})[e.option.id||e.option.url];clearTimeout(d),(0,o.setStyle)(l,"display","none"),r&&r>=i.AUTO_PLAYBACK_MIN&&((0,o.setStyle)(l,"display","flex"),c.innerText=`${t.get("Last Seen")} ${(0,o.secondToTime)(r)}`,p.innerText=t.get("Jump Play"),n(u,"click",()=>{(0,o.setStyle)(l,"display","none")}),n(p,"click",()=>{e.seek=r,e.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")}),e.once("video:timeupdate",()=>{d=setTimeout(()=>{(0,o.setStyle)(l,"display","none")},i.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",()=>{if(e.playing){let t=a.get("times")||{},r=Object.keys(t);r.length>i.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,a.set("times",t)}}),e.on("ready",f),e.on("restart",f),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(e){let t=a.get("times")||{};return delete t[e],a.set("times",t),t}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hFDwt:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,proxy:r,template:{$player:a,$video:i}}=e,n=null,s=!1,l=1,c=()=>{clearTimeout(n),s&&(s=!1,e.playbackRate=l,(0,o.removeClass)(a,"art-fast-forward"))};return r(i,"touchstart",r=>{1===r.touches.length&&e.playing&&!e.isLock&&(n=setTimeout(()=>{s=!0,l=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1hsTH":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{layers:t,icons:r,template:{$player:a}}=e;function i(){return(0,o.hasClass)(a,"art-lock")}function n(){(0,o.addClass)(a,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,o.removeClass)(a,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted(t){let a=(0,o.append)(t,r.lock),i=(0,o.append)(t,r.unlock);(0,o.setStyle)(a,"display","none"),e.on("lock",e=>{e?((0,o.setStyle)(a,"display","inline-flex"),(0,o.setStyle)(i,"display","none")):((0,o.setStyle)(a,"display","none"),(0,o.setStyle)(i,"display","inline-flex"))})},click(){i()?s():n()}}),{name:"lock",get state(){return i()},set state(value){value?n():s()}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["5lTcX"],"5lTcX","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,a,o,i,n,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[a]&&l[a],p=c.i||{},u=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(o[t])return o[t];var i="function"==typeof l[a]&&l[a];if(!r&&i)return i(t,!0);if(c)return c(t,!0);if(d&&"string"==typeof t)return d(t);var n=Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}p.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},p.cache={};var s=u[t]=new f.Module(t);e[t][0].call(s.exports,p,s,s.exports,l)}return u[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=d,this.exports={}},f.modules=e,f.cache=u,f.parent=c,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=p,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return l[a]}}),l[a]=f;for(var h=0;ht.call(this,this)),Z.DEBUG){let e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+Z.version),e("Env@"+Z.env),e("Build@"+Z.build);for(let t=0;te("Event@"+t.type))}Q.push(this)}static get instances(){return Q}static get version(){return"5.2.3"}static get env(){return"production"}static get build(){return"2025-04-20 10:10:54"}static get config(){return m.default}static get utils(){return u}static get scheme(){return f.default}static get Emitter(){return p.default}static get validator(){return l.default}static get kindOf(){return l.default.kindOf}static get html(){return v.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:e=>e},moreVideoAttr:{controls:!1,preload:u.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),Q.splice(Q.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=Z,Z.STYLE=n.default,Z.DEBUG=!1,Z.CONTEXTMENU=!0,Z.NOTICE_TIME=2e3,Z.SETTING_WIDTH=250,Z.SETTING_ITEM_WIDTH=200,Z.SETTING_ITEM_HEIGHT=35,Z.RESIZE_TIME=200,Z.SCROLL_TIME=200,Z.SCROLL_GAP=50,Z.AUTO_PLAYBACK_MAX=10,Z.AUTO_PLAYBACK_MIN=5,Z.AUTO_PLAYBACK_TIMEOUT=3e3,Z.RECONNECT_TIME_MAX=5,Z.RECONNECT_SLEEP_TIME=1e3,Z.CONTROL_HIDE_TIME=3e3,Z.DBCLICK_TIME=300,Z.DBCLICK_FULLSCREEN=!0,Z.MOBILE_DBCLICK_PLAY=!0,Z.MOBILE_CLICK_PLAY=!1,Z.AUTO_ORIENTATION_TIME=200,Z.INFO_LOOP_TIME=1e3,Z.FAST_FORWARD_VALUE=3,Z.FAST_FORWARD_TIME=1e3,Z.TOUCH_MOVE_RATIO=.5,Z.VOLUME_STEP=.1,Z.SEEK_STEP=5,Z.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],Z.ASPECT_RATIO=["default","4:3","16:9"],Z.FLIP=["normal","horizontal","vertical"],Z.FULLSCREEN_WEB_IN_BODY=!1,Z.LOG_VERSION=!0,Z.USE_RAF=!1,u.isBrowser&&(window.Artplayer=Z,u.setStyleText("artplayer-style",n.default),setTimeout(()=>{Z.LOG_VERSION&&console.log(`%c ArtPlayer %c ${Z.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"bundle-text:./style/index.less":"0016T","option-validator":"bAWi2","./utils/emitter":"66mFZ","./utils":"71aH7","./scheme":"AKEiO","./config":"lyjeQ","./template":"X13Zf","./i18n":"3jKkj","./player":"a90nx","./control":"8Z0Uf","./contextmenu":"2KYsr","./info":"02ajl","./subtitle":"eSWto","./events":"jo4S1","./hotkey":"6NoFy","./layer":"6G6hZ","./loading":"3dsEe","./notice":"dWGTw","./mask":"5POkG","./icons":"6OeNg","./setting":"3eYNH","./storage":"2aaJe","./plugins":"8MTUM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"0016T":[function(e,t,r,a){t.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#ffffff40;--art-hover-color:#ffffff40;--art-loaded-color:#ffffff40;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#000000b3;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{zoom:1;text-align:left;user-select:none;box-sizing:border-box;width:100%;height:100%;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;direction:ltr;outline:0;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{vertical-align:top;max-width:100%}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.art-poster{z-index:11;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;width:100%;height:100%;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);width:100%;bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;pointer-events:none;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;opacity:0;pointer-events:none;width:100%;height:100%;padding:0 var(--art-padding);transition:all var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:flex-end;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;padding-bottom:var(--art-bottom-gap);position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{width:100%;height:50%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;background-color:var(--art-hover-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;background-color:var(--art-loaded-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;background-color:var(--art-theme);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;pointer-events:auto;width:100%;height:100%;transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);position:absolute;inset:0 auto 0 0;width:var(--art-highlight-width)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{pointer-events:none;width:100%;height:100%}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 10px);border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{flex:1;justify-content:center;align-items:center;height:100%;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{cursor:pointer;flex:1;justify-content:center;width:100%;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;width:2px;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;background-color:var(--art-theme);width:100%;height:100%;position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;width:100%;height:auto;padding:var(--art-padding);pointer-events:none;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.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{flex-shrink:0;justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;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}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{justify-content:center;align-items:center;min-width:32px;height:24px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{appearance:none;background-color:#fff3;outline:none;width:80px;height:3px}.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:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{text-align:right;width:100px}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;user-select:all;width:250px;overflow:hidden}.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-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;width:320px;height:180px;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.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-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-mini-progress-bar .art-bottom,.art-video-player.art-lock .art-bottom{opacity:1;background-image:none;padding:0}.art-video-player.art-mini-progress-bar .art-bottom .art-controls,.art-video-player.art-lock .art-bottom .art-controls,.art-video-player.art-mini-progress-bar .art-bottom .art-progress,.art-video-player.art-lock .art-bottom .art-progress{transform:translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height)/4))}.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,.art-video-player.art-lock .art-bottom .art-progress-indicator{display:none!important}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{justify-content:center;display:flex;position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{flex-shrink:0;justify-content:center;align-items:center;width:100%;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[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:1000001;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}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(e,t,r,a){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 o=e(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(Array.isArray?Array.isArray(r):r instanceof Array)return"array";if(r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(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(r instanceof Date||"function"==typeof r.toDateString&&"function"==typeof r.getDate&&"function"==typeof r.setDate)return"date";if(r instanceof Error||"string"==typeof r.message&&r.constructor&&"number"==typeof r.constructor.stackTraceLimit)return"error";if(r instanceof RegExp||"string"==typeof r.flags&&"boolean"==typeof r.ignoreCase&&"boolean"==typeof r.multiline&&"boolean"==typeof r.global)return"regexp";switch(a(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"==typeof r.throw&&"function"==typeof r.return&&"function"==typeof r.next)return"generator";switch(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(e){return e.constructor?e.constructor.name:null}function o(e,t){var a=2n),o.export(r,"queryAll",()=>s),o.export(r,"addClass",()=>l),o.export(r,"removeClass",()=>c),o.export(r,"hasClass",()=>p),o.export(r,"append",()=>u),o.export(r,"remove",()=>d),o.export(r,"setStyle",()=>f),o.export(r,"setStyles",()=>h),o.export(r,"getStyle",()=>m),o.export(r,"sublings",()=>g),o.export(r,"inverseClass",()=>v),o.export(r,"tooltip",()=>y),o.export(r,"isInViewport",()=>b),o.export(r,"includeFromEvent",()=>x),o.export(r,"replaceElement",()=>w),o.export(r,"createElement",()=>j),o.export(r,"getIcon",()=>k),o.export(r,"setStyleText",()=>C),o.export(r,"supportsFlex",()=>S),o.export(r,"getRect",()=>I),o.export(r,"loadImg",()=>T);var i=e("./compatibility");function n(e,t=document){return t.querySelector(e)}function s(e,t=document){return Array.from(t.querySelectorAll(e))}function l(e,t){return e.classList.add(t)}function c(e,t){return e.classList.remove(t)}function p(e,t){return e.classList.contains(t)}function u(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function d(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function h(e,t){for(let r in t)f(e,r,t[r]);return e}function m(e,t,r=!0){let a=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(a):a}function g(e){return Array.from(e.parentElement.children).filter(t=>t!==e)}function v(e,t){g(e).forEach(e=>c(e,t)),l(e,t)}function y(e,t,r="top"){i.isMobile||(e.setAttribute("aria-label",t),l(e,"hint--rounded"),l(e,`hint--${r}`))}function b(e,t=0){let r=e.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,i=r.top-t<=a&&r.top+r.height+t>=0,n=r.left-t<=o+t&&r.left+r.width+t>=0;return i&&n}function x(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function w(e,t){return t.parentNode.replaceChild(e,t),e}function j(e){return document.createElement(e)}function k(e="",t=""){let r=j("i");return l(r,"art-icon"),l(r,`art-icon-${e}`),u(r,t),r}function C(e,t){let r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function S(){let e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function I(e){return e.getBoundingClientRect()}function T(e,t){return new Promise((r,a)=>{let o=new Image;o.onload=function(){if(t&&1!==t){let i=document.createElement("canvas"),n=i.getContext("2d");i.width=o.width*t,i.height=o.height*t,n.drawImage(o,0,0,i.width,i.height),i.toBlob(t=>{let o=URL.createObjectURL(t),i=new Image;i.onload=function(){r(i)},i.onerror=function(){URL.revokeObjectURL(o),a(Error(`Image load failed: ${e}`))},i.src=o})}else r(o)},o.onerror=function(){a(Error(`Image load failed: ${e}`))},o.src=e})}},{"./compatibility":"6ZTr6","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6ZTr6":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",()=>i),o.export(r,"isSafari",()=>n),o.export(r,"isWechat",()=>s),o.export(r,"isIE",()=>l),o.export(r,"isAndroid",()=>c),o.export(r,"isIOS",()=>p),o.export(r,"isIOS13",()=>u),o.export(r,"isMobile",()=>d),o.export(r,"isBrowser",()=>f);let i="undefined"!=typeof navigator?navigator.userAgent:"",n=/^((?!chrome|android).)*safari/i.test(i),s=/MicroMessenger/i.test(i),l=/MSIE|Trident/i.test(i),c=/android/i.test(i),p=/iPad|iPhone|iPod/i.test(i)&&!window.MSStream,u=p||i.includes("Macintosh")&&navigator.maxTouchPoints>=1,d=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i)||u,f="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hwmZz:[function(e,t,r,a){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":"9pCYc"}],inzwq:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(e,t,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=r+"00"),2===r.length&&(a=r+"0"),`${t},${a}`}).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"))}function n(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function s(e){let t=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=>{let a=e.match(t);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[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} --> ${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",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6b7Ip":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){let 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",()=>function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}),o.export(r,"download",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5NSdr":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",()=>i),o.export(r,"has",()=>s),o.export(r,"get",()=>l),o.export(r,"mergeDeep",()=>function e(...t){let r=e=>e&&"object"==typeof e&&!Array.isArray(e);return t.reduce((t,a)=>(Object.keys(a).forEach(o=>{let i=t[o],n=a[o];Array.isArray(i)&&Array.isArray(n)?t[o]=i.concat(...n):r(i)&&r(n)?t[o]=e(i,n):t[o]=n}),t),{})});let i=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function s(e,t){return n.call(e,t)}function l(e,t){return Object.getOwnPropertyDescriptor(e,t)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],epmNy:[function(e,t,r,a){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){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,e.apply(this,a)),t)}}function s(e,t){let r=!1;return function(...a){r||(e.apply(this,a),r=!0,setTimeout(function(){r=!1},t))}}o.defineInteropFlag(r),o.export(r,"sleep",()=>i),o.export(r,"debounce",()=>n),o.export(r,"throttle",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gapRl:[function(e,t,r,a){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){return e.charAt(0).toUpperCase()+e.slice(1)}function s(e){if(!e)return"00:00";let t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),a=Math.floor(e-3600*t-60*r);return(t>0?[t,r,a]:[r,a]).map(e=>e<10?`0${e}`:String(e)).join(":")}function l(e){return e.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e)}function c(e){let t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp(`(${Object.keys(t).join("|")})`,"g");return e.replace(r,e=>t[e]||e)}o.defineInteropFlag(r),o.export(r,"clamp",()=>i),o.export(r,"capitalize",()=>n),o.export(r,"secondToTime",()=>s),o.export(r,"escape",()=>l),o.export(r,"unescape",()=>c)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],AKEiO:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",()=>f);var i=e("../utils");let n="array",s="boolean",l="string",c="number",p="object",u="function";function d(e,t,r){return(0,i.errorHandle)(t===l||t===c||e instanceof Element,`${r.join(".")} require '${l}' or 'Element' type`)}let f={html:d,disable:`?${s}`,name:`?${l}`,index:`?${c}`,style:`?${p}`,click:`?${u}`,mounted:`?${u}`,tooltip:`?${l}|${c}`,width:`?${c}`,selector:`?${n}`,onSelect:`?${u}`,switch:`?${s}`,onSwitch:`?${u}`,range:`?${n}`,onRange:`?${u}`,onChange:`?${u}`};r.default={id:l,container:d,url:l,poster:l,type:l,theme:l,lang:l,volume:c,isLive:s,muted:s,autoplay:s,autoSize:s,autoMini:s,loop:s,flip:s,playbackRate:s,aspectRatio:s,screenshot:s,setting:s,hotkey:s,pip:s,mutex:s,backdrop:s,fullscreen:s,fullscreenWeb:s,subtitleOffset:s,miniProgressBar:s,useSSR:s,playsInline:s,lock:s,gesture:s,fastForward:s,autoPlayback:s,autoOrientation:s,airplay:s,proxy:`?${u}`,plugins:[u],layers:[f],contextmenu:[f],settings:[f],controls:[{...f,position:(e,t,r)=>{let a=["top","left","right"];return(0,i.errorHandle)(a.includes(e),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${s}`,html:l,url:l}],highlight:[{time:c,text:l}],thumbnails:{url:l,number:c,column:c,width:c,height:c,scale:c},subtitle:{url:l,name:l,type:l,style:p,escape:s,encoding:l,onVttLoad:u},moreVideoAttr:p,i18n:p,icons:p,cssVar:p,customType:p}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lyjeQ:[function(e,t,r,a){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":"9pCYc"}],X13Zf:[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");class i{constructor(e){this.art=e;let{option:t,constructor:r}=e;t.container instanceof Element?this.$container=t.container:(this.$container=(0,o.query)(t.container),(0,o.errorHandle)(this.$container,`No container element found by ${t.container}`)),(0,o.errorHandle)((0,o.supportsFlex)(),"The current browser does not support flex layout");let a=this.$container.tagName.toLowerCase();(0,o.errorHandle)("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),(0,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.init()}static get html(){return`
Player version:
5.2.3
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
`}query(e){return(0,o.query)(e,this.$container)}init(){let{option:e}=this.art;if(e.useSSR||(this.$container.innerHTML=i.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),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.$controlsCenter=this.query(".art-controls-center"),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.$contextmenu=this.query(".art-contextmenus"),e.proxy){let t=e.proxy.call(this.art,this.art);(0,o.errorHandle)(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),(0,o.replaceElement)(t,this.$video),t.className="art-video",this.$video=t}e.backdrop&&(0,o.addClass)(this.$player,"art-backdrop"),o.isMobile&&(0,o.addClass)(this.$player,"art-mobile")}destroy(e){this.$video.src="",e?this.$container.innerHTML="":(0,o.addClass)(this.$player,"art-destroy")}}r.default=i},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3jKkj":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./zh-cn"),s=o.interopDefault(n);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":s.default},this.language={},this.update(e.option.i18n)}init(){let e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=(0,i.mergeDeep)(this.languages,e),this.init()}}},{"../utils":"71aH7","./zh-cn":"5Y91w","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5Y91w":[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let o={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","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":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],a90nx:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./urlMix"),n=o.interopDefault(i),s=e("./attrMix"),l=o.interopDefault(s),c=e("./playMix"),p=o.interopDefault(c),u=e("./pauseMix"),d=o.interopDefault(u),f=e("./toggleMix"),h=o.interopDefault(f),m=e("./seekMix"),g=o.interopDefault(m),v=e("./volumeMix"),y=o.interopDefault(v),b=e("./currentTimeMix"),x=o.interopDefault(b),w=e("./durationMix"),j=o.interopDefault(w),k=e("./switchMix"),C=o.interopDefault(k),S=e("./playbackRateMix"),I=o.interopDefault(S),T=e("./aspectRatioMix"),$=o.interopDefault(T),E=e("./screenshotMix"),M=o.interopDefault(E),F=e("./fullscreenMix"),D=o.interopDefault(F),H=e("./fullscreenWebMix"),A=o.interopDefault(H),z=e("./pipMix"),R=o.interopDefault(z),O=e("./loadedMix"),Y=o.interopDefault(O),L=e("./playedMix"),P=o.interopDefault(L),V=e("./playingMix"),q=o.interopDefault(V),_=e("./autoSizeMix"),N=o.interopDefault(_),B=e("./rectMix"),W=o.interopDefault(B),U=e("./flipMix"),K=o.interopDefault(U),X=e("./miniMix"),G=o.interopDefault(X),Q=e("./posterMix"),Z=o.interopDefault(Q),J=e("./autoHeightMix"),ee=o.interopDefault(J),et=e("./cssVarMix"),er=o.interopDefault(et),ea=e("./themeMix"),eo=o.interopDefault(ea),ei=e("./typeMix"),en=o.interopDefault(ei),es=e("./stateMix"),el=o.interopDefault(es),ec=e("./subtitleOffsetMix"),ep=o.interopDefault(ec),eu=e("./airplayMix"),ed=o.interopDefault(eu),ef=e("./qualityMix"),eh=o.interopDefault(ef),em=e("./thumbnailsMix"),eg=o.interopDefault(em),ev=e("./optionInit"),ey=o.interopDefault(ev),eb=e("./eventInit"),ex=o.interopDefault(eb);r.default=class{constructor(e){(0,n.default)(e),(0,l.default)(e),(0,p.default)(e),(0,d.default)(e),(0,h.default)(e),(0,g.default)(e),(0,y.default)(e),(0,x.default)(e),(0,j.default)(e),(0,C.default)(e),(0,I.default)(e),(0,$.default)(e),(0,M.default)(e),(0,D.default)(e),(0,A.default)(e),(0,R.default)(e),(0,Y.default)(e),(0,P.default)(e),(0,q.default)(e),(0,N.default)(e),(0,W.default)(e),(0,K.default)(e),(0,G.default)(e),(0,Z.default)(e),(0,ee.default)(e),(0,er.default)(e),(0,eo.default)(e),(0,en.default)(e),(0,el.default)(e),(0,ep.default)(e),(0,ed.default)(e),(0,eh.default)(e),(0,eg.default)(e),(0,ex.default)(e),(0,ey.default)(e)}}},{"./urlMix":"kQoac","./attrMix":"deCma","./playMix":"fOJuP","./pauseMix":"fzHAy","./toggleMix":"cBHxQ","./seekMix":"koAPr","./volumeMix":"6eyuR","./currentTimeMix":"faaWv","./durationMix":"5y91K","./switchMix":"iceD8","./playbackRateMix":"keKwh","./aspectRatioMix":"jihET","./screenshotMix":"36kPY","./fullscreenMix":"2GYOJ","./fullscreenWebMix":"5aYAP","./pipMix":"7EnIB","./loadedMix":"3N9mP","./playedMix":"et96R","./playingMix":"9DzzM","./autoSizeMix":"i1LDY","./rectMix":"IqARI","./flipMix":"7E7Vs","./miniMix":"gpugx","./posterMix":"1SuFS","./autoHeightMix":"8x4te","./cssVarMix":"1CaTA","./themeMix":"2FqhO","./typeMix":"1fQQs","./stateMix":"iBOQW","./subtitleOffsetMix":"6vlBV","./airplayMix":"eftqT","./qualityMix":"5SdyX","./thumbnailsMix":"4HcqV","./optionInit":"fCWZK","./eventInit":"f8Lv3","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kQoac:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{option:t,template:{$video:r}}=e;(0,i.def)(e,"url",{get:()=>r.src,async set(a){if(a){let o=e.url,n=t.type||(0,i.getExt)(a),s=t.customType[n];n&&s?(await (0,i.sleep)(),e.loading.show=!0,s.call(e,r,a,e)):(URL.revokeObjectURL(o),r.src=a),o!==e.url&&(e.option.url=a,e.isReady&&o&&e.once("video:canplay",()=>{e.emit("restart",a)}))}else await (0,i.sleep)(),e.loading.show=!0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],deCma:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t}}=e;(0,i.def)(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fOJuP:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,option:a,constructor:{instances:o},template:{$video:n}}=e;(0,i.def)(e,"play",{value:async function(){let i=await n.play();if(r.show=t.get("Play"),e.emit("play"),a.mutex)for(let t=0;tn);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,i.def)(e,"pause",{value(){let o=t.pause();return a.show=r.get("Pause"),e.emit("pause"),o}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cBHxQ:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"toggle",{value:()=>e.playing?e.pause():e.play()})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],koAPr:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{notice:t}=e;(0,i.def)(e,"seek",{set(r){e.currentTime=r,e.duration&&(t.show=`${(0,i.secondToTime)(e.currentTime)} / ${(0,i.secondToTime)(e.duration)}`),e.emit("seek",e.currentTime)}}),(0,i.def)(e,"forward",{set(t){e.seek=e.currentTime+t}}),(0,i.def)(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6eyuR":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a,storage:o}=e;(0,i.def)(e,"volume",{get:()=>t.volume||0,set:e=>{t.volume=(0,i.clamp)(e,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&o.set("volume",t.volume)}}),(0,i.def)(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("muted",r)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],faaWv:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{Number.isNaN(r=parseFloat(r))||(t.currentTime=(0,i.clamp)(r,0,e.duration))}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5y91K":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"duration",{get:()=>{let{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iceD8:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){function t(t,r){return new Promise((a,o)=>{if(t===e.url)return;let{playing:i,aspectRatio:n,playbackRate:s}=e;e.pause(),e.url=t,e.notice.show="",e.once("video:error",o),e.once("video:loadedmetadata",()=>{e.currentTime=r}),e.once("video:canplay",async()=>{e.playbackRate=s,e.aspectRatio=n,i&&await e.play(),e.notice.show="",a()})})}(0,i.def)(e,"switchQuality",{value:r=>t(r,e.currentTime)}),(0,i.def)(e,"switchUrl",{value:e=>t(e,0)}),(0,i.def)(e,"switch",{set:e.switchUrl})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],keKwh:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,i.def)(e,"playbackRate",{get:()=>t.playbackRate,set(o){o?o!==t.playbackRate&&(t.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`):e.playbackRate=1}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jihET:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e;(0,i.def)(e,"aspectRatio",{get:()=>o.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)(0,i.setStyle)(a,"width",null),(0,i.setStyle)(a,"height",null),(0,i.setStyle)(a,"margin",null),delete o.dataset.aspectRatio;else{let e=n.split(":").map(Number),{clientWidth:t,clientHeight:r}=o,s=e[0]/e[1];t/r>s?((0,i.setStyle)(a,"width",`${s*r}px`),(0,i.setStyle)(a,"height","100%"),(0,i.setStyle)(a,"margin","0 auto")):((0,i.setStyle)(a,"width","100%"),(0,i.setStyle)(a,"height",`${t/s}px`),(0,i.setStyle)(a,"margin","auto 0")),o.dataset.aspectRatio=n}r.show=`${t.get("Aspect Ratio")}: ${"default"===n?t.get("Default"):n}`,e.emit("aspectRatio",n)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"36kPY":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{notice:t,template:{$video:r}}=e,a=(0,i.createElement)("canvas");(0,i.def)(e,"getDataURL",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),e(a.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}),(0,i.def)(e,"getBlobUrl",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(t=>{e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}),(0,i.def)(e,"screenshot",{value:async t=>{let a=await e.getDataURL(),o=t||`artplayer_${(0,i.secondToTime)(r.currentTime)}`;return(0,i.download)(a,`${o}.png`),e.emit("screenshot",a),a}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2GYOJ":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>l);var i=e("../libs/screenfull"),n=o.interopDefault(i),s=e("../utils");function l(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e,i=e=>{n.default.on("change",()=>{e.emit("fullscreen",n.default.isFullscreen),n.default.isFullscreen?(e.state="fullscreen",(0,s.addClass)(o,"art-fullscreen")):(0,s.removeClass)(o,"art-fullscreen"),e.emit("resize")}),n.default.on("error",t=>{e.emit("fullscreenError",t)}),(0,s.def)(e,"fullscreen",{get:()=>n.default.isFullscreen,async set(e){e?await n.default.request(o):await n.default.exit()}})},l=e=>{e.proxy(document,"webkitfullscreenchange",()=>{e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,s.def)(e,"fullscreen",{get:()=>document.fullscreenElement===a,set(t){t?(e.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})};e.once("video:loadedmetadata",()=>{n.default.isEnabled?i(e):a.webkitSupportsFullscreen?l(e):(0,s.def)(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),(0,s.def)(e,"fullscreen",(0,s.get)(e,"fullscreen"))})}},{"../libs/screenfull":"8v40z","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8v40z":[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let o=[["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"]],i=(()=>{if("undefined"==typeof document)return!1;let e=o[0],t={};for(let r of o)if(r[1]in document){for(let[a,o]of r.entries())t[e[a]]=o;return t}return!1})(),n={change:i.fullscreenchange,error:i.fullscreenerror},s={request:(e=document.documentElement,t)=>new Promise((r,a)=>{let o=()=>{s.off("change",o),r()};s.on("change",o);let n=e[i.requestFullscreen](t);n instanceof Promise&&n.then(o).catch(a)}),exit:()=>new Promise((e,t)=>{if(!s.isFullscreen)return void e();let r=()=>{s.off("change",r),e()};s.on("change",r);let a=document[i.exitFullscreen]();a instanceof Promise&&a.then(r).catch(t)}),toggle:(e,t)=>s.isFullscreen?s.exit():s.request(e,t),onchange(e){s.on("change",e)},onerror(e){s.on("error",e)},on(e,t){let r=n[e];r&&document.addEventListener(r,t,!1)},off(e,t){let r=n[e];r&&document.removeEventListener(r,t,!1)},raw:i};Object.defineProperties(s,{isFullscreen:{get:()=>!!document[i.fullscreenElement]},element:{enumerable:!0,get:()=>document[i.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>!!document[i.fullscreenEnabled]}}),i||(s={isEnabled:!1}),r.default=s},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aYAP":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,template:{$container:r,$player:a}}=e,o="";(0,i.def)(e,"fullscreenWeb",{get:()=>(0,i.hasClass)(a,"art-fullscreen-web"),set(n){n?(o=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,i.append)(document.body,a),e.state="fullscreenWeb",(0,i.setStyle)(a,"width","100%"),(0,i.setStyle)(a,"height","100%"),(0,i.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,i.append)(r,a),o&&(a.style.cssText=o,o=""),(0,i.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7EnIB":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,template:{$video:a}}=e;if(document.pictureInPictureEnabled){let{template:{$video:t},proxy:r,notice:a}=e;t.disablePictureInPicture=!1,(0,i.def)(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.state="pip",t.requestPictureInPicture().catch(e=>{throw a.show=e,e})):document.exitPictureInPicture().catch(e=>{throw a.show=e,e})}}),r(t,"enterpictureinpicture",()=>{e.emit("pip",!0)}),r(t,"leavepictureinpicture",()=>{e.emit("pip",!1)})}else if(a.webkitSupportsPresentationMode){let{$video:t}=e.template;t.webkitSetPresentationMode("inline"),(0,i.def)(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}else(0,i.def)(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3N9mP":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"loaded",{get:()=>e.loadedTime/t.duration}),(0,i.def)(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],et96R:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9DzzM":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"playing",{get:()=>"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],i1LDY:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$container:t,$player:r,$video:a}=e.template;(0,i.def)(e,"autoSize",{value(){let{videoWidth:o,videoHeight:n}=a,{width:s,height:l}=(0,i.getRect)(t),c=o/n;s/l>c?((0,i.setStyle)(r,"width",`${l*c/s*100}%`),(0,i.setStyle)(r,"height","100%")):((0,i.setStyle)(r,"width","100%"),(0,i.setStyle)(r,"height",`${s/c/l*100}%`)),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],IqARI:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"rect",{get:()=>(0,i.getRect)(e.template.$player)});let t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[a]})}(0,i.def)(e,"x",{get:()=>e.left+window.pageXOffset}),(0,i.def)(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7E7Vs":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$player:t},i18n:r,notice:a}=e;(0,i.def)(e,"flip",{get:()=>t.dataset.flip||"normal",set(o){o||(o="normal"),"normal"===o?delete t.dataset.flip:t.dataset.flip=o,a.show=`${r.get("Video Flip")}: ${r.get((0,i.capitalize)(o))}`,e.emit("flip",o)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gpugx:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{icons:t,proxy:r,storage:a,template:{$player:o,$video:n}}=e,s=!1,l=0,c=0;function p(){let{$mini:t}=e.template;t&&((0,i.removeClass)(o,"art-mini"),(0,i.setStyle)(t,"display","none"),o.prepend(n),e.emit("mini",!1))}function u(t,r){e.playing?((0,i.setStyle)(t,"display","none"),(0,i.setStyle)(r,"display","flex")):((0,i.setStyle)(t,"display","flex"),(0,i.setStyle)(r,"display","none"))}function d(){let{$mini:t}=e.template,r=(0,i.getRect)(t),o=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",o),a.set("left",n),(0,i.setStyle)(t,"top",`${o}px`),(0,i.setStyle)(t,"left",`${n}px`)}(0,i.def)(e,"mini",{get:()=>(0,i.hasClass)(o,"art-mini"),set(f){if(f){e.state="mini",(0,i.addClass)(o,"art-mini");let f=function(){let{$mini:o}=e.template;if(o)return(0,i.append)(o,n),(0,i.setStyle)(o,"display","flex");{let o=(0,i.createElement)("div");(0,i.addClass)(o,"art-mini-popup"),(0,i.append)(document.body,o),e.template.$mini=o,(0,i.append)(o,n);let d=(0,i.append)(o,'
');(0,i.append)(d,t.close),r(d,"click",p);let f=(0,i.append)(o,'
'),h=(0,i.append)(f,t.play),m=(0,i.append)(f,t.pause);return r(h,"click",()=>e.play()),r(m,"click",()=>e.pause()),u(h,m),e.on("video:playing",()=>u(h,m)),e.on("video:pause",()=>u(h,m)),e.on("video:timeupdate",()=>u(h,m)),r(o,"mousedown",e=>{s=0===e.button,l=e.pageX,c=e.pageY}),e.on("document:mousemove",e=>{if(s){(0,i.addClass)(o,"art-mini-droging");let t=e.pageX-l,r=e.pageY-c;(0,i.setStyle)(o,"transform",`translate(${t}px, ${r}px)`)}}),e.on("document:mouseup",()=>{if(s){s=!1,(0,i.removeClass)(o,"art-mini-droging");let e=(0,i.getRect)(o);a.set("left",e.left),a.set("top",e.top),(0,i.setStyle)(o,"left",`${e.left}px`),(0,i.setStyle)(o,"top",`${e.top}px`),(0,i.setStyle)(o,"transform",null)}}),o}}(),h=a.get("top"),m=a.get("left");h&&m?((0,i.setStyle)(f,"top",`${h}px`),(0,i.setStyle)(f,"left",`${m}px`),(0,i.isInViewport)(f)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1SuFS":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$poster:t}}=e;(0,i.def)(e,"poster",{get:()=>{try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set(e){(0,i.setStyle)(t,"backgroundImage",`url(${e})`)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8x4te":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$container:t,$video:r}}=e;(0,i.def)(e,"autoHeight",{value(){let{clientWidth:a}=t,{videoHeight:o,videoWidth:n}=r,s=a/n*o;(0,i.setStyle)(t,"height",s+"px"),e.emit("autoHeight",s)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1CaTA":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$player:t}=e.template;(0,i.def)(e,"cssVar",{value:(e,r)=>r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2FqhO":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"theme",{get:()=>e.cssVar("--art-theme"),set(t){e.cssVar("--art-theme",t)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1fQQs":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"type",{get:()=>e.option.type,set(t){e.option.type=t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iBOQW:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let t=["mini","pip","fullscreen","fullscreenWeb"];(0,i.def)(e,"state",{get:()=>t.find(t=>e[t])||"standard",set(r){for(let a=0;an);var i=e("../utils");function n(e){let{notice:t,i18n:r,template:a}=e;(0,i.def)(e,"subtitleOffset",{get:()=>a.$track?.offset||0,set(o){let{cues:n}=e.subtitle;if(!a.$track||0===n.length)return;let s=(0,i.clamp)(o,-10,10);a.$track.offset=s;for(let t=0;tn);var i=e("../utils");function n(e){let{i18n:t,notice:r,proxy:a,template:{$video:o}}=e,n=!0;window.WebKitPlaybackTargetAvailabilityEvent&&o.webkitShowPlaybackTargetPicker?a(o,"webkitplaybacktargetavailabilitychanged",e=>{switch(e.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,(0,i.def)(e,"airplay",{value(){n?(o.webkitShowPlaybackTargetPicker(),e.emit("airplay")):r.show=t.get("AirPlay Not Available")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5SdyX":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"quality",{set(t){let{controls:r,notice:a,i18n:o}=e,i=t.find(e=>e.default)||t[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:i?.html||"",selector:t,onSelect:async t=>(await e.switchQuality(t.url),a.show=`${o.get("Switch Video")}: ${t.html}`,t.html)})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4HcqV":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{events:t,option:r,template:{$progress:a,$video:o}}=e,n=null,s=null,l=!1,c=!1,p=!1;t.hover(a,()=>{p=!0},()=>{p=!1}),e.on("setBar",async(t,u,d)=>{let f=e.controls?.thumbnails,{url:h,scale:m}=r.thumbnails;if(!f||!h)return;let g="played"===t&&d&&i.isMobile;if("hover"===t||g){if(l||(l=!0,s=await (0,i.loadImg)(h,m),c=!0),!c||!p)return;let t=a.clientWidth*u;(0,i.setStyle)(f,"display","flex"),t>0&&ta.clientWidth-f/2?(0,i.setStyle)(n,"left",`${a.clientWidth-f}px`):(0,i.setStyle)(n,"left",`${t-f/2}px`)}(t):i.isMobile||(0,i.setStyle)(f,"display","none"),g&&(clearTimeout(n),n=setTimeout(()=>{(0,i.setStyle)(f,"display","none")},500))}}),(0,i.def)(e,"thumbnails",{get:()=>e.option.thumbnails,set(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(n),n=null,s=null,l=!1,c=!1)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fCWZK:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{option:t,storage:r,template:{$video:a,$poster:o}}=e;for(let r in t.moreVideoAttr)e.attr(r,t.moreVideoAttr[r]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,i.clamp)(t.volume,0,1));let n=r.get("volume");for(let r in"number"==typeof n&&(a.volume=(0,i.clamp)(n,0,1)),t.poster&&(0,i.setStyle)(o,"backgroundImage",`url(${t.poster})`),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(r,t.cssVar[r]);e.url=t.url}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f8Lv3:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>l);var i=e("../config"),n=o.interopDefault(i),s=e("../utils");function l(e){let{i18n:t,notice:r,option:a,constructor:o,proxy:i,template:{$player:l,$video:c,$poster:p}}=e,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",()=>{a.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 i=>{u{e.emit("resize"),s.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",()=>{e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",()=>{e.controls.show=!0,e.mask.show=!0}),e.on("video:play",()=>{e.mask.show=!1,(0,s.setStyle)(p,"display","none")}),e.on("video:playing",()=>{e.mask.show=!1}),e.on("video:progress",()=>{e.playing&&(e.loading.show=!1)}),e.on("video:seeked",()=>{e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",()=>{e.loading.show=!0,e.mask.show=!1}),e.on("video:timeupdate",()=>{e.mask.show=!1}),e.on("video:waiting",()=>{e.loading.show=!0,e.mask.show=!1})}},{"../config":"lyjeQ","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8Z0Uf":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils/component"),n=o.interopDefault(i),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),v=e("./time"),y=o.interopDefault(v),b=e("./volume"),x=o.interopDefault(b),w=e("./setting"),j=o.interopDefault(w),k=e("./screenshot"),C=o.interopDefault(k),S=e("./airplay"),I=o.interopDefault(S),T=e("../utils");class $ extends n.default{constructor(e){super(e),this.isHover=!1,this.name="control",this.timer=Date.now();let{constructor:t}=e,{$player:r,$bottom:a}=this.art.template;e.on("mousemove",()=>{T.isMobile||(this.show=!0)}),e.on("click",()=>{T.isMobile?this.toggle():this.show=!0}),e.on("document:mousemove",e=>{this.isHover=(0,T.includeFromEvent)(e,a)}),e.on("video:timeupdate",()=>{!e.setting.show&&!this.isHover&&!e.isInput&&e.playing&&this.show&&Date.now()-this.timer>=t.CONTROL_HIDE_TIME&&(this.show=!1)}),e.on("control",e=>{e?((0,T.removeClass)(r,"art-hide-cursor"),(0,T.addClass)(r,"art-hover"),this.timer=Date.now()):((0,T.addClass)(r,"art-hide-cursor"),(0,T.removeClass)(r,"art-hover"))}),this.init()}init(){let{option:e}=this.art;e.isLive||this.add((0,g.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,h.default)({name:"playAndPause",position:"left",index:10})),this.add((0,x.default)({name:"volume",position:"left",index:20})),e.isLive||this.add((0,y.default)({name:"time",position:"left",index:30})),e.quality.length&&(0,T.sleep)().then(()=>{this.art.quality=e.quality}),e.screenshot&&!T.isMobile&&this.add((0,C.default)({name:"screenshot",position:"right",index:20})),e.setting&&this.add((0,j.default)({name:"setting",position:"right",index:30})),e.pip&&this.add((0,d.default)({name:"pip",position:"right",index:40})),e.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,I.default)({name:"airplay",position:"right",index:50})),e.fullscreenWeb&&this.add((0,p.default)({name:"fullscreenWeb",position:"right",index:60})),e.fullscreen&&this.add((0,l.default)({name:"fullscreen",position:"right",index:70}));for(let t=0;te.selector}),(0,T.def)(r,"$control_item",{get:()=>a}),(0,T.def)(r,"$control_value",{get:()=>o})}let n=a(i,"click",async t=>{let r=t.composedPath()||[],a=e.selector.find(e=>e.$control_item===r.find(t=>e.$control_item===t));this.check(a),e.onSelect&&(o.innerHTML=await e.onSelect.call(this.art,a,a.$control_item,t))});r.push(n)}}r.default=$},{"../utils/component":"18nVI","./fullscreen":"c61Lj","./fullscreenWeb":"03jeB","./pip":"u8l8e","./playAndPause":"ebXtb","./progress":"bgoVP","./time":"ikc2j","./volume":"b8NFx","./setting":"03o9l","./screenshot":"4KCF5","./airplay":"4IS2d","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"18nVI":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./dom"),n=e("./error"),s=e("option-validator"),l=o.interopDefault(s),c=e("../scheme");r.default=class{constructor(e){this.id=0,this.art=e,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return(0,i.hasClass)(this.art.template.$player,`art-${this.name}-show`)}set show(e){let{$player:t}=this.art.template,r=`art-${this.name}-show`;e?(0,i.addClass)(t,r):(0,i.removeClass)(t,r),this.art.emit(this.name,e)}toggle(){this.show=!this.show}add(e){let t="function"==typeof e?e(this.art):e;if(t.html=t.html||"",(0,l.default)(t,c.ComponentOption),!this.$parent||!this.name||t.disable)return;let r=t.name||`${this.name}${this.id}`,a=this.cache.get(r);(0,n.errorHandle)(!a,`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;let o=(0,i.createElement)("div");(0,i.addClass)(o,`art-${this.name}`),(0,i.addClass)(o,`art-${this.name}-${r}`);let s=Array.from(this.$parent.children);o.dataset.index=t.index||this.id;let p=s.find(e=>Number(e.dataset.index)>=Number(o.dataset.index));p?p.insertAdjacentElement("beforebegin",o):(0,i.append)(this.$parent,o),t.html&&(0,i.append)(o,t.html),t.style&&(0,i.setStyles)(o,t.style),t.tooltip&&(0,i.tooltip)(o,t.tooltip);let u=[];if(t.click){let e=this.art.events.proxy(o,"click",e=>{e.preventDefault(),t.click.call(this.art,this,e)});u.push(e)}return t.selector&&["left","right"].includes(t.position)&&this.selector(t,o,u),this[r]=o,this.cache.set(r,{$ref:o,events:u,option:t}),t.mounted&&t.mounted.call(this.art,o),o}remove(e){let t=this.cache.get(e);(0,n.errorHandle)(t,`Can't find [${e}] from the [${this.name}]`),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(let e=0;en);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.fullscreenOn),s=(0,i.append)(e,a.fullscreenOff);(0,i.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreen=!t.fullscreen}),t.on("fullscreen",t=>{t?((0,i.tooltip)(e,o.get("Exit Fullscreen")),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","inline-flex")):((0,i.tooltip)(e,o.get("Fullscreen")),(0,i.setStyle)(n,"display","inline-flex"),(0,i.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03jeB":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.fullscreenWebOn),s=(0,i.append)(e,a.fullscreenWebOff);(0,i.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreenWeb=!t.fullscreenWeb}),t.on("fullscreenWeb",t=>{t?((0,i.tooltip)(e,o.get("Exit Web Fullscreen")),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","inline-flex")):((0,i.tooltip)(e,o.get("Web Fullscreen")),(0,i.setStyle)(n,"display","inline-flex"),(0,i.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],u8l8e:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t;(0,i.append)(e,a.pip),r(e,"click",()=>{t.pip=!t.pip}),t.on("pip",t=>{(0,i.tooltip)(e,o.get(t?"Exit PIP Mode":"PIP Mode"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ebXtb:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.play),s=(0,i.append)(e,a.pause);function l(){(0,i.setStyle)(n,"display","flex"),(0,i.setStyle)(s,"display","none")}function c(){(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","flex")}(0,i.tooltip)(n,o.get("Play")),(0,i.tooltip)(s,o.get("Pause")),r(n,"click",()=>{t.play()}),r(s,"click",()=>{t.pause()}),t.playing?c():l(),t.on("video:playing",()=>{c()}),t.on("video:pause",()=>{l()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bgoVP:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",()=>n),o.export(r,"setCurrentTime",()=>s),o.export(r,"default",()=>l);var i=e("../utils");function n(e,t){let{$progress:r}=e.template,{left:a}=(0,i.getRect)(r),o=i.isMobile?t.touches[0].clientX:t.clientX,n=(0,i.clamp)(o-a,0,r.clientWidth),s=n/r.clientWidth*e.duration,l=(0,i.secondToTime)(s),c=(0,i.clamp)(n/r.clientWidth,0,1);return{second:s,time:l,width:n,percentage:c}}function s(e,t){if(e.isRotate){let r=t.touches[0].clientY/e.height,a=r*e.duration;e.emit("setBar","played",r,t),e.seek=a}else{let{second:r,percentage:a}=n(e,t);e.emit("setBar","played",a,t),e.seek=r}}function l(e){return t=>{let{icons:r,option:a,proxy:o}=t;return{...e,html:`
`,mounted:e=>{let l=null,c=!1,p=(0,i.query)(".art-progress-hover",e),u=(0,i.query)(".art-progress-loaded",e),d=(0,i.query)(".art-progress-played",e),f=(0,i.query)(".art-progress-highlight",e),h=(0,i.query)(".art-progress-indicator",e),m=(0,i.query)(".art-progress-tip",e);function g(r,a){let{width:o,time:s}=a||n(t,r);m.innerText=s;let l=m.clientWidth;o<=l/2?(0,i.setStyle)(m,"left",0):o>e.clientWidth-l/2?(0,i.setStyle)(m,"left",`${e.clientWidth-l}px`):(0,i.setStyle)(m,"left",`${o-l/2}px`)}r.indicator?(0,i.append)(h,r.indicator):(0,i.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,a,o){let n="played"===r&&o&&i.isMobile;"loaded"===r&&(0,i.setStyle)(u,"width",`${100*a}%`),"hover"===r&&(0,i.setStyle)(p,"width",`${100*a}%`),"played"===r&&((0,i.setStyle)(d,"width",`${100*a}%`),(0,i.setStyle)(h,"left",`${100*a}%`)),n&&((0,i.setStyle)(m,"display","flex"),g(o,{width:e.clientWidth*a,time:(0,i.secondToTime)(a*t.duration)}),clearTimeout(l),l=setTimeout(()=>{(0,i.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){f.innerText="";for(let e=0;e`;(0,i.append)(f,n)}}),t.on("video:progress",()=>{t.emit("setBar","loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",()=>{t.emit("setBar","played",t.played)}):t.on("video:timeupdate",()=>{t.emit("setBar","played",t.played)}),t.on("video:ended",()=>{t.emit("setBar","played",1)}),t.emit("setBar","loaded",t.loaded||0),i.isMobile||(o(e,"click",e=>{e.target!==h&&s(t,e)}),o(e,"mousemove",r=>{let{percentage:a}=n(t,r);if(t.emit("setBar","hover",a,r),(0,i.setStyle)(m,"display","flex"),(0,i.includeFromEvent)(r,f)){let{width:a}=n(t,r),{text:o}=r.target.dataset;m.innerText=o;let s=m.clientWidth;a<=s/2?(0,i.setStyle)(m,"left",0):a>e.clientWidth-s/2?(0,i.setStyle)(m,"left",`${e.clientWidth-s}px`):(0,i.setStyle)(m,"left",`${a-s/2}px`)}else g(r)}),o(e,"mouseleave",e=>{(0,i.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),o(e,"mousedown",e=>{c=0===e.button}),t.on("document:mousemove",e=>{if(c){let{second:r,percentage:a}=n(t,e);t.emit("setBar","played",a,e),t.seek=r}}),t.on("document:mouseup",()=>{c&&(c=!1)}))}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ikc2j:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,style:i.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:e=>{function r(){let r=`${(0,i.secondToTime)(t.currentTime)} / ${(0,i.secondToTime)(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();let a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;en);var i=e("../utils");function n(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a}=t,o=(0,i.append)(e,a.volume),n=(0,i.append)(e,a.volumeClose),s=(0,i.append)(e,'
'),l=(0,i.append)(s,'
'),c=(0,i.append)(l,'
'),p=(0,i.append)(l,'
'),u=(0,i.append)(p,'
'),d=(0,i.append)(u,'
'),f=(0,i.append)(p,'
');function h(e){let{top:t,height:r}=(0,i.getRect)(p);return 1-(e.clientY-t)/r}function m(){if(t.muted||0===t.volume)(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(n,"display","flex"),(0,i.setStyle)(f,"top","100%"),(0,i.setStyle)(d,"top","100%"),c.innerText=0;else{let e=100*t.volume;(0,i.setStyle)(o,"display","flex"),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(f,"top",`${100-e}%`),(0,i.setStyle)(d,"top",`${100-e}%`),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(o,"click",()=>{t.muted=!0}),r(n,"click",()=>{t.muted=!1}),i.isMobile)(0,i.setStyle)(s,"display","none");else{let e=!1;r(p,"mousedown",r=>{e=0===r.button,t.volume=h(r)}),t.on("document:mousemove",r=>{e&&(t.muted=!1,t.volume=h(r))}),t.on("document:mouseup",()=>{e&&(e=!1)})}}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03o9l":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t;(0,i.append)(e,a.setting),r(e,"click",()=>{t.setting.toggle(),t.setting.resize()}),t.on("setting",t=>{(0,i.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4KCF5":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{let{proxy:r,icons:a}=t;(0,i.append)(e,a.screenshot),r(e,"click",()=>{t.screenshot()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IS2d":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("AirPlay"),mounted:e=>{let{proxy:r,icons:a}=t;(0,i.append)(e,a.airplay),r(e,"click",()=>t.airplay())}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2KYsr":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),s=o.interopDefault(n),l=e("./playbackRate"),c=o.interopDefault(l),p=e("./aspectRatio"),u=o.interopDefault(p),d=e("./flip"),f=o.interopDefault(d),h=e("./info"),m=o.interopDefault(h),g=e("./version"),v=o.interopDefault(g),y=e("./close"),b=o.interopDefault(y);class x extends s.default{constructor(e){super(e),this.name="contextmenu",this.$parent=e.template.$contextmenu,i.isMobile||this.init()}init(){let{option:e,proxy:t,template:{$player:r,$contextmenu:a}}=this.art;e.playbackRate&&this.add((0,c.default)({name:"playbackRate",index:10})),e.aspectRatio&&this.add((0,u.default)({name:"aspectRatio",index:20})),e.flip&&this.add((0,f.default)({name:"flip",index:30})),this.add((0,m.default)({name:"info",index:40})),this.add((0,v.default)({name:"version",index:50})),this.add((0,b.default)({name:"close",index:60}));for(let t=0;t{if(!this.art.constructor.CONTEXTMENU)return;e.preventDefault(),this.show=!0;let t=e.clientX,o=e.clientY,{height:n,width:s,left:l,top:c}=(0,i.getRect)(r),{height:p,width:u}=(0,i.getRect)(a),d=t-l,f=o-c;t+u>l+s&&(d=s-u),o+p>c+n&&(f=n-p),(0,i.setStyles)(a,{top:`${f}px`,left:`${d}px`})}),t(r,"click",e=>{(0,i.includeFromEvent)(e,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}r.default=x},{"../utils":"71aH7","../utils/component":"18nVI","./playbackRate":"69eLi","./aspectRatio":"lUefg","./flip":"kysiM","./info":"gqIgJ","./version":"kRU7C","./close":"jQ8Pm","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"69eLi":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{PLAYBACK_RATE:a}}=t,o=a.map(e=>`${1===e?r.get("Normal"):e.toFixed(1)}`).join("");return{...e,html:`${r.get("Play Speed")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.playbackRate=Number(a),e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="1"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("video:ratechange",()=>{let r=(0,i.queryAll)("span",e).find(e=>Number(e.dataset.value)===t.playbackRate);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lUefg:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{ASPECT_RATIO:a}}=t,o=a.map(e=>`${"default"===e?r.get("Default"):e}`).join("");return{...e,html:`${r.get("Aspect Ratio")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.aspectRatio=a,e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="default"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("aspectRatio",t=>{let r=(0,i.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kysiM:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{FLIP:a}}=t,o=a.map(e=>`${r.get((0,i.capitalize)(e))}`).join("");return{...e,html:`${r.get("Video Flip")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.flip=a.toLowerCase(),e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="normal"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("flip",t=>{let r=(0,i.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gqIgJ:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kRU7C:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return{...e,html:'ArtPlayer 5.2.3'}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jQ8Pm:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"02ajl":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),s=o.interopDefault(n);class l extends s.default{constructor(e){super(e),this.name="info",i.isMobile||this.init()}init(){let{proxy:e,constructor:t,template:{$infoPanel:r,$infoClose:a,$video:o}}=this.art;e(a,"click",()=>{this.show=!1});let n=null,s=(0,i.queryAll)("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),!function e(){for(let e=0;enull,this.init(e.option.subtitle);let t=!1;e.on("video:timeupdate",()=>{if(!this.url)return;let e=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof e&&e!==t&&(t=e,this.createTrack(e?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(e,t){let{$subtitle:r}=this.art.template;return"object"==typeof e?(0,i.setStyles)(r,e):(0,i.setStyle)(r,e,t)}update(){let{option:{subtitle:e},template:{$subtitle:t}}=this.art;t.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),t.innerHTML=this.activeCues.map((t,r)=>t.text.split(/\r?\n/).filter(e=>e.trim()).map(t=>`
${e.escape?(0,i.escape)(t):t}
`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(e,t={}){let{i18n:r,notice:a,option:o}=this.art,i={...o.subtitle,...t,url:e},n=await this.init(i);return t.name&&(a.show=`${r.get("Switch Subtitle")}: ${t.name}`),n}createTrack(e,t){let{template:r,proxy:a,option:o}=this.art,{$video:n,$track:s}=r,l=(0,i.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.label=o.subtitle.name||"Artplayer",l.track.mode="hidden",l.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),s.onload=null,(0,i.remove)(s),(0,i.append)(n,l),r.$track=l,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(e){let{notice:t,template:{$subtitle:r}}=this.art;return this.textTrack?((0,c.default)(e,u.default.subtitle),e.url)?(this.option=e,this.style(e.style),fetch(e.url).then(e=>e.arrayBuffer()).then(t=>{let r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,i.getExt)(e.url)){case"srt":{let t=(0,i.srtToVtt)(r),a=e.onVttLoad(t);return(0,i.vttToBlob)(a)}case"ass":{let t=(0,i.assToVtt)(r),a=e.onVttLoad(t);return(0,i.vttToBlob)(a)}case"vtt":{let t=e.onVttLoad(r);return(0,i.vttToBlob)(t)}default:return e.url}}).then(e=>(r.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.createTrack("metadata",e)),e)).catch(e=>{throw r.innerHTML="",t.show=e,e})):void 0:null}}r.default=d},{"./utils":"71aH7","./utils/component":"18nVI","option-validator":"bAWi2","./scheme":"AKEiO","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jo4S1:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./clickInit"),n=o.interopDefault(i),s=e("./hoverInit"),l=o.interopDefault(s),c=e("./moveInit"),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),v=e("./documentInit"),y=o.interopDefault(v),b=e("./updateInit"),x=o.interopDefault(b),w=e("./restoreInit"),j=o.interopDefault(w);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,n.default)(e,this),(0,l.default)(e,this),(0,p.default)(e,this),(0,d.default)(e,this),(0,h.default)(e,this),(0,g.default)(e,this),(0,y.default)(e,this),(0,x.default)(e,this),(0,j.default)(e,this)}proxy(e,t,r,a={}){if(Array.isArray(t))return t.map(t=>this.proxy(e,t,r,a));e.addEventListener(t,r,a);let o=()=>e.removeEventListener(t,r,a);return this.destroyEvents.push(o),o}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}remove(e){let t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}destroy(){for(let e=0;en);var i=e("../utils");function n(e,t){let{constructor:r,template:{$player:a,$video:o}}=e;t.proxy(document,["click","contextmenu"],t=>{(0,i.includeFromEvent)(t,a)?(e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit("focus",t)):(e.isInput=!1,e.isFocus=!1,e.emit("blur",t))});let n=[];t.proxy(o,"click",t=>{let a=Date.now();n.push(a);let{MOBILE_CLICK_PLAY:o,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r,p=n.filter(e=>a-e<=s);switch(p.length){case 1:e.emit("click",t),i.isMobile?!e.isLock&&o&&e.toggle():e.toggle(),n=p;break;case 2:e.emit("dblclick",t),i.isMobile?!e.isLock&&l&&e.toggle():c&&(e.fullscreen=!e.fullscreen),n=[];break;default:n=[]}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4jWHi":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{$player:r}=e.template;t.hover(r,t=>{(0,i.addClass)(r,"art-hover"),e.emit("hover",!0,t)},t=>{(0,i.removeClass)(r,"art-hover"),e.emit("hover",!1,t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eqaUm:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){let{$player:r}=e.template;t.proxy(r,"mousemove",t=>{e.emit("mousemove",t)})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eDXPO:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{option:r,constructor:a}=e;e.on("resize",()=>{let{aspectRatio:t,notice:a}=e;"standard"===e.state&&r.autoSize&&e.autoSize(),e.aspectRatio=t,a.show=""});let o=(0,i.debounce)(()=>e.emit("resize"),a.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],()=>o()),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",()=>o())}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"95GtS":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>s);var i=e("../utils"),n=e("../control/progress");function s(e,t){if(i.isMobile&&!e.option.isLive){let{$video:r,$progress:a}=e.template,o=null,s=!1,l=0,c=0,p=0,u=t=>{if(1===t.touches.length&&!e.isLock){o===a&&(0,n.setCurrentTime)(e,t),s=!0;let{pageX:r,pageY:i}=t.touches[0];l=r,c=i,p=e.currentTime}},d=t=>{if(1===t.touches.length&&s&&e.duration){let{pageX:a,pageY:n}=t.touches[0],s=function(e,t,r,a){var o=t-a,i=r-e,n=0;if(2>Math.abs(i)&&2>Math.abs(o))return n;var s=180*Math.atan2(o,i)/Math.PI;return s>=-45&&s<45?n=4:s>=45&&s<135?n=1:s>=-135&&s<-45?n=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(n=3),n}(l,c,a,n),u=[3,4].includes(s),d=[1,2].includes(s);if(u&&!e.isRotate||d&&e.isRotate){let s=(0,i.clamp)((a-l)/e.width,-1,1),u=(0,i.clamp)((n-c)/e.height,-1,1),d=e.isRotate?u:s,f=o===r?e.constructor.TOUCH_MOVE_RATIO:1,h=(0,i.clamp)(p+e.duration*d*f,0,e.duration);e.seek=h,e.emit("setBar","played",(0,i.clamp)(h/e.duration,0,1),t),e.notice.show=`${(0,i.secondToTime)(h)} / ${(0,i.secondToTime)(e.duration)}`}}};e.option.gesture&&(t.proxy(r,"touchstart",e=>{o=r,u(e)}),t.proxy(r,"touchmove",d)),t.proxy(a,"touchstart",e=>{o=a,u(e)}),t.proxy(a,"touchmove",d),t.proxy(document,"touchend",()=>{s&&(l=0,c=0,p=0,s=!1,o=null)})}}},{"../utils":"71aH7","../control/progress":"bgoVP","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],InUBx:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{option:r,constructor:a,template:{$container:o}}=e,n=(0,i.throttle)(()=>{e.emit("view",(0,i.isInViewport)(o,a.SCROLL_GAP))},a.SCROLL_TIME);t.proxy(window,"scroll",()=>n()),e.on("view",t=>{r.autoMini&&(e.mini=!t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hoLfM:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){t.proxy(document,"mousemove",t=>{e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",t=>{e.emit("document:mouseup",t)})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cl8m3:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){if(e.constructor.USE_RAF){let t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",()=>{cancelAnimationFrame(t)})}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bK8As:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6NoFy":[function(e,t,r,a){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.option.hotkey&&!o.isMobile&&this.init()}init(){let{proxy:e,constructor:t}=this.art;this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP}),e(document,"keydown",e=>{if(this.art.isFocus){let t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey){let t=this.keys[e.code];if(t){e.preventDefault();for(let r=0;r{a.innerText="",(0,o.removeClass)(r,"art-notice-show")},t.NOTICE_TIME)):(0,o.removeClass)(r,"art-notice-show")}}},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5POkG":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),s=o.interopDefault(n);class l extends s.default{constructor(e){super(e),this.name="mask";let{template:t,icons:r,events:a}=e,o=(0,i.append)(t.$state,r.state),n=(0,i.append)(t.$state,r.error);(0,i.setStyle)(n,"display","none"),e.on("destroy",()=>{(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(n,"display",null)}),a.proxy(t.$state,"click",()=>e.play())}}r.default=l},{"./utils":"71aH7","./utils/component":"18nVI","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6OeNg":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("bundle-text:./loading.svg"),s=o.interopDefault(n),l=e("bundle-text:./state.svg"),c=o.interopDefault(l),p=e("bundle-text:./check.svg"),u=o.interopDefault(p),d=e("bundle-text:./play.svg"),f=o.interopDefault(d),h=e("bundle-text:./pause.svg"),m=o.interopDefault(h),g=e("bundle-text:./volume.svg"),v=o.interopDefault(g),y=e("bundle-text:./volume-close.svg"),b=o.interopDefault(y),x=e("bundle-text:./screenshot.svg"),w=o.interopDefault(x),j=e("bundle-text:./setting.svg"),k=o.interopDefault(j),C=e("bundle-text:./arrow-left.svg"),S=o.interopDefault(C),I=e("bundle-text:./arrow-right.svg"),T=o.interopDefault(I),$=e("bundle-text:./playback-rate.svg"),E=o.interopDefault($),M=e("bundle-text:./aspect-ratio.svg"),F=o.interopDefault(M),D=e("bundle-text:./config.svg"),H=o.interopDefault(D),A=e("bundle-text:./pip.svg"),z=o.interopDefault(A),R=e("bundle-text:./lock.svg"),O=o.interopDefault(R),Y=e("bundle-text:./unlock.svg"),L=o.interopDefault(Y),P=e("bundle-text:./fullscreen-off.svg"),V=o.interopDefault(P),q=e("bundle-text:./fullscreen-on.svg"),_=o.interopDefault(q),N=e("bundle-text:./fullscreen-web-off.svg"),B=o.interopDefault(N),W=e("bundle-text:./fullscreen-web-on.svg"),U=o.interopDefault(W),K=e("bundle-text:./switch-on.svg"),X=o.interopDefault(K),G=e("bundle-text:./switch-off.svg"),Q=o.interopDefault(G),Z=e("bundle-text:./flip.svg"),J=o.interopDefault(Z),ee=e("bundle-text:./error.svg"),et=o.interopDefault(ee),er=e("bundle-text:./close.svg"),ea=o.interopDefault(er),eo=e("bundle-text:./airplay.svg"),ei=o.interopDefault(eo);r.default=class{constructor(e){let t={loading:s.default,state:c.default,play:f.default,pause:m.default,check:u.default,volume:v.default,volumeClose:b.default,screenshot:w.default,setting:k.default,pip:z.default,arrowLeft:S.default,arrowRight:T.default,playbackRate:E.default,aspectRatio:F.default,config:H.default,lock:O.default,flip:J.default,unlock:L.default,fullscreenOff:V.default,fullscreenOn:_.default,fullscreenWebOff:B.default,fullscreenWebOn:U.default,switchOn:X.default,switchOff:Q.default,error:et.default,close:ea.default,airplay:ei.default,...e.option.icons};for(let e in t)(0,i.def)(this,e,{get:()=>(0,i.getIcon)(e,t[e])})}}},{"../utils":"71aH7","bundle-text:./loading.svg":"7tDub","bundle-text:./state.svg":"1ElZc","bundle-text:./check.svg":"lmgoP","bundle-text:./play.svg":"lVWoQ","bundle-text:./pause.svg":"5Mnax","bundle-text:./volume.svg":"w3eIa","bundle-text:./volume-close.svg":"rHjo1","bundle-text:./screenshot.svg":"2KcqM","bundle-text:./setting.svg":"8rQMV","bundle-text:./arrow-left.svg":"kqGBE","bundle-text:./arrow-right.svg":"aFjpC","bundle-text:./playback-rate.svg":"lx7ZM","bundle-text:./aspect-ratio.svg":"2sEjf","bundle-text:./config.svg":"fQTgE","bundle-text:./pip.svg":"2CaxO","bundle-text:./lock.svg":"aCGnW","bundle-text:./unlock.svg":"bTrAV","bundle-text:./fullscreen-off.svg":"bA3p0","bundle-text:./fullscreen-on.svg":"fTuY8","bundle-text:./fullscreen-web-off.svg":"tvKf4","bundle-text:./fullscreen-web-on.svg":"1F1oB","bundle-text:./switch-on.svg":"7qNHs","bundle-text:./switch-off.svg":"28aV8","bundle-text:./flip.svg":"1uXI6","bundle-text:./error.svg":"9f4dh","bundle-text:./close.svg":"4nTtS","bundle-text:./airplay.svg":"cDPXC","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7tDub":[function(e,t,r,a){t.exports=''},{}],"1ElZc":[function(e,t,r,a){t.exports=''},{}],lmgoP:[function(e,t,r,a){t.exports=''},{}],lVWoQ:[function(e,t,r,a){t.exports=''},{}],"5Mnax":[function(e,t,r,a){t.exports=''},{}],w3eIa:[function(e,t,r,a){t.exports=''},{}],rHjo1:[function(e,t,r,a){t.exports=''},{}],"2KcqM":[function(e,t,r,a){t.exports=''},{}],"8rQMV":[function(e,t,r,a){t.exports=''},{}],kqGBE:[function(e,t,r,a){t.exports=''},{}],aFjpC:[function(e,t,r,a){t.exports=''},{}],lx7ZM:[function(e,t,r,a){t.exports=''},{}],"2sEjf":[function(e,t,r,a){t.exports=''},{}],fQTgE:[function(e,t,r,a){t.exports=''},{}],"2CaxO":[function(e,t,r,a){t.exports=''},{}],aCGnW:[function(e,t,r,a){t.exports=''},{}],bTrAV:[function(e,t,r,a){t.exports=''},{}],bA3p0:[function(e,t,r,a){t.exports=''},{}],fTuY8:[function(e,t,r,a){t.exports=''},{}],tvKf4:[function(e,t,r,a){t.exports=''},{}],"1F1oB":[function(e,t,r,a){t.exports=''},{}],"7qNHs":[function(e,t,r,a){t.exports=''},{}],"28aV8":[function(e,t,r,a){t.exports=''},{}],"1uXI6":[function(e,t,r,a){t.exports=''},{}],"9f4dh":[function(e,t,r,a){t.exports=''},{}],"4nTtS":[function(e,t,r,a){t.exports=''},{}],cDPXC:[function(e,t,r,a){t.exports=''},{}],"3eYNH":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./flip"),n=o.interopDefault(i),s=e("./aspectRatio"),l=o.interopDefault(s),c=e("./playbackRate"),p=o.interopDefault(c),u=e("./subtitleOffset"),d=o.interopDefault(u),f=e("../utils/component"),h=o.interopDefault(f),m=e("../utils");class g extends h.default{constructor(e){super(e);let{option:t,controls:r,template:{$setting:a}}=e;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...t.settings],t.setting&&(this.format(),this.render(),e.on("blur",()=>{this.show&&(this.show=!1,this.render())}),e.on("focus",e=>{let t=(0,m.includeFromEvent)(e,r.setting),a=(0,m.includeFromEvent)(e,this.$parent);!this.show||t||a||(this.show=!1,this.render())}),e.on("resize",()=>this.resize()))}get builtin(){let e=[],{option:t}=this.art;return t.playbackRate&&e.push((0,p.default)(this.art)),t.aspectRatio&&e.push((0,l.default)(this.art)),t.flip&&e.push((0,n.default)(this.art)),t.subtitleOffset&&e.push((0,d.default)(this.art)),e}traverse(e,t=this.option){for(let r=0;r{t.default=t===e,t.default&&t.$item&&(0,m.inverseClass)(t.$item,"art-current")},e.$option),this.render(e.$parents)}format(e=this.option,t,r,a=[]){for(let o=0;ot}),(0,m.def)(i,"$parents",{get:()=>r}),(0,m.def)(i,"$option",{get:()=>e});let a=[];(0,m.def)(i,"$events",{get:()=>a}),(0,m.def)(i,"$formatted",{get:()=>!0})}this.format(i.selector||[],i,e,a)}this.option=e}find(e=""){let t=null;return this.traverse(r=>{r.name===e&&(t=r)}),t}resize(){let{controls:e,constructor:{SETTING_WIDTH:t,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(e.setting&&this.show){let i=this.active[0]?.$parent?.width||t,{left:n,width:s}=(0,m.getRect)(e.setting),{left:l,width:c}=(0,m.getRect)(a),p=n-l+s/2-i/2,u=this.active===this.option?this.active.length*r:(this.active.length+1)*r;if((0,m.setStyle)(o,"height",`${u}px`),(0,m.setStyle)(o,"width",`${i}px`),this.art.isRotate||m.isMobile)return;p+i>c?((0,m.setStyle)(o,"left",null),(0,m.setStyle)(o,"right",null)):((0,m.setStyle)(o,"left",`${p}px`),(0,m.setStyle)(o,"right","auto"))}}inactivate(e){for(let t=0;t'),s=(0,m.createElement)("div");(0,m.addClass)(s,"art-setting-item-left-icon"),(0,m.append)(s,a),(0,m.append)(n,s),(0,m.append)(n,e.$parent.html);let l=r(i,"click",()=>this.render(e.$parents));e.$parent.$events.push(l),(0,m.append)(t,i)}creatItem(e,t=!1){if(!this.cache.has(e.$option))return;let r=this.cache.get(e.$option),a=e.$item,o="selector";(0,m.has)(e,"switch")&&(o="switch"),(0,m.has)(e,"range")&&(o="range"),(0,m.has)(e,"onClick")&&(o="button");let{icons:i,proxy:n,constructor:s}=this.art,l=(0,m.createElement)("div");(0,m.addClass)(l,"art-setting-item"),(0,m.setStyle)(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=e.name||"",l.dataset.value=e.value||"";let c=(0,m.append)(l,'
'),p=(0,m.append)(l,'
'),u=(0,m.createElement)("div");switch((0,m.addClass)(u,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":(0,m.append)(u,e.icon||i.config);break;case"selector":e.selector?.length?(0,m.append)(u,e.icon||i.config):(0,m.append)(u,i.check)}(0,m.append)(c,u),(0,m.def)(e,"$icon",{configurable:!0,get:()=>u}),(0,m.def)(e,"icon",{configurable:!0,get:()=>u.innerHTML,set(e){u.innerHTML="",(0,m.append)(u,e)}});let d=(0,m.createElement)("div");(0,m.addClass)(d,"art-setting-item-left-text"),(0,m.append)(d,e.html||""),(0,m.append)(c,d),(0,m.def)(e,"$html",{configurable:!0,get:()=>d}),(0,m.def)(e,"html",{configurable:!0,get:()=>d.innerHTML,set(e){d.innerHTML="",(0,m.append)(d,e)}});let f=(0,m.createElement)("div");switch((0,m.addClass)(f,"art-setting-item-right-tooltip"),(0,m.append)(f,e.tooltip||""),(0,m.append)(p,f),(0,m.def)(e,"$tooltip",{configurable:!0,get:()=>f}),(0,m.def)(e,"tooltip",{configurable:!0,get:()=>f.innerHTML,set(e){f.innerHTML="",(0,m.append)(f,e)}}),o){case"switch":{let t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");let r=(0,m.append)(t,i.switchOn),a=(0,m.append)(t,i.switchOff);(0,m.setStyle)(e.switch?a:r,"display","none"),(0,m.append)(p,t),(0,m.def)(e,"$switch",{configurable:!0,get:()=>t});let o=e.switch;(0,m.def)(e,"switch",{configurable:!0,get:()=>o,set(e){o=e,e?((0,m.setStyle)(a,"display","none"),(0,m.setStyle)(r,"display",null)):((0,m.setStyle)(a,"display",null),(0,m.setStyle)(r,"display","none"))}});break}case"range":{let t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");let r=(0,m.append)(t,'');r.value=e.range[0],r.min=e.range[1],r.max=e.range[2],r.step=e.range[3],(0,m.addClass)(r,"art-setting-range"),(0,m.append)(p,t),(0,m.def)(e,"$range",{configurable:!0,get:()=>r});let a=[...e.range];(0,m.def)(e,"range",{configurable:!0,get:()=>a,set(e){a=[...e],r.value=e[0],r.min=e[1],r.max=e[2],r.step=e[3]}})}break;case"selector":if(e.selector?.length){let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon"),(0,m.append)(e,i.arrowRight),(0,m.append)(p,e)}}switch(o){case"switch":if(e.onSwitch){let t=n(l,"click",async t=>{e.switch=await e.onSwitch.call(this.art,e,l,t)});e.$events.push(t)}break;case"range":if(e.$range){if(e.onRange){let t=n(e.$range,"change",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onRange.call(this.art,e,l,t)});e.$events.push(t)}if(e.onChange){let t=n(e.$range,"input",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onChange.call(this.art,e,l,t)});e.$events.push(t)}}break;case"selector":{let t=n(l,"click",async t=>{e.selector?.length?this.render(e.selector):(this.check(e),e.$parent.onSelect&&(e.$parent.tooltip=await e.$parent.onSelect.call(this.art,e,l,t)))});e.$events.push(t),e.default&&(0,m.addClass)(l,"art-current")}break;case"button":if(e.onClick){let t=n(l,"click",async t=>{e.tooltip=await e.onClick.call(this.art,e,l,t)});e.$events.push(t)}}(0,m.def)(e,"$item",{configurable:!0,get:()=>l}),t?(0,m.replaceElement)(l,a):(0,m.append)(r,l),e.mounted&&setTimeout(()=>e.mounted.call(this.art,e.$item,e),0)}render(e=this.option){if(this.active=e,this.cache.has(e)){let t=this.cache.get(e);(0,m.inverseClass)(t,"art-current")}else{let t=(0,m.createElement)("div");this.cache.set(e,t),(0,m.addClass)(t,"art-setting-panel"),(0,m.append)(this.$parent,t),(0,m.inverseClass)(t,"art-current"),e[0]?.$parent&&this.creatHeader(e[0]);for(let t=0;tn);var i=e("../utils");function n(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:o}}=e;function n(e){return t.get((0,i.capitalize)(e))}function s(){let t=e.setting.find(`flip-${e.flip}`);e.setting.check(t)}return{width:a,name:"flip",html:t.get("Video Flip"),tooltip:n(e.flip),icon:r.flip,selector:o.map(t=>({value:t,name:`flip-${t}`,default:t===e.flip,html:n(t)})),onSelect:t=>(e.flip=t.value,t.html),mounted:()=>{s(),e.on("flip",()=>s())}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"84NBV":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=e;function i(e){return"default"===e?t.get("Default"):e}function n(){let t=e.setting.find(`aspect-ratio-${e.aspectRatio}`);e.setting.check(t)}return{width:a,name:"aspect-ratio",html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:i(e.aspectRatio),selector:o.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.aspectRatio,html:i(t)})),onSelect:t=>(e.aspectRatio=t.value,t.html),mounted:()=>{n(),e.on("aspectRatio",()=>n())}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aetWt:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=e;function i(e){return 1===e?t.get("Normal"):e.toFixed(1)}function n(){let t=e.setting.find(`playback-rate-${e.playbackRate}`);e.setting.check(t)}return{width:a,name:"playback-rate",html:t.get("Play Speed"),tooltip:i(e.playbackRate),icon:r.playbackRate,selector:o.map(t=>({value:t,name:`playback-rate-${t}`,default:t===e.playbackRate,html:i(t)})),onSelect:t=>(e.playbackRate=t.value,t.html),mounted:()=>{n(),e.on("video:ratechange",()=>n())}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fIBkO:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:a}=e;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:t.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:t=>(e.subtitleOffset=t.range[0],t.range[0]+"s"),mounted:(t,r)=>{e.on("subtitleOffset",e=>{r.$range.value=e,r.tooltip=e+"s"})}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2aaJe":[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{let 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{let r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{let 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":"9pCYc"}],"8MTUM":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./miniProgressBar"),s=o.interopDefault(n),l=e("./autoOrientation"),c=o.interopDefault(l),p=e("./autoPlayback"),u=o.interopDefault(p),d=e("./fastForward"),f=o.interopDefault(d),h=e("./lock"),m=o.interopDefault(h);r.default=class{constructor(e){this.art=e,this.id=0;let{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(s.default),t.lock&&i.isMobile&&this.add(m.default),t.autoPlayback&&!t.isLive&&this.add(u.default),t.autoOrientation&&i.isMobile&&this.add(c.default),t.fastForward&&i.isMobile&&!t.isLive&&this.add(f.default);for(let e=0;ethis.next(e,t)):this.next(e,t)}next(e,t){let r=t&&t.name||e.name||`plugin${this.id}`;return(0,i.errorHandle)(!(0,i.has)(this,r),`Cannot add a plugin that already has the same name: ${r}`),(0,i.def)(this,r,{value:t}),this}}},{"../utils":"71aH7","./miniProgressBar":"87pSL","./autoOrientation":"ePEg5","./autoPlayback":"cVO99","./fastForward":"hFDwt","./lock":"1hsTH","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"87pSL":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return e.on("control",t=>{t?(0,i.removeClass)(e.template.$player,"art-mini-progress-bar"):(0,i.addClass)(e.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ePEg5:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,template:{$player:r,$video:a}}=e;return e.on("fullscreenWeb",o=>{if(o){let{videoWidth:o,videoHeight:n}=a,{clientWidth:s,clientHeight:l}=document.documentElement;(o>n&&sl)&&setTimeout(()=>{(0,i.setStyle)(r,"width",`${l}px`),(0,i.setStyle)(r,"height",`${s}px`),(0,i.setStyle)(r,"transform-origin","0 0"),(0,i.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,i.addClass)(r,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},t.AUTO_ORIENTATION_TIME)}else(0,i.hasClass)(r,"art-auto-orientation")&&((0,i.removeClass)(r,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",async e=>{if(!screen?.orientation?.lock)return;let t=screen.orientation.type;if(e){let{videoWidth:e,videoHeight:o}=a,{clientWidth:n,clientHeight:s}=document.documentElement;if(e>o&&ns){let e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),(0,i.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,i.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),(0,i.removeClass)(r,"art-auto-orientation-fullscreen"))}),{name:"autoOrientation",get state(){return(0,i.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cVO99:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,icons:r,storage:a,constructor:o,proxy:n,template:{$poster:s}}=e,l=e.layers.add({name:"auto-playback",html:`
`}),c=(0,i.query)(".art-auto-playback-last",l),p=(0,i.query)(".art-auto-playback-jump",l),u=(0,i.query)(".art-auto-playback-close",l);(0,i.append)(u,r.close);let d=null;function f(){let r=(a.get("times")||{})[e.option.id||e.option.url];clearTimeout(d),(0,i.setStyle)(l,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&((0,i.setStyle)(l,"display","flex"),c.innerText=`${t.get("Last Seen")} ${(0,i.secondToTime)(r)}`,p.innerText=t.get("Jump Play"),n(u,"click",()=>{(0,i.setStyle)(l,"display","none")}),n(p,"click",()=>{e.seek=r,e.play(),(0,i.setStyle)(s,"display","none"),(0,i.setStyle)(l,"display","none")}),e.once("video:timeupdate",()=>{d=setTimeout(()=>{(0,i.setStyle)(l,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",()=>{if(e.playing){let t=a.get("times")||{},r=Object.keys(t);r.length>o.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,a.set("times",t)}}),e.on("ready",f),e.on("restart",f),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(e){let t=a.get("times")||{};return delete t[e],a.set("times",t),t}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hFDwt:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,proxy:r,template:{$player:a,$video:o}}=e,n=null,s=!1,l=1,c=()=>{clearTimeout(n),s&&(s=!1,e.playbackRate=l,(0,i.removeClass)(a,"art-fast-forward"))};return r(o,"touchstart",r=>{1===r.touches.length&&e.playing&&!e.isLock&&(n=setTimeout(()=>{s=!0,l=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,i.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,i.hasClass)(a,"art-fast-forward")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1hsTH":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{layers:t,icons:r,template:{$player:a}}=e;function o(){return(0,i.hasClass)(a,"art-lock")}function n(){(0,i.addClass)(a,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,i.removeClass)(a,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted(t){let a=(0,i.append)(t,r.lock),o=(0,i.append)(t,r.unlock);(0,i.setStyle)(a,"display","none"),e.on("lock",e=>{e?((0,i.setStyle)(a,"display","inline-flex"),(0,i.setStyle)(o,"display","none")):((0,i.setStyle)(a,"display","none"),(0,i.setStyle)(o,"display","inline-flex"))})},click(){o()?s():n()}}),{name:"lock",get state(){return o()},set state(value){value?n():s()}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["5lTcX"],"5lTcX","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer/dist/artplayer.legacy.js b/packages/artplayer/dist/artplayer.legacy.js index acfdbfcbe..bca1177af 100644 --- a/packages/artplayer/dist/artplayer.legacy.js +++ b/packages/artplayer/dist/artplayer.legacy.js @@ -5,4 +5,4 @@ * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ -!function(e,t,r,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],s=i.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 a[n]&&a[n];if(!r&&o)return o(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}f.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},f.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,f,p,p.exports,this)}return s[t].exports;function f(e){var t=f.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=i,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[n]}}),a[n]=c;for(var u=0;u").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c<_.default.events.length;c++)i.on("video:"+_.default.events[c],function(e){return l("Event@"+e.type)})}return et.push((0,o._)(i)),i}return(0,i._)(r,[{key:"proxy",get:function(){return this.events.proxy}},{key:"query",get:function(){return this.template.query}},{key:"video",get:function(){return this.template.$video}},{key:"destroy",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.events.destroy(),this.template.destroy(e),et.splice(et.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return et}},{key:"version",get:function(){return"5.2.3"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2025-04-20 09:53:53"}},{key:"config",get:function(){return _.default}},{key:"utils",get:function(){return m}},{key:"scheme",get:function(){return g.default}},{key:"Emitter",get:function(){return h.default}},{key:"validator",get:function(){return f.default}},{key:"kindOf",get:function(){return f.default.kindOf}},{key:"html",get:function(){return w.default.html}},{key:"option",get:function(){var e;return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:function(e){return e}},moreVideoAttr:{controls:!1,preload:m.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:null===(e=navigator)||void 0===e?void 0:e.language.toLowerCase()}}}]),r}(h.default);er.STYLE=u.default,er.DEBUG=!1,er.CONTEXTMENU=!0,er.NOTICE_TIME=2e3,er.SETTING_WIDTH=250,er.SETTING_ITEM_WIDTH=200,er.SETTING_ITEM_HEIGHT=35,er.RESIZE_TIME=200,er.SCROLL_TIME=200,er.SCROLL_GAP=50,er.AUTO_PLAYBACK_MAX=10,er.AUTO_PLAYBACK_MIN=5,er.AUTO_PLAYBACK_TIMEOUT=3e3,er.RECONNECT_TIME_MAX=5,er.RECONNECT_SLEEP_TIME=1e3,er.CONTROL_HIDE_TIME=3e3,er.DBCLICK_TIME=300,er.DBCLICK_FULLSCREEN=!0,er.MOBILE_DBCLICK_PLAY=!0,er.MOBILE_CLICK_PLAY=!1,er.AUTO_ORIENTATION_TIME=200,er.INFO_LOOP_TIME=1e3,er.FAST_FORWARD_VALUE=3,er.FAST_FORWARD_TIME=1e3,er.TOUCH_MOVE_RATIO=.5,er.VOLUME_STEP=.1,er.SEEK_STEP=5,er.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],er.ASPECT_RATIO=["default","4:3","16:9"],er.FLIP=["normal","horizontal","vertical"],er.FULLSCREEN_WEB_IN_BODY=!1,er.LOG_VERSION=!0,er.USE_RAF=!1,m.isBrowser&&(window.Artplayer=er,m.setStyleText("artplayer-style",u.default),setTimeout(function(){er.LOG_VERSION&&console.log("%c ArtPlayer %c ".concat(er.version," %c https://artplayer.org"),"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_create_super":"86fte","bundle-text:./style/index.less":"3eiHP","option-validator":"8OeHO","./utils/emitter":"2V7i9","./utils":"7MU7R","./scheme":"39ygm","./config":"emMME","./template":"gqSBs","./i18n":"7iXtC","./player":"j7piB","./control":"7z0K5","./contextmenu":"5RLZo","./info":"6JYu5","./subtitle":"WYfF6","./events":"47RGg","./hotkey":"gszG1","./layer":"dImgv","./loading":"6vtvO","./notice":"3Z2RQ","./mask":"hUoLo","./icons":"4Bz82","./setting":"hGnnd","./storage":"8dSC3","./plugins":"gv8Rm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9iJMm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){for(var r=0;r1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector(e)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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 u(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function p(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function d(e,t){for(var r in t)f(e,r,t[r]);return e}function h(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(n):n}function m(e){return Array.from(e.parentElement.children).filter(function(t){return t!==e})}function v(e,t){m(e).forEach(function(e){return l(e,t)}),s(e,t)}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top";o.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,"hint--".concat(r)))}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,a=r.top-t<=n&&r.top+r.height+t>=0,i=r.left-t<=o+t&&r.left+r.width+t>=0;return a&&i}function _(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function b(e,t){return t.parentNode.replaceChild(e,t),e}function w(e){return document.createElement(e)}function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=w("i");return s(r,"art-icon"),s(r,"art-icon-".concat(e)),u(r,t),r}function j(e,t){var r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function k(){var e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function M(e){return e.getBoundingClientRect()}function I(e,t){return new Promise(function(r,n){var o=new Image;o.onload=function(){if(t&&1!==t){var a=document.createElement("canvas"),i=a.getContext("2d");a.width=o.width*t,a.height=o.height*t,i.drawImage(o,0,0,a.width,a.height),a.toBlob(function(t){var o=URL.createObjectURL(t),a=new Image;a.onload=function(){r(a)},a.onerror=function(){URL.revokeObjectURL(o),n(Error("Image load failed: ".concat(e)))},a.src=o})}else r(o)},o.onerror=function(){n(Error("Image load failed: ".concat(e)))},o.src=e})}},{"./compatibility":"f9Vc8","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],f9Vc8:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"userAgent",function(){return o}),n.export(r,"isSafari",function(){return a}),n.export(r,"isWechat",function(){return i}),n.export(r,"isIE",function(){return s}),n.export(r,"isAndroid",function(){return l}),n.export(r,"isIOS",function(){return c}),n.export(r,"isIOS13",function(){return u}),n.export(r,"isMobile",function(){return p}),n.export(r,"isBrowser",function(){return f});var o="undefined"!=typeof navigator?navigator.userAgent:"",a=/^((?!chrome|android).)*safari/i.test(o),i=/MicroMessenger/i.test(o),s=/MSIE|Trident/i.test(o),l=/android/i.test(o),c=/iPad|iPhone|iPod/i.test(o)&&!window.MSStream,u=c||o.includes("Macintosh")&&navigator.maxTouchPoints>=1,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)||u,f="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6WanZ":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ArtPlayerError",function(){return c}),n.export(r,"errorHandle",function(){return u});var o=e("@swc/helpers/_/_assert_this_initialized"),a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_wrap_native_super"),l=e("@swc/helpers/_/_create_super"),c=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,l._)(r);function r(e,n){var i;return(0,a._)(this,r),i=t.call(this,e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace((0,o._)(i),n||i.constructor),i.name="ArtPlayerError",i}return r}((0,s._)(Error));function u(e,t){if(!e)throw new c(t);return e}},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_wrap_native_super":"hNYY1","@swc/helpers/_/_create_super":"86fte","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hNYY1:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return l});var o=e("./_construct.js"),a=e("./_get_prototype_of.js"),i=e("./_is_native_function.js"),s=e("./_set_prototype_of.js");function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||!(0,i._)(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,o._)(e,arguments,(0,a._)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,s._)(r,e)})(e)}},{"./_construct.js":"ljlHN","./_get_prototype_of.js":"dAKgy","./_is_native_function.js":"fIKaN","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ljlHN:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return i});var o=e("./_is_native_reflect_construct.js"),a=e("./_set_prototype_of.js");function i(e,t,r){return(i=(0,o._)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,a._)(o,r.prototype),o}).apply(null,arguments)}},{"./_is_native_reflect_construct.js":"7fioR","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fIKaN:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return -1!==Function.toString.call(e).indexOf("[native code]")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cZfjQ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,function(e,t,r){var n=r.slice(0,3);return 1===r.length&&(n=r+"00"),2===r.length&&(n=r+"0"),"".concat(t,",").concat(n)}).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"))}function a(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function i(e){var t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/[:.]/).map(function(e,t,r){if(t===r.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?".".concat(e):":".concat(e)}).join("")}return"WEBVTT\n\n"+e.split(/\r?\n/).map(function(e){var n=e.match(t);return n?{start:r(n[1].trim()),end:r(n[2].trim()),text:n[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(function(e){return e.trim()}).join("\n")}:null}).filter(function(e){return e}).map(function(e,t){return e?t+1+"\n"+"".concat(e.start," --> ").concat(e.end)+"\n"+"".concat(e.text):""}).filter(function(e){return e.trim()}).join("\n\n")}n.defineInteropFlag(r),n.export(r,"srtToVtt",function(){return o}),n.export(r,"vttToBlob",function(){return a}),n.export(r,"assToVtt",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l2mTb:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}n.defineInteropFlag(r),n.export(r,"getExt",function(){return function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}}),n.export(r,"download",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5EnnX":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"def",function(){return a}),n.export(r,"has",function(){return s}),n.export(r,"get",function(){return l}),n.export(r,"mergeDeep",function(){return function e(){for(var t=arguments.length,r=Array(t),n=0;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(function(t){return setTimeout(t,e)})}function a(e,t){var r;return function(){for(var n=this,o=arguments.length,a=Array(o),i=0;i0?[t,r,n]:[r,n]).map(function(e){return e<10?"0".concat(e):String(e)}).join(":")}function s(e){return e.replace(/[&<>'"]/g,function(e){return({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e})}function l(e){var t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp("(".concat(Object.keys(t).join("|"),")"),"g");return e.replace(r,function(e){return t[e]||e})}n.defineInteropFlag(r),n.export(r,"clamp",function(){return o}),n.export(r,"capitalize",function(){return a}),n.export(r,"secondToTime",function(){return i}),n.export(r,"escape",function(){return s}),n.export(r,"unescape",function(){return l})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"39ygm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ComponentOption",function(){return h});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils"),s="array",l="boolean",c="string",u="number",p="object",f="function";function d(e,t,r){return(0,i.errorHandle)(t===c||t===u||e instanceof Element,"".concat(r.join(".")," require '").concat(c,"' or 'Element' type"))}var h={html:d,disable:"?".concat(l),name:"?".concat(c),index:"?".concat(u),style:"?".concat(p),click:"?".concat(f),mounted:"?".concat(f),tooltip:"?".concat(c,"|").concat(u),width:"?".concat(u),selector:"?".concat(s),onSelect:"?".concat(f),switch:"?".concat(l),onSwitch:"?".concat(f),range:"?".concat(s),onRange:"?".concat(f),onChange:"?".concat(f)};r.default={id:c,container:d,url:c,poster:c,type:c,theme:c,lang:c,volume:u,isLive:l,muted:l,autoplay:l,autoSize:l,autoMini:l,loop:l,flip:l,playbackRate:l,aspectRatio:l,screenshot:l,setting:l,hotkey:l,pip:l,mutex:l,backdrop:l,fullscreen:l,fullscreenWeb:l,subtitleOffset:l,miniProgressBar:l,useSSR:l,playsInline:l,lock:l,gesture:l,fastForward:l,autoPlayback:l,autoOrientation:l,airplay:l,proxy:"?".concat(f),plugins:[f],layers:[h],contextmenu:[h],settings:[h],controls:[(0,a._)((0,o._)({},h),{position:function(e,t,r){var n=["top","left","right"];return(0,i.errorHandle)(n.includes(e),"".concat(r.join(".")," only accept ").concat(n.toString()," as parameters"))}})],quality:[{default:"?".concat(l),html:c,url:c}],highlight:[{time:u,text:c}],thumbnails:{url:c,number:u,column:u,width:u,height:u,scale:u},subtitle:{url:c,name:c,type:c,style:p,escape:l,encoding:c,onVttLoad:f},moreVideoAttr:p,i18n:p,icons:p,cssVar:p,customType:p}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return a});var o=e("./_define_property.js");function a(e){for(var t=1;t\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
5.2.3
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\nx\n
\n
\n
\n
[x]
\n
\n
\n\n '}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","./utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7iXtC":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("../utils"),s=e("./zh-cn"),l=n.interopDefault(s),c=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.art=t,this.languages={"zh-cn":l.default},this.language={},this.update(t.option.i18n)}return(0,a._)(e,[{key:"init",value:function(){var e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}},{key:"get",value:function(e){return this.language[e]||e}},{key:"update",value:function(e){this.languages=(0,i.mergeDeep)(this.languages,e),this.init()}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","../utils":"7MU7R","./zh-cn":"5mkZy","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5mkZy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","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":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=n,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],j7piB:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return ew});var o=e("@swc/helpers/_/_class_call_check"),a=e("./urlMix"),i=n.interopDefault(a),s=e("./attrMix"),l=n.interopDefault(s),c=e("./playMix"),u=n.interopDefault(c),p=e("./pauseMix"),f=n.interopDefault(p),d=e("./toggleMix"),h=n.interopDefault(d),m=e("./seekMix"),v=n.interopDefault(m),g=e("./volumeMix"),y=n.interopDefault(g),_=e("./currentTimeMix"),b=n.interopDefault(_),w=e("./durationMix"),x=n.interopDefault(w),j=e("./switchMix"),k=n.interopDefault(j),M=e("./playbackRateMix"),I=n.interopDefault(M),S=e("./aspectRatioMix"),D=n.interopDefault(S),T=e("./screenshotMix"),E=n.interopDefault(T),F=e("./fullscreenMix"),R=n.interopDefault(F),O=e("./fullscreenWebMix"),C=n.interopDefault(O),W=e("./pipMix"),A=n.interopDefault(W),P=e("./loadedMix"),$=n.interopDefault(P),z=e("./playedMix"),L=n.interopDefault(z),H=e("./playingMix"),N=n.interopDefault(H),U=e("./autoSizeMix"),V=n.interopDefault(U),B=e("./rectMix"),q=n.interopDefault(B),Y=e("./flipMix"),J=n.interopDefault(Y),K=e("./miniMix"),X=n.interopDefault(K),G=e("./posterMix"),Z=n.interopDefault(G),Q=e("./autoHeightMix"),ee=n.interopDefault(Q),et=e("./cssVarMix"),er=n.interopDefault(et),en=e("./themeMix"),eo=n.interopDefault(en),ea=e("./typeMix"),ei=n.interopDefault(ea),es=e("./stateMix"),el=n.interopDefault(es),ec=e("./subtitleOffsetMix"),eu=n.interopDefault(ec),ep=e("./airplayMix"),ef=n.interopDefault(ep),ed=e("./qualityMix"),eh=n.interopDefault(ed),em=e("./thumbnailsMix"),ev=n.interopDefault(em),eg=e("./optionInit"),ey=n.interopDefault(eg),e_=e("./eventInit"),eb=n.interopDefault(e_),ew=function e(t){(0,o._)(this,e),(0,i.default)(t),(0,l.default)(t),(0,u.default)(t),(0,f.default)(t),(0,h.default)(t),(0,v.default)(t),(0,y.default)(t),(0,b.default)(t),(0,x.default)(t),(0,k.default)(t),(0,I.default)(t),(0,D.default)(t),(0,E.default)(t),(0,R.default)(t),(0,C.default)(t),(0,A.default)(t),(0,$.default)(t),(0,L.default)(t),(0,N.default)(t),(0,V.default)(t),(0,q.default)(t),(0,J.default)(t),(0,X.default)(t),(0,Z.default)(t),(0,ee.default)(t),(0,er.default)(t),(0,eo.default)(t),(0,ei.default)(t),(0,el.default)(t),(0,eu.default)(t),(0,ef.default)(t),(0,eh.default)(t),(0,ev.default)(t),(0,eb.default)(t),(0,ey.default)(t)}},{"@swc/helpers/_/_class_call_check":"9iJMm","./urlMix":"bnOAX","./attrMix":"YLwHz","./playMix":"ktu66","./pauseMix":"6JstV","./toggleMix":"cotiM","./seekMix":"8DVLx","./volumeMix":"9fjEr","./currentTimeMix":"fniLa","./durationMix":"2WMs4","./switchMix":"5XnRj","./playbackRateMix":"atzXU","./aspectRatioMix":"e67kx","./screenshotMix":"7FJKj","./fullscreenMix":"1hnoY","./fullscreenWebMix":"aLUYJ","./pipMix":"jJ7PZ","./loadedMix":"3RcYf","./playedMix":"hpdzI","./playingMix":"dQpMB","./autoSizeMix":"i3W5n","./rectMix":"eA2QA","./flipMix":"8B7eY","./miniMix":"f1BFf","./posterMix":"3Bs5U","./autoHeightMix":"gRfBQ","./cssVarMix":"6gWkU","./themeMix":"6YX9w","./typeMix":"cBZG8","./stateMix":"bpFKI","./subtitleOffsetMix":"hyhz8","./airplayMix":"5fLM6","./qualityMix":"jj5tM","./thumbnailsMix":"g4G3o","./optionInit":"PZTTa","./eventInit":"cKj2D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bnOAX:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.option,r=e.template.$video;(0,i.def)(e,"url",{get:function(){return r.src},set:function(n){return(0,o._)(function(){var o,s,l;return(0,a._)(this,function(a){switch(a.label){case 0:if(!n)return[3,4];if(o=e.url,s=t.type||(0,i.getExt)(n),l=t.customType[s],!(s&&l))return[3,2];return[4,(0,i.sleep)()];case 1:return a.sent(),e.loading.show=!0,l.call(e,r,n,e),[3,3];case 2:URL.revokeObjectURL(o),r.src=n,a.label=3;case 3:return o!==e.url&&(e.option.url=n,e.isReady&&o&&e.once("video:canplay",function(){e.emit("restart",n)})),[3,6];case 4:return[4,(0,i.sleep)()];case 5:a.sent(),e.loading.show=!0,a.label=6;case 6:return[2]}})})()}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){r(e);return}s.done?t(l):Promise.resolve(l).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,l,"next",e)}function l(e){o(i,n,a,s,l,"throw",e)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator});var o=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return i}),n.export(r,"__assign",function(){return s}),n.export(r,"__rest",function(){return l}),n.export(r,"__decorate",function(){return c}),n.export(r,"__param",function(){return u}),n.export(r,"__esDecorate",function(){return p}),n.export(r,"__runInitializers",function(){return f}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return h}),n.export(r,"__metadata",function(){return m}),n.export(r,"__awaiter",function(){return v}),n.export(r,"__generator",function(){return g}),n.export(r,"__createBinding",function(){return y}),n.export(r,"__exportStar",function(){return _}),n.export(r,"__values",function(){return b}),n.export(r,"__read",function(){return w}),n.export(r,"__spread",function(){return x}),n.export(r,"__spreadArrays",function(){return j}),n.export(r,"__spreadArray",function(){return k}),n.export(r,"__await",function(){return M}),n.export(r,"__asyncGenerator",function(){return I}),n.export(r,"__asyncDelegator",function(){return S}),n.export(r,"__asyncValues",function(){return D}),n.export(r,"__makeTemplateObject",function(){return T}),n.export(r,"__importStar",function(){return F}),n.export(r,"__importDefault",function(){return R}),n.export(r,"__classPrivateFieldGet",function(){return O}),n.export(r,"__classPrivateFieldSet",function(){return C}),n.export(r,"__classPrivateFieldIn",function(){return W}),n.export(r,"__addDisposableResource",function(){return A}),n.export(r,"__disposeResources",function(){return $}),n.export(r,"__rewriteRelativeImportExtension",function(){return z});var o=e("@swc/helpers/_/_type_of"),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function c(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function u(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var v=(0,r[d])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(s=i(v.get))&&(p.get=s),(s=i(v.set))&&(p.set=s),(s=i(v.init))&&o.unshift(s)}else(s=i(v))&&("field"===l?o.unshift(s):p[c]=s)}u&&Object.defineProperty(u,n.name,p),f=!0}function f(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function x(){for(var e=[],t=0;t1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=o[e](t)).value instanceof M?Promise.resolve(r.value.v).then(l,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:M(e[n](t)),done:!1}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var E=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&y(t,e,r);return E(t,e),t}function R(e){return e&&e.__esModule?e:{default:e}}function O(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function C(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function W(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function A(e,t,r){if(null!=t){var n,o;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var P="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function $(e){function t(t){e.error=e.hasError?new P(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(e){return t(e),o()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function z(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,o,a){return r?t?".jsx":".js":!n||o&&a?n+o+"."+a.toLowerCase()+"js":e}):e}r.default={__extends:i,__assign:s,__rest:l,__decorate:c,__param:u,__esDecorate:p,__runInitializers:f,__propKey:d,__setFunctionName:h,__metadata:m,__awaiter:v,__generator:g,__createBinding:y,__exportStar:_,__values:b,__read:w,__spread:x,__spreadArrays:j,__spreadArray:k,__await:M,__asyncGenerator:I,__asyncDelegator:S,__asyncValues:D,__makeTemplateObject:T,__importStar:F,__importDefault:R,__classPrivateFieldGet:O,__classPrivateFieldSet:C,__classPrivateFieldIn:W,__addDisposableResource:A,__disposeResources:$,__rewriteRelativeImportExtension:z}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],YLwHz:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"attr",{value:function(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ktu66:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.i18n,r=e.notice,n=e.option,s=e.constructor.instances,l=e.template.$video;(0,i.def)(e,"play",{value:/*#__PURE__*/(0,o._)(function(){var o,i,c;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,l.play()];case 1:if(o=a.sent(),r.show=t.get("Play"),e.emit("play"),n.mutex)for(i=0;iu?((0,o.setStyle)(a,"width","".concat(u*c,"px")),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","".concat(l/u,"px")),(0,o.setStyle)(a,"margin","auto 0")),i.dataset.aspectRatio=n}r.show="".concat(t.get("Aspect Ratio"),": ").concat("default"===n?t.get("Default"):n),e.emit("aspectRatio",n)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7FJKj":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t,r=e.notice,n=e.template.$video,s=(0,i.createElement)("canvas");(0,i.def)(e,"getDataURL",{value:function(){return new Promise(function(e,t){try{s.width=n.videoWidth,s.height=n.videoHeight,s.getContext("2d").drawImage(n,0,0),e(s.toDataURL("image/png"))}catch(e){r.show=e,t(e)}})}}),(0,i.def)(e,"getBlobUrl",{value:function(){return new Promise(function(e,t){try{s.width=n.videoWidth,s.height=n.videoHeight,s.getContext("2d").drawImage(n,0,0),s.toBlob(function(t){e(URL.createObjectURL(t))})}catch(e){r.show=e,t(e)}})}}),(0,i.def)(e,"screenshot",{value:(t=(0,o._)(function(t){var r,o;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,e.getDataURL()];case 1:return r=a.sent(),o=t||"artplayer_".concat((0,i.secondToTime)(n.currentTime)),(0,i.download)(r,"".concat(o,".png")),e.emit("screenshot",r),[2,r]}})}),function(e){return t.apply(this,arguments)})})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1hnoY":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../libs/screenfull"),s=n.interopDefault(i),l=e("../utils");function c(e){var t=e.i18n,r=e.notice,n=e.template,i=n.$video,c=n.$player,u=function(e){(0,s.default).on("change",function(){e.emit("fullscreen",s.default.isFullscreen),s.default.isFullscreen?(e.state="fullscreen",(0,l.addClass)(c,"art-fullscreen")):(0,l.removeClass)(c,"art-fullscreen"),e.emit("resize")}),(0,s.default).on("error",function(t){e.emit("fullscreenError",t)}),(0,l.def)(e,"fullscreen",{get:function(){return s.default.isFullscreen},set:function(e){return(0,o._)(function(){return(0,a._)(this,function(t){switch(t.label){case 0:if(!e)return[3,2];return[4,(0,s.default).request(c)];case 1:return t.sent(),[3,4];case 2:return[4,(0,s.default).exit()];case 3:t.sent(),t.label=4;case 4:return[2]}})})()}})},p=function(e){e.proxy(document,"webkitfullscreenchange",function(){e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,l.def)(e,"fullscreen",{get:function(){return document.fullscreenElement===i},set:function(t){t?(e.state="fullscreen",i.webkitEnterFullscreen()):i.webkitExitFullscreen()}})};e.once("video:loadedmetadata",function(){s.default.isEnabled?u(e):i.webkitSupportsFullscreen?p(e):(0,l.def)(e,"fullscreen",{get:function(){return!1},set:function(){r.show=t.get("Fullscreen Not Supported")}}),(0,l.def)(e,"fullscreen",(0,l.get)(e,"fullscreen"))})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../libs/screenfull":"cM8lD","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cM8lD:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("@swc/helpers/_/_sliced_to_array"),o=[["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"]],a=function(){if("undefined"==typeof document)return!1;var e=o[0],t={},r=!0,a=!1,i=void 0;try{for(var s,l=o[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c[1]in document){var u=!0,p=!1,f=void 0;try{for(var d,h=c.entries()[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var m=(0,n._)(d.value,2),v=m[0],g=m[1];t[e[v]]=g}}catch(e){p=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw f}}return t}}}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}return!1}(),i={change:a.fullscreenchange,error:a.fullscreenerror},s={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise(function(r,n){var o=function(){s.off("change",o),r()};s.on("change",o);var i=e[a.requestFullscreen](t);i instanceof Promise&&i.then(o).catch(n)})},exit:function(){return new Promise(function(e,t){if(!s.isFullscreen){e();return}var r=function(){s.off("change",r),e()};s.on("change",r);var n=document[a.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)})},toggle:function(e,t){return s.isFullscreen?s.exit():s.request(e,t)},onchange:function(e){s.on("change",e)},onerror:function(e){s.on("error",e)},on:function(e,t){var r=i[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=i[e];r&&document.removeEventListener(r,t,!1)},raw:a};Object.defineProperties(s,{isFullscreen:{get:function(){return!!document[a.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[a.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!document[a.fullscreenEnabled]}}}),a||(s={isEnabled:!1}),r.default=s},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return l});var o=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),i=e("./_non_iterable_rest.js"),s=e("./_unsupported_iterable_to_array.js");function l(e,t){return(0,o._)(e)||(0,a._)(e,t)||(0,s._)(e,t)||(0,i._)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(Array.isArray(e))return e}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],loYCM:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw n}}return a}}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],aLUYJ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.constructor,r=e.template,n=r.$container,a=r.$player,i="";(0,o.def)(e,"fullscreenWeb",{get:function(){return(0,o.hasClass)(a,"art-fullscreen-web")},set:function(r){r?(i=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),e.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(n,a),i&&(a.style.cssText=i,i=""),(0,o.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jJ7PZ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t,r,n,a,i=e.i18n,s=e.notice,l=e.template.$video;document.pictureInPictureEnabled?(t=e.template.$video,r=e.proxy,n=e.notice,t.disablePictureInPicture=!1,(0,o.def)(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(r){r?(e.state="pip",t.requestPictureInPicture().catch(function(e){throw n.show=e,e})):document.exitPictureInPicture().catch(function(e){throw n.show=e,e})}}),r(t,"enterpictureinpicture",function(){e.emit("pip",!0)}),r(t,"leavepictureinpicture",function(){e.emit("pip",!1)})):l.webkitSupportsPresentationMode?((a=e.template.$video).webkitSetPresentationMode("inline"),(0,o.def)(e,"pip",{get:function(){return"picture-in-picture"===a.webkitPresentationMode},set:function(t){t?(e.state="pip",a.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(a.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})):(0,o.def)(e,"pip",{get:function(){return!1},set:function(){s.show=i.get("PIP Not Supported")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3RcYf":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"loaded",{get:function(){return e.loadedTime/t.duration}}),(0,o.def)(e,"loadedTime",{get:function(){return t.buffered.length?t.buffered.end(t.buffered.length-1):0}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hpdzI:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){(0,o.def)(e,"played",{get:function(){return e.currentTime/e.duration}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dQpMB:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"playing",{get:function(){return"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],i3W5n:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template,r=t.$container,n=t.$player,a=t.$video;(0,o.def)(e,"autoSize",{value:function(){var t=a.videoWidth,i=a.videoHeight,s=(0,o.getRect)(r),l=s.width,c=s.height,u=t/i;l/c>u?((0,o.setStyle)(n,"width","".concat(c*u/l*100,"%")),(0,o.setStyle)(n,"height","100%")):((0,o.setStyle)(n,"width","100%"),(0,o.setStyle)(n,"height","".concat(l/u/c*100,"%"))),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eA2QA:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){(0,o.def)(e,"rect",{get:function(){return(0,o.getRect)(e.template.$player)}});for(var t=["bottom","height","left","right","top","width"],r=0;r');(0,o.append)(d,t.close),r(d,"click",p);var h=(0,o.append)(i,'
'),m=(0,o.append)(h,t.play),v=(0,o.append)(h,t.pause);return r(m,"click",function(){return e.play()}),r(v,"click",function(){return e.pause()}),f(m,v),e.on("video:playing",function(){return f(m,v)}),e.on("video:pause",function(){return f(m,v)}),e.on("video:timeupdate",function(){return f(m,v)}),r(i,"mousedown",function(e){l=0===e.button,c=e.pageX,u=e.pageY}),e.on("document:mousemove",function(e){if(l){(0,o.addClass)(i,"art-mini-droging");var t=e.pageX-c,r=e.pageY-u;(0,o.setStyle)(i,"transform","translate(".concat(t,"px, ").concat(r,"px)"))}}),e.on("document:mouseup",function(){if(l){l=!1,(0,o.removeClass)(i,"art-mini-droging");var e=(0,o.getRect)(i);n.set("left",e.left),n.set("top",e.top),(0,o.setStyle)(i,"left","".concat(e.left,"px")),(0,o.setStyle)(i,"top","".concat(e.top,"px")),(0,o.setStyle)(i,"transform",null)}}),i}(),m=n.get("top"),v=n.get("left");m&&v?((0,o.setStyle)(h,"top","".concat(m,"px")),(0,o.setStyle)(h,"left","".concat(v,"px")),(0,o.isInViewport)(h)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3Bs5U":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$poster;(0,o.def)(e,"poster",{get:function(){try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set:function(e){(0,o.setStyle)(t,"backgroundImage","url(".concat(e,")"))}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gRfBQ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template,r=t.$container,n=t.$video;(0,o.def)(e,"autoHeight",{value:function(){var t=r.clientWidth,a=n.videoHeight,i=t/n.videoWidth*a;(0,o.setStyle)(r,"height",i+"px"),e.emit("autoHeight",i)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6gWkU":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.template.$player;(0,o.def)(e,"cssVar",{value:function(e,r){return r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6YX9w":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){(0,o.def)(e,"theme",{get:function(){return e.cssVar("--art-theme")},set:function(t){e.cssVar("--art-theme",t)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cBZG8:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){(0,o.def)(e,"type",{get:function(){return e.option.type},set:function(t){e.option.type=t}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bpFKI:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=["mini","pip","fullscreen","fullscreenWeb"];(0,o.def)(e,"state",{get:function(){return t.find(function(t){return e[t]})||"standard"},set:function(r){for(var n=0;n0&&bl.clientWidth-m/2?(0,i.setStyle)(o,"left","".concat(l.clientWidth-m,"px")):(0,i.setStyle)(o,"left","".concat(t-m/2,"px"))}}(b):i.isMobile||(0,i.setStyle)(m,"display","none"),_&&(clearTimeout(u),u=setTimeout(function(){(0,i.setStyle)(m,"display","none")},500)),a.label=3;case 3:return[2]}})}),function(e,r,n){return t.apply(this,arguments)})),(0,i.def)(e,"thumbnails",{get:function(){return e.option.thumbnails},set:function(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(u),u=null,p=null,f=!1,d=!1)}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],PZTTa:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.option,r=e.storage,n=e.template,a=n.$video,i=n.$poster;for(var s in t.moreVideoAttr)e.attr(s,t.moreVideoAttr[s]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,o.clamp)(t.volume,0,1));var l=r.get("volume");for(var c in"number"==typeof l&&(a.volume=(0,o.clamp)(l,0,1)),t.poster&&(0,o.setStyle)(i,"backgroundImage","url(".concat(t.poster,")")),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(c,t.cssVar[c]);e.url=t.url}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cKj2D:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../config"),s=n.interopDefault(i),l=e("../utils");function c(e){for(var t,r=e.i18n,n=e.notice,i=e.option,c=e.constructor,u=e.proxy,p=e.template,f=p.$player,d=p.$video,h=p.$poster,m=0,v=0;v=o.CONTROL_HIDE_TIME&&(n.show=!1)}),e.on("control",function(e){e?((0,C.removeClass)(s,"art-hide-cursor"),(0,C.addClass)(s,"art-hover"),n.timer=Date.now()):((0,C.addClass)(s,"art-hide-cursor"),(0,C.removeClass)(s,"art-hover"))}),n.init(),n}return(0,i._)(r,[{key:"init",value:function(){var e=this,t=this.art.option;t.isLive||this.add((0,j.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,w.default)({name:"playAndPause",position:"left",index:10})),this.add((0,S.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,M.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,C.sleep)().then(function(){e.art.quality=t.quality}),t.screenshot&&!C.isMobile&&this.add((0,F.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,T.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,_.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,O.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,g.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,m.default)({name:"fullscreen",position:"right",index:70}));for(var r=0;r=Number(a.dataset.index)});p?p.insertAdjacentElement("beforebegin",a):(0,i.append)(this.$parent,a),r.html&&(0,i.append)(a,r.html),r.style&&(0,i.setStyles)(a,r.style),r.tooltip&&(0,i.tooltip)(a,r.tooltip);var f=[];if(r.click){var d=this.art.events.proxy(a,"click",function(e){e.preventDefault(),r.click.call(t.art,t,e)});f.push(d)}return r.selector&&["left","right"].includes(r.position)&&this.selector(r,a,f),this[n]=a,this.cache.set(n,{$ref:a,events:f,option:r}),r.mounted&&r.mounted.call(this.art,a),a}}},{key:"remove",value:function(e){var t=this.cache.get(e);(0,s.errorHandle)(t,"Can't find [".concat(e,"] from the [").concat(this.name,"]")),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(var r=0;r\n
\n
\n
\n
\n
\n
\n\n ',mounted:function(e){var o=null,a=!1,u=(0,i.query)(".art-progress-hover",e),p=(0,i.query)(".art-progress-loaded",e),f=(0,i.query)(".art-progress-played",e),d=(0,i.query)(".art-progress-highlight",e),h=(0,i.query)(".art-progress-indicator",e),m=(0,i.query)(".art-progress-tip",e);function v(r,n){var o=n||s(t,r),a=o.width,l=o.time;m.innerText=l;var c=m.clientWidth;a<=c/2?(0,i.setStyle)(m,"left",0):a>e.clientWidth-c/2?(0,i.setStyle)(m,"left","".concat(e.clientWidth-c,"px")):(0,i.setStyle)(m,"left","".concat(a-c/2,"px"))}r.indicator?(0,i.append)(h,r.indicator):(0,i.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,n,a){var s="played"===r&&a&&i.isMobile;"loaded"===r&&(0,i.setStyle)(p,"width","".concat(100*n,"%")),"hover"===r&&(0,i.setStyle)(u,"width","".concat(100*n,"%")),"played"===r&&((0,i.setStyle)(f,"width","".concat(100*n,"%")),(0,i.setStyle)(h,"left","".concat(100*n,"%"))),s&&((0,i.setStyle)(m,"display","flex"),v(a,{width:e.clientWidth*n,time:(0,i.secondToTime)(n*t.duration)}),clearTimeout(o),o=setTimeout(function(){(0,i.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){d.innerText="";for(var e=0;e');(0,i.append)(d,a)}}),t.on("video:progress",function(){t.emit("setBar","loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",function(){t.emit("setBar","played",t.played)}):t.on("video:timeupdate",function(){t.emit("setBar","played",t.played)}),t.on("video:ended",function(){t.emit("setBar","played",1)}),t.emit("setBar","loaded",t.loaded||0),i.isMobile||(c(e,"click",function(e){e.target!==h&&l(t,e)}),c(e,"mousemove",function(r){var n,o,a,l=s(t,r).percentage;(t.emit("setBar","hover",l,r),(0,i.setStyle)(m,"display","flex"),(0,i.includeFromEvent)(r,d))?(n=s(t,r).width,o=r.target.dataset.text,m.innerText=o,n<=(a=m.clientWidth)/2?(0,i.setStyle)(m,"left",0):n>e.clientWidth-a/2?(0,i.setStyle)(m,"left","".concat(e.clientWidth-a,"px")):(0,i.setStyle)(m,"left","".concat(n-a/2,"px"))):v(r)}),c(e,"mouseleave",function(e){(0,i.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),c(e,"mousedown",function(e){a=0===e.button}),t.on("document:mousemove",function(e){if(a){var r=s(t,e),n=r.second,o=r.percentage;t.emit("setBar","played",o,e),t.seek=n}}),t.on("document:mouseup",function(){a&&(a=!1)}))}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l3dNa:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{style:i.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:function(e){function r(){var r="".concat((0,i.secondToTime)(t.currentTime)," / ").concat((0,i.secondToTime)(t.duration));r!==e.innerText&&(e.innerText=r)}r();for(var n=["video:loadedmetadata","video:timeupdate","video:progress"],o=0;o'),l=(0,i.append)(s,'
'),c=(0,i.append)(l,'
'),u=(0,i.append)(l,'
'),p=(0,i.append)(u,'
'),f=(0,i.append)(p,'
'),d=(0,i.append)(u,'
');function h(e){var t=(0,i.getRect)(u),r=t.top,n=t.height;return 1-(e.clientY-r)/n}function m(){if(t.muted||0===t.volume)(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(a,"display","flex"),(0,i.setStyle)(d,"top","100%"),(0,i.setStyle)(f,"top","100%"),c.innerText=0;else{var e=100*t.volume;(0,i.setStyle)(o,"display","flex"),(0,i.setStyle)(a,"display","none"),(0,i.setStyle)(d,"top","".concat(100-e,"%")),(0,i.setStyle)(f,"top","".concat(100-e,"%")),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(o,"click",function(){t.muted=!0}),r(a,"click",function(){t.muted=!1}),i.isMobile)(0,i.setStyle)(s,"display","none");else{var v=!1;r(u,"mousedown",function(e){v=0===e.button,t.volume=h(e)}),t.on("document:mousemove",function(e){v&&(t.muted=!1,t.volume=h(e))}),t.on("document:mouseup",function(){v&&(v=!1)})}}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2XGYu":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("Show Setting"),mounted:function(e){var r=t.proxy,n=t.icons,o=t.i18n;(0,i.append)(e,n.setting),r(e,"click",function(){t.setting.toggle(),t.setting.resize()}),t.on("setting",function(t){(0,i.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],idjoR:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("Screenshot"),mounted:function(e){var r=t.proxy,n=t.icons;(0,i.append)(e,n.screenshot),r(e,"click",function(){t.screenshot()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],huCXW:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("AirPlay"),mounted:function(e){var r=t.proxy,n=t.icons;(0,i.append)(e,n.airplay),r(e,"click",function(){return t.airplay()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5RLZo":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return j});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_create_super"),l=e("../utils"),c=e("../utils/component"),u=n.interopDefault(c),p=e("./playbackRate"),f=n.interopDefault(p),d=e("./aspectRatio"),h=n.interopDefault(d),m=e("./flip"),v=n.interopDefault(m),g=e("./info"),y=n.interopDefault(g),_=e("./version"),b=n.interopDefault(_),w=e("./close"),x=n.interopDefault(w),j=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,s._)(r);function r(e){var n;return(0,o._)(this,r),(n=t.call(this,e)).name="contextmenu",n.$parent=e.template.$contextmenu,l.isMobile||n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.option,n=t.proxy,o=t.template,a=o.$player,i=o.$contextmenu;r.playbackRate&&this.add((0,f.default)({name:"playbackRate",index:10})),r.aspectRatio&&this.add((0,h.default)({name:"aspectRatio",index:20})),r.flip&&this.add((0,v.default)({name:"flip",index:30})),this.add((0,y.default)({name:"info",index:40})),this.add((0,b.default)({name:"version",index:50})),this.add((0,x.default)({name:"close",index:60}));for(var s=0;su+c&&(m=c-h),n+d>p+s&&(v=s-d),(0,l.setStyles)(i,{top:"".concat(v,"px"),left:"".concat(m,"px")})}}),n(a,"click",function(t){(0,l.includeFromEvent)(t,i)||(e.show=!1)}),this.art.on("blur",function(){e.show=!1})}}]),r}(u.default)},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_create_super":"86fte","../utils":"7MU7R","../utils/component":"2dsXg","./playbackRate":"7w1iV","./aspectRatio":"cJDR0","./flip":"cpqHQ","./info":"FMfqg","./version":"a9IHg","./close":"9PxVB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7w1iV":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.PLAYBACK_RATE.map(function(e){return'').concat(1===e?r.get("Normal"):e.toFixed(1),"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Play Speed"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.playbackRate=Number(n),e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="1"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("video:ratechange",function(){var r=(0,i.queryAll)("span",e).find(function(e){return Number(e.dataset.value)===t.playbackRate});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cJDR0:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.ASPECT_RATIO.map(function(e){return'').concat("default"===e?r.get("Default"):e,"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Aspect Ratio"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.aspectRatio=n,e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="default"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("aspectRatio",function(t){var r=(0,i.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cpqHQ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.FLIP.map(function(e){return'').concat(r.get((0,i.capitalize)(e)),"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Video Flip"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.flip=n.toLowerCase(),e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="normal"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("flip",function(t){var r=(0,i.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],FMfqg:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return function(t){return(0,a._)((0,o._)({},e),{html:t.i18n.get("Video Info"),click:function(e){t.info.show=!0,e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],a9IHg:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return(0,a._)((0,o._)({},e),{html:'ArtPlayer 5.2.3'})}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9PxVB":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return function(t){return(0,a._)((0,o._)({},e),{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6JYu5":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_create_super"),l=e("./utils"),c=e("./utils/component"),u=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,s._)(r);function r(e){var n;return(0,o._)(this,r),(n=t.call(this,e)).name="info",l.isMobile||n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor,o=t.template,a=o.$infoPanel,i=o.$infoClose,s=o.$video;r(i,"click",function(){e.show=!1});var c=null,u=(0,l.queryAll)("[data-video]",a)||[];this.art.on("destroy",function(){return clearTimeout(c)}),function e(){for(var t=0;t\n ').concat(t.escape?(0,f.escape)(e):e,"\n")}).join("")}).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}},{key:"switch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,o._)(function(){var n,o,a,i,s,u;return(0,p._)(this,function(p){switch(p.label){case 0:return o=(n=r.art).i18n,a=n.notice,i=n.option,s=(0,c._)((0,l._)({},i.subtitle,t),{url:e}),[4,r.init(s)];case 1:return u=p.sent(),t.name&&(a.show="".concat(o.get("Switch Subtitle"),": ").concat(t.name)),[2,u]}})})()}},{key:"createTrack",value:function(e,t){var r=this,n=this.art,o=n.template,a=n.proxy,i=n.option,s=o.$video,l=o.$track,c=(0,f.createElement)("track");c.default=!0,c.kind=e,c.src=t,c.label=i.subtitle.name||"Artplayer",c.track.mode="hidden",c.onload=function(){r.art.emit("subtitleLoad",r.cues,r.option)},this.art.events.remove(this.destroyEvent),l.onload=null,(0,f.remove)(l),(0,f.append)(s,c),o.$track=c,this.destroyEvent=a(this.textTrack,"cuechange",function(){return r.update()})}},{key:"init",value:function(e){var t=this;return(0,o._)(function(){var r,n,o;return(0,p._)(this,function(a){return(n=(r=t.art).notice,o=r.template.$subtitle,t.textTrack)?((0,v.default)(e,y.default.subtitle),e.url)?(t.option=e,t.style(e.style),[2,fetch(e.url).then(function(e){return e.arrayBuffer()}).then(function(t){var r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,f.getExt)(e.url)){case"srt":var n=(0,f.srtToVtt)(r),o=e.onVttLoad(n);return(0,f.vttToBlob)(o);case"ass":var a=(0,f.assToVtt)(r),i=e.onVttLoad(a);return(0,f.vttToBlob)(i);case"vtt":var s=e.onVttLoad(r);return(0,f.vttToBlob)(s);default:return e.url}}).then(function(e){return o.innerHTML="",t.url===e||(URL.revokeObjectURL(t.url),t.createTrack("metadata",e)),e}).catch(function(e){throw o.innerHTML="",n.show=e,e})]):[2]:[2,null]})})()}}]),r}(h.default)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_create_super":"86fte","@swc/helpers/_/_ts_generator":"6Xyd0","./utils":"7MU7R","./utils/component":"2dsXg","option-validator":"8OeHO","./scheme":"39ygm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"47RGg":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return k});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("./clickInit"),s=n.interopDefault(i),l=e("./hoverInit"),c=n.interopDefault(l),u=e("./moveInit"),p=n.interopDefault(u),f=e("./resizeInit"),d=n.interopDefault(f),h=e("./gestureInit"),m=n.interopDefault(h),v=e("./viewInit"),g=n.interopDefault(v),y=e("./documentInit"),_=n.interopDefault(y),b=e("./updateInit"),w=n.interopDefault(b),x=e("./restoreInit"),j=n.interopDefault(x),k=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,s.default)(t,this),(0,c.default)(t,this),(0,p.default)(t,this),(0,d.default)(t,this),(0,m.default)(t,this),(0,g.default)(t,this),(0,_.default)(t,this),(0,w.default)(t,this),(0,j.default)(t,this)}return(0,a._)(e,[{key:"proxy",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Array.isArray(t))return t.map(function(t){return n.proxy(e,t,r,o)});e.addEventListener(t,r,o);var a=function(){return e.removeEventListener(t,r,o)};return this.destroyEvents.push(a),a}},{key:"hover",value:function(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}},{key:"remove",value:function(e){var t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}},{key:"destroy",value:function(){for(var e=0;eMath.abs(a)&&2>Math.abs(o))return i;var s=180*Math.atan2(o,a)/Math.PI;return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}(c,u,a,i),d=[3,4].includes(f),h=[1,2].includes(f);if(d&&!e.isRotate||h&&e.isRotate){var m=(0,o.clamp)((a-c)/e.width,-1,1),v=(0,o.clamp)((i-u)/e.height,-1,1),g=e.isRotate?v:m,y=s===n?e.constructor.TOUCH_MOVE_RATIO:1,_=(0,o.clamp)(p+e.duration*g*y,0,e.duration);e.seek=_,e.emit("setBar","played",(0,o.clamp)(_/e.duration,0,1),t),e.notice.show="".concat((0,o.secondToTime)(_)," / ").concat((0,o.secondToTime)(e.duration))}}};e.option.gesture&&(t.proxy(n,"touchstart",function(e){s=n,f(e)}),t.proxy(n,"touchmove",d)),t.proxy(i,"touchstart",function(e){s=i,f(e)}),t.proxy(i,"touchmove",d),t.proxy(document,"touchend",function(){l&&(c=0,u=0,p=0,l=!1,s=null)})}}},{"../utils":"7MU7R","../control/progress":"fVfii","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jT4ny:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e,t){var r=e.option,n=e.constructor,a=e.template.$container,i=(0,o.throttle)(function(){e.emit("view",(0,o.isInViewport)(a,n.SCROLL_GAP))},n.SCROLL_TIME);t.proxy(window,"scroll",function(){return i()}),e.on("view",function(t){r.autoMini&&(e.mini=!t)})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],qu07O:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){t.proxy(document,"mousemove",function(t){e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",function(t){e.emit("document:mouseup",t)})}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9LDSG":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(e.constructor.USE_RAF){var t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",function(){cancelAnimationFrame(t)})}}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1G60N":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gszG1:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("./utils"),s=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.art=t,this.keys={},t.option.hotkey&&!i.isMobile&&this.init()}return(0,a._)(e,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor;this.add("Escape",function(){e.art.fullscreenWeb&&(e.art.fullscreenWeb=!1)}),this.add("Space",function(){e.art.toggle()}),this.add("ArrowLeft",function(){e.art.backward=n.SEEK_STEP}),this.add("ArrowUp",function(){e.art.volume+=n.VOLUME_STEP}),this.add("ArrowRight",function(){e.art.forward=n.SEEK_STEP}),this.add("ArrowDown",function(){e.art.volume-=n.VOLUME_STEP}),r(document,"keydown",function(t){if(e.art.isFocus){var r=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==n&&"true"!==n&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){var o=e.keys[t.code];if(o){t.preventDefault();for(var a=0;a'},{}],fRhwm:[function(e,t,r){t.exports=''},{}],"4tFZV":[function(e,t,r){t.exports=''},{}],a8x3K:[function(e,t,r){t.exports=''},{}],e0utR:[function(e,t,r){t.exports=''},{}],"69Sc6":[function(e,t,r){t.exports=''},{}],"72xuc":[function(e,t,r){t.exports=''},{}],"85cgQ":[function(e,t,r){t.exports=''},{}],"1Qm4Q":[function(e,t,r){t.exports=''},{}],fpGzT:[function(e,t,r){t.exports=''},{}],jlMSj:[function(e,t,r){t.exports=''},{}],"7sEdH":[function(e,t,r){t.exports=''},{}],eHsVM:[function(e,t,r){t.exports=''},{}],"2f6qz":[function(e,t,r){t.exports=''},{}],cy2gj:[function(e,t,r){t.exports=''},{}],hGnnd:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return x});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_inherits"),l=e("@swc/helpers/_/_to_consumable_array"),c=e("@swc/helpers/_/_create_super"),u=e("@swc/helpers/_/_ts_generator"),p=e("./flip"),f=n.interopDefault(p),d=e("./aspectRatio"),h=n.interopDefault(d),m=e("./playbackRate"),v=n.interopDefault(m),g=e("./subtitleOffset"),y=n.interopDefault(g),_=e("../utils/component"),b=n.interopDefault(_),w=e("../utils"),x=/*#__PURE__*/function(e){(0,s._)(r,e);var t=(0,c._)(r);function r(e){(0,a._)(this,r),n=t.call(this,e);var n,o=e.option,i=e.controls,s=e.template.$setting;return n.name="setting",n.$parent=s,n.id=0,n.active=null,n.cache=new Map,n.option=(0,l._)(n.builtin).concat((0,l._)(o.settings)),o.setting&&(n.format(),n.render(),e.on("blur",function(){n.show&&(n.show=!1,n.render())}),e.on("focus",function(e){var t=(0,w.includeFromEvent)(e,i.setting),r=(0,w.includeFromEvent)(e,n.$parent);!n.show||t||r||(n.show=!1,n.render())}),e.on("resize",function(){return n.resize()})),n}return(0,i._)(r,[{key:"builtin",get:function(){var e=[],t=this.art.option;return t.playbackRate&&e.push((0,v.default)(this.art)),t.aspectRatio&&e.push((0,h.default)(this.art)),t.flip&&e.push((0,f.default)(this.art)),t.subtitleOffset&&e.push((0,y.default)(this.art)),e}},{key:"traverse",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option,r=0;r0&&void 0!==arguments[0]?arguments[0]:this.option,r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=0;a0&&void 0!==arguments[0]?arguments[0]:"",t=null;return this.traverse(function(r){r.name===e&&(t=r)}),t}},{key:"resize",value:function(){var e=this.art,t=e.controls,r=e.constructor,n=r.SETTING_WIDTH,o=r.SETTING_ITEM_HEIGHT,a=e.template,i=a.$player,s=a.$setting;if(t.setting&&this.show){var l,c,u=(null===(c=this.active[0])||void 0===c?void 0:null===(l=c.$parent)||void 0===l?void 0:l.width)||n,p=(0,w.getRect)(t.setting),f=p.left,d=p.width,h=(0,w.getRect)(i),m=h.left,v=h.width,g=f-m+d/2-u/2,y=this.active===this.option?this.active.length*o:(this.active.length+1)*o;if((0,w.setStyle)(s,"height","".concat(y,"px")),(0,w.setStyle)(s,"width","".concat(u,"px")),this.art.isRotate||w.isMobile)return;g+u>v?((0,w.setStyle)(s,"left",null),(0,w.setStyle)(s,"right",null)):((0,w.setStyle)(s,"left","".concat(g,"px")),(0,w.setStyle)(s,"right","auto"))}}},{key:"inactivate",value:function(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:this.option;return t.push(e),this.format(),this.creatItem(e),this.render(),e}},{key:"creatHeader",value:function(e){var t=this;if(this.cache.has(e.$option)){var r=this.cache.get(e.$option),n=this.art,o=n.proxy,a=n.icons.arrowLeft,i=n.constructor.SETTING_ITEM_HEIGHT,s=(0,w.createElement)("div");(0,w.setStyle)(s,"height","".concat(i,"px")),(0,w.addClass)(s,"art-setting-item"),(0,w.addClass)(s,"art-setting-item-back");var l=(0,w.append)(s,'
'),c=(0,w.createElement)("div");(0,w.addClass)(c,"art-setting-item-left-icon"),(0,w.append)(c,a),(0,w.append)(l,c),(0,w.append)(l,e.$parent.html);var u=o(s,"click",function(){return t.render(e.$parents)});e.$parent.$events.push(u),(0,w.append)(r,s)}}},{key:"creatItem",value:function(e){var t,r,n=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.cache.has(e.$option)){var i=this.cache.get(e.$option),s=e.$item,c="selector";(0,w.has)(e,"switch")&&(c="switch"),(0,w.has)(e,"range")&&(c="range"),(0,w.has)(e,"onClick")&&(c="button");var p=this.art,f=p.icons,d=p.proxy,h=p.constructor,m=(0,w.createElement)("div");(0,w.addClass)(m,"art-setting-item"),(0,w.setStyle)(m,"height","".concat(h.SETTING_ITEM_HEIGHT,"px")),m.dataset.name=e.name||"",m.dataset.value=e.value||"";var v=(0,w.append)(m,'
'),g=(0,w.append)(m,'
'),y=(0,w.createElement)("div");switch((0,w.addClass)(y,"art-setting-item-left-icon"),c){case"button":case"switch":case"range":(0,w.append)(y,e.icon||f.config);break;case"selector":(null===(t=e.selector)||void 0===t?void 0:t.length)?(0,w.append)(y,e.icon||f.config):(0,w.append)(y,f.check)}(0,w.append)(v,y),(0,w.def)(e,"$icon",{configurable:!0,get:function(){return y}}),(0,w.def)(e,"icon",{configurable:!0,get:function(){return y.innerHTML},set:function(e){y.innerHTML="",(0,w.append)(y,e)}});var _=(0,w.createElement)("div");(0,w.addClass)(_,"art-setting-item-left-text"),(0,w.append)(_,e.html||""),(0,w.append)(v,_),(0,w.def)(e,"$html",{configurable:!0,get:function(){return _}}),(0,w.def)(e,"html",{configurable:!0,get:function(){return _.innerHTML},set:function(e){_.innerHTML="",(0,w.append)(_,e)}});var b=(0,w.createElement)("div");switch((0,w.addClass)(b,"art-setting-item-right-tooltip"),(0,w.append)(b,e.tooltip||""),(0,w.append)(g,b),(0,w.def)(e,"$tooltip",{configurable:!0,get:function(){return b}}),(0,w.def)(e,"tooltip",{configurable:!0,get:function(){return b.innerHTML},set:function(e){b.innerHTML="",(0,w.append)(b,e)}}),c){case"switch":var x=(0,w.createElement)("div");(0,w.addClass)(x,"art-setting-item-right-icon");var j=(0,w.append)(x,f.switchOn),k=(0,w.append)(x,f.switchOff);(0,w.setStyle)(e.switch?k:j,"display","none"),(0,w.append)(g,x),(0,w.def)(e,"$switch",{configurable:!0,get:function(){return x}});var M=e.switch;(0,w.def)(e,"switch",{configurable:!0,get:function(){return M},set:function(e){M=e,e?((0,w.setStyle)(k,"display","none"),(0,w.setStyle)(j,"display",null)):((0,w.setStyle)(k,"display",null),(0,w.setStyle)(j,"display","none"))}});break;case"range":var I=(0,w.createElement)("div");(0,w.addClass)(I,"art-setting-item-right-icon");var S=(0,w.append)(I,'');S.value=e.range[0],S.min=e.range[1],S.max=e.range[2],S.step=e.range[3],(0,w.addClass)(S,"art-setting-range"),(0,w.append)(g,I),(0,w.def)(e,"$range",{configurable:!0,get:function(){return S}});var D=(0,l._)(e.range);(0,w.def)(e,"range",{configurable:!0,get:function(){return D},set:function(e){D=(0,l._)(e),S.value=e[0],S.min=e[1],S.max=e[2],S.step=e[3]}});break;case"selector":if(null===(r=e.selector)||void 0===r?void 0:r.length){var T=(0,w.createElement)("div");(0,w.addClass)(T,"art-setting-item-right-icon"),(0,w.append)(T,f.arrowRight),(0,w.append)(g,T)}}switch(c){case"switch":if(e.onSwitch){var E,F=this,R=d(m,"click",(E=(0,o._)(function(t){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,e.onSwitch.call(F.art,e,m,t)];case 1:return e.switch=r.sent(),[2]}})}),function(e){return E.apply(this,arguments)}));e.$events.push(R)}break;case"range":if(e.$range){if(e.onRange){var O,C=this,W=d(e.$range,"change",(O=(0,o._)(function(t){return(0,u._)(this,function(r){switch(r.label){case 0:return e.range[0]=e.$range.valueAsNumber,[4,e.onRange.call(C.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return O.apply(this,arguments)}));e.$events.push(W)}if(e.onChange){var A,P=this,$=d(e.$range,"input",(A=(0,o._)(function(t){return(0,u._)(this,function(r){switch(r.label){case 0:return e.range[0]=e.$range.valueAsNumber,[4,e.onChange.call(P.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return A.apply(this,arguments)}));e.$events.push($)}}break;case"selector":var z,L=this,H=d(m,"click",(z=(0,o._)(function(t){var r,n;return(0,u._)(this,function(o){switch(o.label){case 0:if(!(null===(r=e.selector)||void 0===r?void 0:r.length))return[3,1];return L.render(e.selector),[3,3];case 1:if(L.check(e),!e.$parent.onSelect)return[3,3];return n=e.$parent,[4,e.$parent.onSelect.call(L.art,e,m,t)];case 2:n.tooltip=o.sent(),o.label=3;case 3:return[2]}})}),function(e){return z.apply(this,arguments)}));e.$events.push(H),e.default&&(0,w.addClass)(m,"art-current");break;case"button":if(e.onClick){var N,U=this,V=d(m,"click",(N=(0,o._)(function(t){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,e.onClick.call(U.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return N.apply(this,arguments)}));e.$events.push(V)}}(0,w.def)(e,"$item",{configurable:!0,get:function(){return m}}),a?(0,w.replaceElement)(m,s):(0,w.append)(i,m),e.mounted&&setTimeout(function(){return e.mounted.call(n.art,e.$item,e)},0)}}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option;if(this.active=e,this.cache.has(e)){var t=this.cache.get(e);(0,w.inverseClass)(t,"art-current")}else{var r,n=(0,w.createElement)("div");this.cache.set(e,n),(0,w.addClass)(n,"art-setting-panel"),(0,w.append)(this.$parent,n),(0,w.inverseClass)(n,"art-current"),(null===(r=e[0])||void 0===r?void 0:r.$parent)&&this.creatHeader(e[0]);for(var o=0;oo&&cu)&&setTimeout(function(){(0,i.setStyle)(s,"width","".concat(u,"px")),(0,i.setStyle)(s,"height","".concat(c,"px")),(0,i.setStyle)(s,"transform-origin","0 0"),(0,i.setStyle)(s,"transform","rotate(90deg) translate(0, -".concat(c,"px)")),(0,i.addClass)(s,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},r.AUTO_ORIENTATION_TIME)}else(0,i.hasClass)(s,"art-auto-orientation")&&((0,i.removeClass)(s,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",(t=(0,o._)(function(e){var t,r,n,o,c,u,p,f,d;return(0,a._)(this,function(a){switch(a.label){case 0:if(!(null===(r=screen)||void 0===r?void 0:null===(t=r.orientation)||void 0===t?void 0:t.lock))return[2];if(n=screen.orientation.type,!e)return[3,3];if(o=l.videoWidth,c=l.videoHeight,p=(u=document.documentElement).clientWidth,f=u.clientHeight,!(o>c&&pf))return[3,2];return d=n.startsWith("portrait")?"landscape":"portrait",[4,screen.orientation.lock(d)];case 1:a.sent(),(0,i.addClass)(s,"art-auto-orientation-fullscreen"),a.label=2;case 2:return[3,5];case 3:if(!(0,i.hasClass)(s,"art-auto-orientation-fullscreen"))return[3,5];return[4,screen.orientation.lock(n)];case 4:a.sent(),(0,i.removeClass)(s,"art-auto-orientation-fullscreen"),a.label=5;case 5:return[2]}})}),function(e){return t.apply(this,arguments)})),{name:"autoOrientation",get state(){return(0,i.hasClass)(s,"art-auto-orientation")}}}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bfOeF:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.i18n,r=e.icons,n=e.storage,a=e.constructor,i=e.proxy,s=e.template.$poster,l=e.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),c=(0,o.query)(".art-auto-playback-last",l),u=(0,o.query)(".art-auto-playback-jump",l),p=(0,o.query)(".art-auto-playback-close",l);(0,o.append)(p,r.close);var f=null;function d(){var r=(n.get("times")||{})[e.option.id||e.option.url];clearTimeout(f),(0,o.setStyle)(l,"display","none"),r&&r>=a.AUTO_PLAYBACK_MIN&&((0,o.setStyle)(l,"display","flex"),c.innerText="".concat(t.get("Last Seen")," ").concat((0,o.secondToTime)(r)),u.innerText=t.get("Jump Play"),i(p,"click",function(){(0,o.setStyle)(l,"display","none")}),i(u,"click",function(){e.seek=r,e.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")}),e.once("video:timeupdate",function(){f=setTimeout(function(){(0,o.setStyle)(l,"display","none")},a.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",function(){if(e.playing){var t=n.get("times")||{},r=Object.keys(t);r.length>a.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,n.set("times",t)}}),e.on("ready",d),e.on("restart",d),{name:"auto-playback",get times(){return n.get("times")||{}},clear:function(){return n.del("times")},delete:function(e){var t=n.get("times")||{};return delete t[e],n.set("times",t),t}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],giGC3:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.constructor,r=e.proxy,n=e.template,a=n.$player,i=n.$video,s=null,l=!1,c=1,u=function(){clearTimeout(s),l&&(l=!1,e.playbackRate=c,(0,o.removeClass)(a,"art-fast-forward"))};return r(i,"touchstart",function(r){1===r.touches.length&&e.playing&&!e.isLock&&(s=setTimeout(function(){l=!0,c=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",u),r(document,"touchend",u),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],e0Ov6:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return a});var o=e("../utils");function a(e){var t=e.layers,r=e.icons,n=e.template.$player;function a(){return(0,o.hasClass)(n,"art-lock")}function i(){(0,o.addClass)(n,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,o.removeClass)(n,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted:function(t){var n=(0,o.append)(t,r.lock),a=(0,o.append)(t,r.unlock);(0,o.setStyle)(n,"display","none"),e.on("lock",function(e){e?((0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(a,"display","none")):((0,o.setStyle)(n,"display","none"),(0,o.setStyle)(a,"display","inline-flex"))})},click:function(){a()?s():i()}}),{name:"lock",get state(){return a()},set state(value){value?i():s()}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["4Be4O"],"4Be4O","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,n,o,a,i,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[n]&&l[n],u=c.i||{},p=c.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!p[t]){if(!e[t]){if(o[t])return o[t];var a="function"==typeof l[n]&&l[n];if(!r&&a)return a(t,!0);if(c)return c(t,!0);if(f&&"string"==typeof t)return f(t);var i=Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},u.cache={};var s=p[t]=new d.Module(t);e[t][0].call(s.exports,u,s,s.exports,l)}return p[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=f,this.exports={}},d.modules=e,d.cache=p,d.parent=c,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=u,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return l[n]}}),l[n]=d;for(var h=0;h").concat(e))};s("Version@"+t.version),s("Env@"+t.env),s("Build@"+t.build);for(var l=0;l<_.default.events.length;l++)n.on("video:"+_.default.events[l],function(e){return s("Event@"+e.type)})}return et.push(n),n}return(0,l._)(t,e),(0,s._)(t,[{key:"proxy",get:function(){return this.events.proxy}},{key:"query",get:function(){return this.template.query}},{key:"video",get:function(){return this.template.$video}},{key:"destroy",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.events.destroy(),this.template.destroy(e),et.splice(et.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return et}},{key:"version",get:function(){return"5.2.3"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2025-04-20 10:10:56"}},{key:"config",get:function(){return _.default}},{key:"utils",get:function(){return m}},{key:"scheme",get:function(){return g.default}},{key:"Emitter",get:function(){return h.default}},{key:"validator",get:function(){return f.default}},{key:"kindOf",get:function(){return f.default.kindOf}},{key:"html",get:function(){return w.default.html}},{key:"option",get:function(){var e;return{id:"",container:"#artplayer",url:"",poster:"",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,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:function(e){return e}},moreVideoAttr:{controls:!1,preload:m.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:null==(e=navigator)?void 0:e.language.toLowerCase()}}}]),t}(h.default);er.STYLE=u.default,er.DEBUG=!1,er.CONTEXTMENU=!0,er.NOTICE_TIME=2e3,er.SETTING_WIDTH=250,er.SETTING_ITEM_WIDTH=200,er.SETTING_ITEM_HEIGHT=35,er.RESIZE_TIME=200,er.SCROLL_TIME=200,er.SCROLL_GAP=50,er.AUTO_PLAYBACK_MAX=10,er.AUTO_PLAYBACK_MIN=5,er.AUTO_PLAYBACK_TIMEOUT=3e3,er.RECONNECT_TIME_MAX=5,er.RECONNECT_SLEEP_TIME=1e3,er.CONTROL_HIDE_TIME=3e3,er.DBCLICK_TIME=300,er.DBCLICK_FULLSCREEN=!0,er.MOBILE_DBCLICK_PLAY=!0,er.MOBILE_CLICK_PLAY=!1,er.AUTO_ORIENTATION_TIME=200,er.INFO_LOOP_TIME=1e3,er.FAST_FORWARD_VALUE=3,er.FAST_FORWARD_TIME=1e3,er.TOUCH_MOVE_RATIO=.5,er.VOLUME_STEP=.1,er.SEEK_STEP=5,er.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],er.ASPECT_RATIO=["default","4:3","16:9"],er.FLIP=["normal","horizontal","vertical"],er.FULLSCREEN_WEB_IN_BODY=!1,er.LOG_VERSION=!0,er.USE_RAF=!1,m.isBrowser&&(window.Artplayer=er,m.setStyleText("artplayer-style",u.default),setTimeout(function(){er.LOG_VERSION&&console.log("%c ArtPlayer %c ".concat(er.version," %c https://artplayer.org"),"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","bundle-text:./style/index.less":"3eiHP","option-validator":"8OeHO","./utils/emitter":"2V7i9","./utils":"7MU7R","./scheme":"39ygm","./config":"emMME","./template":"gqSBs","./i18n":"7iXtC","./player":"j7piB","./control":"7z0K5","./contextmenu":"5RLZo","./info":"6JYu5","./subtitle":"WYfF6","./events":"47RGg","./hotkey":"gszG1","./layer":"dImgv","./loading":"6vtvO","./notice":"3Z2RQ","./mask":"hUoLo","./icons":"4Bz82","./setting":"hGnnd","./storage":"8dSC3","./plugins":"gv8Rm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jZCCG:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return l});var a=e("./_get_prototype_of.js"),i=e("./_is_native_reflect_construct.js"),s=e("./_possible_constructor_return.js");function l(e,t,r){return t=(0,a._)(t),(0,s._)(e,(0,i._)()?Reflect.construct(t,r||[],(0,a._)(e).constructor):t.apply(e,r))}},{"./_get_prototype_of.js":"dAKgy","./_is_native_reflect_construct.js":"7fioR","./_possible_constructor_return.js":"iVdhB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dAKgy:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r,n){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"7fioR":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iVdhB:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return s});var a=e("./_assert_this_initialized.js"),i=e("./_type_of.js");function s(e,t){return t&&("object"===(0,i._)(t)||"function"==typeof t)?t:(0,a._)(e)}},{"./_assert_this_initialized.js":"jgeid","./_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9iJMm":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){for(var r=0;r1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector(e)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(t.querySelectorAll(e))}function l(e,t){return e.classList.add(t)}function c(e,t){return e.classList.remove(t)}function u(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 f(e){return e.parentNode.removeChild(e)}function d(e,t,r){return e.style[t]=r,e}function h(e,t){for(var r in t)d(e,r,t[r]);return e}function m(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(n):n}function v(e){return Array.from(e.parentElement.children).filter(function(t){return t!==e})}function g(e,t){v(e).forEach(function(e){return c(e,t)}),l(e,t)}function y(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top";a.isMobile||(e.setAttribute("aria-label",t),l(e,"hint--rounded"),l(e,"hint--".concat(r)))}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,a=r.top-t<=n&&r.top+r.height+t>=0,i=r.left-t<=o+t&&r.left+r.width+t>=0;return a&&i}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function w(e,t){return t.parentNode.replaceChild(e,t),e}function x(e){return document.createElement(e)}function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=x("i");return l(r,"art-icon"),l(r,"art-icon-".concat(e)),p(r,t),r}function k(e,t){var r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function M(){var e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function I(e){return e.getBoundingClientRect()}function S(e,t){return new Promise(function(r,n){var o=new Image;o.onload=function(){if(t&&1!==t){var a=document.createElement("canvas"),i=a.getContext("2d");a.width=o.width*t,a.height=o.height*t,i.drawImage(o,0,0,a.width,a.height),a.toBlob(function(t){var o=URL.createObjectURL(t),a=new Image;a.onload=function(){r(a)},a.onerror=function(){URL.revokeObjectURL(o),n(Error("Image load failed: ".concat(e)))},a.src=o})}else r(o)},o.onerror=function(){n(Error("Image load failed: ".concat(e)))},o.src=e})}},{"./compatibility":"f9Vc8","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],f9Vc8:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",function(){return a}),o.export(r,"isSafari",function(){return i}),o.export(r,"isWechat",function(){return s}),o.export(r,"isIE",function(){return l}),o.export(r,"isAndroid",function(){return c}),o.export(r,"isIOS",function(){return u}),o.export(r,"isIOS13",function(){return p}),o.export(r,"isMobile",function(){return f}),o.export(r,"isBrowser",function(){return d});var a="undefined"!=typeof navigator?navigator.userAgent:"",i=/^((?!chrome|android).)*safari/i.test(a),s=/MicroMessenger/i.test(a),l=/MSIE|Trident/i.test(a),c=/android/i.test(a),u=/iPad|iPhone|iPod/i.test(a)&&!window.MSStream,p=u||a.includes("Macintosh")&&navigator.maxTouchPoints>=1,f=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)||p,d="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6WanZ":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",function(){return l}),o.export(r,"errorHandle",function(){return c});var a=e("@swc/helpers/_/_call_super"),i=e("@swc/helpers/_/_class_call_check"),s=e("@swc/helpers/_/_inherits"),l=function(e){"use strict";function t(e,r){var n;return(0,i._)(this,t),n=(0,a._)(this,t,[e]),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(n,r||n.constructor),n.name="ArtPlayerError",n}return(0,s._)(t,e),t}((0,e("@swc/helpers/_/_wrap_native_super")._)(Error));function c(e,t){if(!e)throw new l(t);return e}},{"@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_wrap_native_super":"hNYY1","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hNYY1:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return c});var a=e("./_construct.js"),i=e("./_get_prototype_of.js"),s=e("./_is_native_function.js"),l=e("./_set_prototype_of.js");function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||!(0,s._)(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,a._)(e,arguments,(0,i._)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,l._)(r,e)})(e)}},{"./_construct.js":"ljlHN","./_get_prototype_of.js":"dAKgy","./_is_native_function.js":"fIKaN","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ljlHN:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return s});var a=e("./_is_native_reflect_construct.js"),i=e("./_set_prototype_of.js");function s(e,t,r){return(s=(0,a._)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,i._)(o,r.prototype),o}).apply(null,arguments)}},{"./_is_native_reflect_construct.js":"7fioR","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fIKaN:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return -1!==Function.toString.call(e).indexOf("[native code]")}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cZfjQ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,function(e,t,r){var n=r.slice(0,3);return 1===r.length&&(n=r+"00"),2===r.length&&(n=r+"0"),"".concat(t,",").concat(n)}).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"))}function i(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function s(e){var t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/[:.]/).map(function(e,t,r){if(t===r.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?".".concat(e):":".concat(e)}).join("")}return"WEBVTT\n\n"+e.split(/\r?\n/).map(function(e){var n=e.match(t);return n?{start:r(n[1].trim()),end:r(n[2].trim()),text:n[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(function(e){return e.trim()}).join("\n")}:null}).filter(function(e){return e}).map(function(e,t){return e?t+1+"\n"+"".concat(e.start," --\x3e ").concat(e.end)+"\n"+"".concat(e.text):""}).filter(function(e){return e.trim()}).join("\n\n")}o.defineInteropFlag(r),o.export(r,"srtToVtt",function(){return a}),o.export(r,"vttToBlob",function(){return i}),o.export(r,"assToVtt",function(){return s})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l2mTb:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){var 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",function(){return function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}}),o.export(r,"download",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5EnnX":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",function(){return s}),o.export(r,"has",function(){return c}),o.export(r,"get",function(){return u}),o.export(r,"mergeDeep",function(){return function e(){for(var t=arguments.length,r=Array(t),n=0;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(function(t){return setTimeout(t,e)})}function i(e,t){var r;return function(){for(var n=this,o=arguments.length,a=Array(o),i=0;i0?[t,r,n]:[r,n]).map(function(e){return e<10?"0".concat(e):String(e)}).join(":")}function l(e){return e.replace(/[&<>'"]/g,function(e){return({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e})}function c(e){var t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp("(".concat(Object.keys(t).join("|"),")"),"g");return e.replace(r,function(e){return t[e]||e})}o.defineInteropFlag(r),o.export(r,"clamp",function(){return a}),o.export(r,"capitalize",function(){return i}),o.export(r,"secondToTime",function(){return s}),o.export(r,"escape",function(){return l}),o.export(r,"unescape",function(){return c})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"39ygm":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",function(){return m});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils"),l="array",c="boolean",u="string",p="number",f="object",d="function";function h(e,t,r){return(0,s.errorHandle)(t===u||t===p||e instanceof Element,"".concat(r.join(".")," require '").concat(u,"' or 'Element' type"))}var m={html:h,disable:"?".concat(c),name:"?".concat(u),index:"?".concat(p),style:"?".concat(f),click:"?".concat(d),mounted:"?".concat(d),tooltip:"?".concat(u,"|").concat(p),width:"?".concat(p),selector:"?".concat(l),onSelect:"?".concat(d),switch:"?".concat(c),onSwitch:"?".concat(d),range:"?".concat(l),onRange:"?".concat(d),onChange:"?".concat(d)};r.default={id:u,container:h,url:u,poster:u,type:u,theme:u,lang:u,volume:p,isLive:c,muted:c,autoplay:c,autoSize:c,autoMini:c,loop:c,flip:c,playbackRate:c,aspectRatio:c,screenshot:c,setting:c,hotkey:c,pip:c,mutex:c,backdrop:c,fullscreen:c,fullscreenWeb:c,subtitleOffset:c,miniProgressBar:c,useSSR:c,playsInline:c,lock:c,gesture:c,fastForward:c,autoPlayback:c,autoOrientation:c,airplay:c,proxy:"?".concat(d),plugins:[d],layers:[m],contextmenu:[m],settings:[m],controls:[(0,i._)((0,a._)({},m),{position:function(e,t,r){var n=["top","left","right"];return(0,s.errorHandle)(n.includes(e),"".concat(r.join(".")," only accept ").concat(n.toString()," as parameters"))}})],quality:[{default:"?".concat(c),html:u,url:u}],highlight:[{time:p,text:u}],thumbnails:{url:u,number:p,column:p,width:p,height:p,scale:p},subtitle:{url:u,name:u,type:u,style:f,escape:c,encoding:u,onVttLoad:d},moreVideoAttr:f,i18n:f,icons:f,cssVar:f,customType:f}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return i});var a=e("./_define_property.js");function i(e){for(var t=1;t\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Player version:
\n
5.2.3
\n
\n
\n
Video url:
\n
\n
\n
\n
Video volume:
\n
\n
\n
\n
Video time:
\n
\n
\n
\n
Video duration:
\n
\n
\n
\n
Video resolution:
\n
\nx\n
\n
\n
\n
[x]
\n
\n
\n\n '}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","./utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7iXtC":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return u});var a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("../utils"),l=e("./zh-cn"),c=o.interopDefault(l),u=function(){"use strict";function e(t){(0,a._)(this,e),this.art=t,this.languages={"zh-cn":c.default},this.language={},this.update(t.option.i18n)}return(0,i._)(e,[{key:"init",value:function(){var e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}},{key:"get",value:function(e){return this.language[e]||e}},{key:"update",value:function(e){this.languages=(0,s.mergeDeep)(this.languages,e),this.init()}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","../utils":"7MU7R","./zh-cn":"5mkZy","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5mkZy":[function(e,t,r,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","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":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],j7piB:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return ex});var a=e("@swc/helpers/_/_class_call_check"),i=e("./urlMix"),s=o.interopDefault(i),l=e("./attrMix"),c=o.interopDefault(l),u=e("./playMix"),p=o.interopDefault(u),f=e("./pauseMix"),d=o.interopDefault(f),h=e("./toggleMix"),m=o.interopDefault(h),v=e("./seekMix"),g=o.interopDefault(v),y=e("./volumeMix"),_=o.interopDefault(y),b=e("./currentTimeMix"),w=o.interopDefault(b),x=e("./durationMix"),j=o.interopDefault(x),k=e("./switchMix"),M=o.interopDefault(k),I=e("./playbackRateMix"),S=o.interopDefault(I),D=e("./aspectRatioMix"),T=o.interopDefault(D),E=e("./screenshotMix"),F=o.interopDefault(E),R=e("./fullscreenMix"),O=o.interopDefault(R),C=e("./fullscreenWebMix"),W=o.interopDefault(C),A=e("./pipMix"),P=o.interopDefault(A),$=e("./loadedMix"),L=o.interopDefault($),z=e("./playedMix"),H=o.interopDefault(z),N=e("./playingMix"),U=o.interopDefault(N),V=e("./autoSizeMix"),B=o.interopDefault(V),q=e("./rectMix"),Y=o.interopDefault(q),G=e("./flipMix"),J=o.interopDefault(G),K=e("./miniMix"),X=o.interopDefault(K),Z=e("./posterMix"),Q=o.interopDefault(Z),ee=e("./autoHeightMix"),et=o.interopDefault(ee),er=e("./cssVarMix"),en=o.interopDefault(er),eo=e("./themeMix"),ea=o.interopDefault(eo),ei=e("./typeMix"),es=o.interopDefault(ei),el=e("./stateMix"),ec=o.interopDefault(el),eu=e("./subtitleOffsetMix"),ep=o.interopDefault(eu),ef=e("./airplayMix"),ed=o.interopDefault(ef),eh=e("./qualityMix"),em=o.interopDefault(eh),ev=e("./thumbnailsMix"),eg=o.interopDefault(ev),ey=e("./optionInit"),e_=o.interopDefault(ey),eb=e("./eventInit"),ew=o.interopDefault(eb),ex=function e(t){"use strict";(0,a._)(this,e),(0,s.default)(t),(0,c.default)(t),(0,p.default)(t),(0,d.default)(t),(0,m.default)(t),(0,g.default)(t),(0,_.default)(t),(0,w.default)(t),(0,j.default)(t),(0,M.default)(t),(0,S.default)(t),(0,T.default)(t),(0,F.default)(t),(0,O.default)(t),(0,W.default)(t),(0,P.default)(t),(0,L.default)(t),(0,H.default)(t),(0,U.default)(t),(0,B.default)(t),(0,Y.default)(t),(0,J.default)(t),(0,X.default)(t),(0,Q.default)(t),(0,et.default)(t),(0,en.default)(t),(0,ea.default)(t),(0,es.default)(t),(0,ec.default)(t),(0,ep.default)(t),(0,ed.default)(t),(0,em.default)(t),(0,eg.default)(t),(0,ew.default)(t),(0,e_.default)(t)}},{"@swc/helpers/_/_class_call_check":"9iJMm","./urlMix":"bnOAX","./attrMix":"YLwHz","./playMix":"ktu66","./pauseMix":"6JstV","./toggleMix":"cotiM","./seekMix":"8DVLx","./volumeMix":"9fjEr","./currentTimeMix":"fniLa","./durationMix":"2WMs4","./switchMix":"5XnRj","./playbackRateMix":"atzXU","./aspectRatioMix":"e67kx","./screenshotMix":"7FJKj","./fullscreenMix":"1hnoY","./fullscreenWebMix":"aLUYJ","./pipMix":"jJ7PZ","./loadedMix":"3RcYf","./playedMix":"hpdzI","./playingMix":"dQpMB","./autoSizeMix":"i3W5n","./rectMix":"eA2QA","./flipMix":"8B7eY","./miniMix":"f1BFf","./posterMix":"3Bs5U","./autoHeightMix":"gRfBQ","./cssVarMix":"6gWkU","./themeMix":"6YX9w","./typeMix":"cBZG8","./stateMix":"bpFKI","./subtitleOffsetMix":"hyhz8","./airplayMix":"5fLM6","./qualityMix":"jj5tM","./thumbnailsMix":"g4G3o","./optionInit":"PZTTa","./eventInit":"cKj2D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bnOAX:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),s=e("../utils");function l(e){var t=e.option,r=e.template.$video;(0,s.def)(e,"url",{get:function(){return r.src},set:function(n){return(0,a._)(function(){var o,a,l;return(0,i._)(this,function(i){switch(i.label){case 0:if(!n)return[3,4];if(o=e.url,a=t.type||(0,s.getExt)(n),l=t.customType[a],!(a&&l))return[3,2];return[4,(0,s.sleep)()];case 1:return i.sent(),e.loading.show=!0,l.call(e,r,n,e),[3,3];case 2:URL.revokeObjectURL(o),r.src=n,i.label=3;case 3:return o!==e.url&&(e.option.url=n,e.isReady&&o&&e.once("video:canplay",function(){e.emit("restart",n)})),[3,6];case 4:return[4,(0,s.sleep)()];case 5:i.sent(),e.loading.show=!0,i.label=6;case 6:return[2]}})})()}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){r(e);return}s.done?t(l):Promise.resolve(l).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function s(e){a(i,n,o,s,l,"next",e)}function l(e){a(i,n,o,s,l,"throw",e)}s(void 0)})}}o.defineInteropFlag(r),o.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return a.__generator});var a=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"__extends",function(){return s}),o.export(r,"__assign",function(){return l}),o.export(r,"__rest",function(){return c}),o.export(r,"__decorate",function(){return u}),o.export(r,"__param",function(){return p}),o.export(r,"__esDecorate",function(){return f}),o.export(r,"__runInitializers",function(){return d}),o.export(r,"__propKey",function(){return h}),o.export(r,"__setFunctionName",function(){return m}),o.export(r,"__metadata",function(){return v}),o.export(r,"__awaiter",function(){return g}),o.export(r,"__generator",function(){return y}),o.export(r,"__createBinding",function(){return _}),o.export(r,"__exportStar",function(){return b}),o.export(r,"__values",function(){return w}),o.export(r,"__read",function(){return x}),o.export(r,"__spread",function(){return j}),o.export(r,"__spreadArrays",function(){return k}),o.export(r,"__spreadArray",function(){return M}),o.export(r,"__await",function(){return I}),o.export(r,"__asyncGenerator",function(){return S}),o.export(r,"__asyncDelegator",function(){return D}),o.export(r,"__asyncValues",function(){return T}),o.export(r,"__makeTemplateObject",function(){return E}),o.export(r,"__importStar",function(){return O}),o.export(r,"__importDefault",function(){return C}),o.export(r,"__classPrivateFieldGet",function(){return W}),o.export(r,"__classPrivateFieldSet",function(){return A}),o.export(r,"__classPrivateFieldIn",function(){return P}),o.export(r,"__addDisposableResource",function(){return $}),o.export(r,"__disposeResources",function(){return z}),o.export(r,"__rewriteRelativeImportExtension",function(){return H});var a=e("@swc/helpers/_/_type_of"),i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var l=function(){return(l=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,a._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function p(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var l,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",p=!t&&e?n.static?e:e.prototype:null,f=t||(p?Object.getOwnPropertyDescriptor(p,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var m={};for(var v in n)m[v]="access"===v?{}:n[v];for(var v in n.access)m.access[v]=n.access[v];m.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var g=(0,r[h])("accessor"===c?{get:f.get,set:f.set}:f[u],m);if("accessor"===c){if(void 0===g)continue;if(null===g||(void 0===g?"undefined":(0,a._)(g))!=="object")throw TypeError("Object expected");(l=s(g.get))&&(f.get=l),(l=s(g.set))&&(f.set=l),(l=s(g.init))&&o.unshift(l)}else(l=s(g))&&("field"===c?o.unshift(l):f[u]=l)}p&&Object.defineProperty(p,n.name,f),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function j(){for(var e=[],t=0;t1||s(e,t)})},t&&(n[e]=t(n[e])))}function s(e,t){try{var r;(r=o[e](t)).value instanceof I?Promise.resolve(r.value.v).then(l,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function D(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:I(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=w(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var a,i,s;a=n,i=o,s=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){a({value:e,done:s})},i)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},R=function(e){return(R=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=R(e),n=0;nu?((0,a.setStyle)(o,"width","".concat(u*c,"px")),(0,a.setStyle)(o,"height","100%"),(0,a.setStyle)(o,"margin","0 auto")):((0,a.setStyle)(o,"width","100%"),(0,a.setStyle)(o,"height","".concat(l/u,"px")),(0,a.setStyle)(o,"margin","auto 0")),i.dataset.aspectRatio=n}r.show="".concat(t.get("Aspect Ratio"),": ").concat("default"===n?t.get("Default"):n),e.emit("aspectRatio",n)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7FJKj":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),s=e("../utils");function l(e){var t,r=e.notice,n=e.template.$video,o=(0,s.createElement)("canvas");(0,s.def)(e,"getDataURL",{value:function(){return new Promise(function(e,t){try{o.width=n.videoWidth,o.height=n.videoHeight,o.getContext("2d").drawImage(n,0,0),e(o.toDataURL("image/png"))}catch(e){r.show=e,t(e)}})}}),(0,s.def)(e,"getBlobUrl",{value:function(){return new Promise(function(e,t){try{o.width=n.videoWidth,o.height=n.videoHeight,o.getContext("2d").drawImage(n,0,0),o.toBlob(function(t){e(URL.createObjectURL(t))})}catch(e){r.show=e,t(e)}})}}),(0,s.def)(e,"screenshot",{value:(t=(0,a._)(function(t){var r,o;return(0,i._)(this,function(a){switch(a.label){case 0:return[4,e.getDataURL()];case 1:return r=a.sent(),o=t||"artplayer_".concat((0,s.secondToTime)(n.currentTime)),(0,s.download)(r,"".concat(o,".png")),e.emit("screenshot",r),[2,r]}})}),function(e){return t.apply(this,arguments)})})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1hnoY":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return u});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),s=e("../libs/screenfull"),l=o.interopDefault(s),c=e("../utils");function u(e){var t=e.i18n,r=e.notice,n=e.template,o=n.$video,s=n.$player,u=function(e){l.default.on("change",function(){e.emit("fullscreen",l.default.isFullscreen),l.default.isFullscreen?(e.state="fullscreen",(0,c.addClass)(s,"art-fullscreen")):(0,c.removeClass)(s,"art-fullscreen"),e.emit("resize")}),l.default.on("error",function(t){e.emit("fullscreenError",t)}),(0,c.def)(e,"fullscreen",{get:function(){return l.default.isFullscreen},set:function(e){return(0,a._)(function(){return(0,i._)(this,function(t){switch(t.label){case 0:if(!e)return[3,2];return[4,l.default.request(s)];case 1:return t.sent(),[3,4];case 2:return[4,l.default.exit()];case 3:t.sent(),t.label=4;case 4:return[2]}})})()}})},p=function(e){e.proxy(document,"webkitfullscreenchange",function(){e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,c.def)(e,"fullscreen",{get:function(){return document.fullscreenElement===o},set:function(t){t?(e.state="fullscreen",o.webkitEnterFullscreen()):o.webkitExitFullscreen()}})};e.once("video:loadedmetadata",function(){l.default.isEnabled?u(e):o.webkitSupportsFullscreen?p(e):(0,c.def)(e,"fullscreen",{get:function(){return!1},set:function(){r.show=t.get("Fullscreen Not Supported")}}),(0,c.def)(e,"fullscreen",(0,c.get)(e,"fullscreen"))})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../libs/screenfull":"cM8lD","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cM8lD:[function(e,t,r,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("@swc/helpers/_/_sliced_to_array"),a=[["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"]],i=function(){if("undefined"==typeof document)return!1;var e=a[0],t={},r=!0,n=!1,i=void 0;try{for(var s,l=a[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c[1]in document){var u=!0,p=!1,f=void 0;try{for(var d,h=c.entries()[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var m=(0,o._)(d.value,2),v=m[0],g=m[1];t[e[v]]=g}}catch(e){p=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw f}}return t}}}catch(e){n=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(n)throw i}}return!1}(),s={change:i.fullscreenchange,error:i.fullscreenerror},l={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise(function(r,n){var o=function(){l.off("change",o),r()};l.on("change",o);var a=e[i.requestFullscreen](t);a instanceof Promise&&a.then(o).catch(n)})},exit:function(){return new Promise(function(e,t){if(!l.isFullscreen)return void e();var r=function(){l.off("change",r),e()};l.on("change",r);var n=document[i.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)})},toggle:function(e,t){return l.isFullscreen?l.exit():l.request(e,t)},onchange:function(e){l.on("change",e)},onerror:function(e){l.on("error",e)},on:function(e,t){var r=s[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=s[e];r&&document.removeEventListener(r,t,!1)},raw:i};Object.defineProperties(l,{isFullscreen:{get:function(){return!!document[i.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[i.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!document[i.fullscreenEnabled]}}}),i||(l={isEnabled:!1}),r.default=l},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"_",function(){return c});var a=e("./_array_with_holes.js"),i=e("./_iterable_to_array_limit.js"),s=e("./_non_iterable_rest.js"),l=e("./_unsupported_iterable_to_array.js");function c(e,t){return(0,a._)(e)||(0,i._)(e,t)||(0,l._)(e,t)||(0,s._)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){if(Array.isArray(e))return e}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],loYCM:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw n}}return a}}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}o.defineInteropFlag(r),o.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],aLUYJ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.constructor,r=e.template,n=r.$container,o=r.$player,i="";(0,a.def)(e,"fullscreenWeb",{get:function(){return(0,a.hasClass)(o,"art-fullscreen-web")},set:function(r){r?(i=o.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,a.append)(document.body,o),e.state="fullscreenWeb",(0,a.setStyle)(o,"width","100%"),(0,a.setStyle)(o,"height","100%"),(0,a.addClass)(o,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,a.append)(n,o),i&&(o.style.cssText=i,i=""),(0,a.removeClass)(o,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jJ7PZ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t,r,n,o,i=e.i18n,s=e.notice,l=e.template.$video;document.pictureInPictureEnabled?(t=e.template.$video,r=e.proxy,n=e.notice,t.disablePictureInPicture=!1,(0,a.def)(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(r){r?(e.state="pip",t.requestPictureInPicture().catch(function(e){throw n.show=e,e})):document.exitPictureInPicture().catch(function(e){throw n.show=e,e})}}),r(t,"enterpictureinpicture",function(){e.emit("pip",!0)}),r(t,"leavepictureinpicture",function(){e.emit("pip",!1)})):l.webkitSupportsPresentationMode?((o=e.template.$video).webkitSetPresentationMode("inline"),(0,a.def)(e,"pip",{get:function(){return"picture-in-picture"===o.webkitPresentationMode},set:function(t){t?(e.state="pip",o.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(o.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})):(0,a.def)(e,"pip",{get:function(){return!1},set:function(){s.show=i.get("PIP Not Supported")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3RcYf":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template.$video;(0,a.def)(e,"loaded",{get:function(){return e.loadedTime/t.duration}}),(0,a.def)(e,"loadedTime",{get:function(){return t.buffered.length?t.buffered.end(t.buffered.length-1):0}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hpdzI:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){(0,a.def)(e,"played",{get:function(){return e.currentTime/e.duration}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dQpMB:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template.$video;(0,a.def)(e,"playing",{get:function(){return"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],i3W5n:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template,r=t.$container,n=t.$player,o=t.$video;(0,a.def)(e,"autoSize",{value:function(){var t=o.videoWidth,i=o.videoHeight,s=(0,a.getRect)(r),l=s.width,c=s.height,u=t/i;l/c>u?((0,a.setStyle)(n,"width","".concat(c*u/l*100,"%")),(0,a.setStyle)(n,"height","100%")):((0,a.setStyle)(n,"width","100%"),(0,a.setStyle)(n,"height","".concat(l/u/c*100,"%"))),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eA2QA:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){(0,a.def)(e,"rect",{get:function(){return(0,a.getRect)(e.template.$player)}});for(var t=["bottom","height","left","right","top","width"],r=0;r');(0,a.append)(d,t.close),r(d,"click",p);var h=(0,a.append)(i,'
'),m=(0,a.append)(h,t.play),v=(0,a.append)(h,t.pause);return r(m,"click",function(){return e.play()}),r(v,"click",function(){return e.pause()}),f(m,v),e.on("video:playing",function(){return f(m,v)}),e.on("video:pause",function(){return f(m,v)}),e.on("video:timeupdate",function(){return f(m,v)}),r(i,"mousedown",function(e){l=0===e.button,c=e.pageX,u=e.pageY}),e.on("document:mousemove",function(e){if(l){(0,a.addClass)(i,"art-mini-droging");var t=e.pageX-c,r=e.pageY-u;(0,a.setStyle)(i,"transform","translate(".concat(t,"px, ").concat(r,"px)"))}}),e.on("document:mouseup",function(){if(l){l=!1,(0,a.removeClass)(i,"art-mini-droging");var e=(0,a.getRect)(i);n.set("left",e.left),n.set("top",e.top),(0,a.setStyle)(i,"left","".concat(e.left,"px")),(0,a.setStyle)(i,"top","".concat(e.top,"px")),(0,a.setStyle)(i,"transform",null)}}),i}(),m=n.get("top"),v=n.get("left");m&&v?((0,a.setStyle)(h,"top","".concat(m,"px")),(0,a.setStyle)(h,"left","".concat(v,"px")),(0,a.isInViewport)(h)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3Bs5U":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template.$poster;(0,a.def)(e,"poster",{get:function(){try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set:function(e){(0,a.setStyle)(t,"backgroundImage","url(".concat(e,")"))}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gRfBQ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template,r=t.$container,n=t.$video;(0,a.def)(e,"autoHeight",{value:function(){var t=r.clientWidth,o=n.videoHeight,i=t/n.videoWidth*o;(0,a.setStyle)(r,"height",i+"px"),e.emit("autoHeight",i)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6gWkU":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.template.$player;(0,a.def)(e,"cssVar",{value:function(e,r){return r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6YX9w":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){(0,a.def)(e,"theme",{get:function(){return e.cssVar("--art-theme")},set:function(t){e.cssVar("--art-theme",t)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cBZG8:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){(0,a.def)(e,"type",{get:function(){return e.option.type},set:function(t){e.option.type=t}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bpFKI:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=["mini","pip","fullscreen","fullscreenWeb"];(0,a.def)(e,"state",{get:function(){return t.find(function(t){return e[t]})||"standard"},set:function(r){for(var n=0;n0&&bl.clientWidth-m/2?(0,s.setStyle)(o,"left","".concat(l.clientWidth-m,"px")):(0,s.setStyle)(o,"left","".concat(t-m/2,"px"))}}(b):s.isMobile||(0,s.setStyle)(m,"display","none"),_&&(clearTimeout(u),u=setTimeout(function(){(0,s.setStyle)(m,"display","none")},500)),i.label=3;case 3:return[2]}})}),function(e,r,n){return t.apply(this,arguments)})),(0,s.def)(e,"thumbnails",{get:function(){return e.option.thumbnails},set:function(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(u),u=null,p=null,f=!1,d=!1)}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],PZTTa:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.option,r=e.storage,n=e.template,o=n.$video,i=n.$poster;for(var s in t.moreVideoAttr)e.attr(s,t.moreVideoAttr[s]);t.muted&&(e.muted=t.muted),t.volume&&(o.volume=(0,a.clamp)(t.volume,0,1));var l=r.get("volume");for(var c in"number"==typeof l&&(o.volume=(0,a.clamp)(l,0,1)),t.poster&&(0,a.setStyle)(i,"backgroundImage","url(".concat(t.poster,")")),t.autoplay&&(o.autoplay=t.autoplay),t.playsInline&&(o.playsInline=!0,o["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(c,t.cssVar[c]);e.url=t.url}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cKj2D:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return u});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),s=e("../config"),l=o.interopDefault(s),c=e("../utils");function u(e){for(var t,r=e.i18n,n=e.notice,o=e.option,s=e.constructor,u=e.proxy,p=e.template,f=p.$player,d=p.$video,h=p.$poster,m=0,v=0;v=n.CONTROL_HIDE_TIME&&(r.show=!1)}),e.on("control",function(e){e?((0,W.removeClass)(a,"art-hide-cursor"),(0,W.addClass)(a,"art-hover"),r.timer=Date.now()):((0,W.addClass)(a,"art-hide-cursor"),(0,W.removeClass)(a,"art-hover"))}),r.init(),r}return(0,p._)(t,e),(0,l._)(t,[{key:"init",value:function(){var e=this,t=this.art.option;t.isLive||this.add((0,k.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,x.default)({name:"playAndPause",position:"left",index:10})),this.add((0,D.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,I.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,W.sleep)().then(function(){e.art.quality=t.quality}),t.screenshot&&!W.isMobile&&this.add((0,R.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,E.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,b.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,C.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,y.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,v.default)({name:"fullscreen",position:"right",index:70}));for(var r=0;r=Number(a.dataset.index)});c?c.insertAdjacentElement("beforebegin",a):(0,s.append)(this.$parent,a),r.html&&(0,s.append)(a,r.html),r.style&&(0,s.setStyles)(a,r.style),r.tooltip&&(0,s.tooltip)(a,r.tooltip);var f=[];if(r.click){var d=this.art.events.proxy(a,"click",function(e){e.preventDefault(),r.click.call(t.art,t,e)});f.push(d)}return r.selector&&["left","right"].includes(r.position)&&this.selector(r,a,f),this[n]=a,this.cache.set(n,{$ref:a,events:f,option:r}),r.mounted&&r.mounted.call(this.art,a),a}}},{key:"remove",value:function(e){var t=this.cache.get(e);(0,l.errorHandle)(t,"Can't find [".concat(e,"] from the [").concat(this.name,"]")),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(var r=0;r\n
\n
\n
\n
\n
\n
\n\n ',mounted:function(e){var a=null,i=!1,u=(0,s.query)(".art-progress-hover",e),p=(0,s.query)(".art-progress-loaded",e),f=(0,s.query)(".art-progress-played",e),d=(0,s.query)(".art-progress-highlight",e),h=(0,s.query)(".art-progress-indicator",e),m=(0,s.query)(".art-progress-tip",e);function v(r,n){var o=n||l(t,r),a=o.width;m.innerText=o.time;var i=m.clientWidth;a<=i/2?(0,s.setStyle)(m,"left",0):a>e.clientWidth-i/2?(0,s.setStyle)(m,"left","".concat(e.clientWidth-i,"px")):(0,s.setStyle)(m,"left","".concat(a-i/2,"px"))}r.indicator?(0,s.append)(h,r.indicator):(0,s.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,n,o){var i="played"===r&&o&&s.isMobile;"loaded"===r&&(0,s.setStyle)(p,"width","".concat(100*n,"%")),"hover"===r&&(0,s.setStyle)(u,"width","".concat(100*n,"%")),"played"===r&&((0,s.setStyle)(f,"width","".concat(100*n,"%")),(0,s.setStyle)(h,"left","".concat(100*n,"%"))),i&&((0,s.setStyle)(m,"display","flex"),v(o,{width:e.clientWidth*n,time:(0,s.secondToTime)(n*t.duration)}),clearTimeout(a),a=setTimeout(function(){(0,s.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){d.innerText="";for(var e=0;e');(0,s.append)(d,a)}}),t.on("video:progress",function(){t.emit("setBar","loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",function(){t.emit("setBar","played",t.played)}):t.on("video:timeupdate",function(){t.emit("setBar","played",t.played)}),t.on("video:ended",function(){t.emit("setBar","played",1)}),t.emit("setBar","loaded",t.loaded||0),s.isMobile||(o(e,"click",function(e){e.target!==h&&c(t,e)}),o(e,"mousemove",function(r){var n,o,a=l(t,r).percentage;(t.emit("setBar","hover",a,r),(0,s.setStyle)(m,"display","flex"),(0,s.includeFromEvent)(r,d))?(n=l(t,r).width,m.innerText=r.target.dataset.text,n<=(o=m.clientWidth)/2?(0,s.setStyle)(m,"left",0):n>e.clientWidth-o/2?(0,s.setStyle)(m,"left","".concat(e.clientWidth-o,"px")):(0,s.setStyle)(m,"left","".concat(n-o/2,"px"))):v(r)}),o(e,"mouseleave",function(e){(0,s.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),o(e,"mousedown",function(e){i=0===e.button}),t.on("document:mousemove",function(e){if(i){var r=l(t,e),n=r.second,o=r.percentage;t.emit("setBar","played",o,e),t.seek=n}}),t.on("document:mouseup",function(){i&&(i=!1)}))}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l3dNa:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){return(0,i._)((0,a._)({},e),{style:s.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:function(e){function r(){var r="".concat((0,s.secondToTime)(t.currentTime)," / ").concat((0,s.secondToTime)(t.duration));r!==e.innerText&&(e.innerText=r)}r();for(var n=["video:loadedmetadata","video:timeupdate","video:progress"],o=0;o'),l=(0,s.append)(i,'
'),c=(0,s.append)(l,'
'),u=(0,s.append)(l,'
'),p=(0,s.append)(u,'
'),f=(0,s.append)(p,'
'),d=(0,s.append)(u,'
');function h(e){var t=(0,s.getRect)(u),r=t.top,n=t.height;return 1-(e.clientY-r)/n}function m(){if(t.muted||0===t.volume)(0,s.setStyle)(o,"display","none"),(0,s.setStyle)(a,"display","flex"),(0,s.setStyle)(d,"top","100%"),(0,s.setStyle)(f,"top","100%"),c.innerText=0;else{var e=100*t.volume;(0,s.setStyle)(o,"display","flex"),(0,s.setStyle)(a,"display","none"),(0,s.setStyle)(d,"top","".concat(100-e,"%")),(0,s.setStyle)(f,"top","".concat(100-e,"%")),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(o,"click",function(){t.muted=!0}),r(a,"click",function(){t.muted=!1}),s.isMobile)(0,s.setStyle)(i,"display","none");else{var v=!1;r(u,"mousedown",function(e){v=0===e.button,t.volume=h(e)}),t.on("document:mousemove",function(e){v&&(t.muted=!1,t.volume=h(e))}),t.on("document:mouseup",function(){v&&(v=!1)})}}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2XGYu":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){return(0,i._)((0,a._)({},e),{tooltip:t.i18n.get("Show Setting"),mounted:function(e){var r=t.proxy,n=t.icons,o=t.i18n;(0,s.append)(e,n.setting),r(e,"click",function(){t.setting.toggle(),t.setting.resize()}),t.on("setting",function(t){(0,s.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],idjoR:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){return(0,i._)((0,a._)({},e),{tooltip:t.i18n.get("Screenshot"),mounted:function(e){var r=t.proxy,n=t.icons;(0,s.append)(e,n.screenshot),r(e,"click",function(){t.screenshot()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],huCXW:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){return(0,i._)((0,a._)({},e),{tooltip:t.i18n.get("AirPlay"),mounted:function(e){var r=t.proxy,n=t.icons;(0,s.append)(e,n.airplay),r(e,"click",function(){return t.airplay()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5RLZo":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return k});var a=e("@swc/helpers/_/_call_super"),i=e("@swc/helpers/_/_class_call_check"),s=e("@swc/helpers/_/_create_class"),l=e("@swc/helpers/_/_inherits"),c=e("../utils"),u=e("../utils/component"),p=o.interopDefault(u),f=e("./playbackRate"),d=o.interopDefault(f),h=e("./aspectRatio"),m=o.interopDefault(h),v=e("./flip"),g=o.interopDefault(v),y=e("./info"),_=o.interopDefault(y),b=e("./version"),w=o.interopDefault(b),x=e("./close"),j=o.interopDefault(x),k=function(e){"use strict";function t(e){var r;return(0,i._)(this,t),(r=(0,a._)(this,t,[e])).name="contextmenu",r.$parent=e.template.$contextmenu,c.isMobile||r.init(),r}return(0,l._)(t,e),(0,s._)(t,[{key:"init",value:function(){var e=this,t=this.art,r=t.option,n=t.proxy,o=t.template,a=o.$player,i=o.$contextmenu;r.playbackRate&&this.add((0,d.default)({name:"playbackRate",index:10})),r.aspectRatio&&this.add((0,m.default)({name:"aspectRatio",index:20})),r.flip&&this.add((0,g.default)({name:"flip",index:30})),this.add((0,_.default)({name:"info",index:40})),this.add((0,w.default)({name:"version",index:50})),this.add((0,j.default)({name:"close",index:60}));for(var s=0;su+l&&(m=l-h),n+d>p+s&&(v=s-d),(0,c.setStyles)(i,{top:"".concat(v,"px"),left:"".concat(m,"px")})}}),n(a,"click",function(t){(0,c.includeFromEvent)(t,i)||(e.show=!1)}),this.art.on("blur",function(){e.show=!1})}}]),t}(p.default)},{"@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","../utils":"7MU7R","../utils/component":"2dsXg","./playbackRate":"7w1iV","./aspectRatio":"cJDR0","./flip":"cpqHQ","./info":"FMfqg","./version":"a9IHg","./close":"9PxVB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7w1iV":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){var r=t.i18n,n=t.constructor.PLAYBACK_RATE.map(function(e){return'').concat(1===e?r.get("Normal"):e.toFixed(1),"")}).join("");return(0,i._)((0,a._)({},e),{html:"".concat(r.get("Play Speed"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.playbackRate=Number(n),e.show=!1)},mounted:function(e){var r=(0,s.query)('[data-value="1"]',e);r&&(0,s.inverseClass)(r,"art-current"),t.on("video:ratechange",function(){var r=(0,s.queryAll)("span",e).find(function(e){return Number(e.dataset.value)===t.playbackRate});r&&(0,s.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cJDR0:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){var r=t.i18n,n=t.constructor.ASPECT_RATIO.map(function(e){return'').concat("default"===e?r.get("Default"):e,"")}).join("");return(0,i._)((0,a._)({},e),{html:"".concat(r.get("Aspect Ratio"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.aspectRatio=n,e.show=!1)},mounted:function(e){var r=(0,s.query)('[data-value="default"]',e);r&&(0,s.inverseClass)(r,"art-current"),t.on("aspectRatio",function(t){var r=(0,s.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,s.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cpqHQ:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("../utils");function l(e){return function(t){var r=t.i18n,n=t.constructor.FLIP.map(function(e){return'').concat(r.get((0,s.capitalize)(e)),"")}).join("");return(0,i._)((0,a._)({},e),{html:"".concat(r.get("Video Flip"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.flip=n.toLowerCase(),e.show=!1)},mounted:function(e){var r=(0,s.query)('[data-value="normal"]',e);r&&(0,s.inverseClass)(r,"art-current"),t.on("flip",function(t){var r=(0,s.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,s.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],FMfqg:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return s});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props");function s(e){return function(t){return(0,i._)((0,a._)({},e),{html:t.i18n.get("Video Info"),click:function(e){t.info.show=!0,e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],a9IHg:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return s});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props");function s(e){return(0,i._)((0,a._)({},e),{html:'ArtPlayer 5.2.3'})}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9PxVB":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return s});var a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props");function s(e){return function(t){return(0,i._)((0,a._)({},e),{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6JYu5":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return p});var a=e("@swc/helpers/_/_call_super"),i=e("@swc/helpers/_/_class_call_check"),s=e("@swc/helpers/_/_create_class"),l=e("@swc/helpers/_/_inherits"),c=e("./utils"),u=e("./utils/component"),p=function(e){"use strict";function t(e){var r;return(0,i._)(this,t),(r=(0,a._)(this,t,[e])).name="info",c.isMobile||r.init(),r}return(0,l._)(t,e),(0,s._)(t,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor,o=t.template,a=o.$infoPanel,i=o.$infoClose,s=o.$video;r(i,"click",function(){e.show=!1});var l=null,u=(0,c.queryAll)("[data-video]",a)||[];this.art.on("destroy",function(){return clearTimeout(l)}),!function e(){for(var t=0;t\n ').concat(t.escape?(0,h.escape)(e):e,"\n")}).join("")}).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}},{key:"switch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,a._)(function(){var n,o,a,i,s,l;return(0,d._)(this,function(c){switch(c.label){case 0:return o=(n=r.art).i18n,a=n.notice,i=n.option,s=(0,p._)((0,u._)({},i.subtitle,t),{url:e}),[4,r.init(s)];case 1:return l=c.sent(),t.name&&(a.show="".concat(o.get("Switch Subtitle"),": ").concat(t.name)),[2,l]}})})()}},{key:"createTrack",value:function(e,t){var r=this,n=this.art,o=n.template,a=n.proxy,i=n.option,s=o.$video,l=o.$track,c=(0,h.createElement)("track");c.default=!0,c.kind=e,c.src=t,c.label=i.subtitle.name||"Artplayer",c.track.mode="hidden",c.onload=function(){r.art.emit("subtitleLoad",r.cues,r.option)},this.art.events.remove(this.destroyEvent),l.onload=null,(0,h.remove)(l),(0,h.append)(s,c),o.$track=c,this.destroyEvent=a(this.textTrack,"cuechange",function(){return r.update()})}},{key:"init",value:function(e){var t=this;return(0,a._)(function(){var r,n,o;return(0,d._)(this,function(a){return(n=(r=t.art).notice,o=r.template.$subtitle,t.textTrack)?((0,y.default)(e,b.default.subtitle),e.url)?(t.option=e,t.style(e.style),[2,fetch(e.url).then(function(e){return e.arrayBuffer()}).then(function(t){var r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,h.getExt)(e.url)){case"srt":var n=(0,h.srtToVtt)(r),o=e.onVttLoad(n);return(0,h.vttToBlob)(o);case"ass":var a=(0,h.assToVtt)(r),i=e.onVttLoad(a);return(0,h.vttToBlob)(i);case"vtt":var s=e.onVttLoad(r);return(0,h.vttToBlob)(s);default:return e.url}}).then(function(e){return o.innerHTML="",t.url===e||(URL.revokeObjectURL(t.url),t.createTrack("metadata",e)),e}).catch(function(e){throw o.innerHTML="",n.show=e,e})]):[2]:[2,null]})})()}}]),t}(v.default)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_call_super":"jZCCG","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_type_of":"felZi","@swc/helpers/_/_ts_generator":"6Xyd0","./utils":"7MU7R","./utils/component":"2dsXg","option-validator":"8OeHO","./scheme":"39ygm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"47RGg":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return M});var a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("./clickInit"),l=o.interopDefault(s),c=e("./hoverInit"),u=o.interopDefault(c),p=e("./moveInit"),f=o.interopDefault(p),d=e("./resizeInit"),h=o.interopDefault(d),m=e("./gestureInit"),v=o.interopDefault(m),g=e("./viewInit"),y=o.interopDefault(g),_=e("./documentInit"),b=o.interopDefault(_),w=e("./updateInit"),x=o.interopDefault(w),j=e("./restoreInit"),k=o.interopDefault(j),M=function(){"use strict";function e(t){(0,a._)(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,l.default)(t,this),(0,u.default)(t,this),(0,f.default)(t,this),(0,h.default)(t,this),(0,v.default)(t,this),(0,y.default)(t,this),(0,b.default)(t,this),(0,x.default)(t,this),(0,k.default)(t,this)}return(0,i._)(e,[{key:"proxy",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Array.isArray(t))return t.map(function(t){return n.proxy(e,t,r,o)});e.addEventListener(t,r,o);var a=function(){return e.removeEventListener(t,r,o)};return this.destroyEvents.push(a),a}},{key:"hover",value:function(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}},{key:"remove",value:function(e){var t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}},{key:"destroy",value:function(){for(var e=0;eMath.abs(a)&&2>Math.abs(o))return i;var s=180*Math.atan2(o,a)/Math.PI;return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(i=3),i}(c,u,o,i),d=[3,4].includes(f),h=[1,2].includes(f);if(d&&!e.isRotate||h&&e.isRotate){var m=(0,a.clamp)((o-c)/e.width,-1,1),v=(0,a.clamp)((i-u)/e.height,-1,1),g=e.isRotate?v:m,y=s===n?e.constructor.TOUCH_MOVE_RATIO:1,_=(0,a.clamp)(p+e.duration*g*y,0,e.duration);e.seek=_,e.emit("setBar","played",(0,a.clamp)(_/e.duration,0,1),t),e.notice.show="".concat((0,a.secondToTime)(_)," / ").concat((0,a.secondToTime)(e.duration))}}};e.option.gesture&&(t.proxy(n,"touchstart",function(e){s=n,f(e)}),t.proxy(n,"touchmove",d)),t.proxy(o,"touchstart",function(e){s=o,f(e)}),t.proxy(o,"touchmove",d),t.proxy(document,"touchend",function(){l&&(c=0,u=0,p=0,l=!1,s=null)})}}},{"../utils":"7MU7R","../control/progress":"fVfii","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jT4ny:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e,t){var r=e.option,n=e.constructor,o=e.template.$container,i=(0,a.throttle)(function(){e.emit("view",(0,a.isInViewport)(o,n.SCROLL_GAP))},n.SCROLL_TIME);t.proxy(window,"scroll",function(){return i()}),e.on("view",function(t){r.autoMini&&(e.mini=!t)})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],qu07O:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){t.proxy(document,"mousemove",function(t){e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",function(t){e.emit("document:mouseup",t)})}o.defineInteropFlag(r),o.export(r,"default",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9LDSG":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){if(e.constructor.USE_RAF){var t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",function(){cancelAnimationFrame(t)})}}o.defineInteropFlag(r),o.export(r,"default",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1G60N":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){}o.defineInteropFlag(r),o.export(r,"default",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gszG1:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return l});var a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("./utils"),l=function(){"use strict";function e(t){(0,a._)(this,e),this.art=t,this.keys={},t.option.hotkey&&!s.isMobile&&this.init()}return(0,i._)(e,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor;this.add("Escape",function(){e.art.fullscreenWeb&&(e.art.fullscreenWeb=!1)}),this.add("Space",function(){e.art.toggle()}),this.add("ArrowLeft",function(){e.art.backward=n.SEEK_STEP}),this.add("ArrowUp",function(){e.art.volume+=n.VOLUME_STEP}),this.add("ArrowRight",function(){e.art.forward=n.SEEK_STEP}),this.add("ArrowDown",function(){e.art.volume-=n.VOLUME_STEP}),r(document,"keydown",function(t){if(e.art.isFocus){var r=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==n&&"true"!==n&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){var o=e.keys[t.code];if(o){t.preventDefault();for(var a=0;a'},{}],ggvk3:[function(e,t,r,n){t.exports=''},{}],"60rtF":[function(e,t,r,n){t.exports=''},{}],"037y5":[function(e,t,r,n){t.exports=''},{}],i01AK:[function(e,t,r,n){t.exports=''},{}],bJChL:[function(e,t,r,n){t.exports=''},{}],bT9yN:[function(e,t,r,n){t.exports=''},{}],iYuuV:[function(e,t,r,n){t.exports=''},{}],"32gKF":[function(e,t,r,n){t.exports=''},{}],b9RG2:[function(e,t,r,n){t.exports=''},{}],fh6Ah:[function(e,t,r,n){t.exports=''},{}],"8KYz9":[function(e,t,r,n){t.exports=''},{}],"1bagN":[function(e,t,r,n){t.exports=''},{}],fRhwm:[function(e,t,r,n){t.exports=''},{}],"4tFZV":[function(e,t,r,n){t.exports=''},{}],a8x3K:[function(e,t,r,n){t.exports=''},{}],e0utR:[function(e,t,r,n){t.exports=''},{}],"69Sc6":[function(e,t,r,n){t.exports=''},{}],"72xuc":[function(e,t,r,n){t.exports=''},{}],"85cgQ":[function(e,t,r,n){t.exports=''},{}],"1Qm4Q":[function(e,t,r,n){t.exports=''},{}],fpGzT:[function(e,t,r,n){t.exports=''},{}],jlMSj:[function(e,t,r,n){t.exports=''},{}],"7sEdH":[function(e,t,r,n){t.exports=''},{}],eHsVM:[function(e,t,r,n){t.exports=''},{}],"2f6qz":[function(e,t,r,n){t.exports=''},{}],cy2gj:[function(e,t,r,n){t.exports=''},{}],hGnnd:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return j});var a=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_call_super"),s=e("@swc/helpers/_/_class_call_check"),l=e("@swc/helpers/_/_create_class"),c=e("@swc/helpers/_/_inherits"),u=e("@swc/helpers/_/_to_consumable_array"),p=e("@swc/helpers/_/_ts_generator"),f=e("./flip"),d=o.interopDefault(f),h=e("./aspectRatio"),m=o.interopDefault(h),v=e("./playbackRate"),g=o.interopDefault(v),y=e("./subtitleOffset"),_=o.interopDefault(y),b=e("../utils/component"),w=o.interopDefault(b),x=e("../utils"),j=function(e){"use strict";function t(e){(0,s._)(this,t);var r=(0,i._)(this,t,[e]),n=e.option,o=e.controls,a=e.template.$setting;return r.name="setting",r.$parent=a,r.id=0,r.active=null,r.cache=new Map,r.option=(0,u._)(r.builtin).concat((0,u._)(n.settings)),n.setting&&(r.format(),r.render(),e.on("blur",function(){r.show&&(r.show=!1,r.render())}),e.on("focus",function(e){var t=(0,x.includeFromEvent)(e,o.setting),n=(0,x.includeFromEvent)(e,r.$parent);!r.show||t||n||(r.show=!1,r.render())}),e.on("resize",function(){return r.resize()})),r}return(0,c._)(t,e),(0,l._)(t,[{key:"builtin",get:function(){var e=[],t=this.art.option;return t.playbackRate&&e.push((0,g.default)(this.art)),t.aspectRatio&&e.push((0,m.default)(this.art)),t.flip&&e.push((0,d.default)(this.art)),t.subtitleOffset&&e.push((0,_.default)(this.art)),e}},{key:"traverse",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option,r=0;r0&&void 0!==arguments[0]?arguments[0]:this.option,r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=0;a0&&void 0!==arguments[0]?arguments[0]:"",t=null;return this.traverse(function(r){r.name===e&&(t=r)}),t}},{key:"resize",value:function(){var e=this.art,t=e.controls,r=e.constructor,n=r.SETTING_WIDTH,o=r.SETTING_ITEM_HEIGHT,a=e.template,i=a.$player,s=a.$setting;if(t.setting&&this.show){var l,c,u=(null==(c=this.active[0])||null==(l=c.$parent)?void 0:l.width)||n,p=(0,x.getRect)(t.setting),f=p.left,d=p.width,h=(0,x.getRect)(i),m=h.left,v=h.width,g=f-m+d/2-u/2,y=this.active===this.option?this.active.length*o:(this.active.length+1)*o;if((0,x.setStyle)(s,"height","".concat(y,"px")),(0,x.setStyle)(s,"width","".concat(u,"px")),this.art.isRotate||x.isMobile)return;g+u>v?((0,x.setStyle)(s,"left",null),(0,x.setStyle)(s,"right",null)):((0,x.setStyle)(s,"left","".concat(g,"px")),(0,x.setStyle)(s,"right","auto"))}}},{key:"inactivate",value:function(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:this.option;return t.push(e),this.format(),this.creatItem(e),this.render(),e}},{key:"creatHeader",value:function(e){var t=this;if(this.cache.has(e.$option)){var r=this.cache.get(e.$option),n=this.art,o=n.proxy,a=n.icons.arrowLeft,i=n.constructor.SETTING_ITEM_HEIGHT,s=(0,x.createElement)("div");(0,x.setStyle)(s,"height","".concat(i,"px")),(0,x.addClass)(s,"art-setting-item"),(0,x.addClass)(s,"art-setting-item-back");var l=(0,x.append)(s,'
'),c=(0,x.createElement)("div");(0,x.addClass)(c,"art-setting-item-left-icon"),(0,x.append)(c,a),(0,x.append)(l,c),(0,x.append)(l,e.$parent.html);var u=o(s,"click",function(){return t.render(e.$parents)});e.$parent.$events.push(u),(0,x.append)(r,s)}}},{key:"creatItem",value:function(e){var t,r,n=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.cache.has(e.$option)){var i=this.cache.get(e.$option),s=e.$item,l="selector";(0,x.has)(e,"switch")&&(l="switch"),(0,x.has)(e,"range")&&(l="range"),(0,x.has)(e,"onClick")&&(l="button");var c=this.art,f=c.icons,d=c.proxy,h=c.constructor,m=(0,x.createElement)("div");(0,x.addClass)(m,"art-setting-item"),(0,x.setStyle)(m,"height","".concat(h.SETTING_ITEM_HEIGHT,"px")),m.dataset.name=e.name||"",m.dataset.value=e.value||"";var v=(0,x.append)(m,'
'),g=(0,x.append)(m,'
'),y=(0,x.createElement)("div");switch((0,x.addClass)(y,"art-setting-item-left-icon"),l){case"button":case"switch":case"range":(0,x.append)(y,e.icon||f.config);break;case"selector":(null==(t=e.selector)?void 0:t.length)?(0,x.append)(y,e.icon||f.config):(0,x.append)(y,f.check)}(0,x.append)(v,y),(0,x.def)(e,"$icon",{configurable:!0,get:function(){return y}}),(0,x.def)(e,"icon",{configurable:!0,get:function(){return y.innerHTML},set:function(e){y.innerHTML="",(0,x.append)(y,e)}});var _=(0,x.createElement)("div");(0,x.addClass)(_,"art-setting-item-left-text"),(0,x.append)(_,e.html||""),(0,x.append)(v,_),(0,x.def)(e,"$html",{configurable:!0,get:function(){return _}}),(0,x.def)(e,"html",{configurable:!0,get:function(){return _.innerHTML},set:function(e){_.innerHTML="",(0,x.append)(_,e)}});var b=(0,x.createElement)("div");switch((0,x.addClass)(b,"art-setting-item-right-tooltip"),(0,x.append)(b,e.tooltip||""),(0,x.append)(g,b),(0,x.def)(e,"$tooltip",{configurable:!0,get:function(){return b}}),(0,x.def)(e,"tooltip",{configurable:!0,get:function(){return b.innerHTML},set:function(e){b.innerHTML="",(0,x.append)(b,e)}}),l){case"switch":var w=(0,x.createElement)("div");(0,x.addClass)(w,"art-setting-item-right-icon");var j=(0,x.append)(w,f.switchOn),k=(0,x.append)(w,f.switchOff);(0,x.setStyle)(e.switch?k:j,"display","none"),(0,x.append)(g,w),(0,x.def)(e,"$switch",{configurable:!0,get:function(){return w}});var M=e.switch;(0,x.def)(e,"switch",{configurable:!0,get:function(){return M},set:function(e){M=e,e?((0,x.setStyle)(k,"display","none"),(0,x.setStyle)(j,"display",null)):((0,x.setStyle)(k,"display",null),(0,x.setStyle)(j,"display","none"))}});break;case"range":var I=(0,x.createElement)("div");(0,x.addClass)(I,"art-setting-item-right-icon");var S=(0,x.append)(I,'');S.value=e.range[0],S.min=e.range[1],S.max=e.range[2],S.step=e.range[3],(0,x.addClass)(S,"art-setting-range"),(0,x.append)(g,I),(0,x.def)(e,"$range",{configurable:!0,get:function(){return S}});var D=(0,u._)(e.range);(0,x.def)(e,"range",{configurable:!0,get:function(){return D},set:function(e){D=(0,u._)(e),S.value=e[0],S.min=e[1],S.max=e[2],S.step=e[3]}});break;case"selector":if(null==(r=e.selector)?void 0:r.length){var T=(0,x.createElement)("div");(0,x.addClass)(T,"art-setting-item-right-icon"),(0,x.append)(T,f.arrowRight),(0,x.append)(g,T)}}switch(l){case"switch":if(e.onSwitch){var E,F=this,R=d(m,"click",(E=(0,a._)(function(t){return(0,p._)(this,function(r){switch(r.label){case 0:return[4,e.onSwitch.call(F.art,e,m,t)];case 1:return e.switch=r.sent(),[2]}})}),function(e){return E.apply(this,arguments)}));e.$events.push(R)}break;case"range":if(e.$range){if(e.onRange){var O,C=this,W=d(e.$range,"change",(O=(0,a._)(function(t){return(0,p._)(this,function(r){switch(r.label){case 0:return e.range[0]=e.$range.valueAsNumber,[4,e.onRange.call(C.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return O.apply(this,arguments)}));e.$events.push(W)}if(e.onChange){var A,P=this,$=d(e.$range,"input",(A=(0,a._)(function(t){return(0,p._)(this,function(r){switch(r.label){case 0:return e.range[0]=e.$range.valueAsNumber,[4,e.onChange.call(P.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return A.apply(this,arguments)}));e.$events.push($)}}break;case"selector":var L,z=this,H=d(m,"click",(L=(0,a._)(function(t){var r,n;return(0,p._)(this,function(o){switch(o.label){case 0:if(!(null==(r=e.selector)?void 0:r.length))return[3,1];return z.render(e.selector),[3,3];case 1:if(z.check(e),!e.$parent.onSelect)return[3,3];return n=e.$parent,[4,e.$parent.onSelect.call(z.art,e,m,t)];case 2:n.tooltip=o.sent(),o.label=3;case 3:return[2]}})}),function(e){return L.apply(this,arguments)}));e.$events.push(H),e.default&&(0,x.addClass)(m,"art-current");break;case"button":if(e.onClick){var N,U=this,V=d(m,"click",(N=(0,a._)(function(t){return(0,p._)(this,function(r){switch(r.label){case 0:return[4,e.onClick.call(U.art,e,m,t)];case 1:return e.tooltip=r.sent(),[2]}})}),function(e){return N.apply(this,arguments)}));e.$events.push(V)}}(0,x.def)(e,"$item",{configurable:!0,get:function(){return m}}),o?(0,x.replaceElement)(m,s):(0,x.append)(i,m),e.mounted&&setTimeout(function(){return e.mounted.call(n.art,e.$item,e)},0)}}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.option;if(this.active=e,this.cache.has(e)){var t=this.cache.get(e);(0,x.inverseClass)(t,"art-current")}else{var r,n=(0,x.createElement)("div");this.cache.set(e,n),(0,x.addClass)(n,"art-setting-panel"),(0,x.append)(this.$parent,n),(0,x.inverseClass)(n,"art-current"),(null==(r=e[0])?void 0:r.$parent)&&this.creatHeader(e[0]);for(var o=0;oa&&cu)&&setTimeout(function(){(0,s.setStyle)(o,"width","".concat(u,"px")),(0,s.setStyle)(o,"height","".concat(c,"px")),(0,s.setStyle)(o,"transform-origin","0 0"),(0,s.setStyle)(o,"transform","rotate(90deg) translate(0, -".concat(c,"px)")),(0,s.addClass)(o,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},r.AUTO_ORIENTATION_TIME)}else(0,s.hasClass)(o,"art-auto-orientation")&&((0,s.removeClass)(o,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",(t=(0,a._)(function(e){var t,r,n,a,c,u,p,f,d;return(0,i._)(this,function(i){switch(i.label){case 0:if(!(null==(r=screen)||null==(t=r.orientation)?void 0:t.lock))return[2];if(n=screen.orientation.type,!e)return[3,3];if(a=l.videoWidth,c=l.videoHeight,p=(u=document.documentElement).clientWidth,f=u.clientHeight,!(a>c&&pf))return[3,2];return d=n.startsWith("portrait")?"landscape":"portrait",[4,screen.orientation.lock(d)];case 1:i.sent(),(0,s.addClass)(o,"art-auto-orientation-fullscreen"),i.label=2;case 2:return[3,5];case 3:if(!(0,s.hasClass)(o,"art-auto-orientation-fullscreen"))return[3,5];return[4,screen.orientation.lock(n)];case 4:i.sent(),(0,s.removeClass)(o,"art-auto-orientation-fullscreen"),i.label=5;case 5:return[2]}})}),function(e){return t.apply(this,arguments)})),{name:"autoOrientation",get state(){return(0,s.hasClass)(o,"art-auto-orientation")}}}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bfOeF:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.i18n,r=e.icons,n=e.storage,o=e.constructor,i=e.proxy,s=e.template.$poster,l=e.layers.add({name:"auto-playback",html:'\n
\n
\n
\n '}),c=(0,a.query)(".art-auto-playback-last",l),u=(0,a.query)(".art-auto-playback-jump",l),p=(0,a.query)(".art-auto-playback-close",l);(0,a.append)(p,r.close);var f=null;function d(){var r=(n.get("times")||{})[e.option.id||e.option.url];clearTimeout(f),(0,a.setStyle)(l,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&((0,a.setStyle)(l,"display","flex"),c.innerText="".concat(t.get("Last Seen")," ").concat((0,a.secondToTime)(r)),u.innerText=t.get("Jump Play"),i(p,"click",function(){(0,a.setStyle)(l,"display","none")}),i(u,"click",function(){e.seek=r,e.play(),(0,a.setStyle)(s,"display","none"),(0,a.setStyle)(l,"display","none")}),e.once("video:timeupdate",function(){f=setTimeout(function(){(0,a.setStyle)(l,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",function(){if(e.playing){var t=n.get("times")||{},r=Object.keys(t);r.length>o.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,n.set("times",t)}}),e.on("ready",d),e.on("restart",d),{name:"auto-playback",get times(){return n.get("times")||{}},clear:function(){return n.del("times")},delete:function(e){var t=n.get("times")||{};return delete t[e],n.set("times",t),t}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],giGC3:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.constructor,r=e.proxy,n=e.template,o=n.$player,i=n.$video,s=null,l=!1,c=1,u=function(){clearTimeout(s),l&&(l=!1,e.playbackRate=c,(0,a.removeClass)(o,"art-fast-forward"))};return r(i,"touchstart",function(r){1===r.touches.length&&e.playing&&!e.isLock&&(s=setTimeout(function(){l=!0,c=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,a.addClass)(o,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",u),r(document,"touchend",u),{name:"fastForward",get state(){return(0,a.hasClass)(o,"art-fast-forward")}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],e0Ov6:[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",function(){return i});var a=e("../utils");function i(e){var t=e.layers,r=e.icons,n=e.template.$player;function o(){return(0,a.hasClass)(n,"art-lock")}function i(){(0,a.addClass)(n,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,a.removeClass)(n,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted:function(t){var n=(0,a.append)(t,r.lock),o=(0,a.append)(t,r.unlock);(0,a.setStyle)(n,"display","none"),e.on("lock",function(e){e?((0,a.setStyle)(n,"display","inline-flex"),(0,a.setStyle)(o,"display","none")):((0,a.setStyle)(n,"display","none"),(0,a.setStyle)(o,"display","inline-flex"))})},click:function(){o()?s():i()}}),{name:"lock",get state(){return o()},set state(value){value?i():s()}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["4Be4O"],"4Be4O","parcelRequire4dc0",{}); \ No newline at end of file diff --git a/packages/artplayer/dist/i18n/ar.js b/packages/artplayer/dist/i18n/ar.js index d257d30f5..df699e26a 100644 --- a/packages/artplayer/dist/i18n/ar.js +++ b/packages/artplayer/dist/i18n/ar.js @@ -1 +1 @@ -!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var a=0;a 0) { + console.log(`Retrying... (${MAX_RETRIES - retries + 1}/${MAX_RETRIES})`); + await new Promise((resolve) => setTimeout(resolve, RETRY_DELAY)); + return fetchWithRetry(url, options, retries - 1); + } + throw error; + } +} + const translateContent = async (content, targetLanguage) => { try { const TRANSLATE_URL = process.env.TRANSLATE_URL; - const response = await axios.post( - TRANSLATE_URL, - { + if (!TRANSLATE_URL) { + throw new Error('TRANSLATE_URL is not defined in environment variables'); + } + + const response = await fetchWithRetry(TRANSLATE_URL, { + method: 'POST', + body: JSON.stringify({ content: `The following text is written in VitePress's extended Markdown syntax, Please translate it into ${targetLanguage}, and keep the Markdown format and don't add your explanation:\n\n${content}`, - }, - { - headers: { - 'Content-Type': 'application/json', - }, - timeout: 60000, - }, - ); - return response.data.data; + }), + }); + + return response.data; } catch (error) { - console.error(error.message); - return content; + console.error(`Translation failed: ${error.message}`); + return content; // 返回原文作为回退 } }; -const translateMarkdownFiles = async (filePaths, targetLanguage, maxCharsPerRequest) => { - let totalParts = 0; - let translatedPartsCount = 0; - - for (const filePath of filePaths) { - const content = fs.readFileSync(filePath, 'utf-8'); - const parts = splitMarkdown(content, maxCharsPerRequest); - totalParts += parts.length; +class ProgressTracker { + constructor(totalParts) { + this.totalParts = totalParts; + this.translatedPartsCount = 0; } - console.log(`开始翻译 ${filePaths.length} 个文件,总共 ${totalParts} 部分。`); + update() { + this.translatedPartsCount++; + const progressPercentage = ((this.translatedPartsCount / this.totalParts) * 100).toFixed(2); + console.log(`Overall progress: ${progressPercentage}% (${this.translatedPartsCount}/${this.totalParts})`); + } +} + +const translateMarkdownFiles = async (filePaths, targetLanguage, maxCharsPerRequest) => { + // 先计算总共有多少部分需要翻译 + let totalParts = 0; + for (const filePath of filePaths) { + const content = fs.readFileSync(filePath, 'utf-8'); + totalParts += splitMarkdown(content, maxCharsPerRequest).length; + } + + console.log(`Starting translation of ${filePaths.length} files, total ${totalParts} parts.`); + const progressTracker = new ProgressTracker(totalParts); for (const filePath of filePaths) { - console.log(`翻译开始: ${filePath}`); + console.log(`Translating: ${path.relative(EN_PATH, filePath)}`); const content = fs.readFileSync(filePath, 'utf-8'); const parts = splitMarkdown(content, maxCharsPerRequest); @@ -90,28 +133,33 @@ const translateMarkdownFiles = async (filePaths, targetLanguage, maxCharsPerRequ for (const part of parts) { const translatedPart = await translateContent(part, targetLanguage); translatedParts.push(translatedPart); - translatedPartsCount++; - const progressPercentage = ((translatedPartsCount / totalParts) * 100).toFixed(2); - console.log(`总体翻译进度: ${progressPercentage}%`); + progressTracker.update(); } const translatedContent = translatedParts.join('\n'); fs.writeFileSync(filePath, translatedContent); - console.log(`翻译结束: ${filePath}`); } }; +async function setupDirectoryStructure() { + // 清理并创建目录结构 + removeDir(EN_PATH); + await cpy(path.resolve(BASE_PATH, 'index.md'), path.resolve(EN_PATH)); + + // 并行复制所有目录 + await Promise.all( + COPY_DIRS.map((dir) => cpy(path.resolve(BASE_PATH, dir), path.resolve(EN_PATH, dir), { flat: true })), + ); +} + (async () => { - const basePath = 'packages/artplayer-vitepress/docs'; - const enPath = 'packages/artplayer-vitepress/docs/en'; - removeDir(enPath); - cpy(path.resolve(basePath, 'index.md'), path.resolve(enPath)); - const dirs = ['advanced', 'component', 'library', 'plugin', 'start']; - for (let index = 0; index < dirs.length; index++) { - const dir = dirs[index]; - await cpy(path.resolve(basePath, dir), path.resolve(enPath, dir), { flat: true }); + try { + await setupDirectoryStructure(); + const mdsPaths = glob.sync(path.resolve(EN_PATH, '**/*.md')); + await translateMarkdownFiles(mdsPaths, 'English', MAX_CHARS_PER_REQUEST); + console.log('Translation completed successfully!'); + } catch (error) { + console.error('Translation failed:', error); + process.exit(1); } - const mdsPaths = glob.sync(path.resolve(enPath, '**/*.md')); - const maxCharsPerRequest = 512; - await translateMarkdownFiles(mdsPaths, 'English', maxCharsPerRequest); })();