box-content-preview 3.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +397 -0
- package/README.md +435 -0
- package/dist/lib/237.js +34 -0
- package/dist/lib/274.js +103 -0
- package/dist/lib/2a7d8bfaf2d43f53bd71.mjs +21 -0
- package/dist/lib/3683cfffdcbd73685ff2.svg +8 -0
- package/dist/lib/42e4e1954f25f8c7b965.svg +6 -0
- package/dist/lib/492.js +34 -0
- package/dist/lib/59fe962b3e6bd8bfdda7.svg +3 -0
- package/dist/lib/5ea0869845becef03a06.svg +4 -0
- package/dist/lib/671.js +34 -0
- package/dist/lib/76692c54994797ddfb04.svg +3 -0
- package/dist/lib/815.js +34 -0
- package/dist/lib/8475f8e672ed83e24520.svg +6 -0
- package/dist/lib/88.css +23 -0
- package/dist/lib/9fb032a1799ca2a1c751.svg +3 -0
- package/dist/lib/assets/loading_ghost.gif +0 -0
- package/dist/lib/bb72d81b39be40898db2.svg +3 -0
- package/dist/lib/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/78-H.bcmap +0 -0
- package/dist/lib/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/78-V.bcmap +0 -0
- package/dist/lib/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Add-H.bcmap +0 -0
- package/dist/lib/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Add-V.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/lib/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/lib/cmaps/B5-H.bcmap +0 -0
- package/dist/lib/cmaps/B5-V.bcmap +0 -0
- package/dist/lib/cmaps/B5pc-H.bcmap +0 -0
- package/dist/lib/cmaps/B5pc-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS1-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS1-V.bcmap +0 -0
- package/dist/lib/cmaps/CNS2-H.bcmap +0 -0
- package/dist/lib/cmaps/CNS2-V.bcmap +3 -0
- package/dist/lib/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/lib/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/Ext-H.bcmap +0 -0
- package/dist/lib/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Ext-V.bcmap +0 -0
- package/dist/lib/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GB-H.bcmap +4 -0
- package/dist/lib/cmaps/GB-V.bcmap +0 -0
- package/dist/lib/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/lib/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/lib/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBT-H.bcmap +0 -0
- package/dist/lib/cmaps/GBT-V.bcmap +0 -0
- package/dist/lib/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/H.bcmap +0 -0
- package/dist/lib/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/lib/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/lib/cmaps/Hankaku.bcmap +0 -0
- package/dist/lib/cmaps/Hiragana.bcmap +0 -0
- package/dist/lib/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/lib/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/lib/cmaps/KSC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/lib/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/lib/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/lib/cmaps/Katakana.bcmap +0 -0
- package/dist/lib/cmaps/LICENSE +36 -0
- package/dist/lib/cmaps/NWP-H.bcmap +0 -0
- package/dist/lib/cmaps/NWP-V.bcmap +0 -0
- package/dist/lib/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/lib/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/lib/cmaps/Roman.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/lib/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/lib/cmaps/V.bcmap +0 -0
- package/dist/lib/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/lib/exif/exif-reader.min.js +8 -0
- package/dist/lib/exif/exif.js +822 -0
- package/dist/lib/exif/exif.min.js +21 -0
- package/dist/lib/fde82a50e6de20239861.svg +5 -0
- package/dist/lib/ff2dfa442d903d9d5e30.gif +0 -0
- package/dist/lib/index.css +84 -0
- package/dist/lib/index.d.ts +147 -0
- package/dist/lib/index.js +41639 -0
- package/dist/lib/pdfjs-lib.js +46 -0
- package/dist/lib/pdfjs-viewer-css.js +36 -0
- package/dist/lib/pdfjs-viewer.js +8118 -0
- package/dist/lib/third-party/media/0.127.0/shaka-player.compiled.js +371 -0
- package/dist/lib/third-party/media/1.30.0/shaka-player.compiled.js +438 -0
- package/dist/lib/third-party/media/1.33.0/shaka-player.compiled.js +438 -0
- package/dist/lib/third-party/media/1.8.0/shaka-player.compiled.js +376 -0
- package/dist/lib/third-party/media/2.14.0/shaka-player.compiled.js +609 -0
- package/dist/lib/third-party/media/2.66.0/manifest.json +8 -0
- package/dist/lib/third-party/media/2.66.0/shaka-player.compiled.js +752 -0
- package/dist/lib/third-party/media/2.93.0/manifest.json +8 -0
- package/dist/lib/third-party/media/2.93.0/shaka-player.compiled.js +975 -0
- package/dist/lib/third-party/media/3.25.0/manifest.json +8 -0
- package/dist/lib/third-party/media/3.25.0/shaka-player.compiled.js +1780 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/entities.json +322 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/entities.json +1811 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.10.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.10.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.10.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.10.1/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.10.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/entities.json +322 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/entities.json +1811 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.12.0/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.12.0/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.12.0/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.12.0/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.12.0/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/entities.json +439 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/entities.json +1869 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.6.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.6.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.6.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.6.1/three.min.js +43300 -0
- package/dist/lib/third-party/model3d/1.6.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/VRConfig.js +49 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/entities.json +439 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/entities.json +755 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/entities.json +746 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/entities.json +1869 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/geometry.bin +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/1.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/1.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/2.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/3.jpg +0 -0
- package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/4.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/box3d-player.json +1 -0
- package/dist/lib/third-party/model3d/1.9.1/box3d-runtime.min.js +2 -0
- package/dist/lib/third-party/model3d/1.9.1/boxsdk.min.js +2 -0
- package/dist/lib/third-party/model3d/1.9.1/matcap.png +0 -0
- package/dist/lib/third-party/model3d/1.9.1/three.min.js +882 -0
- package/dist/lib/third-party/model3d/1.9.1/webvr-polyfill.js +6341 -0
- package/dist/lib/third-party/swf/0.112.0/swfobject.js +6 -0
- package/dist/lib/third-party/text/0.112.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/0.112.0/github.css +123 -0
- package/dist/lib/third-party/text/0.112.0/highlight.min.js +3 -0
- package/dist/lib/third-party/text/0.112.0/papaparse.js +1457 -0
- package/dist/lib/third-party/text/0.112.0/papaparse.min.js +34 -0
- package/dist/lib/third-party/text/0.112.0/remarkable.min.js +4 -0
- package/dist/lib/third-party/text/0.114.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/0.114.0/github-markdown.min.css +1 -0
- package/dist/lib/third-party/text/0.114.0/github.css +123 -0
- package/dist/lib/third-party/text/0.114.0/github.min.css +1 -0
- package/dist/lib/third-party/text/0.114.0/highlight.min.js +3 -0
- package/dist/lib/third-party/text/0.114.0/manifest.json +10 -0
- package/dist/lib/third-party/text/0.114.0/papaparse.js +1457 -0
- package/dist/lib/third-party/text/0.114.0/papaparse.min.js +34 -0
- package/dist/lib/third-party/text/0.114.0/remarkable.min.js +4 -0
- package/dist/lib/third-party/text/2.65.0/github-markdown.css +681 -0
- package/dist/lib/third-party/text/2.65.0/github-markdown.min.css +1 -0
- package/dist/lib/third-party/text/2.65.0/github.css +99 -0
- package/dist/lib/third-party/text/2.65.0/github.min.css +1 -0
- package/dist/lib/third-party/text/2.65.0/highlight.min.js +2 -0
- package/dist/lib/third-party/text/2.65.0/manifest.json +10 -0
- package/dist/lib/third-party/text/2.65.0/papaparse.js +1897 -0
- package/dist/lib/third-party/text/2.65.0/papaparse.min.js +7 -0
- package/dist/lib/third-party/text/2.65.0/remarkable.min.js +1 -0
- package/package.json +198 -0
|
@@ -0,0 +1,1780 @@
|
|
|
1
|
+
/*
|
|
2
|
+
@license
|
|
3
|
+
Shaka Player
|
|
4
|
+
Copyright 2016 Google LLC
|
|
5
|
+
SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*
|
|
8
|
+
|
|
9
|
+
Copyright The Closure Library Authors.
|
|
10
|
+
SPDX-License-Identifier: Apache-2.0
|
|
11
|
+
*/
|
|
12
|
+
var p,aa=typeof Object.create=="function"?Object.create:function(a){function b(){}b.prototype=a;return new b},ba=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
13
|
+
function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function ea(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ba(c,a,{configurable:!0,writable:!0,value:b})}}var fa;
|
|
14
|
+
if(typeof Object.setPrototypeOf=="function")fa=Object.setPrototypeOf;else{var ha;a:{var ja={a:!0},ka={};try{ka.__proto__=ja;ha=ka.a;break a}catch(a){}ha=!1}fa=ha?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var la=fa;
|
|
15
|
+
function na(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(la)la(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Gm=b.prototype}function oa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}
|
|
16
|
+
function t(a){var b=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:oa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function F(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}function pa(a){if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");}
|
|
17
|
+
function va(){this.J=!1;this.H=null;this.i=void 0;this.h=1;this.G=this.I=0;this.M=this.C=null}function wa(a){if(a.J)throw new TypeError("Generator is already running");a.J=!0}va.prototype.K=function(a){this.i=a};function za(a,b){a.C={Zh:b,oi:!0};a.h=a.I||a.G}va.prototype.getNextAddressJsc=function(){return this.h};va.prototype.getYieldResultJsc=function(){return this.i};va.prototype.return=function(a){this.C={return:a};this.h=this.G};va.prototype["return"]=va.prototype.return;
|
|
18
|
+
va.prototype.O=function(a){this.C={A:a};this.h=this.G};va.prototype.jumpThroughFinallyBlocks=va.prototype.O;va.prototype.g=function(a,b){this.h=b;return{value:a}};va.prototype.yield=va.prototype.g;va.prototype.R=function(a,b){a=t(a);var c=a.next();pa(c);if(c.done)this.i=c.value,this.h=b;else return this.H=a,this.g(c.value,b)};va.prototype.yieldAll=va.prototype.R;va.prototype.A=function(a){this.h=a};va.prototype.jumpTo=va.prototype.A;va.prototype.j=function(){this.h=0};va.prototype.jumpToEnd=va.prototype.j;
|
|
19
|
+
va.prototype.m=function(a,b){this.I=a;b!=void 0&&(this.G=b)};va.prototype.setCatchFinallyBlocks=va.prototype.m;va.prototype.D=function(a){this.I=0;this.G=a||0};va.prototype.setFinallyBlock=va.prototype.D;va.prototype.o=function(a,b){this.h=a;this.I=b||0};va.prototype.leaveTryBlock=va.prototype.o;va.prototype.l=function(a){this.I=a||0;a=this.C.Zh;this.C=null;return a};va.prototype.enterCatchBlock=va.prototype.l;
|
|
20
|
+
va.prototype.u=function(a,b,c){c?this.M[c]=this.C:this.M=[this.C];this.I=a||0;this.G=b||0};va.prototype.enterFinallyBlock=va.prototype.u;va.prototype.B=function(a,b){b=this.M.splice(b||0)[0];(b=this.C=this.C||b)?b.oi?this.h=this.I||this.G:b.A!=void 0&&this.G<b.A?(this.h=b.A,this.C=null):this.h=this.G:this.h=a};va.prototype.leaveFinallyBlock=va.prototype.B;va.prototype.N=function(a){return new Ba(a)};va.prototype.forIn=va.prototype.N;
|
|
21
|
+
function Ba(a){this.i=a;this.g=[];for(var b in a)this.g.push(b);this.g.reverse()}Ba.prototype.h=function(){for(;this.g.length>0;){var a=this.g.pop();if(a in this.i)return a}return null};Ba.prototype.getNext=Ba.prototype.h;function Ca(a){this.g=new va;this.h=a}function Da(a,b){wa(a.g);var c=a.g.H;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ga(a)}
|
|
22
|
+
function Fa(a,b,c,d){try{var e=b.call(a.g.H,c);pa(e);if(!e.done)return a.g.J=!1,e;var f=e.value}catch(g){return a.g.H=null,za(a.g,g),Ga(a)}a.g.H=null;d.call(a.g,f);return Ga(a)}function Ga(a){for(;a.g.h;)try{var b=a.h(a.g);if(b)return a.g.J=!1,{value:b.value,done:!1}}catch(c){a.g.i=void 0,za(a.g,c)}a.g.J=!1;if(a.g.C){b=a.g.C;a.g.C=null;if(b.oi)throw b.Zh;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
23
|
+
function Ha(a){this.next=function(b){wa(a.g);a.g.H?b=Fa(a,a.g.H.next,b,a.g.K):(a.g.K(b),b=Ga(a));return b};this.throw=function(b){wa(a.g);a.g.H?b=Fa(a,a.g.H["throw"],b,a.g.K):(za(a.g,b),b=Ga(a));return b};this.return=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
24
|
+
function G(a){return Ia(new Ha(new Ca(a)))}function Ja(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(Math.random()*1E9>>>0)+"_",e=0;return b});
|
|
25
|
+
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return Ka(oa(this))}});return a});function Ka(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
26
|
+
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(this.g==null){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
27
|
+
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.l)}};b.prototype.G=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=g!=null;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
|
|
28
|
+
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}typeof h=="function"?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(this.h!=0)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;this.h===2&&this.H();this.B()};b.prototype.H=function(){var g=this;e(function(){if(g.C()){var h=da.console;typeof h!=="undefined"&&h.error(g.i)}},1)};b.prototype.C=
|
|
29
|
+
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if(typeof k==="undefined")return!0;typeof g==="function"?g=new g("unhandledrejection",{cancelable:!0}):typeof h==="function"?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.B=function(){if(this.g!=null){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
30
|
+
b.prototype.I=function(g){var h=this.j();g.Se(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,r){return typeof q=="function"?function(u){try{l(q(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.Se(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Se=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
31
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;this.g==null?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Se(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){q[u]=v;r--;r==0&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).Se(n(q.length-1),m),k=h.next();
|
|
32
|
+
while(!k.done)})};return b});function La(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
33
|
+
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return l==="object"&&k!==null||l==="function"}function e(k){if(!La(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
34
|
+
m=new a([[k,2],[l,3]]);if(m.get(k)!=2||m.get(l)!=3)return!1;m.delete(k);m.set(l,4);return!m.has(k)&&m.get(l)==4}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!La(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&La(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&La(k,
|
|
35
|
+
g)&&La(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&La(k,g)&&La(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
36
|
+
ea("Map",function(a){function b(){var h={};return h.yc=h.next=h.head=h}function c(h,k){var l=h[1];return Ka(function(){if(l){for(;l.head!=h[1];)l=l.yc;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;l=="object"||l=="function"?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&La(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
|
|
37
|
+
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if(k.get(h)!="s"||k.size!=1||k.get({x:4})||k.set({x:4},"t")!=k||k.size!=2)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||m.value[1]!="s")return!1;m=l.next();return m.done||m.value[0].x!=
|
|
38
|
+
4||m.value[1]!="t"||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=h===0?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],yc:this[1].yc,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].yc.next=l.entry,this[1].yc=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.yc.next=
|
|
39
|
+
h.entry.next,h.entry.next.yc=h.entry.yc,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].yc=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
|
|
40
|
+
function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
41
|
+
ea("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||typeof a!="function"||!a.prototype.entries||typeof Object.seal!="function")return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||d.size!=1||d.add(c)!=d||d.size!=1||d.add({x:4})!=d||d.size!=2)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||f.value[0].x!=
|
|
42
|
+
4||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=c===0?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
|
43
|
+
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ma(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ki:e,v:f}}return{ki:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ma(this,b,c).ki}});
|
|
44
|
+
function Na(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.values",function(a){return a?a:function(){return Na(this,function(b,c){return c})}});
|
|
45
|
+
ea("Array.from",function(a){return a?a:function(b,c,d){c=c!=null?c:function(h){return h};var e=[],f=typeof Symbol!="undefined"&&Symbol.iterator&&b[Symbol.iterator];if(typeof f=="function"){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ea("Array.prototype.keys",function(a){return a?a:function(){return Na(this,function(b){return b})}});
|
|
46
|
+
function Oa(a,b,c){if(a==null)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Oa(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
|
|
47
|
+
ea("Object.is",function(a){return a?a:function(b,c){return b===c?b!==0||1/b===1/c:b!==b&&c!==c}});ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});ea("String.prototype.includes",function(a){return a?a:function(b,c){return Oa(this,b,"includes").indexOf(b,c||0)!==-1}});
|
|
48
|
+
ea("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(e<0||e>1114111||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);e<=65535?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
|
|
49
|
+
ea("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
|
|
50
|
+
ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ma(this,b,c).v}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push([d,b[d]]);return c}});var Pa=typeof Object.assign=="function"?Object.assign:function(a,b){if(a==null)throw new TypeError("No nullish arg");a=Object(a);for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)La(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Pa});
|
|
51
|
+
ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ea("Array.prototype.entries",function(a){return a?a:function(){return Na(this,function(b,c){return[b,c]})}});ea("Number.EPSILON",function(){return 2.220446049250313E-16});ea("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
|
|
52
|
+
ea("Math.clz32",function(a){return a?a:function(b){b=Number(b)>>>0;if(b===0)return 32;var c=0;(b&4294901760)===0&&(b<<=16,c+=16);(b&4278190080)===0&&(b<<=8,c+=8);(b&4026531840)===0&&(b<<=4,c+=4);(b&3221225472)===0&&(b<<=2,c+=2);(b&2147483648)===0&&c++;return c}});ea("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});
|
|
53
|
+
ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Oa(this,null,"repeat");if(b<0||b>1342177279)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Number.isFinite",function(a){return a?a:function(b){return typeof b!=="number"?!1:!isNaN(b)&&b!==Infinity&&b!==-Infinity}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push(b[d]);return c}});
|
|
54
|
+
ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ea("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Oa(this,b,"endsWith");c===void 0&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;e>0&&c>0;)if(d[--c]!=b[--e])return!1;return e<=0}});ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||b===Infinity||b===-Infinity||b===0)return b;var c=Math.floor(Math.abs(b));return b<0?-c:c}});var Qa=this||self;
|
|
55
|
+
function N(a,b){a=a.split(".");var c=Qa;a[0]in c||typeof c.execScript=="undefined"||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||b===void 0?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
|
|
56
|
+
@license
|
|
57
|
+
Shaka Player
|
|
58
|
+
Copyright 2016 Google LLC
|
|
59
|
+
SPDX-License-Identifier: Apache-2.0
|
|
60
|
+
*/
|
|
61
|
+
function Ra(a){this.i=Math.log(.5);this.g=Math.exp(this.i/a);this.j=this.h=0}Ra.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.j+=a)};function Sa(a){return a.h/(1-Math.pow(a.g,a.j))};function Ta(){this.h=new Ra(2);this.j=new Ra(5);this.g=0;this.i=128E3;this.l=16E3}Ta.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;var b=this.h;b.g=Math.exp(b.i/a.fastHalfLife);b=this.j;b.g=Math.exp(b.i/a.slowHalfLife)};Ta.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Ta.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Sa(this.h),Sa(this.j))};function Ua(){}function Va(){}function Wa(){}function Xa(a){var b=Ja.apply(1,arguments);Ya.has(a)||(Ya.add(a),Wa.apply(Ua,F(b)))}function Za(){}function $a(){}function ab(){}var Ya=new Set;
|
|
62
|
+
window.console&&((new Map).set(1,function(){return console.error.apply(console,F(Ja.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,F(Ja.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,F(Ja.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,F(Ja.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,F(Ja.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,F(Ja.apply(0,arguments)))}),
|
|
63
|
+
Wa=function(){return console.warn.apply(console,F(Ja.apply(0,arguments)))},Va=function(){console.error.apply(console,F(Ja.apply(0,arguments)))});function bb(a,b){return typeof a==="number"&&typeof b==="number"&&isNaN(a)&&isNaN(b)?!0:a===b}function cb(a,b){b=a.indexOf(b);b>-1&&a.splice(b,1)}function db(a,b,c){c||(c=bb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={ri:void 0},d=a.next()){e.ri=d.value;d=b.findIndex(function(f){return function(g){return c(f.ri,g)}}(e));if(d==-1)return!1;b[d]=b[b.length-1];b.pop()}return b.length==0}
|
|
64
|
+
function eb(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=bb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function fb(){this.g=new Map}p=fb.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function gb(){this.g=new fb}p=gb.prototype;p.release=function(){this.Qa();this.g=null};p.F=function(a,b,c,d){this.g&&(a=new hb(a,b,c,d),this.g.push(b,a))};p.Aa=function(a,b,c,d){function e(g){f.Ma(a,b,e);c(g)}var f=this;this.F(a,b,e,d)};p.Ma=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ma(),this.g.remove(b,e))}};
|
|
65
|
+
p.Qa=function(){if(this.g){for(var a=[],b=t(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,F(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.Ma();this.g.g.clear()}};N("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Qa;gb.prototype.unlisten=gb.prototype.Ma;gb.prototype.listenOnce=gb.prototype.Aa;gb.prototype.listen=gb.prototype.F;gb.prototype.release=gb.prototype.release;
|
|
66
|
+
function hb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ib(a,d);this.target.addEventListener(b,c,this.g)}hb.prototype.Ma=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ib(a,b){if(b==void 0)return!1;if(typeof b=="boolean")return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return jb(a)?b:b.capture||!1}
|
|
67
|
+
function jb(a){var b=kb;if(b==void 0){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}kb=b}return b||!1}var kb=void 0;N("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function mb(a){this.h=a;this.g=void 0}mb.prototype.value=function(){this.g===void 0&&(this.g=this.h());return this.g};/*
|
|
68
|
+
@license
|
|
69
|
+
Shaka Player
|
|
70
|
+
Copyright 2025 Google LLC
|
|
71
|
+
SPDX-License-Identifier: Apache-2.0
|
|
72
|
+
*/
|
|
73
|
+
function nb(){return ob.value()}var rb=null,sb=null,ob=new mb(function(){var a=void 0;rb&&(a=rb());!a&&sb&&(a=sb());return a});function tb(a,b){this.g=a;this.h=b}tb.prototype.toString=function(){return"v"+this.g+"."+this.h};function ub(a,b){var c=new tb(5,0),d=vb,e=d.g,f=c.h-e.h;((c.g-e.g||f)>0?d.i:d.h)(d.g,c,a,b)}function wb(a,b,c,d){Wa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function xb(a,b,c,d){Va([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var vb=null;/*
|
|
74
|
+
@license
|
|
75
|
+
Copyright 2008 The Closure Library Authors
|
|
76
|
+
SPDX-License-Identifier: Apache-2.0
|
|
77
|
+
*/
|
|
78
|
+
var yb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
|
79
|
+
@license
|
|
80
|
+
Copyright 2006 The Closure Library Authors
|
|
81
|
+
SPDX-License-Identifier: Apache-2.0
|
|
82
|
+
*/
|
|
83
|
+
function zb(a){var b;a instanceof zb?(Ab(this,a.jc),this.fd=a.fd,Bb(this,a.Fb),Cb(this,a.Dd),this.Sb=a.Sb,Db(this,a.g.clone()),this.Rc=a.Rc):a&&(b=String(a).match(yb))?(Ab(this,b[1]||"",!0),this.fd=Eb(b[2]||""),Bb(this,b[3]||"",!0),Cb(this,b[4]),this.Sb=Eb(b[5]||"",!0),Db(this,b[6]||"",!0),this.Rc=Eb(b[7]||"")):this.g=new Fb(null)}p=zb.prototype;p.jc="";p.fd="";p.Fb="";p.Dd=null;p.Sb="";p.Rc="";
|
|
84
|
+
p.toString=function(){var a=[],b=this.jc;b&&a.push(Gb(b,Hb,!0),":");if(b=this.Fb){a.push("//");var c=this.fd;c&&a.push(Gb(c,Hb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Dd;b!=null&&a.push(":",String(b))}if(b=this.Sb)this.Fb&&b.charAt(0)!="/"&&a.push("/"),a.push(Gb(b,b.charAt(0)=="/"?Ib:Jb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Rc)&&a.push("#",Gb(b,Kb));return a.join("")};
|
|
85
|
+
p.resolve=function(a){var b=this.clone();b.jc==="data"&&(b=new zb);var c=!!a.jc;c?Ab(b,a.jc):c=!!a.fd;c?b.fd=a.fd:c=!!a.Fb;c?Bb(b,a.Fb):c=a.Dd!=null;var d=a.Sb;if(c)Cb(b,a.Dd);else if(c=!!a.Sb){if(d.charAt(0)!="/")if(this.Fb&&!this.Sb)d="/"+d;else{var e=b.Sb.lastIndexOf("/");e!=-1&&(d=b.Sb.substr(0,e+1)+d)}if(d==".."||d==".")d="";else if(d.indexOf("./")!=-1||d.indexOf("/.")!=-1){e=d.lastIndexOf("/",0)==0;d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];h=="."?e&&g==d.length&&f.push(""):h==
|
|
86
|
+
".."?((f.length>1||f.length==1&&f[0]!="")&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Sb=d:c=a.g.toString()!=="";c?Db(b,a.g.clone()):c=!!a.Rc;c&&(b.Rc=a.Rc);return b};p.clone=function(){return new zb(this)};function Ab(a,b,c){a.jc=c?Eb(b,!0):b;a.jc&&(a.jc=a.jc.replace(/:$/,""))}function Bb(a,b,c){a.Fb=c?Eb(b,!0):b}function Cb(a,b){if(b){b=Number(b);if(isNaN(b)||b<0)throw Error("Bad port number "+b);a.Dd=b}else a.Dd=null}
|
|
87
|
+
function Db(a,b,c){b instanceof Fb?a.g=b:(c||(b=Gb(b,Lb)),a.g=new Fb(b))}function Eb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Gb(a,b,c){return a!=null?(a=encodeURI(a).replace(b,Mb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Mb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Hb=/[#\/\?@]/g,Jb=/[#\?:]/g,Ib=/[#\?]/g,Lb=/[#\?@]/g,Kb=/#/g;function Fb(a){this.g=a||null}
|
|
88
|
+
function Nb(a){if(!a.fb&&(a.fb=new Map,a.Vd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(d>=0){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f);e=e||"";a.add(f,decodeURIComponent(e))}}p=Fb.prototype;p.fb=null;p.Vd=null;p.add=function(a,b){Nb(this);this.g=null;var c=this.fb.has(a)?this.fb.get(a):null;c||this.fb.set(a,c=[]);c.push(b);this.Vd++;return this};
|
|
89
|
+
p.set=function(a,b){Nb(this);this.g=null;this.fb.has(a)?this.fb.set(a,[b]):this.add(a,b);return this};p.get=function(a){Nb(this);return this.fb.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.fb||!this.fb.size)return"";for(var a=[],b=t(this.fb.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.fb.get(d);for(var e=0;e<d.length;e++){var f=c;d[e]!==""&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
|
|
90
|
+
p.clone=function(){var a=new Fb;a.g=this.g;if(this.fb){for(var b=new Map,c=t(this.fb),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.fb=b;a.Vd=this.Vd}return a};function Ob(){}function Pb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Qb(a);b=Qb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Sb(a){return ArrayBuffer.isView(a)?a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
|
|
91
|
+
function Qb(a,b,c){c=c===void 0?Infinity:c;return Ub(a,b===void 0?0:b,c,Uint8Array)}function Vb(a,b,c){c=c===void 0?Infinity:c;return Ub(a,b===void 0?0:b,c,Uint16Array)}function Wb(a,b,c){c=c===void 0?Infinity:c;return Ub(a,b===void 0?0:b,c,DataView)}
|
|
92
|
+
function Ub(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}N("shaka.util.BufferUtils",Ob);Ob.toDataView=Wb;Ob.toUint16=Vb;Ob.toUint8=Qb;Ob.toArrayBuffer=Sb;Ob.equal=Pb;function Xb(a,b){if(a===b||!a.length||!b.length)return!0;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(Yb(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||Yb(e))return!0}return!1}
|
|
93
|
+
function Zb(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(F(d.keyIds),F(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
94
|
+
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}else Yb(d)?c.push(d):Yb(f)&&c.push(f)}return c}
|
|
95
|
+
function bc(a){return a==="org.w3.clearkey"}function cc(a){return a?!!a.match(/^com\.widevine\.alpha/):!1}function dc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function ec(a){return a?!!a.match(/^com\.apple\.fps/):!1}function Yb(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}function fc(a,b,c,d){d=[].concat(F(new Set(d))).sort().join("#");return a+"#"+b+"#"+c+"#"+d}var hc=new mb(function(){return Sb(new Uint8Array([0]))}),ic=new Map;function S(a,b,c){var d=Ja.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(jc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}S.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",S);var jc=!0;S.Severity={RECOVERABLE:1,CRITICAL:2};S.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
96
|
+
S.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
97
|
+
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,
|
|
98
|
+
WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
|
|
99
|
+
DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
|
|
100
|
+
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,
|
|
101
|
+
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
|
|
102
|
+
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,
|
|
103
|
+
PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,
|
|
104
|
+
KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function kc(){}
|
|
105
|
+
function mc(a){if(!a)return"";a=Qb(a);a[0]==239&&a[1]==187&&a[2]==191&&(a=a.subarray(3));if(window.TextDecoder&&!nb().sh())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Va('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;(a[c]&128)==0?d=a[c]:a.length>=c+2&&(a[c]&224)==192&&(a[c+1]&192)==128?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&(a[c]&240)==224&&(a[c+1]&192)==128&&
|
|
106
|
+
(a[c+2]&192)==128?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&(a[c]&241)==240&&(a[c+1]&192)==128&&(a[c+2]&192)==128&&(a[c+3]&192)==128&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(d<=65535)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
107
|
+
function oc(a,b,c){if(!a)return"";if(!c&&a.byteLength%2!=0)throw new S(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Wb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(e*2,b);return pc.value()(d)}
|
|
108
|
+
function qc(a){function b(d){return c.byteLength<=d||c[d]>=9&&c[d]<=126}if(!a)return"";var c=Qb(a);if(c[0]==239&&c[1]==187&&c[2]==191)return mc(c);if(c[0]==254&&c[1]==255)return oc(c.subarray(2),!1);if(c[0]==255&&c[1]==254)return oc(c.subarray(2),!0);if(c[0]==0&&c[2]==0)return oc(a,!1);if(c[1]==0&&c[3]==0)return oc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return mc(a);throw new S(2,2,2003);}
|
|
109
|
+
function rc(a){if(window.TextEncoder&&!nb().sh()){var b=new TextEncoder;return Sb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Sb(b)}function sc(a,b){for(var c=new ArrayBuffer(a.length*2),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(e*2,a.charCodeAt(e),b);return c}
|
|
110
|
+
function tc(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return e[1]=="#"?(e=e[2]=="x"||e[2]=="X"?parseInt(e.substring(3),16):parseInt(e.substring(2),10),e>=0&&e<=1114111?String.fromCodePoint(e):""):b[e]||"'"}):a||""}N("shaka.util.StringUtils",kc);kc.resetFromCharCode=function(){pc.g=void 0};
|
|
111
|
+
kc.toUTF16=sc;kc.toUTF8=rc;kc.fromBytesAutoDetect=qc;kc.fromUTF16=oc;kc.fromUTF8=mc;var pc=new mb(function(){function a(c){try{var d=new Uint8Array(c);return String.fromCharCode.apply(null,d).length>0}catch(e){return!1}}for(var b={Pc:65536};b.Pc>0;b={Pc:b.Pc},b.Pc/=2)if(a(b.Pc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Pc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Pc));return e}}(b);return null});function uc(){}function vc(a){a=Qb(a);return Uint8Array.prototype.toBase64?a.toBase64({alphabet:"base64",omitPadding:!1}):(a=pc.value()(a),btoa(a))}function wc(a,b){b=b==void 0?!0:b;return Uint8Array.prototype.toBase64?Qb(a).toBase64({alphabet:"base64url",omitPadding:!b}):(a=vc(a).replace(/\+/g,"-").replace(/\//g,"_"),b?a:a.replace(/[=]*$/,""))}
|
|
112
|
+
function xc(a){if(!("fromBase64"in Uint8Array)){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}a=a.replace(/\s+/g,"");return Uint8Array.fromBase64(a,{alphabet:/[-_]/.test(a)?"base64url":"base64"})}function yc(a){if(!("fromHex"in Uint8Array)){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(d*2,2),16);return c}return Uint8Array.fromHex(a)}
|
|
113
|
+
function zc(a){var b=Qb(a);if(!Uint8Array.prototype.toHex){a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),c.length==1&&(c="0"+c),a+=c;return a}return b.toHex()}function Ac(){for(var a=Ja.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1?b.set(e,c):b.set(Qb(e),c);c+=e.byteLength}return b}N("shaka.util.Uint8ArrayUtils",uc);uc.concat=Ac;uc.toHex=zc;
|
|
114
|
+
uc.fromHex=yc;uc.fromBase64=xc;uc.toBase64=wc;uc.toStandardBase64=vc;function Bc(a,b,c){c=c===void 0?"":c;if(b.length==0)return a;if(a.length==1&&b.length==1){var d=new zb(a[0]);b=new zb(b[0]);b=d.resolve(b);c&&Db(b,c);return[b.toString()]}b=b.map(function(h){return new zb(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new zb(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&Db(g,c),d.push(g.toString())}return d}
|
|
115
|
+
function Cc(a,b,c,d,e){b={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set,mediaTypes:e};d&&(b.keySystemUris=new Set([d]));!c&&ec(a)&&b.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null});return b}
|
|
116
|
+
function Dc(a,b){b=b===void 0?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;k.length!=22&&(k=wc(yc(h),!1));var l=g;l.length!=22&&(l=wc(yc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Qb(rc(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
117
|
+
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Ec(a,b){if(b.length==1)return b[0];a=Fc(a,b);if(a!=null)return a;throw new S(2,4,4025,b);}function Fc(a,b){var c=Gc.get(a);c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Hc?"":null}
|
|
118
|
+
function Ic(a,b){var c=[];a=Gc.get(a);a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
|
|
119
|
+
var Hc="text",Jc={wa:"video",aa:"audio",Na:Hc,Vf:"image",ql:"application"},Kc=1/15,Gc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Lc(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.o=d;this.j=!1;a:{typeof libDPIModule==="undefined"&&Wa("Could not find LCEVC Library dependencies on this page");if(typeof LCEVCdec!=="undefined")this.h=LCEVCdec;else if(typeof LcevcDil!=="undefined")this.h=LcevcDil,this.j=!0,ub("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Wa("Could not find LCEVC Library on this page");a=!1;break a}typeof this.h.SupportObject==="undefined"?(Wa("Could not find LCEVC Library on this page"),
|
|
120
|
+
a=!1):(this.h.SupportObject.SupportStatus||Wa(this.h.SupportObject.SupportError),a=typeof this.h!=="undefined"&&typeof libDPIModule!=="undefined"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
|
|
121
|
+
function Mc(a,b,c,d){d.type!=="video"||a.o&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.o)}function Nc(a){a.g&&a.i.classList.add("shaka-hidden")}Lc.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Oc(a){return a&&typeof LCEVCdec!=="undefined"?a.codecs=="lvc1":!1}N("shaka.lcevc.Dec",Lc);Lc.prototype.release=Lc.prototype.release;function Pc(){}function Qc(a,b){Rc.set(a,b)}function Sc(){var a={};nb();if(Tc())for(var b=t(Rc.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=Tc()?Rc.has(c):Uc().canPlayType(c)!="";return a}function Vc(a,b){if(b){var c=Rc.get(b.toLowerCase());if(c)return c}throw new S(2,4,4E3,a,b);}N("shaka.media.ManifestParser",Pc);
|
|
122
|
+
Pc.unregisterParserByMime=function(a){Rc.delete(a)};Pc.registerParserByMime=Qc;Pc.registerParserByExtension=function(){ub("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Pc.AccessibilityPurpose={Am:"visually impaired",Ll:"hard of hearing",hm:"spoken subtitles"};var Rc=new Map;function Wc(){}Wc.prototype.extract=function(){};Wc.prototype.decode=function(){return[]};Wc.prototype.clear=function(){};Wc.prototype.getStreams=function(){return[]};function Xc(){}Xc.prototype.init=function(){};Xc.prototype.parse=function(){return[]};function Yc(a){this.h=new Map;this.i=0;this.j=new Xc;if(a=Zc(a.toLowerCase()))this.j=a();this.g=new Wc;if(a=ad)this.g=a(),this.h.set(this.i,this.g)}Yc.prototype.init=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?-1:c;if(c!=-1&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=ad)this.g=d();this.h.set(b,this.g)}}else b||this.g.clear();this.j.init(a);c!=-1&&(this.i=c)};
|
|
123
|
+
function bd(a,b){b=a.j.parse(b);b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=Qb(c.packet);d.length>0&&a.g.extract(d,c.pts)}return a.g.decode()}Yc.prototype.remove=function(a){a=a===void 0?[]:a;a=new Set(a);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.h.get(c);d&&d.clear();this.h.delete(c)}};function cd(a,b){dd.set(a,b)}function Zc(a){return dd.get(a)}N("shaka.media.ClosedCaptionParser",Yc);Yc.findDecoder=function(){return ad};
|
|
124
|
+
Yc.unregisterDecoder=function(){ad=null};Yc.registerDecoder=function(a){ad=a};Yc.findParser=Zc;Yc.unregisterParser=function(a){dd.delete(a)};Yc.registerParser=cd;var dd=new Map,ad=null;function ed(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=fd;this.scroll=gd}N("shaka.text.CueRegion",ed);var fd=1;ed.units={PX:0,PERCENTAGE:fd,LINES:2};var gd="";ed.scrollMode={NONE:gd,UP:"up"};function hd(a){this.h=a||"";this.g=0}function id(a){md(a,/[ \t]+/gm)}function md(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=b==null?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||b==null||b.position!=a.g)return null;a.g+=b.length;return b.results}function od(a){return a.g==a.h.length?null:(a=md(a,/[^ \t\n]*/gm))?a[0]:null}
|
|
125
|
+
function pd(a){a=md(a,qd);if(a==null)return null;var b=Number(a[2]),c=Number(a[3]);return b>59||c>59?null:(Number(a[6])||0)/1E3+c+b*60+(Number(a[1])||0)*3600}function rd(a){return a?pd(new hd(a)):null}var qd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function sd(){}function td(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=Array.isArray(d);if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function ud(a){var b={},c;for(c in a)b[c]=a[c];return b}
|
|
126
|
+
function vd(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];e!==void 0&&(e=vd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if(typeof a=="function")a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],e!==void 0&&(e=vd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}N("shaka.util.ObjectUtils",sd);sd.alphabeticalKeyOrderStringify=vd;
|
|
127
|
+
sd.shallowCloneObject=ud;sd.cloneObject=td;/*
|
|
128
|
+
@license
|
|
129
|
+
tXml
|
|
130
|
+
Copyright 2015 Tobias Nickel
|
|
131
|
+
SPDX-License-Identifier: MIT
|
|
132
|
+
*/
|
|
133
|
+
function wd(a,b){var c=c===void 0?!1:c;a=qc(a);return xd(a,b,c)}function xd(a,b,c){a=yd(a,c===void 0?!1:c);if(!b&&a.length)return a[0];var d=b.split(",");return(b=a.find(function(e){return d.includes(e.tagName)}))?b:null}function zd(a){return Ad.has(a)?Ad.get(a):""}
|
|
134
|
+
function yd(a,b){function c(f,g){g=g===void 0?!1:g;for(var h=[];a[e];)if(a.charCodeAt(e)==60){if(a.charCodeAt(e+1)===47){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(k==-1){var l=f.indexOf(".");l>0&&(k=g.indexOf(f.substring(0,l)))}if(k==-1)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(a.charCodeAt(e+1)===33){if(a.charCodeAt(e+2)==45){for(;e!==-1&&(a.charCodeAt(e)!==
|
|
135
|
+
62||a.charCodeAt(e-1)!=45||a.charCodeAt(e-2)!=45||e==-1);)e=a.indexOf(">",e+1);e===-1&&(e=a.length)}else if(a.charCodeAt(e+2)===91&&a.charCodeAt(e+8)===91&&a.substr(e+3,5).toLowerCase()==="cdata"){k=a.indexOf("]]\x3e",e);k==-1?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];a.charCodeAt(e)!==62&&a[e];){var q=a.charCodeAt(e);if(q>64&&q<91||q>96&&q<123){q=d();for(var r=a.charCodeAt(e);r&&r!==39&&r!==34&&!(r>64&&r<91||r>96&&
|
|
136
|
+
r<123)&&r!==62;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=(" "+a.slice(u,e)).slice(1);if(r===39||r===34){if(e===-1){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)typeof k[m]!=="string"&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(q.startsWith("xmlns:")){r=u;var v=q.split(":")[1];Ad.set(r,v);Bd.set(v,r)}m==="tt"&&q==="xml:space"&&u==="preserve"&&(l=!0);n[q]=u}e++}a.charCodeAt(e-1)!==47?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};
|
|
137
|
+
m=k.length;for(n=0;n<m;n++)q=k[n],typeof q!=="string"?b&&(q.parent=l):n==m-1&&q=="\n"&&k.pop();k=l}h.push(k);if(typeof k==="string")break;k.tagName[0]==="?"&&k.children&&(h.push.apply(h,F(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,e===-2&&(e=a.length),k=(" "+a.slice(k,e+1)).slice(1),g?k.length>0&&h.push(k):h.length&&k.length==1&&k[0]=="\n"?h.push(k):k.trim().length>0&&h.push(k),e++;return h}function d(){for(var f=e;"\r\n\t>/= ".indexOf(a[e])===-1&&a[e];)e++;return(" "+a.slice(f,e)).slice(1)}
|
|
138
|
+
var e=0;return c("")}function Cd(a){return typeof a==="string"}function Dd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c!=="string"&&b.push(c);return b}function Ed(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}
|
|
139
|
+
function Fd(a){if(typeof a==="string")return tc(a);var b=[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"&&b.push(c);b=b.join("");return b===""?null:tc(b)}function Gd(a){for(var b=t(a.children),c=b.next();!c.done;c=b.next())if(typeof c.value!=="string")return null;(a=Fd(a))&&(a=a.trim());return a}function Hd(a,b,c){c=c===void 0?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())Hd(d.value,b,c)}return c}
|
|
140
|
+
function Id(a,b){a=Ed(a,b);return a.length!=1?null:a[0]}function Jd(a,b,c){a=Kd(a,b,c);return a.length!=1?null:a[0]}function Md(a,b,c,d){d=d===void 0?null:d;var e=null;a=a.attributes[b];a==null||a===""&&d!==null||(e=c(a));return e==null?d:e}function Nd(a,b,c){b=zd(b);return a.attributes[b+":"+c]||null}function Kd(a,b,c){var d=zd(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}
|
|
141
|
+
function Od(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=Nd(a,d.value,c))return d;return null}function Pd(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
|
|
142
|
+
function Qd(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
143
|
+
function Rd(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Sd(a){a=Number(a);return a%1===0?a:null}function Td(a){a=Number(a);return a%1===0&&a>0?a:null}function Ud(a){a=Number(a);return a%1===0&&a>=0?a:null}function Vd(a){a=Number(a);return isNaN(a)?null:a}function Wd(a){return a?a.toLowerCase()==="true":!1}
|
|
144
|
+
function Xd(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
145
|
+
function Yd(a){var b=[];a=tc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Ec:c.split("/@")[1]||
|
|
146
|
+
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Ec=c.slice(1))}return b}
|
|
147
|
+
function Zd(a,b){var c=Yd(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;c==null&&(d.t!==null&&(c=$d(a,"t",d.t)),d.n!==null&&(c=$d(a,"n",d.n)));c===null?c=e==="prepend"?0:a.length:e==="prepend"?--c:e==="after"&&++c;e=b.tagName;(d=d.Ec)&&a[c]?ae(a[c],e,d,Gd(b)||""):(e!=="remove"&&e!=="replace"||a.splice(c,1),e!=="add"&&e!=="replace"||a.splice.apply(a,[c,0].concat(F(b.children))))}}
|
|
148
|
+
function $d(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function ae(a,b,c,d){if(b==="remove")delete a.attributes[c];else if(b==="add"||b==="replace")a.attributes[c]=d}
|
|
149
|
+
function be(a){var b="",c=a.tagName.split(":");c.length>0&&(b=c[0],b=Bd.has(b)?Bd.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,typeof d=="string"?c=new Text(d):c=be(d),b.appendChild(c);return b}
|
|
150
|
+
function ce(a){if(!a)return null;var b={tagName:a.tagName,attributes:ud(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,typeof c==="string"?b.children.push(c):(c=ce(c),c.parent=b,b.children.push(c));return b}var Ad=new Map,Bd=new Map;function de(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new ed;this.position=null;this.positionAlign=ee;this.size=0;this.textAlign=fe;this.direction=ge;this.writingMode=he;this.lineInterpretation=ie;this.line=null;this.lineHeight="";this.lineAlign=je;this.displayAlign=ke;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=le;this.fontStyle=me;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
151
|
+
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={columns:32,rows:15}}function pe(a,b){a=new de(a,b,"");a.lineBreak=!0;return a}de.prototype.clone=function(){var a=new de(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
|
|
152
|
+
function qe(a,b){if(a.payload!=b.payload||!(Math.abs(a.startTime-b.startTime)<.001&&Math.abs(a.endTime-b.endTime)<.001))return!1;for(var c in a)if(c!="startTime"&&c!="endTime"&&c!="payload")if(c=="nestedCues"){if(!eb(a.nestedCues,b.nestedCues,qe))return!1}else if(c=="region"||c=="cellResolution")for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!eb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
|
|
153
|
+
function re(a,b){b=b===void 0?new Map:b;var c=a.payload;if(c.includes("<")){b.size===0&&se(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)d[f]==="<"?e=f+1:d[f]===">"&&e>0&&(e=d.substr(e,f-e),e.match(te)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if(f[h]==="/"){var k=f.indexOf(">",h);if(k===-1){c=f;break a}if((k=f.substring(h+1,k))&&k=="v"){d=!0;var l=null;e.length&&
|
|
154
|
+
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else f[h]==="<"?(g=h+1,f[g]!="v"&&(g=-1)):f[h]===">"&&g>0&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=ue(c);a.payload="";d="<span>"+c.replace(/\n/g,"<br />")+"</span>";try{var m=xd(d,"span")}catch(n){}if(m)if(m=
|
|
155
|
+
m.children,m.length!=1||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())ve(c.value,a,b);else a.payload=tc(c);else a.payload=tc(c)}else a.payload=tc(c)}function se(a){for(var b=t(Object.entries(we)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new de(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(xe));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new de(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
156
|
+
function ue(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
|
|
157
|
+
function ve(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new ed;d.position=null;d.size=0;d.textAlign=fe;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=ye(g.backgroundColor,h.backgroundColor),h.color=ye(g.color,h.color),h.fontFamily=ye(g.fontFamily,h.fontFamily),
|
|
158
|
+
h.fontSize=ye(g.fontSize,h.fontSize),h.textShadow=ye(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=pe(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=ze;break;case "i":d.fontStyle=Ae;break;case "u":d.textDecoration.push(Be);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
|
|
159
|
+
if(f=rd(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Cd(a)||e.length==1&&Cd(e[0]))for(c=Fd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=pe(d.startTime,d.endTime),b.nestedCues.push(a)),e.length>0&&(a=d.clone(),a.payload=tc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())ve(a.value,d,c)}function ye(a,b){return a&&a.length>0?a:b}N("shaka.text.Cue",de);de.parseCuePayload=re;de.equal=qe;
|
|
160
|
+
de.prototype.clone=de.prototype.clone;var ee="auto";de.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ee};var fe="center",Ce={LEFT:"left",RIGHT:"right",CENTER:fe,START:"start",END:"end"};de.textAlign=Ce;var ke="after",De={BEFORE:"before",CENTER:"center",AFTER:ke};de.displayAlign=De;var ge="ltr";de.direction={HORIZONTAL_LEFT_TO_RIGHT:ge,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var he="horizontal-tb";de.writingMode={HORIZONTAL_TOP_TO_BOTTOM:he,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
|
|
161
|
+
var ie=0;de.lineInterpretation={LINE_NUMBER:ie,PERCENTAGE:1};var je="start",Ee={CENTER:"center",START:je,END:"end"};de.lineAlign=Ee;var we={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};de.defaultTextColor=we;var xe={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};de.defaultTextBackgroundColor=xe;var le=400,ze=700;de.fontWeight={NORMAL:le,BOLD:ze};
|
|
162
|
+
var me="normal",Ae="italic",Fe={NORMAL:me,ITALIC:Ae,OBLIQUE:"oblique"};de.fontStyle=Fe;var Be="underline";de.textDecoration={UNDERLINE:Be,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var te=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Ge(){}Ge.prototype.destroy=function(){};function He(a,b,c){Ie.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,yf:b})}function Je(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([Ke,Le,Me,Ne]),e=d.next();!e.done;e=d.next())if(e=Ie.get(c+"-"+e.value)){var f=e.yf(),g=f.isSupported(a,b);f.destroy();if(g)return e.yf}return null}N("shaka.transmuxer.TransmuxerEngine",Ge);Ge.findTransmuxer=Je;Ge.unregisterTransmuxer=function(a,b){Ie.delete(a.toLowerCase().split(";")[0]+"-"+b)};
|
|
163
|
+
Ge.registerTransmuxer=He;Ge.prototype.destroy=Ge.prototype.destroy;var Ie=new Map,Ne=1,Me=2,Le=3,Ke=4;Ge.PluginPriority={FALLBACK:Ne,PREFERRED_SECONDARY:Me,PREFERRED:Le,APPLICATION:Ke};function Oe(){}function Qe(a,b){var c=a;b&&!Re.includes(a)&&(c+='; codecs="'+b+'"');return c}function Se(a,b){b&&(a+='; codecs="'+b+'"');return a}function Te(a,b,c){var d=Qe(a,b);b=Se(a,b);Je(b)?(a=Je(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c=a!="video/mp2t"&&c=="audio"?d.replace("video","audio"):d;return c}function Ue(a){return a.split(";")[0].split("/")[1]}
|
|
164
|
+
function Ve(a){var b=We(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case a==="mp4a"&&b==="69":case a==="mp4a"&&b==="6b":case a==="mp4a"&&b==="40.34":return"mp3";case a==="mp4a"&&b==="66":case a==="mp4a"&&b==="67":case a==="mp4a"&&b==="68":case a==="mp4a"&&b==="40.2":case a==="mp4a"&&b==="40.02":case a==="mp4a"&&b==="40.5":case a==="mp4a"&&b==="40.05":case a==="mp4a"&&b==="40.29":case a==="mp4a"&&b==="40.42":return"aac";case a==="mp4a"&&b==="a5":case a==="ac3":case a==="ac-3":return"ac-3";
|
|
165
|
+
case a==="mp4a"&&b==="a6":case a==="eac3":case a==="ec-3":return"ec-3";case a==="ac-4":return"ac-4";case a==="mp4a"&&b==="b2":return"dtsx";case a==="mp4a"&&b==="a9":return"dtsc";case a==="vp09":case a==="vp9":return"vp9";case a==="avc1":case a==="avc3":return"avc";case a==="hvc1":case a==="hev1":return"hevc";case a==="vvc1":case a==="vvi1":return"vvc";case a==="dvh1":case a==="dvhe":return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case a==="dvav":case a==="dva1":return"dovi-avc";case a==="dav1":return"dovi-av1";
|
|
166
|
+
case a==="dvc1":case a==="dvi1":return"dovi-vvc";case a==="lvc1":return"lcevc"}return a}function Xe(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=We(c.value),b.push(c[0]);return b.sort().join(",")}function Ye(a){return a.split(";")[0]}function Ze(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function $e(a){return a==="application/x-mpegurl"||a==="application/vnd.apple.mpegurl"}
|
|
167
|
+
function We(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}N("shaka.util.MimeUtils",Oe);Oe.getFullTypeWithAllCodecs=Se;Oe.getFullType=Qe;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Re=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function af(a){this.i=null;this.l=a;this.B=this.G=!1;this.m=this.u=0;this.o=Infinity;this.h=this.g=null;this.D="";this.C=function(){};this.j=new Map}function bf(a,b){cf.set(a,b)}function df(a){return cf.get(a)}function ef(a){return cf.has(a)?!0:a=="application/cea-608"||a=="application/cea-708"?!!ad:!1}af.prototype.destroy=function(){this.l=this.i=null;this.j.clear();return Promise.resolve()};
|
|
168
|
+
function ff(a,b,c,d,e){var f,g,h,k,l,m,n,q;return G(function(r){if(r.h==1)return r.g(Promise.resolve(),2);if(!a.i||!a.l)return r.return();if(c==null||d==null)return a.i.parseInit(Qb(b)),r.return();f=a.B?0:a.u;g=a.G||a.B?c:a.u;h={periodStart:f,segmentStart:c,segmentEnd:d,vttOffset:g};k=a.i.parseMedia(Qb(b),h,e,[]);l=t(k);for(m=l.next();!m.done;m=l.next())n=m.value,a.C(n,e||null,h);q=k.filter(function(u){return u.startTime>=a.m&&u.startTime<a.o});a.l.append(q);a.g==null&&(a.g=Math.max(c,a.m));a.h=Math.min(d,
|
|
169
|
+
a.o);r.j()})}af.prototype.remove=function(a,b,c){c=c===void 0?!1:c;var d=this;return G(function(e){if(e.h==1)return e.g(Promise.resolve(),2);if(a>=b||c&&(gf(d,a,b),d.D===""))return e.return();d.l&&d.l.remove(a,b)&&d.g!=null&&(b<=d.g||a>=d.h||(a<=d.g&&b>=d.h?d.g=d.h=null:a<=d.g&&b<d.h?d.g=b:a>d.g&&b>=d.h&&(d.h=a)),hf(d));e.j()})};function jf(a,b,c){a.m=b;a.o=c}function kf(a,b,c){a.D=b;if(b=a.j.get(b))b=b.filter(function(d){return d.endTime<=c}),b.length&&a.l.append(b)}
|
|
170
|
+
function lf(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())lf(a,d.value,c)}
|
|
171
|
+
function mf(a,b,c){var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.stream;f=f.cue;d.has(e)||d.set(e,[]);lf(a,f,c);f.startTime>=a.m&&f.startTime<a.o&&(d.get(e).push(f),e==a.D&&a.l.append([f]))}c=t(d.keys());for(b=c.next();!b.done;b=c.next())for(b=b.value,a.j.has(b)||a.j.set(b,[]),e=t(d.get(b)),f=e.next();!f.done;f=e.next())f=f.value,a.j.get(b).push(f);hf(a)}
|
|
172
|
+
function gf(a,b,c){for(var d=t(a.j.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f=a.j.get(e);f=f.filter(function(g){return g.startTime<b||g.endTime>=c});a.j.set(e,f)}}
|
|
173
|
+
function hf(a){for(var b=Infinity,c=-Infinity,d=t(a.j.values()),e=d.next();!e.done;e=d.next()){e=t(e.value);for(var f=e.next();!f.done;f=e.next())f=f.value,b=Math.min(b,f.startTime),c=Math.max(c,f.endTime)}b!==Infinity&&c!==-Infinity&&(a.g=a.g==null?Math.max(b,a.m):Math.min(a.g,Math.max(b,a.m)),a.h=Math.max(a.h,Math.min(c,a.o)))}N("shaka.text.TextEngine",af);af.prototype.destroy=af.prototype.destroy;af.findParser=df;af.unregisterParser=function(a){cf.delete(a)};af.registerParser=bf;var cf=new Map;function nf(a){this.h=a;this.g=null}nf.prototype.ka=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},a*1E3);return this};nf.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function of(a){this.h=a;this.g=null}of.prototype.Cb=function(){this.stop();this.h();return this};of.prototype.ka=function(a){var b=this;this.stop();this.g=(new nf(function(){b.h()})).ka(a);return this};of.prototype.Ea=function(a){var b=this;this.stop();this.g=(new nf(function(){b.g.ka(a);b.h()})).ka(a);return this};of.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",of);of.prototype.stop=of.prototype.stop;of.prototype.tickEvery=of.prototype.Ea;
|
|
174
|
+
of.prototype.tickAfter=of.prototype.ka;of.prototype.tickNow=of.prototype.Cb;function pf(a,b){return a.concat(b)}function qf(){}function rf(a){return a!=null}function sf(a,b){return Promise.race([b,new Promise(function(c,d){(new of(d)).ka(a)})])};function tf(){}function uf(a,b){a=vf(a);b=vf(b);return a.split("-")[0]==b.split("-")[0]}function wf(a,b){a=vf(a);b=vf(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&a.length==1&&b.length==2}function xf(a,b){a=vf(a);b=vf(b);a=a.split("-");b=b.split("-");return a.length==2&&b.length==2&&a[0]==b[0]}
|
|
175
|
+
function vf(a){a=t(a.split("-x-"));var b=a.next().value;b=b===void 0?"":b;a=a.next().value;a=a===void 0?"":a;var c=t(b.split("-"));b=c.next().value;b=b===void 0?"":b;c=c.next().value;c=c===void 0?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=yf.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function zf(a,b){a=vf(a);b=vf(b);return b==a?4:wf(b,a)?3:xf(b,a)?2:wf(a,b)?1:0}function Af(a){var b=a.indexOf("-");a=b>=0?a.substring(0,b):a;a=a.toLowerCase();return a=yf.get(a)||a}
|
|
176
|
+
function Bf(a){return a.language?vf(a.language):a.audio&&a.audio.language?vf(a.audio.language):a.video&&a.video.language?vf(a.video.language):"und"}
|
|
177
|
+
function Cf(a,b){a=vf(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(vf(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,wf(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,xf(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,wf(a,b))return b;return null}N("shaka.util.LanguageUtils",tf);tf.findClosestLocale=Cf;tf.getLocaleForVariant=Bf;
|
|
178
|
+
tf.getLocaleForText=function(a){return vf(a.language||"und")};tf.getBase=Af;tf.relatedness=zf;tf.areSiblings=function(a,b){var c=Af(a),d=Af(b);return a!=c&&b!=d&&c==d};tf.normalize=vf;tf.isSiblingOf=xf;tf.isParentOf=wf;tf.areLanguageCompatible=uf;tf.areLocaleCompatible=function(a,b){a=vf(a);b=vf(b);return a==b};
|
|
179
|
+
var yf=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
180
|
+
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
181
|
+
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
182
|
+
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
183
|
+
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
184
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Df(){}
|
|
185
|
+
function Ef(a,b,c,d,e){if(e.length){var f=a.textStreams;e=t(e);for(var g=e.next(),h={};!g.done;h={Ch:void 0},g=e.next())if(h.Ch=g.value,g=f.filter(function(u){return function(v){return v.codecs.startsWith(u.Ch)||v.mimeType.startsWith(u.Ch)?!0:!1}}(h)),g.length){f=g;break}a.textStreams=f}f=a.variants;if(b.length||c.length)f=Ff(f,b,c);if(d.length){b=new fb;f=t(f);for(c=f.next();!c.done;c=f.next())c=c.value,b.push(String(c.video.width||0),c);var k=[];b.forEach(function(u,v){u=0;var w=[];v=t(v);for(var y=
|
|
186
|
+
v.next(),x={};!y.done;x={Uf:void 0},y=v.next())x.Uf=y.value,y=d.filter(function(z){return function(C){return z.Uf.decodingInfos[0][C]}}(x)).length,y>u?(u=y,w=[x.Uf]):y==u&&w.push(x.Uf);k.push.apply(k,F(w))});f=k}b=new Set;c=t(f);for(e=c.next();!e.done;e=c.next())e=e.value,e.video&&b.add(e.video);if(b.size){var l={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};e=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth&&u.bandwidth!=
|
|
187
|
+
v.bandwidth?u.bandwidth-v.bandwidth:u.width!=v.width?u.width-v.width:u.codecs&&v.codecs?(u=Ve(u.codecs),v=Ve(v.codecs),(l[u]||1)-(l[v]||1)):0});var m=[];b=new Map;c=function(u){var v=[String(u.width||""),String(u.height||""),String(Math.round(u.frameRate||0)),u.hdr||"",u.fastSwitching];u.dependencyStream&&v.push(u.dependencyStream.baseOriginalId||"");u.roles&&v.push(u.roles.sort().join("_"));return v.join(";")};e=t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;h=c(g);var n=b.get(h)||[];if(n.length){var q=
|
|
188
|
+
Ve(n[n.length-1].codecs),r=Ve(g.codecs);q==r&&(n.push(g),m.push(g.id))}else n.push(g),m.push(g.id);b.set(h,n)}a.variants=f.filter(function(u){return(u=u.video)&&!m.includes(u.id)?!1:!0})}else a.variants=f}
|
|
189
|
+
function Ff(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={ij:void 0},d=b.next())if(e.ij=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.ij)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={Oh:void 0},b=c.next())if(d.Oh=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Oh)}}(d)),b.length){a=b;break}return a}function Gf(a,b,c){a.variants=a.variants.filter(function(d){return Hf(d,b,c)})}
|
|
190
|
+
function Hf(a,b,c){function d(g,h,k){return g>=h&&g<=k}if(a&&a.video&&a.video.width&&a.video.height){var e=a.video.width,f=a.video.height;f>e&&(f=t([f,e]),e=f.next().value,f=f.next().value);if(!d(e,b.minWidth,Math.min(b.maxWidth,c.width))||!d(f,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e*f,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,
|
|
191
|
+
b.maxChannelsCount)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function If(a,b,c,d){c=c===void 0?[]:c;d=d===void 0?{}:d;return G(function(e){if(e.h==1)return e.g(Jf(a,b,b.offlineSessionIds.length>0,c,d),2);Kf(b);return e.g(Lf(b),0)})}
|
|
192
|
+
function Jf(a,b,c,d,e){var f,g;return G(function(h){if(h.h==1)return nb().Xi()&&Mf(b.variants),h.g(Nf(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=Sf(k,f,e);if(!l){var m=[];k.audio&&m.push(Tf(k.audio));k.video&&m.push(Tf(k.video))}return l});h.j()})}
|
|
193
|
+
function Mf(a){var b=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(b);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
|
|
194
|
+
function Sf(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=nb(),e=d.Nb()==="Xbox";d=d.Oa()==="MOBILE"&&d.Ia()==="GECKO";var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(g>1920||h>1080)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!Oc(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
|
|
195
|
+
function Uf(a,b){var c,d,e,f,g,h,k;return G(function(l){if(l.h==1){c=function(m,n){if(m){var q=ud(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Re:void 0},g=f.next())k=g.value,h.Re=vd(k),h.cache=Vf,h.cache.has(h.Re)?d=c(d,h.cache.get(h.Re)):e.push(Wf(k).then(function(m){return function(n){var q=
|
|
196
|
+
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache.set(m.Re,q),d=c(d,q))}}(h)));return l.g(Promise.all(e),2)}d&&a.decodingInfos.push(d);l.j()})}
|
|
197
|
+
function Wf(a){var b=[""];a.video&&(b=Ze(a.video.contentType).split(","));var c=[""];a.audio&&(c=Ze(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={Qc:void 0},g=f.next())g=g.value,h.Qc=td(a),a.video&&(h.Qc.video.contentType=Qe(Ye(h.Qc.video.contentType),e)),a.audio&&(h.Qc.audio.contentType=Qe(Ye(h.Qc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(nb().Oa()=="MOBILE"?sf(5,navigator.mediaCapabilities.decodingInfo(k.Qc)):
|
|
198
|
+
navigator.mediaCapabilities.decodingInfo(k.Qc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
|
|
199
|
+
function Nf(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D;return G(function(A){switch(A.h){case 1:if(e=a.some(function(B){return B.decodingInfos.length}))return A.return();f=t(d);g=f.next();h={};case 2:if(g.done){A.A(4);break}h.Fi=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){A.A(7);break}n=m.value;q=ag(n,b,c).filter(function(B){return function(I){I=I[0];return(I.keySystemConfiguration&&I.keySystemConfiguration.keySystem)===B.Fi}}(h));r=t(q);u=r.next();case 8:if(u.done){A.A(10);break}v=u.value;
|
|
200
|
+
return A.g(Uf(n,v),9);case 9:u=r.next();A.A(8);break;case 10:n.decodingInfos.some(function(B){return B.supported})&&(k=!0);m=l.next();A.A(5);break;case 7:if(k)return A.return();h={Fi:void 0};g=f.next();A.A(2);break;case 4:w=t(a),y=w.next();case 12:if(y.done){A.A(0);break}x=y.value;z=ag(x,b,c).filter(function(B){B=B[0];B=B.keySystemConfiguration&&B.keySystemConfiguration.keySystem;return!B||!d.includes(B)});C=t(z);H=C.next();case 15:if(H.done){y=w.next();A.A(12);break}D=H.value;return A.g(Uf(x,D),
|
|
201
|
+
16);case 16:H=C.next(),A.A(15)}})}
|
|
202
|
+
function ag(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=Ze(k);if(l.includes(",")&&!d){var m=l.split(","),n=Ye(k);l=Ec("video",m);m=Ec("audio",m);m=bg(m,n);n=Te(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=cg(l);k={contentType:Te(Ye(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction=
|
|
203
|
+
"pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=Ye(l),l=bg(Ze(l),k),k=Te(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];f.length==0&&f.push(null);g.length==0&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=t(g),n=l.next();!n.done;n=
|
|
204
|
+
l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;n=t(n);for(m=n.next();!m.done;m=n.next()){m=
|
|
205
|
+
m.value;var q=m.videoRobustness+","+m.audioRobustness;l.get(q)||l.set(q,[]);l.get(q).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=t(h);for(var r=q.next();!r.done;r=q.next()){r=Object.assign({},r.value);for(var u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},v=t(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var y=new Set,x=t(w.initData),z=x.next();!z.done;z=x.next())y.add(z.value.initDataType);
|
|
206
|
+
u.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");w.persistentStateRequired&&(u.persistentState="required");w.sessionType&&(u.sessionTypes=[w.sessionType]);d&&(u.audio?(w.encryptionScheme&&(u.audio.encryptionScheme=u.audio.encryptionScheme||w.encryptionScheme),u.audio.robustness=u.audio.robustness||w.audioRobustness):(u.audio={robustness:w.audioRobustness},w.encryptionScheme&&(u.audio.encryptionScheme=w.encryptionScheme)),u.audio.robustness==
|
|
207
|
+
""&&delete u.audio.robustness);e&&(u.video?(w.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||w.encryptionScheme),u.video.robustness=u.video.robustness||w.videoRobustness):(u.video={robustness:w.videoRobustness},w.encryptionScheme&&(u.video.encryptionScheme=w.encryptionScheme)),u.video.robustness==""&&delete u.video.robustness)}r.keySystemConfiguration=u;m.push(r)}a.push(m)}}return a}
|
|
208
|
+
function bg(a,b){var c=nb();return a.toLowerCase()=="flac"?c.Ia()!="WEBKIT"?"flac":"fLaC":a.toLowerCase()==="opus"?c.Ia()!="WEBKIT"?"opus":Ue(b)=="mp4"?"Opus":"opus":a.toLowerCase()=="ac-3"&&c.re()?"ec-3":a}function cg(a){if(a.includes("avc1")){var b=a.split(".");if(b.length==3)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if(a=="vp9")return"vp09.00.41.08";return a}
|
|
209
|
+
function Kf(a){a.textStreams=a.textStreams.filter(function(b){b=Qe(b.mimeType,b.codecs);return ef(b)})}
|
|
210
|
+
function Lf(a){var b,c,d,e,f,g,h,k;return G(function(l){switch(l.h){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;f=="application/mp4"&&e.codecs=="mjpg"&&(f="image/jpg");if(dg.has(f)){l.A(5);break}g=eg.get(f);if(!g){dg.set(f,!1);l.A(5);break}return l.g(fg(g),7);case 7:h=l.i,dg.set(f,h);case 5:(k=dg.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,l.j()}})}
|
|
211
|
+
function fg(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(c.height===2)}})}
|
|
212
|
+
function gg(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=b?b.groupId:null,k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=t(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,videoLabel:null,
|
|
213
|
+
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:"",audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:h,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,
|
|
214
|
+
accessibilityPurpose:null,originalLanguage:null};if(c){a.videoId=c.id;a.originalVideoId=c.originalId;a.width=c.width||null;a.height=c.height||null;a.frameRate=c.frameRate||null;a.pixelAspectRatio=c.pixelAspectRatio||null;a.videoBandwidth=c.bandwidth||null;a.hdr=c.hdr||null;a.colorGamut=c.colorGamut||null;a.videoLayout=c.videoLayout||null;a.videoRoles=c.roles;a.videoLabel=c.label;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec,a.pixelAspectRatio=
|
|
215
|
+
d.pixelAspectRatio||a.pixelAspectRatio,a.videoBandwidth&&d.bandwidth&&(a.videoBandwidth+=d.bandwidth);if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;e=g.split(",");try{a.videoCodec=Ec("video",e),a.audioCodec=Ec("audio",e)}catch(r){}}}b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=
|
|
216
|
+
b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage,e=b.dependencyStream)&&(a.audioCodec=e.codecs||a.audioCodec,a.audioBandwidth&&e.bandwidth&&(a.audioBandwidth+=e.bandwidth));c&&!a.videoBandwidth&&(b?a.audioBandwidth&&(a.videoBandwidth=a.bandwidth-a.audioBandwidth):a.videoBandwidth=a.bandwidth);b&&!a.audioBandwidth&&(c?a.videoBandwidth&&(a.audioBandwidth=a.bandwidth-a.videoBandwidth):
|
|
217
|
+
a.audioBandwidth=a.bandwidth);b=[];a.videoCodec&&b.push(a.videoCodec);a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function hg(a){return{id:a.id,active:!1,type:Hc,bandwidth:a.bandwidth||0,language:a.language,label:a.label,kind:a.kind||null,mimeType:a.mimeType,codecs:a.codecs||null,primary:a.primary,roles:a.roles,accessibilityPurpose:a.accessibilityPurpose,forced:a.forced,originalTextId:a.originalId,originalLanguage:a.originalLanguage}}
|
|
218
|
+
function ig(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=jg(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&b!=null&&(b/=Number(e.split("x")[0]));e&&c!=null&&(c/=Number(e.split("x")[1]));return{id:a.id,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function kg(a){a.__shaka_id||(a.__shaka_id=lg++);return a.__shaka_id}
|
|
219
|
+
function mg(a){var b={id:kg(a),active:a.mode!="disabled",type:Hc,bandwidth:0,language:vf(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:a.kind=="forced",originalTextId:a.id,originalLanguage:a.language};a.kind=="captions"&&(b.mimeType="unknown");a.kind=="subtitles"&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
|
|
220
|
+
function ng(a,b){var c=a?a.language:null;c={id:kg(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:vf(c||"und"),label:a?a.label:null,videoLabel:null,kind:a?a.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:a?a.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,
|
|
221
|
+
channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:b?b.id:null,originalAudioId:a?a.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:c};a&&a.kind&&(c.roles=[a.kind],c.audioRoles=[a.kind]);a&&a.configuration&&(a.configuration.codec&&(c.audioCodec=a.configuration.codec,c.codecs=c.audioCodec),a.configuration.bitrate&&(c.audioBandwidth=a.configuration.bitrate,c.bandwidth+=c.audioBandwidth),
|
|
222
|
+
a.configuration.sampleRate&&(c.audioSamplingRate=a.configuration.sampleRate),a.configuration.numberOfChannels&&(c.channelsCount=a.configuration.numberOfChannels));if(b&&b.configuration&&(b.configuration.codec&&(c.videoCodec=b.configuration.codec,c.codecs=c.codecs?c.codecs+(","+c.videoCodec):c.videoCodec),b.configuration.bitrate&&(c.videoBandwidth=b.configuration.bitrate,c.bandwidth+=c.videoBandwidth),b.configuration.framerate&&(c.frameRate=b.configuration.framerate),b.configuration.width&&(c.width=
|
|
223
|
+
b.configuration.width),b.configuration.height&&(c.height=b.configuration.height),b.configuration.colorSpace&&b.configuration.colorSpace.transfer))switch(b.configuration.colorSpace.transfer){case "pq":c.hdr="PQ";break;case "hlg":c.hdr="HLG";break;case "bt709":c.hdr="SDR"}return c}function og(a){return a.allowedByApplication&&a.allowedByKeySystem&&a.disabledUntilTime==0}function pg(a){return a.filter(function(b){return og(b)})}
|
|
224
|
+
function qg(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Cf(vf(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return vf(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=rg(e,c),a.length)return a}else if(a=e.filter(function(k){return k.roles.length==0}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(pf,[]);return a.length?
|
|
225
|
+
rg(e,a[0]):e}function rg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function sg(a){var b=[];a.audio&&b.push(a.audio);a.video&&b.push(a.video);return b}
|
|
226
|
+
function tg(a,b){b.length&&(b=b.filter(function(c){return Ve(a.codecs)==Ve(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],b.length>1&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
|
|
227
|
+
function Tf(a){return a.type=="audio"?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:a.type=="video"?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
|
|
228
|
+
function ug(a,b,c){if(c.autoShowText==0)return!1;if(c.autoShowText==1)return!0;var d=vf(c.preferredTextLanguage);b=vf(b.language);if(c.autoShowText==2)return uf(b,d);if(c.autoShowText==3){if(!a)return!1;a=vf(a.language);return uf(b,d)&&!uf(a,b)}Wa("Invalid autoShowText setting!");return!1}
|
|
229
|
+
function vg(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c?Ye(c):"",codecs:c?Ze(c):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,
|
|
230
|
+
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};d.fullMimeTypes.add(Qe(d.mimeType,d.codecs));c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}N("shaka.util.StreamUtils",Df);Df.meetsRestrictions=Hf;
|
|
231
|
+
var Vf=new Map,lg=0,dg=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),eg=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function wg(){var a=this;this.G=null;this.H=!1;this.u=new Ta;this.j=new gb;navigator.connection&&navigator.connection.addEventListener&&this.j.F(navigator.connection,"change",function(){a.g.useNetworkInformation&&navigator.onLine&&(a.u=new Ta,a.g&&a.u.configure(a.g.advanced),a.trySuggestStreams())});this.l=[];this.I=1;this.J=!1;this.h=this.o=this.g=this.B=null;this.m=new of(function(){if(a.H&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=a.chooseVariant();b&&a.G&&a.G(b,a.g.clearBufferSwitch,
|
|
232
|
+
a.g.safeMarginSwitch)}});this.C=window;"documentPictureInPicture"in window&&this.j.F(window.documentPictureInPicture,"enter",function(){a.C=window.documentPictureInPicture.window;a.m&&a.m.Cb();a.j.Aa(a.C,"pagehide",function(){a.C=window;a.m&&a.m.Cb()})});this.D=this.i=null}p=wg.prototype;p.stop=function(){this.G=null;this.H=!1;this.l=[];this.I=1;this.o=this.B=null;this.h&&(this.h.disconnect(),this.h=null);this.m&&this.m.stop();this.D=this.i=null};
|
|
233
|
+
p.release=function(){this.stop();this.j.release();this.m=null};p.init=function(a){this.G=a};
|
|
234
|
+
p.chooseVariant=function(a){a=a===void 0?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,b=this.C.screen.height*c,c*=this.C.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,e=this.o.clientHeight,f=this.o.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.o&&(e=this.i.height,f=this.i.width);b=Math.min(b,e*d);c=Math.min(c,
|
|
235
|
+
f*d)}e=this.l.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=this.l);d=e;a&&e.length!=this.l.length&&(d=this.l.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=xg(this,this.g.restrictions,d,Infinity,Infinity);if(b!=Infinity||c!=Infinity){a=yg(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=xg(this,this.g.restrictions,
|
|
236
|
+
d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=xg(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=a[d];var g=isNaN(this.I)?1:Math.abs(this.I);f=g*e.bandwidth/this.g.bandwidthDowngradeTarget;for(var h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}g=g*h.bandwidth/this.g.bandwidthUpgradeTarget;c&&e&&b>=f&&b<=g&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<
|
|
237
|
+
e.video.height))&&(c=e)}this.B=Date.now();return c};p.enable=function(){this.H=!0;this.l.length&&this.trySuggestStreams()};p.disable=function(){this.H=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&d.packetNumber===1&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e>=this.g.cacheLoadThreshold&&this.u.sample(e,b);c&&this.B!=null&&this.H&&zg(this)};p.trySuggestStreams=function(){this.H&&(this.B=Date.now(),zg(this,!0))};
|
|
238
|
+
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=navigator.connection.downlink*1E6);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.u.getBandwidthEstimate(a);return this.D?this.D.getBandwidthEstimate(a):a};p.setVariants=function(a){if(db(a,this.l))return!1;this.l=a;return!0};
|
|
239
|
+
p.playbackRateChanged=function(a){this.I=a};p.setMediaElement=function(a){function b(){c.m.ka(Ag)}var c=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.o));this.j.F(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.F(c.i,"resize",b))});this.j.F(a,"leavepictureinpicture",function(){c.i&&c.j.Ma(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.D=a};
|
|
240
|
+
p.configure=function(a){this.g=a;this.u&&this.g&&this.u.configure(this.g.advanced)};function zg(a,b){if(b===void 0||!b){if(!a.J){b=a.u;if(!(b.g>=b.i))return;a.J=!0;a.B-=(a.g.switchInterval-a.g.minTimeToSwitch)*1E3}if(Date.now()-a.B<a.g.switchInterval*1E3)return}b=a.chooseVariant();a.getBandwidthEstimate();b&&a.G&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}
|
|
241
|
+
function xg(a,b,c,d,e){if(a.D){var f=a.D.ei();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Hf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function yg(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&(c=c.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}N("shaka.abr.SimpleAbrManager",wg);
|
|
242
|
+
wg.prototype.configure=wg.prototype.configure;wg.prototype.setCmsdManager=wg.prototype.setCmsdManager;wg.prototype.setMediaElement=wg.prototype.setMediaElement;wg.prototype.playbackRateChanged=wg.prototype.playbackRateChanged;wg.prototype.setVariants=wg.prototype.setVariants;wg.prototype.getBandwidthEstimate=wg.prototype.getBandwidthEstimate;wg.prototype.trySuggestStreams=wg.prototype.trySuggestStreams;wg.prototype.segmentDownloaded=wg.prototype.segmentDownloaded;wg.prototype.disable=wg.prototype.disable;
|
|
243
|
+
wg.prototype.enable=wg.prototype.enable;wg.prototype.chooseVariant=wg.prototype.chooseVariant;wg.prototype.init=wg.prototype.init;wg.prototype.release=wg.prototype.release;wg.prototype.stop=wg.prototype.stop;var Ag=1;function Bg(a,b){var c=Cg();this.l=a.maxAttempts==null?c.maxAttempts:a.maxAttempts;this.j=a.baseDelay==null?c.baseDelay:a.baseDelay;this.o=a.fuzzFactor==null?c.fuzzFactor:a.fuzzFactor;this.m=a.backoffFactor==null?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=b===void 0?!1:b)this.g=1}
|
|
244
|
+
function Dg(a){var b,c;return G(function(d){if(d.h==1){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new S(2,7,1010);b=a.g;a.g++;if(b==0)return d.return();c=a.h*(1+(Math.random()*2-1)*a.o);return d.g(new Promise(function(e){(new of(e)).ka(c/1E3)}),2)}a.h*=a.m;d.j()})}function Cg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Eg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Eg.prototype.resolve=function(){};Eg.prototype.reject=function(){};function Fg(a,b){this.promise=a;this.i=b;this.g=null}function Gg(a){return new Fg(Promise.reject(a),function(){return Promise.resolve()})}function Hg(){var a=Promise.reject(new S(2,7,7001));a.catch(function(){});return new Fg(a,function(){return Promise.resolve()})}function Ig(a){return new Fg(Promise.resolve(a),function(){return Promise.resolve()})}function Jg(a){return new Fg(a,function(){return a.catch(function(){})})}Fg.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
|
|
245
|
+
function Kg(a){return new Fg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Fg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
246
|
+
Fg.prototype.Xa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Lg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Eg;f.catch(function(){});var g=new S(2,7,7001);this.promise.then(c(!0),c(!1));return new Fg(f,function(){return d()})};
|
|
247
|
+
function Lg(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}da.Object.defineProperties(Fg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}});N("shaka.util.AbortableOperation",Fg);Fg.prototype.chain=Fg.prototype.Xa;Fg.prototype["finally"]=Fg.prototype.finally;
|
|
248
|
+
Fg.all=Kg;Fg.prototype.abort=Fg.prototype.abort;Fg.notAbortable=Jg;Fg.completed=Ig;Fg.aborted=Hg;Fg.failed=Gg;function T(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
249
|
+
function Mg(a){var b=new T(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}T.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};T.prototype.stopImmediatePropagation=function(){this.g=!0};T.prototype.stopPropagation=function(){};N("shaka.util.FakeEvent",T);
|
|
250
|
+
var Ng={ul:"abrstatuschanged",vl:"adaptation",wl:"audiotrackchanged",xl:"audiotrackschanged",yl:"boundarycrossed",zl:"buffering",Al:"canupdatestarttime",Bl:"complete",Cl:"currentitemchanged",Dl:"downloadcompleted",El:"downloadfailed",Fl:"downloadheadersreceived",Gl:"drmsessionupdate",Hl:"emsg",Nl:"itemsinserted",Ol:"itemsremoved",dm:"prft",Error:"error",Il:"expirationupdated",Jl:"firstquartile",Kl:"gapjumped",Pl:"keystatuschanged",Sl:"loaded",Tl:"loading",Vl:"manifestparsed",Wl:"manifestupdated",
|
|
251
|
+
Xl:"mediaqualitychanged",Yl:"mediasourcerecovered",Zl:"metadataadded",Metadata:"metadata",$l:"midpoint",am:"nospatialvideoinfo",bm:"onstatechange",fm:"ratechange",im:"segmentappended",jm:"sessiondata",lm:"spatialvideoinfo",nm:"stalldetected",om:"started",pm:"statechanged",qm:"streaming",rm:"textchanged",sm:"texttrackvisibility",tm:"thirdquartile",um:"timelineregionadded",vm:"timelineregionenter",wm:"timelineregionexit",xm:"trackschanged",zm:"unloading",Bm:"variantchanged"};function Og(){this.ab=new fb;this.Ie=this}Og.prototype.addEventListener=function(a,b){this.ab&&this.ab.push(a,b)};Og.prototype.removeEventListener=function(a,b){this.ab&&this.ab.remove(a,b)};Og.prototype.dispatchEvent=function(a){if(!this.ab)return!0;var b=this.ab.get(a.type)||[],c=this.ab.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Ie;a.currentTarget=this.Ie;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
252
|
+
Og.prototype.release=function(){this.ab=null};function Pg(){this.g=[]}function Qg(a,b){a.g.push(b.finally(function(){cb(a.g,b)}))}Pg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Rg(a,b,c,d,e,f,g){Og.call(this);this.i=null;this.j=!1;this.u=new Pg;this.g=new Set;this.h=new Set;this.o=a||null;this.m=b||null;this.B=c||null;this.C=d||null;this.D=e||null;this.H=f||null;this.G=g||null;this.l=new Map}na(Rg,Og);p=Rg.prototype;p.configure=function(a){this.i=a};function Sg(a,b,c,d){d=d===void 0?!1:d;c=c||Tg;var e=Ug.get(a);(!e||c>=e.priority)&&Ug.set(a,{priority:c,yf:b,Gk:d})}
|
|
253
|
+
function Vg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Jk=function(a){this.g.add(a)};p.il=function(a){this.g.delete(a)};p.sj=function(){this.g.clear()};p.Kk=function(a){this.h.add(a)};p.jl=function(a){this.h.delete(a)};p.tj=function(){this.h.clear()};p.Th=function(){this.l.clear()};
|
|
254
|
+
function Wg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:c===void 0?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();Og.prototype.release.call(this);return this.u.destroy()};
|
|
255
|
+
p.request=function(a,b,c){var d=this,e=new Xg;if(this.j){var f=Promise.reject(new S(2,7,7001));f.catch(function(){});return new Yg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?td(b.retryParameters):Cg();b.uris=td(b.uris);f=Zg(this,a,b,c);var g=f.Xa(function(){return $g(d,a,b,c,new Bg(b.retryParameters,!1),0,null,e)}),h=g.Xa(function(q){return ah(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
256
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Xa(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.gk||!d.o||u.fromCache||b.method=="HEAD"||a!=bh||d.o(u.timeMs,u.data.byteLength,ch(c),b,c);d.G&&d.G(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new Yg(n.promise,function(){return n.abort()},e);Qg(this.u,f);return f};
|
|
257
|
+
function Zg(a,b,c,d){function e(h){f=f.Xa(function(){c.body&&(c.body=Sb(c.body));return h(b,c,d)})}var f=Ig(void 0);a.D&&e(a.D);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Xa(void 0,function(h){if(h instanceof S&&h.code==7001)throw h;throw new S(2,1,1006,h);})}
|
|
258
|
+
function $g(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));f>0&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new zb(c.uris[f]),l=k.jc,m=!1;l||(l=location.protocol,l=l.slice(0,-1),Ab(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=Ug.get(l))?l.yf:null;if(!n)return Gg(new S(2,1,1E3,k));var q=l.Gk;(k=a.l.get(k.Fb))&&(c.headers["common-access-token"]=k);var r=null,u=null,v=!1,w=!1,y;return Jg(Dg(e)).Xa(function(){if(a.j)return Hg();
|
|
259
|
+
y=Date.now();var x=0;c.requestStartTime=Date.now();var z=n(c.uris[f],c,b,function(D,A,B){r&&r.stop();u&&u.ka(H/1E3);a.o&&b==bh&&(x++,c.packetNumber=x,a.o(D,A,ch(d),c,d),m=!0,h.g=B)},function(D){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(D,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return z;var C=c.retryParameters.connectionTimeout;C&&(r=new of(function(){v=!0;z.abort()}),r.ka(C/1E3));var H=c.retryParameters.stallTimeout;H&&(u=new of(function(){v=!0;z.abort()}));
|
|
260
|
+
return z}).Xa(function(x){r&&r.stop();u&&u.stop();x.timeMs==void 0&&(x.timeMs=Date.now()-y);var z=x.headers["common-access-token"];if(z){var C=new zb(x.uri);a.l.set(C.Fb,z)}z={response:x,gk:m};!w&&a.m&&a.m(x.headers,c,b);a.B&&a.B(c,x);return z},function(x){r&&r.stop();u&&u.stop();if(a.C){var z=null,C=0;x instanceof S&&(z=x,x.code==1001&&(C=x.data[1]));a.C(c,z,C,v)}if(a.j)return Hg();v&&(x=new S(1,1,1003,c.uris[f],b));if(x instanceof S){if(x.code==7001)throw x;if(x.code==1010)throw g;if(x.severity==
|
|
261
|
+
1){z=(new Map).set("error",x);z=new T("retry",z);z.cancelable=!0;a.dispatchEvent(z);if(z.defaultPrevented)throw x;f=(f+1)%c.uris.length;return $g(a,b,c,d,e,f,x,h)}}throw x;})}
|
|
262
|
+
function ah(a,b,c,d){var e=Ig(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Li:void 0},f=a.next())g.Li=f.value,e=e.Xa(function(h){return function(){var k=c.response;k.data&&(k.data=Sb(k.data));return(0,h.Li)(b,k,d)}}(g));return e.Xa(function(){return c},function(h){var k=2;if(h instanceof S){if(h.code==7001)throw h;k=h.severity}throw new S(k,1,1007,h);})}function ch(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Wc)return!1}return!0}N("shaka.net.NetworkingEngine",Rg);
|
|
263
|
+
Rg.prototype.request=Rg.prototype.request;Rg.prototype.destroy=Rg.prototype.destroy;Rg.makeRequest=Wg;Rg.defaultRetryParameters=function(){return Cg()};Rg.prototype.clearCommonAccessTokenMap=Rg.prototype.Th;Rg.prototype.clearAllResponseFilters=Rg.prototype.tj;Rg.prototype.unregisterResponseFilter=Rg.prototype.jl;Rg.prototype.registerResponseFilter=Rg.prototype.Kk;Rg.prototype.clearAllRequestFilters=Rg.prototype.sj;Rg.prototype.unregisterRequestFilter=Rg.prototype.il;
|
|
264
|
+
Rg.prototype.registerRequestFilter=Rg.prototype.Jk;Rg.unregisterScheme=function(a){Ug.delete(a)};Rg.registerScheme=Sg;Rg.prototype.configure=Rg.prototype.configure;function Xg(){this.g=0}Rg.NumBytesRemainingClass=Xg;function Yg(a,b,c){Fg.call(this,a,b);this.h=c}na(Yg,Fg);Rg.PendingRequest=Yg;var bh=1;Rg.RequestType={MANIFEST:0,SEGMENT:bh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9};
|
|
265
|
+
Rg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var Tg=3;Rg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Tg};var Ug=new Map;function dh(a){this.g=!1;this.h=new Eg;this.i=a}dh.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function eh(a,b){if(a.g){if(b instanceof S&&b.code==7003)throw b;throw new S(2,7,7003,b);}};function fh(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function gh(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function hh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function ih(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function jh(a,b){this.h=Wb(a);this.i=b==kh;this.g=0}p=jh.prototype;p.Ka=function(){return this.g<this.h.byteLength};p.Pa=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.Z=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw lh();}};p.Ca=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw lh();}};p.W=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw lh();}};
|
|
266
|
+
p.$g=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw lh();}};p.Fd=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw lh();}if(b>2097151)throw new S(2,3,3001);this.g+=8;return b*4294967296+a};p.Tb=function(a,b){if(this.g+a>this.h.byteLength)throw lh();var c=Qb(this.h,this.g,a);this.g+=a;return b?new Uint8Array(c):c};
|
|
267
|
+
p.skip=function(a){if(this.g+a>this.h.byteLength)throw lh();this.g+=a};p.Mi=function(a){if(this.g<a)throw lh();this.g-=a};p.seek=function(a){if(a<0||a>this.h.byteLength)throw lh();this.g=a};p.Ed=function(){for(var a=this.g;this.Ka()&&this.h.getUint8(this.g)!=0;)this.g+=1;a=Qb(this.h,a,this.g-a);this.g+=1;return mc(a)};function lh(){return new S(2,3,3E3)}N("shaka.util.DataViewReader",jh);jh.prototype.readTerminatedString=jh.prototype.Ed;jh.prototype.seek=jh.prototype.seek;jh.prototype.rewind=jh.prototype.Mi;
|
|
268
|
+
jh.prototype.skip=jh.prototype.skip;jh.prototype.readBytes=jh.prototype.Tb;jh.prototype.readUint64=jh.prototype.Fd;jh.prototype.readInt32=jh.prototype.$g;jh.prototype.readUint32=jh.prototype.W;jh.prototype.readUint16=jh.prototype.Ca;jh.prototype.readUint8=jh.prototype.Z;jh.prototype.getLength=jh.prototype.getLength;jh.prototype.getPosition=jh.prototype.Pa;jh.prototype.hasMoreData=jh.prototype.Ka;var kh=1;jh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:kh};function mh(){this.i=new Map;this.h=new Map;this.g=!1}p=mh.prototype;p.box=function(a,b){a=nh(a);this.i.set(a,oh);this.h.set(a,b);return this};p.S=function(a,b){a=nh(a);this.i.set(a,ph);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new jh(a,0);for(this.g=!1;a.Ka()&&!this.g;)this.Bd(0,a,b,c)};
|
|
269
|
+
p.Bd=function(a,b,c,d){var e=b.Pa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.W(),g=b.W(),h=th(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Pa()+8>b.getLength()){this.g=!0;return}f=b.Fd();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==ph){if(d&&b.Pa()+4>b.getLength()){this.g=!0;return}n=b.W();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Pa(),b=g>0?b.Tb(g,!1):new Uint8Array(0),b=new jh(b,0),l({name:h,
|
|
270
|
+
parser:this,partialOkay:c||!1,stopOnPartial:d||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Pa(),b.getLength()-b.Pa()))}};function uh(a){for(var b=vh(a);a.reader.Ka()&&!a.parser.g;)a.parser.Bd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function wh(a){for(var b=vh(a),c=a.reader.W(),d=0;d<c&&(a.parser.Bd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.g);d++);}
|
|
271
|
+
function xh(a){var b=vh(a);for(a.reader.skip(78);a.reader.Ka()&&!a.parser.g;)a.parser.Bd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function yh(a){var b=vh(a);a.reader.skip(8);var c=a.reader.Ca();a.reader.skip(6);c==2?a.reader.skip(48):a.reader.skip(12);for(c==1&&a.reader.skip(16);a.reader.Ka()&&!a.parser.g;)a.parser.Bd(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function zh(a,b){return function(c){a(c.reader.Tb(c.reader.getLength()-c.reader.Pa(),b))}}
|
|
272
|
+
function nh(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function th(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function vh(a){return 8+(a.has64BitSize?8:0)+(a.flags!=null?4:0)}N("shaka.util.Mp4Parser",mh);mh.headerSize=vh;mh.typeToString=th;mh.allData=zh;mh.audioSampleEntry=yh;mh.visualSampleEntry=xh;mh.sampleDescription=wh;mh.children=uh;mh.prototype.parseNext=mh.prototype.Bd;mh.prototype.parse=mh.prototype.parse;
|
|
273
|
+
mh.prototype.stop=mh.prototype.stop;mh.prototype.fullBox=mh.prototype.S;mh.prototype.box=mh.prototype.box;var oh=0,ph=1;function Ah(a){var b=this;this.g=[];this.data=[];(new mh).box("moov",uh).box("moof",uh).S("pssh",function(c){if(!(c.version>1)){var d=Qb(c.reader.h,-12,c.size);b.data.push(d);c=c.reader.Tb(16,!1);b.g.push(zc(c))}}).parse(a)}
|
|
274
|
+
function Bh(a,b,c,d){var e=a.length,f=12+b.length+4+e;d>0&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Wb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;d<1?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(d>0)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=yc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Ch(a){var b=this;this.D=a;this.l=this.B=null;this.$=this.T=!1;this.J=0;this.g=null;this.o=new gb;this.i=new Map;this.X=[];this.C=new Map;this.K=!1;this.m=new Eg;this.h=null;this.u=function(c){c.severity==2&&b.m.reject(c);a.onError(c)};this.ba=new Map;this.ma=new Map;this.M=new of(function(){return Dh(b)});this.R=!1;this.N=[];this.oa=!1;this.G=new of(function(){Hh(b)});this.m.catch(function(){});this.j=new dh(function(){return Ih(b)});this.O=!1;this.H=this.I=null;this.V=function(){return!1}}
|
|
275
|
+
p=Ch.prototype;p.destroy=function(){return this.j.destroy()};function Ih(a){return G(function(b){switch(b.h){case 1:return a.o.release(),a.o=null,a.m.reject(),a.G.stop(),a.G=null,a.M.stop(),a.M=null,b.g(Jh(a),2);case 2:if(!a.l){b.A(3);break}b.m(4);return b.g(a.l.setMediaKeys(null),6);case 6:b.o(5);break;case 4:b.l();case 5:a.l=null;case 3:a.g=null,a.B=null,a.C=new Map,a.h=null,a.u=function(){},a.D=null,a.O=!1,a.I=null,b.j()}})}
|
|
276
|
+
p.configure=function(a,b){this.h=a;b&&(this.V=b);this.G&&this.T&&this.g&&this.G.Ea(this.h.updateExpirationTime)};function Kh(a,b,c){a.$=!0;a.C=new Map;a.R=c;return Lh(a,b,!1)}
|
|
277
|
+
function Mh(a,b,c,d){d=d===void 0?!0:d;a.C=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next())a.C.set(e.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.C.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.R=a.C.size>0;return Lh(a,b,d)}
|
|
278
|
+
function Nh(a,b,c,d,e,f){var g,h,k,l,m;return G(function(n){if(n.h==1)return g=[],f.length&&g.push(f[0].contentType),e.length&&g.push(e[0].contentType),h=function(q){q=Cc(b,q,null);q.licenseServerUri=c;q.serverCertificate=d;q.persistentStateRequired=!0;q.sessionType="persistent-license";return q},k=vg(g),k.video&&(l=h(f[0].encryptionScheme||""),k.video.drmInfos.push(l)),k.audio&&(m=h(e[0].encryptionScheme||""),k.audio.drmInfos.push(m)),n.g(Nf([k],!0,a.O,[]),2);eh(a.j);return n.return(Oh(a,[k]))})}
|
|
279
|
+
function Lh(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C;return G(function(H){if(H.h==1){Ph(a.h.clearKeys,b);d=b.some(function(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});e=hh(a.h.servers);f=hh(a.h.advanced||{});!d&&c&&Qh(b,e);g=new WeakSet;h=t(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Rh(l),n=t(m),q=n.next();!q.done;q=n.next())r=q.value,g.has(r)||(g.add(r),Sh(r,e,f,a.h.keySystemsMapping));u=function(D,A){var B=[];D=t(D);for(var I=D.next();!I.done;I=
|
|
280
|
+
D.next()){I=I.value;var E=I[A]||f.has(I.keySystem)&&f.get(I.keySystem)[A]||"";E==""&&cc(I.keySystem)&&(A=="audioRobustness"?E=[a.h.defaultAudioRobustnessForWidevine]:A=="videoRobustness"&&(E=[a.h.defaultVideoRobustnessForWidevine]));if(typeof E==="string")B.push(I);else if(Array.isArray(E)){E.length===0&&(E=[""]);E=t(E);for(var K=E.next();!K.done;K=E.next()){var J={};B.push(Object.assign({},I,(J[A]=K.value,J)))}}}return B};v=new WeakSet;w=t(b);for(y=w.next();!y.done;y=w.next())x=y.value,x.video&&
|
|
281
|
+
!v.has(x.video)&&(x.video.drmInfos=u(x.video.drmInfos,"videoRobustness"),x.video.drmInfos=u(x.video.drmInfos,"audioRobustness"),v.add(x.video)),x.audio&&!v.has(x.audio)&&(x.audio.drmInfos=u(x.audio.drmInfos,"videoRobustness"),x.audio.drmInfos=u(x.audio.drmInfos,"audioRobustness"),v.add(x.audio));return H.g(Nf(b,a.R,a.O,a.h.preferredKeySystems),2)}eh(a.j);z=d||e.size>0;if(!z)return a.T=!0,H.return(Promise.resolve());C=Oh(a,b);return H.return(d?C:C.catch(function(){}))})}
|
|
282
|
+
function Th(a){var b;return G(function(c){switch(c.h){case 1:if(a.l.mediaKeys)return c.return();if(!a.I){c.A(2);break}return c.g(a.I,3);case 3:return eh(a.j),c.return();case 2:return c.m(4),a.I=a.l.setMediaKeys(a.B),c.g(a.I,6);case 6:c.o(5);break;case 4:b=c.l(),a.u(new S(2,6,6003,b.message));case 5:eh(a.j),c.j()}})}function Uh(a,b){return G(function(c){if(c.h==1)return c.g(Th(a),2);Vh(a,b.initDataType,Qb(b.initData));c.j()})}
|
|
283
|
+
p.Vb=function(a){var b=this,c,d;return G(function(e){if(e.h==1){if(b.l===a)return e.return();if(!b.B)return b.o.Aa(a,"encrypted",function(){b.u(new S(2,6,6010))}),e.return();b.l=a;b.h.delayLicenseRequestUntilPlayed&&b.o.Aa(b.l,"play",function(){for(var f=t(b.N),g=f.next();!g.done;g=f.next())Wh(b,g.value);b.oa=!0;b.N=[]});b.l.remote?(b.o.F(b.l.remote,"connect",function(){return Jh(b)}),b.o.F(b.l.remote,"connecting",function(){return Jh(b)}),b.o.F(b.l.remote,"disconnect",function(){return Jh(b)})):
|
|
284
|
+
"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.F(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Jh(b)});b.H=b.g?b.g.initData.find(function(f){return f.initData.length>0})||null:null;c=b.g.keySystem;return(d=nb().Sg(c))||!b.H&&b.g.keySystem==="com.apple.fps"&&!b.C.size?e.A(2):e.g(Th(b),2)}Xh(b).catch(function(){});!d&&(b.H||b.C.size||b.h.parseInbandPsshEnabled)||b.o.F(b.l,"encrypted",function(f){return Uh(b,f)});e.j()})};
|
|
285
|
+
function Yh(a){var b,c,d,e,f;return G(function(g){switch(g.h){case 1:if(!a.B||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=Wg([a.g.serverCertificateUri],a.h.retryParameters);g.m(3);c=a.D.wc.request(5,b,{isPreload:a.V()});return g.g(c.promise,5);case 5:d=g.i;a.g.serverCertificate=Qb(d.data);g.o(4);break;case 3:throw e=g.l(),new S(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
286
|
+
g.m(6);return g.g(a.B.setServerCertificate(a.g.serverCertificate),8);case 8:g.o(0);break;case 6:throw f=g.l(),new S(2,6,6004,f.message);}})}function Zh(a,b){var c,d,e;return G(function(f){if(f.h==1)return f.g($h(a,b,{initData:null,initDataType:null}),2);if(f.h!=3){c=f.i;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Kb=new Eg,d.push(e.Kb);d.push(c.remove());return f.g(Promise.all(d),3)}a.i.delete(c);f.j()})}
|
|
287
|
+
function Xh(a){var b,c,d,e,f;return G(function(g){if(g.h==1){if(!a.C.size)return g.A(2);a.C.forEach(function(h,k){$h(a,k,h)});return g.g(a.m,3)}if(g.h!=2){b=a.g&&a.g.keyIds||new Set([]);if(b.size>0&&ai(a))return g.return(a.m);a.K=!1;a.m=new Eg;a.m.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Vh(a,f.initDataType,f.initData);bi(a)&&a.m.resolve();return g.return(a.m)})}
|
|
288
|
+
function Vh(a,b,c){if(c.length){try{c=a.h.initDataTransform(c,b,a.g)}catch(g){b=g;g instanceof S||(b=new S(2,6,6016,g));a.u(b);return}if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Pb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Pb(c,g.initData)&&(f=!0)});if(f)return}a.K=!0;a.i.size>0&&bi(a)&&(a.m.resolve(),a.K=!1,a.m=new Eg,a.m.catch(function(){}));ci(a,b,c,a.g.sessionType)}}
|
|
289
|
+
function di(a){a=a.i.keys();a=fh(a,function(b){return b.sessionId});return Array.from(a)}p.Gg=function(){var a=this,b=this.i.keys();b=fh(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.Zd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};function ei(a){return a.J?a.J:NaN}p.Ze=function(){return ih(this.ma)};
|
|
290
|
+
function Oh(a,b){var c,d,e,f,g,h,k;return G(function(l){switch(l.h){case 1:c=new Map;d=fi(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new S(2,6,6020);throw new S(2,6,6001);}eh(a.j);l.m(2);d.getConfiguration();var m=e=a.h.keySystemsMapping[d.keySystem]||d.keySystem,n=c.get(e),q=[],r=[],u=[],v=[],w=[],y=new Set,x=new Set;gi(n,q,r,v,u,w,y,x);var z=a.R?"persistent-license":"temporary";m={keySystem:m,encryptionScheme:q[0],licenseServerUri:r[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,
|
|
291
|
+
persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||z,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:u[0],initData:w,keyIds:y,mediaTypes:n[0].mediaTypes};x.size>0&&(m.keySystemUris=x);n=t(n);for(x=n.next();!x.done;x=n.next())x=x.value,x.distinctiveIdentifierRequired&&(m.distinctiveIdentifierRequired=x.distinctiveIdentifierRequired),x.persistentStateRequired&&(m.persistentStateRequired=x.persistentStateRequired);
|
|
292
|
+
a.g=m;if(!a.g.licenseServerUri)throw new S(2,6,6012,a.g.keySystem);return l.g(d.createMediaKeys(),4);case 4:f=l.i;eh(a.j);a.B=f;if(!(a.h.minHdcpVersion!=""&&"getStatusForPolicy"in a.B)){l.A(5);break}l.m(6);return l.g(a.B.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),8);case 8:g=l.i;if(g!="usable")throw new S(2,6,6018);eh(a.j);l.o(5,2);break;case 6:h=l.l(2);if(h instanceof S)throw h;throw new S(2,6,6019,h.message);case 5:return a.T=!0,a.G.Ea(a.h.updateExpirationTime),l.g(Yh(a),9);case 9:eh(a.j);
|
|
293
|
+
l.o(0);break;case 2:k=l.l();eh(a.j,k);a.g=null;if(k instanceof S)throw k;throw new S(2,6,6002,k.message);}})}
|
|
294
|
+
function fi(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Rh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(c.size==1&&c.has(""))throw new S(2,6,6E3);d=a.h.preferredKeySystems;d.length||(e=hh(a.h.servers),e.size==1&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={Gi:void 0},g=e.next()){f.Gi=g.value;g=t(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(q){return q.supported&&
|
|
295
|
+
q.keySystemAccess!=null&&q.keySystemAccess.keySystem==n.Gi}}(f)))return h.keySystemAccess}e=t([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=t(b),h=g.next();!h.done;h=g.next()){h=t(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.h.keySystemsMapping[l]&&(m=c.get(a.h.keySystemsMapping[l]));l=t(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
|
|
296
|
+
f)return k.keySystemAccess}}}return null}function hi(a){bi(a)&&a.m.resolve()}function ii(a,b){(new of(function(){b.loaded=!0;hi(a)})).ka(ji)}
|
|
297
|
+
function $h(a,b,c){var d,e,f,g,h,k,l;return G(function(m){switch(m.h){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new S(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.o.F(d,"message",function(n){ki(a)?a.N.push(n):Wh(a,n)});a.o.F(d,"keystatuseschange",function(n){return li(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Vg:Infinity,Kb:null,type:"persistent-license"};a.i.set(d,f);m.m(2);return m.g(d.load(b),4);case 4:return g=m.i,eh(a.j),g||(a.i.delete(d),
|
|
298
|
+
h=a.h.persistentSessionOnlinePlayback?1:2,a.u(new S(h,6,6013)),f.loaded=!0),ii(a,f),hi(a),m.return(d);case 2:k=m.l(),eh(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.u(new S(l,6,6005,k.message)),f.loaded=!0,hi(a);case 3:return m.return(Promise.resolve())}})}
|
|
299
|
+
function ci(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.u(new S(2,6,6005,f.message));return}a.o.F(e,"message",function(f){ki(a)?a.N.push(f):Wh(a,f)});a.o.F(e,"keystatuseschange",function(f){return li(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Vg:Infinity,Kb:null,type:d});a.h.logLicenseExchange&&wc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;h<0&&(h+=4294967296);h="0x"+h.toString(16)}a.u(new S(2,6,6006,
|
|
300
|
+
f.message,f,h))}})}function ki(a){return a.l?a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.oa:!a.$&&a.h.delayLicenseRequestUntilPlayed}function mi(a){return G(function(b){return b.h==1?!a.K||ki(a)?b.A(0):b.g(a.m,3):b.g(Promise.all(a.X.map(function(c){return c.promise})),0)})}
|
|
301
|
+
function Wh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y;G(function(x){switch(x.h){case 1:c=b.target;a.h.logLicenseExchange&&wc(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];b.messageType=="individualization-request"&&f&&f.individualizationServer&&(e=f.individualizationServer);g=Wg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&
|
|
302
|
+
f.headers)for(h in f.headers)g.headers[h]=f.headers[h];if(bc(a.g.keySystem)){var z=g,C=a.g;try{var H=qc(z.body);if(H){var D=JSON.parse(H);D.type||(D.type=C.sessionType,z.body=rc(JSON.stringify(D)))}}catch(A){}}if(dc(a.g.keySystem))if(z=oc(g.body,!0,!0),z.includes("PlayReadyKeyMessage")){z=xd(z,"PlayReadyKeyMessage");C=Hd(z,"HttpHeader");C=t(C);for(H=C.next();!H.done;H=C.next())D=H.value,H=Hd(D,"name")[0],D=Hd(D,"value")[0],g.headers[Fd(H)]=Fd(D);z=Hd(z,"Challenge")[0];g.body=xc(Fd(z))}else g.headers["Content-Type"]=
|
|
303
|
+
"text/xml; charset=utf-8";k=Date.now();x.m(2);m=a.D.wc.request(2,g,{isPreload:a.V()});a.X.push(m);return x.g(m.promise,4);case 4:l=x.i;cb(a.X,m);x.o(3);break;case 2:n=x.l();if(a.j.g)return x.return();q={sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType};r=new S(2,6,6007,n,q);a.i.size==1?(a.u(r),d&&d.Kb&&d.Kb.reject(r)):(d&&d.Kb&&d.Kb.reject(r),a.i.delete(c),bi(a)&&(a.m.resolve(),a.M.ka(.1)));return x.return();case 3:if(a.j.g)return x.return();a.J+=(Date.now()-
|
|
304
|
+
k)/1E3;a.h.logLicenseExchange&&wc(l.data);x.m(5);return x.g(c.update(l.data),7);case 7:x.o(6);break;case 5:return v=(u=x.l())&&u.message||String(u),w=new S(2,6,6008,v),a.u(w),d&&d.Kb&&d.Kb.reject(w),x.return();case 6:if(a.j.g)return x.return();y=new T("drmsessionupdate");a.D.onEvent(y);d&&(d.Kb&&d.Kb.resolve(),ii(a,d));x.j()}})}
|
|
305
|
+
function li(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if(typeof g=="string"){var h=g;g=f;f=h}h=nb();if(dc(a.g.keySystem)&&g.byteLength==16&&h.Cf()){h=Wb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}f!="status-pending"&&(c.loaded=!0);f=="expired"&&(d=!0);g=zc(g).slice(0,32);a.ba.set(g,f)});var e=b.expiration-Date.now();(e<0||d&&e<1E3)&&c&&!c.Kb&&(a.i.delete(b),ni(b));bi(a)&&(a.m.resolve(),
|
|
306
|
+
a.M.ka(oi))}function Dh(a){var b=a.ba,c=a.ma;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return d=="expired"})&&a.u(new S(2,6,6014));a.D.xf(ih(c))}
|
|
307
|
+
function pi(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J;return G(function(O){if(O.h==1){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&
|
|
308
|
+
window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=t(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return O.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];
|
|
309
|
+
m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs"];r=new Map;u=nb();v=function(P,M,L){var Q,R,ia,W,xa,ta,ra,ya,sa,Ea,ma,Aa,qa;return G(function(ua){switch(ua.h){case 1:return ua.m(2),ua.g(M.createMediaKeys(),5);case 5:Q=ua.i;case 4:ua.o(3);break;case 2:return ua.l(),ua.return();case 3:ia=(R=M.getConfiguration().sessionTypes)?R.includes("persistent-license"):
|
|
310
|
+
!1;u.zi()&&(ia=!1);W=M.getConfiguration().videoCapabilities;xa=M.getConfiguration().audioCapabilities;ta={persistentState:ia,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.get(P)?ta=r.get(P):r.set(P,ta);(ra=W[0].encryptionScheme)&&!ta.encryptionSchemes.includes(ra)&&ta.encryptionSchemes.push(ra);(ya=W[0].robustness)&&!ta.videoRobustnessLevels.includes(ya)&&ta.videoRobustnessLevels.push(ya);(sa=xa[0].robustness)&&!ta.audioRobustnessLevels.includes(sa)&&
|
|
311
|
+
ta.audioRobustnessLevels.push(sa);if(!(L&&"getStatusForPolicy"in Q)){ua.A(0);break}Ea=t(f);ma=Ea.next();case 7:if(ma.done){ua.A(0);break}Aa=ma.value;if(ta.minHdcpVersions.includes(Aa)){ua.A(8);break}return ua.g(Q.getStatusForPolicy({minHdcpVersion:Aa}),10);case 10:if(qa=ua.i,qa=="usable")ta.minHdcpVersions.includes(Aa)||ta.minHdcpVersions.push(Aa);else{ua.A(0);break}case 8:ma=Ea.next(),ua.A(7)}})};w=function(P,M,L,Q,R){R=R===void 0?!1:R;var ia,W,xa,ta,ra,ya,sa,Ea,ma,Aa,qa;return G(function(ua){switch(ua.h){case 1:ua.m(2);
|
|
312
|
+
ia=td(n);W=t(ia.videoCapabilities);for(xa=W.next();!xa.done;xa=W.next())ta=xa.value,ta.encryptionScheme=M,ta.robustness=L;ra=t(ia.audioCapabilities);for(ya=ra.next();!ya.done;ya=ra.next())sa=ya.value,sa.encryptionScheme=M,sa.robustness=Q;Ea=td(ia);Ea.persistentState="required";Ea.sessionTypes=["persistent-license"];ma=[Ea,ia];qa=nb();return qa.Oa()=="MOBILE"?ua.g(sf(5,navigator.requestMediaKeySystemAccess(P,ma)),7):ua.g(navigator.requestMediaKeySystemAccess(P,ma),6);case 6:Aa=ua.i;ua.A(5);break;case 7:Aa=
|
|
313
|
+
ua.i;case 5:return ua.g(v(P,Aa,R),8);case 8:ua.o(0);break;case 2:ua.l(),ua.j()}})};y=function(P){return nb().Ia()==="WEBKIT"&&bc(P)?!1:!0};x=[];z=t(a);for(C=z.next();!C.done;C=z.next())if(H=C.value,r.set(H,null),y(H)){D=!0;A=t(q);for(B=A.next();!B.done;B=A.next())I=B.value,x.push(w(H,I,"","",D)),D=!1;E=t(k[H]||[]);for(K=E.next();!K.done;K=E.next())J=K.value,x.push(w(H,null,J,"")),x.push(w(H,null,"",J))}return O.g(Promise.all(x),2)}return O.return(ih(r))})}
|
|
314
|
+
function ni(a){return G(function(b){if(b.h==1)return b.m(2),b.g(sf(qi,Promise.all([a.close().catch(function(){}),a.closed])),4);if(b.h!=2)return b.o(0);b.l();b.j()})}
|
|
315
|
+
function Jh(a){var b;return G(function(c){b=Array.from(a.i.entries());a.i.clear();return c.g(Promise.all(b.map(function(d){d=t(d);var e=d.next().value;var f=d.next().value;return G(function(g){if(g.h==1)return g.m(2),a.$||a.C.has(e.sessionId)||f.type!=="persistent-license"||a.h.persistentSessionOnlinePlayback?g.g(ni(e),5):g.g(e.remove(),5);if(g.h!=2)return g.o(0);g.l();g.j()})})),0)})}function Rh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
316
|
+
function Hh(a){a.i.forEach(function(b,c){var d=b.Vg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Vg=e)})}function bi(a){a=a.i.values();return gh(a,function(b){return b.loaded})}function ai(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if(a.ba.get(c.value)!=="usable")return!1;return!0}
|
|
317
|
+
function Qh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
318
|
+
function gi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={La:void 0},l=a.next()){m.La=l.value;b.includes(m.La.encryptionScheme)||b.push(m.La.encryptionScheme);m.La.keySystem=="org.w3.clearkey"&&m.La.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.La.licenseServerUri)||k.push(m.La.licenseServerUri):c.includes(m.La.licenseServerUri)||c.push(m.La.licenseServerUri);e.includes(m.La.serverCertificateUri)||e.push(m.La.serverCertificateUri);m.La.serverCertificate&&
|
|
319
|
+
(d.some(function(r){return function(u){return Pb(u,r.La.serverCertificate)}}(m))||d.push(m.La.serverCertificate));if(m.La.initData){l=t(m.La.initData);for(var n=l.next(),q={};!n.done;q={Mg:void 0},n=l.next())q.Mg=n.value,f.some(function(r){return function(u){var v=r.Mg;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&Pb(u.initData,v.initData)}}(q))||f.push(q.Mg)}if(m.La.keyIds)for(l=t(m.La.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.La.keySystemUris&&h)for(m=t(m.La.keySystemUris),
|
|
320
|
+
l=m.next();!l.done;l=m.next())h.add(l.value)}if(k.length==1)c.push(k[0]);else if(k.length>0){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,F(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
|
|
321
|
+
function Sh(a,b,c,d){var e=a.keySystem;if(e&&(e!="org.w3.clearkey"||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=
|
|
322
|
+
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&e=="com.microsoft.playready"&&(a.keySystem="com.chromecast.playready")}}function Ph(a,b){a=hh(a);if(a.size!=0){a=Dc(a);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var qi=1,ji=5,oi=.5;function ri(){this.g=si;this.j=(new Map).set(si,2).set(ti,1);this.i=0;this.h=-1}function ui(a,b){var c=a.g!==b;a.g=b;c&&b===si&&(a.i=Date.now());return c}var ti=0,si=1;/*
|
|
323
|
+
@license
|
|
324
|
+
Shaka Player
|
|
325
|
+
Copyright 2023 Google LLC
|
|
326
|
+
SPDX-License-Identifier: Apache-2.0
|
|
327
|
+
*/
|
|
328
|
+
function vi(a,b,c){this.h=a;this.i=b;this.g=c}function wi(a,b){return G(function(c){if(c.h==1)return c.g(If(a.g,b,a.h.drm.preferredKeySystems,a.h.drm.keySystemsMapping),2);a.h.streaming.dontChooseCodecs||Ef(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes,a.h.preferredTextFormats);if(!b.variants.some(og))throw new S(2,4,4032);return c.return(xi(a,b))})}
|
|
329
|
+
function yi(a,b){var c=a.h.restrictions;a=a.i;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Hf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
|
|
330
|
+
function xi(a,b){var c=yi(a,b);if(b){var d=a.g?a.g.g:null;if(d&&a.g.B){for(var e=new Set,f=t(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=t(e);for(f=e.next();!f.done;f=e.next())zi(a,d.keySystem,f.value)}Ai(a,b)}return c}
|
|
331
|
+
function zi(a,b,c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){for(var e=t(d.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,Vh(a.g,f.initDataType,f.initData);e=a.g;e.g&&e.g.mediaTypes!==d.mediaTypes&&(e.g.mediaTypes=d.mediaTypes)}}
|
|
332
|
+
function Ai(a,b){function c(l){if(l&&!h.has(l)&&(h.add(l),l.keyIds.size)){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=d[e?"00":m];n?Bi.includes(n)&&g.add(n):f.add(m)}}}var d=a.g?a.g.Ze():{};a=Object.keys(d);var e=a.length&&a[0]=="00";a=!1;var f=new Set,g=new Set,h=new WeakSet;b=t(b.variants);for(var k=b.next();!k.done;k=b.next()){k=k.value;if(!k.allowedByApplication)a=!0;else if(k.allowedByKeySystem)return;c(k.audio);c(k.video)}a={hasAppRestrictions:a,missingKeys:Array.from(f),
|
|
333
|
+
restrictedKeyStatuses:Array.from(g)};throw new S(2,4,4012,a);}var Bi=["output-restricted","internal-error"];N("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ci(a){if(Di.has(a))return Di.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),Di.set(a,b),b):!1}function Ei(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Di=new Map;function Fi(a,b){var c=null,d=null,e=null,f=null,g=a.W();b&1&&(e=a.Fd());b&2&&(f=a.W());b&8&&(c=a.W());b&16&&(d=a.W());return{trackId:g,Wd:c,Xd:d,oj:e,Ni:f}}function Gi(a,b){return b==1?(b=a.W(),a=a.W(),{baseMediaDecodeTime:b*4294967296+a}):{baseMediaDecodeTime:a.W()}}function Hi(a,b){b==1?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.W();a.skip(4);a=a.Ca();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
334
|
+
function Ii(a,b,c){var d=a.W(),e=[],f=null;c&1&&(f=a.$g());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={kh:null,sampleSize:null,Df:null};c&256&&(h.kh=a.W());c&512&&(h.sampleSize=a.W());c&1024&&a.skip(4);c&2048&&(h.Df=b==0?a.W():a.$g());e.push(h)}return{Fm:d,jh:e,mg:f}}function Ji(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Ca();a.skip(2);a.skip(2);a.skip(2);a=a.Ca()+a.Ca()/65536;return{channelCount:b,sampleRate:a}}function Ki(a){a=a.W();return{codec:th(a)}}
|
|
335
|
+
function Li(a){var b=null,c=null,d=a.Tb(4,!1);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if(e==="nclx"){switch(a.Ca()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Ca();a.Ca();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,ye:c}}
|
|
336
|
+
function Mi(a,b){b=b===void 0?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Ni(a){return(a<10?"0":"")+a};function Oi(a){this.g=a=a===void 0?[]:a}
|
|
337
|
+
function Pi(a){if(a.g.length===0)throw Error("StreamInfos must have elements");for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Qi;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;g.type=="audio"&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Ri+1));m=Math.floor(m%(Ri+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(F(Si(h,4)),[0,0,0,0],F(Si(n,4)),F(Si(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
338
|
+
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],F(Si(k,2)),[0,0],F(Si(l,2)),[0,0]));h=Qi("tkhd",h);k=Qi;n=g.duration*g.timescale;l=Math.floor(n/(Ri+1));n=Math.floor(n%(Ri+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(F(Si(g.timescale,4)),F(Si(l,4)),F(Si(n,4)),F(Si(m,2)),[0,0]));l=Qi("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Ti.value();break;case "audio":m=Ui.value()}n=Qi("hdlr",
|
|
339
|
+
m);a:{switch(g.type){case "video":g=Qi("minf",Qi("vmhd",Vi.value()),Wi.value(),Xi(g));break a;case "audio":g=Qi("minf",Qi("smhd",Yi.value()),Wi.value(),Xi(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Ac.apply(uc,F(b));c=a.g[0];e=Qi;d=c.duration*c.timescale;f=Math.floor(d/(Ri+1));d=Math.floor(d%(Ri+1));f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(F(Si(c.timescale,4)),F(Si(f,4)),F(Si(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
|
|
340
|
+
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]));f=Qi("mvhd",f);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(F(Si(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Qi("trex",k),h.call(g,k);a=Ac.apply(uc,F(d));a=Qi("mvex",a);a=e("moov",f,b,a,Zi(c.stream));b=$i.value();c=new Uint8Array(b.byteLength+a.byteLength);c.set(b);c.set(a,b.byteLength);return c}
|
|
341
|
+
function Xi(a){var b=Qi,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=nb().re()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(a.Sa.byteLength>0)var e=Qi("avcC",a.Sa);else{e=Qi;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Db.length;n++){var q=aj(a.Db[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),
|
|
342
|
+
f+=q.length+2}}g.length>0&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(F(Si(c,2)),F(Si(d,2)),[0,72,0,0,0,72,
|
|
343
|
+
0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=bj(a);g=new Uint8Array([]);cj(a.stream)&&(g=dj(a.stream,a.codecs),d="encv");d=Qi(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),a.Sa.byteLength>0&&(c=Qi("hvcC",a.Sa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(F(Si(d,2)),F(Si(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,
|
|
344
|
+
100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=bj(a),g=new Uint8Array([]),cj(a.stream)&&(g=dj(a.stream,a.codecs),e="encv"),d=Qi(e,d,c,h,g));break;case "audio":if(c=="mp3")a=Qi(".mp3",ej(a));else if(c=="ac-3")c=Qi("dac3",a.Ha),d="ac-3",e=new Uint8Array([]),cj(a.stream)&&(e=dj(a.stream,a.codecs),d="enca"),a=Qi(d,ej(a),c,e);else if(c=="ec-3")c=Qi("dec3",a.Ha),d="ec-3",e=new Uint8Array([]),cj(a.stream)&&(e=dj(a.stream,a.codecs),d="enca"),
|
|
345
|
+
a=Qi(d,ej(a),c,e);else if(c=="opus")c=Qi("dOps",a.Ha),d="Opus",e=new Uint8Array([]),cj(a.stream)&&(e=dj(a.stream,a.codecs),d="enca"),a=Qi(d,ej(a),c,e);else{if(a.Ha.byteLength>0)c=Qi("esds",a.Ha);else{c=Qi;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Ec("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if(k==="mp4a.40.5"||k==="mp4a.40.29")h=l[g*2];g=parseInt(k.split(".").pop(),10);d=
|
|
346
|
+
new Uint8Array([0,0,0,0,3,25].concat(F(Si(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);cj(a.stream)&&(e=dj(a.stream,a.codecs),d="enca");a=Qi(d,ej(a),c,e)}d=a}a=Qi("stsd",fj.value(),d);return b("stbl",a,Qi("stts",gj.value()),Qi("stsc",hj.value()),Qi("stsz",ij.value()),Qi("stco",jj.value()))}
|
|
347
|
+
function bj(a){if(!a.Za&&!a.$a)return new Uint8Array([]);var b=a.$a;a=new Uint8Array([].concat(F(Si(a.Za,4)),F(Si(b,4))));return Qi("pasp",a)}function ej(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(F(Si(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
348
|
+
function Zi(a){var b=[];if(!cj(a))return new Uint8Array([]);a=t(a.drmInfos);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.initData){c=t(c.initData);for(var d=c.next();!d.done;d=c.next())b.push(d.value.initData)}return Ac.apply(uc,F(b))}
|
|
349
|
+
function dj(a,b){var c=Qi;b=new Uint8Array([].concat(F(Si(kj(b.split(".")[0]),4))));b=Qi("frma",b);var d="cenc";var e=a.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(F(Si(kj(d),4)),[0,1,0,0]));d=Qi("schm",d);e=Qi;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=aj(h.value)}a=new Uint8Array([0,0,0,0,
|
|
350
|
+
0,0,1,8]);f=Qi("tenc",a,f);return c("sinf",b,d,e("schi",f))}
|
|
351
|
+
function lj(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Qi;var g=new Uint8Array([0,0,0,0].concat(F(Si(c.data?c.data.sequenceNumber:0,4))));g=Qi("mfhd",g);var h;var k=c.data?c.data.zb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.ib<<4|m.mb<<2|m.jb}k=Qi("sdtp",l);var n=k.length+32+20+8+16+8+8;l=Qi;h=new Uint8Array([0,0,0,58].concat(F(Si(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Qi("tfhd",h);m=c.data?
|
|
352
|
+
c.data.baseMediaDecodeTime:0;var q=Math.floor(m%(Ri+1));m=new Uint8Array([1,0,0,0].concat(F(Si(Math.floor(m/(Ri+1)),4)),F(Si(q,4))));m=Qi("tfdt",m);var r=n;n=c.data?c.data.zb:[];q=n.length;var u=12+16*q,v=new Uint8Array(u);r+=8+u;v.set([c.type==="video"?1:0,0,15,1].concat(F(Si(q,4)),F(Si(r,4))),0);for(r=0;r<q;r++){var w=n[r];u=Si(w.duration,4);var y=Si(w.size,4),x=w.flags;w=Si(w.sb,4);v.set([].concat(F(u),F(y),[x.xb<<2|x.ib,x.mb<<6|x.jb<<4|x.yb,x.hb&61440,x.hb&15],F(w)),12+16*r)}n=Qi("trun",v);k=
|
|
353
|
+
l("traf",h,m,n,k);f=f("moof",g,k);e.call(d,b,[f,mj(c)])}return Ac.apply(uc,F(b))}function mj(a){a=(a.data?a.data.zb:[]).map(function(b){return b.data});a=Ac.apply(uc,F(a));return Qi("mdat",a)}function Si(a,b){var c=[];for(--b;b>=0;b--)c.push(a>>8*b&255);return c}function aj(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[c*2]+a[c*2+1]),16);return b}function kj(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<(a.length-c-1)*8;return b}
|
|
354
|
+
function Qi(a){var b=Ja.apply(1,arguments),c=nj.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],nj.set(a,c));for(var d=8,e=b.length-1;e>=0;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}function cj(a){return a.encrypted&&a.drmInfos.length>0}
|
|
355
|
+
var Ri=4294967295,nj=new Map,Ti=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0])}),Ui=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}),gj=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),hj=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),jj=new mb(function(){return new Uint8Array([0,
|
|
356
|
+
0,0,0,0,0,0,0])}),ij=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),Vi=new mb(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),Yi=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),fj=new mb(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),$i=new mb(function(){var a=new Uint8Array([105,115,111,109]),b=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);return Qi("ftyp",a,c,a,b)}),Wi=new mb(function(){var a=new Uint8Array([0,0,0,0,0,0,0,1,0,
|
|
357
|
+
0,0,12,117,114,108,32,0,0,0,1]);a=Qi("dref",a);return Qi("dinf",a)});function oj(a){a=Qb(a);var b=null;(new mh).box("moov",uh).box("trak",uh).box("mdia",uh).box("minf",uh).box("stbl",uh).S("stsd",wh).box("enca",function(c){b=c.reader.h;return yh(c)}).box("sinf",uh).box("frma",function(c){c.parser.stop();Ki(c.reader).codec==="ec-3"&&b&&b.getUint16(16)!==2&&b.setUint16(16,2)}).parse(a);return a}
|
|
358
|
+
function pj(a,b,c){function d(r){n.push({box:r,Ai:1701733217})}function e(r){n.push({box:r,Ai:1701733238})}function f(r){k=!0;r.parser.stop()}function g(r){m.push(r);uh(r)}var h=b=Qb(b),k=!1,l,m=[],n=[];(new mh).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).S("stsd",function(r){l=r;m.push(r);wh(r)}).S("encv",f).S("enca",f).S("dvav",e).S("dva1",e).S("dvh1",e).S("dvhe",e).S("dvc1",e).S("dvi1",e).S("hev1",e).S("hvc1",e).S("avc1",e).S("avc3",e).S("ac-3",d).S("ec-3",d).S("ac-4",
|
|
359
|
+
d).S("Opus",d).S("fLaC",d).S("mp4a",d).parse(b);if(k)return b;if(n.length==0||!l)throw ab(zc(b)),new S(2,3,3019,c);n.reverse();c=t(n);for(var q=c.next();!q.done;q=c.next())q=q.value,h=qj(a,h,l,q.box,m,q.Ai);h=rj(a,h);return nb().gh()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
|
|
360
|
+
function sj(a){a=Qb(a);var b=[];(new mh).box("mdat",function(g){b.push(g)}).parse(a);for(var c=[],d=0;d<b.length;d++){var e=b[d-1],f=b[d];c.push(tj(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return Ac.apply(uc,F(c))}
|
|
361
|
+
function tj(a){function b(n){g.push(n);uh(n)}var c,d,e,f,g=[];(new mh).box("moof",b).box("traf",b).S("tfhd",function(n){c=n;e=Fi(n.reader,n.flags)}).S("trun",function(n){d=n;f=Ii(n.reader,n.version,n.flags)}).parse(a);if(e&&e.Ni!==2){var h=c.start+vh(c)+4+(e.oj!==null?8:0),k=Wb(a);if(e.Ni!==null)k.setUint32(h,2);else{uj(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&f.mg!==null&&k.setInt32(d.start+vh(d)+4,f.mg+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
|
|
362
|
+
4);a.set(l);l=[];for(var m=3;m>=0;m--)l.push(2>>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=t(g);for(k=h.next();!k.done;k=h.next())k=k.value,uj(a,k.start,k.size+4)}}return a}
|
|
363
|
+
function qj(a,b,c,d,e,f){var g=dj(a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Wb(a).setUint32(4,f);a.set(g,d.size);uj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=nb().gf()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,uj(f,e.start,e.size+a.byteLength);a=Wb(f,c.start);c=vh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
|
|
364
|
+
function rj(a,b){a=Zi(a);if(a.byteLength===0)return b;var c=0,d=0;(new mh).box("moov",function(h){c=h.start;d=h.size;h.parser.stop()}).parse(b);var e=c+d;uj(b,c,d+a.byteLength);var f=new Uint8Array(b.byteLength+a.byteLength),g=b.subarray(e);f.set(b.subarray(0,e));f.set(a,e);f.set(g,e+a.byteLength);return f}function uj(a,b,c){a=Wb(a,b);b=a.getUint32(0);b!=0&&(b==1?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
|
|
365
|
+
function vj(a){function b(e){d.push({start:e.start,size:e.size});uh(e)}var c=Qb(a),d=[];(new mh).box("moov",b).box("trak",b).box("mdia",b).box("minf",b).box("stbl",b).box("stsd",function(e){d.push({start:e.start,size:e.size});for(var f=Wb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);h==1633889587?f.setUint32(g,1700998451):h==1684103987&&f.setUint32(g,1684366131)}}).parse(c);return c};function wj(a,b,c,d,e,f,g,h){this.P=a;this.startByte=b;this.endByte=c;this.xd=d===void 0?null:d;this.timescale=e===void 0?null:e;this.h=f===void 0?null:f;this.aesKey=g===void 0?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=h===void 0?!1:h}wj.prototype.Kc=function(){return this.startByte};wj.prototype.Ic=function(){return this.endByte};wj.prototype.se=function(a){this.h=a};wj.prototype.ac=function(){return this.h};
|
|
366
|
+
function xj(a,b){return a===b?!0:a&&b?a.Kc()==b.Kc()&&a.Ic()==b.Ic()&&eb(a.P().sort(),b.P().sort())&&Pb(a.ac(),b.ac()):a==b}N("shaka.media.InitSegmentReference",wj);wj.prototype.getEndByte=wj.prototype.Ic;wj.prototype.getStartByte=wj.prototype.Kc;
|
|
367
|
+
function yj(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=l===void 0?[]:l;r=r===void 0?zj:r;this.startTime=a;this.j=this.endTime=b;this.C=c;this.startByte=d;this.endByte=e;this.ea=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=m===void 0?"":m;this.B=n===void 0?null:n;this.h=q===void 0?null:q;this.status=r;this.preload=!1;this.l=!0;this.o=!1;this.aesKey=u===void 0?null:u;this.thumbnailSprite=null;this.i=-1;this.m=v===void 0?!1:v;this.ie=this.Wc=!1;a=t(this.g);
|
|
368
|
+
for(b=a.next();!b.done;b=a.next())b.value.wi();this.m&&this.g.length&&this.g[this.g.length-1].ui();this.u=this.bandwidth=this.mimeType=this.codecs=null;this.D=!1}p=yj.prototype;p.P=function(){return this.C()};p.getStartTime=function(){return this.startTime};p.Hj=function(){return this.endTime};p.Kc=function(){return this.startByte};p.Ic=function(){return this.endByte};
|
|
369
|
+
function Aj(a){if(a.endByte)return a.endByte+1-a.startByte;if(a.bandwidth){var b=a.bandwidth*(a.endTime-a.startTime);if(!isNaN(b)&&b>0)return b}if(a.g.length>0&&a.m)for(a=t(a.g),a=a.next();!a.done;a=a.next()){Aj(a.value);break}return null}p.bk=function(){return this.tilesLayout};p.$j=function(){return this.B};p.bc=function(){return this.status};p.xk=function(){this.status=Bj};p.Rg=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.wd=function(){this.l=!1};p.lk=function(){return this.l};
|
|
370
|
+
p.wi=function(){this.Wc=!0};p.pk=function(){return this.Wc};p.ui=function(){this.ie=!0};p.nk=function(){return this.ie};p.ti=function(){this.o=!0};p.hk=function(){return this.o};p.Jf=function(a){this.thumbnailSprite=a};p.Yj=function(){return this.thumbnailSprite};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
371
|
+
p.Ah=function(a){this.h==null?Va("Sync attempted without sync time!"):(a=this.h-a-this.startTime,Math.abs(a)>=.001&&this.offset(a))};p.se=function(a,b){this.u=a;this.D=b===void 0?!1:b};p.ac=function(a){var b=this.u;(a===void 0||a)&&this.D&&(this.u=null);return b};function Cj(a,b){a.ea=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Cj(c.value,b)}N("shaka.media.SegmentReference",yj);yj.prototype.getSegmentData=yj.prototype.ac;yj.prototype.setSegmentData=yj.prototype.se;yj.prototype.syncAgainst=yj.prototype.Ah;
|
|
372
|
+
yj.prototype.offset=yj.prototype.offset;yj.prototype.getThumbnailSprite=yj.prototype.Yj;yj.prototype.setThumbnailSprite=yj.prototype.Jf;yj.prototype.hasByterangeOptimization=yj.prototype.hk;yj.prototype.markAsByterangeOptimization=yj.prototype.ti;yj.prototype.isLastPartial=yj.prototype.nk;yj.prototype.markAsLastPartial=yj.prototype.ui;yj.prototype.isPartial=yj.prototype.pk;yj.prototype.markAsPartial=yj.prototype.wi;yj.prototype.isIndependent=yj.prototype.lk;yj.prototype.markAsNonIndependent=yj.prototype.wd;
|
|
373
|
+
yj.prototype.isPreload=yj.prototype.isPreload;yj.prototype.markAsPreload=yj.prototype.Rg;yj.prototype.markAsUnavailable=yj.prototype.xk;yj.prototype.getStatus=yj.prototype.bc;yj.prototype.getTileDuration=yj.prototype.$j;yj.prototype.getTilesLayout=yj.prototype.bk;yj.prototype.getEndByte=yj.prototype.Ic;yj.prototype.getStartByte=yj.prototype.Kc;yj.prototype.getEndTime=yj.prototype.Hj;yj.prototype.getStartTime=yj.prototype.getStartTime;yj.prototype.getUris=yj.prototype.P;var zj=0,Bj=1;
|
|
374
|
+
yj.Status={rl:zj,ym:Bj,Ul:2};function Dj(a){return a.length==1&&a.end(0)-a.start(0)<1E-4}function Ej(a){return!a||Dj(a)?null:a.length==1&&a.start(0)<0?0:a.length?a.start(0):null}function Fj(a){return!a||Dj(a)?null:a.length?a.end(a.length-1):null}function Gj(a,b){return!a||!a.length||Dj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Hj(a,b){if(!a||!a.length||Dj(a))return 0;var c=0;a=t(Ij(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
375
|
+
function Jj(a,b,c){if(!a||!a.length||Dj(a))return null;a=Ij(a).findIndex(function(d,e,f){return d.start>b&&(e==0||f[e-1].end-b<=c)});return a>=0?a:null}function Ij(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Kj(){}function Lj(a,b){var c=document.createElement("source");c.src=a;c.type=b===void 0?"":b;return c}function Mj(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;d>=0;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}function Nj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
|
|
376
|
+
function Uc(){if(Rj)return Rj;Sj||(Sj=new of(function(){Rj=null}));(Rj=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Rj=document.createElement("video"));Sj.ka(1);return Rj}
|
|
377
|
+
function Tj(a,b){var c,d,e,f,g;return G(function(h){if(h.h==1)return"fonts"in document&&"FontFace"in window?h.g(document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();m.done===!1;)l.push(m.value),m=k.next();return l};d=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&f.display==="swap")return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);h.j()})}
|
|
378
|
+
N("shaka.util.Dom",Kj);Kj.removeAllChildren=Nj;Kj.clearSourceFromVideo=Mj;var Sj=null,Rj=null;/*
|
|
379
|
+
@license
|
|
380
|
+
Shaka Player
|
|
381
|
+
Copyright 2022 Google LLC
|
|
382
|
+
SPDX-License-Identifier: Apache-2.0
|
|
383
|
+
*/
|
|
384
|
+
function Uj(){}function Vj(a,b){return b+10<=a.length&&a[b]===73&&a[b+1]===68&&a[b+2]===51&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function Wj(a,b){return b+10<=a.length&&a[b]===51&&a[b+1]===68&&a[b+2]===73&&a[b+3]<255&&a[b+4]<255&&a[b+6]<128&&a[b+7]<128&&a[b+8]<128&&a[b+9]<128?!0:!1}function Xj(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
|
|
385
|
+
function Yj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if(a.type==="APIC"){if(a.size<2||a.data[0]!==3)return null;var c=a.data.subarray(1).indexOf(0);if(c===-1)return null;var d=mc(Qb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(f===-1)return null;var g=mc(Qb(a.data,3+c,f)),h;d==="--\x3e"?h=mc(Qb(a.data,4+c+f)):h=Sb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if(a.type==="TXXX"){if(a.size<2||a.data[0]!==
|
|
386
|
+
3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=mc(Qb(a.data,1,d));a=mc(Qb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="WXXX"){if(a.size<2||a.data[0]!==3)return null;d=a.data.subarray(1).indexOf(0);if(d===-1)return null;c=mc(Qb(a.data,1,d));a=mc(Qb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if(a.type==="PRIV"){if(a.size<2)return null;c=a.data.indexOf(0);if(c===-1)return null;c=mc(Qb(a.data,0,c));b.description=c;c=="com.apple.streaming.transportStreamTimestamp"?
|
|
387
|
+
(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Sb(a.data.subarray(c.length+1)),b.data=a);return b}if(a.type[0]==="T"){if(a.size<2||a.data[0]!==3)return null;a=mc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return a.type[0]==="W"?(a=mc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Sb(a.data),b):null}
|
|
388
|
+
function Zj(a){for(var b=0,c=[];Vj(a,b);){var d=Xj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Xj(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Yj(e))&&c.push(f);b+=e.size+10}Wj(a,b)&&(b+=10)}return c}function ak(a,b){for(var c=b=b===void 0?0:b,d=0;Vj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Xj(a,b+6),Wj(a,b+10)&&(d+=10),b+=d;return d>0?a.subarray(c,c+d):new Uint8Array([])}N("shaka.util.Id3Utils",Uj);Uj.getID3Data=ak;
|
|
389
|
+
Uj.getID3Frames=Zj;function bk(a,b,c){c=c===void 0?Number.EPSILON:c;if(a===b)return!0;a=Math.abs(a-b);return a<=c?!0:c!==Number.EPSILON?Math.abs(a-c)<=Number.EPSILON:!1};function ck(a){return(new Date(Date.UTC(1900,0,1,0,0,0,0)+a)).getTime()};/*
|
|
390
|
+
|
|
391
|
+
Copyright Brightcove, Inc.
|
|
392
|
+
|
|
393
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
394
|
+
you may not use this file except in compliance with the License.
|
|
395
|
+
You may obtain a copy of the License at
|
|
396
|
+
|
|
397
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
398
|
+
|
|
399
|
+
Unless required by applicable law or agreed to in writing, software
|
|
400
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
401
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
402
|
+
See the License for the specific language governing permissions and
|
|
403
|
+
limitations under the License.
|
|
404
|
+
*/
|
|
405
|
+
function dk(a,b){this.j=a;if(b===void 0?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)d>=2&&a[d]==3&&a[d-1]==0&&a[d-2]==0||(b[c]=a[d],c++);this.j=Qb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function ek(a){var b=a.j.byteLength-a.i,c=Math.min(4,a.i);if(c!==0){for(var d=0,e=0;e<c;e++)d=d<<8|a.j[b+e];a.h=d<<(4-c)*8;a.g=c*8;a.i-=c}}function fk(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=c*8;a.g-=c;ek(a)}a.h<<=b;a.g-=b}
|
|
406
|
+
function gk(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;a.g>0?a.h<<=c:a.i>0&&ek(a);c=b-c;return c>0?d<<c|gk(a,c):d}function hk(a){for(var b=0;a.g===0;){if(a.i===0)return b;ek(a)}for(;;){var c=Math.clz32(a.h);c>a.g&&(c=a.g);b+=c;a.h<<=c;a.g-=c;if(a.g>0||a.i===0)break;ek(a)}return b}function ik(a){fk(a,1+hk(a))}function U(a){var b=hk(a);return gk(a,b+1)-1}function jk(a){a=U(a);return 1&a?1+a>>>1:-1*(a>>>1)}function V(a){return gk(a,1)===1}function kk(a){return gk(a,8)}
|
|
407
|
+
function lk(a,b){for(var c=8,d=8,e=0;e<b;e++)d!==0&&(d=jk(a),d=(c+d+256)%256),c=d===0?c:d}function mk(a){kk(a);U(a);return U(a)}N("shaka.util.ExpGolomb",dk);function nk(){this.I=null;this.J=!1;this.u=this.K=null;this.j=[];this.g=[];this.C=this.D=null;this.i=[];this.h=[];this.G=null;this.l=[];this.B=this.H=this.m=this.o=null}p=nk.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};p.Hf=function(a){this.B!=null&&this.B!=a&&(this.m=this.o=null);this.B=a};
|
|
408
|
+
p.parse=function(a){if(a.length<564)return this;for(var b=Math.max(0,ok(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(a[e]==71){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if((a[e+3]&48)>>4>1){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,df:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
409
|
+
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(m>0)for(var n=h+5,q=m;q>2;){var r=f[n+1]+2;switch(f[n]){case 5:var u=n+2;u=f[u]<<24|f[u+1]<<16|f[u+2]<<8|f[u+3];g.audio==-1&&u===1332770163?(g.audio=l,g.audioCodec="opus"):g.video==-1&&u===1096167473&&(g.video=l,g.videoCodec="av1");break;case 106:g.audio==-1&&(g.audio=l,g.audioCodec="ac3");break;case 122:g.audio==-1&&(g.audio=l,g.audioCodec="ec3");break;case 124:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 127:g.audioCodec==
|
|
410
|
+
"opus"&&(u=null,f[n+2]===128&&(u=f[n+3]),u!=null&&(this.H={channelCount:(u&15)===0?2:u&15,rj:u,sampleRate:48E3}))}n+=r;q-=r}break;case 15:g.audio==-1&&(g.audio=l,g.audioCodec="aac");break;case 17:g.audio==-1&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:g.df==-1&&(g.df=l);break;case 27:g.video==-1&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:g.audio==-1&&(g.audio=l,g.audioCodec="mp3");break;case 36:g.video==-1&&(g.video=l,g.videoCodec="hvc");break;case 129:g.audio==-1&&(g.audio=l,g.audioCodec=
|
|
411
|
+
"ac3");break;case 132:case 135:g.audio==-1&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;f.video!=-1&&(this.K=f.video,this.u=f.videoCodec);f.audio!=-1&&(this.D=f.audio,this.C=f.audioCodec);f.df!=-1&&(this.G=f.df);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.D:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
412
|
+
break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
413
|
+
function pk(a,b){if((b[0]<<16|b[1]<<8|b[2])!==1)return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2;a.o==null&&(a.o=e);c.pts=qk(e,a.o);a.o=c.pts;c.dts=c.pts;d&64&&(d=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,a.m==null&&(a.m=d),c.dts=c.pts!=
|
|
414
|
+
e?qk(d,a.m):d);a.m=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Fk=function(a){ub("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Xg(a,{ke:null,state:null})};
|
|
415
|
+
p.Xg=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;this.u=="hvc"&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0,n=this.u==="hvc";f==-1&&(l=0,m=n?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var q=a[h++];if(f)if(f===1)f=q?0:2;else if(q)if(q==1){q=h-f-1;if(l>=0)k.push({data:a.subarray(l+e,q),fullData:a.subarray(l,q),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.ke)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,
|
|
416
|
+
f.fullData.byteLength-g)),q>0&&(q=a.subarray(0,q),f.data=Ac(f.data,q),f.fullData=Ac(f.fullData,q),f.state=0);h<d?(m=n?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=q?0:1}l>=0&&f>=0&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.ke&&(c=k.length?k[k.length-1]:b.ke)&&(c.data=Ac(c.data,a),c.fullData=Ac(c.fullData,a));b.state=f;return k};
|
|
417
|
+
p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Ac.apply(uc,F(c.value)),(c=pk(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Zj(c.data),dts:c.dts,pts:c.pts});return a};
|
|
418
|
+
p.ub=function(){if(this.i.length&&!this.h.length)for(var a=t(this.i),b=a.next();!b.done;b=a.next()){var c=Ac.apply(uc,F(b.value)),d=pk(this,c);b=this.h.length?this.h[this.h.length-1]:null;d&&d.pts!=null&&d.dts!=null&&(!b||b.pts!=d.pts&&b.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(b=this.h.pop(),b.data=Ac(b.data,c),this.h.push(b))}return this.h};
|
|
419
|
+
p.td=function(a){a=a===void 0?!0:a;if(this.j.length&&!this.g.length){for(var b=t(this.j),c=b.next();!c.done;c=b.next()){var d=Ac.apply(uc,F(c.value)),e=pk(this,d);c=this.g.length?this.g[this.g.length-1]:null;e&&e.pts!=null&&e.dts!=null&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?this.g.push(e):this.g.length&&(d=e?e.data:d)&&(c=this.g.pop(),c.data=Ac(c.data,d),this.g.push(c))}if(a){b={ke:null,state:null};c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Xg(e,b),e.nalus.length&&(c.push(e),
|
|
420
|
+
b.ke=e.nalus[e.nalus.length-1]);this.g=c}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if(a=="audio"){a=null;var b=this.ub();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return a=="video"?(a=null,b=this.td(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.Yd=function(){return{audio:this.C,video:this.u}};p.cf=function(){for(var a=[],b=t(this.td()),c=b.next();!c.done;c=b.next())a.push.apply(a,F(c.value.nalus));return a};
|
|
421
|
+
p.ek=function(){ub("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Kg();return{height:a.height,width:a.width}};p.Kg=function(){return this.u=="hvc"?rk(this):sk(this)};function tk(a){var b=a.td();return b.length>1&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(Math.abs(1/(b-a)*9E4)):null}
|
|
422
|
+
function sk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.cf();if(!c.length)return b;c=c.find(function(r){return r.type==7});if(!c)return b;c=new dk(c.data);var d=kk(c),e=kk(c),f=kk(c);ik(c);if(uk.includes(d)){var g=U(c);g===3&&fk(c,1);ik(c);ik(c);fk(c,1);if(V(c)){g=g!==3?8:12;for(var h=0;h<g;h++)V(c)&&(h<6?lk(c,16):lk(c,64))}}ik(c);g=U(c);if(g===0)U(c);else if(g===1)for(fk(c,1),ik(c),ik(c),g=U(c),h=0;h<g;h++)ik(c);ik(c);fk(c,1);g=U(c);h=U(c);var k=gk(c,1);k===0&&fk(c,1);fk(c,1);
|
|
423
|
+
var l=0,m=0,n=0,q=0;V(c)&&(l=U(c),m=U(c),n=U(c),q=U(c));b.height=String((2-k)*(h+1)*16-n*2-q*2);b.width=String((g+1)*16-l*2-m*2);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=tk(a);return b}
|
|
424
|
+
function rk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.cf();if(!c.length)return b;c=c.find(function(H){return H.type==33});if(!c)return b;var d=new dk(c.fullData,!0);kk(d);kk(d);gk(d,4);var e=gk(d,3);V(d);var f=gk(d,2),g=gk(d,1),h=gk(d,5),k=gk(d,32);c=kk(d);for(var l=kk(d),m=kk(d),n=kk(d),q=kk(d),r=kk(d),u=kk(d),v=[],w=[],y=0;y<e;y++)v.push(V(d)),w.push(V(d));if(e>0)for(y=e;y<8;y++)gk(d,2);for(y=0;y<e;y++)v[y]&&gk(d,88),w[y]&&kk(d);U(d);e=U(d);e==3&&gk(d,1);v=U(d);w=U(d);var x=
|
|
425
|
+
y=0,z=0,C=0;V(d)&&(y+=U(d),x+=U(d),z+=U(d),C+=U(d));b.width=String(v-(y+x)*(e===1||e===2?2:1));b.height=String(w-(z+C)*(e===1?2:1));d=function(H){for(var D=0,A=0;A<32;A++)D|=(H>>A&1)<<31-A;return D>>>0}(k);g=g==1?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());q&&(f+="."+q.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
|
|
426
|
+
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=tk(a);return b}function qk(a,b){var c=1;for(a>b&&(c=-1);Math.abs(b-a)>4294967296;)a+=c*8589934592;return a}function vk(a){return ok(a)<0?!1:!0}function ok(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(a[c]==71&&a[c+188]==71&&a[c+376]==71)return c;var d=a.indexOf(71,c+1);c=d>=0&&d<b?d:c+1}return-1}N("shaka.util.TsParser",nk);nk.syncOffset=ok;nk.probe=vk;nk.prototype.getVideoInfo=nk.prototype.Kg;nk.prototype.getVideoResolution=nk.prototype.ek;
|
|
427
|
+
nk.prototype.getVideoNalus=nk.prototype.cf;nk.prototype.getCodecs=nk.prototype.Yd;nk.prototype.getStartTime=nk.prototype.getStartTime;nk.prototype.getVideoData=nk.prototype.td;nk.prototype.getAudioData=nk.prototype.ub;nk.prototype.getMetadata=nk.prototype.getMetadata;nk.prototype.parseNalus=nk.prototype.Xg;nk.prototype.parseAvcNalus=nk.prototype.Fk;nk.prototype.parse=nk.prototype.parse;nk.prototype.setDiscontinuitySequence=nk.prototype.Hf;nk.prototype.clearData=nk.prototype.clearData;
|
|
428
|
+
nk.Timescale=9E4;var uk=[100,110,122,244,44,83,86,118,128,138,139,134];function wk(a,b,c,d,e){var f=this;this.g=a;this.O=c;this.B=d;this.ba=b;this.l=new Map;this.G=new Map;this.Ta=new Map;this.h=null;this.Ga=!1;this.C=e||null;this.m=new Map;this.u=new gb;this.j=new Map;this.K=null;this.M=new Eg;this.Da="";this.ob=!1;this.za=!0;this.N=!1;this.D=this.R=null;this.i=xk(this,this.M);this.Ua=this.I=!1;this.H=new dh(function(){return yk(f)});this.J=!1;this.T="UNKNOWN";this.eb=this.kb=!1;this.ab=new Eg;this.o=!1;this.ya=null;this.$=new Map;this.oa=this.V=this.va=this.X=null;
|
|
429
|
+
this.ma=new Eg;this.g.remote&&(this.N=this.g.remote.state!="disconnected",this.u.F(this.g.remote,"connect",function(){f.N=f.g.remote.state!="disconnected"}),this.u.F(this.g.remote,"connecting",function(){f.N=f.g.remote.state!="disconnected"}),this.u.F(this.g.remote,"disconnect",function(){f.N=f.g.remote.state!="disconnected"}))}
|
|
430
|
+
function xk(a,b){a.za=!0;if(window.ManagedMediaSource){a.D||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.u.F(c,"startstreaming",function(){a.za=!0});a.u.F(c,"endstreaming",function(){a.za=!1})}else c=new MediaSource;a.u.Aa(c,"sourceopen",function(){URL.revokeObjectURL(a.Da);b.resolve()});a.u.Aa(a.g,"playing",function(){a.ob=!0});a.Da=Fk(c);if(a.B.useSourceElements){a.g.removeAttribute("src");var d;((d=a.R)==null?void 0:d.parentElement)===a.g&&a.g.removeChild(a.R);var e;((e=a.D)==
|
|
431
|
+
null?void 0:e.parentElement)===a.g&&a.g.removeChild(a.D);a.R=Lj(a.Da);a.g.appendChild(a.R);a.D&&a.g.appendChild(a.D);a.g.load()}else a.g.src=a.Da;return c}function Gk(a,b,c){if(a.g&&window.ManagedMediaSource&&a.i&&a.B.useSourceElements){var d;((d=a.D)==null?void 0:d.parentElement)===a.g&&a.g.removeChild(a.D);a.D=Lj(b,c);a.g.appendChild(a.D);a.g.disableRemotePlayback=!1}}
|
|
432
|
+
function Hk(){var a='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.03",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(F(Re)),b=
|
|
433
|
+
{};nb();a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(ef(c))b[c]=!0;else if(Tc()){var d=Ye(c),e=bg(Ze(c),d);d=Qe(d,e);b[c]=Ci(d)||(Je(d)?!0:!1)}else b[c]=Uc().canPlayType(c)!="";d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=wk.prototype;p.destroy=function(){return this.H.destroy()};
|
|
434
|
+
function yk(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y;return G(function(x){if(x.h==1){b=[];c=t(a.m);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=t(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.m.set(l,h.slice(0,1)),k&&b.push(k.p.catch(qf)),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new S(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return x.g(Promise.all(b),2)}r=t(a.j.values());for(u=r.next();!u.done;u=r.next())v=u.value,v.destroy();a.u&&(a.u.release(),a.u=null);a.g&&
|
|
435
|
+
((w=a.D)==null?void 0:w.parentElement)===a.g&&a.g.removeChild(a.D);a.g&&((y=a.R)==null?void 0:y.parentElement)===a.g&&(a.g.removeChild(a.R),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.R=null;a.D=null;a.B=null;a.i=null;a.h=null;a.ba=null;a.l.clear();a.Ta.clear();a.j.clear();a.K=null;a.m.clear();a.C=null;a.$.clear();a.O=null;x.j()})}
|
|
436
|
+
p.init=function(a,b,c,d){b=b===void 0?!1:b;c=c===void 0?"UNKNOWN":c;d=d===void 0?!1:d;var e=this,f,g,h,k,l,m;return G(function(n){if(n.h==1)return f=Jc,n.g(e.M,2);if(n.h!=3){if(!Ik(e)&&!Jk(e))return n.A(3);Va("Expected MediaSource to be open during init(); reopening the media source.");e.M=new Eg;e.i=xk(e,e.M);return n.g(e.M,3)}e.J=b;e.T=c;e.kb=d;e.eb=!e.J&&e.T=="HLS"&&!e.kb;e.$.clear();e.X=null;e.va=null;e.V=null;e.oa=null;e.ma=new Eg;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),
|
|
437
|
+
Kk(e,k,l,l.codecs),e.o?(e.m.set(f.aa,[]),e.m.set(f.wa,[])):e.m.set(k,[]);(m=a.get(f.aa))&&m.isAudioMuxedInVideo&&(e.o=!0);n.j()})};
|
|
438
|
+
function Kk(a,b,c,d){b=="audio"&&d&&(d=bg(d,c.mimeType));b=="video"&&d&&c.mimeType=="video/mp4"&&(d=cg(d));var e=Qe(c.mimeType,d);if(b==Hc)Lk(a,e,a.J,c.external);else{var f=a.B.forceTransmux;if(!Ci(e)||!a.J&&Re.includes(e))f=!0;var g=Se(c.mimeType,d);if(f){f=Fc("audio",(d||"").split(","));d=Fc("video",(d||"").split(","));if(f&&d){a.o=!0;Kk(a,"audio",c,f);Kk(a,"video",c,d);return}if(d=Je(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.B.addExtraFeaturesToSourceBuffer(e);eh(a.H);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new S(2,
|
|
439
|
+
3,3015,k,"The mediaSource_ status was "+a.i.readyState+" expected 'open'",null);}a.J&&(h.mode=Mk);a.u.F(h,"error",function(){var k=a.m.get(b)[0];k.p.reject(new S(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.u.F(h,"updateend",function(){return Nk(a,b)});a.l.set(b,h);a.G.set(b,e);a.Ta.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.B=a;this.h&&(this.h.C=a.modifyCueCallback)};function Ok(a){return a.za&&!a.N&&!a.I}
|
|
440
|
+
function Lk(a,b,c,d){a.h||(a.h=new af(a.ba),a.h&&(a.h.C=a.B.modifyCueCallback));var e=a.h,f=a.Ga;a=a.T;b=="application/cea-608"||b=="application/cea-708"?e.i=null:(e.i=cf.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):ub("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):ub("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.G=f,e.B=d)}
|
|
441
|
+
function Ik(a){return a.I?!1:a.i?a.i.readyState=="ended":!0}function Jk(a){return a.I?!1:a.i?a.i.readyState=="closed":!0}function Pk(a,b){return a.l.size?b==Hc?a.h.g:Ej(Qk(a,b)):null}function Rk(a,b){return a.l.size?b==Hc?a.h.h:Fj(Qk(a,b)):null}function Sk(a,b,c){if(b==Hc)return a=a.h,a.h==null||a.h<c?0:a.h-Math.max(c,a.g);a=Qk(a,b);return Hj(a,c)}
|
|
442
|
+
p.Hc=function(){var a={total:this.I?[]:Ij(this.g.buffered),audio:Ij(Qk(this,"audio")),video:Ij(Qk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;b!=null&&c!=null&&a.text.push({start:b,end:c})}return a};function Qk(a,b){if(a.I||a.N||Jk(a))return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
|
|
443
|
+
function Tk(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=null,k=[],l=Qb(c);if(Re.includes(f))c=Zj(l),c.length&&d&&((g=c.find(function(v){return v.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof g.data=="number"&&(h=Math.round(g.data)/1E3),a.O.onMetadata([{cueTime:d.startTime,data:l,frames:c,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.ea){l=new mh;var m=e.emsgSchemeIdUris!=null&&e.emsgSchemeIdUris.length>0||a.B.dispatchAllEmsgBoxes,n=[];m&&l.S("emsg",
|
|
444
|
+
function(v){a:{var w=e.emsgSchemeIdUris;if(v.version===0){var y=v.reader.Ed();var x=v.reader.Ed();var z=v.reader.W();var C=v.reader.W();var H=v.reader.W();var D=v.reader.W();var A=d.startTime+C/z}else z=v.reader.W(),A=v.reader.Fd()/z+d.timestampOffset,C=A-d.startTime,H=v.reader.W(),D=v.reader.W(),y=v.reader.Ed(),x=v.reader.Ed();v=v.reader.Tb(v.reader.getLength()-v.reader.Pa(),!0);if(w&&w.includes(y)||a.B.dispatchAllEmsgBoxes)if(y=="urn:mpeg:dash:event:2012")a.O.Ek();else{w=A;if(y!=="https://aomedia.org/emsg/ID3"||
|
|
445
|
+
H!==4294967295)w+=H/z;z={startTime:A,endTime:w,schemeIdUri:y,value:x,timescale:z,presentationTimeDelta:C,eventDuration:H,id:D,messageData:v};break a}z=null}z&&n.push(z)});var q=d.ea.timescale;b=q&&!isNaN(q);var r=0,u=!1;b&&l.S("prft",function(v){var w=v.reader,y=v.version;w.W();v=w.W();var x=w.W();v=v*1E3+x/4294967296*1E3;y===0?w=w.W():(y=w.W(),w=w.W(),w=y*4294967296+w);v=ck(v);w=(new Map).set("detail",{wallClockTime:v,programStartDate:new Date(v-w/q*1E3)});w=new T("prft",w);a.O.onEvent(w)}).box("moof",
|
|
446
|
+
uh).box("traf",uh).S("tfdt",function(v){u||(r=Gi(v.reader,v.version).baseMediaDecodeTime/q,u=!0,m||v.parser.stop())});(m||b)&&l.parse(c,!1,g);u&&d.timestampOffset==0&&(h=r);l=t(n);for(c=l.next();!c.done;c=l.next())Uk(a,c.value,d,h)}else f.includes("/mp4")||f.includes("/webm")||!vk(l)||(a.$.has(b)||a.$.set(b,new nk),k=a.$.get(b),k.clearData(),k.Hf(d.i),k.parse(l),l=k.getStartTime(b),l!=null&&(h=l),k=k.getMetadata());return{timestamp:h,metadata:k}}
|
|
447
|
+
function Uk(a,b,c,d){var e=bk(b.startTime,c.startTime+b.presentationTimeDelta/b.timescale);d&&a.T=="HLS"&&!e&&(c=-d+c.startTime,b.startTime+=c,b.endTime+=c);a.O.Ck(b);!b.messageData||b.schemeIdUri!="https://aomedia.org/emsg/ID3"&&b.schemeIdUri!="https://developer.apple.com/streaming/emsg-id3"||(c=Zj(b.messageData),c.length&&(d=b.startTime,a.O.onMetadata([{cueTime:d,data:b.messageData,frames:c,dts:d,pts:d}],0,b.endTime)))}
|
|
448
|
+
function Vk(a,b,c,d,e,f,g,h,k,l,m){g=g===void 0?!1:g;h=h===void 0?!1:h;k=k===void 0?!1:k;l=l===void 0?!1:l;var n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M;return G(function(L){switch(L.h){case 1:n=Jc;if(b!=n.Na){L.A(2);break}if(a.T!="HLS"){L.A(3);break}return L.g(a.ab,4);case 4:q=L.i,a.h.u=q;case 3:return L.g(ff(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.P()[0]:null),5);case 5:return L.return();case 2:if(l||!a.o){L.A(6);break}return L.g(Vk(a,n.aa,c,d,e,f,g,h,k,!0),7);case 7:return L.g(Vk(a,n.wa,
|
|
449
|
+
c,d,e,f,g,h,k,!0),8);case 8:return L.return();case 6:if(!a.l.has(b))return L.return();r=a.l.get(b).timestampOffset;u=a.G.get(b);a.j.has(b)&&(u=a.j.get(b).getOriginalMimeType());if(d&&(v=Tk(a,b,c,d,e,u,k),w=v.timestamp,y=v.metadata,w!=null&&(a.X==null&&b==n.wa&&(a.X=w,a.va=d.startTime,a.V!=null&&(x=0,a.va==a.oa&&(x=a.X-a.V),a.ma.resolve(x))),a.V==null&&b==n.aa&&(a.V=w,a.oa=d.startTime,a.X!=null&&(z=0,a.va==a.oa&&(z=a.X-a.V),a.ma.resolve(z))),C=w,H=Re,!a.J&&H.includes(a.G.get(b))&&(C=0),D=d.startTime-
|
|
450
|
+
C,A=Math.abs(r-D),(A>=.001||g||h)&&(!k||D>0||!r)&&(r=D,a.eb&&(Wk(a,b,function(){return Xk(a,b)},null),Wk(a,b,function(){return Yk(a,b,r)},null))),(B=b==n.wa||!a.l.has(n.wa))&&a.ab.resolve(r)),y.length))a.O.onMetadata(y,r,d?d.endTime:null);f&&b==n.wa&&(a.h||Lk(a,"application/cea-608",a.J,!1),a.K||(I=u.split(";",1)[0],a.K=new Yc(I)),d?(E=bd(a.K,c),E.length&&mf(a.h,E,r)):a.K.init(c,h,m));if(!a.j.has(b)){L.A(9);break}return L.g(a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:K=L.i,ArrayBuffer.isView(K)?
|
|
451
|
+
c=K:(J=K,J.init!=null&&(O=J.init,Wk(a,b,function(){a.C&&Mc(a.C,O,r,e);a.l.get(b).appendBuffer(O)},d?d.P()[0]:null)),c=J.data);case 9:c=Zk(a,e,c,d,b);if(!d||!a.J||b==n.Na){L.A(11);break}if(!g&&!h){L.A(11);break}P=d.startTime;if(a.T!="HLS"||a.o||b!=n.aa||!a.l.has(n.wa)){L.A(13);break}return L.g(a.ma,14);case 14:M=L.i,Math.abs(M)>.15&&(P-=M);case 13:Wk(a,b,function(){return Xk(a,b)},null),Wk(a,b,function(){return Yk(a,b,P)},null);case 11:return L.g(Wk(a,b,function(){var Q=c;a.C&&Mc(a.C,Q,r,e);a.l.get(b).appendBuffer(Q)},
|
|
452
|
+
d?d.P()[0]:null),15);case 15:L.j()}})}function $k(a,b){var c=Rk(a,"video")||0;kf(a.h,b,c)}function al(a){a.h&&kf(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f,g;return G(function(h){return h.h==1?(f=Jc,a==f.wa&&e.K&&(e.K.remove(d),g=e.h.g||0,e.h.remove(g,c,!0)),a==f.Na?h.g(e.h.remove(b,c),0):c>b?h.g(Wk(e,a,function(){return bl(e,a,b,c)},null),5):h.A(0)):e.o?h.g(Wk(e,f.aa,function(){return bl(e,f.aa,b,c)},null),0):h.A(0)})};
|
|
453
|
+
function cl(a,b){var c;return G(function(d){return d.h==1?(c=Jc,b==c.Na?a.h?d.g(a.h.remove(0,Infinity),0):d.return():b===c.wa&&a.K&&a.h?d.g(a.h.remove(0,Infinity,!0),4):d.A(4)):d.h!=6?d.g(Wk(a,b,function(){return bl(a,b,0,a.i.duration)},null),6):a.o?d.g(Wk(a,c.aa,function(){return bl(a,c.aa,0,a.i.duration)},null),0):d.A(0)})}
|
|
454
|
+
p.flush=function(a){var b=this,c;return G(function(d){return d.h==1?(c=Jc,a==c.Na?d.return():d.g(Wk(b,a,function(){b.g.currentTime-=.001;Nk(b,a)},null),2)):b.o?d.g(Wk(b,c.aa,function(){var e=c.aa;b.g.currentTime-=.001;Nk(b,e)},null),0):d.A(0)})};
|
|
455
|
+
function dl(a,b,c,d,e,f,g,h,k){var l,m,n;return G(function(q){if(q.h==1){l=Jc;if(b==l.Na)return f||(a.h.u=c),jf(a.h,d,e),q.return();m=[];return q.g(el(a,b,g,h,k),2)}n=q.i;n||(m.push(Wk(a,b,function(){return Xk(a,b)},null)),a.o&&m.push(Wk(a,l.aa,function(){return Xk(a,l.aa)},null)));f||(m.push(Wk(a,b,function(){return Yk(a,b,c)},null)),a.o&&m.push(Wk(a,l.aa,function(){return Yk(a,l.aa,c)},null)));if(d!=0||e!=Infinity)m.push(Wk(a,b,function(){return fl(a,b,d,e)},null)),a.o&&m.push(Wk(a,l.aa,function(){return fl(a,
|
|
456
|
+
l.aa,d,e)},null));return m.length?q.g(Promise.all(m),0):q.A(0)})}function gl(a,b,c){var d,e;return G(function(f){if(f.h==1){d=Jc;if(b==d.Na)return f.return();b==d.wa&&(a.ab=new Eg);if(!a.J||(e=Rk(a,b))&&Math.abs(e-c)<.15)return f.return();Wk(a,b,function(){return Xk(a,b)},null);a.o&&Wk(a,d.aa,function(){return Xk(a,d.aa)},null);return f.g(Wk(a,b,function(){return Yk(a,b,c)},null),2)}return a.o?f.g(Wk(a,d.aa,function(){return Yk(a,d.aa,c)},null),0):f.A(0)})}
|
|
457
|
+
p.endOfStream=function(a){var b=this;return G(function(c){return c.g(hl(b,function(){Ik(b)||Jk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.Ab=function(a){var b=this;return G(function(c){return c.g(hl(b,function(){if(b.B.durationReductionEmitsUpdateEnd&&a<b.i.duration)for(var d=t(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new Eg,uri:null};b.m.get(e).unshift(f)}b.i.duration=a;b.ya=a}),0)})};p.getDuration=function(){return this.i.duration};
|
|
458
|
+
function il(a,b,c){G(function(d){return a.H.g||a.g.error||a.N||a.I||Ik(a)||Jk(a)?d.return():d.g(hl(a,function(){Ik(a)||Jk(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function jl(a){G(function(b){return a.H.g||a.g.error||a.N||a.I||Ik(a)||Jk(a)?b.return():b.g(hl(a,function(){Ik(a)||Jk(a)||a.i.clearLiveSeekableRange()}),0)})}function bl(a,b,c,d){if(d<=c)Nk(a,b);else{if(a.C){var e=a.C;b==="video"&&e.g&&e.g.flushBuffer(c,d)}a.l.get(b).remove(c,d)}}
|
|
459
|
+
function Xk(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Nk(a,b)}function Yk(a,b,c){c<0&&(c+=.001);a.l.get(b).timestampOffset=c;Nk(a,b)}function fl(a,b,c,d){var e=a.l.get(b);if(e.appendWindowEnd!==d||e.appendWindowStart!==c)e.appendWindowStart=0,e.appendWindowEnd=d,e.appendWindowStart=c;Nk(a,b)}
|
|
460
|
+
function Nk(a,b){if(a.I||a.H.g){var c=a.m.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.m.set(b,[]))}else if(c=a.m.get(b)[0])c.p.resolve(),kl(a,b)}function Wk(a,b,c,d){eh(a.H);c={start:c,p:new Eg,uri:d};a.m.get(b).push(c);a.m.get(b).length==1&&ll(a,b);return c.p}
|
|
461
|
+
function hl(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z;return G(function(C){switch(C.h){case 1:eh(a.H);c=[];d=Array.from(a.l.keys());e=new Map;f=t(d);g=f.next();for(h={};!g.done;h={ready:void 0},g=f.next())k=g.value,h.ready=new Eg,l={start:function(H){return function(){return H.ready.resolve()}}(h),p:h.ready,uri:null},m=a.m.get(k),m.push(l),c.push(h.ready),e.set(k,l),m.length==1&&l.start();C.m(2);return C.g(Promise.all(c),4);case 4:C.o(3);break;case 2:n=C.l();if(a.H.g){q=t(d);for(r=q.next();!r.done;r=
|
|
462
|
+
q.next())u=r.value,v=a.m.get(u),e.has(u)&&cb(v,e.get(u));return C.return()}throw n;case 3:return C.m(5,6),C.g(b(),6);case 6:C.u();w=t(d);for(y=w.next();!y.done;y=w.next())x=y.value,kl(a,x);C.B(0);break;case 5:throw z=C.l(),new S(2,3,3015,z,a.g.error||"No error in the media element",null);}})}function kl(a,b){a.m.get(b).shift();ll(a,b)}
|
|
463
|
+
function ll(a,b){var c=a.m.get(b)[0];if(c)try{c.start()}catch(d){d.name=="QuotaExceededError"?c.p.reject(new S(2,3,3017,b)):Ok(a)?c.p.reject(new S(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new S(2,3,3024,b)),kl(a,b)}}function ml(a,b){a.ba=b;a.h&&(a.h.l=b)}
|
|
464
|
+
function Zk(a,b,c,d,e){if(Ue(a.G.get(e))!="mp4")return c;var f=d===null,g=a.Ta.get(e),h=a.O.Mj(),k=!1;d&&d.ea&&(k=d.ea.encrypted);d=d?d.P()[0]:null;var l=nb();a.B.correctEc3Enca&&f&&e==="audio"&&(c=oj(c));a.B.insertFakeEncryptionInInit&&g&&l.Gd(h,e)&&(f?c=pj(b,c,d):!k&&l.Ji(e)&&(c=sj(c)));f&&l.re()&&(c=vj(c));return c}
|
|
465
|
+
function nl(a,b,c,d){return Wk(a,b,function(){if(b!==Hc){a.G.get(b);if(nb().Bb()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.B.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.G.set(b,c)}Nk(a,b)}},null)}
|
|
466
|
+
function ol(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H;return G(function(D){if(D.h==1){if(a.I||a.N)return D.return();c=Jc;a.I=!0;a.o=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Ua=!0);a.ob&&(a.g.autoplay=!1);D.D(2);a.u.Qa();f=t(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=t(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(A){}}a.j.clear();a.l.clear();n=a.i.duration;a.M=new Eg;a.i=xk(a,a.M);return D.g(a.M,4)}if(D.h!=
|
|
467
|
+
2){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.ya)&&a.ya&&(a.i.duration=a.ya);q=new Eg;r=a.i.sourceBuffers;u=b.size;v=0;w=function(){v++;v===u&&(q.resolve(),a.u.Ma(r,"addsourcebuffer",w))};a.u.F(r,"addsourcebuffer",w);y=t(b.keys());for(x=y.next();!x.done;x=y.next())z=x.value,C=b.get(z),Kk(a,z,C,C.codecs);(H=b.get(c.aa))&&H.isAudioMuxedInVideo&&(a.o=!0);a.o&&!a.m.has(c.aa)&&a.m.set(c.aa,[]);return D.g(q,2)}D.u();a.I=!1;eh(a.H);a.u.Aa(a.g,"loadedmetadata",function(){a.H.g||(a.g.currentTime=d)});a.u.Aa(a.g,
|
|
468
|
+
"canplaythrough",function(){a.H.g||(a.g.autoplay=e,a.Ua&&(a.Ua=!1,a.g.play()))});return D.B(0)})}function pl(a,b){return hl(a,function(){return ol(a,b)})}
|
|
469
|
+
function ql(a,b,c,d){var e=!1,f=Fc("audio",(d||"").split(",")),g=Fc("video",(d||"").split(",")),h=g;b=="audio"&&(h=f);h||(h=d);var k=Qe(c,h),l=Ye(a.G.get(b)),m=a.B.forceTransmux;!Ci(k)||!a.J&&Re.includes(k)?m=!0:m||c==l||(m=!nb().Kf()&&Re.includes(c));if(m&&(a=Se(c,h),h=Je(a))){var n=h();f&&g&&(e=!0);k=n.convertCodecs(b,a)}!n&&b==="video"&&f&&(k=Qe(c,d));b=Ve(Ze(k));return{lc:n,hl:e,Qh:Ye(k),codec:b,mimeType:k}}
|
|
470
|
+
function rl(a,b,c,d,e){if(b==Hc)return{type:sl,uf:c,lc:null};var f=Ve(Ze(a.G.get(b))),g=Ye(a.G.get(b)),h=ql(a,b,c,d),k=h.lc,l=h.hl,m=h.Qh,n=h.codec;h=h.mimeType;var q=!0;l&&a.G.has("audio")&&(c=ql(a,"audio",c,d),d=Ve(Ze(a.G.get("audio"))),q=Ye(a.G.get("audio")),q=d==c.codec&&q==c.Qh,c.lc&&c.lc.destroy());if(f===n&&g===m&&q)return{type:sl,uf:h,lc:k};f=!0;if(a.o&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;b=nb();if(f&&a.B.codecSwitchingStrategy==="smooth"&&b.Bb())return{type:tl,uf:h,lc:k};k&&k.destroy();
|
|
471
|
+
return{type:ul,uf:h,lc:null}}
|
|
472
|
+
function el(a,b,c,d,e){var f,g,h,k,l,m;return G(function(n){if(n.h==1){f=Jc;g=rl(a,b,c,d,e);h=g.type;k=g.lc;l=g.uf;if(m=e.get(f.aa))a.o=m.isAudioMuxedInVideo;if(h==sl)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==tl)return n.g(nl(a,b,l,k),3);if(h!=ul)return n.A(3);k&&k.destroy();return n.g(pl(a,e),3)}return n.return(!0)})}
|
|
473
|
+
function vl(a,b,c,d,e){a=rl(a,b,c,d,e);a.lc&&a.lc.destroy();return a.type==ul}var Fk=window.URL.createObjectURL,Mk="sequence",sl="none",ul="reset",tl="changeType";function wl(a,b,c){this.i=a;this.D=b;this.u=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.J=!1;this.I=0;this.G=c===void 0?!0:c;this.H=0;this.o=!1;this.m=a}p=wl.prototype;p.getDuration=function(){return this.l};p.Oj=function(){return this.h};p.Si=function(a){this.i=a};p.Ab=function(a){this.l=a};p.Tj=function(){return this.i};p.Ri=function(a){this.B=a};p.$c=function(a){a&&!this.C&&(this.J=!0);this.C=a};p.If=function(a){this.u=a};p.bf=function(){return this.u};
|
|
474
|
+
p.ph=function(a){this.D=a};p.Gj=function(){return this.D};p.Di=function(a,b){if(a.length!=0){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(a.length!=0){var d=a[a.length-1].end+b;this.vf(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);this.i!=null&&this.G&&!this.o&&(this.i=c-this.g-this.h)}}};
|
|
475
|
+
p.le=function(a){if(a.length!=0){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.vf(b);this.g=Math.max(this.g,c);this.i!=null&&this.G&&!this.o&&(this.i=d-this.g-this.h)}};p.Ci=function(a,b){this.vf(a);b==Infinity||this.U()||(this.g=Math.max(this.g,b))};p.Pj=function(){return this.g};p.nf=function(){this.o=!0};
|
|
476
|
+
p.qk=function(){return this.o};p.qh=function(a){this.m=a};p.Lj=function(){return this.m};p.vf=function(a){this.j==null?this.j=a:this.J||(this.j=Math.min(this.j,a))};p.Tg=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){this.j!=null&&(this.j+=a);this.g!=null&&(this.g+=a)};p.U=function(){return this.l==Infinity&&!this.C};p.Uc=function(){return this.l!=Infinity&&!this.C};p.Jb=function(){return Math.max(this.I,this.Jc()-this.u)};p.Vi=function(a){this.I=a};
|
|
477
|
+
p.Jc=function(){return this.U()||this.Uc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l};p.ae=function(a){var b=Math.max(this.j,this.I);return this.u==Infinity?Math.ceil(b*1E3)/1E3:Math.max(b,Math.min(this.Jc()-this.u+a,this.Ib()))};p.$b=function(){return this.ae(0)};p.Ib=function(){return Math.max(0,this.Jc()-(this.U()||this.Uc()?this.D:0))};p.hj=function(){return this.i==null||this.g!=null&&this.G?!1:!0};
|
|
478
|
+
p.Qi=function(a){this.H=a};p.Bj=function(){return this.H};N("shaka.media.PresentationTimeline",wl);wl.prototype.getAvailabilityTimeOffset=wl.prototype.Bj;wl.prototype.setAvailabilityTimeOffset=wl.prototype.Qi;wl.prototype.usingPresentationStartTime=wl.prototype.hj;wl.prototype.getSeekRangeEnd=wl.prototype.Ib;wl.prototype.getSeekRangeStart=wl.prototype.$b;wl.prototype.getSafeSeekRangeStart=wl.prototype.ae;wl.prototype.getSegmentAvailabilityEnd=wl.prototype.Jc;wl.prototype.setUserSeekStart=wl.prototype.Vi;
|
|
479
|
+
wl.prototype.getSegmentAvailabilityStart=wl.prototype.Jb;wl.prototype.isInProgress=wl.prototype.Uc;wl.prototype.isLive=wl.prototype.U;wl.prototype.offset=wl.prototype.offset;wl.prototype.notifyMaxSegmentDuration=wl.prototype.Tg;wl.prototype.notifyMinSegmentStartTime=wl.prototype.vf;wl.prototype.getInitialProgramDateTime=wl.prototype.Lj;wl.prototype.setInitialProgramDateTime=wl.prototype.qh;wl.prototype.isStartTimeLocked=wl.prototype.qk;wl.prototype.lockStartTime=wl.prototype.nf;
|
|
480
|
+
wl.prototype.getMaxSegmentEndTime=wl.prototype.Pj;wl.prototype.notifyPeriodDuration=wl.prototype.Ci;wl.prototype.notifySegments=wl.prototype.le;wl.prototype.notifyTimeRange=wl.prototype.Di;wl.prototype.getDelay=wl.prototype.Gj;wl.prototype.setDelay=wl.prototype.ph;wl.prototype.getSegmentAvailabilityDuration=wl.prototype.bf;wl.prototype.setSegmentAvailabilityDuration=wl.prototype.If;wl.prototype.setStatic=wl.prototype.$c;wl.prototype.setClockOffset=wl.prototype.Ri;
|
|
481
|
+
wl.prototype.getPresentationStartTime=wl.prototype.Tj;wl.prototype.setDuration=wl.prototype.Ab;wl.prototype.setPresentationStartTime=wl.prototype.Si;wl.prototype.getMaxSegmentDuration=wl.prototype.Oj;wl.prototype.getDuration=wl.prototype.getDuration;function xl(a,b,c,d){var e=this;this.u=d;this.g=a;this.D=b;this.h=c;this.j=new gb;this.m=!1;this.l=0;this.C=!1;this.H=this.G=0;this.o=yl(this);this.B=!1;this.j.F(a,"waiting",function(){return zl(e)});this.i=(new of(function(){zl(e)})).Ea(this.h.gapJumpTimerTime)}xl.prototype.release=function(){this.j&&(this.j.release(),this.j=null);this.i!=null&&(this.i.stop(),this.i=null);this.o&&(this.o.release(),this.o=null);this.g=this.D=this.u=null};
|
|
482
|
+
xl.prototype.zd=function(){this.B=!0;this.i&&this.i.Ea(this.h.gapJumpTimerTime);zl(this)};
|
|
483
|
+
function zl(a){if(a.g.readyState!=0){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||a.g.currentTime==a.l&&(a.g.autoplay||a.g.currentTime!=a.l)){var b;if(!(b=!a.o)){b=a.o;var c=b.h,d=Al(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.i=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.i)b.j&&b.j(b.g,e),b.i=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Jj(c,b,a.h.gapDetectionThreshold),d==null||d==0&&!a.B||(e=c.start(d),(f=a.h.gapPadding)&&(e=Math.ceil((e+f)*
|
|
484
|
+
100)/100),e>=a.D.Ib()||e-b<.001||(d!=0&&c.end(d-1),Bl(a,e),b==a.l&&(a.l=e),a.G++,a.u(new T("gapjumped")))))}}}function Bl(a,b){a.C=!0;a.j.Aa(a.g,"seeked",function(){a.C=!1});a.g.currentTime=b}
|
|
485
|
+
function yl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new Cl(new Dl(a.g),b,function(){var d;return G(function(e){if(e.h==1)return d=Ij(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.A(2)):e.g(a.g.play(),3):e.return();if(e.h!=2){if(!a.g)return e.return();a.g.pause();a.g.play()}a.H++;a.u(new T("stalldetected"));e.j()})})}function Cl(a,b,c){this.h=a;this.m=Al(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.o=b;this.j=c}
|
|
486
|
+
Cl.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function Dl(a){var b=this;this.g=a;this.h=new gb;this.i=!1;this.h.F(this.g,"audiofocuspaused",function(){b.i=!0});this.h.F(this.g,"audiofocusgranted",function(){b.i=!1});this.h.F(this.g,"audiofocuslost",function(){b.i=!0})}
|
|
487
|
+
function Al(a){if(a.g.paused||a.g.playbackRate==0||a.i||a.g.buffered.length==0)var b=!1;else a:{b=a.g.currentTime;a=t(Ij(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b}Dl.prototype.release=function(){this.h&&this.h.release();this.h=null};function El(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Fl.value().get(b),c.Aa(a,b,d))}var Fl=new mb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Gl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){e.l==null&&(e.l=d());return e.l};this.o=!1;this.h=new gb;this.i=new Hl(a);El(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Il(e,e.j())})}Gl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i!=null&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Jl(a){return a.o?a.g.currentTime:a.j()}
|
|
488
|
+
function Kl(a,b){a.g.readyState>0?Ll(a.i,b):El(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Il(a,a.j())})}function Il(a,b){Math.abs(a.g.currentTime-b)<.001?Ml(a):(a.h.Aa(a.g,"seeking",function(){Ml(a)}),Ll(a.i,a.g.currentTime&&a.g.currentTime!=0?a.g.currentTime:b))}function Ml(a){a.o=!0;a.h.F(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
|
|
489
|
+
function Hl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new of(function(){b.i<=0?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Hl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Ll(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ea(.1)};function Nl(a){this.g=a;this.i=!1;this.h=null;this.j=new gb}p=Nl.prototype;p.ready=function(){function a(){if(b.h==null||b.h==0&&b.g.duration!=Infinity)b.i=!0;else{var c=b.g.currentTime,d=null;if(typeof b.h==="number")d=b.h;else if(b.h instanceof Date){var e=Ol(b);e!==null&&(d=b.h.getTime()/1E3-e,d=Pl(b,d))}d==null?b.i=!0:(d<0&&(d=Math.max(0,c+d)),c!=d?(b.j.Aa(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;El(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){a()})};
|
|
490
|
+
p.release=function(){this.j&&(this.j.release(),this.j=null);this.g=null};p.Wf=function(a){this.h=this.i?this.h:a};p.Qd=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(Ol(this)||0),a=Pl(this,a));return a||0};p.Kh=function(){return 0};p.Ih=function(){return 0};p.Jh=function(){return!1};p.Bi=function(){};p.ni=function(){var a=Fj(this.g.buffered);return a!=null&&a>=this.g.duration-1};
|
|
491
|
+
function Ol(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}function Pl(a,b){a=a.g.seekable;a.length>0&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
|
|
492
|
+
function Ql(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.u=e;this.o=null;this.i=new xl(a,b.presentationTimeline,c,f);this.j=new Gl(a,function(){a:{var h=g.i;h.m=!0;h.B=!1;h.i&&h.i.Ea(h.h.gapJumpTimerTime);zl(h);var k=Jl(g.j);h=Rl(g,k);if(!Ei()&&Math.abs(h-k)>.001){k=!1;var l=nb().Oi();if(l){var m=Date.now()/1E3;if(!g.o||g.o<m-l)g.o=m,k=!0}else k=!0;if(k){Kl(g.j,h);h=void 0;break a}}g.u();h=void 0}return h},function(h){var k=g.i;k.g.seeking&&!k.m&&(k.m=!0,k.l=h);k.i&&
|
|
493
|
+
k.i.Ea(k.h.gapJumpTimerTime);zl(k)},function(){return Sl(g,d)});this.m=new of(function(){if(g.h.readyState!=0&&!g.h.paused){var h=Jl(g.j),k=g.g.$b(),l=g.g.Ib();l-k<3&&(k=l-3);h<k&&(h=Rl(g,h),g.h.currentTime=h)}})}p=Ql.prototype;p.ready=function(){this.m.Ea(.25)};p.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.m&&(this.m.stop(),this.m=null);this.h=this.j=this.g=this.l=null;this.u=function(){}};p.Wf=function(a){Kl(this.j,Sl(this,a))};
|
|
494
|
+
p.Qd=function(){var a=Jl(this.j);return this.h.readyState>0&&!this.h.paused?Tl(this,a):a};p.Kh=function(){return this.i.H};p.Ih=function(){return this.i.G};p.Jh=function(){return this.i.C};function Sl(a,b){b==null?b=a.g.getDuration()<Infinity?a.g.$b():a.g.Ib():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):b<0&&(b=a.g.Ib()+b);return Ul(a,Tl(a,b))}p.Bi=function(){this.i.zd()};p.ni=function(){if(this.g.U()){var a=this.g.Jc(),b=Fj(this.h.buffered);if(b!=null&&b>=a)return!0}return!1};
|
|
495
|
+
function Ul(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Rl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.$b(),f=a.g.Ib(),g=a.g.getDuration();f-e<3&&(e=f-3);var h=a.g.ae(c),k=a.g.ae(d);c=a.g.ae(c+d);return b>=g?Ul(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.U()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:Gj(a.h.buffered,k)?k:c:b>=h||Gj(a.h.buffered,b)?b:c}function Tl(a,b){var c=a.g.$b();if(b<c)return c;a=a.g.Ib();return b>a?a:b};function Vl(a){this.g=a;this.m=null;this.i=0;this.o=!1}p=Vl.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.yk=function(){this.o=!0};p.Hb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function jg(a){return a.g[0]||null}
|
|
496
|
+
p.find=function(a){for(var b=this.g.length-1,c=b;c>=0;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(this.g.length==0)return null;a-=this.i;return a<0||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
497
|
+
p.qf=function(a){if(!this.o&&a.length){var b=Math.round(a[0].startTime*1E3)/1E3;this.g=this.g.filter(function(c){return Math.round(c.startTime*1E3)/1E3<b});this.g.push.apply(this.g,F(a))}};p.je=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(c.g.length==0||d.endTime>c.g[0].startTime)});this.qf(a);this.Ya(b)};p.Ya=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
|
|
498
|
+
p.nd=function(a,b,c){c=c===void 0?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;this.g.length!=0&&(a=this.g[this.g.length-1],b=new yj(a.startTime,b,a.C,a.startByte,a.endByte,a.ea,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
|
|
499
|
+
p.Of=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new of(function(){var d=b();d?c.g.push.apply(c.g,F(d)):(c.m.stop(),c.m=null)}),this.m.Ea(a))};Vl.prototype[Symbol.iterator]=function(){return this.Xb(0)};
|
|
500
|
+
Vl.prototype.Xb=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this.find(a);if(d==null)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&e.g.length>0)for(var g=e.g.length-1;g>=0;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Va("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Wl(this,d,f,c)};Vl.prototype.Ve=function(){return-1};
|
|
501
|
+
function Xl(a,b,c){a=new yj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Vl([a])}N("shaka.media.SegmentIndex",Vl);Vl.forSingleSegment=Xl;Vl.prototype.getIteratorForTime=Vl.prototype.Xb;Vl.prototype.updateEvery=Vl.prototype.Of;Vl.prototype.fit=Vl.prototype.nd;Vl.prototype.evict=Vl.prototype.Ya;Vl.prototype.mergeAndEvict=Vl.prototype.je;Vl.prototype.offset=Vl.prototype.offset;Vl.prototype.get=Vl.prototype.get;Vl.prototype.find=Vl.prototype.find;Vl.prototype.markImmutable=Vl.prototype.yk;
|
|
502
|
+
Vl.prototype.release=Vl.prototype.release;Vl.prototype.getNumEvicted=Vl.prototype.getNumEvicted;Vl.prototype.getNumReferences=Vl.prototype.getNumReferences;function Wl(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=Wl.prototype;p.Kd=function(a){this.reverse=a};p.wj=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&a.g.length>0&&a.m&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&a.g.length>0?a.g[this.g]:a};
|
|
503
|
+
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&a.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(a=this.i.get(this.h))&&a.g.length>0?a.g.length-1:0)):(this.h--,this.g=0):a&&a.g.length>0?(this.g++,a.m&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.hh=function(){var a=this.current();if(a&&a.Wc&&!a.l&&(a=this.i.get(this.h))&&a.g.length>0)for(var b=a.g[this.g];b.l&&!(this.g<=0);)this.g--,b=a.g[this.g]};
|
|
504
|
+
N("shaka.media.SegmentIterator",Wl);Wl.prototype.resetToLastIndependent=Wl.prototype.hh;Wl.prototype.next=Wl.prototype.next;Wl.prototype.current=Wl.prototype.current;Wl.prototype.currentPosition=Wl.prototype.wj;Wl.prototype.setReverse=Wl.prototype.Kd;function Yl(){Vl.call(this,[]);this.h=[]}na(Yl,Vl);p=Yl.prototype;p.clone=function(){var a=new Yl;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){this.h=[]};p.Hb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Hb(a)};
|
|
505
|
+
function Zl(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(e!=null)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function $l(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.find(b)!=null)return c.Ve();return-1}
|
|
506
|
+
p.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.qf=function(){};p.Ya=function(a){if(this.h.length){var b=this.h[0];b.Ya(a);b.getNumReferences()==0&&(this.h.shift(),this.i+=b.getNumEvicted(),b.release(),this.Ya(a))}};p.je=function(){};p.nd=function(){};p.Of=function(){};N("shaka.media.MetaSegmentIndex",Yl);Yl.prototype.updateEvery=Yl.prototype.Of;
|
|
507
|
+
Yl.prototype.fit=Yl.prototype.nd;Yl.prototype.mergeAndEvict=Yl.prototype.je;Yl.prototype.evict=Yl.prototype.Ya;Yl.prototype.merge=Yl.prototype.qf;Yl.prototype.offset=Yl.prototype.offset;Yl.prototype.get=Yl.prototype.get;Yl.prototype.find=Yl.prototype.find;Yl.prototype.forEachTopLevelReference=Yl.prototype.Hb;Yl.prototype.release=Yl.prototype.release;function am(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ig();this.h=new of(function(){b.g.isPaused()||b.g.Ak(b.i*.25)})}am.prototype.release=function(){this.set(this.qd());this.h&&(this.h.stop(),this.h=null);this.g=null};am.prototype.set=function(a){this.i=a;bm(this)};am.prototype.qd=function(){return this.g.qd()};function bm(a){a.h.stop();var b=a.j?0:a.i;if(b>=0)try{a.g.Ig()!=b&&a.g.Ti(b);return}catch(c){}a.h.Ea(.25);a.g.Ig()!=0&&a.g.Ti(0)};function cm(a){var b=this;this.j=a;this.h=new gb;this.g=new Set;this.i=(new of(function(){dm(b,!1)})).Cb();a.paused||this.i.Ea(.25);this.h.F(a,"playing",function(){b.i.Cb().Ea(.25)});this.h.F(a,"pause",function(){b.i.stop()});this.h.F(a,"seeked",function(){b.i.Cb();a.paused||b.i.Ea(.25)})}cm.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
|
|
508
|
+
function dm(a,b){var c=a.j.currentTime;a=t(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function em(a){Og.call(this);this.g=new Map;this.h=a}na(em,Og);em.prototype.release=function(){this.g.clear();Og.prototype.release.call(this)};function fm(a,b){var c=a.g.get(b);c||(c={qe:[],lg:null,contentType:b},a.g.set(b,c));return c}function gm(a,b,c){var d=fm(a,b.contentType);hm(a,d);a={xd:b,position:c};d=d.qe;b=d.findIndex(function(e){return e.position>=c});b>=0?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
509
|
+
em.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.lg;a:{var e=c.qe;for(var f=e.length-1;f>=0;f--){var g=e[f];if(g.position<=a){e=g.xd;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
|
|
510
|
+
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!eb(d.roles,e.roles);(g||h||d)&&im(this,a,e.contentType)&&(c.lg=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&im(this,a,e.contentType)&&(c.lg=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
|
|
511
|
+
function im(a,b,c){return(a=a.h()[c])&&a.length>0&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function hm(a,b){if((a=a.h()[b.contentType])&&a.length>0){var c=a[0].start,d=a[a.length-1].end,e=b.qe;b.qe=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.qe=[]}
|
|
512
|
+
function jm(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};a.type=="video"&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);a.type=="audio"&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
|
|
513
|
+
a.language);return b};function km(a){Og.call(this);this.h=new Map;this.i=a;this.g=null}na(km,Og);km.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);Og.prototype.release.call(this)};function lm(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new T("regionadd",new Map([["region",b]])),a.dispatchEvent(b),mm(a))}
|
|
514
|
+
function mm(a){a.g||(a.g=(new of(function(){for(var b=a.i(),c=t(a.h),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new T("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).Ea(2))};function nm(a,b,c,d,e){function f(g,h){return h.fastSwitching&&g.Wc&&g.ie?!1:!0}this.m=a;this.i=b;this.l=c;this.g=new Map;this.j=new Map;this.h=null;this.o=d;this.u=e||f}function om(a,b){a.l=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
515
|
+
function pm(a,b,c){c=c===void 0?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.h||(a.h=a.i.segmentIndex.Xb(b,!0,a.o));if(!a.h)return Promise.resolve();c&&a.h.next();for(b=[];a.g.size<a.m;){c=a.h.next().value;if(!c)break;var d=!0;c.isPreload()&&c.endByte!=null&&(d=!1);c.bc()==2&&(d=!1);c.ac(!1)&&(d=!1);d&&c.ea&&b.push(qm(a,c.ea));d&&!a.g.has(c)&&(d=new rm(a.l),b.push(sm(d,c,a.i)),a.g.set(c,d));if(!a.u(c,a.i))break}tm(a);return Promise.all(b)}
|
|
516
|
+
function qm(a,b){if(!a.i.segmentIndex||b.ac()||Array.from(a.j.keys()).some(function(e){return xj(e,b)}))return Promise.resolve();var c=new rm(a.l),d=sm(c,b,a.i);a.j.set(b,c);return d}function um(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&vm(a,c)}function wm(a){um(a,a.g);um(a,a.j);a.h=null}nm.prototype.Ya=function(a,b){b=b===void 0?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&vm(this,d);b&&tm(this)};
|
|
517
|
+
nm.prototype.Kd=function(a){this.o=a;this.h&&this.h.Kd(a)};function tm(a){if(a.g.size)for(var b=Array.from(a.g.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Ng:void 0},d=c.next())e.Ng=d.value,b.some(function(f){return function(g){return xj(g.ea,f.Ng)}}(e))||vm(a,e.Ng)}function xm(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&vm(a,d)}tm(a)}function ym(a,b){b&&b!==a.i&&(wm(a),a.i=b)}
|
|
518
|
+
function vm(a,b){var c=a.g;b instanceof wj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function rm(a){this.g=a;this.me=this.xh=null}function sm(a,b,c){var d=new Uint8Array(0);a.me=a.g(b,c,function(e){return G(function(f){if(f.h==1)return d.byteLength>0?d=Ac(d,e):d=e,a.xh?f.g(a.xh(d),3):f.A(0);d=new Uint8Array(0);f.j()})});return a.me.promise.catch(function(e){return e instanceof S&&e.code==7001?Promise.resolve():Promise.reject(e)})}rm.prototype.abort=function(){this.me&&this.me.abort()};N("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function zm(a){var b=Ye(a),c=b.split("/")[0];a=Ze(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,ye:null,colorGamut:null,frameRate:null,timescale:null}}
|
|
519
|
+
function Am(a,b,c){function d(B){x=B.name;var I=B.reader;I.skip(24);var E=I.Ca(),K=I.Ca();I.skip(50);q=String(E);n=String(K);B.reader.Ka()&&uh(B)}function e(B){var I=Ji(B.reader);r=I.channelCount;u=I.sampleRate;f(B.name)}function f(B){B=B.toLowerCase();switch(B){case "avc1":case "avc3":h.push(B+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(B+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(B+".05.04");l=!0;break;case "vp09":h.push(B+".00.10.08");l=!0;break;case "av01":h.push(B+".0.01M.08");
|
|
520
|
+
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(B);k=!0;break;case "apac":g.push("apac.31.00"),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,r=null,u=null,v=null,w=null,y=null,x;(new mh).box("moov",uh).box("trak",uh).box("mdia",uh).S("mdhd",function(B){B=Hi(B.reader,B.version);m=B.language;y=B.timescale}).box("minf",uh).box("stbl",uh).S("stsd",wh).box("mp4a",function(B){var I=Ji(B.reader);r=I.channelCount;u=I.sampleRate;
|
|
521
|
+
B.reader.Ka()?uh(B):f(B.name)}).box("esds",function(B){B=B.reader;for(var I="mp4a",E,K;B.Ka();){E=B.Z();for(var J=B.Z();J&128;)J=B.Z();if(E==3)B.Ca(),J=B.Z(),J&128&&B.Ca(),J&64&&B.skip(B.Z()),J&32&&B.Ca();else if(E==4)K=B.Z(),B.skip(12);else if(E==5)break}K&&(I+="."+Mi(K),E==5&&B.Ka()&&(E=B.Z(),K=(E&248)>>3,K===31&&B.Ka()&&(K=32+((E&7)<<3)+((B.Z()&224)>>5)),I+="."+K));g.push(I);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("apac",e).box("avc1",d).box("avc3",d).box("hev1",
|
|
522
|
+
d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09",d).box("av01",d).box("avcC",function(B){var I=x||"";switch(x){case "dvav":I="avc3";break;case "dva1":I="avc1"}B=B.reader;B.skip(1);B=I+"."+Mi(B.Z())+Mi(B.Z())+Mi(B.Z());h.push(B);l=!0}).box("hvcC",function(B){var I=x||"";switch(x){case "dvh1":I="hvc1";break;case "dvhe":I="hev1"}var E=B.reader;E.skip(1);B=E.Z();var K=["","A","B","C"][B>>6],J=B&31,O=E.W(),P=(B&32)>>5?"H":"L";B=[E.Z(),E.Z(),E.Z(),E.Z(),E.Z(),E.Z()];E=
|
|
523
|
+
E.Z();for(var M=0,L=0;L<32;L++){M|=O&1;if(L==31)break;M<<=1;O>>=1}I=I+("."+K+J)+("."+Mi(M,!0));I+="."+P+E;K="";for(J=B.length;J--;)if((P=B[J])||K)K="."+P.toString(16).toUpperCase()+K;I+=K;h.push(I);l=!0}).box("dvcC",function(B){var I=x||"";switch(x){case "hvc1":I="dvh1";break;case "hev1":I="dvhe";break;case "avc1":I="dva1";break;case "avc3":I="dvav";break;case "av01":I="dav1"}var E=B.reader;E.skip(2);B=E.Z();E=E.Z();h.push(I+"."+Ni(B>>1&127)+"."+Ni(B<<5&32|E>>3&31));l=!0}).box("dvvC",function(B){var I=
|
|
524
|
+
x||"";switch(x){case "hvc1":I="dvh1";break;case "hev1":I="dvhe";break;case "avc1":I="dva1";break;case "avc3":I="dvav";break;case "av01":I="dav1"}var E=B.reader;E.skip(2);B=E.Z();E=E.Z();h.push(I+"."+Ni(B>>1&127)+"."+Ni(B<<5&32|E>>3&31));l=!0}).S("vpcC",function(B){var I=x||"",E=B.reader;B=E.Z();var K=E.Z();E=E.Z()>>4&15;h.push(I+"."+Ni(B)+"."+Ni(K)+"."+Ni(E));l=!0}).box("av1C",function(B){var I=x||"";switch(x){case "dav1":I="av01"}var E=B.reader;E.skip(1);B=E.Z();E=E.Z();var K=B>>>5,J=(E&64)>>6;h.push(I+
|
|
525
|
+
"."+K+"."+Ni(B&31)+(E>>>7?"H":"M")+"."+Ni(K===2&&J?(E&32)>>5?12:10:J?10:8)+"."+((E&16)>>4)+"."+((E&8)>>3)+((E&4)>>2)+(E&3)+"."+Ni(1)+"."+Ni(1)+"."+Ni(1)+".0");l=!0}).box("enca",yh).box("encv",xh).box("sinf",uh).box("frma",function(B){B=Ki(B.reader).codec;f(B)}).box("colr",function(B){h=h.map(function(K){if(K.startsWith("av01.")){var J=B.reader,O=J.Pa(),P=J.Tb(4,!1);var M=String.fromCharCode(P[0]);M+=String.fromCharCode(P[1]);M+=String.fromCharCode(P[2]);M+=String.fromCharCode(P[3]);if(M==="nclx"){P=
|
|
526
|
+
J.Ca();M=J.Ca();var L=J.Ca(),Q=J.Z()>>7,R=K.split(".");R.length==10&&(R[6]=Ni(P),R[7]=Ni(M),R[8]=Ni(L),R[9]=String(Q),K=R.join("."))}J.seek(O)}return K});var I=Li(B.reader),E=I.colorGamut;v=I.ye;w=E}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var z=k&&!l,C=new Map;if(l&&!c){c=new Yc("video/mp4");a&&c.init(a);try{bd(c,b);for(var H=t(c.g.getStreams()),D=H.next();!D.done;D=H.next()){var A=D.value;C.set(A,A)}}catch(B){}c.g.clear()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",
|
|
527
|
+
codecs:Bm(g.concat(h)).join(", "),language:m,height:n,width:q,channelCount:r,sampleRate:u,closedCaptions:C,ye:v,colorGamut:w,frameRate:null,timescale:y}}function Bm(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Xe(d);b.has(e)||(c.push(d),b.add(e))}b=Ic("audio",c);d=Ic("video",c);a=Ic(Hc,c);d=Cm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
528
|
+
function Cm(a){if(a.length<=1)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?Ci('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
529
|
+
function Dm(a){var b=null;(new mh).box("moov",uh).box("trak",uh).box("mdia",uh).box("minf",uh).box("stbl",uh).S("stsd",wh).box("encv",xh).box("enca",yh).box("sinf",uh).box("schi",uh).S("tenc",function(c){c=c.reader;c.Z();c.Z();c.Z();c.Z();c=c.Tb(16,!1);b=zc(c)}).parse(a,!0);return b}
|
|
530
|
+
function Em(a,b,c){var d,e,f,g,h;return G(function(k){if(k.h==1)return d=b,d.cryptoKey?k.A(2):k.g(d.fetchKey(),3);e=d.iv;if(!e)for(e=Qb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;g>=0;g--)e[g]=f&255,f>>=8;b.blockCipherMode=="CBC"?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Fm(a,b,c){var d,e,f,g,h,k,l;return G(function(m){switch(m.h){case 1:d=Gm(a);if(e=Hm.get(d))return m.return(e);f=0;g=Wg([a],c);m.m(2);g.method="HEAD";return m.g(b.request(f,g).promise,4);case 4:h=m.i;e=h.headers["content-type"];m.o(3);break;case 2:k=m.l();if(!k||k.code!=1002&&k.code!=1001){m.A(3);break}g.method="GET";return m.g(b.request(f,g).promise,6);case 6:l=m.i,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():"")}})}
|
|
531
|
+
function Gm(a){a=(new zb(a)).Sb.split("/").pop().split(".");return a.length==1?"":a.pop().toLowerCase()}function Im(a,b,c,d,e){a=Wg(a,d,e);if(b!=0||c!=null)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a}
|
|
532
|
+
var Hm=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv",
|
|
533
|
+
"text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function Jm(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.M=new Map;this.C=1;this.B=this.o=null;this.V=0;this.h=new Map;this.N=!1;this.X=null;this.D=!1;this.l=new dh(function(){return Km(c)});this.R=Date.now()/1E3;this.m=new Map;this.T={projection:null,hfov:null};this.ba=0;this.$=Infinity;this.H=null;this.O=[];this.u=new of(function(){if(c.j&&c.g)if(c.j.presentationTimeline.U()){var d=c.j.presentationTimeline.$b(),e=c.j.presentationTimeline.Ib();e-d>1?il(c.g.Y,d,e):jl(c.g.Y)}else jl(c.g.Y),c.u&&
|
|
534
|
+
c.u.stop();else c.u&&c.u.stop()});this.I=null;this.J=!1;this.K=new of(function(){var d=c.g.video;!d.ended&&c.I&&(c.J=!0,d.currentTime=c.I,c.I=null)});this.G=new gb}p=Jm.prototype;p.destroy=function(){return this.l.destroy()};
|
|
535
|
+
function Km(a){var b,c,d,e,f,g,h;return G(function(k){if(k.h==1){a.u&&a.u.stop();a.u=null;a.K&&a.K.stop();a.K=null;a.G&&(a.G.release(),a.G=null);b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,Lm(e),b.push(Mm(e)),e.ia&&(wm(e.ia),e.ia=null);f=t(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,wm(h);return k.g(Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.I=null;k.j()})}
|
|
536
|
+
p.configure=function(a){this.i=a;this.X=new Bg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.h.get("audio");b&&b.ia&&(wm(b.ia),b.ia=null);b=t(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,wm(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(Hc))&&
|
|
537
|
+
b.ia&&(wm(b.ia),b.ia=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.ia&&(wm(b.ia),b.ia=null);b=t(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.ia?(xm(c.ia,a.segmentPrefetchLimit),a.segmentPrefetchLimit>0||(wm(c.ia),c.ia=null)):a.segmentPrefetchLimit>0&&(c.ia=Nm(this,c.stream));a.disableAudioPrefetch||Om(this)};function Pm(a,b,c){a.j.presentationTimeline.U()||(a.ba=b,a.$=c)}
|
|
538
|
+
p.start=function(a){var b=this;return G(function(c){if(c.h==1)return c.g(Qm(b,a||new Map),2);eh(b.l);b.N=!0;c.j()})};function Rm(a,b){var c,d,e,f,g,h,k;G(function(l){switch(l.h){case 1:return c=Jc,a.V++,d=a.V,l.m(2),l.g(cl(a.g.Y,c.Na),4);case 4:l.o(3);break;case 2:if(e=l.l(),a.g)a.g.onError(e);case 3:f=Qe(b.mimeType,b.codecs),Lk(a.g.Y,f,a.j.sequenceMode,b.external),g=a.g.Y.ba,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.V==d&&(k=Sm(a,b),a.h.set(c.Na,k),Tm(a,k,0)),l.j()}})}
|
|
539
|
+
function Um(a){var b=a.h.get(Hc);b&&(Lm(b),Mm(b).catch(function(){}),a.H=a.h.get(Hc),a.h.delete(Hc),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.B=null}
|
|
540
|
+
function Vm(a,b){for(var c=a.g.Ob()<0,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.sa&&e.sa.Kd(c),e.ia&&e.ia.Kd(c);d=t(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Kd(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Nc&&(Wm(a,b,!1,0,!1),c.Nc=d);else if(b=c.Nc)c.Nc=null,Wm(a,b,!0,0,!1)}
|
|
541
|
+
function Xm(a,b,c,d,e,f){c=c===void 0?!1:c;d=d===void 0?0:d;e=e===void 0?!1:e;f=f===void 0?!1:f;a.o=b;a.N&&(b.video&&Wm(a,b.video,c,d,e,f),b.audio&&Wm(a,b.audio,c,d,e,f))}function Ym(a,b){G(function(c){if(c.h==1)return a.H=null,a.B=b,a.N?b.segmentIndex?c.A(2):c.g(b.createSegmentIndex(),2):c.return();Wm(a,b,!0,0,!1);c.j()})}function Zm(a){var b=a.h.get(Hc);b&&Wm(a,b.stream,!0,0,!0)}
|
|
542
|
+
function $m(a,b){for(var c=t(a.M.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.M.delete(d))}}
|
|
543
|
+
function Wm(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Hc?g&&(g.Nc&&(b.trickModeVideo?(g.Nc=b,b=b.trickModeVideo):g.Nc=null),g.stream!=b||e)&&(a.m.has(b)?g.ia=a.m.get(b):g.ia&&ym(g.ia,b),b.type==Hc&&g.stream!=b&&(e=Qe(b.mimeType,b.codecs),Lk(a.g.Y,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ja?(e="("+g.type+":"+g.stream.id+")",a.M.has(e)||a.M.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
|
|
544
|
+
g.stream=b,g.sa=null,g.cg=!!f,b.dependencyStream?g.Gc=Sm(a,b.dependencyStream):g.Gc=null,an(a),e&&(g.pb=null,g.uc=null,g.tc=null,b.isAudioMuxedInVideo&&(b=null,g.type==="video"?b=a.h.get("audio"):g.type==="audio"&&(b=a.h.get("video")),b&&(Mm(b).catch(function(){}),b.pb=null,b.uc=null,b.tc=null,bn(a,b),cn(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.Wb?g.Nd=!0:g.Ja?(g.Ub=!0,g.jd=d,g.Nd=!0):(Lm(g),dn(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ja||g.qb||Tm(a,g,0),cn(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
545
|
+
Rm(a,b)}
|
|
546
|
+
function cn(a,b){var c,d,e;return G(function(f){if(f.h==1){if(!b.Va)return f.return();c=b.stream;d=b.Va;return c.segmentIndex?f.A(2):f.g(c.createSegmentIndex(),2)}if(f.h!=4)return e=c.dependencyStream,!e||e.segmentIndex?f.A(4):f.g(e.createSegmentIndex(),4);if(b.Va!=d||b.stream!=c)return f.return();var g=a.g.Zb();var h=Rk(a.g.Y,b.type),k=b.stream.segmentIndex.find(b.Fa?b.Fa.endTime:g),l=k==null?null:b.stream.segmentIndex.get(k);k=l?Aj(l):null;l&&!k&&(k=(l.endTime-l.getStartTime())*(b.stream.bandwidth||a.o.bandwidth)/
|
|
547
|
+
8);k?((l=l.ea)&&(k+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=k*8/l<(h||0)-g-a.i.rebufferingGoal||b.Va.h.g>k?!0:!1):g=!0;g&&b.Va.abort();f.j()})}
|
|
548
|
+
p.Zc=function(){if(this.g){for(var a=this.g.Zb(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e;if(e=!this.J)e=this.g.Y,d==Hc?(e=e.h,e=e.g==null||e.h==null?!1:a>=e.g&&a<e.h):(e=Qk(e,d),e=Gj(e,a)),e=!e;if(e){this.R=0;c.ia&&(c.ia.h=null);if(c.type==="audio"){e=t(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.h=null}c.sa=null;(Rk(this.g.Y,d)!=null||c.Ja)&&bn(this,c);c.Va&&(c.Va.abort(),c.Va=null);d===Hc&&(d=this.g.Y,d.K&&d.K.g.clear());c.Zc=!0}!this.J||
|
|
549
|
+
c.Wb||c.Ja||c.qb||Tm(this,c,0)}en(this)&&fn(this)}};function bn(a,b){b.Wb||b.Ub||(b.Ja?(b.Ub=!0,b.jd=0):Pk(a.g.Y,b.type)==null?b.qb==null&&Tm(a,b,0):(Lm(b),dn(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
550
|
+
function Qm(a,b){var c,d,e,f,g,h,k,l;return G(function(m){if(m.h==1){if(!a.o)throw new S(2,5,5006);c=gn(a,!0);d=a.g.Y;return m.g(d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}eh(a.l);a.updateDuration();e=t(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=Sm(a,h),b.has(h.id)&&(l=b.get(h.id),om(l,function(n,q,r){return hn(n,q,r||null,a.i.retryParameters,a.g.wc)}),k.ia=l),a.h.set(g,k),Tm(a,k,0));an(a);m.j()})}
|
|
551
|
+
function Sm(a,b){var c={stream:b,type:b.type,sa:null,ia:Nm(a,b),Fa:null,pb:null,mf:null,uc:null,tc:null,kf:null,lf:null,Nc:null,endOfStream:!1,Ja:!1,qb:null,Ub:!1,jd:0,Nd:!1,Wb:!1,Zc:!0,cg:!1,bh:!1,ud:!1,Va:null,Gc:null};b.dependencyStream&&(c.Gc=Sm(a,b.dependencyStream));return c}
|
|
552
|
+
function Nm(a,b){if(b.type==="video"&&a.i.disableVideoPrefetch||b.type==="audio"&&a.i.disableAudioPrefetch||b.type===Hc&&(b.mimeType=="application/cea-608"||b.mimeType=="application/cea-708")||b.type===Hc&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.ia)&&b===c.i?c:a.i.segmentPrefetchLimit>0?new nm(a.i.segmentPrefetchLimit,b,function(d,e,f){return hn(d,e,f||null,a.i.retryParameters,a.g.wc)},a.g.Ob()<0,a.g.cl):null}
|
|
553
|
+
function Om(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={Mb:void 0},e=d.next())if(f.Mb=e.value,f.Mb.audio)if(a.m.has(f.Mb.audio)){if(e=a.m.get(f.Mb.audio),xm(e,b),!(b>0&&c.some(function(h){return function(k){return uf(h.Mb.audio.language,k)}}(f)))){var g=a.h.get(f.Mb.audio.type);e!==(g&&g.ia)&&wm(e);a.m.delete(f.Mb.audio)}}else b<=0||!c.some(function(h){return function(k){return uf(h.Mb.audio.language,k)}}(f))||!(e=Nm(a,f.Mb.audio))||
|
|
554
|
+
(f.Mb.audio.segmentIndex||f.Mb.audio.createSegmentIndex(),a.m.set(f.Mb.audio,e))}p.updateDuration=function(){var a=Ei(),b=this.j.presentationTimeline.getDuration();b<Infinity?(a&&(this.u&&this.u.stop(),jl(this.g.Y)),this.g.Y.Ab(b)):a?(this.u&&this.u.Ea(.5),this.g.Y.Ab(Infinity)):this.g.Y.Ab(4294967296)};
|
|
555
|
+
function jn(a,b){var c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.h){case 1:eh(a.l);c=Jc;if(b.Ja||b.qb==null||b.Wb)return n.return();b.qb=null;if(!b.Ub){n.A(2);break}return n.g(dn(a,b,b.Nd,b.jd),3);case 3:return n.return();case 2:$m(a,b);if(b.stream.segmentIndex){n.A(4);break}d=b.stream;n.m(5);return n.g(b.stream.createSegmentIndex(),7);case 7:n.o(6);break;case 5:return e=n.l(),n.g(kn(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.Ja||
|
|
556
|
+
b.qb||Tm(a,b,0),n.return();case 4:if(!b.Gc){n.A(9);break}if(b.Gc.stream.segmentIndex){n.A(9);break}n.m(11);return n.g(b.Gc.stream.createSegmentIndex(),13);case 13:n.o(9);break;case 11:n.l();case 9:n.m(14);f=ln(a,b);f!=null&&(Tm(a,b,f),b.ud=!1);n.o(15);break;case 14:return g=n.l(),n.g(kn(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Na)return n.return();h=[];b.stream&&!b.stream.isAudioMuxedInVideo&&h.push(b);k=b.type===c.aa?c.wa:c.aa;(l=a.h.get(k))&&l.stream&&!l.stream.isAudioMuxedInVideo&&
|
|
557
|
+
h.push(l);if(!a.N||!h.every(function(q){return q.endOfStream})){n.A(0);break}return n.g(a.g.Y.endOfStream(),18);case 18:eh(a.l),m=a.g.Y.getDuration(),m!=0&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.Ab(m),n.j()}})}
|
|
558
|
+
function ln(a,b){if(mn(b))return $k(a.g.Y,b.stream.originalId||""),null;b.type==Hc&&al(a.g.Y);if(b.stream.isAudioMuxedInVideo&&b.type=="audio")return null;if(b.type!=Hc&&Jk(a.g.Y))return nn(a,!0),null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.Ob()));if(!Ok(a.g.Y)&&b.type!=Hc)return c/2;var d=a.g.Zb();if(b.type==="audio")for(var e=t(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.Ya(d,!0),pm(f,d);e=b.Fa?b.Fa.endTime:d;var g=Sk(a.g.Y,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,
|
|
559
|
+
a.i.bufferingGoal)*a.C);var h=a.j.presentationTimeline.getDuration()-e,k=Rk(a.g.Y,b.type);if(h<1E-6&&k)return b.endOfStream=!0,b.type=="video"&&(c=a.h.get(Hc))&&mn(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.sa;k=on(a,b,d,k);if(!k)return a=Infinity,(b=b.Fa)&&(a=b.endTime-b.startTime),Math.min(a/2,c);g=b.pb;var l=k.ea;g&&l&&xj(l,g)&&(g.g=l.g);g=!1;h&&b.cg&&(g=!0,b.cg=!1);h=Infinity;l=Array.from(a.h.values());l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,mn(m)||m.sa&&
|
|
560
|
+
!m.sa.current()||(h=Math.min(h,m.Fa?m.Fa.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;b.ia&&b.sa&&!a.m.has(b.stream)&&(b.ia.Ya(k.startTime+.001),pm(b.ia,k.startTime).catch(function(){}));if(en(a)&&pn(a,b,k))return null;qn(a,b,d,k,g).catch(function(){});b.Gc&&rn(a,b.Gc,d,f);return null}
|
|
561
|
+
function on(a,b,c,d){if(b.sa){var e=b.sa.current();e&&b.Fa&&(c=b.Fa.endTime,Math.abs(b.Fa.startTime-e.startTime)<.001&&Math.abs(c-e.endTime)<.001&&(e=b.sa.next().value));return e}if(b.Fa||d)return e=b.Fa?b.Fa.endTime:d,c=a.g.Ob()<0,b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Xb(e,!1,c)),b.sa&&b.sa.next().value;d=a.j.sequenceMode||en(a)?0:a.i.inaccurateManifestTolerance;var f=Math.max(c-d,0),g=a.g.Y.getDuration();Math.abs(f-g)<1&&(d=1,f=Math.max(c-d,0));g=a.g.Ob()<0;a=null;d&&(b.stream.segmentIndex&&
|
|
562
|
+
(b.sa=b.stream.segmentIndex.Xb(f,!1,g)),a=b.sa&&b.sa.next().value);a||(b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Xb(c,!1,g)),a=b.sa&&b.sa.next().value);for(;((e=a)==null?void 0:e.bc())===2;)d=c=void 0,a=(d=(c=b.sa)==null?void 0:c.next().value)!=null?d:null;return a}
|
|
563
|
+
function qn(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D;return G(function(A){switch(A.h){case 1:f=Jc;g=b.stream;h=b.sa;b.Ja=!0;A.m(2);if(d.bc()==2)throw new S(1,1,1011);return A.g(sn(a,b,d,e),4);case 4:eh(a.l);if(a.D)return A.return();k=g.mimeType=="video/mp4"||g.mimeType=="audio/mp4";l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&(a.j.type!="HLS"||d.o))return r=new Uint8Array(0),v=u=!1,y=function(B){var I,E,K,J;return G(function(O){switch(O.h){case 1:if(u)return O.return();
|
|
564
|
+
v=!0;eh(a.l);if(a.D)return O.return();O.m(2);r=Ac(r,B);I=!1;E=0;(new mh).box("mdat",function(P){E=P.size+P.start;I=!0}).parse(r,!1,!0);if(!I){O.A(4);break}K=r.subarray(0,E);r=r.subarray(E);return O.g(tn(a,b,c,g,d,K,!0,e),5);case 5:b.ia&&b.sa&&pm(b.ia,d.startTime,!0);case 4:O.o(0);break;case 2:w=J=O.l(),O.j()}})},A.g(un(a,b,d,y),9);n=un(a,b,d);return A.g(n,7);case 7:q=A.i;eh(a.l);if(a.D)return A.return();eh(a.l);return b.Ub?(b.Ja=!1,Tm(a,b,0),A.return()):A.g(tn(a,b,c,g,d,q,!1,e),6);case 9:x=A.i;if(w)throw w;
|
|
565
|
+
if(v){A.A(10);break}u=!0;eh(a.l);return a.D?A.return():b.Ub?(b.Ja=!1,Tm(a,b,0),A.return()):A.g(tn(a,b,c,g,d,x,!1,e),10);case 10:b.ia&&b.sa&&pm(b.ia,d.startTime,!0);case 6:eh(a.l);if(a.D)return A.return();b.Fa=d;h.next();b.Ja=!1;b.bh=!1;z=a.g.Y.Hc();C=z[b.type];$a(JSON.stringify(C));b.Ub||(H=null,b.type===f.wa?H=a.h.get(f.aa):b.type===f.aa&&(H=a.h.get(f.wa)),H&&H.type==f.aa?a.g.zd(d,b.stream,H.stream.isAudioMuxedInVideo,!1):a.g.zd(d,b.stream,b.stream.codecs.includes(","),!1));Lm(b);Tm(a,b,0);A.o(0);
|
|
566
|
+
break;case 2:D=A.l();eh(a.l,D);if(a.D)return A.return();b.Ja=!1;if(D.code==7001)b.Ja=!1,Lm(b),Tm(a,b,0),A.A(0);else if(b.type==f.Na&&a.i.ignoreTextStreamFailures)a.h.delete(f.Na),A.A(0);else{if(D.code==3017)return A.g(vn(a,b,D),0);b.ud=!0;D.category==1&&b.ia&&vm(b.ia,d);D.severity=2;return A.g(kn(a,b,D),0)}}})}
|
|
567
|
+
function rn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w;return G(function(y){switch(y.h){case 1:e=Jc;f=b.stream;for(k=(h=(g=f.segmentIndex)&&g.Xb(c))&&h.next().value;k&&a.O.includes(k.startTime);)k=h&&h.next().value;if(!k){y.A(0);break}l=k.ea;if(!l||xj(l,b.pb)){y.A(3);break}b.pb=l;y.m(4);return y.g(un(a,b,l),6);case 6:m=y.i;if(!a.g)return y.return();var x=a.g.Y;x.C&&Mc(x.C,m,0,f);a.O=[];y.o(3);break;case 4:throw n=y.l(),b.pb=null,n;case 3:if(b.Fa&&b.Fa==k){y.A(0);break}b.Fa=k;y.m(8);return y.g(un(a,b,
|
|
568
|
+
k),10);case 10:q=y.i;if(!a.g)return y.return();x=a.g.Y;x.C&&Mc(x.C,q,0,f);a.O.push(k.startTime);y.o(9);break;case 8:throw r=y.l(),b.Fa=null,r;case 9:if(!a.g)return y.return();b.Ub||(u=null,b.type===e.wa?u=a.h.get(e.aa):b.type===e.aa&&(u=a.h.get(e.wa)),u&&u.type==e.aa?a.g.zd(k,b.stream,u.stream.isAudioMuxedInVideo,!0):a.g.zd(k,b.stream,b.stream.codecs.includes(","),!0));v=Math.max.apply(Math,[0].concat(F(a.O)));w=a.g.Zb();if(w+d>v)return y.g(rn(a,b,k.startTime,d),0);y.A(0)}})}
|
|
569
|
+
function vn(a,b,c){var d,e,f,g,h,k,l,m,n;return G(function(q){switch(q.h){case 1:d=Array.from(a.h.values());if(e=d.some(function(r){return r!=b&&r.bh})){q.A(2);break}if(a.i.avoidEvictionOnQuotaExceededError){f=wn(a,c);if(g=a.g.disableStream(b.stream,f))return q.return();Tm(a,b,4);return q.return()}h=Math.round(100*a.C);if(h>20){a.C-=.2;q.A(3);break}if(h>4){a.C-=.04;q.A(3);break}k=wn(a,c);l=a.g.disableStream(b.stream,k);if(!l){b.ud=!0;a.D=!0;a.g.onError(c);q.A(5);break}a.C=1;m=a.g.Zb();return q.g(xn(a,
|
|
570
|
+
b,m),5);case 5:return q.return();case 3:return b.bh=!0,n=a.g.Zb(),q.g(xn(a,b,n),2);case 2:Tm(a,b,4),q.j()}})}
|
|
571
|
+
function sn(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z;return G(function(C){switch(C.h){case 1:e=Jc;f=b.Fa==null;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.ba)-.1);k=Math.min(c.appendWindowEnd,a.$)+.1;l=c.codecs||b.stream.codecs;m=Xe(l);n=Ye(c.mimeType||b.stream.mimeType);q=c.timestampOffset;if(q==b.mf&&h==b.uc&&k==b.tc&&m==b.kf&&n==b.lf){C.A(2);break}r=b.kf&&b.lf&&vl(a.g.Y,b.type,n,l,gn(a));if(!r){C.A(3);break}u=null;b.type===e.wa?u=a.h.get(e.aa):b.type===e.aa&&(u=a.h.get(e.wa));if(!u){C.A(3);
|
|
572
|
+
break}return C.g(Mm(u).catch(function(){}),5);case 5:u.pb=null,u.uc=null,u.tc=null,bn(a,u);case 3:return C.g(yn(a,b,q,h,k,c,m,n),2);case 2:return xj(c.ea,b.pb)||(b.pb=c.ea,c.l&&c.ea&&(v=un(a,b,c.ea),w=function(){var H,D,A,B,I,E,K,J,O,P,M;return G(function(L){switch(L.h){case 1:return L.m(2),L.g(v,4);case 4:return H=L.i,eh(a.l),D=null,A=new Map,B={projection:null,hfov:null},b.stream&&(I=b.stream.videoLayout)&&(E=I.split("/"),E.includes("PROJ-RECT")?B.projection="rect":E.includes("PROJ-EQUI")?B.projection=
|
|
573
|
+
"equi":E.includes("PROJ-HEQU")?B.projection="hequ":E.includes("PROJ-PRIM")?B.projection="prim":E.includes("PROJ-AIV")&&(B.projection="hequ")),K=new mh,K.box("moov",uh).box("trak",uh).box("mdia",uh).S("mdhd",function(Q){D=Hi(Q.reader,Q.version).timescale}).S("hdlr",function(Q){Q=Q.reader;Q.skip(4);Q=Q.Tb(4,!1);switch(String.fromCharCode(Q[0],Q[1],Q[2],Q[3])){case "soun":A.set(e.aa,D);break;case "vide":A.set(e.wa,D)}D=null}),b.type!==e.wa||B.projection||K.box("minf",uh).box("stbl",uh).S("stsd",wh).box("encv",
|
|
574
|
+
xh).box("avc1",xh).box("avc3",xh).box("hev1",xh).box("hvc1",xh).box("dvav",xh).box("dva1",xh).box("dvh1",xh).box("dvhe",xh).box("dvc1",xh).box("dvi1",xh).box("vexu",uh).box("proj",uh).S("prji",function(Q){Q=Q.reader.Ed();B.projection=Q}).box("hfov",function(Q){Q=Q.reader.W()/1E3;B.hfov=Q}),K.parse(H,!0,!0),b.type===e.wa&&zn(a,B),A.has(b.type)?c.ea.timescale=A.get(b.type):D!=null&&(c.ea.timescale=D),J=b.stream.segmentIndex,J instanceof Yl&&(O=$l(J,c.startTime)),P=b.stream.closedCaptions&&b.stream.closedCaptions.size>
|
|
575
|
+
0,L.g(a.g.Rh(b.type,H),5);case 5:return L.g(Vk(a.g.Y,b.type,H,null,b.stream,P,b.Zc,d,!1,!1,O),6);case 6:L.o(0);break;case 2:throw M=L.l(),b.pb=null,M;}})},y=c.startTime,f&&(x=Rk(a.g.Y,b.type),x!=null&&(y=x)),a.g.Dk(y,c.ea),g.push(w()))),z=b.Fa?b.Fa.i:-1,c.i!=z&&g.push(gl(a.g.Y,b.type,c.startTime)),C.g(Promise.all(g),0)}})}
|
|
576
|
+
function yn(a,b,c,d,e,f,g,h){var k,l,m,n,q;return G(function(r){switch(r.h){case 1:k=Jc;l=gn(a);r.m(2);b.uc=d;b.tc=e;g&&(b.kf=g);h&&(b.lf=h);b.mf=c;m=a.j.sequenceMode||a.j.type=="HLS";n=null;b.type===k.wa?n=a.h.get(k.aa):b.type===k.aa&&(n=a.h.get(k.wa));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){r.A(4);break}return r.g(dl(a.g.Y,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return r.g(dl(a.g.Y,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:r.o(0);
|
|
577
|
+
break;case 2:throw q=r.l(),b.uc=null,b.tc=null,b.kf=null,b.lf=null,b.mf=null,q;}})}
|
|
578
|
+
function tn(a,b,c,d,e,f,g,h){g=g===void 0?!1:g;h=h===void 0?!1:h;var k,l,m,n,q;return G(function(r){switch(r.h){case 1:return k=d.closedCaptions&&d.closedCaptions.size>0,a.i.shouldFixTimestampOffset&&(l=d.mimeType=="video/mp4"||d.mimeType=="audio/mp4",m=null,e.ea&&(m=e.ea.timescale),(n=l&&m&&d.type==="video"&&a.j.type=="DASH")&&(new mh).box("moof",uh).box("traf",uh).S("tfdt",function(u){var v,w,y,x,z,C;return G(function(H){v=Gi(u.reader,u.version);w=v.baseMediaDecodeTime;if(!w)return H.return();y=
|
|
579
|
+
-w/m;x=Number(b.mf)||0;if(!(x<y))return H.A(0);z=b.uc;C=b.tc;return H.g(yn(a,b,y,z,C,e),0)})}).parse(f,!1,g)),r.g(xn(a,b,c),2);case 2:return eh(a.l),q=b.Zc,b.Zc=!1,r.g(a.g.Rh(b.type,f),3);case 3:return r.g(Vk(a.g.Y,b.type,f,e,d,k,q,h,g),4);case 4:eh(a.l),r.j()}})}
|
|
580
|
+
function xn(a,b,c){var d,e,f,g,h,k,l,m,n;return G(function(q){if(q.h==1){a.H==b&&(a.H=null);d=b.stream.segmentIndex;d instanceof Yl&&(d.Ya(a.j.presentationTimeline.Jb()),e=[],Zl(d,function(r){e.push(r.Ve())}));f=Math.max(a.i.bufferBehind*a.C,a.j.presentationTimeline.h);g=Pk(a.g.Y,b.type);if(g==null)return q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.$b();m=a.j.presentationTimeline.Ib();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():q.g(a.g.Y.remove(b.type,g,g+n,e),2)}if(q.h!=
|
|
581
|
+
4)return eh(a.l),a.H?q.g(xn(a,a.H,c),4):q.A(0);eh(a.l);q.j()})}function mn(a){return a&&a.type==Hc&&(a.stream.mimeType=="application/cea-608"||a.stream.mimeType=="application/cea-708")}
|
|
582
|
+
function un(a,b,c,d){var e,f,g,h,k;return G(function(l){switch(l.h){case 1:if(e=c.ac())return l.return(e);f=null;if(b.ia){var m=b.ia,n=m.g;c instanceof wj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.xh=d),f=m.me):f=null}f||(f=hn(c,b.stream,d||null,a.i.retryParameters,a.g.wc));g=0;b.sa&&(g=b.sa.h);b.Va=f;return l.g(f.promise,2);case 2:h=l.i;b.Va=null;k=h.data;if(!c.aesKey){l.A(3);break}return l.g(Em(k,c.aesKey,g),4);case 4:k=l.i;case 3:return l.return(k)}})}
|
|
583
|
+
function hn(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a instanceof yj?a:void 0,h=g?1:0;a=Im(a.P(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(bh,a,{type:h,stream:b,segment:g,isPreload:f})}
|
|
584
|
+
function dn(a,b,c,d){var e,f;return G(function(g){if(g.h==1)return b.Ub=!1,b.Nd=!1,b.jd=0,b.Wb=!0,b.Fa=null,b.sa=null,b.ia&&!a.m.has(b.stream)&&wm(b.ia),d?(e=a.g.Zb(),f=a.g.Y.getDuration(),g.g(a.g.Y.remove(b.type,e+d,f),3)):g.g(cl(a.g.Y,b.type),4);if(g.h!=3)return eh(a.l),c?g.g(a.g.Y.flush(b.type),3):g.A(3);eh(a.l);b.Wb=!1;b.endOfStream=!1;b.Ja||b.qb||Tm(a,b,0);g.j()})}
|
|
585
|
+
function Tm(a,b,c){var d=b.type;if(d!=Hc||a.h.has(d))b.qb=(new nf(function(){var e;return G(function(f){if(f.h==1)return f.m(2),f.g(jn(a,b),4);if(f.h!=2)return f.o(0);e=f.l();if(a.g)a.g.onError(e);f.j()})})).ka(c)}function Lm(a){a.qb!=null&&(a.qb.stop(),a.qb=null)}function Mm(a){return G(function(b){return a.Va?b.g(a.Va.abort(),0):b.A(0)})}
|
|
586
|
+
function kn(a,b,c){var d,e,f,g,h;return G(function(k){switch(k.h){case 1:return c.code==3024?(b.Ja=!1,Lm(b),Tm(a,b,0),k.return()):k.g(Dg(a.X),2);case 2:eh(a.l);if(c.category===1&&c.code!=1003){if(b.Nc)return Vm(a,!1),k.return();d=wn(a,c);c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(c.handled||c.code!=1011){k.A(3);break}e=a.g.Zb();f=Rk(a.g.Y,b.type);for(g=on(a,b,e,f);((h=g)==null?void 0:h.bc())===2;)b.Fa=g,g=on(a,b,e,f);if(!g){k.A(3);break}return k.g(gl(a.g.Y,b.type,g.startTime),
|
|
587
|
+
5);case 5:return b.Ja=!1,b.ud=!1,Lm(b),Tm(a,b,0),k.return();case 3:if(!c.handled||c.code!=1011)a.g.onError(c);c.handled||a.i.failureCallback(c);k.j()}})}function wn(a,b){return a.i.maxDisabledTime===0&&b.code==1011?1:a.i.maxDisabledTime}
|
|
588
|
+
function nn(a,b){b=b===void 0?!1:b;var c,d,e,f,g,h;return G(function(k){if(k.h==1){c=Date.now()/1E3;d=a.i.minTimeBetweenRecoveries;if(!b){if(!a.i.allowMediaSourceRecoveries||c-a.R<d)return k.return(!1);a.R=c}e=Jc;if(f=a.h.get(e.aa))Lm(f),f.Va&&(f.Va.abort(),f.Va=null),f.pb=null,f.uc=null,f.tc=null,f.Ja=!1,f.Ub=!1,f.jd=0,f.Nd=!1,f.Wb=!1,f.sa&&f.sa.hh();if(g=a.h.get(e.wa))Lm(g),g.Va&&(g.Va.abort(),g.Va=null),g.pb=null,g.uc=null,g.tc=null,g.Ja=!1,g.Ub=!1,g.jd=0,g.Nd=!1,g.Wb=!1,g.sa&&g.sa.hh();h=a.g.video.paused;
|
|
589
|
+
return k.g(pl(a.g.Y,gn(a)),2)}!g||g.Wb||g.Ja||g.qb||Tm(a,g,0);!f||f.Wb||f.Ja||f.qb||Tm(a,f,0);h||a.g.video.play();return k.return(!0)})}function zn(a,b){if(a.T.projection!=b.projection||a.T.hfov!=b.hfov){if(b.projection!=null||b.hfov!=null){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.T=b}}
|
|
590
|
+
function en(a){if(a.i.crossBoundaryStrategy!=="keep")return!0;var b=nb();if(!b.Bb()){b=t(a.h.keys());for(var c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Jc.Na&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1)return!0}else if(!b.Kf())for(b=t(a.h.keys()),c=b.next();!c.done;c=b.next())if(c=a.h.get(c.value),c.type!==Jc.Na&&(c=c.stream)&&c.fullMimeTypes&&c.fullMimeTypes.size>1){a=new Set;b=t(c.fullMimeTypes);for(c=b.next();!c.done;c=b.next())a.add(Ue(c.value));return a.size>1}return!1}
|
|
591
|
+
function an(a){a.G.Qa();en(a)&&(a.G.F(a.g.video,"waiting",function(){return fn(a)}),a.G.F(a.g.video,"timeupdate",function(){return fn(a)}))}function fn(a){if(en(a)){a.K.stop();var b=a.g.Zb(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.pb)&&c.g!==null&&(b=c.g-b,b<0||b>1||(a.I=c.g+.1,a.K.ka(b)))}}
|
|
592
|
+
function pn(a,b,c){if(b.type===Hc)return!1;var d=b.pb;if(!d)return!1;var e=c.ea;c=d.g!==e.g;a.i.crossBoundaryStrategy==="reset_to_encrypted"&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));a.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&d.encrypted==e.encrypted&&(c=!1);if(a.i.crossBoundaryStrategy==="keep"&&d.mimeType&&e.mimeType){var f=Ve(Ze(d.mimeType)),g=Ve(Ze(d.mimeType));d.mimeType==e.mimeType&&f==g&&(c=!1)}(a.h.get("video")||a.h.get("audio"))===
|
|
593
|
+
b&&c&&(a.J||b.Zc)&&(a.J=!1,nn(a,!0).then(function(){var h=(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new T("boundarycrossed",h))}));return c}
|
|
594
|
+
function gn(a,b){function c(f){if(f.fullMimeTypes&&f.fullMimeTypes.size>1&&a.h.has(f.type)){var g=a.h.get(f.type),h=Rk(a.g.Y,g.type),k=a.g.Zb();(g=on(a,g,k,h))&&g.codecs&&g.mimeType&&(f.codecs=g.codecs,f.mimeType=g.mimeType)}}b=b===void 0?!1:b;var d=new Map,e=a.o.audio;e&&(c(e),d.set("audio",e));if(e=a.o.video)c(e),d.set("video",e);b&&a.B&&d.set(Hc,a.B);return d};function An(){}
|
|
595
|
+
function Bn(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&Object.keys(d).length==0:c.constructor==Object&&Object.keys(c).length==0;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?b[l]===void 0?n===void 0||h?delete a[l]:a[l]=td(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=td(n)),m=Bn(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||b[l]==null||typeof b[l]!="function"&&b[l].constructor!=n.constructor?(Va("Invalid config, wrong type for "+m),
|
|
596
|
+
k=!1):typeof c[l]=="function"&&c[l].length!=b[l].length?(Wa("Unexpected number of arguments for "+m),a[l]=b[l]):a[l]=Array.isArray(a[l])?b[l].slice():b[l]:(Va("Invalid config, unrecognized key "+m),k=!1)}return k}function Cn(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(e<0)break;if(e==0||a[e-1]!="\\")f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Dn(a,b){return a&&b}
|
|
597
|
+
function En(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&Object.keys(f[h]).length===0)delete f[h];else{var k=f[h];Array.isArray(k)&&k.length===0?delete f[h]:typeof f[h]=="function"?delete f[h]:e(f[h])&&(c(f[h]),Object.keys(f[h]).length===0&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
|
|
598
|
+
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),Object.keys(l).length>0||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?db(l,g[k])||(h[k]=l):Number.isNaN(l)&&Number.isNaN(g[k])||l!==g[k]&&(h[k]=l);else h[k]=l;return h},{})}function e(f){return f&&typeof f==="object"&&!Array.isArray(f)}a=d(a,b);c(a);return a}N("shaka.util.ConfigUtils",An);An.getDifferenceFromConfigObjects=En;An.convertToConfigObject=Cn;An.mergeConfigObjects=Bn;N("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function Fn(){}function Gn(a){a=qc(a);return(new zb(a)).Fb}function Hn(a,b,c){function d(h){Wb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Qb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new S(2,6,6015);var e;typeof b=="string"?e=sc(b,!0):e=b;a=qc(a);a=sc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function In(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=qc(a).split("skd://").pop();return Hn(a,c,b)}
|
|
599
|
+
function Jn(a,b){a===2&&(a=b.drmInfo)&&ec(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}N("shaka.drm.FairPlay",Fn);
|
|
600
|
+
Fn.commonFairPlayResponse=function(a,b){if(a===2&&(a=b.originalRequest.drmInfo)&&ec(a.keySystem)){try{var c=mc(b.data)}catch(e){return}a=!1;c=c.trim();c.substr(0,5)==="<ckc>"&&c.substr(-6)==="</ckc>"&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Sb(xc(c)))}};Fn.muxFairPlayRequest=function(a,b){Jn(a,b)};
|
|
601
|
+
Fn.expressplayFairPlayRequest=function(a,b){if(a===2){var c=b.drmInfo;c&&ec(c.keySystem)&&Jn(a,b)}};Fn.conaxFairPlayRequest=function(a,b){Jn(a,b)};Fn.ezdrmFairPlayRequest=function(a,b){Jn(a,b)};Fn.verimatrixFairPlayRequest=function(a,b){a===2&&(a=b.drmInfo)&&ec(a.keySystem)&&(a=Qb(b.body),a=wc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=rc("spc="+a))};Fn.muxInitDataTransform=function(a,b,c){return In(a,b,c)};
|
|
602
|
+
Fn.expressplayInitDataTransform=function(a,b,c){return In(a,b,c)};Fn.conaxInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=qc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(c.length*2);d=Vb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Hn(a,d,b)};Fn.ezdrmInitDataTransform=function(a,b,c){if(b!=="skd")return a;b=c.serverCertificate;c=qc(a).split(";").pop();return Hn(a,c,b)};
|
|
603
|
+
Fn.verimatrixInitDataTransform=function(a,b,c){return In(a,b,c)};Fn.initDataTransform=Hn;Fn.defaultGetContentId=Gn;Fn.isFairPlaySupported=function(){var a;return G(function(b){if(b.h==1)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},b.m(2),b.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(b.h!=2)return b.return(!0);b.l();return b.return(!1)})};function Kn(a,b,c){c=c===void 0?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
|
|
604
|
+
Kn.prototype.add=function(a,b){var c=this.h;b=b===void 0?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||d.channelsCount>2||e.channelsCount>2)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!Ln(d,e))&&db(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||Ln(c,d))&&db(c.roles,d.roles)));return d?!1:(this.g.add(a),
|
|
605
|
+
!0)};Kn.prototype.values=function(){return this.g.values()};function Ln(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(c){return Xe(c)});b=b.codecs.split(",").map(function(c){return Xe(c)});return db(a,b)}N("shaka.media.AdaptationSet",Kn);function Mn(){this.h=this.g=null}Mn.prototype.configure=function(a){this.g=a};Mn.prototype.getConfiguration=function(){return this.g};
|
|
606
|
+
Mn.prototype.create=function(a){var b;if(this.g.language){var c=Nn(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=On(b,this.g.role);a.length&&(b=a);a=Pn(b,this.g.videoRole);a.length&&(b=a);this.g.videoLayout&&(a=Qn(b,this.g.videoLayout),a.length&&(b=a));this.g.hdrLevel&&(a=Rn(b,this.g.hdrLevel),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=t(a),
|
|
607
|
+
c=a.next();!c.done;c=a.next())if(c=Sn(b,c.value),c.length){b=c;break}this.g.audioLabel&&(a=Tn(b,this.g.audioLabel),a.length&&(b=a));this.g.videoLabel&&(a=Un(b,this.g.videoLabel),a.length&&(b=a));a=Vn(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.activeAudioCodec].concat(F(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=t(a),c=a.next();!c.done;c=a.next())if(c=Wn(b,c.value),c.length){b=c;break}a=nb();a=this.g.codecSwitchingStrategy==
|
|
608
|
+
"smooth"&&a.Bb();return this.h=new Kn(b[0],b,!a)};Mn.prototype.getLastAdaptationSet=function(){return this.h};function Nn(a,b){b=vf(b);var c=Cf(b,a.map(function(d){return Bf(d)}));return c?a.filter(function(d){return c==Bf(d)}):[]}function On(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):c.audio.roles.length==0:!1})}function Pn(a,b){return a.filter(function(c){return c.video?b?c.video.roles.includes(b):c.video.roles.length==0:!1})}
|
|
609
|
+
function Tn(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Un(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Sn(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount>b?!1:!0}).sort(function(c,d){return c.audio||d.audio?c.audio?d.audio?(d.audio.channelsCount||0)-(c.audio.channelsCount||0):1:-1:0})}
|
|
610
|
+
function Rn(a,b){if(b=="AUTO"){var c=a.some(function(d){return d.video&&d.video.hdr&&d.video.hdr=="HLG"?!0:!1});b=nb().rd(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function Qn(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Vn(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Wn(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Xn(){}
|
|
611
|
+
function Yn(){var a=Infinity,b=nb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:Cg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&k=="skd"&&(k=l.serverCertificate,l=Gn(h),h=Hn(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,
|
|
612
|
+
minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},d="reload";b.Bb()&&(d="smooth");var e={retryParameters:Cg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,
|
|
613
|
+
ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
614
|
+
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Zn,manifestPreprocessorTXml:$n,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],
|
|
615
|
+
mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:b.dd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Zn,manifestPreprocessorTXml:$n,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
|
|
616
|
+
f={trackSelectionCallback:function(h){return G(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return G(function(l){if(l.h==1)return navigator.storage&&navigator.storage.estimate?l.g(navigator.storage.estimate(),3):l.return(!0);k=l.i;return l.return(k.usage+h<k.quota*.95)})},progressCallback:function(h,k){return Dn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:Cg(),failureCallback:function(h){return Dn([h])},rebufferingGoal:0,
|
|
617
|
+
bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],
|
|
618
|
+
disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,
|
|
619
|
+
loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return Dn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k,l){return Dn([h,k,l])},dispatchAllEmsgBoxes:!1,
|
|
620
|
+
useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new wg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Mn,[null].concat(F(Ja.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,
|
|
621
|
+
minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!1},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",
|
|
622
|
+
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,
|
|
623
|
+
playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,
|
|
624
|
+
disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:Infinity,preloadPrevItem:!0,repeatMode:0}};f.trackSelectionCallback=function(h){return G(function(k){return k.return(ao(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.Wa(g)}
|
|
625
|
+
function bo(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}
|
|
626
|
+
function co(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Bn(a,b,c||Yn(),d,"")}
|
|
627
|
+
function ao(a,b,c){var d=c;d=="AUTO"&&(c=a.some(function(h){return h.hdr&&h.hdr=="HLG"?!0:!1}),d=nb().rd(c));var e=a.filter(function(h){return h.type!="variant"||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Cf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return vf(h.language)==f}));c.length==0&&(c=e.filter(function(h){return h.primary}));c.length==0&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&h.height<=480});g.length&&(g.sort(function(h,k){return k.height-
|
|
628
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Hc&&c.type!="image"||b.push(c);return b}function Zn(a){return Dn([a],a)}function $n(a){return Dn([a],a)}N("shaka.util.PlayerConfiguration",Xn);Xn.mergeConfigObjects=co;Xn.createDefaultForLL=bo;Xn.createDefault=Yn;function eo(){this.g=null;this.h=[]}function fo(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function go(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ho(){this.i=this.h=null;this.g=[]}function io(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function jo(){this.C=this.X=NaN;this.l="";this.j=this.si=this.u=this.B=this.K=this.D=this.o=this.m=this.J=this.G=this.i=this.T=this.V=this.N=this.O=this.R=NaN;this.M=0;this.H=this.I=NaN;this.g=new eo;this.h=new ho}function ko(a,b,c){a.R=b;a.O=c}function lo(a,b,c){a.X=b;a.C=c}function mo(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function no(a,b){b>=0&&(a.o=b)}function oo(a,b){b>=0&&(a.D=b)}function po(a,b){b>=0&&(a.K=b)}function qo(a,b){a.j=isNaN(a.j)?b:a.j+b}
|
|
629
|
+
function ro(a){var b=a.X,c=a.C,d=a.l,e=a.B,f=a.O,g=a.R,h=a.N,k=a.V,l=a.T,m=a.u,n=a.i,q=a.G,r=a.J,u=a.m,v=fo(a.g,"playing"),w=fo(a.g,"paused"),y=fo(a.g,"buffering"),x=a.o,z=a.D,C=a.K,H=a.si,D=a.j,A=a.M,B=a.I,I=a.H,E=go(a.g),K=[];a=t(a.h.g);for(var J=a.next();!J.done;J=a.next())J=J.value,K.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h,
|
|
630
|
+
stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:r,drmTimeSeconds:u,playTime:v,pauseTime:w,bufferingTime:y,licenseTime:x,liveLatency:z,maxSegmentDuration:C,manifestSizeBytes:H,bytesDownloaded:D,nonFatalErrorCount:A,manifestPeriodCount:B,manifestGapCount:I,stateHistory:E,switchHistory:K}};function so(a,b,c,d){Og.call(this);this.N=a;this.V=b;this.Da=d.networkingEngine;this.o=c;this.C=null;this.za=0;this.Ta=d.kd;this.G=d.vk;this.Ua=d.wk;this.g=d.config;this.m=this.H=this.h=null;this.oa=!1;this.I=d.Ik;this.va=!1;this.j=null;this.ba=!1;this.u=null;this.M=new Map;this.ya=!1;this.Ga=d.Hk;this.X=new jo;this.ma=new Eg;this.B=new Eg;this.O=null;this.l=!1;this.$=d.mj;this.T=this.i=null;this.R=!1;this.K=[];this.J=[];this.D=!0}na(so,Og);function to(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}
|
|
631
|
+
function uo(a){if(a.J)for(var b=t(a.J),c=b.next();!c.done;c=b.next())c=c.value,c();a.J=null}function vo(a,b){a.O=b;a.R=!0;if(a.K){b=t(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}p=so.prototype;p.getStartTime=function(){return this.o};p.pd=function(){return this.N};p.Hg=function(){return this.h};function wo(a){a.va=!0;return a.I}p.getStats=function(){return this.X};function xo(a){a.ba=!0;return a.j}p.Sj=function(){return this.i?gg(this.i):null};
|
|
632
|
+
p.Rj=function(){return this.T?hg(this.T):null};function yo(a){a.ya=!0;return a.M}
|
|
633
|
+
p.start=function(){var a=this;(function(){var b;return G(function(c){switch(c.h){case 1:return c.g(Promise.resolve(),2);case 2:return c.m(3),c.g(zo(a),5);case 5:Ko(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return c.g(Lo(a),7);case 7:Ko(a);case 6:return c.g(Mo(a),8);case 8:Ko(a);if(!a.$){c.A(9);break}return c.g(No(a),10);case 10:Ko(a);case 9:if(!a.$||!a.j){c.A(11);break}return c.g(mi(a.j),12);case 12:Ko(a);case 11:a.B.resolve();c.o(0);break;case 3:b=c.l(),b instanceof S&&(b.code==
|
|
634
|
+
7001||b.code==7003)||a.B.reject(b),c.j()}})})()};p.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):Og.prototype.dispatchEvent.call(this,a)};p.onError=function(a){a.severity===2&&(this.B.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Ko(a){if(a.l)throw new S(2,7,7003);}function Oo(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
|
|
635
|
+
function zo(a){var b,c,d,e,f,g;return G(function(h){switch(h.h){case 1:Oo(a,"manifest-parser");a.m||(a.H=Vc(a.N,a.V),a.m=a.H(),a.m.configure(a.g.manifest,function(){return a.D}));b=Date.now()/1E3;Oo(a,"manifest");if(a.h){h.A(2);break}return h.g(a.m.start(a.N,a.Ua),3);case 3:return a.h=h.i,Po(a.h),h.g(Qo(a),2);case 2:return a.ma.resolve(),c=new T("manifestparsed",void 0),h.g(Promise.resolve(),5);case 5:a.dispatchEvent(c);if(a.h.variants.length==0)throw new S(2,4,4036);Po(a.h);d=yi(a.G,a.h);if(!d){h.A(6);
|
|
636
|
+
break}e=new T("trackschanged",void 0);return h.g(Promise.resolve(),7);case 7:Ko(a),a.dispatchEvent(e);case 6:f=Date.now()/1E3,g=f-b,g>=0&&(a.X.J=g),h.j()}})}
|
|
637
|
+
function Lo(a,b){var c,d,e,f;return G(function(g){switch(g.h){case 1:if(!a.h||a.j)return g.return();Oo(a,"drm-engine");a.za=Date.now()/1E3;a.j=a.Ta();a.G.g=a.j;a.j.configure(a.g.drm,function(){return a.D});c=pg(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.U());return g.g(Mh(a.j,c,a.h.offlineSessionIds,d),2);case 2:Ko(a);if(!b){g.A(3);break}return g.g(a.j.Vb(b),4);case 4:Ko(a);case 3:return g.g(wi(a.G,a.h),5);case 5:e=g.i;if(!e){g.A(0);break}f=new T("trackschanged",
|
|
638
|
+
void 0);return g.g(Promise.resolve(),7);case 7:a.dispatchEvent(f),g.j()}})}p.configure=function(a,b){a=Cn(a,b);co(this.g,a)};p.getConfiguration=function(){return td(this.g)};
|
|
639
|
+
function Qo(a){return G(function(b){a.C||(a.C=a.g.adaptationSetCriteriaFactory(),a.C.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredAudioRole,videoRole:a.g.preferredVideoRole,channelCount:0,hdrLevel:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,audioLabel:a.g.preferredAudioLabel,videoLabel:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,
|
|
640
|
+
preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount}));if(a.i||!a.h.variants.length||a.h.variants.length!=1&&a.h.type!="HLS")return b.A(0);a.i=Ro(a);return a.i?b.g(So(a.i),0):b.A(0)})}function Mo(a){return G(function(b){if(b.h==1)return!a.i||a.h.variants.includes(a.i)?b.A(0):b.g(To(a.i),3);a.i=Ro(a);return a.i?b.g(So(a.i),0):b.A(0)})}
|
|
641
|
+
function No(a){var b,c,d,e,f;return G(function(g){!a.i&&(b=Ro(a))&&(a.i=b);if(!a.i)return g.A(0);c=a.h.presentationTimeline.U();d=[];e=a.i;e.video&&d.push(Uo(a,e.video,c));e.audio&&d.push(Uo(a,e.audio,c));(f=qg(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&ug(e.audio,f,a.g)&&(d.push(Uo(a,f,c)),a.T=f);return g.g(Promise.all(d),0)})}
|
|
642
|
+
function Ro(a){if(!a.u){var b=a.g.abrFactory;a.u=b();a.u.configure(a.g.abr)}b=pg(a.h.variants);b=a.C.create(b);a.u.setVariants(Array.from(b.values()));return a.u.chooseVariant(!0)}
|
|
643
|
+
function Uo(a,b,c){var d,e,f,g,h;return G(function(k){if(k.h==1)return d=a.g.streaming.segmentPrefetchLimit||2,e=new nm(d,b,function(l,m,n){return hn(l,m,n||null,a.g.streaming.retryParameters,a.Da,a.D)},!1),a.M.set(b.id,e),b.segmentIndex?k.A(2):k.g(b.createSegmentIndex(),2);f=typeof a.o==="number"?a.o:0;g=b.segmentIndex.Xb(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=jg(b.segmentIndex));return h?c?h.ea?k.g(qm(e,h.ea),0):k.A(0):k.g(pm(e,h.startTime),0):k.A(0)})}
|
|
644
|
+
function So(a){var b,c,d,e;return G(function(f){b=[];c=t([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&!e.segmentIndex&&b.push(e.createSegmentIndex());return b.length>0?f.g(Promise.all(b),0):f.A(0)})}function To(a){var b,c,d,e;return G(function(f){b=[];c=t([a.video,a.audio]);for(d=c.next();!d.done;d=c.next())(e=d.value)&&e.segmentIndex&&e.closeSegmentIndex&&b.push(e.closeSegmentIndex());return b.length>0?f.g(Promise.all(b),0):f.A(0)})}p.ol=function(){return this.B};
|
|
645
|
+
p.destroy=function(){var a=this,b,c,d;return G(function(e){if(e.h==1)return a.l=!0,!a.m||a.oa?e.A(2):e.g(a.m.stop(),2);if(e.h!=4)return a.u&&a.u.release(),a.I&&!a.va&&a.I.release(),!a.j||a.ba?e.A(4):e.g(a.j.destroy(),4);if(a.M.size>0&&!a.ya)for(b=t(a.M.values()),c=b.next();!c.done;c=b.next())d=c.value,wm(d);e.j()})};function Po(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}N("shaka.media.PreloadManager",so);
|
|
646
|
+
so.prototype.destroy=so.prototype.destroy;so.prototype.waitForFinish=so.prototype.ol;so.prototype.getPrefetchedTextTrack=so.prototype.Rj;so.prototype.getPrefetchedVariantTrack=so.prototype.Sj;function Vo(a,b){Og.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{hd:null,gd:Wo,Tc:function(d,e){return Xo(c,"enter",d,e)}},{hd:Yo,gd:Wo,Tc:function(d,e){return Xo(c,"enter",d,e)}},{hd:Zo,gd:Wo,Tc:function(d,e){return Xo(c,"enter",d,e)}},{hd:Wo,gd:Yo,Tc:function(d,e){return Xo(c,"exit",d,e)}},{hd:Wo,gd:Zo,Tc:function(d,e){return Xo(c,"exit",d,e)}},{hd:Yo,gd:Zo,Tc:function(d,e){e?Xo(c,"skip",d,e):(Xo(c,"enter",d,e),Xo(c,"exit",d,e))}},{hd:Zo,gd:Yo,Tc:function(d,e){return Xo(c,"skip",
|
|
647
|
+
d,e)}}];this.h=new gb;this.h.F(this.i,"regionremove",function(d){c.g.delete(d.region)})}na(Vo,Og);Vo.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Og.prototype.release.call(this)};
|
|
648
|
+
Vo.prototype.j=function(a,b){if(!this.l||a!=0){this.l=!1;for(var c=t(this.i.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Yo:a>d.endTime?Zo:Wo;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.hd==e&&h.gd==f&&h.Tc(d,b)}}};function Xo(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Yo=1,Wo=2,Zo=3;/*
|
|
649
|
+
@license
|
|
650
|
+
Copyright 2013 Ali Al Dallal
|
|
651
|
+
|
|
652
|
+
Licensed under the MIT license.
|
|
653
|
+
|
|
654
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
655
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
656
|
+
in the Software without restriction, including without limitation the rights
|
|
657
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
658
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
659
|
+
furnished to do so, subject to the following conditions:
|
|
660
|
+
|
|
661
|
+
The above copyright notice and this permission notice shall be included in
|
|
662
|
+
all copies or substantial portions of the Software.
|
|
663
|
+
|
|
664
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
665
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
666
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
667
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
668
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
669
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
670
|
+
SOFTWARE.
|
|
671
|
+
*/
|
|
672
|
+
for(var $o={ach:"Lwo",ady:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili",
|
|
673
|
+
"be-BY":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438","bg-BG":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bn:"\u09ac\u09be\u0982\u09b2\u09be","bn-IN":"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)","bn-BD":"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)","bs-BA":"Bosanski",ca:"Catal\u00e0","ca-ES":"Catal\u00e0",cak:"Maya Kaqchikel","ck-US":"\u13e3\u13b3\u13a9 (tsalagi)",
|
|
674
|
+
cs:"\u010ce\u0161tina","cs-CZ":"\u010ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\u00d6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","el-GR":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)",
|
|
675
|
+
"en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\u00f1ol","es-AR":"Espa\u00f1ol (Argentine)","es-419":"Espa\u00f1ol (Latinoam\u00e9rica)","es-CL":"Espa\u00f1ol (Chile)","es-CO":"Espa\u00f1ol (Colombia)","es-EC":"Espa\u00f1ol (Ecuador)","es-ES":"Espa\u00f1ol (Espa\u00f1a)","es-LA":"Espa\u00f1ol (Latinoam\u00e9rica)","es-NI":"Espa\u00f1ol (Nicaragua)","es-MX":"Espa\u00f1ol (M\u00e9xico)",
|
|
676
|
+
"es-US":"Espa\u00f1ol (Estados Unidos)","es-VE":"Espa\u00f1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06cc","fa-IR":"\u0641\u0627\u0631\u0633\u06cc","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\u00f8royskt",fr:"Fran\u00e7ais","fr-CA":"Fran\u00e7ais (Canada)","fr-FR":"Fran\u00e7ais (France)","fr-BE":"Fran\u00e7ais (Belgique)","fr-CH":"Fran\u00e7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",
|
|
677
|
+
gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\u00f1e'\u1ebd","gu-IN":"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0","gx-GR":"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",he:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f","he-IL":"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",hi:"\u0939\u093f\u0928\u094d\u0926\u0940","hi-IN":"\u0939\u093f\u0928\u094d\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\u00f2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",
|
|
678
|
+
id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\u00cdslenska","is-IS":"\u00cdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65e5\u672c\u8a9e","ja-JP":"\u65e5\u672c\u8a9e","jv-ID":"Basa Jawa","ka-GE":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8","kk-KZ":"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a","km-KH":"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kab:"Taqbaylit",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1","kn-IN":"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",
|
|
679
|
+
ko:"\ud55c\uad6d\uc5b4","ko-KR":"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",ku:"Kurd\u00ee","ku-TR":"Kurd\u00ee",la:"Latin","la-VA":"Latin",lb:"L\u00ebtzebuergesch","li-NL":"L\u00e8mb\u00f6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0","mg-MG":"Malagasy",mk:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438","mk-MK":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
|
|
680
|
+
ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","ml-IN":"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","mn-MN":"\u041c\u043e\u043d\u0433\u043e\u043b",mr:"\u092e\u0930\u093e\u0920\u0940","mr-IN":"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102c\u1005\u1000\u102c",nb:"Norsk (bokm\u00e5l)","nb-NO":"Norsk (bokm\u00e5l)",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","ne-NP":"\u0928\u0947\u092a\u093e\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\u00eb)",
|
|
681
|
+
"nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0b13\u0b21\u0b3c\u0b3f\u0b06",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40","pa-IN":"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067e\u069a\u062a\u0648",pt:"Portugu\u00eas","pt-BR":"Portugu\u00eas (Brasil)","pt-PT":"Portugu\u00eas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\u00e2n\u0103","ro-RO":"Rom\u00e2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",
|
|
682
|
+
"ru-RU":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d","se-NO":"Davvis\u00e1megiella","si-LK":"\u0db4\u0dc5\u0dcf\u0dad",sk:"Sloven\u010dina","sk-SK":"Sloven\u010dina (Slovakia)",sl:"Sloven\u0161\u010dina","sl-SI":"Sloven\u0161\u010dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043f\u0441\u043a\u0438","sr-RS":"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili",
|
|
683
|
+
"sw-KE":"Kiswahili",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd","ta-IN":"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41","te-IN":"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tg:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301","tg-TJ":"\u0442\u043e\u04b7\u0438\u043a\u04e3",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","th-TH":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",tl:"Filipino","tl-PH":"Filipino",
|
|
684
|
+
tlh:"tlhIngan-Hol",tr:"T\u00fcrk\u00e7e","tr-TR":"T\u00fcrk\u00e7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430","uk-UA":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648","ur-PK":"\u0627\u0631\u062f\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1ebfng Vi\u1ec7t","vi-VN":"Ti\u1ebfng Vi\u1ec7t","xh-ZA":"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9","yi-DE":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",
|
|
685
|
+
zh:"\u4e2d\u6587","zh-HANS":"\u4e2d\u6587\u7b80\u4f53","zh-HANT":"\u4e2d\u6587\u7e41\u9ad4","zh-CN":"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-HK":"\u4e2d\u6587\uff08\u9999\u6e2f\uff09","zh-SG":"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09","zh-TW":"\u4e2d\u6587\uff08\u53f0\u7063\uff09","zu-ZA":"isiZulu"},ap=t(Object.keys($o)),bp=ap.next();!bp.done;bp=ap.next()){var cp=bp.value;$o[cp.toLowerCase()]=$o[cp]};function dp(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return dp(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=ze,e=a.fontStyle==Ae,f=a.textDecoration.includes(Be);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;e==""&&b&&(e=b.color);d="";(e=ep(e))&&(d+="."+e);e=a.backgroundColor;e==""&&b&&(e=b.backgroundColor);(b=ep(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
|
|
686
|
+
k=k.next().value;return"<"+h+(k===void 0?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
687
|
+
function ep(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&a.length>7&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
688
|
+
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function fp(a,b){var c=[];a=t(gp(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,F(fp(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=dp(d,b);c.push(e)}return c}
|
|
689
|
+
function gp(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={ig:void 0},c=a.next())d.ig=c.value,b.some(function(e){return function(f){return qe(e.ig,f)}}(d))||b.push(d.ig);return b}
|
|
690
|
+
function hp(a){function b(d){for(var e=5381,f=d.length;f;)e=e*33^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}a.textAlign=="center"&&c.align!="center"&&(c.align="middle");a.writingMode=="vertical-lr"?c.vertical="lr":a.writingMode=="vertical-rl"&&
|
|
691
|
+
(c.vertical="rl");a.lineInterpretation==1&&(c.snapToLines=!1);a.line!=null&&(c.line=a.line);a.position!=null&&(c.position=a.position);return c}
|
|
692
|
+
function ip(a,b){var c=fp(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={vd:void 0},e=c.next())f.vd=e.value,!b.some(function(g){return function(h){return h.startTime==g.vd.startTime&&h.endTime==g.vd.endTime&&h.text==g.vd.payload?!0:!1}}(f))&&f.vd.payload&&(e=hp(f.vd))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-
|
|
693
|
+
d.indexOf(h)});b=t(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function jp(a,b){var c=!1;a.mode==="disabled"&&(c=!0,a.mode="hidden");for(var d=0;d<a.cues.length;){var e=a.cues[d];b(e)?a.removeCue(e):d++}c&&(a.mode="disabled")};function kp(a){var b=this;this.i=a;this.l=new gb;this.j=null;this.h=new Map;this.g=-1;this.u=!1;this.m=null;this.C=function(){var c;(c=b.m)==null||c.stop();b.m=null;b.l.Ma(b.i,"textchanged",b.o);b.l.Ma(b.j.textTracks,"change",b.B);c=t(b.h.values());for(var d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.o=function(){var c=new Map,d=b.i.Lc();d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||f.track.mode==="disabled"||
|
|
694
|
+
(f.track.mode="disabled");b.h.delete(e.id)}else{var g=f=b.j.ownerDocument.createElement("track");var h=nb();h=e.forced&&h.Ia()==="WEBKIT"?"forced":e.kind==="caption"?"captions":"subtitles";g.kind=h;g=f;h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in $o)h=$o[e.language];else{var k=Af(e.language);k in $o&&(h=$o[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language?e.language in $o?f.srclang=e.language:
|
|
695
|
+
(g=Af(e.language),h=void 0,f.srclang=(h=g)!=null?h:"und"):f.srclang="und";f.src="data:,WEBVTT";f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=t(b.h.values());for(e=d.next();!e.done;e=d.next())e.value.remove();b.g>-1&&(c.has(b.g)?(d=c.get(b.g).track,d.mode==="disabled"&&(d.mode=b.u?"showing":"hidden")):b.g=-1);b.h=c};this.B=function(){if(!b.m){var c=b.j;b.m=(new of(function(){b.m=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);f.track.mode==="showing"?
|
|
696
|
+
(d=b.g,e=!0):f.track.mode==="hidden"&&(d=b.g)}if(!e)for(e=t(b.h),f=e.next();!f.done;f=e.next()){var g=t(f.value);f=g.next().value;g=g.next().value;if(g.track.mode==="showing"){d=f;break}else d<0&&g.track.mode==="hidden"&&(d=f)}e=t(b.h);for(f=e.next();!f.done;f=e.next())g=t(f.value),f=g.next().value,g=g.next().value,f!==d&&g.track.mode!=="disabled"&&(g.track.mode="disabled");b.g!==d&&(b.g=d,d>-1&&b.i.nh({id:d}));b.i.rh(d>-1&&b.h.get(d).track.mode==="showing")}})).ka(0)}};this.l.F(a,"loaded",function(){return b.enableTextDisplayer()});
|
|
697
|
+
this.enableTextDisplayer()}p=kp.prototype;p.configure=function(){};p.remove=function(a,b){if(this.i)this.h.has(this.g)&&jp(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&ip(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.C(),this.i=null);var a;(a=this.m)==null||a.stop();this.m=null;var b;(b=this.l)==null||b.release();this.l=null;return Promise.resolve()};p.isTextVisible=function(){return this.u};
|
|
698
|
+
p.setTextVisibility=function(a){this.u=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;b.mode!=="disabled"&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&this.i.$d()===3)if(b=Array.from(this.i.$e().textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.mode==="showing"){a=null;break}else a||c.mode!=="hidden"||(a=c);a&&(a.mode="showing")}else for(a=t(b),b=a.next();!b.done;b=
|
|
699
|
+
a.next())b=b.value,b.mode==="showing"&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&this.i.$d()===2&&(this.j=this.i.$e(),this.l.Aa(this.i,"unloading",this.C),this.l.F(this.i,"textchanged",this.o),this.l.F(this.j.textTracks,"change",this.B),this.o())};N("shaka.text.NativeTextDisplayer",kp);kp.prototype.enableTextDisplayer=kp.prototype.enableTextDisplayer;kp.prototype.setTextLanguage=kp.prototype.setTextLanguage;kp.prototype.setTextVisibility=kp.prototype.setTextVisibility;
|
|
700
|
+
kp.prototype.isTextVisible=kp.prototype.isTextVisible;kp.prototype.destroy=kp.prototype.destroy;kp.prototype.append=kp.prototype.append;kp.prototype.remove=kp.prototype.remove;kp.prototype.configure=kp.prototype.configure;function lp(a,b){ub("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");this.h=a;this.i=b;this.g=null;a=t(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,b.kind!=="metadata"&&b.kind!=="chapters"&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=lp.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;jp(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
701
|
+
p.append=function(a){this.g&&ip(this.g,a)};p.destroy=function(){this.g&&(jp(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?this.g.mode=="showing":!1};p.setTextVisibility=function(a){a&&!this.g&&mp(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){mp(this)};function mp(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
|
|
702
|
+
N("shaka.text.SimpleTextDisplayer",lp);lp.prototype.enableTextDisplayer=lp.prototype.enableTextDisplayer;lp.prototype.setTextLanguage=lp.prototype.setTextLanguage;lp.prototype.setTextVisibility=lp.prototype.setTextVisibility;lp.prototype.isTextVisible=lp.prototype.isTextVisible;lp.prototype.destroy=lp.prototype.destroy;lp.prototype.append=lp.prototype.append;lp.prototype.remove=lp.prototype.remove;lp.prototype.configure=lp.prototype.configure;function np(){}p=np.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};N("shaka.text.StubTextDisplayer",np);np.prototype.enableTextDisplayer=np.prototype.enableTextDisplayer;np.prototype.setTextLanguage=np.prototype.setTextLanguage;np.prototype.setTextVisibility=np.prototype.setTextVisibility;
|
|
703
|
+
np.prototype.isTextVisible=np.prototype.isTextVisible;np.prototype.destroy=np.prototype.destroy;np.prototype.append=np.prototype.append;np.prototype.remove=np.prototype.remove;np.prototype.configure=np.prototype.configure;function op(a,b){var c=this;this.j=!1;this.h=[];this.m=a;this.l=b;this.C=this.u=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.B=new of(function(){c.m.paused||pp(c)});qp(this);this.o=new Map;this.i=new gb;this.i.F(document,"fullscreenchange",function(){pp(c,!0)});this.i.F(this.m,"seeking",
|
|
704
|
+
function(){pp(c,!0)});this.i.F(this.m,"ratechange",function(){qp(c)});this.i.F(this.m,"resize",function(){var d=c.m,e=d.videoWidth;d=d.videoHeight;e&&d?c.u=e/d:c.u=null});this.H=!1;this.D=null;"ResizeObserver"in window&&(this.D=new ResizeObserver(function(){c.H||(c.H=!0,requestAnimationFrame(function(){c.H=!1;c.g&&c.g.parentElement&&c.j&&pp(c,!0)}))}),this.D.observe(this.l));this.G=new Map}p=op.prototype;p.configure=function(a){this.C=a;qp(this);pp(this,!0)};
|
|
705
|
+
p.append=function(a){var b=[].concat(F(this.h));a=t(gp(a));for(var c=a.next(),d={};!c.done;d={jg:void 0},c=a.next())d.jg=c.value,b.some(function(e){return function(f){return qe(f,e.jg)}}(d))||this.h.push(d.jg);this.h.length&&qp(this);pp(this)};
|
|
706
|
+
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.l.removeChild(this.g);this.g=null;this.j=!1;this.h=[];this.B&&(this.B.stop(),this.B=null);this.o.clear();this.i&&(this.i.release(),this.i=null);this.D&&(this.D.disconnect(),this.D=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});pp(this,c>this.h.length);this.h.length||qp(this);return!0};
|
|
707
|
+
p.isTextVisible=function(){return this.j};p.setTextVisibility=function(a){(this.j=a)?(this.g.parentElement||this.l.appendChild(this.g),pp(this,!0)):this.g.parentElement&&this.l.removeChild(this.g)};p.setTextLanguage=function(a){a&&a!="und"?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function qp(a){a.B&&(a.h.length?a.B.Ea((a.C?a.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.m.playbackRate))):a.B.stop())}
|
|
708
|
+
function rp(a,b){for(;b!=null;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
709
|
+
function sp(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.o.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.kj:null;l&&(g.push(l.kg),l.Yc&&g.push(l.Yc),m||(f=!0,a.o.delete(k),l=null));m&&(h.push(k),l?rp(a,n)||(f=!0):(tp(a,k,e),l=a.o.get(k),n=l.kj,f=!0));k.nestedCues.length>0&&n&&sp(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,r){return q.startTime!=
|
|
710
|
+
r.startTime?q.startTime-r.startTime:q.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.o.get(d.value),d.Yc?(d.Yc.contains(c)&&d.Yc.removeChild(c),c.appendChild(d.Yc),d.Yc.appendChild(d.kg)):c.appendChild(d.kg)}}function pp(a,b){if(a.g){var c=a.m.currentTime;if(!a.j||(b===void 0?0:b)){b=t(a.G.values());for(var d=b.next();!d.done;d=b.next())Nj(d.value);Nj(a.g);a.o.clear();a.G.clear()}a.j&&sp(a,a.h,a.g,c,[])}}
|
|
711
|
+
function tp(a,b,c){var d=c.length>1,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&b.nestedCues.length>0;var f=document.createElement(e);e!="br"&&up(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.u===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==fd?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==fd?"%":"px");if(a.G.has(c))c=a.G.get(c);else{e=document.createElement("span");var k=g.heightUnits==fd?"%":"px",l=g.widthUnits==
|
|
712
|
+
fd?"%":"px",m=g.viewportAnchorUnits==fd?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;g.heightUnits===2&&(n=g.height*5.33,k="%");g.widthUnits===2&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;g.viewportAnchorUnits===2?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.u===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
|
|
713
|
+
g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*q/100+m);g.heightUnits!==0&&g.widthUnits!==0&&g.viewportAnchorUnits!==0&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
|
|
714
|
+
b.displayAlign=="before"?"flex-start":b.displayAlign=="center"?"center":"flex-end";a.G.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.o.set(b,{kg:f,kj:e,Yc:c})}
|
|
715
|
+
function vp(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==ee?c:a==="left"||a==="start"&&b===ge||a==="end"&&b==="rtl"?"line-left":a==="right"||a==="start"&&b==="rtl"||a==="end"&&b===ge?"line-right":"center"}
|
|
716
|
+
function up(a,b,c,d,e){var f=b.style,g=c.nestedCues.length==0,h=d.length>1;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=wp(c.linePadding,c,a.l);f.paddingRight=wp(c.linePadding,c,a.l);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
717
|
+
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=xp(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.setAttribute("translate","no"),l.textContent=
|
|
718
|
+
k)}if(h&&!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(c.textAlign=="left"||c.textAlign=="start")f.width="100%",f.alignItems="flex-start";else if(c.textAlign=="right"||c.textAlign=="end")f.width="100%",f.alignItems="flex-end";f.justifyContent=c.displayAlign=="before"?"flex-start":c.displayAlign=="center"?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;
|
|
719
|
+
f.letterSpacing=c.letterSpacing;d=a.C?a.C.fontScaleFactor:1;if(d!==1||c.fontSize)f.fontSize=wp(c.fontSize||"1em",c,a.l,d);d=c.line;d!=null&&(g=c.lineInterpretation,g==ie&&(g=1,h=16,a.u&&a.u<1&&(h=32),d=d<0?100+d/h*100:d/h*100),g==1&&(f.position="absolute",c.writingMode==he?(f.width="100%",c.lineAlign==je?f.top=d+"%":c.lineAlign=="end"&&(f.bottom=100-d+"%")):c.writingMode=="vertical-lr"?(f.height="100%",c.lineAlign==je?f.left=d+"%":c.lineAlign=="end"&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==
|
|
720
|
+
je?f.right=d+"%":c.lineAlign=="end"&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=vp(c);a=="line-left"?(f.cssFloat="left",c.position!==null&&(f.position="absolute",c.writingMode==he?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):a=="line-right"?(f.cssFloat="right",c.position!==null&&(f.position="absolute",c.writingMode==he?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):c.position!==null&&c.position!=50&&(f.position="absolute",c.writingMode==he?(f.left=c.position+
|
|
721
|
+
"%",f.width="auto"):f.top=c.position+"%",c.size&&(f.transform="translateX(-50%)"));f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==he?f.width=c.size+"%":f.height=c.size+"%")}
|
|
722
|
+
function wp(a,b,c,d){d=d===void 0?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function xp(a,b){for(var c=a.length-1;c>=0;c--){var d=b(a[c]);if(d||d===0)return d}return null}N("shaka.text.UITextDisplayer",op);op.prototype.enableTextDisplayer=op.prototype.enableTextDisplayer;
|
|
723
|
+
op.prototype.setTextLanguage=op.prototype.setTextLanguage;op.prototype.setTextVisibility=op.prototype.setTextVisibility;op.prototype.isTextVisible=op.prototype.isTextVisible;op.prototype.remove=op.prototype.remove;op.prototype.destroy=op.prototype.destroy;op.prototype.append=op.prototype.append;op.prototype.configure=op.prototype.configure;function yp(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(g*1E3%1E3);return(f<10?"0":"")+f+":"+(h<10?"0":"")+h+":"+(k<10?"0":"")+k+"."+(g<100?g<10?"00":"0":"")+g}var d=fp(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
724
|
+
break;case "right":g.push("align:right");break;case fe:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}N("shaka.text.WebVttGenerator",function(){});function zp(a,b){this.g=b;this.j=a;this.m=new Map;this.l=void 0;this.D=!1;this.J=!0;this.u=this.I=!1;this.C=this.B=void 0;this.H=0;this.K={request:!1,response:!1,event:!1};this.o={};this.i=new gb;this.G=[];this.h=null}zp.prototype.setMediaElement=function(a){this.h=a;Ap(this)};zp.prototype.configure=function(a){this.g=a;Bp(this)};function Cp(a){a.m.clear();a.D=!1;a.J=!0;a.I=!1;a.u=!1;a.B=0;a.C=0;a.H=0;a.K={request:!1,response:!1,event:!1};Dp(a);a.o={};a.h=null;a.i.Qa()}
|
|
725
|
+
function Ep(a,b){a.u=b;a.u?a.l==Fp?a.l=Gp:a.l==Hp&&(a.l=Ip):a.l==Gp?a.l=Fp:a.l==Ip&&(a.l=Hp)}function Jp(a,b){if(a.g&&a.g.enabled&&(Kp(a,"ps",{bd:"d"}),a.h&&a.h.autoplay)){var c=a.h.play();c&&c.then(function(){a.H=b}).catch(function(){a.H=0})}}
|
|
726
|
+
function Lp(a,b,c){try{if(!a.g.enabled)return b;var d=Mp(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=Np;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=Op;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=Pp;break a}e=void 0}d.ot=e;d.su=
|
|
727
|
+
!0;var f=Qp(d);return Rp(b,f)}catch(g){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
|
|
728
|
+
function Ap(a){a.i.F(a.h,"playing",function(){a.C||(a.C=Date.now());Kp(a,"ps",{bd:"p"})});a.i.F(a.h,"volumechange",function(){Kp(a,a.h.muted?"m":"um")});a.i.F(a.h,"play",function(){a.B||(a.B=Date.now(),Kp(a,"ps",{bd:"s"}))});a.i.F(a.h,"pause",function(){Kp(a,"ps",{bd:"a"})});a.i.F(a.j,"buffering",function(){Kp(a,"ps",{bd:"w"})});a.i.F(a.h,"seeking",function(){return Kp(a,"ps",{bd:"k"})});a.i.F(document,"fullscreenchange",function(){Kp(a,document.fullscreenElement?"pe":"pc")});var b=a.h;(b.webkitPresentationMode||
|
|
729
|
+
b.webkitSupportsFullscreen)&&a.i.F(b,"webkitpresentationmodechanged",function(){b.webkitPresentationMode?Kp(a,b.webkitPresentationMode!=="inline"?"pe":"pc"):b.webkitSupportsFullscreen&&Kp(a,b.webkitDisplayingFullscreen?"pe":"pc")});a.i.F(a.h,"enterpictureinpicture",function(){Kp(a,"pe")});a.i.F(a.h,"leavepictureinpicture",function(){Kp(a,"pc")});"documentPictureInPicture"in window&&a.i.F(window.documentPictureInPicture,"enter",function(c){Kp(a,"pe");a.i.Aa(c.window,"pagehide",function(){Kp(a,"pc")})});
|
|
730
|
+
a.i.F(document,"visibilitychange",function(){document.hidden?Kp(a,"b",{bg:!0}):Kp(a,"b")});a.i.F(a.j,"complete",function(){Kp(a,"ps",{bd:"e"})})}function Bp(a){Dp(a);var b=Sp(a);b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value.timeInterval,c===void 0&&(c=Tp),c>=1){var d=new of(function(){return Kp(a,Up)});d.Ea(c);a.G.push(d)}}function Dp(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.stop();a.G=[]}
|
|
731
|
+
function Sp(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===Vp&&b.enabled}):[]}function Wp(a){return(a=a.g.targets)?a.filter(function(b){return b.mode===Xp&&b.enabled===!0}):[]}function Mp(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.l,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.j.getBandwidthEstimate()/1E3}}
|
|
732
|
+
function Kp(a,b,c){c=c===void 0?{}:c;b=Object.assign({e:b,ts:Date.now()},c);b=Yp(a,b,Vp);c=a.g.targets;if(!(a.g.version<Zp)&&c){var d=Sp(a);c=Array.from(new Set([].concat(F($p),F(aq))));d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=bq(e.includeKeys||[],c);f.includes(cq)||f.push(cq);f=dq(b,f);var g=e.events||[],h=f.e,k=f.sta;h&&(!eq.includes(h)||!(h!=="ps"||k&&fq.includes(k))||g&&g.length>0&&!g.includes(h))||gq(a,f,e)}}}
|
|
733
|
+
function hq(a,b,c){if(a.g.enabled){c=Yp(a,c,iq);var d=jq({mode:iq,useHeaders:a.g.useHeaders,includeKeys:a.g.includeKeys||[]});a.o[d]||(a.o[d]={request:1,response:1});c.sn=a.o[d].request++;d=a.g.includeKeys||[];var e=a.g.version==Zp?Array.from(new Set([].concat(F($p),F(kq)))):lq;d=bq(d,e);c=dq(c,d);mq(a,c,b,a.g.useHeaders)}}
|
|
734
|
+
function gq(a,b,c,d){var e=Cg(),f=c.url;if(c.useHeaders){b=nq(b);if(!Object.keys(b).length)return;d&&Object.assign(d.headers,b);d=Wg([f],e);Object.assign(d.headers,b)}else{b=Qp(b);if(!b)return;f=Rp(f,b);d&&(d.uri=f);d=Wg([f],e)}a.j.Yb().request(9,d)}function mq(a,b,c,d){if(d){b=nq(b);if(!Object.keys(b).length)return;Object.assign(c.headers,b)}else{var e=Qp(b);if(!e)return;c.uris=c.uris.map(function(f){return Rp(f,e)})}Wp(a).length>0||!a.m.has(c)||a.m.delete(c)}
|
|
735
|
+
function bq(a,b){if(!a||a.length===0)return b;for(var c=t(a),d=c.next();!d.done;d=c.next())b.includes(d.value);return a=a.filter(function(e){return b.includes(e)})}function dq(a,b){return Object.keys(a).reduce(function(c,d){b.includes(d)&&(c[d]=a[d]);return c},{})}function oq(a){if(a.type===0)return pq;if(a=a.stream){var b=a.type;if(b=="video")return a.codecs&&a.codecs.includes(",")?Op:qq;if(b=="audio")return Np;if(b=="text")return a.mimeType==="application/mp4"?rq:sq}}
|
|
736
|
+
function jq(a){var b=Object.keys(a).sort().reduce(function(c,d){d!=="enabled"&&(c[d]=a[d]);return c},{});return JSON.stringify(b)}function tq(a,b){b=a.j.Hc()[b];if(!b.length)return NaN;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:NaN}function uq(a,b){b=a.j.Hc()[b];if(!b.length)return 0;var c=a.h?a.h.currentTime:0;return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?(a.end-c)*1E3:0}
|
|
737
|
+
function vq(a,b){var c=a.j.sc();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.type==="variant"&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case qq:return a.videoBandwidth||NaN;case Np:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
738
|
+
function wq(a,b,c){var d=b.segment,e=0;d&&(e=d.endTime-d.startTime);e={d:e*1E3,st:a.j.U()?xq:yq};e.ot=oq(b);var f=e.ot===qq||e.ot===Np||e.ot===Op||e.ot===rq;if(b=b.stream){var g=a.j.Ob();if(f&&(e.bl=tq(a,b.type),e.ot!==rq)){var h=uq(a,b.type);e.dl=g?h/Math.abs(g):h}b.bandwidth&&(e.br=b.bandwidth/1E3);if(b.segmentIndex&&d){if((g=b.segmentIndex.Xb(d.endTime,!0,g<0))&&(g=g.next().value)&&g!=d){if(c&&!eb(d.P(),g.P())){var k=g.P()[0];h=new URL(k);var l=new URL(c);if(h.origin!==l.origin)c=k;else{c=h.pathname.split("/").slice(1);
|
|
739
|
+
k=l.pathname.split("/").slice(1,-1);l=Math.min(c.length,k.length);for(var m=0;m<l&&c[m]===k[m];m++)c.shift(),k.shift();for(;k.length;)k.shift(),c.unshift("..");c=c.join("/")+h.search+h.hash}e.nor=c}!g.startByte&&!g.endByte||d.startByte==g.startByte&&d.endByte==g.endByte||(c=g.startByte+"-",g.endByte&&(c+=g.endByte),e.nrr=c)}g=a.j.Ob()||1;c=uq(a,b.type)||500;d=(b=b.bandwidth)?b*(d.endTime-d.startTime)/1E3/(c/g/1E3)*a.g.rtpSafetyFactor:NaN;isNaN(d)||(e.rtp=d)}}f&&e.ot!==rq&&(e.tb=vq(a,e.ot)/1E3);return e}
|
|
740
|
+
function Yp(a,b,c){Object.assign(b,Mp(a));b.pr=a.j.Ob();var d=b.ot===qq||b.ot===Op;a.I&&d&&(b.bs=!0,b.su=!0,a.I=!1);b.su==null&&(b.su=a.J);a.j.U()&&(d=zq(a.j),b.ltc=d||void 0);document.hidden&&(b.bg=!0);d=a.C&&a.B?a.C-(a.H||a.B):void 0;d==void 0||a.K[c]||(b.msd=d,a.K[c]=!0);return b}
|
|
741
|
+
function Qp(a){function b(n){return c(n/100)*100}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&n!=null&&n!==""&&n!==!1}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c,ttfb:c,ttlb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&(h!=="v"||k!==1)&&(h!="pr"||k!==1)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m=l==="string"&&h!=="ot"&&h!=="sf"&&h!=="st"?h+"="+JSON.stringify(k):
|
|
742
|
+
l==="boolean"?h:l==="symbol"?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}
|
|
743
|
+
function nq(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[f[g]!=null?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Qp(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
744
|
+
function Rp(a,b){if(!b||a.includes("offline:"))return a;a=new zb(a);a.g.set("CMCD",b);return a.toString()}var Pp="m",Np="a",qq="v",Op="av",pq="i",sq="c",rq="tt",Zp=2,yq="v",xq="l",Fp="d",Gp="ld",Hp="h",Ip="lh";N("shaka.util.CmcdManager.StreamingFormat",{DASH:Fp,Ql:Gp,HLS:Hp,Rl:Ip,gm:"s",OTHER:"o"});
|
|
745
|
+
var lq="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),$p="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),kq="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),Aq="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),aq=["e","sta"],eq="ps e t c b m um pe pc".split(" "),fq="spawkrfeqd".split(""),Tp=10,cq="ts",Up="t",iq="request",Xp="response",Vp="event";function Bq(a){this.h=a;this.g=null}p=Bq.prototype;p.configure=function(a){this.h=a};p.ei=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Cq)?this.g.get(Cq)*1E3:null};p.ci=function(){return this.h.enabled&&this.g&&this.g.has(Dq)?this.g.get(Dq)*1E3:null};p.Uj=function(){return this.h.enabled&&this.g&&this.g.has(Eq)?this.g.get(Eq):null};p.Vj=function(){return this.h.enabled&&this.g&&this.g.has(Fq)?this.g.get(Fq):null};
|
|
746
|
+
p.getBandwidthEstimate=function(a){var b=this.ci();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return c>0&&c<=1?a*(1-c)+b*c:a};function Gq(a){return a?a.toLowerCase()==="false"?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}N("shaka.util.CmsdManager",Bq);Bq.prototype.getBandwidthEstimate=Bq.prototype.getBandwidthEstimate;Bq.prototype.getRoundTripTime=Bq.prototype.Vj;Bq.prototype.getResponseDelay=Bq.prototype.Uj;Bq.prototype.getEstimatedThroughput=Bq.prototype.ci;
|
|
747
|
+
Bq.prototype.getMaxBitrate=Bq.prototype.ei;var Dq="etp",Cq="mb",Eq="rd",Fq="rtt";function Hq(){this.g=null;this.h=[]}function Iq(a,b){return G(function(c){if(c.h==1)return a.g?c.g(new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;c.j()})}Hq.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function X(a,b,c){b=b===void 0?null:b;Og.call(this);var d=this;this.m=Jq;this.h=null;this.Ae=b;this.$=!1;this.Ke=new gb;this.Be=new gb;this.j=new gb;this.fc=new gb;this.Hd=new gb;this.G=this.H=this.D=this.N=null;this.Le=0;this.ba=new Hq;this.O=this.Ga=this.X=this.i=this.Ac=this.I=this.l=this.xe=this.T=this.Mh=this.va=this.K=this.kb=this.za=this.ze=this.R=this.Ta=this.M=this.cc=null;this.Ua=!1;this.Fe=this.o=null;this.Ee=1E9;this.Je=[];this.zc=new Map;this.ob=[];this.Xf=-1;this.g=Kq(this);this.Zf=
|
|
748
|
+
bo();this.V=null;this.Me=-1;this.ec=null;this.ya={width:Infinity,height:Infinity};this.De=new vi(this.g,this.ya,null);this.He=[];this.B=null;this.J=this.g.adaptationSetCriteriaFactory();this.J.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,
|
|
749
|
+
codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.Ld=this.g.preferredTextLanguage;this.Pd=this.g.preferredTextRole;this.Od=this.g.preferForcedSubs;this.Ce=[];c&&c(this);this.K=new zp(this,this.g.cmcd);this.va=new Bq(this.g.cmsd);this.N=Lq(this);this.ma=this.oa=this.Da=this.C=null;this.ag=!1;this.Yf=[];this.$f=
|
|
750
|
+
new of(function(){return G(function(e){if(e.h==1)return d.oa?e.g(d.Vb(d.ma,!0),3):e.A(0);if(e.h!=4)return e.g(d.load(d.oa),4);d.ag?d.ma.pause():d.ma.play();d.oa=null;d.ag=!1;e.j()})});Mq&&(this.C=Mq(),this.C.configure(this.g.ads),this.Hd.F(this.C,"ad-content-pause-requested",function(e){var f,g;return G(function(h){if(h.h==1){d.$f.stop();if(d.oa)return h.A(0);d.ma=d.h;d.ag=d.fe();f=e.saveLivePosition||!1;g=!0;d.U()&&(g=f);return h.g(d.Xh(!0,g),3)}d.oa=h.i;h.j()})}),this.Hd.F(this.C,"ad-content-resume-requested",
|
|
751
|
+
function(e){e=e.offset||0;if(d.oa){var f=d.oa;f.o&&e&&(typeof f.o==="number"?f.o+=e:f.o.setTime(f.o.getTime()+e*1E3))}d.$f.ka(.1)}),this.Hd.F(this.C,"ad-content-attach-requested",function(){return G(function(e){if(e.h==1)return d.h||!d.ma?e.A(0):e.g(d.Vb(d.ma,!0),3);d.ma=null;e.j()})}));Nq&&(this.Da=Nq(this),this.Da.configure(this.g.queue));this.Ke.F(window,"online",function(){Oq(d);d.ih()});this.Ge=new of(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=
|
|
752
|
+
k.value,k.disabledUntilTime>0&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),k.disabledUntilTime>0&&(g=!1);g&&d.Ge.stop();f&&Pq(d,!1,void 0,!1,!1)});this.eb=null;a&&(ub("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Vb(a,!0));this.u=null}na(X,Og);function Qq(a){a.T!=null&&(Nc(a.T),a.T.release(),a.T=null)}
|
|
753
|
+
function Rq(a,b,c){c||b.lcevc.enabled?(Qq(a),a.T==null&&(a.T=new Lc(a.h,a.Mh,b.lcevc,c),a.H&&(a.H.C=a.T))):Qq(a)}function Sq(a,b){return new T(a,b)}p=X.prototype;
|
|
754
|
+
p.destroy=function(){var a=this,b;return G(function(c){switch(c.h){case 1:if(a.m==Tq)return c.return();Qq(a);b=a.detach();a.m=Tq;return c.g(b,2);case 2:return c.g(a.ng(),3);case 3:a.Ke&&(a.Ke.release(),a.Ke=null);a.Be&&(a.Be.release(),a.Be=null);a.j&&(a.j.release(),a.j=null);a.fc&&(a.fc.release(),a.fc=null);a.Hd&&(a.Hd.release(),a.Hd=null);a.Fe=null;a.g=null;a.B=null;a.Ae=null;a.K=null;a.va=null;if(!a.N){c.A(4);break}return c.g(a.N.destroy(),5);case 5:a.N=null;case 4:a.o&&(a.o.release(),a.o=null),
|
|
755
|
+
a.Da&&(a.Da.destroy(),a.Da=null),Og.prototype.release.call(a),c.j()}})};function Uq(a,b){Vq.set(a,b)}function Wq(a,b){a.dispatchEvent(Sq("onstatechange",(new Map).set("state",b)))}
|
|
756
|
+
p.Vb=function(a,b){b=b===void 0?!0:b;var c=this,d,e,f;return G(function(g){switch(g.h){case 1:if(c.m==Tq)throw new S(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.A(2);break}return g.g(c.detach(),2);case 2:return g.g(Xq(c,"attach"),4);case 4:if(g.i)return g.return();g.m(5,6);d||(Wq(c,"attach"),e=function(){var h=Yq(c,!1);h&&Zq(c,h)},c.Be.F(a,"error",e),c.h=a,c.K&&c.K.setMediaElement(a));nb();if(!b||!Tc()||c.H){g.A(6);break}return g.g($q(c),6);case 6:g.u();c.ba.release();g.B(0);break;case 5:return f=g.l(),
|
|
757
|
+
g.g(c.detach(),10);case 10:throw f;}})};p.nj=function(a){this.Mh=a};p.detach=function(a){a=a===void 0?!1:a;var b=this;return G(function(c){if(c.h==1){if(b.m==Tq)throw new S(2,7,7E3);return c.g(b.Dc(!1,a),2)}if(c.h!=3)return c.g(Xq(b,"detach"),3);if(c.i)return c.return();try{b.h&&(b.Be.Qa(),b.h=null),Wq(b,"detach"),b.C&&!a&&b.C.release()}finally{b.ba.release()}c.j()})};
|
|
758
|
+
function Xq(a,b){var c;return G(function(d){return d.h==1?(c=++a.Le,d.g(Iq(a.ba,b),2)):c!=a.Le?(a.ba.release(),d.return(!0)):d.return(!1)})}
|
|
759
|
+
p.Dc=function(a,b){a=a===void 0?!0:a;b=b===void 0?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x;return G(function(z){switch(z.h){case 1:return c.m!=Tq&&(c.m=Jq),z.g(Xq(c,"unload"),2);case 2:if(z.i)return z.return();z.D(3);c.Ua=!1;Wq(c,"unload");Qq(c);d=c.Ce.map(function(C){return C()});c.Ce=[];return z.g(Promise.all(d),5);case 5:c.dispatchEvent(Sq("unloading"));c.ze&&(c.ze.release(),c.ze=null);c.za&&(c.za.release(),c.za=null);c.kb&&(c.kb.release(),c.kb=null);c.h&&(c.j.Qa(),c.fc.Qa());c.Ge.stop();
|
|
760
|
+
c.cc&&(c.cc.release(),c.cc=null);c.Ta&&(c.Ta.stop(),c.Ta=null);if(!c.I){z.A(6);break}return z.g(c.I.stop(),7);case 7:c.I=null,c.Ac=null;case 6:c.o&&c.o.stop();if(!c.l){z.A(8);break}return z.g(c.l.destroy(),9);case 9:c.l=null;case 8:c.M&&(c.M.release(),c.M=null);c.G&&(c.G.release(),c.G=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.D){z.A(10);break}return z.g(c.D.destroy(),11);case 11:c.D=null;case 10:if(!c.H){z.A(12);break}return z.g(c.H.destroy(),13);case 13:c.H=null;case 12:if(c.C&&!b)c.C.onAssetUnload();
|
|
761
|
+
c.oa&&!b&&(c.oa.destroy(),c.oa=null);b||c.$f.stop();c.K&&Cp(c.K);c.va&&(c.va.g=null);if(!c.u){z.A(14);break}return z.g(c.u.destroy(),15);case 15:c.u=null;case 14:c.$=!1;if(c.h){e=t(c.Yf);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Yf=[];Mj(c.h)&&c.h.load()}if(!c.D){z.A(16);break}return z.g(c.D.destroy(),17);case 17:c.D=null;case 16:c.eb&&c.X!=c.eb.pd()&&(c.eb.l||c.eb.destroy(),c.eb=null);c.X=null;c.Ga=null;c.R=null;if(c.i){h=t(c.i.variants);
|
|
762
|
+
for(k=h.next();!k.done;k=h.next())for(l=k.value,m=t([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();r=t(c.i.textStreams);for(u=r.next();!u.done;u=r.next())v=u.value,v.segmentIndex&&v.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(Vf.clear(),ic.clear());c.i=null;c.B=new jo;c.Lh=null;c.ec=null;c.V=null;c.Me=-1;c.Je=[];w=t(c.zc.values());for(y=w.next();!y.done;y=w.next())x=y.value,x.stop();c.zc.clear();c.ob=[];c.Xf=-1;c.N&&c.N.Th();
|
|
763
|
+
ar(c);case 3:z.u();c.ba.release();z.B(4);break;case 4:nb();if(a&&Tc()&&!c.H&&c.h)return z.g($q(c),0);z.A(0)}})};p.ll=function(a){this.O=a};
|
|
764
|
+
p.load=function(a,b,c){b=b===void 0?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,y;return G(function(x){switch(x.h){case 1:if(d.m==Tq)throw new S(2,7,7E3);if(d.h||!d.ma){x.A(2);break}return x.g(d.Vb(d.ma,!0),3);case 3:d.ma=null;case 2:e=null;f="";if(a instanceof so){if(a.l)throw new S(2,7,7006);e=a;f=e.pd()||""}else f=a||"";return x.g(Iq(d.ba,"load"),4);case 4:d.ba.release();if(!d.h)throw new S(2,7,7002);if(!d.X){x.A(5);break}d.X=f;return x.g(d.Dc(!1),5);case 5:g=++d.Le;h=function(){return G(function(z){if(z.h==
|
|
765
|
+
1)return d.Le==g?z.A(0):e?z.g(e.destroy(),3):z.A(3);throw new S(2,7,7E3);})};k=function(z,C){return G(function(H){switch(H.h){case 1:return H.D(2),H.g(Iq(d.ba,C),4);case 4:return H.g(h(),5);case 5:return H.g(z(),6);case 6:return H.g(h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:H.u(),d.ba.release(),H.B(0)}})};x.m(7,8);b==null&&e&&(b=e.getStartTime());d.O=b;d.Ua=!1;d.dispatchEvent(Sq("loading"));if(e){c=e.V;x.A(10);break}if(c){x.A(10);break}return x.g(k(function(){return G(function(z){if(z.h==1)return z.g(br(d,
|
|
766
|
+
f),2);c=z.i;z.j()})},"guessMimeType_"),10);case 10:l=!!e;if(e){vo(e,d);d.B=e.getStats();x.A(13);break}return x.g(cr(d,f,b,c,!0,d.g),14);case 14:(e=x.i)?(e.D=!1,vo(e,d),d.B=e.getStats(),e.start(),e.B.catch(function(){})):d.B=new jo;case 13:m=!e;n=Date.now()/1E3;d.B=e?e.getStats():new jo;d.X=f;d.Ga=c||null;ar(d);q=function(){var z=d.h?d.h.buffered:null;return{start:Ej(z)||0,end:Fj(z)||0}};d.za=new km(q);d.za.addEventListener("regionadd",function(z){dr(d,z.region,"metadataadded")});if(m)return x.g(k(function(){return G(function(z){return z.g(er(d,
|
|
767
|
+
c),0)})},"initializeSrcEqualsDrmInner_"),25);d.kb=new km(q);return x.g(k(function(){return G(function(z){if(z.h==1)return z.g(Promise.race([e.ma,e.B]),2);d.Ac=e.H;var C=e;C.oa=!0;d.I=C.m;d.i=e.Hg();z.j()})},"waitForFinish"),17);case 17:if(d.H){x.A(18);break}return x.g(k(function(){return G(function(z){return z.g($q(d),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return d.i&&d.i.textStreams.length&&(d.u.enableTextDisplayer?d.u.enableTextDisplayer():ub("Text displayer w/ enableTextDisplayer",
|
|
768
|
+
'Text displayer should have a "enableTextDisplayer" method!')),x.g(k(function(){return G(function(z){return z.g(e.B,0)})},"waitForFinish"),20);case 20:d.g=e.getConfiguration();d.De=e.G;d.I&&d.I.setMediaElement&&d.h&&d.I.setMediaElement(d.h);d.ze=wo(e);d.xe=e.Ga;if(r=e.C)d.J=r;l&&d.h&&d.h.nodeName==="AUDIO"&&(fr(d),d.configure("manifest.disableVideo",!0));if(e.j){x.A(21);break}return x.g(k(function(){return G(function(z){return z.g(Lo(e,d.h),0)})},"drmEngine_.init"),21);case 21:return d.D=xo(e),x.g(k(function(){return G(function(z){return z.g(d.D.Vb(d.h),
|
|
769
|
+
0)})},"drmEngine_.attach"),23);case 23:return u=d.g.abrFactory,d.o&&d.Fe==u||(d.Fe=u,d.o&&d.o.release(),d.o=u(),typeof d.o.setMediaElement!="function"&&(ub("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),typeof d.o.setCmsdManager!="function"&&(ub("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),typeof d.o.trySuggestStreams!="function"&&(ub("AbrManager w/o trySuggestStreams",
|
|
770
|
+
"Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){}),d.o.configure(d.g.abr)),v=yo(e),w=e.i,x.g(k(function(){return G(function(z){return z.g(gr(d,n,w,v),0)})},"loadInner_"),24);case 24:uo(e);d.Ga&&nb().dj()&&$e(d.Ga)&&Gk(d.H,d.X,d.Ga);x.A(16);break;case 25:return x.g(k(function(){return G(function(z){return z.g(hr(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(Sq("loaded"));case 8:x.u();if(!e){x.A(27);break}return x.g(e.destroy(),27);case 27:d.eb=
|
|
771
|
+
null;x.B(0);break;case 7:y=x.l();if(!y||y.code==7E3){x.A(29);break}return x.g(d.Dc(!1),29);case 29:throw y;}})};function fr(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
|
|
772
|
+
p.gj=function(a,b,c){a=a===void 0?!0:a;b=b===void 0?!1:b;c=c===void 0?!1:c;var d=this,e;return G(function(f){return f.h==1?f.g(ir(d,c),2):f.h!=3?(e=f.i,f.g(d.Dc(a,b),3)):f.return(e)})};p.Xh=function(a,b){a=a===void 0?!1:a;b=b===void 0?!1:b;var c=this,d;return G(function(e){return e.h==1?e.g(ir(c,b),2):e.h!=3?(d=e.i,e.g(c.detach(a),3)):e.return(d)})};
|
|
773
|
+
function ir(a,b){b=b===void 0?!1:b;var c,d,e;return G(function(f){if(f.h==1){c=null;if(!(a.i&&a.I&&a.Ac&&a.X&&a.g))return f.A(2);d=a.h.currentTime;b||(d=null);return f.g(jr(a,a.X,d,a.Ga,a.g,!0,!1),3)}if(f.h!=2){c=f.i;a.He.push(c);a.I&&a.I.setMediaElement&&a.I.setMediaElement(null);if(e=a.l?a.l.o:null)c.i=e;var g=c,h=a.I,k=a.Ac;g.h=a.i;g.m=h;g.H=k;c.C=a.J;c.start();a.i=null;a.I=null;a.Ac=null;a.o=null;a.Fe=null}return f.return(c)})}
|
|
774
|
+
p.preload=function(a,b,c,d){b=b===void 0?null:b;var e=this,f,g;return G(function(h){if(h.h==1)return f=Kq(e),co(f,d||e.g,Kq(e)),h.g(cr(e,a,b,c,!1,f),2);(g=h.i)?g.start():Zq(e,new S(2,7,7005));return h.return(g)})};p.ng=function(){var a=this,b,c,d,e;return G(function(f){b=[];c=t(a.He);for(d=c.next();!d.done;d=c.next())e=d.value,e.l||b.push(e.destroy());a.He=[];return f.g(Promise.all(b),0)})};
|
|
775
|
+
function cr(a,b,c,d,e,f){e=e===void 0?!1:e;var g,h,k,l;return G(function(m){if(m.h==1)return d?m.A(2):m.g(br(a,b),3);m.h!=2&&(d=m.i);if(g=kr(a,d))return m.return(null);h=f||a.g;k=!1;e&&a.h&&a.h.nodeName==="AUDIO"&&(k=!0);l=jr(a,b,c,d||null,h,!e,k);l=e?l.then(function(n){n.D=!1;return n}):l.then(function(n){a.He.push(n);return n});return m.return(l)})}
|
|
776
|
+
function jr(a,b,c,d,e,f,g){f=f===void 0?!0:f;g=g===void 0?!1:g;var h,k,l,m,n,q,r,u,v,w,y,x,z,C,H;return G(function(D){if(D.h==1){h=null;k=td(e);g&&(k.manifest.disableVideo=!0);l=function(){return h.R&&h.l?null:h};m=function(){return l()?l().getConfiguration():a.g};if(a.ya.width!=Infinity||a.ya.height!=Infinity||a.g.ignoreHardwareResolution)return D.A(2);n=nb();return D.g(n.nc(),3)}D.h!=2&&(q=D.i,a.ya.width=q.width,a.ya.height=q.height);r=new vi(k,a.ya,null);u={networkingEngine:a.N,filter:function(A){var B,
|
|
777
|
+
I;return G(function(E){if(E.h==1)return E.g(wi(r,A),2);if(E.h!=4){B=E.i;if(!B)return E.A(0);I=Sq("trackschanged");return E.g(Promise.resolve(),4)}h.dispatchEvent(I);E.j()})},makeTextStreamsForClosedCaptions:function(A){return lr(a,A)},onTimelineRegionAdded:function(A){lm(h.I,A)},onEvent:function(A){return h.dispatchEvent(A)},onError:function(A){return h.onError(A)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.l&&h.R&&a.l.updateDuration()},newDrmInfo:function(A){var B=
|
|
778
|
+
h.j,I=B?B.g:null;I&&B.B&&zi(r,I.keySystem,A)},onManifestUpdated:function(){var A=(new Map).set("isLive",a.U());h.dispatchEvent(Sq("manifestupdated",A));to(h,!1,function(){if(a.C)a.C.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(A,B,I,E){var K=A;if(A=="com.apple.hls.interstitial"||A=="com.apple.hls.overlay")if(K="com.apple.quicktime.HLS",A={startTime:B,endTime:I,values:E},a.C)a.C.onHLSInterstitialMetadata(a,a.h,A);E=t(E);A=E.next();
|
|
779
|
+
for(var J={};!A.done;J={Zg:void 0},A=E.next())J.Zg=A.value,J.Zg.name!="ID"&&to(h,!1,function(O){return function(){mr(a,B,I,K,O.Zg)}}(J))},disableStream:function(A){return a.disableStream(A,a.g.streaming.maxDisabledTime)},addFont:function(A,B){return a.addFont(A,B)}};v=new km(function(){return a.Ra()});v.addEventListener("regionadd",function(A){var B=A.region;nr(a,"timelineregionadded",B,h);to(h,!1,function(){a.C&&(a.C.onDashTimedMetadata(B),a.C.onDASHInterstitialMetadata(a,a.h,B))})});w=null;k.streaming.observeQualityChanges&&
|
|
780
|
+
(w=new em(function(){return a.Hc()}),w.addEventListener("qualitychange",function(A){or(a,A.quality,A.position)}),w.addEventListener("audiotrackchange",function(A){or(a,A.quality,A.position,!0)}));y=!0;x={wc:a.N,onError:function(A){return h.onError(A)},xf:function(A){to(h,!0,function(){a.D&&pr(a,A)})},onExpirationUpdated:function(A,B){var I=Sq("expirationupdated");h.dispatchEvent(I);if((I=h.m)&&I.onExpirationUpdated)I.onExpirationUpdated(A,B)},onEvent:function(A){h.dispatchEvent(A);if(A.type=="drmsessionupdate"&&
|
|
781
|
+
y){y=!1;A=Date.now()/1E3-h.za;var B=a.B||h.getStats();A>=0&&(B.m=A);a.T&&Nc(a.T)}}};z=Lq(a,l);Vg(a.N,z);C=function(){return a.kd(x)};H={config:k,wk:u,Ik:v,Hk:w,kd:C,vk:r,networkingEngine:z,mj:f};h=new so(b,d,c,H);return D.return(h)})}
|
|
782
|
+
function br(a,b){var c,d,e,f;return G(function(g){if(g.h==1)return c=a.g.manifest.retryParameters,g.g(Fm(b,a.N,c),2);d=g.i;d=="application/x-mpegurl"&&(e=nb(),e.Ia()==="WEBKIT"&&(d="application/vnd.apple.mpegurl"));d=="video/quicktime"&&(f=nb(),f.Ia()==="CHROMIUM"&&(d="video/mp4"));return g.return(d)})}
|
|
783
|
+
function kr(a,b){if(!Tc(nb()))return!0;if(b){if((a.h||Uc()).canPlayType(b)=="")return!1;if(!Tc(nb())||!Rc.has(b.toLowerCase()))return!0;if($e(b))return nb().Ia()==="WEBKIT"&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if(b==="application/dash+xml"||b==="video/vnd.mpeg.dash.mpd")return a.g.streaming.preferNativeDash}return!1}
|
|
784
|
+
function qr(a,b){var c=a.g.textDisplayFactory;a.Lh!==c||(b===void 0?0:b)?(b=a.u,a.u=c(),a.u.configure?a.u.configure(a.g.textDisplayer):ub("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.u.setTextLanguage||ub("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),b?(a.u.setTextVisibility(b.isTextVisible()),b.destroy().catch(function(){})):a.u.setTextVisibility(a.$),a.H&&ml(a.H,a.u),a.Lh=c,a.l&&Zm(a.l)):a.u&&a.u.configure&&a.u.configure(a.g.textDisplayer)}
|
|
785
|
+
function $q(a){var b,c,d;return G(function(e){if(e.h==1)return nb(),Wq(a,"media-source"),a.g.mediaSource.useSourceElements&&Mj(a.h),qr(a),b=rr(a.h,a.u,{Mj:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&typeof k.cueTime=="number"&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),q=n.next();!q.done;q=n.next())mr(a,l,m,"org.id3",q.value);if(a.C)a.C.onHlsTimedMetadata(k,l)}},Ck:function(f){a.kb&&lm(a.kb,
|
|
786
|
+
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Ek:function(){a.I&&a.I.update&&a.I.update()}},a.T,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ga=d,e.g(b.M,2);a.H=b;e.j()})}function sr(a,b){a.M=new am({Ig:function(){return b.playbackRate},qd:function(){return b.defaultPlaybackRate},Ti:function(c){b.playbackRate=c},Ak:function(c){b.currentTime+=c},isPaused:function(){return b.paused}})}
|
|
787
|
+
function tr(a,b,c){function d(){return ur(a)}a.j.F(b,"playing",d);a.j.F(b,"pause",d);a.j.F(b,"ended",d);a.j.F(b,"ratechange",function(){var f=a.h.playbackRate;f!=0&&(a.M&&(a.M.set(f),a.m==vr&&a.o.playbackRateChanged(f),wr(a,f)),f=Sq("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.F(b.remote,"connect",function(){a.l&&b.remote.state=="connected"&&xr(a);yr(a)}),a.j.F(b.remote,"connecting",function(){return yr(a)}),a.j.F(b.remote,"disconnect",function(){return G(function(f){if(f.h==1)return a.l&&b.remote.state==
|
|
788
|
+
"disconnected"?f.g(nn(a.l),3):f.A(2);f.h!=2&&xr(a);yr(a);f.j()})}));b.audioTracks&&(a.j.F(b.audioTracks,"addtrack",function(){return yr(a)}),a.j.F(b.audioTracks,"removetrack",function(){return yr(a)}),a.j.F(b.audioTracks,"change",function(){return yr(a)}));b.videoTracks&&(a.j.F(b.videoTracks,"addtrack",function(){return yr(a)}),a.j.F(b.videoTracks,"removetrack",function(){return yr(a)}),a.j.F(b.videoTracks,"change",function(){return yr(a)}));(b.webkitPresentationMode||b.webkitSupportsFullscreen)&&
|
|
789
|
+
a.j.F(b,"webkitpresentationmodechanged",function(){a.Ae&&qr(a,!0)});if(b.textTracks){var e=function(){a.m===zr&&a.u instanceof kp&&xr(a);yr(a)};a.j.F(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Ar(a,f);break;case "chapters":Br(a,f);break;default:e()}});a.j.F(b.textTracks,"removetrack",e);a.j.F(b.textTracks,"change",e)}b.preload!="none"&&a.j.Aa(b,"loadedmetadata",function(){var f=a.B,g=Date.now()/1E3-c;g>=0&&(f.G=g)})}
|
|
790
|
+
function gr(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M;return G(function(L){switch(L.h){case 1:Wq(a,"load");e=a.h;sr(a,e);tr(a,e,b);"onchange"in window.screen&&a.j.F(window.screen,"change",function(){if(a.J.getConfiguration){var Q=a.J.getConfiguration();Q.hdrLevel=="AUTO"?Cr(a):a.g.preferredVideoHdrLevel=="AUTO"&&a.g.abr.enabled&&(Q.hdrLevel="AUTO",a.J.configure(Q),Cr(a))}});f=!1;g=t(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&
|
|
791
|
+
(f=Oc(l));Rq(a,a.g,f);a.Ld=a.g.preferredTextLanguage;a.Pd=a.g.preferredTextRole;a.Od=a.g.preferForcedSubs;Dr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(Q,R,ia){a.i&&a.l&&Q!=a.l.o&&Er(a,Q,!0,R===void 0?!1:R,ia===void 0?0:ia)});a.o.setMediaElement(e);a.o.setCmsdManager(a.va);a.l=Fr(a);a.l.configure(a.g.streaming);a.m=vr;a.dispatchEvent(Sq("streaming"));m=c;case 2:(q=a.l.o)||m||(m=Gr(a,!0));r=[];n=q||m;u=t([n.video,n.audio]);for(v=u.next();!v.done;v=u.next())(w=v.value)&&
|
|
792
|
+
!w.segmentIndex&&(r.push(w.createSegmentIndex()),w.dependencyStream&&r.push(w.dependencyStream.createSegmentIndex()));if(!(r.length>0)){L.A(4);break}return L.g(Promise.all(r),4);case 4:if(!n||n.disabledUntilTime!=0){L.A(2);break}Cr(a);if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?a.configure(a.Zf):Wa("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."));
|
|
793
|
+
a.K&&(Ep(a.K,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),Jp(a.K,b*1E3));Dr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Pm(a.l,a.g.playRangeStart,a.g.playRangeEnd);a.Ua=!0;a.dispatchEvent(Sq("canupdatestarttime"));y=function(Q){a.G=Hr(a,Q);a.cc=Ir(a,Q);Jr(a,e,!1)};a.g.streaming.startAtSegmentBoundary||(x=a.O,x==null&&a.i.startTime&&(x=a.i.startTime),y(x));if(q){L.A(7);break}if(!a.g.streaming.startAtSegmentBoundary){L.A(8);break}z=a.i.presentationTimeline;a.O instanceof Date&&
|
|
794
|
+
(H=z.m||z.i,D=a.O.getTime()/1E3-H,D!=null&&(C=D));C==null&&(C=typeof a.O==="number"?a.O:a.U()?Infinity:a.h.currentTime);a.O==null&&a.i.startTime&&(C=a.i.startTime);A=z.$b();B=z.Ib();C<A?C=A:C>B&&(C=B);return L.g(Kr(m,C),9);case 9:I=L.i,y(I);case 8:Er(a,m,!0,!1,0);case 7:return a.G.ready(),E=a.Lc().find(function(Q){return Q.active}),E||((K=qg(a.i.textStreams,a.Ld,a.Pd,a.Od)[0]||null)&&io(a.B.h,K,!0),m&&(K?(ug(m.audio,K,a.g)&&(a.$=!0),a.$&&a.u.setTextVisibility(!0)):(a.$=!1,a.u.setTextVisibility(!1)),
|
|
795
|
+
Lr(a)),K&&(a.g.streaming.alwaysStreamText||a.Pg())&&(Ym(a.l,K),Mr(a))),L.g(a.l.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),Nr(a));yr(a);a.i.variants.some(function(Q){return Q.primary});if((J=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)O=function(){return Or(a)},a.j.F(e,"timeupdate",O);J||(P=function(){return Pr(a)},a.j.F(e,"timeupdate",P),Pr(a),a.i.nextUrl&&(a.g.streaming.preloadNextUrlWindow>
|
|
796
|
+
0&&(M=function(){var Q;return G(function(R){if(R.h==1){Q=a.Ra().end-a.h.currentTime;if(isNaN(Q)||!(Q<=a.g.streaming.preloadNextUrlWindow))return R.A(0);a.j.Ma(e,"timeupdate",M);return R.g(a.preload(a.i.nextUrl),4)}a.eb=R.i;R.j()})},a.j.F(e,"timeupdate",M)),a.j.F(e,"ended",function(){a.load(a.eb||a.i.nextUrl)})));if(a.C)a.C.onManifestUpdated(J);L.j()}})}
|
|
797
|
+
function er(a,b){var c,d,e;return G(function(f){return f.h==1?(c=Date.now()/1E3,d=!0,a.D=a.kd({wc:a.N,onError:function(g){Zq(a,g)},xf:function(){},onExpirationUpdated:function(){var g=Sq("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);if(g.type=="drmsessionupdate"&&d){d=!1;g=a.B;var h=Date.now()/1E3-c;h>=0&&(g.m=h)}}}),a.D.configure(a.g.drm),e=vg([b]),a.D.O=!0,f.g(Mh(a.D,[e],[]),2)):f.g(a.D.Vb(a.h),0)})}
|
|
798
|
+
function hr(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return G(function(v){switch(v.h){case 1:Wq(a,"src-equals");d=a.h;a.G=new Nl(d);e=!1;a.Ce.push(function(){e=!0});a.dispatchEvent(Sq("canupdatestarttime"));a.O!=null&&a.G.Wf(a.O);a.cc=Qr(a,a.O||0);sr(a,d);Jr(a,d,!0);d.textTracks&&(qr(a),f=function(w){if(!(a.u instanceof kp)){var y=Rr(a).find(function(x){return x.mode!=="disabled"});y&&(y.mode=w?"showing":"hidden");a.u instanceof lp&&(y=Sr(a))&&(y.mode=!w&&a.u.isTextVisible()?"showing":"hidden")}},a.j.F(d,
|
|
799
|
+
"enterpictureinpicture",function(){return f(!0)}),a.j.F(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.F(d.remote,"connect",function(){return f(!1)}),a.j.F(d.remote,"connecting",function(){return f(!1)}),a.j.F(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.F(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return f(!1)}),g=d,(g.webkitPresentationMode||g.webkitSupportsFullscreen)&&a.j.F(g,"webkitpresentationmodechanged",
|
|
800
|
+
function(){g.webkitPresentationMode?f(g.webkitPresentationMode!=="inline"):g.webkitSupportsFullscreen&&f(g.webkitDisplayingFullscreen)}));tr(a,d,b);h=Lp(a.K,a.X,c);!h.includes("#t=")&&(a.g.playRangeStart>0||isFinite(a.g.playRangeEnd))&&(h+="#t=",a.g.playRangeStart>0&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.H){v.A(2);break}return v.g(a.H.destroy(),3);case 3:a.H=null;case 2:return Mj(d),d.src=h,k=nb(),k.Oa()=="TV"&&d.load(),d.preload!="none"&&!d.autoplay&&
|
|
801
|
+
$e(c)&&k.Ia()==="WEBKIT"&&d.load(),a.m=zr,a.dispatchEvent(Sq("streaming")),l=function(){return new Promise(function(w){var y=new of(w);a.j.F(d.textTracks,"change",function(){return y.ka(.5)});y.ka(.5)})},m=new Eg,El(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){return G(function(w){if(w.h==1)return a.G.ready(),a.Ga&&$e(a.Ga)?w.g(l(),3):(m.resolve(),w.A(0));m.resolve();w.j()})}),El(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var w,y,x,z,C;return G(function(H){if(H.h==1)return H.g(l(),2);
|
|
802
|
+
if(e)return H.return();Tr(a);w=Rr(a);w.some(function(D){return D.mode==="showing"})&&(a.$=!0,a.u.setTextVisibility(!0));if(!(a.u instanceof kp))for(w.length&&(a.u.enableTextDisplayer?a.u.enableTextDisplayer():ub("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),y=!1,x=t(w),z=x.next();!z.done;z=x.next())C=z.value,C.mode!=="disabled"&&(y?(C.mode="disabled",Wa("Found more than one enabled text track, disabling it",C)):(Ur(a,C),y=!0));Vr(a);H.j()})}),
|
|
803
|
+
d.error?m.reject(Yq(a)):d.preload=="none"&&(Wa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),m.resolve()),a.j.Aa(d,"error",function(){m.reject(Yq(a))}),v.g(sf(a.g.streaming.loadTimeout,m),4);case 4:if((n=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=
|
|
804
|
+
function(){return Or(a)},a.j.F(d,"timeupdate",q);n||(r=function(){return Pr(a)},a.j.F(d,"timeupdate",r),Pr(a));a.C&&(a.C.onManifestUpdated(n),n&&(u=a.Ra().end,a.j.F(d,"progress",function(){var w=a.Ra().end;u!=w&&(a.C.onManifestUpdated(a.U()),u=w)})));a.Ua=!0;v.j()}})}function Tr(a){var b=a.g.preferredAudioLanguage;b!=""&&a.Pi(b,a.g.preferredAudioRole)}function Vr(a){var b=a.g.preferredTextLanguage;b!=""&&a.mh(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
805
|
+
function Ar(a,b){if(b.kind=="metadata"){b.mode="hidden";a.j.F(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,mr(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={Fc:void 0},f=e.next())g.Fc=f.value,g.Fc.type=="com.apple.quicktime.HLS"&&g.Fc.startTime!=null&&(f=d.find(function(h){return function(k){return k.startTime==h.Fc.startTime&&k.endTime==h.Fc.endTime}}(g)),
|
|
806
|
+
f||(f={startTime:g.Fc.startTime,endTime:g.Fc.endTime,values:[]},d.push(f)),f.values.push(g.Fc.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return h.key=="X-ASSET-URI"||h.key=="X-ASSET-LIST"})&&a.C&&(e.values.push({key:"CUE",description:"",data:e.startTime!=0||a.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.C.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new of(function(){var d=Wr(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Cb().ka(.5);
|
|
807
|
+
a.Ce.push(function(){c.stop()})}}function dr(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(Sq(c,b))}function mr(a,b,c,d,e){a.za&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),lm(a.za,b))}function Br(a,b){if(b&&b.kind=="chapters"){b.mode="hidden";var c=(new of(function(){b.mode="hidden"})).Cb().ka(.5);a.Ce.push(function(){c.stop()})}}
|
|
808
|
+
p.Mk=function(){for(var a=this.ba;a.g;)a.release()};p.kd=function(a){return new Ch(a)};
|
|
809
|
+
function Lq(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?to(b(),!0,f):f()}b||(b=function(){return null});var e=new Rg(function(f,g,h,k,l){d(function(){a.o&&a.o.segmentDownloaded(f,g,h,k,l)})},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(Sq("downloadheadersreceived",g));d(function(){if(a.va){var k=a.va;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var q=n[l].split("=");
|
|
810
|
+
m.set(q[0],Gq(q[1]))}}catch(y){}if(m=f["cmsd-dynamic"]){a:{try{var r=new Map,u=m.split(";");for(m=1;m<u.length;m++){var v=u[m].split("=");r.set(v[0],Gq(v[1]))}var w=r;break a}catch(y){w=null;break a}w=void 0}w&&(k.g=w)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(Sq("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(Sq("downloadfailed",f))},function(f,g,h){d(function(){if(a.K){var k=a.K,l=h;l=
|
|
811
|
+
l===void 0?{}:l;if(k.g.enabled)if(g.method==="HEAD")hq(k,g,{});else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.u?Gp:Fp;break a;case 3:case 2:m=k.u?Ip:Hp;break a;case 5:m="s";break a}m=void 0}k.l=m}hq(k,g,{ot:Pp,su:!k.D})}}catch(q){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",q)}break;case bh:try{if(k.g.enabled){var n=wq(k,l,g.uris[0]);n.ts=Date.now();k.m.has(g)&&k.m.delete(g);k.m.set(g,n.ts);hq(k,g,n)}}catch(q){Xa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",
|
|
812
|
+
q)}break;case 2:case 5:case 6:hq(k,g,{ot:"k"});break;case 4:hq(k,g,{ot:"o"})}}})},function(f,g,h,k){(f=b()?b().m:a.I)&&f.banLocation&&f.banLocation(k)},function(f,g,h){if(g.data){var k=g.data.byteLength,l=b()?b().getStats():a.B;l&&(qo(l,k),f===0&&(l.si=k));k=a.K;h=h===void 0?{}:h;if(Wp(k).length!==0)switch(f){case bh:try{var m=wq(k,h,g.uri);g.originalRequest&&g.originalRequest.timeToFirstByte!=null&&(m.ttfb=g.originalRequest.timeToFirstByte);g.timeMs!=null&&(m.ttlb=g.timeMs);var n=g.originalUri||
|
|
813
|
+
g.uri;if(n.includes("CMCD="))try{var q=new URL(n);q.searchParams.delete("CMCD");var r=q.toString()}catch(A){r=n}else r=n;m.url=r;k.m.has(g.originalRequest)?(m.ts=k.m.get(g.originalRequest),k.m.delete(g.originalRequest)):m.ts||(m.ts=Date.now());var u=Wp(k);if(u.length!==0){var v=k.g.version==Zp?Array.from(new Set([].concat(F($p),F(Aq)))):lq;m.rc=g.status||0;var w=Yp(k,m,Xp);g.headers&&g.headers["CMSD-Static"]&&(w.cmsds=btoa(g.headers["CMSD-Static"]));g.headers&&g.headers["CMSD-Dynamic"]&&(w.cmsdd=
|
|
814
|
+
btoa(g.headers["CMSD-Dynamic"]));for(var y=t(u),x=y.next();!x.done;x=y.next()){var z=x.value,C=bq(z.includeKeys||[],v),H=jq(z);k.o[H]||(k.o[H]={request:1,response:1});w.sn=k.o[H].response++;var D=dq(w,C);gq(k,D,z,g)}}}catch(A){Xa("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",A)}}}});e.configure(a.g.networking);return e}
|
|
815
|
+
function Hr(a,b){return new Ql(a.h,a.i,a.g.streaming,b,function(){a.cc&&dm(a.cc,!a.G.Jh());a.l&&a.l.Zc();a.R&&Xr(a,"seeking")},function(c){return a.dispatchEvent(c)})}
|
|
816
|
+
function Ir(a,b){var c=a.U()||typeof b==="number"&&b>0;b=new Vo(a.ze,c);b.addEventListener("enter",function(f){nr(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){nr(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(nr(a,"timelineregionenter",g),nr(a,"timelineregionexit",g))});var d=new Vo(a.za,c);d.addEventListener("enter",function(f){dr(a,f.region,"metadata")});c=new Vo(a.kb,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
|
|
817
|
+
f.region.emsg);a.dispatchEvent(Sq("emsg",f))});var e=new cm(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.xe&&e.g.add(a.xe);return e}function Qr(a,b){b=new Vo(a.za,b instanceof Date||b>0);b.addEventListener("enter",function(d){dr(a,d.region,"metadata")});var c=new cm(a.h);c.g.add(b);return c}
|
|
818
|
+
function Jr(a,b,c){a.R=new ri;ui(a.R,ti);Yr(a);ar(a);a.Ta=new of(function(){Xr(a)});a.g.streaming.rebufferingGoal&&a.Ta.Ea(.25);a.j.F(b,"waiting",function(){return Xr(a,"waiting")});a.j.F(b,"canplaythrough",function(){return Xr(a,"canplaythrough")});a.j.F(b,"playing",function(){return Xr(a,"playing")});a.j.F(b,"seeked",function(){return Xr(a,"seeked")});a.j.F(b,"timeupdate",function(){return Xr(a,"timeupdate")});c&&(a.j.F(b,"progress",function(){return Xr(a,"progress")}),a.j.F(b,"stalled",function(){return Xr(a,
|
|
819
|
+
"stalled")}))}function Yr(a){var b=a.g.streaming.rebufferingGoal;a.R.j.set(si,Math.min(.5,b/2)).set(ti,b)}
|
|
820
|
+
function Xr(a,b){if(a.g.streaming.rebufferingGoal){b=a.H?Ik(a.H):!1;b=a.fe()||b||a.G.ni();var c=Hj(a.h.buffered,a.h.currentTime),d=a.R,e=d.j.get(d.g);ui(d,b||c>=e&&c>0?si:ti)&&ar(a)}else if(b){c=a.R;d=a.h.currentTime;e=c.h;c.h=d;var f=void 0;switch(b){case "seeking":case "waiting":c.h=-1;f=ti;break;case "canplaythrough":case "playing":case "seeked":f=si;break;case "timeupdate":e>=0&&d-e>.01&&(f=si)}f!==void 0&&ui(c,f)&&ar(a)}}function rr(a,b,c,d,e){return new wk(a,b,c,e,d)}
|
|
821
|
+
function Fr(a){return new Jm(a.i,{Zb:function(){return a.G?a.G.Qd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Ob:function(){return a.Ob()},video:a.h,Y:a.H,wc:a.N,onError:function(b){return Zq(a,b)},onEvent:function(b){return a.dispatchEvent(b)},zd:function(b,c,d,e){var f=b.startTime,g=b.endTime,h=c.type;if(h!=Hc){if(a.G){a.G.Bi();var k=Pk(a.H,h);!a.U()&&a.h.paused&&!a.h.seeking&&k!=null&&k>0&&a.G.Qd()<k&&!bk(a.G.Qd(),k,.001)&&a.G.Wf(k)}Xr(a)}d=(new Map).set("start",f).set("end",
|
|
822
|
+
g).set("contentType",h).set("isMuxed",d).set("isDependency",e);a.dispatchEvent(Sq("segmentappended",d));a.o&&c.fastSwitching&&b.Wc&&b.ie&&a.o.trySuggestStreams()},Dk:function(b,c){(c=c.xd)&&a.xe&&gm(a.xe,c,b)},Rh:function(b,c){var d=a.D;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new Ah(Qb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(c==0)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,
|
|
823
|
+
c.set(f,e),e+=f.length;Vh(d,"cenc",c);d=d.m}}else d=Promise.resolve();return d},disableStream:function(b,c){return a.disableStream(b,c)},cl:function(b,c){return a.g.abr.enabled&&c.fastSwitching&&b.Wc&&b.ie?!1:!0}})}
|
|
824
|
+
p.configure=function(a,b){var c=this.getConfiguration();arguments.length==2&&typeof a=="string"&&(a=Cn(a,b));"preferredVariantRole"in a&&(ub("preferredVariantRole configuration","Please Use preferredAudioRole instead."),a.preferredAudioRole=a.preferredVariantRole,delete a.preferredVariantRole);a.streaming&&"forceTransmuxTS"in a.streaming&&(ub("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,
|
|
825
|
+
delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(ub("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);if(a.streaming&&"useNativeHlsOnSafari"in a.streaming){ub("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var d=nb();a.streaming.preferNativeHls=
|
|
826
|
+
a.streaming.useNativeHlsOnSafari&&d.Ia()==="WEBKIT";delete a.streaming.useNativeHlsOnSafari}a.streaming&&typeof a.streaming.liveSync=="boolean"&&(ub("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),d=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=d);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){d=a.streaming.liveSyncMinLatency||0;var e=Math.abs((a.streaming.liveSyncMaxLatency||
|
|
827
|
+
1)-d)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=d+e;a.streaming.liveSync.targetLatencyTolerance=e}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(ub("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(ub("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
|
|
828
|
+
delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(ub("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(ub("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),
|
|
829
|
+
a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(ub("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in
|
|
830
|
+
a.streaming&&(ub("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate);a.streaming&&"liveSyncPanicMode"in a.streaming&&(ub("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,
|
|
831
|
+
delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(ub("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){ub("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");
|
|
832
|
+
var f=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return f};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(ub("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(ub("streaming.parsePrftBox configuration","Now fired without needing a configuration."),
|
|
833
|
+
delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(ub("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),a.manifest.enableAudioGroups=a.manifest.dash.enableAudioGroups,delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(ub("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.dispatchAllEmsgBoxes=
|
|
834
|
+
a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(ub("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);a.manifest&&a.manifest.dash&&"ignoreSupplementalCodecs"in a.manifest.dash&&(ub("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),
|
|
835
|
+
a.manifest.ignoreSupplementalCodecs=a.manifest.dash.ignoreSupplementalCodecs,delete a.manifest.dash.ignoreSupplementalCodecs);a.manifest&&a.manifest.hls&&"ignoreSupplementalCodecs"in a.manifest.hls&&(ub("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.hls.ignoreSupplementalCodecs,delete a.manifest.hls.ignoreSupplementalCodecs);a.manifest&&a.manifest.dash&&"updatePeriod"in a.manifest.dash&&
|
|
836
|
+
(ub("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.dash.updatePeriod,delete a.manifest.dash.updatePeriod);a.manifest&&a.manifest.hls&&"updatePeriod"in a.manifest.hls&&(ub("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.hls.updatePeriod,delete a.manifest.hls.updatePeriod);a.manifest&&a.manifest.dash&&"ignoreDrmInfo"in a.manifest.dash&&(ub("manifest.dash.ignoreDrmInfo configuration",
|
|
837
|
+
"Please Use manifest.ignoreDrmInfo instead."),a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);if(a.drm&&a.drm.advanced){d=!1;for(var g in a.drm.advanced){var h=a.drm.advanced[g];e=h.videoRobustness;h=h.audioRobustness;"videoRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].videoRobustness)&&(a.drm.advanced[g].videoRobustness=[e],d=!0);"audioRobustness"in a.drm.advanced[g]&&!Array.isArray(a.drm.advanced[g].audioRobustness)&&(a.drm.advanced[g].audioRobustness=
|
|
838
|
+
[h],d=!0)}d&&ub("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"forceHTTP"in a.streaming&&(ub("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTP=a.streaming.forceHTTP,delete a.streaming.forceHTTP);a.streaming&&"forceHTTPS"in a.streaming&&(ub("streaming.forceHTTPS configuration",
|
|
839
|
+
"Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTPS=a.streaming.forceHTTPS,delete a.streaming.forceHTTPS);a.streaming&&"minBytesForProgressEvents"in a.streaming&&(ub("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);g=co(this.g,a,Kq(this));
|
|
840
|
+
Zr(this,c);return g};p.vj=function(a){this.Zf=a};
|
|
841
|
+
function Zr(a,b){a.De=new vi(a.g,a.ya,a.D);if(a.I){var c=td(a.g.manifest);a.h&&a.h.nodeName==="AUDIO"&&(c.disableVideo=!0);a.I.configure(c)}a.D&&a.D.configure(a.g.drm);if(a.l){a.l.configure(a.g.streaming);try{a.m!=Tq&&xi(a.De,a.i)&&yr(a)}catch(e){Zq(a,e)}a.o&&Cr(a);c=a.l.o;!c||c.allowedByApplication&&c.allowedByKeySystem||Pq(a)}a.N&&a.N.configure(a.g.networking);a.H&&(a.H.configure(a.g.mediaSource),a.H.Ga=a.g.manifest.segmentRelativeVttTiming);a.u&&qr(a);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?
|
|
842
|
+
a.o.enable():a.o.disable(),Nr(a));a.R&&Yr(a);a.Ta&&(a.g.streaming.rebufferingGoal?a.Ta.Ea(.25):a.Ta.stop());a.i&&Dr(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C&&a.C.configure(a.g.ads);a.K&&a.K.configure(a.g.cmcd);a.va&&a.va.configure(a.g.cmsd);a.Da&&a.Da.configure(a.g.queue);if(a.m==vr&&a.J.getConfiguration){c=a.J.getConfiguration();var d=!1;b.preferredVideoHdrLevel!=a.g.preferredVideoHdrLevel&&c.hdrLevel!=a.g.preferredVideoHdrLevel&&(c.hdrLevel=a.g.preferredVideoHdrLevel,d=
|
|
843
|
+
!0);b.preferredVideoLayout!=a.g.preferredVideoLayout&&c.videoLayout!=a.g.preferredVideoLayout&&(c.videoLayout=a.g.preferredVideoLayout,d=!0);b.preferSpatialAudio!=a.g.preferSpatialAudio&&c.spatialAudio!=a.g.preferSpatialAudio&&(c.spatialAudio=a.g.preferSpatialAudio,d=!0);b.preferredVideoRole!=a.g.preferredVideoRole&&c.videoRole!=a.g.preferredVideoRole&&(c.videoRole=a.g.preferredVideoRole,d=!0);d&&(a.J.configure(c),Pq(a))}}p.getConfiguration=function(){var a=Kq(this);co(a,this.g,Kq(this));return a};
|
|
844
|
+
p.Fj=function(){return this.Zf};p.gi=function(){var a=Kq(this);co(a,this.g,Kq(this));return En(this.g,Kq(this))};p.bi=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Ra().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};
|
|
845
|
+
p.Ki=function(){var a=this.getConfiguration(),b;for(b in this.g)delete this.g[b];co(this.g,Kq(this),Kq(this));Zr(this,a)};p.$d=function(){return this.m};p.di=function(){return this.i?this.i.type:null};p.$e=function(){return this.h};p.Yb=function(){return this.N};p.pd=function(){return this.X};p.ai=function(){return this.C?this.C:null};p.ji=function(){return this.Da?this.Da:null};
|
|
846
|
+
p.U=function(){return this.i&&!this.xa()?this.i.presentationTimeline.U():this.h&&(this.h.src||this.xa())?this.h.duration==Infinity:!1};p.Uc=function(){return this.i?this.i.presentationTimeline.Uc():!1};p.ik=function(){if(this.i&&!this.xa()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.xa())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1};
|
|
847
|
+
p.pi=function(){if(this.i&&!this.xa()){var a=this.i.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.h&&(this.h.src||this.xa())&&this.h.audioTracks?this.h.audioTracks.length==0:!1};
|
|
848
|
+
p.Ra=function(){if(this.i&&!this.xa()){if(!this.Ua&&this.i.type=="HLS")return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.$b(),end:a.Ib()}}if(this.h&&(this.h.src||this.xa())&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};p.fk=function(){this.U()&&(this.h.currentTime=this.Ra().end)};p.jk=function(){return this.Ua};
|
|
849
|
+
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.D?this.D.g:null};p.Zd=function(){return this.D?this.D.Zd():Infinity};p.Gg=function(){return this.D?this.D.Gg():[]};p.Ze=function(){return this.D?this.D.Ze():{}};p.Og=function(){return this.R?this.R.g==ti:!!this.X};p.Ob=function(){return this.h?this.M?this.M.i:1:0};p.Hh=function(a){this.m==vr&&this.l&&Vm(this.l,a)};
|
|
850
|
+
p.we=function(a,b){b=b===void 0?!0:b;a==0?Wa("A trick play rate of 0 is unsupported!"):(this.M.set(a),this.m==vr&&(this.o.playbackRateChanged(a),this.Hh(b&&a!=1)),wr(this,a))};p.Sd=function(){var a=this.M.qd();this.m==zr&&this.M.set(a);this.m==vr&&(this.M.set(a),this.o.playbackRateChanged(a),this.Hh(!1));this.fc.Qa()};
|
|
851
|
+
p.sc=function(){if(this.i&&!this.xa()){for(var a=this.l?this.l.o:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,og(e)){var f=gg(e);f.active=e==a;f.active||c==1||a==null||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}if(this.h&&this.h.audioTracks){var g=$r(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return ng(h,g)}):g?[ng(null,g)]:[]}return[]};
|
|
852
|
+
p.Lc=function(){if(this.i){if(this.xa())return[];for(var a=this.l?this.l.B:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=hg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Rr(this).map(function(f){return mg(f)}):[]};p.Kj=function(){var a=this.Je;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ig(b)})};
|
|
853
|
+
p.yj=function(a){var b=this,c,d;return G(function(e){if(e.h==1)return e.g(as(b,a),2);c=e.i;if(!c)return e.return(null);d=[];c.segmentIndex.Hb(function(f){var g=bs(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.columns,k=(f.j-f.startTime)/h,l=0;l<h;l++){var m=cs(f,c,f.startTime+l*k,g);if(!m)break;d.push(m)}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function bs(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
854
|
+
p.Zj=function(a,b){var c=this,d,e,f,g,h,k;return G(function(l){if(l.h==1)return l.g(as(c,a),2);d=l.i;if(!d)return l.return(null);d.closeSegmentIndex&&(c.zc.has(d)||(e=new of(function(){d.closeSegmentIndex();c.zc.delete(d)}),c.zc.set(d,e)),f=c.zc.get(d),f.ka(5));g=d.segmentIndex.find(b);if(g==null)return l.return(null);h=d.segmentIndex.get(g);return(k=bs(h.tilesLayout||d.tilesLayout))?l.return(cs(h,d,b,k)):l.return(null)})};
|
|
855
|
+
function as(a,b){var c,d;return G(function(e){if(e.h==1){if(a.m!=vr&&a.m!=zr)return e.return(null);c=a.Je;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);b!=null&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.A(2):e.g(d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
|
|
856
|
+
function cs(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.columns,h=f/d.rows,k=d.columns*d.rows,l=a.j-a.startTime;l=a.B||l/k;var m=a.startTime,n=0,q=0;k>1&&(q=Math.floor((c-a.startTime)/l+1E-4),m=a.startTime+q*l,n=q%d.columns*g,q=Math.floor(q/d.columns)*h);if(m>=a.endTime||bk(m,a.endTime,1E-4))return null;d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.P(),startByte:a.Kc(),
|
|
857
|
+
endByte:a.Ic(),width:g,sprite:d,mimeType:a.mimeType||b.mimeType,codecs:a.codecs||b.codecs}}
|
|
858
|
+
p.nh=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.l.B&&(io(c.B.h,d,!1),Ym(c.l,d),xr(c),Mr(c),c.Ld=d.language)}var c=this;if(this.i&&this.G&&(b(),!this.xa()))return;(function(){if(c.h&&c.h.textTracks){var d=Rr(c),e=d.find(function(h){return kg(h)===a.id});if(e){if(c.u instanceof kp){d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.$?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return h.mode!=="disabled"}),
|
|
859
|
+
d!==e&&(d&&(d.mode="disabled",c.j.Ma(d,"cuechange"),c.u.remove(0,Infinity)),e&&Ur(c,e));xr(c);Mr(c)}}})()};
|
|
860
|
+
function Ur(a,b){a.j.F(b,"cuechange",function(){a.u.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(f.endTime===Infinity||f.endTime<f.startTime)f=null;else{var g=new de(f.startTime,f.endTime,f.text);g.line=typeof f.line==="number"?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
|
|
861
|
+
ie:1;g.position=typeof f.position==="number"?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;f.vertical==="lr"?g.writingMode="vertical-lr":f.vertical==="rl"&&(g.writingMode="vertical-rl");f.region&&(g.region.id=f.region.id,g.region.height=f.region.lines,g.region.heightUnits=2,g.region.regionAnchorX=f.region.regionAnchorX,g.region.regionAnchorY=f.region.regionAnchorY,g.region.scroll=f.region.scroll,g.region.viewportAnchorX=f.region.viewportAnchorX,
|
|
862
|
+
g.region.viewportAnchorY=f.region.viewportAnchorY,g.region.viewportAnchorUnits=fd,g.region.width=f.region.width,g.region.widthUnits=fd);re(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.u.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
|
|
863
|
+
p.Gf=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&og(f)){var g=e.l.o;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.xa()?Er(e,f,!1,!1,0):Er(e,f,!1,b||!1,c||0);e.J.configure({language:f.language,
|
|
864
|
+
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",videoRole:f.video&&f.video.roles&&f.video.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,hdrLevel:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",audioLabel:f.audio&&f.audio.label?f.audio.label:"",videoLabel:f.video&&f.video.label?f.video.label:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,
|
|
865
|
+
audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",activeAudioCodec:g.audio&&g.audio.codecs?g.audio.codecs:"",activeAudioChannelCount:g.audio&&g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});Cr(e)}}var e=this;b=b===void 0?!1:b;c=c===void 0?0:c;if(this.i&&this.G&&(d(),!this.xa()))return;(function(){if(a.originalAudioId&&e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=t(f);for(var g=f.next();!g.done;g=
|
|
866
|
+
f.next())if(g=g.value,kg(g)==a.id){ds(e,g);break}}})()};
|
|
867
|
+
p.Uk=function(a,b){function c(){var e=d.J.getConfiguration();e.audioCodec=a.codecs||"";e.audioLabel=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;var f=d.l.o;if(f=f&&f.audio)e.activeAudioCodec=f.codecs||"",e.activeAudioChannelCount=f.channelsCount||0;d.J.configure(e);Pq(d,!0,b,!1,!1)}var d=this;b=b===void 0?0:b;if(this.i&&this.G&&(c(),!this.xa()))return;(function(){if(d.h&&d.h.audioTracks){var e=vf(a.language),f=Array.from(d.h.audioTracks),
|
|
868
|
+
g=null;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==a.label&&vf(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&ds(d,g)}})()};
|
|
869
|
+
p.getAudioTracks=function(){if(this.i&&!this.xa()){var a=this.sc();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=vr||this.xa()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&(f.audioCodec||Re.includes(f.audioMimeType||""))}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=[e.language,e.originalLanguage,e.label||"",(e.audioRoles||[]).join(","),e.channelsCount,e.spatialAudio,e.audioCodec||
|
|
870
|
+
"",e.accessibilityPurpose||""].join("_");e={active:e.active,language:e.language,label:e.label,mimeType:e.audioMimeType,codecs:e.audioCodec,primary:e.primary,roles:e.audioRoles||[],accessibilityPurpose:e.accessibilityPurpose,channelsCount:e.channelsCount,audioSamplingRate:e.audioSamplingRate,spatialAudio:e.spatialAudio,originalLanguage:e.originalLanguage};a.has(d)?!a.get(d).active&&e.active&&a.set(d,e):a.set(d,e)}return Array.from(a.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=
|
|
871
|
+
f.language;g={active:f.enabled,language:vf(g||"und"),label:f.label,mimeType:null,codecs:null,primary:f.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:g};f.kind&&(f.kind=="description"&&(g.accessibilityPurpose="visually impaired"),g.roles.push(f.kind));f.configuration&&(f.configuration.codec&&(g.codecs=f.configuration.codec),f.configuration.sampleRate&&(g.audioSamplingRate=f.configuration.sampleRate),f.configuration.numberOfChannels&&
|
|
872
|
+
(g.channelsCount=f.configuration.numberOfChannels));return g}):[]};
|
|
873
|
+
p.Wk=function(a,b,c){b=b===void 0?!1:b;c=c===void 0?0:c;var d=this.sc();if(d.length){var e=d.find(function(g){return g.active});if(e){d=d.filter(function(g){return(g.videoBandwidth||g.bandwidth)==a.bandwidth&&g.width==a.width&&g.height==a.height&&g.frameRate==a.frameRate&&g.pixelAspectRatio==a.pixelAspectRatio&&g.hdr==a.hdr&&g.colorGamut==a.colorGamut&&g.videoLayout==a.videoLayout&&g.videoMimeType==a.mimeType&&g.videoCodec==a.codecs&&eb(g.videoRoles,a.roles)&&g.videoLabel==a.label});var f;d.length==
|
|
874
|
+
1?f=d[0]:f=d.find(function(g){return g.audioId===e.audioId});f||(f=d.find(function(g){return g.language==e.language&&g.label===e.label&&g.channelsCount===e.channelsCount&&g.spatialAudio===e.spatialAudio&&g.audioMimeType===e.audioMimeType&&Ve(g.audioCodec||"")===Ve(e.audioCodec||"")&&eb(g.audioRoles,e.audioRoles)}));f&&!f.active&&this.Gf(f,b,c)}}};
|
|
875
|
+
p.getVideoTracks=function(){if(this.m==zr||this.xa())return[];var a=this.sc();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.pi()||(c=a.filter(function(f){return f.videoCodec&&f.audioGroupId===b.audioGroupId&&f.originalAudioId===b.originalAudioId?f.audioId===b.audioId?!0:f.language===b.language&&f.label===b.label&&f.channelsCount===b.channelsCount&&f.spatialAudio===b.spatialAudio&&f.audioMimeType===b.audioMimeType&&Ve(f.audioCodec||"")===Ve(b.audioCodec||
|
|
876
|
+
"")&&eb(f.audioRoles,b.audioRoles):!1}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||d.videoId==null||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec,roles:d.videoRoles||[],label:d.videoLabel})}return Array.from(a.values())};
|
|
877
|
+
p.Aj=function(){return es(this.sc())};p.Xj=function(){return es(this.Lc())};p.zj=function(){return Array.from(fs(this.sc()))};p.Wj=function(){return Array.from(fs(this.Lc()))};
|
|
878
|
+
p.Pi=function(a,b,c,d,e,f,g){function h(){function l(u,v){return u.video||v.video?u.video&&v.video?Math.abs((u.video.height||0)-(v.video.height||0))+Math.abs((u.video.width||0)-(v.video.width||0)):Infinity:0}var m=k.l.o;k.J=k.g.adaptationSetCriteriaFactory();k.J.configure({language:a,role:b||"",videoRole:m.video&&m.video.roles&&m.video.roles[0]||"",channelCount:c||0,hdrLevel:"",spatialAudio:f||!1,videoLayout:"",audioLabel:g||"",videoLabel:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,
|
|
879
|
+
audioCodec:e||"",activeAudioCodec:m.audio&&m.audio.codecs?m.audio.codecs:"",activeAudioChannelCount:m.audio&&m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.J.create(k.i.variants),q=null;n=t(n.values());for(var r=n.next();!r.done;r=n.next())r=r.value,og(r)&&(!q||l(q,m)>l(r,m))&&(q=r);q!=m&&(q?(m=gg(q),k.Gf(m,!0,d||0)):Pq(k))}var k=this;c=c===void 0?0:c;d=d===void 0?0:d;e=e===void 0?"":e;
|
|
880
|
+
f=f===void 0?!1:f;g=g===void 0?"":g;if(this.i&&this.G&&(h(),!this.xa()))return;(function(){if(k.h&&k.h.audioTracks){var l=qg(k.sc(),a,b||"",!1)[0];l&&k.Gf(l)}})()};p.mh=function(a,b,c){function d(){e.Ld=a;e.Pd=b||"";e.Od=c||!1;var f=qg(e.i.textStreams,e.Ld,e.Pd,e.Od)[0]||null;f&&f!=e.l.B&&(io(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Pg())&&(Ym(e.l,f),xr(e),Mr(e))}var e=this;c=c===void 0?!1:c;if(this.i&&this.G&&(d(),!this.xa()))return;(function(){var f=qg(e.Lc(),a,b||"",c||!1)[0];f&&e.nh(f)})()};
|
|
881
|
+
p.Vk=function(a,b,c){function d(){for(var f=null,g=t(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}f!=null&&(e.J=e.g.adaptationSetCriteriaFactory(),e.J.configure({language:f.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),
|
|
882
|
+
Pq(e,b,c))}var e=this;b=b===void 0?!0:b;c=c===void 0?0:c;if(this.i&&this.G&&(d(),!this.xa()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&ds(e,g)}})()};p.Pg=function(){var a=this.$;return this.u?this.u.isTextVisible():a};p.Ej=function(){return this.ob.map(function(a){return hg(a)})};
|
|
883
|
+
p.Cj=function(a){ub("getChapters","Please use an getChaptersAsync.");if(!this.ob.length)return[];var b=vf(a);a=this.ob.filter(function(f){return vf(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Hb(function(f){var g=f.P()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c};
|
|
884
|
+
p.Dj=function(a){var b=this,c,d,e,f,g,h,k;return G(function(l){switch(l.h){case 1:if(!b.ob.length)return l.return([]);c=vf(a);d=b.ob.filter(function(m){return vf(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=t(d);h=g.next();case 2:if(h.done){l.A(4);break}k=h.value;if(k.segmentIndex){l.A(5);break}return l.g(k.createSegmentIndex(),5);case 5:k.segmentIndex.Hb(function(m){var n=m.P()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
|
|
885
|
+
(e.push(m),f.add(q))});h=g.next();l.A(2);break;case 4:return l.return(e)}})};function Rr(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind!="metadata"&&b.kind!="chapters"&&b.label!="Shaka Player TextTrack"})}function Sr(a){return Array.from(a.h.textTracks).find(function(b){return b.label=="Shaka Player TextTrack"})}function Wr(a){return Array.from(a.h.textTracks).filter(function(b){return b.kind=="metadata"})}
|
|
886
|
+
p.rh=function(a){a=!!a;this.$!=a&&(this.$=a,this.m==vr?(this.u.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.B||(a=qg(this.i.textStreams,this.Ld,this.Pd,this.Od),a.length>0&&(Ym(this.l,a[0]),xr(this),Mr(this))):Um(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(a),Lr(this))};
|
|
887
|
+
p.Qj=function(){if(this.G)var a=this.G.Qd();else{if(this.O==null)return new Date;if(this.O instanceof Date)return this.O;a=this.O}if(this.i&&!this.xa()){var b=this.i.presentationTimeline;return new Date(((b.m||b.i)+a)*1E3)}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),b instanceof Date&&!isNaN(b.getTime())?new Date(b.getTime()+a*1E3):null):null};
|
|
888
|
+
p.ii=function(){if(this.i&&!this.xa()){var a=this.i.presentationTimeline;a=a.m||a.i;return a===null?null:new Date(a*1E3)}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),a instanceof Date&&!isNaN(a.getTime())?a:null):null};p.bf=function(){return this.U()?this.i?this.i.presentationTimeline.bf():null:null};p.Hc=function(){if(this.m==vr)return this.H.Hc();var a={total:[],audio:[],video:[],text:[]};this.m==zr&&(a.total=Ij(this.h.buffered));return a};
|
|
889
|
+
function zq(a){if(!a.h||!a.h.currentTime)return null;var b=a.ii();return b?Math.floor(Date.now()-(b.getTime()+a.h.currentTime*1E3)):null}p.getBandwidthEstimate=function(){return this.o?this.o.getBandwidthEstimate():NaN};
|
|
890
|
+
p.getStats=function(){if(this.m!=vr&&this.m!=zr)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,
|
|
891
|
+
switchHistory:[],stateHistory:[]};ur(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.U()||mo(this.B,Math.round(100*b));this.G&&(this.B.T=this.G.Ih(),this.B.V=this.G.Kh());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),ko(this.B,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.B.N=Number(b.corruptedVideoFrames));no(this.B,this.D?ei(this.D):NaN);lo(this.B,a.videoWidth||NaN,a.videoHeight||NaN);this.B.l="";this.U()&&(a=zq(this),a!=null&&oo(this.B,a/1E3));b=this.sc().find(function(e){return e.active});
|
|
892
|
+
a=this.Lc().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.M?this.M.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.B.B=d}b.width&&b.height&&lo(this.B,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.B.l=b)}this.m!=vr||this.xa()||(this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&po(this.B,this.i.presentationTimeline.h)),a=this.o.getBandwidthEstimate(),this.B.u=a);this.m==zr&&qo(this.B,NaN);
|
|
893
|
+
return ro(this.B)};
|
|
894
|
+
p.Rd=function(a,b,c,d,e,f,g){g=g===void 0?!1:g;var h=this,k,l,m,n,q,r,u,v,w,y,x,z;return G(function(C){switch(C.h){case 1:if(h.m!=vr&&h.m!=zr)throw new S(1,7,7004);c!="subtitles"&&c!="captions"&&Wa("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){C.A(2);break}return C.g(gs(h,a),3);case 3:d=C.i;case 2:k=[];h.C&&(k=h.C.getCuePoints());if(h.m!=zr){C.A(4);break}l=nb();g&&l.Ia()==="WEBKIT"&&(c="forced");return C.g(hs(h,a,b,c,d,f||"",k),5);case 5:m=C.i;if(m.track)return yr(h),
|
|
895
|
+
xr(h),C.return(mg(m.track));throw new S(1,2,2012);case 4:n=Jc;q=h.Ra();r=q.end-q.start;h.i&&(r=h.i.presentationTimeline.getDuration());if(r==Infinity)throw new S(1,4,4033);if(!k.length){C.A(6);break}return C.g(is(h,a),7);case 7:u=C.i,v=js(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Fk(w),d="text/vtt";case 6:y={id:h.Ee++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Xl(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,
|
|
896
|
+
language:b,originalLanguage:b,label:f||null,type:n.Na,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Qe(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};x=Qe(y.mimeType,y.codecs);z=ef(x);if(!z)throw new S(2,2,2014,d);h.i.textStreams.push(y);yr(h);xr(h);return C.return(hg(y))}})};
|
|
897
|
+
p.Oe=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C;return G(function(H){switch(H.h){case 1:if(c.m!=vr&&c.m!=zr)throw new S(1,7,7004);if(b){H.A(2);break}return H.g(gs(c,a),3);case 3:b=H.i;case 2:if(b!="text/vtt")throw new S(1,2,2017,a);d=Jc;e=c.Ra();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(f==Infinity)throw new S(1,4,4045);return H.g(is(c,a),4);case 4:g=H.i;h=df(b);if(!h)throw new S(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,segmentEnd:f,vttOffset:0};
|
|
898
|
+
m=Qb(g);n=k.parseMedia(m,l,a,[]);q=[];r=t(n);u=r.next();for(v={};!u.done;v={Tf:void 0,ld:void 0},u=r.next())v.ld=u.value,v.Tf=null,w=function(D){return function(){D.Tf==null&&(D.Tf=Bc([a],[D.ld.payload]));return D.Tf||[]}}(v),y=new yj(v.ld.startTime,v.ld.endTime,w,0,null,null,0,0,Infinity),v.ld.payload.includes("#xywh")&&(x=v.ld.payload.split("#xywh=")[1].split(","),x.length===4&&y.Jf({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),q.push(y);
|
|
899
|
+
z=b;if(!q.length){H.A(5);break}return H.g(gs(c,q[0].P()[0]),6);case 6:z=H.i;case 5:return C={id:c.Ee++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Vl(q),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Vf,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,
|
|
900
|
+
tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Qe(z||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==zr?c.Je.push(C):c.i.imageStreams.push(C),yr(c),H.return(ig(C))}})};
|
|
901
|
+
p.Ne=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x;return G(function(z){switch(z.h){case 1:if(d.m!=vr&&d.m!=zr)throw new S(1,7,7004);if(c){z.A(2);break}return z.g(gs(d,a),3);case 3:c=z.i;case 2:e=Jc;f=d.Ra();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(g==Infinity)throw new S(1,4,4055);h=df(c);if(!h)throw new S(2,2,2014,c);return z.g(is(d,a),4);case 4:k=z.i;l=h();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=Qb(k);q=l.parseMedia(n,m,a,[]);r=[];u=t(q);
|
|
902
|
+
v=u.next();for(w={};!v.done;w={We:void 0},v=u.next())w.We=v.value,y=new yj(w.We.startTime,w.We.endTime,function(C){return function(){return[C.We.payload]}}(w),0,null,null,0,0,Infinity),r.push(y);x={id:d.Ee++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Vl(r),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Na,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,
|
|
903
|
+
roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Qe("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.ob.push(x);yr(d);return z.return(hg(x))}})};
|
|
904
|
+
function gs(a,b){var c;return G(function(d){switch(d.h){case 1:return d.m(2),d.g(Fm(b,a.N,a.g.streaming.retryParameters),4);case 4:c=d.i;d.o(3);break;case 2:d.l();case 3:if(c)return d.return(c);throw new S(1,2,2011,b);}})}
|
|
905
|
+
function hs(a,b,c,d,e,f,g){var h,k,l,m;return G(function(n){if(n.h==1)return e!="text/vtt"||g.length?n.g(is(a,b),3):n.A(2);n.h!=2&&(h=n.i,k=js(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Fk(l),e="text/vtt");m=document.createElement("track");a:{var q=a.K,r=b;try{if(!q.g.enabled){var u=r;break a}var v=Mp(q);v.ot=sq;v.su=!0;var w=Qp(v);u=Rp(r,w);break a}catch(y){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y);u=r;break a}u=void 0}m.src=u;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
906
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Yf.push(m);return n.return(m)})}function is(a,b){var c,d,e,f;return G(function(g){if(g.h==1){c=bh;d=a.g.streaming.retryParameters;e=Wg([b],d);e.method="GET";var h=a.K;try{h.g.enabled&&hq(h,e,{ot:sq,su:!0})}catch(k){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",k)}return g.g(a.N.request(c,e).promise,2)}f=g.i;return g.return(f.data)})}
|
|
907
|
+
function js(a,b,c,d){var e=df(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Qb(b),b=c.parseMedia(b,a,null,[]),yp(b,d);throw new S(2,2,2014,c);}p.al=function(a,b){this.ya.width=a;this.ya.height=b};p.ih=function(a){if(this.m==vr){var b=this.l;a=a===void 0?.1:a;if(b.l.g)b=!1;else if(b.D)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.ud||d.Ja||d.qb||(d.ud=!1,Tm(b,d,a));b=!0}}else b=!1;return b};
|
|
908
|
+
p.Hg=function(){Wa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.Nj=function(){return this.Ac};
|
|
909
|
+
p.Ij=function(){var a={video:null,audio:null,text:null};if(this.m!=vr)return a;var b=this.l.o,c=this.h.currentTime;b=t([b.video,b.audio,this.l.B]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};d.type=="video"?(e.width=d.width,e.height=d.height,a.video=e):d.type=="audio"?a.audio=e:d.type==Hc&&(a.text=e)}return a};
|
|
910
|
+
function Kq(a){var b=Yn();b.streaming.failureCallback=function(c){if(a.U()){var d=null;c.code==1001||c.code==1002?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):c.code==1003&&(d=.1);d!=null&&(c.severity=1,a.ih(d))}};b.textDisplayFactory=function(){if(a.Ae){var c=a.h;c=c.webkitDisplayingFullscreen||c.webkitPresentationMode&&c.webkitPresentationMode!="inline"?!1:!0}else c=!1;return c?new op(a.h,a.Ae):"track"in document.createElement("track")?new kp(a):new np};return b}p.Wi=function(a){this.Ae=a};
|
|
911
|
+
function lr(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,e.mimeType!="application/cea-608"&&e.mimeType!="application/cea-708"||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Yl,l=e.closedCaptions.get(g);h={id:a.Ee++,originalId:g,groupId:null,
|
|
912
|
+
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Hc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Qe(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
|
|
913
|
+
b.textStreams.push(h);c.add(g)}}
|
|
914
|
+
function Kr(a,b){var c,d,e,f,g;return G(function(h){if(h.h==1)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return G(function(r){if(r.h==1)return k?k.segmentIndex?r.A(2):r.g(k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Xb(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},h.g(e(c,b),2);if(h.h!=3)return f=h.i,h.g(e(d,b),3);g=h.i;return g!=null&&f!=null?h.return(Math.max(g,f)):g!=null?h.return(g):f!=null?h.return(f):h.return(b)})}
|
|
915
|
+
function ar(a){var b=a.Og();if(a.B&&a.R&&a.G){if(a.g.streaming.rebufferingGoal==0){var c=a.M;c.j=!1;bm(c)}else c=a.M,c.j=b,bm(c);a.K&&(c=a.K,b||c.D||(c.D=!0),c.D&&b&&(c.I=!0,Kp(c,"ps",{bd:"r"})),c.J=b);ur(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Me<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;
|
|
916
|
+
a.V&&(a.V=Math.min(a.V+ ++a.Me*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(Sq("buffering",b))}function wr(a,b){a.fc.Qa();a.fc.F(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.Ra(),e=a.U(),f=e?a.g.streaming.safeSeekOffset:0;b>0?e&&b>1&&Math.floor(c)>=Math.floor(d.end)&&a.Sd():Math.floor(c)<=Math.floor(d.start+f)&&a.Sd()})}
|
|
917
|
+
function ur(a){if(a.B&&a.R){var b=a.B.g,c="playing";a.R.g==ti?c="buffering":a.fe()?c="ended":a.h.paused&&(c="paused");var d=c;if(b.g==null)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Sq("statechanged",c)))}}
|
|
918
|
+
function Or(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.bi();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.we(d,!1):e==1&&b!==a.M.qd()&&a.Sd()}if(c&&(c=a.Ra(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
|
|
919
|
+
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,a.i.serviceDescription.targetLatency!=null?h=a.i.serviceDescription.targetLatency+d:a.i.serviceDescription.maxLatency!=null&&(h=a.i.serviceDescription.maxLatency),a.i.serviceDescription.targetLatency!=null?
|
|
920
|
+
k=Math.max(0,a.i.serviceDescription.targetLatency-d):a.i.serviceDescription.minLatency!=null&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.V||typeof g!=="number"||(a.V=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.ec&&a.V!==null&&typeof g==="number"&&a.Me<n&&Date.now()-a.ec>f*1E3&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
|
|
921
|
+
a.V=Math.max(a.V-(g-f)/2,f+d),a.ec=Date.now());e&&a.V!==null&&(h=a.V+d,k=a.V-d);g=c.end-a.h.currentTime;d=0;a.m==zr&&(e=a.h.buffered,e.length>0&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=a.g.streaming.liveSync.panicThreshold*1E3;f=Date.now()-a.R.i;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.we(m,!1):h!=void 0&&l&&g-d>h?(b!=l&&a.we(l,!1),a.ec=null):k!=void 0&&m&&g-d<k?(b!=m&&a.we(m,!1),a.ec=null):b!==a.M.qd()&&(a.Sd(),a.ec=Date.now())}}
|
|
922
|
+
function Pr(a){if(a.h){var b=function(e,f){return(bk(e,f,.01)||f>e)&&a.Xf<e?(a.Xf=e,!0):!1},c=a.Ra();c=c.end-c.start;c=c>0?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=Sq("started");else if(b(25,c))d=Sq("firstquartile");else if(b(50,c))d=Sq("midpoint");else if(b(75,c))d=Sq("thirdquartile");else{if(b(100,c)||c>100)d=Sq("complete");a.g&&a.g.playRangeEnd!=Infinity&&a.fe()&&a.h.pause()}d&&a.dispatchEvent(d)}}}
|
|
923
|
+
function Cr(a){try{Ai(a.De,a.i)}catch(c){return Zq(a,c),!1}var b=pg(a.i.variants);b=a.J.create(b);a=a.o.setVariants(Array.from(b.values()));return typeof a=="boolean"?a:!0}
|
|
924
|
+
function Gr(a,b){b=b===void 0?!1:b;if(Cr(a)){if(!a.g.abr.enabled){var c=a.J;typeof c.getLastAdaptationSet!="function"&&(ub("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),c.getLastAdaptationSet=function(){return null});if(c=c.getLastAdaptationSet())if(c=Array.from(c.values()),c.length){var d=a.l.o;if(d&&d.video&&(c=c.find(function(e){return e.video==d.video})))return c}}return a.o.chooseVariant(b)}return null}
|
|
925
|
+
function Pq(a,b,c,d,e){b=b===void 0?!0:b;c=c===void 0?0:c;d=d===void 0?!1:d;e=e===void 0?!0:e;var f=Gr(a);f&&Er(a,f,e,b,c,d)}
|
|
926
|
+
function Er(a,b,c,d,e,f){f=f===void 0?!1:f;var g=a.l.o;if(b==g)d&&Xm(a.l,b,d,e,!0);else{var h=a.B.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Xm(a.l,b,d,e,f,c);d=null;g&&(d=gg(g));g=gg(b);g.active=!0;if(a.T&&(e=a.T,b=b.video)){b.dependencyStream&&(b=b.dependencyStream);f=0;h=-1;switch(b.mimeType){case "video/webm":f=1;break;case "video/mp4":f=2}switch(a.di()){case "DASH":h=1;break;case "HLS":h=0}e.g&&(e.g.setLevelSwitching(b.id,
|
|
927
|
+
!0),e.g.setContainerFormat(f),e.j||e.g.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=Sq("adaptation",c),ks(a,c)):ls(a,d,g);ms(a,d,g)}}function ds(a,b){var c=Array.from(a.h.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=$r(a);c=ng(c,d);b=ng(b,d);ls(a,c,b);ms(a,c,b)}}function $r(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
|
|
928
|
+
function yr(a){var b=Sq("trackschanged");ks(a,b);ns(a)}function ls(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Sq("variantchanged",b);ks(a,b)}function ms(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&ns(a)}function ns(a){var b=Sq("audiotrackschanged");ks(a,b)}function xr(a){var b=Sq("textchanged");ks(a,b)}function Lr(a){var b=Sq("texttrackvisibility");ks(a,b)}
|
|
929
|
+
function Nr(a){a.g.abr.enabled||Oq(a);var b=(new Map).set("newStatus",a.g.abr.enabled);ks(a,Sq("abrstatuschanged",b))}function Mr(a){var b=a.Lc().find(function(c){return c.active});b&&a.u&&a.u.setTextLanguage&&a.u.setTextLanguage(b.language)}function Oq(a,b){b=b===void 0?!0:b;if(a.m==vr){a.Ge.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Cr(a)}}
|
|
930
|
+
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===Tq||!navigator.onLine||b==0||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?a.type=="audio"?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.Ge.Ea(1);b=this.Hc().video.reduce(function(h,
|
|
931
|
+
k){return h+k.end-k.start},0);Pq(this,!1,b,!0,!1);return!0}return!1};
|
|
932
|
+
function Zq(a,b){var c,d,e,f,g;return G(function(h){switch(h.h){case 1:if(a.m==Tq)return h.return();b.severity===1&&a.B.M++;c=!0;if(!(a.Ua&&a.i&&a.l)||b.code!=3016&&b.code!=3014&&b.code!=3015&&b.code!=3024&&b.code!=3018){h.A(2);break}d=nb();if(d.Ia()==="WEBKIT"&&b.code==3016)return h.return();h.m(3);return h.g(nn(a.l),5);case 5:e=h.i;c=!e;e&&(f=Sq("mediasourcerecovered"),a.dispatchEvent(f));h.o(2);break;case 3:h.l(),c=!0;case 2:if(!c)return h.return();b.severity===2&&Oq(a,!1);g=Sq("error",(new Map).set("detail",
|
|
933
|
+
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);h.j()}})}p.addFont=function(a,b){return Tj(a,b)};function nr(a,b,c,d){d=d===void 0?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Sq(b,a))}
|
|
934
|
+
function or(a,b,c,d){d=d===void 0?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(Sq(d?"audiotrackchanged":"mediaqualitychanged",b))}
|
|
935
|
+
function Yq(a,b){b=b===void 0?!0:b;if(!a.h.error)return b?new S(2,3,3016):null;var c=a.h.error.code;if(!b&&c==1)return null;if(b=a.h.error.msExtendedCode)b<0&&(b+=4294967296),b=b.toString(16);return new S(2,3,3016,c,b,a.h.error.message)}
|
|
936
|
+
function pr(a,b){var c=Sq("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);d.length==1&&d[0]==""&&(d=["00"],b={"00":b[""]});var e=d.length==1&&d[0]=="00";c=!1;if(d.length){d=a.keySystem();for(var f=hh(a.g.drm.clearKeys),g=function(u,v){u.allowedByKeySystem=!0;v=t(v);for(var w=v.next();!w.done;w=v.next())if(w=w.value,(w=b[e?"00":w])||a.D.H)u.allowedByKeySystem=u.allowedByKeySystem&&!!w&&!Bi.includes(w)},h=t(a.i.variants),k=h.next();!k.done;k=h.next()){k=k.value;var l=sg(k);l=t(l);for(var m=
|
|
937
|
+
l.next();!m.done;m=l.next()){m=m.value;var n=k.allowedByKeySystem;if(m.keyIds.size)if(m.drmInfos.length&&!f.size&&a.i.type=="HLS")for(var q=t(m.drmInfos),r=q.next();!r.done;r=q.next())r=r.value,r.keySystem==d&&(r.keyIds.size?g(k,r.keyIds):g(k,m.keyIds));else g(k,m.keyIds);n!=k.allowedByKeySystem&&(c=!0)}}}c&&(yr(a),(c=a.l.o)&&!c.allowedByKeySystem?Pq(a):Cr(a))}function Dr(a,b,c){b>0&&(a.U()||a.Vi(b));b=a.getDuration();c<b&&(a.U()||a.Ab(c))}
|
|
938
|
+
function ks(a,b){G(function(c){if(c.h==1)return c.g(Promise.resolve(),2);a.m!=Tq&&a.dispatchEvent(b);c.j()})}function fs(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(vf(c.language)):b.add("und");return b}
|
|
939
|
+
function es(a){for(var b=new Map,c=new Map,d=0;d<a.length;d++){var e=a[d],f="und",g=[];e.language&&(f=vf(e.language));e.type=="variant"?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,b.get(f).add(h),e.label&&(c.has(f)||c.set(f,new Map),c.get(f).set(h,e.label))}var k=[];b.forEach(function(l,m){l=t(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=null;c.has(m)&&c.get(m).has(n)&&(q=c.get(m).get(n));k.push({language:m,
|
|
940
|
+
role:n,label:q})}});return k}p.xa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1};p.fe=function(){return!this.h||this.h.ended?!0:this.Ua&&!this.U()&&this.h.currentTime>=this.Ra().end};N("shaka.Player",X);X.prototype.isEnded=X.prototype.fe;X.prototype.isRemotePlayback=X.prototype.xa;X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.Wi;X.prototype.getFetchedPlaybackInfo=X.prototype.Ij;X.prototype.getManifestParserFactory=X.prototype.Nj;
|
|
941
|
+
X.prototype.getManifest=X.prototype.Hg;X.prototype.retryStreaming=X.prototype.ih;X.prototype.setMaxHardwareResolution=X.prototype.al;X.prototype.addChaptersTrack=X.prototype.Ne;X.prototype.addThumbnailsTrack=X.prototype.Oe;X.prototype.addTextTrackAsync=X.prototype.Rd;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.Hc;X.prototype.getSegmentAvailabilityDuration=X.prototype.bf;X.prototype.getPresentationStartTimeAsDate=X.prototype.ii;
|
|
942
|
+
X.prototype.getPlayheadTimeAsDate=X.prototype.Qj;X.prototype.setTextTrackVisibility=X.prototype.rh;X.prototype.getChaptersAsync=X.prototype.Dj;X.prototype.getChapters=X.prototype.Cj;X.prototype.getChaptersTracks=X.prototype.Ej;X.prototype.isTextTrackVisible=X.prototype.Pg;X.prototype.selectVariantsByLabel=X.prototype.Vk;X.prototype.selectTextLanguage=X.prototype.mh;X.prototype.selectAudioLanguage=X.prototype.Pi;X.prototype.getTextLanguages=X.prototype.Wj;X.prototype.getAudioLanguages=X.prototype.zj;
|
|
943
|
+
X.prototype.getTextLanguagesAndRoles=X.prototype.Xj;X.prototype.getAudioLanguagesAndRoles=X.prototype.Aj;X.prototype.getVideoTracks=X.prototype.getVideoTracks;X.prototype.selectVideoTrack=X.prototype.Wk;X.prototype.getAudioTracks=X.prototype.getAudioTracks;X.prototype.selectAudioTrack=X.prototype.Uk;X.prototype.selectVariantTrack=X.prototype.Gf;X.prototype.selectTextTrack=X.prototype.nh;X.prototype.getThumbnails=X.prototype.Zj;X.prototype.getAllThumbnails=X.prototype.yj;
|
|
944
|
+
X.prototype.getImageTracks=X.prototype.Kj;X.prototype.getTextTracks=X.prototype.Lc;X.prototype.getVariantTracks=X.prototype.sc;X.prototype.cancelTrickPlay=X.prototype.Sd;X.prototype.trickPlay=X.prototype.we;X.prototype.useTrickPlayTrackIfAvailable=X.prototype.Hh;X.prototype.getPlaybackRate=X.prototype.Ob;X.prototype.isBuffering=X.prototype.Og;X.prototype.getKeyStatuses=X.prototype.Ze;X.prototype.getActiveSessionsMetadata=X.prototype.Gg;X.prototype.getExpiration=X.prototype.Zd;
|
|
945
|
+
X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.jk;X.prototype.goToLive=X.prototype.fk;X.prototype.seekRange=X.prototype.Ra;X.prototype.isVideoOnly=X.prototype.pi;X.prototype.isAudioOnly=X.prototype.ik;X.prototype.isInProgress=X.prototype.Uc;X.prototype.isLive=X.prototype.U;X.prototype.getQueueManager=X.prototype.ji;X.prototype.getAdManager=X.prototype.ai;X.prototype.getAssetUri=X.prototype.pd;
|
|
946
|
+
X.prototype.getNetworkingEngine=X.prototype.Yb;X.prototype.getMediaElement=X.prototype.$e;X.prototype.getManifestType=X.prototype.di;X.prototype.getLoadMode=X.prototype.$d;X.prototype.resetConfiguration=X.prototype.Ki;X.prototype.getBufferFullness=X.prototype.bi;X.prototype.getNonDefaultConfiguration=X.prototype.gi;X.prototype.getConfigurationForLowLatency=X.prototype.Fj;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configurationForLowLatency=X.prototype.vj;
|
|
947
|
+
X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Mk;X.prototype.destroyAllPreloads=X.prototype.ng;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Xh;X.prototype.unloadAndSavePreload=X.prototype.gj;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.ll;X.prototype.unload=X.prototype.Dc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.nj;X.prototype.attach=X.prototype.Vb;
|
|
948
|
+
X.probeSupport=function(a){a=a===void 0?!0:a;var b,c,d,e,f,g,h;return G(function(k){switch(k.h){case 1:b={};if(!a){k.A(2);break}return k.g(pi(),3);case 3:b=k.i;case 2:return c=Sc(),d=Hk(),e=nb(),k.g(e.nc(),4);case 4:return f=k.i,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=Vq,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};
|
|
949
|
+
X.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;nb();return Tc()?!0:Uc().canPlayType("application/x-mpegurl")!=""};X.setQueueManagerFactory=function(a){Nq=a};X.setAdManagerFactory=function(a){Mq=a};X.registerSupportPlugin=Uq;X.prototype.destroy=X.prototype.destroy;var Tq=0,Jq=1,vr=2,zr=3;
|
|
950
|
+
X.LoadMode={DESTROYED:Tq,NOT_LOADED:Jq,MEDIA_SOURCE:vr,SRC_EQUALS:zr};X.version="v4.16.21";var os=["4","16"];vb=new function(a){this.g=a;this.i=wb;this.h=xb}(new tb(Number(os[0]),Number(os[1])));var Vq=new Map,Mq=null,Nq=null;function ps(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function qs(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function rs(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new gb;this.l.F(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.F(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=rs.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};
|
|
951
|
+
p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return this.g.getSkipTimeOffset()>=0};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};
|
|
952
|
+
p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.m.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return this.h.getVolume()==0};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){this.h.resize(a,b)};p.setMuted=function(a){(this.m.muted=a)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};
|
|
953
|
+
p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};
|
|
954
|
+
p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};N("shaka.ads.ClientSideAd",rs);rs.prototype.release=rs.prototype.release;rs.prototype.getPodIndex=rs.prototype.getPodIndex;
|
|
955
|
+
rs.prototype.getTimeOffset=rs.prototype.getTimeOffset;rs.prototype.getMediaUrl=rs.prototype.getMediaUrl;rs.prototype.getAdvertiserName=rs.prototype.getAdvertiserName;rs.prototype.getCreativeAdId=rs.prototype.getCreativeAdId;rs.prototype.getAdId=rs.prototype.getAdId;rs.prototype.getVastAdId=rs.prototype.getVastAdId;rs.prototype.getVastMediaWidth=rs.prototype.getVastMediaWidth;rs.prototype.getVastMediaHeight=rs.prototype.getVastMediaHeight;rs.prototype.getVastMediaBitrate=rs.prototype.getVastMediaBitrate;
|
|
956
|
+
rs.prototype.getDescription=rs.prototype.getDescription;rs.prototype.getTitle=rs.prototype.getTitle;rs.prototype.getPositionInSequence=rs.prototype.getPositionInSequence;rs.prototype.getSequenceLength=rs.prototype.getSequenceLength;rs.prototype.setMuted=rs.prototype.setMuted;rs.prototype.resize=rs.prototype.resize;rs.prototype.isLinear=rs.prototype.isLinear;rs.prototype.isMuted=rs.prototype.isMuted;rs.prototype.setVolume=rs.prototype.setVolume;rs.prototype.getVolume=rs.prototype.getVolume;
|
|
957
|
+
rs.prototype.play=rs.prototype.play;rs.prototype.pause=rs.prototype.pause;rs.prototype.skip=rs.prototype.skip;rs.prototype.canSkipNow=rs.prototype.canSkipNow;rs.prototype.getTimeUntilSkippable=rs.prototype.getTimeUntilSkippable;rs.prototype.isSkippable=rs.prototype.isSkippable;rs.prototype.isPaused=rs.prototype.isPaused;rs.prototype.getRemainingTime=rs.prototype.getRemainingTime;rs.prototype.getMinSuggestedDuration=rs.prototype.getMinSuggestedDuration;rs.prototype.getDuration=rs.prototype.getDuration;
|
|
958
|
+
rs.prototype.isUsingAnotherMediaElement=rs.prototype.isUsingAnotherMediaElement;rs.prototype.hasCustomClick=rs.prototype.hasCustomClick;rs.prototype.isClientRendering=rs.prototype.isClientRendering;rs.prototype.needsSkipUI=rs.prototype.needsSkipUI;function ss(){}
|
|
959
|
+
function ts(a,b){var c=[];a=t(Ed(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=Id(d.value,"InLine"))if(d=Id(d,"Creatives")){d=t(Ed(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Id(e,"Linear");f&&us(c,b,f);if(e=Id(e,"NonLinearAds")){e=Ed(e,"NonLinear");e=t(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=Id(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=Id(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=Gd(l)){g==="text/html"&&(l="data:text/html;charset=UTF-8,"+
|
|
960
|
+
encodeURIComponent(l));var m=Md(k,"width",Sd)||Md(k,"expandedWidth",Sd),n=Md(k,"height",Sd)||Md(k,"expandedHeight",Sd);if(m||n){var q=null,r=Id(k,"NonLinearClickThrough");r&&(r=Gd(r))&&(q=r);r=null;(k=k.attributes.minSuggestedDuration)&&(r=rd(k));k=0;h!=null&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:r,once:!0,pre:h==null,post:h==Infinity,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,
|
|
961
|
+
y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:q})}}}}}}return c}
|
|
962
|
+
function us(a,b,c){var d=0;b!=null&&(d=b);var e=null;c.attributes.skipoffset&&(e=rd(c.attributes.skipoffset),isNaN(e)&&(e=null));var f=Id(c,"MediaFiles");if(f){var g=null;(c=Id(c,"VideoClicks"))&&(c=Id(c,"ClickThrough"))&&(c=Gd(c))&&(g=c);f=c=Ed(f,"MediaFile");c=c.filter(function(k){return k.attributes.delivery=="streaming"});c.length&&(f=c);f=f.sort(function(k,l){return(parseInt(l.attributes.height,10)||0)-(parseInt(k.attributes.height,10)||0)});f=t(f);for(c=f.next();!c.done;c=f.next())if(c=c.value,
|
|
963
|
+
!c.attributes.apiFramework){var h=Gd(c);if(h){a.push({id:null,groupId:null,startTime:d,endTime:null,uri:h,mimeType:c.attributes.type||null,isSkippable:e!=null,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:b==null,post:b==Infinity,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:g});break}}}}
|
|
964
|
+
function vs(a){var b=[];a=t(Ed(a,"vmap:AdBreak"));for(var c=a.next();!c.done;c=a.next()){var d=c.value,e=d.attributes.timeOffset;e&&(c=null,e=="start"?c=null:e=="end"?c=Infinity:c=rd(e),(d=Id(d,"vmap:AdSource"))&&(d=Id(d,"vmap:AdTagURI"))&&(d=Fd(d))&&b.push({time:c,uri:d}))}return b}N("shaka.ads.Utils",ss);ss.ADS_LOADED="ads-loaded";ss.AD_STARTED="ad-started";ss.AD_FIRST_QUARTILE="ad-first-quartile";ss.AD_MIDPOINT="ad-midpoint";ss.AD_THIRD_QUARTILE="ad-third-quartile";ss.AD_COMPLETE="ad-complete";
|
|
965
|
+
ss.AD_STOPPED="ad-stopped";ss.AD_SKIPPED="ad-skipped";ss.AD_VOLUME_CHANGED="ad-volume-changed";ss.AD_MUTED="ad-muted";ss.AD_PAUSED="ad-paused";ss.AD_RESUMED="ad-resumed";ss.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";ss.CUEPOINTS_CHANGED="ad-cue-points-changed";ss.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";ss.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";ss.AD_CLICKED="ad-clicked";ss.AD_PROGRESS="ad-progress";ss.AD_BUFFERING="ad-buffering";ss.AD_IMPRESSION="ad-impression";
|
|
966
|
+
ss.AD_DURATION_CHANGED="ad-duration-changed";ss.AD_CLOSED="ad-closed";ss.AD_LOADED="ad-loaded";ss.ALL_ADS_COMPLETED="all-ads-completed";ss.AD_LINEAR_CHANGED="ad-linear-changed";ss.AD_METADATA="ad-metadata";ss.AD_RECOVERABLE_ERROR="ad-recoverable-error";ss.AD_ERROR="ad-error";ss.AD_BREAK_READY="ad-break-ready";ss.AD_INTERACTION="ad-interaction";ss.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";ss.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";ss.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function ws(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.G=!1;this.B=this.o=null;this.H=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.D=new google.ima.AdDisplayContainer(this.u,this.i);this.D.initialize();this.m=new google.ima.AdsLoader(this.D);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.16.21");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.F(this.m,
|
|
967
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){xs(f,g)});this.h.F(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){ys(f,g)});this.h.F(this.i,"ended",function(){f.m.contentComplete()});this.h.Aa(this.i,"play",function(){f.G=!0})}ws.prototype.configure=function(a){this.o=a};ws.prototype.stop=function(){this.g&&this.g.stop();this.u&&Nj(this.u)};
|
|
968
|
+
ws.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.D.destroy()};function ys(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new T("ad-error",b));zs(a,null);a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
969
|
+
function xs(a,b){a.l(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.F(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.F(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.l(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
970
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}As(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.F(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.B.observe(a.i)):a.h.F(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,
|
|
971
|
+
a.i.offsetHeight)}),a.G||a.o.skipPlayDetection?a.g.start():a.h.Aa(a.i,"play",function(){a.G=!0;a.g.start()})}catch(f){zs(a,null)}}
|
|
972
|
+
function As(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new T(d,c))}a.h.F(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){ys(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Bs(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.STARTED,function(c){Bs(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.F(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.F(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
973
|
+
function(c){b(c,"ad-third-quartile")});a.h.F(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.F(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){zs(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed");zs(a,c)});a.h.F(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.F(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.F(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,
|
|
974
|
+
function(c){b(c,"ad-muted")});a.h.F(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.F(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.F(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.F(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.F(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.F(a.g,google.ima.AdEvent.Type.AD_BUFFERING,
|
|
975
|
+
function(c){b(c,"ad-buffering")});a.h.F(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.F(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.F(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.F(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.F(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.F(a.g,google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,
|
|
976
|
+
"ad-metadata")});a.h.F(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.F(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.F(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
977
|
+
function Bs(a,b){var c=b.getAd();c?(a.j=new rs(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new T("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new T("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.o.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Wa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
978
|
+
function zs(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new T("ad-content-resume-requested"));a.l(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Cs(a,b,c,d,e,f){this.g=a;this.h=b;this.j=(this.i=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.B=c;this.o=d;this.m=e;this.u=f;this.C=b.overlay}p=Cs.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return this.h.clickThroughUrl!=null};p.isUsingAnotherMediaElement=function(){return this.u};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
979
|
+
p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.i&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.i};p.getTimeUntilSkippable=function(){if(this.isSkippable()){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};
|
|
980
|
+
p.canSkipNow=function(){return this.i&&this.getTimeUntilSkippable()==0};p.skip=function(){this.canSkipNow()&&this.B()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.C==null};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.o};
|
|
981
|
+
p.getPositionInSequence=function(){return this.m};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.h.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.h.uri};
|
|
982
|
+
p.getTimeOffset=function(){return this.h.pre?0:this.h.post?-1:this.h.startTime};p.getPodIndex=function(){return 0};p.release=function(){this.g=null};N("shaka.ads.InterstitialAd",Cs);Cs.prototype.release=Cs.prototype.release;Cs.prototype.getPodIndex=Cs.prototype.getPodIndex;Cs.prototype.getTimeOffset=Cs.prototype.getTimeOffset;Cs.prototype.getMediaUrl=Cs.prototype.getMediaUrl;Cs.prototype.getAdvertiserName=Cs.prototype.getAdvertiserName;Cs.prototype.getCreativeAdId=Cs.prototype.getCreativeAdId;
|
|
983
|
+
Cs.prototype.getAdId=Cs.prototype.getAdId;Cs.prototype.getVastAdId=Cs.prototype.getVastAdId;Cs.prototype.getVastMediaWidth=Cs.prototype.getVastMediaWidth;Cs.prototype.getVastMediaHeight=Cs.prototype.getVastMediaHeight;Cs.prototype.getVastMediaBitrate=Cs.prototype.getVastMediaBitrate;Cs.prototype.getDescription=Cs.prototype.getDescription;Cs.prototype.getTitle=Cs.prototype.getTitle;Cs.prototype.getPositionInSequence=Cs.prototype.getPositionInSequence;Cs.prototype.getSequenceLength=Cs.prototype.getSequenceLength;
|
|
984
|
+
Cs.prototype.setMuted=Cs.prototype.setMuted;Cs.prototype.resize=Cs.prototype.resize;Cs.prototype.isLinear=Cs.prototype.isLinear;Cs.prototype.isMuted=Cs.prototype.isMuted;Cs.prototype.setVolume=Cs.prototype.setVolume;Cs.prototype.getVolume=Cs.prototype.getVolume;Cs.prototype.play=Cs.prototype.play;Cs.prototype.pause=Cs.prototype.pause;Cs.prototype.skip=Cs.prototype.skip;Cs.prototype.canSkipNow=Cs.prototype.canSkipNow;Cs.prototype.getTimeUntilSkippable=Cs.prototype.getTimeUntilSkippable;
|
|
985
|
+
Cs.prototype.isSkippable=Cs.prototype.isSkippable;Cs.prototype.isPaused=Cs.prototype.isPaused;Cs.prototype.getRemainingTime=Cs.prototype.getRemainingTime;Cs.prototype.getMinSuggestedDuration=Cs.prototype.getMinSuggestedDuration;Cs.prototype.getDuration=Cs.prototype.getDuration;Cs.prototype.isUsingAnotherMediaElement=Cs.prototype.isUsingAnotherMediaElement;Cs.prototype.hasCustomClick=Cs.prototype.hasCustomClick;Cs.prototype.isClientRendering=Cs.prototype.isClientRendering;
|
|
986
|
+
Cs.prototype.needsSkipUI=Cs.prototype.needsSkipUI;function Ds(a,b,c){this.g=a;this.j=b;this.h=c;this.i=a.overlay==null}p=Ds.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return this.g.clickThroughUrl!=null};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return-1};p.isPaused=function(){return!1};p.isSkippable=function(){return!1};
|
|
987
|
+
p.getTimeUntilSkippable=function(){return 0};p.canSkipNow=function(){return!1};p.skip=function(){};p.pause=function(){};p.play=function(){};p.getVolume=function(){return 1};p.setVolume=function(){};p.isMuted=function(){return!1};p.isLinear=function(){return this.i};p.resize=function(){};p.setMuted=function(){};p.getSequenceLength=function(){return this.j};p.getPositionInSequence=function(){return this.h};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};
|
|
988
|
+
p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.g.uri};p.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime};p.getPodIndex=function(){return 0};p.release=function(){};N("shaka.ads.InterstitialStaticAd",Ds);Ds.prototype.release=Ds.prototype.release;
|
|
989
|
+
Ds.prototype.getPodIndex=Ds.prototype.getPodIndex;Ds.prototype.getTimeOffset=Ds.prototype.getTimeOffset;Ds.prototype.getMediaUrl=Ds.prototype.getMediaUrl;Ds.prototype.getAdvertiserName=Ds.prototype.getAdvertiserName;Ds.prototype.getCreativeAdId=Ds.prototype.getCreativeAdId;Ds.prototype.getAdId=Ds.prototype.getAdId;Ds.prototype.getVastAdId=Ds.prototype.getVastAdId;Ds.prototype.getVastMediaWidth=Ds.prototype.getVastMediaWidth;Ds.prototype.getVastMediaHeight=Ds.prototype.getVastMediaHeight;
|
|
990
|
+
Ds.prototype.getVastMediaBitrate=Ds.prototype.getVastMediaBitrate;Ds.prototype.getDescription=Ds.prototype.getDescription;Ds.prototype.getTitle=Ds.prototype.getTitle;Ds.prototype.getPositionInSequence=Ds.prototype.getPositionInSequence;Ds.prototype.getSequenceLength=Ds.prototype.getSequenceLength;Ds.prototype.setMuted=Ds.prototype.setMuted;Ds.prototype.resize=Ds.prototype.resize;Ds.prototype.isLinear=Ds.prototype.isLinear;Ds.prototype.isMuted=Ds.prototype.isMuted;Ds.prototype.setVolume=Ds.prototype.setVolume;
|
|
991
|
+
Ds.prototype.getVolume=Ds.prototype.getVolume;Ds.prototype.play=Ds.prototype.play;Ds.prototype.pause=Ds.prototype.pause;Ds.prototype.skip=Ds.prototype.skip;Ds.prototype.canSkipNow=Ds.prototype.canSkipNow;Ds.prototype.getTimeUntilSkippable=Ds.prototype.getTimeUntilSkippable;Ds.prototype.isSkippable=Ds.prototype.isSkippable;Ds.prototype.isPaused=Ds.prototype.isPaused;Ds.prototype.getRemainingTime=Ds.prototype.getRemainingTime;Ds.prototype.getMinSuggestedDuration=Ds.prototype.getMinSuggestedDuration;
|
|
992
|
+
Ds.prototype.getDuration=Ds.prototype.getDuration;Ds.prototype.isUsingAnotherMediaElement=Ds.prototype.isUsingAnotherMediaElement;Ds.prototype.hasCustomClick=Ds.prototype.hasCustomClick;Ds.prototype.isClientRendering=Ds.prototype.isClientRendering;Ds.prototype.needsSkipUI=Ds.prototype.needsSkipUI;function Es(a,b,c,d){function e(g){return g?g.overlay?!0:f.g.ended?g.post:f.g.paused?!1:!0:!1}var f=this;this.M=null;this.m=a;this.C=b;this.g=c;this.G=null;this.u=!0;this.h=this.g;this.va=d;this.ma=new Set;this.T=new Set;this.H=new Set;this.D=new Map;this.K=new Map;this.i=new X;Fs(this);this.I=new gb;this.j=new gb;this.J=!1;this.$=this.o=this.B=this.l=null;this.ba=!1;this.O=-1;this.X=function(){if(!f.J&&f.l&&!f.C.xa()){f.l=f.g.currentTime;var g=Gs(f);g&&e(g)&&Hs(f,g,1,1,Date.now())}};this.V=function(){if(!(f.J||
|
|
993
|
+
f.l||f.C.xa())){f.g.paused||(f.l=f.g.currentTime);var g=Gs(f,!0);g||(g=Gs(f));g&&e(g)&&Hs(f,g,1,1,Date.now())}};this.oa=function(){if(!f.J&&f.l&&!f.C.xa()){var g=f.g.currentTime;f.B&&!f.B.pre&&!f.B.post&&g<(f.B.endTime||f.B.startTime)&&(f.B=null)}};this.R=new of(this.X);this.N=new of(function(){var g,h,k,l,m,n,q,r,u,v,w;return G(function(y){switch(y.h){case 1:if(!f.H.size||f.l==null){y.A(0);break}g=f.C.$d();if(g==Tq||g==Jq)return y.return();h=!1;k=Array.from(f.H);l=f.C.Ra();m=t(k);n=m.next();case 3:if(n.done){y.A(5);
|
|
994
|
+
break}q=n.value;if(q==f.B){y.A(4);break}r=q.endTime||q.startTime;if(!(l.start-r>=1)){u=q.startTime-f.l;u>0&&u<=10&&(!f.D.has(q)&&Is(q)&&f.D.set(q,f.i.preload(q.uri,null,q.mimeType||void 0)),Js(f,q));y.A(4);break}if(!f.D.has(q)){y.A(7);break}return y.g(f.D.get(q),8);case 8:(v=y.i)&&v.destroy(),f.D.delete(q);case 7:Ks(f,q),w=q.id||JSON.stringify(q),f.T.has(w)&&f.T.delete(w),f.H.delete(q),Ls(f),q.overlay||(h=!0);case 4:n=m.next();y.A(3);break;case 5:h&&Ms(f),y.j()}})});this.configure(this.C.getConfiguration().ads)}
|
|
995
|
+
p=Es.prototype;p.configure=function(a){this.M=a;this.J||Ns(this)};function Os(a){if(!a.ba&&a.H.size){a.I.F(a.g,"playing",a.V);a.I.F(a.g,"timeupdate",a.V);a.I.F(a.g,"seeked",a.oa);a.I.F(a.g,"ended",a.X);if("requestVideoFrameCallback"in a.g&&!Ps()){var b=a.g,c=function(){a.O!=-1&&(a.X(),a.O!=-1&&(a.O=b.requestVideoFrameCallback(c)))};a.O=b.requestVideoFrameCallback(c)}else a.R.Ea(.025);a.N&&a.N.Ea(1);a.ba=!0}}
|
|
996
|
+
function Ls(a){a.ba&&!a.H.size&&(a.I.Ma(a.g,"playing",a.V),a.I.Ma(a.g,"timeupdate",a.V),a.I.Ma(a.g,"seeked",a.oa),a.I.Ma(a.g,"ended",a.X),a.O!=-1&&(a.g.cancelVideoFrameCallback(a.O),a.O=-1),a.R&&a.R.stop(),a.N&&a.N.stop(),a.ba=!1)}
|
|
997
|
+
function Ns(a){if(a.m&&a.M){var b=a.M.supportsMultipleMediaElements,c=a.g;c.controls?b=!1:c.webkitPresentationMode&&c.webkitPresentationMode!=="inline"?b=!1:c.webkitDisplayingFullscreen&&(b=!1);a.u==b&&(a.u=!b,a.u?(a.h=a.g,a.G&&(a.G.parentElement&&a.m.removeChild(a.G),a.G=null)):(a.G||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.display="none",b.setAttribute("playsinline",""),a.G=
|
|
998
|
+
b),a.h=a.G))}else a.u=!0}
|
|
999
|
+
p.stop=function(){this.j&&this.j.Qa();this.ma.clear();this.T.clear();this.H.clear();this.i.ng();if(this.D.size){var a=Array.from(this.D.values());a=t(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.D.clear();if(this.K.size)for(a=Array.from(this.K.keys()),a=t(a),b=a.next();!b.done;b=a.next())Ks(this,b.value);this.K.clear();this.i.detach();this.J=!1;this.B=this.l=null;this.u=!0;this.h=this.g;this.G=null;Qs(this);Ls(this);this.m&&Nj(this.m);this.o&&(this.o.stop(),
|
|
1000
|
+
this.o=null)};p.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.R&&(this.R.stop(),this.R=null);this.N&&(this.N.stop(),this.N=null);this.i.destroy()};p.sd=function(){return this.i};
|
|
1001
|
+
function Rs(a,b){var c,d,e;G(function(f){if(f.h==1){c=null;if(d=b.values.find(function(g){return g.key=="ID"}))c=d.data;if(c){if(a.ma.has(c))return f.return();a.ma.add(c)}Fs(a);e=[];return b&&b.values.find(function(g){return g.key=="X-OVERLAY-ID"})?(e=Ss(b),f.A(2)):f.g(Ts(a,b),3)}f.h!=2&&(e=f.i);e.length?Us(a,e):Wa("Unsupported HLS interstitial",b);f.j()})}
|
|
1002
|
+
function Vs(a,b){var c=Id(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f=c.attributes.loop=="true",g=Md(c,"z",Sd);if(d&&g!=0){var h=null,k=Id(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=Gd(k)}k=1920;l=1080;var m=Id(c,"Viewport");if(m){k=Md(m,"x",Sd);if(k==null)return;l=Md(m,"y",Sd);if(l==null)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=Id(c,"Overlay");if(m&&q){var r=Id(q,"TopLeft"),u=Id(q,"Size");if(r&&
|
|
1003
|
+
u){q=Md(r,"x",Sd);if(q==null)return;r=Md(r,"y",Sd);if(r==null)return;var v=Md(u,"x",Sd);if(v==null)return;u=Md(u,"y",Sd);if(u==null)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=v;n.size.y=u}}q=null;c=Id(c,"Squeeze");if(m&&c&&(u=Id(c,"TopLeft"),c=Id(c,"Size"),u&&c)){m=Md(u,"x",Sd);if(m==null)return;q=Md(u,"y",Sd);if(q==null)return;u=Md(c,"x",Sd);if(u==null)return;c=Md(c,"y",Sd);if(c==null)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:u,y:c}}}Us(a,[{id:b.id,groupId:null,startTime:b.startTime,
|
|
1004
|
+
endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:n,displayOnBackground:g==-1,currentVideo:q,background:h,clickThroughUrl:null}])}}
|
|
1005
|
+
p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return G(function(n){if(n.h==1)return c={type:12},n.g(Ws(b,a,c),2);if(n.h!=3){d=n.i;e=wd(d,"VAST,vmap:VMAP");if(!e)throw new S(2,10,10007);f=[];if(e.tagName=="VAST")return f=ts(e,b.l),n.A(3);if(e.tagName!="vmap:VMAP")return n.A(3);g=function(q){var r,u;return G(function(v){if(v.h==1)return v.g(Ws(b,q.uri,c),2);r=v.i;u=wd(r,"VAST");if(!u)throw new S(2,10,10007);f.push.apply(f,F(ts(u,q.time)));v.j()})};h=[];k=t(vs(e));for(l=k.next();!l.done;l=
|
|
1006
|
+
k.next())m=l.value,h.push(g(m));return h.length?n.g(Promise.all(h),3):n.A(3)}Us(b,f);n.j()})};
|
|
1007
|
+
function Us(a,b){var c,d,e,f,g,h,k,l;G(function(m){switch(m.h){case 1:c=!1,d=t(b),e=d.next();case 2:if(e.done){m.A(4);break}f=e.value;if(!f.uri){Wa("Missing URL in interstitial",f);m.A(3);break}if(f.mimeType){m.A(5);break}m.m(6);g=a.i.Yb();return m.g(Fm(f.uri,g,a.C.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.i;m.o(5);break;case 6:m.l();case 5:h=f.id||JSON.stringify(f);if(a.T.has(h)){m.A(3);break}f.loop&&!f.overlay&&Wa("Loop is only supported in overlay interstitials",f);f.overlay||
|
|
1008
|
+
(c=!0);a.T.add(h);a.H.add(f);k=!1;f.pre&&a.l==null?k=!0:f.startTime!=0||f.canJump?a.l!=null&&(l=f.startTime-a.l,l>0&&l<=10&&(k=!0)):k=!0;k&&(!a.D.has(f)&&Is(f)&&a.D.set(f,a.i.preload(f.uri,null,f.mimeType||void 0)),Js(a,f));case 3:e=d.next();m.A(2);break;case 4:c&&Ms(a),Os(a),m.j()}})}
|
|
1009
|
+
function Gs(a,b,c){b=b===void 0?!1:b;c=c===void 0?null:c;var d=0,e=null;if(a.H.size&&a.l!=null){var f=a.g.ended,g=Array.from(a.H).sort(function(n,q){return q.startTime-n.startTime}),h=g;h=b?g.filter(function(n){return n.pre}):f?g.filter(function(n){return n.post}):g.filter(function(n){return!n.pre&&!n.post});g=t(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.l-Math.round(h.startTime*1E3)/1E3,m=1;a.M.allowStartInMiddleOfInterstitial&&
|
|
1010
|
+
h.endTime&&h.endTime!=Infinity&&(m=h.endTime-h.startTime);(l>0||l==0&&a.l==0)&&(l<=m||!h.canJump)&&(k=c==null&&a.B&&!a.B.pre&&!a.B.post&&a.B.startTime>=h.startTime?!1:!0)}k&&(!a.B||h.startTime>=a.B.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&Math.round(h.startTime*1E3)/1E3-Math.round(e.startTime*1E3)/1E3>.001&&(e=h,d=0),d++)}}return e}
|
|
1011
|
+
function Hs(a,b,c,d,e,f){f=f===void 0?0:f;a.B=b;Ns(a);a.u||!a.m||a.h.parentElement||a.m.appendChild(a.h);d==1&&c==1&&(c=Array.from(a.H).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:Math.abs(g.startTime-b.startTime)<.001}).length);b.once&&(f++,a.H.delete(b),Ls(a),b.overlay||Ms(a));b.mimeType&&(b.mimeType.startsWith("image/")||b.mimeType==="text/html")?b.overlay?Xs(a,b,c,d,f):Wa("Unsupported interstitial",b):a.u&&b.overlay?Wa("Unsupported interstitial",b):Ys(a,b,c,d,e,f)}
|
|
1012
|
+
function Xs(a,b,c,d,e){function f(){a.o&&(a.o.stop(),a.o=null);a.m.removeChild(k);Qs(a,b);Zs(a,"ad-stopped");a.j.Qa();var q=Gs(a,b.pre,d-e);q?Hs(a,q,c,++d,Date.now(),e):a.J=!1}a.J=!0;var g=b.overlay,h=b.mimeType=="text/html"?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";$s(a,b);var l=new Ds(b,c,d);Zs(a,"ad-impression");Zs(a,"ad-started",(new Map).set("ad",l));h=="iframe"?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){Zs(a,
|
|
1013
|
+
"ad-error",(new Map).set("originalEvent",q));f()});l=g.viewport;var m=g.topLeft;g=g.size;l.x==0&&l.y==0?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||h!="iframe"||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.m.appendChild(k);var n=Date.now();a.o&&a.o.stop();a.o=new of(function(){b.playoutLimit&&(Date.now()-
|
|
1014
|
+
n)/1E3>b.playoutLimit?(Zs(a,"ad-complete"),f()):b.endTime&&a.g.currentTime>b.endTime?(Zs(a,"ad-complete"),f()):a.g.currentTime<b.startTime&&(Zs(a,"ad-skipped"),f())});b.playoutLimit&&!b.endTime?a.o.ka(b.playoutLimit):b.endTime&&a.o.Ea(.025);a.j.F(a.g,"seeked",function(){var q=a.g.currentTime;if(q<b.startTime||b.endTime&&q>b.endTime)a.o&&a.o.stop(),Zs(a,"ad-skipped"),f()});b.clickThroughUrl&&a.j.F(k,"click",function(){b.clickThroughUrl&&window.open(b.clickThroughUrl,"_blank")})}
|
|
1015
|
+
function Ys(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E;G(function(K){switch(K.h){case 1:g=Date.now();a.J=!0;h=!1;k=function(){if(!a.u&&!b.overlay&&b.resumeOffset==null)if(b.timelineRange&&b.endTime&&b.endTime!=Infinity)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var J=Date.now();a.g.currentTime+=(J-e)/1E3;e=J}};l=function(J){var O,P;return G(function(M){if(M.h==1){k();O=Gs(a,b.pre,d-f);if(J&&b.groupId)for(;O&&O.groupId==b.groupId;)d++,O=Gs(a,b.pre,d-f);a.o&&(!b.groupId||
|
|
1016
|
+
O&&O.groupId!=b.groupId)&&(a.o.stop(),a.o=null);Qs(a,b);if(O&&!O.overlay)return M.A(2);b.post&&(a.l=null,a.B=null);return a.u?M.g(a.i.detach(),4):M.g(a.i.Dc(),4)}M.h!=2&&(a.u&&(P=b.resumeOffset,P==null&&(P=b.timelineRange&&b.endTime&&b.endTime!=Infinity?b.endTime-(a.l||0):(Date.now()-e)/1E3),Zs(a,"ad-content-resume-requested",(new Map).set("offset",P))),Zs(a,"ad-stopped"),a.j.Qa(),a.J=!1,a.u?Ms(a):(a.h.style.display="none",k(),a.g.ended||a.g.play()));Ns(a);O&&(Zs(a,"ad-stopped"),a.j.Qa(),Hs(a,O,c,
|
|
1017
|
+
++d,e,f));M.j()})};m=function(J){return G(function(O){if(h)return O.return();h=!0;Zs(a,"ad-error",(new Map).set("originalEvent",J));return O.g(l(!1),0)})};n=function(){return G(function(J){if(J.h==1){if(h)return J.return();h=!0;return J.g(l(!1),2)}Zs(a,"ad-complete");J.j()})};a.$=function(){return G(function(J){if(h)return J.return();h=!0;Zs(a,"ad-skipped");return J.g(l(!0),0)})};q=new Cs(a.h,b,a.$,c,d,!a.u);a.u||(q.setMuted(a.g.muted),q.setVolume(a.g.volume));Zs(a,"ad-started",(new Map).set("ad",
|
|
1018
|
+
q));(r=q.canSkipNow())&&Zs(a,"ad-skip-state-changed");a.j.Aa(a.i,"error",m);a.j.F(a.h,"timeupdate",function(){if(a.h.duration){var J=q.canSkipNow();r!=J&&q.getRemainingTime()>0&&q.getDuration()>0&&Zs(a,"ad-skip-state-changed");r=J;!a.u&&!b.overlay&&b.resumeOffset==null&&b.timelineRange&&b.endTime&&b.endTime!=Infinity&&a.g.currentTime!=b.endTime&&a.C.Ra().end>=b.endTime&&(a.g.currentTime=b.endTime)}});a.j.Aa(a.i,"firstquartile",function(){k();Zs(a,"ad-first-quartile")});a.j.Aa(a.i,"midpoint",function(){k();
|
|
1019
|
+
Zs(a,"ad-midpoint")});a.j.Aa(a.i,"thirdquartile",function(){k();Zs(a,"ad-third-quartile")});a.j.Aa(a.i,"complete",n);a.j.F(a.h,"play",function(){Zs(a,"ad-resumed")});a.j.F(a.h,"pause",function(){var J=a.i.getConfiguration();a.h.currentTime>=J.playRangeEnd?n():Zs(a,"ad-paused")});a.j.F(a.h,"volumechange",function(){a.h.muted?Zs(a,"ad-muted"):Zs(a,"ad-volume-changed");a.u||(a.g.volume=a.h.volume,a.g.muted=a.h.muted)});b.clickThroughUrl&&(u=a.m||a.h,a.j.F(u,"click",function(){b.clickThroughUrl&&(q.isPaused()||
|
|
1020
|
+
q.pause(),window.open(b.clickThroughUrl,"_blank"))}));if(!a.u||d!=1){K.A(2);break}Zs(a,"ad-content-pause-requested",(new Map).set("saveLivePosition",!0));v=new Eg;w=function(J){return G(function(O){if(O.h==1)return J.state!="detach"?O.A(0):Ps()?O.g(new Promise(function(P){return(new of(P)).ka(.1)}),3):O.A(3);v.resolve();a.j.Ma(a.C,"onstatechange",w);O.j()})};a.j.F(a.C,"onstatechange",w);return K.g(v,2);case 2:return $s(a,b),a.u||(a.h.style.display="",b.overlay?(a.h.loop=b.loop,y=b.overlay.viewport,
|
|
1021
|
+
x=b.overlay.topLeft,z=b.overlay.size,a.h.style.height=z.y/y.y*100+"%",a.h.style.left=x.x/y.x*100+"%",a.h.style.top=x.y/y.y*100+"%",a.h.style.width=z.x/y.x*100+"%"):(a.g.pause(),b.resumeOffset!=null&&b.resumeOffset!=0&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),K.m(4),Fs(a),b.startTime&&b.endTime&&b.endTime!=Infinity&&b.startTime!=b.endTime&&(C=b.endTime-b.startTime,C>0&&a.i.configure("playRangeEnd",C)),b.playoutLimit&&
|
|
1022
|
+
!a.o&&(a.o=(new of(function(){a.$()})).ka(b.playoutLimit),a.i.configure("playRangeEnd",b.playoutLimit)),K.g(a.i.Vb(a.h),6);case 6:return H=null,b.pre||b.post||!a.M.allowStartInMiddleOfInterstitial||a.l==null||(D=a.l-b.startTime,Math.abs(D)>.25&&(H=D)),a.D.has(b)?K.g(a.D.get(b),10):K.g(a.i.load(b.uri,H,b.mimeType||void 0),8);case 10:return A=K.i,a.D.delete(b),A?K.g(a.i.load(A),8):K.g(a.i.load(b.uri,H,b.mimeType||void 0),8);case 8:b.overlay&&a.g.paused?a.h.pause():a.h.play();B=(Date.now()-g)/1E3;Zs(a,
|
|
1023
|
+
"ads-loaded",(new Map).set("loadTime",B));a.u&&a.g.play();b.overlay&&(b.pre||b.post||a.C.U()&&!(b.startTime>0)||(I=function(){var J=a.g.currentTime-b.startTime;Math.abs(J-a.h.currentTime)>.1&&(a.h.currentTime=J)},a.j.Aa(a.h,"playing",I),a.j.F(a.g,"seeking",I)),a.j.F(a.g,"seeked",function(){var J=a.g.currentTime;(J<b.startTime||b.endTime&&J>b.endTime)&&a.$()}));K.o(0);break;case 4:E=K.l();if(!a.J)return K.return();m(E);K.j()}})}
|
|
1024
|
+
function $s(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(b.currentVideo!=null){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;f>0&&f<=100&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;f>0&&f<=100&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;f<1&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;f<1&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.m&&
|
|
1025
|
+
(b.clickThroughUrl?(a.m.setAttribute("ad-active","true"),a.m.style.pointerEvents=""):a.m.style.pointerEvents="none",b.background&&(a.m.style.background=b.background));a.G&&(a.G.style.background=b.overlay?"":"rgb(0, 0, 0)")}
|
|
1026
|
+
function Qs(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&b.currentVideo==null||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.m&&(a.m.removeAttribute("ad-active"),a.m.style.pointerEvents="",!b||b.background)&&(a.m.style.background="");a.G&&(a.G.style.background="")}
|
|
1027
|
+
function Ts(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q,R,ia,W,xa,ta,ra,ya,sa,Ea,ma;return G(function(Aa){switch(Aa.h){case 1:c=[];if(!b)return Aa.return(c);d=b.values.find(function(qa){return qa.key=="X-ASSET-URI"});e=b.values.find(function(qa){return qa.key=="X-ASSET-LIST"});if(!d&&!e)return Aa.return(c);f=null;if(g=b.values.find(function(qa){return qa.key=="ID"}))f=g.data;h=f==null?Math.floor(b.startTime*10)/10:b.startTime;(k=b.endTime)&&b.endTime!=Infinity&&typeof b.endTime==
|
|
1028
|
+
"number"&&(k=f==null?Math.floor(b.endTime*10)/10:b.endTime);l=b.values.find(function(qa){return qa.key=="X-RESTRICT"});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(u=b.values.find(function(qa){return qa.key=="X-ENABLE-SKIP-AFTER"}))v=u.data,r=parseFloat(v),isNaN(r)&&(r=m?0:null);w=null;if(y=b.values.find(function(qa){return qa.key=="X-ENABLE-SKIP-FOR"}))x=y.data,w=parseFloat(x),isNaN(r)&&(w=null);z=null;if(C=b.values.find(function(qa){return qa.key=="X-RESUME-OFFSET"}))H=
|
|
1029
|
+
C.data,z=parseFloat(H),isNaN(z)&&(z=null);D=null;if(A=b.values.find(function(qa){return qa.key=="X-PLAYOUT-LIMIT"}))B=A.data,D=parseFloat(B),isNaN(D)&&(D=null);K=E=I=!1;if(J=b.values.find(function(qa){return qa.key=="CUE"}))O=J.data,I=O.includes("ONCE"),E=O.includes("PRE"),K=O.includes("POST");P=!1;(M=b.values.find(function(qa){return qa.key=="X-TIMELINE-OCCUPIES"}))?(L=M.data,P=L.includes("RANGE")):!C&&a.C.U()&&(P=!E&&!K);if(d){Q=d.data;if(!Q)return Aa.return(c);c.push({id:f,groupId:null,startTime:h,
|
|
1030
|
+
endTime:k,uri:Q,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:z,playoutLimit:D,once:I,pre:E,post:K,timelineRange:P,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});Aa.A(2);break}if(!e){Aa.A(2);break}R=e.data;if(!R)return Aa.return(c);Aa.m(4);ia={type:11};return Aa.g(Ws(a,R,ia),6);case 6:W=Aa.i;xa=mc(W);ta=JSON.parse(xa);if(ra=ta["SKIP-CONTROL"])ya=ra["ENABLE-SKIP-AFTER"],typeof ya=="number"&&(r=parseFloat(ya),isNaN(ya)&&
|
|
1031
|
+
(r=m?0:null)),sa=ra["ENABLE-SKIP-FOR"],typeof sa=="number"&&(w=parseFloat(sa),isNaN(sa)&&(w=null));for(Ea=0;Ea<ta.ASSETS.length;Ea++)ma=ta.ASSETS[Ea],ma.URI&&c.push({id:f+"_shaka_asset_"+Ea,groupId:f,startTime:h,endTime:k,uri:ma.URI,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:z,playoutLimit:D,once:I,pre:E,post:K,timelineRange:P,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});Aa.o(2);break;case 4:Aa.l();case 2:return Aa.return(c)}})}
|
|
1032
|
+
function Ss(a){var b=[];if(!a)return b;var c=a.values.find(function(w){return w.key=="X-ASSET-URI"});if(!c)return b;c=c.data;if(!c)return b;var d=null,e=a.values.find(function(w){return w.key=="X-OVERLAY-ID"});e&&(d=e.data);e=d==null?Math.floor(a.startTime*10)/10:a.startTime;var f=a.endTime;a.endTime&&a.endTime!=Infinity&&typeof a.endTime=="number"&&(f=d==null?Math.floor(a.endTime*10)/10:a.endTime);var g=!1,h=!1,k=!1,l=a.values.find(function(w){return w.key=="CUE"});l&&(k=l.data,g=k.includes("ONCE"),
|
|
1033
|
+
h=k.includes("PRE"),k=k.includes("POST"));l=null;var m=a.values.find(function(w){return w.key=="X-ASSET-MIMETYPE"});m&&(l=m.data);m=!1;var n=a.values.find(function(w){return w.key=="X-LOOP"});n&&(m=n.data=="YES");n=1;var q=a.values.find(function(w){return w.key=="X-DEPTH"});q&&(n=parseFloat(q.data),isNaN(n)&&(n=1));q=null;var r=a.values.find(function(w){return w.key=="X-BACKGROUND"});r&&(q=r.data);r=1920;var u=1080,v=a.values.find(function(w){return w.key=="X-VIEWPORT"});if(v){u=v.data.split("x");
|
|
1034
|
+
if(u.length!=2)return b;r=parseFloat(u[0]);u=parseFloat(u[1])}r={viewport:{x:r,y:u},topLeft:{x:0,y:0},size:{x:r,y:u}};if(u=a.values.find(function(w){return w.key=="X-OVERLAY-POSITION"})){u=u.data.split("x");if(u.length!=2)return b;r.topLeft.x=parseFloat(u[0]);r.topLeft.y=parseFloat(u[1])}if(u=a.values.find(function(w){return w.key=="X-OVERLAY-SIZE"})){u=u.data.split("x");if(u.length!=2)return b;r.size.x=parseFloat(u[0]);r.size.y=parseFloat(u[1])}u=null;if(v=a.values.find(function(w){return w.key==
|
|
1035
|
+
"X-SQUEEZECURRENT"}))if(u=parseFloat(v.data),isNaN(u)&&(u=1),u={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*u,y:1080*u}},a=a.values.find(function(w){return w.key=="X-SQUEEZECURRENT-POSITION"})){a=a.data.split("x");if(a.length!=2)return b;u.topLeft.x=parseFloat(a[0]);u.topLeft.y=parseFloat(a[1])}b.push({id:d,groupId:null,startTime:e,endTime:f,uri:c,mimeType:l,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:g,pre:h,post:k,timelineRange:!0,
|
|
1036
|
+
loop:m,overlay:r,displayOnBackground:n==-1,currentVideo:u,background:q,clickThroughUrl:null});return b}
|
|
1037
|
+
function Ms(a){for(var b=[],c=t(a.H),d=c.next(),e={};!d.done;e={Cc:void 0},d=c.next())d=d.value,d.overlay||(e.Cc={start:d.startTime,end:null},d.pre?(e.Cc.start=0,e.Cc.end=null):d.post?(e.Cc.start=-1,e.Cc.end=null):d.timelineRange&&(e.Cc.end=d.endTime),b.find(function(f){return function(g){return f.Cc.start==g.start&&f.Cc.end==g.end}}(e))||b.push(e.Cc));Zs(a,"ad-cue-points-changed",(new Map).set("cuepoints",b))}
|
|
1038
|
+
function Fs(a){a.i.configure(a.C.gi());a.i.configure("ads.disableHLSInterstitial",!0);a.i.configure("ads.disableDASHInterstitial",!0);a.i.configure("playRangeEnd",Infinity);Vg(a.C.Yb(),a.i.Yb())}function Ws(a,b,c){var d,e,f;return G(function(g){if(g.h==1)return d=Wg([b],Cg()),e=a.C.Yb().request(7,d,c),g.g(e.promise,2);f=g.i;return g.return(f.data)})}function Is(a){return(a=a.mimeType)?!a.startsWith("image/")&&a!=="text/html":!0}
|
|
1039
|
+
function Ps(){var a=nb().Oa();return a=="TV"||a=="CONSOLE"||a=="CAST"?!0:!1}function Js(a,b){if(!(a.K.has(b)||a.M&&!a.M.allowPreloadOnDomElements)){var c=function(f){var g=document.createElement("link");g.rel="preload";g.href=f;g.as="image";document.head.appendChild(g);return g},d=[];if(b.background){var e=b.background.match(/url\(('|")?([^'"()]+)('|")\)?/);e&&d.push(c(e[2]))}b.mimeType&&b.mimeType.startsWith("image/")&&d.push(c(b.uri));a.K.set(b,d)}}
|
|
1040
|
+
function Ks(a,b){if(a.K.has(b)){var c=a.K.get(b);c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.parentNode.removeChild(d);a.K.delete(b)}}function Zs(a,b,c){a.va(new T(b,c))};function at(a,b,c,d,e){this.h=a;this.j=rd(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}p=at.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.h.durationInSeconds};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
|
|
1041
|
+
p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return typeof this.j=="number"?!0:!1};p.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};p.canSkipNow=function(){return this.getTimeUntilSkippable()==0};p.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};
|
|
1042
|
+
p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.o};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.l?this.l:1};p.getPositionInSequence=function(){return this.i?this.i:1};p.getTitle=function(){return this.h.adTitle};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};
|
|
1043
|
+
p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return this.h.vastAdId||""};p.getAdId=function(){return this.h.adId};p.getCreativeAdId=function(){return this.h.creativeId};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.l=this.i=this.g=this.h=null};N("shaka.ads.MediaTailorAd",at);at.prototype.release=at.prototype.release;at.prototype.getPodIndex=at.prototype.getPodIndex;
|
|
1044
|
+
at.prototype.getTimeOffset=at.prototype.getTimeOffset;at.prototype.getMediaUrl=at.prototype.getMediaUrl;at.prototype.getAdvertiserName=at.prototype.getAdvertiserName;at.prototype.getCreativeAdId=at.prototype.getCreativeAdId;at.prototype.getAdId=at.prototype.getAdId;at.prototype.getVastAdId=at.prototype.getVastAdId;at.prototype.getVastMediaWidth=at.prototype.getVastMediaWidth;at.prototype.getVastMediaHeight=at.prototype.getVastMediaHeight;at.prototype.getVastMediaBitrate=at.prototype.getVastMediaBitrate;
|
|
1045
|
+
at.prototype.getDescription=at.prototype.getDescription;at.prototype.getTitle=at.prototype.getTitle;at.prototype.getPositionInSequence=at.prototype.getPositionInSequence;at.prototype.getSequenceLength=at.prototype.getSequenceLength;at.prototype.setMuted=at.prototype.setMuted;at.prototype.resize=at.prototype.resize;at.prototype.isLinear=at.prototype.isLinear;at.prototype.isMuted=at.prototype.isMuted;at.prototype.setVolume=at.prototype.setVolume;at.prototype.getVolume=at.prototype.getVolume;
|
|
1046
|
+
at.prototype.play=at.prototype.play;at.prototype.pause=at.prototype.pause;at.prototype.skip=at.prototype.skip;at.prototype.canSkipNow=at.prototype.canSkipNow;at.prototype.getTimeUntilSkippable=at.prototype.getTimeUntilSkippable;at.prototype.isSkippable=at.prototype.isSkippable;at.prototype.isPaused=at.prototype.isPaused;at.prototype.getRemainingTime=at.prototype.getRemainingTime;at.prototype.getMinSuggestedDuration=at.prototype.getMinSuggestedDuration;at.prototype.getDuration=at.prototype.getDuration;
|
|
1047
|
+
at.prototype.isUsingAnotherMediaElement=at.prototype.isUsingAnotherMediaElement;at.prototype.hasCustomClick=at.prototype.hasCustomClick;at.prototype.isClientRendering=at.prototype.isClientRendering;at.prototype.needsSkipUI=at.prototype.needsSkipUI;function bt(a,b,c,d){this.C=a;this.K=b;this.h=c;this.l=null;this.R=NaN;this.i=d;this.J=!1;this.B=null;this.j=[];this.N=[];this.M=this.D=this.g=null;this.G=new Map;this.m=[];this.u=[];this.H="";this.O=!0;this.I="";this.o=new gb}bt.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Ma(b.target,b.type,b.listener);ct(this);this.m=[];this.u=[];this.H="";this.O=!0;this.I="";this.B=null;this.j=[];this.N=[];this.G.clear()};
|
|
1048
|
+
bt.prototype.release=function(){this.stop();this.o&&this.o.release()};bt.prototype.onManifestUpdated=function(a){this.J=a;this.H!=""&&(dt(this,this.H,this.O),this.O=!1)};bt.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
1049
|
+
function et(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;G(function(v){if(v.h==1)return d={type:7},e=Wg([b],Cg()),e.method="POST",c&&(f=JSON.stringify(c),e.body=rc(f)),g=a.K.request(7,e,d),v.m(2),v.g(g.promise,4);if(v.h!=2){h=v.i;k=mc(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new zb(b),n=new zb(l.trackingUrl),a.H=m.resolve(n).toString(),q=Date.now()/1E3,r=q-a.R,a.i(new T("ads-loaded",(new Map).set("loadTime",r))),u=new zb(l.manifestUrl),a.l.resolve(m.resolve(u).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
1050
|
+
return v.o(0)}v.l();if(!a.I.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,v.return();a.l.resolve(a.I);a.l=null;v.j()})}
|
|
1051
|
+
function dt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x;G(function(z){if(z.h==1)return d={type:8},e=Wg([b],Cg()),f=a.K.request(7,e,d),z.m(2),z.g(f.promise,4);if(z.h!=2){g=z.i;h=[];k=mc(g.data);l=JSON.parse(k);if(l.avails.length>0){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=t(a.j);for(n=m.next();!n.done;n=m.next())for(q=n.value,r=t(q.nonLinearAdsList),u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v.nonLinearAdList),y=w.next();!y.done;y=w.next())x=y.value,ft(a,x);h=a.getCuePoints();
|
|
1052
|
+
a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h))),ct(a),a.j=[];c&&(a.J||h.length>0)&>(a);return z.o(0)}z.l();z.j()})}
|
|
1053
|
+
function ft(a,b){var c,d,e,f,g,h,k,l,m;G(function(n){if(n.h==1){if(!b.staticResource)return n.return();c=ht(b);if(d=a.G.get(c))return n.return();e={type:9};f=Wg([b.staticResource],Cg());g=a.K.request(7,f,e);n.m(2);a.G.set(c,[]);return n.g(g.promise,4)}if(n.h!=2)return h=n.i,k=mc(h.data),l=JSON.parse(k),m=l.apps,a.G.set(c,m),n.o(0);n.l();a.G.delete(c);n.j()})}
|
|
1054
|
+
function ht(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function gt(a){it(a);a.J||(jt(a),a.o.F(a.h,"seeked",function(){jt(a)}),a.o.F(a.h,"ended",function(){ct(a)}));a.o.F(a.h,"timeupdate",function(){it(a)})}
|
|
1055
|
+
function jt(a){var b=a.h.currentTime;if(b!=0&&a.B==null){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.B=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
1056
|
+
function it(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.D,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),kt(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),kt(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),kt(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
1057
|
+
e=a.g.getDuration();a.g.canSkipNow()&&d>0&&e>0&&kt(a,"skipStateChanged");e>0&&(d<=0||d>e)&&ct(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}ct(a);a.M=e;a.g=new at(g,f+1,e.ads.length,!0,a.h);a.D=g;f===0&&kt(a,"breakStart");lt(a);break}}}if(!a.g)for(d=
|
|
1058
|
+
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.G.get(ht(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){ct(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
1059
|
+
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.C.appendChild(m)}a.M=e;a.g=new at(g,f+1,e.ads.length,!1,a.h);a.D=g;f===0&&kt(a,"breakStart");lt(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.B&&a.B>b&&(a.h.currentTime=a.B),a.B=null)}}}
|
|
1060
|
+
function ct(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.J||a.N.push(a.D.adId);var b=a.g.m;(b===void 0?0:b)?kt(a,"skip"):kt(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Ma(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&kt(a,"breakEnd");a.g=null;a.D=null;a.M=null}}
|
|
1061
|
+
function lt(a){var b=!1;a.h.paused?b=!0:(kt(a,"impression"),kt(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&kt(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||kt(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(kt(a,"impression"),kt(a,"start"),b=!1):kt(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){kt(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.F(d.target,
|
|
1062
|
+
d.type,d.listener)}
|
|
1063
|
+
function kt(a,b){var c=a.D.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=t(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&e!=""&&(e=Wg([e],Cg()),e.method="POST",a.K.request(7,e,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
|
|
1064
|
+
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "skip":a.i(new T("ad-skipped"));a.i(new T("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active");
|
|
1065
|
+
break;case "skipStateChanged":a.i(new T("ad-skip-state-changed"))}};function mt(a,b){this.g=a;this.i=null;this.h=b}p=mt.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()};
|
|
1066
|
+
p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.getTimeUntilSkippable()==0};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){};
|
|
1067
|
+
p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return a==null?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
1068
|
+
p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return a==null?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};N("shaka.ads.ServerSideAd",mt);
|
|
1069
|
+
mt.prototype.release=mt.prototype.release;mt.prototype.getPodIndex=mt.prototype.getPodIndex;mt.prototype.getTimeOffset=mt.prototype.getTimeOffset;mt.prototype.getMediaUrl=mt.prototype.getMediaUrl;mt.prototype.getAdvertiserName=mt.prototype.getAdvertiserName;mt.prototype.getCreativeAdId=mt.prototype.getCreativeAdId;mt.prototype.getAdId=mt.prototype.getAdId;mt.prototype.getVastAdId=mt.prototype.getVastAdId;mt.prototype.getVastMediaWidth=mt.prototype.getVastMediaWidth;
|
|
1070
|
+
mt.prototype.getVastMediaHeight=mt.prototype.getVastMediaHeight;mt.prototype.getVastMediaBitrate=mt.prototype.getVastMediaBitrate;mt.prototype.getDescription=mt.prototype.getDescription;mt.prototype.getTitle=mt.prototype.getTitle;mt.prototype.getPositionInSequence=mt.prototype.getPositionInSequence;mt.prototype.getSequenceLength=mt.prototype.getSequenceLength;mt.prototype.setMuted=mt.prototype.setMuted;mt.prototype.resize=mt.prototype.resize;mt.prototype.isLinear=mt.prototype.isLinear;
|
|
1071
|
+
mt.prototype.isMuted=mt.prototype.isMuted;mt.prototype.setVolume=mt.prototype.setVolume;mt.prototype.getVolume=mt.prototype.getVolume;mt.prototype.play=mt.prototype.play;mt.prototype.pause=mt.prototype.pause;mt.prototype.skip=mt.prototype.skip;mt.prototype.canSkipNow=mt.prototype.canSkipNow;mt.prototype.getTimeUntilSkippable=mt.prototype.getTimeUntilSkippable;mt.prototype.isSkippable=mt.prototype.isSkippable;mt.prototype.isPaused=mt.prototype.isPaused;mt.prototype.getRemainingTime=mt.prototype.getRemainingTime;
|
|
1072
|
+
mt.prototype.getMinSuggestedDuration=mt.prototype.getMinSuggestedDuration;mt.prototype.getDuration=mt.prototype.getDuration;mt.prototype.isUsingAnotherMediaElement=mt.prototype.isUsingAnotherMediaElement;mt.prototype.hasCustomClick=mt.prototype.hasCustomClick;mt.prototype.isClientRendering=mt.prototype.isClientRendering;mt.prototype.needsSkipUI=mt.prototype.needsSkipUI;function nt(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.H=!1;this.B=this.m=this.o=null;this.C="";this.D=[];this.h=new gb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){ot(e,f)});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
|
|
1073
|
+
e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new mt(f,e.l);e.B&&(e.m.i=e.B);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
|
|
1074
|
+
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.B=f.getStreamData().adProgressData;e.m&&(e.m.i=e.B)});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))});
|
|
1075
|
+
this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
|
|
1076
|
+
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=nt.prototype;p.configure=function(){};p.stop=function(){this.C="";this.o=null;this.D=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.D};
|
|
1077
|
+
function ot(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.F(a.l,"seeked",function(){var c=a.l.currentTime;if(c!=0){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){Og.call(this);this.h=this.i=this.j=this.g=null;this.m=new ps;this.o=navigator.language;this.l=null}na(Y,Og);p=Y.prototype;p.setLocale=function(a){this.o=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Es(a,b,c,function(e){return pt(d,e)});this.g.configure(this.l)};
|
|
1078
|
+
p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new S(2,10,1E4);this.j&&this.j.release();this.j=new ws(a,b,this.o,c,function(e){return pt(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);Og.prototype.release.call(this)};
|
|
1079
|
+
p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new T("ad-stopped"));this.dispatchEvent(new T("ad-content-attach-requested"));this.m=new ps};p.requestClientSideAds=function(a){if(!this.j)throw new S(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.H=Date.now()/1E3;b.m.requestAds(a)};
|
|
1080
|
+
p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new S(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new bt(a,b,c,function(e){return pt(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new S(1,10,10005);var d=this.i;c=c===void 0?"":c;d.l?a=Promise.reject(new S(1,10,10004)):(d.l=new Eg,et(d,a,b),d.I=c||"",d.R=Date.now()/1E3,a=d.l);return a};
|
|
1081
|
+
p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new S(1,10,10005);var b=this.i;b.H=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new S(2,10,10002);this.h&&this.h.release();this.h=new nt(a,b,this.o,function(d){return pt(c,d)});this.h.configure(this.l)};
|
|
1082
|
+
p.requestServerSideStream=function(a,b){b=b===void 0?"":b;if(!this.h)throw new S(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.16.21";c=this.h;c.j?a=Promise.reject(new S(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
1083
|
+
(c.H=!0),c.j=new Eg,c.g.requestStream(a),c.C=b||"",c.G=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new S(1,10,10003);(a.mpt||a.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.mpt="Shaka Player";a.mpv="v4.16.21";this.h.g.replaceAdTagParameters(a)};
|
|
1084
|
+
p.getServerSideCuePoints=function(){ub("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:qs(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
1085
|
+
p.onDashTimedMetadata=function(a){this.h&&a.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&Rs(this.g,c))};
|
|
1086
|
+
p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if(d=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||d=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",d=c.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=t(c.eventNode.children),m=l.next();!m.done;m=
|
|
1087
|
+
l.next())if(m=m.value,m.tagName=="AlternativeMPD"){if(m=m.attributes.uri){k=m;break}}else if(m.tagName=="InsertPresentation"||m.tagName=="ReplacePresentation"){var n=m.attributes.uri||m.attributes.url;if(n){k=tc(n);(l=Md(m,"maxDuration",Sd))&&(g=l/c.timescale);(l=Md(m,"returnOffset",Sd))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&Us(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,
|
|
1088
|
+
pre:!1,post:!1,timelineRange:b&&!d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}])}}else(d=="urn:mpeg:dash:event:2012"||d=="urn:scte:dash:scte214-events")&&c.eventNode&&Id(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&Vs(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new S(1,10,10006);Us(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new S(1,10,10006);return this.g.addAdUrlInterstitial(a)};
|
|
1089
|
+
p.getInterstitialPlayer=function(){if(!this.g)throw new S(1,10,10006);return this.g.sd()};function pt(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}N("shaka.ads.AdManager",Y);Y.prototype.getInterstitialPlayer=Y.prototype.getInterstitialPlayer;Y.prototype.addAdUrlInterstitial=Y.prototype.addAdUrlInterstitial;
|
|
1090
|
+
Y.prototype.addCustomInterstitial=Y.prototype.addCustomInterstitial;Y.prototype.onDASHInterstitialMetadata=Y.prototype.onDASHInterstitialMetadata;Y.prototype.onHLSInterstitialMetadata=Y.prototype.onHLSInterstitialMetadata;Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
|
|
1091
|
+
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
|
|
1092
|
+
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.initInterstitial=Y.prototype.initInterstitial;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;
|
|
1093
|
+
Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";
|
|
1094
|
+
Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
|
|
1095
|
+
Y.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Y.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Y.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Mq=function(){return new Y};function qt(a){return JSON.stringify(a,function(b,c){if(typeof c!="function"){b=c instanceof T;if(c instanceof Event||b){var d={};for(f in c){var e=c[f];e&&typeof e=="object"?f=="detail"?d[f]=e:e instanceof Event||e instanceof T?d[f]={__type__:"Event",event:qt(e)}:b&&Array.isArray(e)&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())f.add(d.value);b={};f=
|
|
1096
|
+
t(f);for(d=f.next();!d.done;d=f.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof TimeRanges){f={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Ij(c));for(b=c.next();!b.done;b=c.next())b=b.value,d=b.end,f.start.push(b.start),f.end.push(d);c=f}else c=ArrayBuffer.isView(c)&&c.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(c)}:typeof c=="number"?isNaN(c)?"NaN":isFinite(c)?c:c<0?"-Infinity":"Infinity":c;return c}})}
|
|
1097
|
+
function rt(a){return JSON.parse(a,function(b,c){if(c=="NaN")var d=NaN;else if(c=="-Infinity")d=-Infinity;else if(c=="Infinity")d=Infinity;else if(c&&typeof c=="object"&&c.__type__=="TimeRanges")d=st(c);else if(c&&typeof c=="object"&&c.__type__=="Uint8Array")d=new Uint8Array(c.entries);else if(c&&typeof c=="object"&&c.__type__=="Error"){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c&&typeof c=="object"&&c.__type__=="Event"?rt(c.event):c;return d})}
|
|
1098
|
+
function st(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
1099
|
+
var tt="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ut="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),vt=["loop","playbackRate"],wt=["pause","play"],xt=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",
|
|
1100
|
+
4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1).set("getBandwidthEstimate",1).set("isRemotePlayback",1),yt=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",
|
|
1101
|
+
2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2),zt=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),At=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Bt=[["isTextTrackVisible","setTextTrackVisibility"]],Ct="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),
|
|
1102
|
+
Dt="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Et(a,b,c,d,e,f,g){var h=this;this.H=a;this.K=g;this.l=new of(b);this.M=c;this.u=!1;this.B=d;this.G=e;this.N=f;this.i=this.m=!1;this.J="";this.o=null;this.C=function(){return Ft(h)};this.D=function(k,l){k=rt(l);switch(k.type){case "event":var m=k.targetName,n=Mg(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(q=k.id,n=k.error,l=k.res,k=h.h.get(q),h.h.delete(q),k)if(n){q=new S(n.severity,
|
|
1103
|
+
n.category,n.code);for(m in n)q[m]=n[m];k.reject(q)}else k.resolve(l)}};this.g={video:{},player:{}};this.I=0;this.h=new Map;this.j=null;Gt.add(this)}p=Et.prototype;p.destroy=function(){Gt.delete(this);Ht(this);It&&Jt(this);this.l&&(this.l.stop(),this.l=null);this.G=this.B=null;this.i=this.m=!1;this.D=this.C=this.j=this.h=this.g=this.o=null;return Promise.resolve()};p.wb=function(){return this.i};p.ah=function(){return this.J};
|
|
1104
|
+
p.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Cb();var a=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Gt),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Eg;d.u=!0;Kt(d,e)}},function(b){for(var c=t(Gt),d=c.next();!d.done;d=c.next())d=d.value,Lt=b=="available",d.l.Cb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Lt&&this.l.ka(Mt);(a=It)&&
|
|
1105
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Eg,this.u=!0,Kt(this,a)):It=null}else window.__onGCastApiAvailable!==Nt&&(Ot=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Nt)};p.oh=function(a){this.o=a;this.i&&Pt(this,{type:"appData",appData:this.o})};
|
|
1106
|
+
p.cast=function(){var a=this;return G(function(b){if(!a.m)throw new S(1,8,8E3);if(!Lt)throw new S(1,8,8001);if(a.i)throw new S(1,8,8002);a.j=new Eg;chrome.cast.requestSession(function(c){return Kt(a,c)},function(c){return Qt(a,c)});return b.g(a.j,0)})};function Rt(a){a.i&&chrome.cast.requestSession(function(b){return Kt(a,b)},function(b){return Qt(a,b)})}p.od=function(){if(this.i){Ht(this);if(It){Jt(this);try{It.stop(function(){},function(){})}catch(a){}It=null}Ft(this)}};
|
|
1107
|
+
p.get=function(a,b){var c=this;if(a=="video"){if(wt.includes(b))return function(){return c.Ii.apply(c,[a,b].concat(F(Ja.apply(0,arguments))))}}else if(a=="player"){if(zt.has(b)&&!this.get("player","isLive")())return function(){};if(Ct.includes(b))return function(){return c.Ii.apply(c,[a,b].concat(F(Ja.apply(0,arguments))))};if(Dt.includes(b))return function(){return c.Nk.apply(c,[a,b].concat(F(Ja.apply(0,arguments))))};if(xt.has(b)||yt.has(b))return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
1108
|
+
p.set=function(a,b,c){this.g[a][b]=c;Pt(this,{type:"set",targetName:a,property:b,value:c})};function Kt(a,b){var c=a.N();It=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Ft(a);Pt(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Qt(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new S(2,8,c,b))}
|
|
1109
|
+
p.Ii=function(a,b){Pt(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};p.Nk=function(a,b){var c=Ja.apply(2,arguments),d=new Eg,e=this.I.toString();this.I++;this.h.set(e,d);try{Pt(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Jt(a){var b=It;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
|
|
1110
|
+
function Ft(a){var b=It?It.status=="connected":!1;if(a.i&&!b){a.G();for(var c in a.g)a.g[c]={};Ht(a)}a.i=b;a.J=b?It.receiver.friendlyName:"";a.l.Cb()}function Ht(a){if(a.h)for(var b=t(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new S(1,7,7E3))}}
|
|
1111
|
+
function Pt(a,b){b=qt(b);var c=It;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Za)}catch(d){throw b=new S(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.B("player",c),a.od(),b;}}var Mt=.02,Lt=!1,It=null,Ot=null,Gt=new Set;function Nt(a){Ot?window.__onGCastApiAvailable=Ot:delete window.__onGCastApiAvailable;Ot=null;if(a)for(var b=t(Gt),c=b.next();!c.done;c=b.next())c.value.init();typeof window.__onGCastApiAvailable==="function"&&window.__onGCastApiAvailable(a)};function St(a,b,c,d){d=d===void 0?!1:d;Og.call(this);var e=this;this.i=a;this.h=b;this.l=this.o=this.m=this.u=this.j=null;this.I=c;this.H=d;this.D=[];this.C=[];this.B=[];this.G=new Map;this.g=null;window.chrome&&nb().Oa()!="CAST"?(this.g=new Et(c,function(){return Tt(e)},function(){return Ut(e)},function(f,g){return Vt(e,f,g)},function(){return Wt(e)},function(){return Xt(e)},d),Yt(this)):(this.j=this.i,this.u=this.h)}na(St,Og);p=St.prototype;
|
|
1112
|
+
p.destroy=function(a){this.g&&(a===void 0?0:a)&&this.g.od();this.l&&(this.l.release(),this.l=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.j=this.i=null;Og.prototype.release.call(this);return Promise.all(a)};p.dk=function(){return this.j};p.sd=function(){return this.u};p.pj=function(){return this.g?this.g.m&&Lt:!1};p.wb=function(){return this.g?this.g.wb():!1};p.ah=function(){return this.g?this.g.ah():""};
|
|
1113
|
+
p.cast=function(){var a=this;return G(function(b){return b.h==1?a.g?b.g(a.g.cast(),2):b.return():a.h?b.g(a.h.Dc(),0):b.return()})};p.oh=function(a){this.g&&this.g.oh(a)};p.fl=function(){this.g&&Rt(this.g)};p.od=function(){this.g&&this.g.od()};
|
|
1114
|
+
p.qj=function(a,b){b=b===void 0?!1:b;var c=this;return G(function(d){if(d.h==1){if(a==c.I&&b==c.H)return d.return();c.I=a;c.H=b;if(!c.g)return d.return();c.g.od();return d.g(c.g.destroy(),2)}c.g=null;c.g=new Et(a,function(){return Tt(c)},function(){return Ut(c)},function(e,f){return Vt(c,e,f)},function(){return Wt(c)},function(){return Xt(c)},b);c.g.init();d.j()})};
|
|
1115
|
+
function Yt(a){a.g.init();a.l=new gb;for(var b=t(tt),c=b.next();!c.done;c=b.next())a.l.F(a.i,c.value,function(f){a.g.wb()||(f=Mg(f),a.m.dispatchEvent(f))});for(var d in Ng)a.l.F(a.h,Ng[d],function(f){a.g.wb()||a.o.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={ge:b.ge},b.ge=e,Object.defineProperty(a.j,b.ge,{configurable:!1,enumerable:!0,get:function(f){return function(){return Zt(a,f.ge)}}(b),set:function(f){return function(g){var h=f.ge;a.g.wb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};$t(a,
|
|
1116
|
+
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return au(a,f)}})});bu(a);a.m=new Og;a.m.Ie=a.j;a.o=new Og;a.o.Ie=a.u;a.l.F(a.h,"unloading",function(){a.g&&a.g.wb()||cu(a)})}function bu(a){var b=new Map;$t(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.G.set(c,d):a.G.set(d,c)):b.set(d,c)})}
|
|
1117
|
+
function $t(a,b){function c(k){return k=="constructor"||typeof d[k]!="function"?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
1118
|
+
function Xt(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.pd(),startTime:null,addThumbnailsTrackCalls:a.D,addTextTrackAsyncCalls:a.C,addChaptersTrackCalls:a.B};a.i.pause();for(var c=t(vt),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(At);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Bt);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}
|
|
1119
|
+
function Tt(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}function Ut(a){var b=new T(a.j.paused?"pause":"play");a.m.dispatchEvent(b)}
|
|
1120
|
+
function Wt(a){for(var b=t(At),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.D,f=a.C,g=a.B;cu(a);var h=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var k=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var l;(d=a.g.get("player","getTextTracks")())&&d.length&&(l=d.find(function(q){return q.active}));var m=a.g.get("player","isTextTrackVisible")();h&&(a.i.autoplay=!1,b=a.h.load(h,c));var n={};c=t(vt);for(d=
|
|
1121
|
+
c.next();!d.done;d=c.next())d=d.value,n[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var q=t(e),r=q.next();!r.done;r=q.next()){r=r.value;var u;(u=a.sd()).Oe.apply(u,F(r))}q=t(f);for(u=q.next();!u.done;u=q.next()){u=u.value;var v;(v=a.sd()).Rd.apply(v,F(u))}v=t(g);for(q=v.next();!q.done;q=v.next()){q=q.value;var w;(w=a.sd()).Ne.apply(w,F(q))}w=t(vt);for(v=w.next();!v.done;v=w.next())v=v.value,a.i[v]=n[v];w=t(Bt);for(v=w.next();!v.done;v=w.next())q=v.value,v=q[1],q=a.g.get("player",q[0])(),a.h[v](q);
|
|
1122
|
+
a.h.rh(m);l&&a.h.mh(l.language,l.roles,l.forced);a.i.autoplay=k;h&&a.i.play()}},function(q){q=(new Map).set("detail",q);q=new T("error",q);a.h.dispatchEvent(q)})}
|
|
1123
|
+
function Zt(a,b){if(b=="addEventListener")return function(d,e,f){return a.m.addEventListener(d,e,f)};if(b=="removeEventListener")return function(d,e,f){return a.m.removeEventListener(d,e,f)};if(a.g.wb()&&Object.keys(a.g.g.video).length==0){var c=a.i[b];if(typeof c!="function")return c}return a.g.wb()?a.g.get("video",b):(b=a.i[b],typeof b=="function"&&(b=b.bind(a.i)),b)}
|
|
1124
|
+
function au(a,b,c){c=c===void 0?!1:c;a.G.has(b)&&(b=a.G.get(b));if(b=="addEventListener")return function(d,e,f){return a.o.addEventListener(d,e,f)};if(b=="removeEventListener")return function(d,e,f){return a.o.removeEventListener(d,e,f)};if(b=="getMediaElement")return function(){return a.j};if(b=="getSharedConfiguration")return a.g.get("player","getConfiguration");if(b=="getNetworkingEngine")return function(){return a.h.Yb()};if(b=="getDrmEngine")return function(){return a.h.D};if(b=="getAdManager")return function(){return a.h.ai()};
|
|
1125
|
+
if(b=="getQueueManager")return function(){return a.h.ji()};if(b=="setVideoContainer")return function(d){return a.h.Wi(d)};if(!c){if(b=="addThumbnailsTrack")return function(){var d=Ja.apply(0,arguments);a.D.push(d);return au(a,b,!0).apply(null,F(d))};if(b=="addTextTrackAsync")return function(){var d=Ja.apply(0,arguments);a.C.push(d);return au(a,b,!0).apply(null,F(d))};if(b=="addChaptersTrack")return function(){var d=Ja.apply(0,arguments);a.B.push(d);return au(a,b,!0).apply(null,F(d))}}if(a.g.wb()){if(b==
|
|
1126
|
+
"getManifest"||b=="drmInfo")return function(){Wa(b+"() does not work while casting!");return null};if(b=="attach"||b=="detach")return function(){Wa(b+"() does not work while casting!");return Promise.resolve()};if(b=="getChapters")return function(){Wa(b+"() does not work while casting!");return[]}}return a.g.wb()&&Object.keys(a.g.g.video).length==0&&(xt.has(b)||yt.has(b))||!a.g.wb()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
1127
|
+
function Vt(a,b,c){a.g.wb()&&(b=="video"?a.m.dispatchEvent(c):b=="player"&&(c.type=="unloading"&&cu(a),a.o.dispatchEvent(c)))}function cu(a){a.D=[];a.C=[];a.B=[]}N("shaka.cast.CastProxy",St);St.prototype.changeReceiverId=St.prototype.qj;St.prototype.forceDisconnect=St.prototype.od;St.prototype.suggestDisconnect=St.prototype.fl;St.prototype.setAppData=St.prototype.oh;St.prototype.cast=St.prototype.cast;St.prototype.receiverName=St.prototype.ah;St.prototype.isCasting=St.prototype.wb;
|
|
1128
|
+
St.prototype.canCast=St.prototype.pj;St.prototype.getPlayer=St.prototype.sd;St.prototype.getVideo=St.prototype.dk;St.prototype.destroy=St.prototype.destroy;function du(a,b,c,d){Og.call(this);var e=this;this.h=a;this.g=b;this.j=new gb;this.I={video:a,player:b};this.G=c||function(){};this.J=d||function(f){return f};this.i=null;this.H=!1;this.o=!0;this.m=0;this.C=!1;this.B=!0;this.u=this.l=null;this.D=new of(function(){eu(e)});fu(this)}na(du,Og);p=du.prototype;p.isConnected=function(){return this.H};p.kk=function(){return this.o};p.Zk=function(a){this.i=a};p.uj=function(){this.i=null};
|
|
1129
|
+
p.$k=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.Yk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.Xk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
1130
|
+
p.destroy=function(){var a=this,b,c;return G(function(d){if(d.h==1)return a.j&&(a.j.release(),a.j=null),b=[],a.g&&(b.push(a.g.destroy()),a.g=null),a.D&&(a.D.stop(),a.D=null),a.h=null,a.I=null,a.G=null,a.H=!1,a.o=!0,a.l=null,a.u=null,Og.prototype.release.call(a),d.g(Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();d.j()})};
|
|
1131
|
+
function fu(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return gu(a)};b.onSenderDisconnected=function(){return gu(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&hu(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);hu(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return iu(a,
|
|
1132
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return ju(a,e)};b.start();b=t(tt);for(var c=b.next();!c.done;c=b.next())a.j.F(a.h,c.value,function(e){return ku(a,"video",e)});for(var d in Ng)a.j.F(a.g,Ng[d],function(e){return ku(a,"player",e)});a.j.F(a.h,"loadeddata",function(){a.C=!0});a.j.F(a.g,"loading",function(){a.o=!1;lu(a)});a.j.F(a.h,"playing",function(){a.o=!1;lu(a)});a.j.F(a.h,"pause",function(){lu(a)});a.j.F(a.g,"unloading",function(){a.o=!0;lu(a)});
|
|
1133
|
+
a.j.F(a.h,"ended",function(){(new of(function(){a.h&&a.h.ended&&(a.o=!0,lu(a))})).ka(mu)})}function gu(a){a.m=0;a.B=!0;a.H=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0;lu(a)}function lu(a){var b;G(function(c){if(c.h==1)return c.g(Promise.resolve(),2);if(!a.g)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);nu(a)||ou(a);c.j()})}
|
|
1134
|
+
function pu(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H;G(function(D){switch(D.h){case 1:for(d in b.player)e=b.player[d],a.g[d](e);a.G(c);f=a.h.autoplay;return b.manifest?(a.h.autoplay=!1,D.m(5),D.g(a.g.load(b.manifest,b.startTime),7)):D.g(Promise.resolve(),3);case 7:if(b.addThumbnailsTrackCalls)for(g=t(b.addThumbnailsTrackCalls),h=g.next();!h.done;h=g.next())k=h.value,a.g.Oe.apply(a.g,F(k));if(b.addTextTrackAsyncCalls)for(l=t(b.addTextTrackAsyncCalls),m=l.next();!m.done;m=l.next())n=m.value,
|
|
1135
|
+
a.g.Rd.apply(a.g,F(n));if(b.addChaptersTrackCalls)for(q=t(b.addChaptersTrackCalls),r=q.next();!r.done;r=q.next())u=r.value,a.g.Ne.apply(a.g,F(u));D.o(3);break;case 5:return v=D.l(),w=(new Map).set("detail",v),y=new T("error",w),a.g&&a.g.dispatchEvent(y),D.return();case 3:if(!a.g)return D.return();for(x in b.video)z=b.video[x],a.h[x]=z;for(C in b.playerAfterLoad)H=b.playerAfterLoad[C],a.g[C](H);a.h.autoplay=f;b.manifest&&(a.h.play(),ou(a));D.j()}})}
|
|
1136
|
+
function ku(a,b,c){a.g&&(eu(a),hu(a,{type:"event",targetName:b,event:c},a.l))}
|
|
1137
|
+
function eu(a){a.D.ka(qu);for(var b={video:{},player:{}},c=t(ut),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.h[d];a.g.U()&&zt.forEach(function(e,f){a.m%e==0&&(b.player[f]=a.g[f]())});xt.forEach(function(e,f){a.m%e==0&&(b.player[f]=a.g[f]())});if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;hu(a,{type:"update",update:b},a.l);yt.forEach(function(e,f){a.m%e==0&&(e={player:{}},e.player[f]=a.g[f](),hu(a,{type:"update",update:e},
|
|
1138
|
+
a.l))});a.C&&(a.m+=1);nu(a)}function nu(a){return a.B&&(a.h.duration||a.g.U())?(ru(a),a.B=!1,!0):!1}function ru(a,b){var c={contentId:a.g.pd(),streamType:a.g.U()?"LIVE":"BUFFERED",contentType:""};a.g.U()||(c.duration=a.h.duration);a.i&&(c.metadata=a.i);ou(a,b===void 0?0:b,c)}
|
|
1139
|
+
function ju(a,b){var c=rt(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.B=!0;pu(a,c.initState,c.appData);eu(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if(d=="video")if(b=cast.receiver.CastReceiverManager.getInstance(),e=="volume"){b.setSystemVolumeLevel(c);break}else if(e=="muted"){b.setSystemVolumeMuted(c);break}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
1140
|
+
d=="player"&&e=="load"&&(a.m=0,a.C=!1);var f=c.id,g=b.senderId;b=a.I[d];c=b[e].apply(b,c.args);d=="player"&&e=="load"&&(c=c.then(function(){a.B=!0}));c.then(function(h){return su(a,g,f,null,h)},function(h){return su(a,g,f,h,null)})}}
|
|
1141
|
+
function iu(a,b){var c=rt(b.data);switch(c.type){case "PLAY":a.h.play();ou(a);break;case "PAUSE":a.h.pause();ou(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;b!=null&&(a.h.currentTime=Number(b));d&&d=="PLAYBACK_START"?(a.h.play(),ou(a)):d&&d=="PLAYBACK_PAUSE"&&(a.h.pause(),ou(a));break;case "STOP":a.g.Dc().then(function(){a.g&&ou(a)});break;case "GET_STATUS":ru(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.h.volume,f=a.h.muted;b!=null&&(a.h.volume=Number(b));
|
|
1142
|
+
d!=null&&(a.h.muted=d);e==a.h.volume&&f==a.h.muted||ou(a);break;case "LOAD":a.m=0;a.C=!1;a.B=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.h.autoplay=!0);a.g.load(e,d).then(function(){a.g&&ru(a)}).catch(function(g){var h="LOAD_FAILED";g.category==7&&g.code==7E3&&(h="LOAD_CANCELLED");hu(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:hu(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
1143
|
+
function su(a,b,c,d,e){a.g&&hu(a,{type:"asyncComplete",id:c,error:d,res:e},a.l,b)}function hu(a,b,c,d){a.H&&(a=qt(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function ou(a,b,c){c=c===void 0?null:c;var d={mediaSessionId:0,playbackRate:a.h.playbackRate,playerState:a.o?tu:a.g.Og()?uu:a.h.paused?vu:wu,currentTime:a.h.currentTime,supportedMediaCommands:63,volume:{level:a.h.volume,muted:a.h.muted}};c&&(d.media=c);hu(a,{requestId:b===void 0?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
1144
|
+
N("shaka.cast.CastReceiver",du);du.prototype.destroy=du.prototype.destroy;du.prototype.setContentArtist=du.prototype.Xk;du.prototype.setContentImage=du.prototype.Yk;du.prototype.setContentTitle=du.prototype.$k;du.prototype.clearContentMetadata=du.prototype.uj;du.prototype.setContentMetadata=du.prototype.Zk;du.prototype.isIdle=du.prototype.kk;du.prototype.isConnected=du.prototype.isConnected;var qu=.5,mu=5,tu="IDLE",wu="PLAYING",uu="BUFFERING",vu="PAUSED";function xu(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(C){return C!=null&&C.g.trim()!=""})){f=h;break}for(h=c.length-1;h>=0;h--)if(c[h].some(function(C){return C!=null&&C.g.trim()!=""})){g=h;break}if(f===-1||g===-1)return null;for(var k=h=!1,l="white",m="black",n=yu(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,u=-1,v=0;v<q.length;v++)if(q[v]!=null&&q[v].g.trim()!==""){r=v;break}for(v=q.length-1;v>=0;v--)if(q[v]!=null&&q[v].g.trim()!==""){u=v;break}if(r===
|
|
1145
|
+
-1||u===-1)q=zu(d,e),a.nestedCues.push(q);else{for(;r<=u;r++)if(v=q[r]){var w=v.l,y=v.i,x=v.j,z=v.h;if(w!=h||y!=k||x!=l||z!=m)n.payload&&a.nestedCues.push(n),n=yu(d,e,w,y,x,z),h=w,k=y,l=x,m=z;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=zu(d,e),a.nestedCues.push(n));n=yu(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function yu(a,b,c,d,e,f){a=new de(a,b,"");c&&a.textDecoration.push(Be);d&&(a.fontStyle=Ae);a.color=e;a.backgroundColor=f;return a}
|
|
1146
|
+
function zu(a,b){a=new de(a,b,"");a.lineBreak=!0;return a}function Au(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Bu(a,b){this.i=[];this.g=1;this.h=0;this.D=a;this.C=b;this.j=this.m=!1;this.l="white";this.o="black";this.u=this.B=null;Cu(this)}function Du(a,b,c){var d="CC"+((a.D<<1|a.C)+1),e=new de(b,c,"");e.lineInterpretation=1;var f=Eu.get(a.g);f&&(e.line=f);a.u!=null&&a.B!=null&&(e.position=10+Math.min(70,a.u*10)+a.B*2.5);(b=xu(e,d,a.i,b,c))&&a.g+b.cue.nestedCues.length-3>15&&(f=Eu.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Cu(a){Fu(a,0,15);a.g=1}
|
|
1147
|
+
function Gu(a,b,c){if(!(c<32||c>127)){var d="";switch(b){case 0:d=Hu.has(c)?Hu.get(c):String.fromCharCode(c);break;case 1:d=Iu.get(c);break;case 2:a.i[a.g].pop();d=Ju.get(c);break;case 3:a.i[a.g].pop(),d=Ku.get(c)}d&&a.i[a.g].push(new Au(d,a.m,a.j,a.o,a.l))}}function Lu(a,b,c,d){if(!(c<0||b<0))if(b>=c)for(--d;d>=0;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Fu(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
1148
|
+
var Hu=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Iu=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Ju=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
|
|
1149
|
+
[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Ku=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
|
|
1150
|
+
[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Eu=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Mu(a,b){this.h=0;this.o=new Bu(a,b);this.i=new Bu(a,b);this.g=this.j=new Bu(a,b);this.l=0;this.m=null}function Nu(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==3&&a.h!==4&&(e=Du(d,a.l,c),c=a.i,c.g=c.h>0?c.h:0,Fu(c,0,15),c=a.j,c.g=c.h>0?c.h:0,Fu(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Ou(a){a.h=1;a.g=a.j;a.g.h=0}function Pu(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var Qu="black green blue cyan red yellow magenta black".split(" "),Ru="white green blue cyan red yellow magenta white_italics".split(" ");function Su(a,b){this.J=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.H=this.M=this.I=0;this.G=2;this.i=[];this.g=this.h=this.j=0;this.D=this.B=!1;this.C="white";this.u="black";Tu(this)}function Tu(a){a.i=[];for(var b=0;b<16;b++)a.i.push(Uu())}function Uu(){for(var a=[],b=0;b<42;b++)a.push(null);return a}function Vu(a,b){Wu(a)&&(a.i[a.h][a.g]=new Au(b,a.D,a.B,a.u,a.C),a.g++)}function Wu(a){var b=a.g<a.m&&a.g>=0;return a.h<a.o&&a.h>=0&&b}Su.prototype.isVisible=function(){return this.l};
|
|
1151
|
+
function Xu(a){for(var b=0,c=1;c<16;c++,b++)a.i[b]=a.i[c];for(c=0;c<1;c++,b++)a.i[b]=Uu()}
|
|
1152
|
+
function Yu(a,b,c){var d=new de(a.j,b,"");d.textAlign=a.G===0?"left":a.G===1?"right":fe;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.I;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.K?fd:2;switch(a.H){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
|
|
1153
|
+
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=xu(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Su.prototype.display=function(){this.l=!0};function Zu(){this.i=[];this.h=null;this.g=0}function $u(a,b){b.type===3?(a.g=(b.value&63)*2-1,a.h=[]):a.h&&(a.g>0&&(a.h.push(b),a.g--),a.g===0&&(a.i.push(new av(a.h)),a.h=null,a.g=0))}function av(a){this.g=0;this.h=a}av.prototype.Ka=function(){return this.g<this.h.length};av.prototype.Pa=function(){return this.g};function bv(a){if(!a.Ka())throw new S(2,2,3E3);return a.h[a.g++]}av.prototype.skip=function(a){if(this.g+a>this.h.length)throw new S(2,2,3E3);this.g+=a};
|
|
1154
|
+
av.prototype.Mi=function(a){if(this.g-a<0)throw new S(2,2,3E3);this.g-=a};function cv(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
1155
|
+
function dv(a,b,c,d){if(!a.g)return[];if(c==24)return c=bv(b).value,d=bv(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),Vu(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!Wu(b)||b.g<=0&&b.h<=0||(b.g<=0?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=Yu(b,d,a.i));b.h+1>=b.o?Xu(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=Yu(b,d,a.i));b.i[b.h]=Uu();b.g=0;break;case 12:b.isVisible()&&
|
|
1156
|
+
(e=Yu(b,d,a.i)),Tu(b),b.h=0,b.g=0}return e?[e]:[]}
|
|
1157
|
+
function ev(a,b,c,d){if(c>=128&&c<=135)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(c===136){c=bv(b).value;b=[];c=t(fv(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=Yu(e,d,a.i);f&&b.push(f)}Tu(e)}return b}if(c===137)for(b=bv(b).value,b=t(fv(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(c===138){c=bv(b).value;b=null;c=t(fv(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Yu(e,d,a.i)),e.l=!1;return b?
|
|
1158
|
+
[b]:[]}if(c===139){c=bv(b).value;b=null;c=t(fv(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Yu(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(c===140)return b=bv(b).value,gv(a,b,d);if(c===143)return d=gv(a,255,d),hv(a),d;if(c===144)b.skip(1),d=bv(b).value,a.g&&(a.g.B=(d&128)>0,a.g.D=(d&64)>0);else if(c===145)d=bv(b).value,c=bv(b).value,b.skip(1),a.g&&(b=iv((c&48)>>4,(c&12)>>2,c&3),a.g.C=iv((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(c===146)d=bv(b).value,b=bv(b).value,a.g&&(a=
|
|
1159
|
+
a.g,a.h=d&15,a.g=b&63);else if(c===151)b.skip(1),b.skip(1),d=bv(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(c>=152&&c<=159){c=(c&15)-8;e=a.h[c]!==null;e||(f=new Su(c,a.i),f.j=d,a.h[c]=f);d=bv(b).value;f=bv(b).value;var g=bv(b).value,h=bv(b).value,k=bv(b).value;b=bv(b).value;e&&(b&7)===0||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.B=!1,b.C="white",b.u="black");b=a.h[c];b.l=(d&32)>0;b.M=f&127;b.I=g;b.H=(h&240)>>4;b.K=(f&128)>0;b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
|
|
1160
|
+
function fv(a,b){for(var c=[],d=0;d<8;d++)(b&1)===1&&a.h[d]&&c.push(d),b>>=1;return c}function gv(a,b,c){var d=[];b=t(fv(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=Yu(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function hv(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function iv(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return jv[a<<2|b<<1|c]}
|
|
1161
|
+
var kv=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),jv="black blue green cyan red magenta yellow white".split(" ");function lv(){this.h=[];this.g=[];this.i=new Zu;this.l=0;this.m=new Map([["CC1",new Mu(0,0)],["CC2",new Mu(0,1)],["CC3",new Mu(1,0)],["CC4",new Mu(1,1)]]);this.u=this.o=0;this.j=new Map;this.C=!0;this.B=new Set;mv(this)}lv.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;mv(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())hv(b.value)};
|
|
1162
|
+
function mv(a){a.o=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Cu(c.i),Cu(c.j),Cu(c.o);a.C=!0}
|
|
1163
|
+
lv.prototype.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new jh(a,0);if(!(a.getLength()<8)&&a.Z()===181&&a.Ca()===49&&a.W()===1195456820&&a.Z()===3&&(c=a.Z(),(c&64)!==0))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.Z(),f=(e&4)>>2,g=a.Z(),h=a.Z();f&&(e&=3,e===0||e===1?this.h.push({pts:b,type:e,Eb:g,mc:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
1164
|
+
lv.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=nv(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())$u(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=ov(this,d.value),b.push.apply(b,F(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
1165
|
+
function nv(a,b){var c=b.type;if((b.Eb&112)===16){var d=b.Eb>>3&1;c===0?a.o=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.o))+1);c=a.m.get(d);if(b.Eb===255&&b.mc===255||!b.Eb&&!b.mc||!pv(b.Eb)||!pv(b.mc))return++a.l>=45&&mv(a),null;a.l=0;b.Eb&=127;b.mc&=127;var e=b.Eb;if(e>=1&&e<=15||!b.Eb&&!b.mc)return null;e=null;if((b.Eb&112)===16)a:{a.B.add(d),d=b.Eb;a=b.mc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,(d&240)===16&&(a&192)===64){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
|
|
1166
|
+
null;var g=a>95?a-96:a-64;g<=13?d=Ru[Math.floor(g/2)]:g<=15?e=!0:f=Math.floor((g-16)/2);a=(a&1)===1;c.h!==4&&(g=c.g,c.h===3&&b!==g.g&&(c=1+b-g.h,Lu(g,c,1+g.g-g.h,g.h),Fu(g,0,c-1),Fu(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.o="black")}else if((d&247)===17&&(a&240)===32)c.g.m=!1,c.g.j=!1,c.g.l="white",Gu(c.g,0,32),d=!1,b=Ru[(a&14)>>1],b==="white_italics"&&(b="white",d=!0),c.g.m=(a&1)===1,c.g.j=d,c.g.l=b;else if((d&247)===16&&(a&240)===32||(d&247)===23&&(a&255)===45)b="black",(d&7)===0&&(b=Qu[(a&
|
|
1167
|
+
14)>>1]),c.g.o=b;else if((d&247)===17&&(a&240)===48)Gu(c.g,1,a);else if((d&246)===18&&(a&224)===32)Gu(c.g,d&1?3:2,a);else{if((d&246)===20&&(a&240)===32){a=b.pts;d=null;switch(b.mc){case 32:Ou(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Nu(c,2,a);break;case 38:d=Nu(c,3,a);break;case 39:d=Nu(c,4,a);break;case 40:Gu(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Cu(c.o);Pu(c);break;case 43:Pu(c);break;case 44:b=c.i;d=null;c.h!==4&&(d=Du(b,c.l,a));Fu(b,0,15);break;case 45:b=
|
|
1168
|
+
c.g;c.h!==3?d=null:(d=Du(b,c.l,a),e=b.g-b.h+1,Lu(b,e-1,e,b.h),Fu(b,0,e-1),Fu(b,b.g,15-b.g),c.l=a);break;case 46:Fu(c.j,0,15);break;case 47:b=null,c.h!==4&&(b=Du(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ou(c),c.l=a,d=b}e=d;break a}(d==23||d==31)&&a>=33&&a<=35&&(c.g.B=a-32)}e=null}else a=b.mc,Gu(c.g,0,b.Eb),Gu(c.g,0,a);return e}
|
|
1169
|
+
function ov(a,b){var c=[];try{for(;b.Ka();){var d=bv(b).value,e=(d&224)>>5,f=d&31;e===7&&f!=0&&(e=bv(b).value&63);if(e!=0){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new cv(e));for(var g=a.j.get(e),h=b.Pa();b.Pa()-h<f;){e=g;var k=b,l=bv(k),m=l.value,n=l.pts;if(m===16){var q=bv(k);m=m<<16|q.value}if(m>=0&&m<=31)var r=dv(e,k,m,n);else if(m>=128&&m<=159)r=ev(e,k,m,n);else{if(m>=4096&&m<=4127)e=k,k=m&255,k>=8&&k<=15?e.skip(1):k>=16&&k<=23?e.skip(2):k>=24&&k<=31&&e.skip(3);else if(m>=4224&&m<=4255)e=k,k=m&
|
|
1170
|
+
255,k>=128&&k<=135?e.skip(4):k>=136&&k<=143&&e.skip(5);else if(m>=32&&m<=127)k=m,e.g&&(k===127?Vu(e.g,"\u266a"):Vu(e.g,String.fromCharCode(k)));else if(m>=160&&m<=255)e.g&&Vu(e.g,String.fromCharCode(m));else if(m>=4128&&m<=4223){if(k=m&255,e.g)if(kv.has(k)){var u=kv.get(k);Vu(e.g,u)}else Vu(e.g,"_")}else m>=4256&&m<=4351&&e.g&&((m&255)!=160?Vu(e.g,"_"):Vu(e.g,"[CC]"));r=[]}c.push.apply(c,F(r))}}}}catch(v){if(v instanceof S&&v.code===3E3)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
|
|
1171
|
+
else throw v;}return c}function pv(a){for(var b=0;a;)b^=a&1,a>>=1;return b===1}lv.prototype.getStreams=function(){return Array.from(this.B)};N("shaka.cea.CeaDecoder",lv);ad=function(){return new lv};function qv(a){for(var b=[],c=a,d=a=0;d<c.length;)a==2&&c[d]==3?(a=0,c=[].concat(F(c)),c.splice(d,1),c=new Uint8Array(c)):c[d]==0?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;a[d]==255;)c+=255,d++;c+=a[d++];for(var e=0;a[d]==255;)e+=255,d++;e+=a[d++];c==4&&b.push(a.subarray(d,d+e));d+=e}return b};function rv(){this.j=new Map;this.i=this.h=0;this.g=sv}
|
|
1172
|
+
rv.prototype.init=function(a){function b(f){f=f.name;tv.has(f)&&(c.g=tv.get(f))}var c=this,d=[],e=[];(new mh).box("moov",uh).box("mvex",uh).S("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.W();g=g.W();c.h=f;c.i=g}).box("trak",uh).S("tkhd",function(f){var g=f.reader;f=f.version;f==1?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.W();f==1?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.Ca();g.Ca();g.Ca();g.Ca();d.push(h)}).box("mdia",uh).S("mdhd",
|
|
1173
|
+
function(f){f=Hi(f.reader,f.version);e.push(f.timescale)}).box("minf",uh).box("stbl",uh).S("stsd",wh).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",xh).box("sinf",uh).box("frma",function(f){f=Ki(f.reader).codec;tv.has(f)&&(c.g=tv.get(f))}).parse(a,!0,!0);if(!d.length||!e.length||d.length!=e.length)throw new S(2,2,2010);this.g==sv&&Wa("Unable to determine bitstream format for CEA parsing!");
|
|
1174
|
+
d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
1175
|
+
rv.prototype.parse=function(a){var b=this;if(this.g==sv)return[];var c=[],d=0,e=[];(new mh).box("moof",function(f){d=f.start;e=[];uh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Wd:b.h,Xd:b.i,Ei:[],timescale:9E4});uh(f)}).S("trun",function(f){var g=e[e.length-1];f=Ii(f.reader,f.version,f.flags);g.Ei.push(f)}).S("tfhd",function(f){var g=e[e.length-1];f=Fi(f.reader,f.flags);g.Wd=f.Wd||b.h;g.Xd=f.Xd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).S("tfdt",function(f){var g=e[e.length-
|
|
1176
|
+
1];f=Gi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Pa(),k=t(e),l=k.next();!l.done;l=k.next())l=l.value,l.baseMediaDecodeTime===null?Wa("Unable to find base media decode time for CEA captions!"):(f.reader.seek(h),uv(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Wd,l.Xd,g,l.Ei,c))}).parse(a,!1,!0);return c};
|
|
1177
|
+
function uv(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.jh});n=[].concat.apply([],F(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].mg);b.Ka();){g=b.W();var q=b.Z(),r=null;r=!1;h=1;switch(a.g){case vv:r=q&31;r=r==6;break;case wv:h=2;b.skip(1);r=q>>1&63;r=r==39||r==40;break;case xv:h=2;b.skip(1);r=q>>1&63;r=r==23||r==24;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].Df||0),q=(c+q)/d,h=b.Tb(g-h,!1),h=t(qv(h)),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});
|
|
1178
|
+
else try{b.skip(g-h)}catch(u){break}m-=g+4;m==0&&(c=l<n.length?c+(n[l].kh||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}N("shaka.cea.Mp4CeaParser",rv);var sv=0,vv=1,wv=2,xv=3,tv=(new Map).set("avc1",vv).set("avc3",vv).set("dvav",vv).set("dva1",vv).set("hev1",wv).set("hvc1",wv).set("dvh1",wv).set("dvhe",wv).set("vvc1",xv).set("vvi1",xv).set("dvc1",xv).set("dvi1",xv);cd("video/mp4",function(){return new rv});function yv(){this.g=null}yv.prototype.init=function(){};yv.prototype.parse=function(a){this.g?this.g.clearData():this.g=new nk;var b=[];a=Qb(a);if(!vk(a))return b;a=this.g.parse(a);var c=a.Yd(),d=a.cf();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&d.time!=null)for(var e=t(qv(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
1179
|
+
N("shaka.cea.TsCeaParser",yv);cd("video/mp2t",function(){return new yv});function zv(a){var b=0,c=Wb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if((e&1)!=0||e+a>c.byteLength){c=[];break a}var f=Qb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Av(a){a=xc(Fd(a));a=zv(a).filter(function(b){return b.type===Bv})[0];if(!a)return null;a=oc(a.value,!0);return(a=xd(a,"WRMHEADER"))?a:null}
|
|
1180
|
+
function Cv(a){try{var b=Av(a);if(b)a:{for(var c=t(Hd(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if(h.tagName=="LA_URL"){var k=Fd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Bv=1;function Dv(){this.g=new Map}Dv.prototype.release=function(){this.g.clear()};
|
|
1181
|
+
function Ev(a,b,c,d){var e=Fv(a,b),f=null;a=[];var g=[];b=null;var h=new Set(e.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(h.size>1)throw new S(2,4,4010);if(!c){g=e.filter(function(l){return l.Id=="urn:mpeg:dash:sea:2012"});if(g.length>1)throw new S(2,4,4050);g.length&&(b=Gv(g[0]));(g=e.find(function(l){return l.Id=="urn:mpeg:dash:mp4protection:2011"}))&&g.encryptionScheme&&(k=g.encryptionScheme);g=e.filter(function(l){return l.Id=="urn:mpeg:dash:mp4protection:2011"?(f=l.init||
|
|
1182
|
+
f,!1):l.Id!="urn:mpeg:dash:sea:2012"});g.length&&(a=Hv(f,k,g,d,h),a.length==0&&(a=[Cc("",k,f)]))}if(e.length&&!b&&(c||!g.length))for(a=[],c=t(Object.values(d)),d=c.next();!d.done;d=c.next())d=d.value,d!="org.w3.clearkey"&&(d=Cc(d,k,f),a.push(d));if(h=Array.from(h)[0]||null)for(k=t(a),c=k.next();!c.done;c=k.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Vh:h,Cm:f,drmInfos:a,dg:b,$h:!0}}
|
|
1183
|
+
function Iv(a,b,c,d,e){var f=Ev(a,b,d,e);if(c.$h){a=c.drmInfos.length==1&&!c.drmInfos[0].keySystem;b=f.drmInfos.length==0;if(c.drmInfos.length==0||a&&!b)c.drmInfos=f.drmInfos;c.$h=!1}else if(f.drmInfos.length>0&&(c.drmInfos=c.drmInfos.filter(function(g){return f.drmInfos.some(function(h){return h.keySystem==g.keySystem})}),c.drmInfos.length==0))throw new S(2,4,4008);return f.Vh||c.Vh}
|
|
1184
|
+
function Jv(a){var b=Jd(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Fd(b)))return b;if((b=Jd(a.node,"urn:microsoft:playready","pro"))&&Fd(b))return Cv(b);if(a=Jd(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=Fd(a)){b=xc(a);a=8;b=Wb(b);var c=b.getUint8(a);a+=20;c>0&&(a+=4+16*b.getUint32(a));a=Qb(b,a+4);a=vc(a);a=xd("<pro>"+a+"</pro>");return Cv(a)}return""}
|
|
1185
|
+
function Hv(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Id];if(h){var k;if((k=Jd(g.node,"urn:microsoft:playready","pro"))&&Fd(k)){k=Fd(k);k=xc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Bh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if(g.Id==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=g;var m=e;if(m.size==0)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
|
|
1186
|
+
172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:Bh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Cc(h,b,g.init||a||k||l);if(h=Kv.get(h))k.licenseServerUri=h(g);a:{if(g=Jd(g.node,"https://dashif.org/CPS","Certurl"))if(g=Fd(g))break a;g=""}k.serverCertificateUri=g;f.push(k)}}return f}function Fv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())(d=Lv(a,d.value))&&c.push(d);return c}
|
|
1187
|
+
function Lv(a,b){var c=b.attributes.schemeIdUri,d=Nd(b,"urn:mpeg:cenc:2013","default_KID"),e=Kd(b,"urn:mpeg:cenc:2013","pssh").map(Gd),f=b.attributes.value;if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new S(2,4,4009);var g=[];try{g=e.map(function(h){if(!a.g.has(h)){var k=xc(h);a.g.set(h,k)}return{initDataType:"cenc",initData:a.g.get(h),keyId:null}})}catch(h){throw new S(2,4,4007);}return{node:b,Id:c,keyId:d,init:g.length>0?g:null,encryptionScheme:f}}
|
|
1188
|
+
function Gv(a){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new S(2,4,4042);var b=Jd(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new S(2,4,4051);if(b.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new S(2,4,4051);b=Jd(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new S(2,4,4051);a=b.attributes.IV;b=tc(b.attributes.keyUriTemplate);
|
|
1189
|
+
if(!a||!b)throw new S(2,4,4051);a=yc(a.substr(2));if(a.byteLength!=16)throw new S(2,4,4048);return{rk:b,iv:a}}
|
|
1190
|
+
var Kv=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new S(2,4,4054);if(a=Jd(a.node,"https://dashif.org/CPS","Laurl"))if(a=Fd(a))return a;return""}).set("com.widevine.alpha",function(a){var b=Jd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Fd(b))?b:(a=Jd(a.node,"urn:microsoft","laurl"))?tc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Jv).set("com.microsoft.playready.recommendation",Jv).set("com.microsoft.playready.software",
|
|
1191
|
+
Jv).set("com.microsoft.playready.hardware",Jv).set("org.w3.clearkey",function(a){var b=Jd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Fd(b))?b:(a=Jd(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&a.attributes.Lic_type==="EME-1.0"&&a&&(a=Fd(a))?a:""});function Mv(a,b,c,d,e,f){var g=(new Map).set("RepresentationID",b).set("Number",c).set("SubNumber",d).set("Bandwidth",e).set("Time",f);return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if(h=="$$")return"$";var n=g.get(k);if(n==null)return h;k=="RepresentationID"&&l&&(l=void 0);k=="Time"&&typeof n!="bigint"&&(Math.abs(n-Math.round(n))>=.2&&Wa("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=
|
|
1192
|
+
n.toString();break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
1193
|
+
function Nv(a,b){var c=Ov(a,b,"timescale"),d=1;c&&(d=Td(c)||1);c=Ov(a,b,"duration");var e=(c=Td(c||""))?c/d:null,f=Ov(a,b,"startNumber"),g=Number(Ov(a,b,"presentationTimeOffset"))||0,h=Ud(f||"");if(f==null||h==null)h=1;f=null;if(b=Pv(a,b,"SegmentTimeline")){b=Ed(b,"S");f=d;a=a.na.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],u=Md(q,"t",Ud),v=Md(q,"d",Ud),w=Md(q,"r",Sd);q=Md(q,"k",Sd)||0;u!=null&&(u-=g);if(v){u=u!=null?u:m;w=w||0;if(w<0)if(r){r=Md(r,"t",Ud);if(r==
|
|
1194
|
+
null)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(a==Infinity)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}l.length>0&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=w;++r)m=u+v,l.push({start:u/f,Md:u,end:m/f,Gh:m,xc:q,Tk:l.length+k}),u=m}}f=l}return{timescale:d,Nf:c,gb:e,ue:h,hc:g/d||0,ed:g,timeline:f}}function Qv(a,b){return[b(a.L),b(a.qa),b(a.ua)].filter(rf)}function Ov(a,b,c){b=Qv(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
1195
|
+
function Pv(a,b,c){b=Qv(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=Id(d.value,c));d=b.next());return a}
|
|
1196
|
+
function Rv(a,b,c,d,e,f){for(var g=Nd(a,"http://www.w3.org/1999/xlink","href"),h=Nd(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=zd("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(f>=5)return Gg(new S(2,4,4028));if(h!="onLoad")return Gg(new S(2,4,4027));var q=Bc([d],[g]);return e.request(0,Wg(q,b)).Xa(function(r){r=wd(r.data,a.tagName);if(!r)return Gg(new S(2,4,4001,g));for(a.children=
|
|
1197
|
+
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Sv(a,b,c,q[0],e,f+1)})}
|
|
1198
|
+
function Sv(a,b,c,d,e,f){f=f===void 0?0:f;if(Nd(a,"http://www.w3.org/1999/xlink","href")){var g=Rv(a,b,c,d,e,f);c&&(g=g.Xa(void 0,function(){return Sv(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Dd(a)),k=h.next(),l={};!k.done;l={Td:void 0},k=h.next())l.Td=k.value,Nd(l.Td,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?a.children=a.children.filter(function(m){return function(n){return n!==m.Td}}(l)):l.Td.tagName!="SegmentTimeline"&&g.push(Sv(l.Td,b,c,d,e,f));return Kg(g).Xa(function(){return a})}
|
|
1199
|
+
;function Tv(a,b,c,d,e,f,g,h){var k,l=(new mh).S("sidx",function(m){k=Uv(b,d,e,f,g,c,m,h)});a&&l.parse(a);if(k)return k;throw new S(2,3,3004);}
|
|
1200
|
+
function Uv(a,b,c,d,e,f,g,h){h=h===void 0?!1:h;var k=[];g.reader.skip(4);var l=g.reader.W();if(l==0)throw new S(2,3,3005);if(g.version==0){var m=g.reader.W();var n=g.reader.W()}else m=g.reader.Fd(),n=g.reader.Fd();g.reader.skip(2);var q=g.reader.Ca();a=(h?-g.size:a)+g.size+n;for(h=0;h<q;h++){var r=g.reader.W();n=(r&2147483648)>>>31;r&=2147483647;var u=g.reader.W();g.reader.skip(4);if(n==1)throw new S(2,3,3006);k.push(new yj(m/l+c,(m+u)/l+c,function(){return f},a,a+r-1,b,c,d,e));m+=u;a+=r}g.parser.stop();
|
|
1201
|
+
return k};function Vv(a){this.h=Wb(a);this.g=new jh(this.h,0)}Vv.prototype.Ka=function(){return this.g.Ka()};
|
|
1202
|
+
function Wv(a){var b=Xv(a);if(b.length>7)throw new S(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Xv(a);a:{d=t(Yv);for(var e=d.next();!e.done;e=d.next())if(Pb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Pa();else{if(b.length==8&&b[1]&224)throw new S(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=e==0?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Pa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Pa();d=Wb(a.h,a.g.Pa(),b);a.g.skip(b);return new Zv(c,
|
|
1203
|
+
d)}function Xv(a){var b=a.g.Pa(),c=a.g.Z();if(c==0)throw new S(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Qb(a.h,b,c)}var Yv=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Zv(a,b){this.id=a;this.g=b}
|
|
1204
|
+
function $v(a){if(a.g.byteLength>8)throw new S(2,3,3002);if(a.g.byteLength==8&&a.g.getUint8(0)&224)throw new S(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function aw(a,b,c,d,e,f,g){b=new Vv(b);if(Wv(b).id!=440786851)throw new S(2,3,3008);var h=Wv(b);if(h.id!=408125543)throw new S(2,3,3009);b=h.g.byteOffset;h=new Vv(h.g);for(var k=null;h.Ka();){var l=Wv(h);if(l.id==357149030){k=l;break}}if(!k)throw new S(2,3,3010);k=new Vv(k.g);l=1E6;for(h=null;k.Ka();){var m=Wv(k);if(m.id==2807729)l=$v(m);else if(m.id==17545)if(m.g.byteLength==4)h=m.g.getFloat32(0);else if(m.g.byteLength==8)h=m.g.getFloat64(0);else throw new S(2,3,3003);}if(h==null)throw new S(2,3,
|
|
1205
|
+
3011);k=l/1E9;h*=k;a=Wv(new Vv(a));if(a.id!=475249515)throw new S(2,3,3007);return bw(a,b,k,h,c,d,e,f,g)}function bw(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Vv(a.g);for(var n=null,q=null;a.Ka();){var r=Wv(a);if(r.id==187){var u=cw(r);u&&(r=c*u.kl,u=b+u.Lk,n!=null&&m.push(new yj(n+g,r+g,l,q,u-1,f,g,h,k)),n=r,q=u)}}n!=null&&m.push(new yj(n+g,d+g,l,q,null,f,g,h,k));return m}
|
|
1206
|
+
function cw(a){var b=new Vv(a.g);a=Wv(b);if(a.id!=179)throw new S(2,3,3013);a=$v(a);b=Wv(b);if(b.id!=183)throw new S(2,3,3012);b=new Vv(b.g);for(var c=0;b.Ka();){var d=Wv(b);if(d.id==241){c=$v(d);break}}return{kl:a,Lk:c}};function dw(a,b,c){b=Pv(a,b,"Initialization");if(!b)return null;var d=a.L.bb(),e=b.attributes.sourceURL;e&&(d=Bc(d,[tc(e)],a.Lb()));e=0;var f=null;if(b=Md(b,"range",Rd))e=b.start,f=b.end;c=new wj(function(){return d},e,f,ew(a),null,null,c,a.qa.encrypted);c.codecs=a.L.codecs;c.mimeType=a.L.mimeType;a.na&&!a.na.hf&&(c.g=a.na.start+a.na.duration);return c}
|
|
1207
|
+
function fw(a,b,c){var d=Number(Ov(a,gw,"presentationTimeOffset"))||0,e=Ov(a,gw,"timescale"),f=1;e&&(f=Td(e)||1);var g=d/f||0,h=dw(a,gw,c);hw(a,h);var k=ud(a);return{endTime:-1,timeline:-1,Sc:function(){var l=Pv(k,gw,"RepresentationIndex");var m=k.L.bb();l&&(l=tc(l.attributes.sourceURL))&&(m=Bc(m,[l],k.Lb()));l=iw(k);return jw(k,b,h,m,l.start,l.end,g)},timescale:f}}
|
|
1208
|
+
function jw(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E;return G(function(K){if(K.h==1)return h=a.presentationTimeline,k=!a.Gb||!a.na.hf,l=a.na.start,m=a.na.duration,n=a.L.mimeType.split("/")[1],q=b,r=null,u=[q(d,e,f,!1),n=="webm"?q(c.P(),c.startByte,c.endByte,!0):null],q=null,K.g(Promise.all(u),2);v=K.i;w=v[0];y=v[1]||null;x=null;z=l-g;C=l;H=m?l+m:Infinity;D=a.L.bb();A=D.length!=d.length||D.some(function(J,O){return J!=d[O]});x=n=="mp4"?Tv(w,e,D,c,z,C,H,A):aw(w,y,D,c,z,C,H);B=t(x);
|
|
1209
|
+
for(I=B.next();!I.done;I=B.next())E=I.value,E.codecs=a.L.codecs,E.mimeType=a.L.mimeType,E.bandwidth=a.bandwidth;h.le(x);r=new Vl(x);k&&r.nd(C,H,!0);return K.return(r)})}function gw(a){return a.Jd}function iw(a){var b=Pv(a,gw,"RepresentationIndex");a=Ov(a,gw,"indexRange");a=Rd(a||"");b&&(a=Md(b,"range",Rd,a));return a}function hw(a,b){kw(a,b);if(!iw(a))throw new S(2,4,4002);}
|
|
1210
|
+
function kw(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Hc&&c!="mp4"&&c!="webm")throw new S(2,4,4006);if(c=="webm"&&!b)throw new S(2,4,4005);}
|
|
1211
|
+
function ew(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.wf,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.qa.label||null,roles:a.roles||null,language:a.qa.language||null}};function lw(a,b,c){var d=dw(a,mw,c),e=nw(a);if(!e.gb&&!e.timeline&&e.yd.length>1)throw new S(2,4,4002);if(!e.gb&&!a.na.duration&&!e.timeline&&e.yd.length==1)throw new S(2,4,4002);if(e.timeline&&e.timeline.length==0)throw new S(2,4,4002);var f=null,g=null;a.ua.id&&a.L.id&&(g=b.get(a.ua.id+","+a.L.id))&&(f=g.segmentIndex);var h=ow(a.na.start,a.na.duration,a.L.bb,e,d,c,a.L.mimeType,a.L.codecs,a.bandwidth,a.Lb);b=!f;f?f.je(h,a.presentationTimeline.Jb()):f=new Vl(h);a.presentationTimeline.le(h);a.Gb&&
|
|
1212
|
+
a.na.hf||f.nd(a.na.start,a.na.duration?a.na.start+a.na.duration:Infinity,b);g&&(g.segmentIndex=f);return{endTime:-1,timeline:-1,Sc:function(){f&&f.getNumReferences()!=0||f.qf(h);return Promise.resolve(f)},timescale:e.timescale}}function mw(a){return a.Bc}function nw(a){var b=pw(a);a=Nv(a,mw);var c=a.ue;c==0&&(c=1);var d=0;a.gb?d=a.gb*(c-1):a.timeline&&a.timeline.length>0&&(d=a.timeline[0].start);return{gb:a.gb,startTime:d,ue:c,hc:a.hc,timescale:a.timescale,timeline:a.timeline,yd:b}}
|
|
1213
|
+
function ow(a,b,c,d,e,f,g,h,k,l){var m=d.yd.length;d.timeline&&d.timeline.length!=d.yd.length&&(m=Math.min(d.timeline.length,d.yd.length));for(var n=a-d.hc,q=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={Pf:void 0,Ef:void 0},w++){v.Ef=d.yd[w];var y=u;u=void 0;u=d.gb!=null?y+d.gb:d.timeline?d.timeline[w].end:y+b;v.Pf=null;v=new yj(a+y,a+u,function(x){return function(){x.Pf==null&&(x.Pf=Bc(c(),[x.Ef.zk],l()));return x.Pf}}(v),v.Ef.start,v.Ef.end,e,n,a,q,[],"",null,null,zj,f);v.codecs=h;v.mimeType=
|
|
1214
|
+
g;v.bandwidth=k;r.push(v)}return r}function pw(a){return[a.L.Bc,a.qa.Bc,a.ua.Bc].filter(rf).map(function(b){return Ed(b,"SegmentURL")}).reduce(function(b,c){return b.length>0?b:c}).map(function(b){b.attributes.indexRange&&!a.Lg&&(a.Lg=!0);var c=tc(b.attributes.media);b=Md(b,"mediaRange",Rd,{start:0,end:null});return{zk:c,start:b.start,end:b.end}})};function qw(a,b,c,d,e,f,g,h,k,l){k||a.L.ef||(a.L.ef=Ov(a,rw,"initialization"));var m=a.L.ef?sw(a,g):null,n=tw(a);uw(n);var q=ud(a);if(n.ee)return kw(a,m),{endTime:-1,timeline:-1,Sc:function(){var y=Mv(n.ee,q.L.originalId,null,null,q.bandwidth||null,null);y=Bc(q.L.bb(),[y]);return jw(q,b,m,y,0,null,n.hc)},timescale:n.timescale};if(n.gb)return d||a.qa.contentType==="image"||a.qa.contentType==="text"||(d=a.na.start,l=a.ua.id,c=a.na.duration,l=(l=l!=null&&f.get(l)||c)?d+l:Infinity,a.presentationTimeline.Tg(n.gb),
|
|
1215
|
+
a.presentationTimeline.Ci(d,l)),{endTime:-1,timeline:-1,Sc:function(){return vw(q,n,e,m,f,g,h,a.L.Ff)},timescale:n.timescale};var r=null;d=d=null;a.ua.id&&a.L.id&&(d=a.ua.id+","+a.L.id,d=c.get(d))&&(r=d.segmentIndex);var u=a.na.start,v=a.na.duration?u+a.na.duration:Infinity;if(r)l=r,ww(l,n,u,v,m,a.Gb),l.Ya(a.presentationTimeline.Jb());else{c=0;k=-1;if(a.ua.id!=null&&a.L.id!=null){var w=l.get(a.ua.id);if(w)k=w.timeline;else for(l=t(l.values()),w=l.next();!w.done;w=l.next())if(w=w.value,Math.abs(n.hc-
|
|
1216
|
+
w.endTime)<=Kc&&w.eh.includes(a.L.id)){k=w.timeline;break}else w.timeline>=c&&(c=w.timeline+1)}k==-1&&(k=c);r=new xw(a.Gb,n,a.L.originalId,a.bandwidth,a.L.bb,a.Lb,u,v,m,g,a.L.Ff,k)}n.timeline&&a.qa.contentType!=="image"&&a.qa.contentType!=="text"&&a.presentationTimeline.Di(r.h?r.h.timeline:[],u);d&&a.Gb&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.hc:-1;l=-1;r instanceof xw&&(l=r.Ve());return{endTime:d,timeline:l,Sc:function(){r instanceof xw&&r.getNumReferences()==0&&ww(r,n,u,
|
|
1217
|
+
v,m,a.Gb);return Promise.resolve(r)},timescale:n.timescale}}function rw(a){return a.Oc}function tw(a){var b=Nv(a,rw),c=Ov(a,rw,"media"),d=Ov(a,rw,"index"),e=Ov(a,rw,"k"),f=0;e&&(f=parseInt(e,10));return{Nf:b.Nf,gb:b.gb,timescale:b.timescale,ue:b.ue,hc:b.hc,ed:b.ed,timeline:b.timeline,dc:c&&tc(c),ee:d,mimeType:a.L.mimeType,codecs:a.L.codecs,bandwidth:a.bandwidth,Bk:f}}
|
|
1218
|
+
function uw(a){var b=a.ee?1:0;b+=a.timeline?1:0;b+=a.gb?1:0;if(b==0)throw new S(2,4,4002);b!=1&&(a.ee&&(a.timeline=null),a.Nf=null,a.gb=null);if(!a.ee&&!a.dc)throw new S(2,4,4002);}
|
|
1219
|
+
function vw(a,b,c,d,e,f,g,h){function k(J){var O=J-w,P=O*v,M=b.Nf,L=O*M;"BigInt"in window&&L>Number.MAX_SAFE_INTEGER&&(L=BigInt(O)*BigInt(M));P+=q;O=P+v;M=Math.min(O,m());var Q=[],R=b.Bk;if(R)for(var ia=(M-P)/R,W={},xa=0;xa<R;W={Zi:void 0},xa++){var ta=P+ia*xa,ra=ta+ia;W.Zi=xa;W=new yj(ta,ra,function(ya){return function(){var sa=Mv(y,z,J,ya.Zi,x,L);return Bc(C(),[sa],H())}}(W),0,null,d,D,q,m(),[],"",null,null,zj,f);W.codecs=a.L.codecs;W.mimeType=a.L.mimeType;h==0?xa>0&&W.wd():xa%h!=0&&W.wd();Q.push(W)}P=
|
|
1220
|
+
new yj(P,M,function(){if(R)return[];var ya=Mv(y,z,J,null,x,L);return Bc(C(),[ya],H())},0,null,d,D,q,m(),Q,"",null,null,zj,f,Q.length>0);P.codecs=a.L.codecs;P.mimeType=a.L.mimeType;P.bandwidth=a.bandwidth;P.j=O;return P}function l(){var J=[Math.max(n.Jb(),q),Math.min(n.Jc(),m())].map(function(O){return O-q});J=[Math.ceil(J[0]/v),Math.ceil(J[1]/v)-1];a.L.rb&&J[1]++;return J.map(function(O){return O+w})}function m(){var J=r!=null&&e.get(r)||u;return J?q+J:Infinity}var n=a.presentationTimeline,q=a.na.start,
|
|
1221
|
+
r=a.ua.id,u=a.na.duration,v=b.gb,w=b.ue,y=b.dc,x=a.bandwidth||null,z=a.L.originalId,C=a.L.bb,H=a.Lb,D=q-b.hc,A=l();c=a.Gb?Math.max(A[0],A[1]-c+1):A[0];g=g||A[1];A=[];for(var B=c;B<=g;++B){var I=k(B);A.push(I)}var E=new Vl(A);A=n.Jc()<m();B=n.U();if(A||B){var K=Math.max(c,g+1);c=v;a.L.rb&&(c=.1);E.Of(c,function(){var J=n.Jb();E.Ya(J);var O=t(l());O.next();O=O.next().value;for(var P=[];K<=O;){var M=k(K);P.push(M);K++}return J>m()&&!P.length?null:P})}return Promise.resolve(E)}
|
|
1222
|
+
function sw(a,b){var c=a.L.ef;c||(c=Ov(a,rw,"initialization"));if(!c)return null;c=tc(c);var d=a.L.originalId,e=a.bandwidth||null,f=a.L.bb,g=a.Lb;b=new wj(function(){var h=Mv(c,d,null,null,e,null);return Bc(f(),[h],g())},0,null,ew(a),null,null,b,a.qa.encrypted);b.codecs=a.L.codecs;b.mimeType=a.L.mimeType;a.na&&!a.na.hf&&(b.g=a.na.start+a.na.duration);return b}
|
|
1223
|
+
function xw(a,b,c,d,e,f,g,h,k,l,m,n){Vl.call(this,[]);this.D=a;this.h=b;this.H=c;this.C=d;this.G=e;this.J=f;this.j=g;this.l=h;this.u=k;this.B=l;this.I=m;this.K=n;yw(this)}na(xw,Vl);p=xw.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){Vl.prototype.release.call(this);this.h=null};
|
|
1224
|
+
p.Ya=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;b>0&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,this.getNumReferences()===0&&this.release())}};
|
|
1225
|
+
function ww(a,b,c,d,e,f){zw(a,e);a.D=f;if(a.h){if(a.h.ed!==b.ed)for(c=b.ed-a.h.ed,e=0;e<b.timeline.length;e++)f=b.timeline[e],f.Md+=c,f.Gh+=c,f.start=(f.Md+c)/b.timescale,f.end=(f.Gh+c)/b.timescale;a.h.dc!==b.dc&&(a.h.dc=b.dc);c=a.h.timeline;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();b.length>0&&a.h.timeline.push.apply(a.h.timeline,F(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;yw(a)}
|
|
1226
|
+
function zw(a,b){if(a.u!==b){a.u=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Cj(c,b)}}function yw(a){if(a.h&&!a.o){for(var b=[],c=t(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||d.end<=0||b.push(d);a.h.timeline=b;a.Ya(a.j)}}
|
|
1227
|
+
p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:this.l===Infinity?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
|
|
1228
|
+
p.get=function(a){var b=this;a-=this.i;if(a<0||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){c=this.h.timeline[a];var d=c.Tk,e=c.Md+this.h.ed,f=this.j-this.h.hc,g=this.j+c.end,h=g;a===this.getNumReferences()-1&&this.l!==Infinity&&(h=this.D&&Math.abs(h-this.l)>.1?Math.min(h,this.l):this.l);var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=!1;c.xc&&this.h&&this.h.dc&&(q=this.h.dc.includes("$SubNumber$"));if(q){q=(c.end-c.start)/c.xc;for(var r={},u=0;u<c.xc;r={Qf:void 0,
|
|
1229
|
+
$i:void 0},u++){var v=c.start+q*u,w=v+q;r.$i=u;r.Qf=null;r=new yj(this.j+v,this.j+w,function(y){return function(){if(!b.h)return[];y.Qf==null&&(y.Qf=Aw(b.h.dc,b.H,d,b.C,e,y.$i,b.G,b.J));return y.Qf}}(r),0,null,this.u,f,this.j,this.l,[],"",null,null,zj,this.B);r.codecs=k;r.mimeType=l;r.bandwidth=m;this.I==0?u>0&&r.wd():u%this.I!=0&&r.wd();n.push(r)}}c=new yj(this.j+c.start,h,function(){return n.length>0||!b.h?[]:Aw(b.h.dc,b.H,d,b.C,e,null,b.G,b.J)},0,null,this.u,f,this.j,this.l,n,"",null,null,zj,this.B,
|
|
1230
|
+
n.length>0);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};p.Hb=function(a){yw(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Aw(a,b,c,d,e,f,g,h){a=Mv(a,b,c,f,d||null,e);return Bc(g(),[a],h()).map(function(k){return k.toString()})}p.Ve=function(){return this.K};function Bw(a){this.o=null;this.B=a;this.H=new Pg;this.i=[];this.h=null;this.m=[];this.C=null;this.G=[];this.D=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}Bw.prototype.configure=function(a){this.o=a};Bw.prototype.destroy=function(){this.B=this.o=null;this.i=[];this.h=null;this.m=[];this.G=[];this.l.clear();this.g!=null&&(this.g.stop(),this.g=null);return this.H.destroy()};Bw.prototype.setManifestType=function(a){this.u=a};
|
|
1231
|
+
function Cw(a,b){var c,d,e,f,g,h,k;return G(function(l){if(l.h==1)return c=Bc(a.i,[Dw(a,b)]),d=Wg(c,a.o.retryParameters),e=a.B.networkingEngine.request(8,d),Qg(a.H,e),l.m(2),l.g(e.promise,4);if(l.h!=2)return f=l.i,g=mc(f.data),h=JSON.parse(g),h.VERSION==1&&Ew(a,h,f.uri),l.o(0);if((k=l.l())&&k.code==7001)return l.return();a.g!=null&&(a.g.stop(),a.g=null);a.g=new of(function(){Cw(a,b)});a.g.ka(a.D);l.j()})}
|
|
1232
|
+
function Dw(a,b){if(!a.m.length)return b;b=new zb(b);var c=a.C||a.m[0],d=Math.round(a.B.getBandwidthEstimate()),e=b.g;a.u=="DASH"?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):a.u=="HLS"&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Nb(e);e.Vd&&Db(b,e);return b.toString()}
|
|
1233
|
+
function Ew(a,b,c){a.g!=null&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new of(function(){Cw(a,d)});if(c=b.TTL)a.D=c;a.g.ka(a.D);a.m=b["PATHWAY-PRIORITY"]||[];a.G=b["PATHWAY-CLONES"]||[]}function Fw(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Bw.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
1234
|
+
function Gw(a,b,c){c=c===void 0?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Cd:void 0},f=e.next())if(g.Cd=f.value,f=b.get(g.Cd))d.push({Yg:g.Cd,location:f});else if(f=a.G.find(function(k){return function(l){return l.Ml==k.Cd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].lj?(h=new zb(h),Bb(h,f["URI-REPLACEMENT"].lj),d.push({Yg:g.Cd,location:h.toString()})):d.push({Yg:g.Cd,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
1235
|
+
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new zb(k.location)).Fb))return!1;return!0});d.length&&(a.C=d[0].Yg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Bc(a.i,d)};function Hw(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.o=!1;this.m=new Set}p=Hw.prototype;p.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.o=!1;this.m.clear()};p.ck=function(){return this.l};p.Jg=function(){return this.j.slice()};p.Jj=function(){return this.i};
|
|
1236
|
+
p.Wh=function(a,b){if(a){if(a.type=="audio")for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="video")for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!==
|
|
1237
|
+
a}));else if(a.type==Hc)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if(a.type=="image")for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
|
|
1238
|
+
function Iw(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Jw(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Kw(n),n]})),l=new Map(h.textStreams.map(function(n){return[Lw(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Mw(n),n]}));if(b){var m=Nw(Hc);l.set(Lw(m),m);m=Nw("image");h.set(Mw(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Ph:c,jj:d,ej:e,mi:f}}
|
|
1239
|
+
p.hg=function(a,b,c){c=c===void 0?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q,R,ia;return G(function(W){if(W.h==1){e=Jc;if(!b&&a.length==1)return f=Iw(a,!1),g=f.Ph,h=f.jj,k=f.ej,l=f.mi,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),W.A(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),n==-1&&(n=q));if(n==-1)return W.return();u=Iw(a,!0);v=u.Ph;w=u.jj;y=u.ej;x=u.mi;
|
|
1240
|
+
return W.g(Promise.all([Ow(d,d.h,v,n,Pw,Qw,m),Ow(d,d.g,w,n,Pw,Qw,m),Ow(d,d.j,y,n,Pw,Qw,m),Ow(d,d.i,x,n,Pw,Qw,m)]),2)}z=0;C=[];if(d.g.length&&d.h.length)for(K=t(d.h),J=K.next();!J.done;J=K.next())for(O=J.value,P=t(d.g),M=P.next();!M.done;M=P.next())L=M.value,Q=Zb(O.drmInfos,L.drmInfos),O.drmInfos.length&&L.drmInfos.length&&!Q.length||(R=(O.bandwidth||0)+(L.bandwidth||0),O.dependencyStream&&(R+=O.dependencyStream.bandwidth||0),L.dependencyStream&&(R+=L.dependencyStream.bandwidth||0),ia=z++,C.push({id:ia,
|
|
1241
|
+
language:O.language,disabledUntilTime:0,primary:O.primary,audio:O,video:L,bandwidth:R,drmInfos:Q,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(H=d.g.length?d.g:d.h,D=t(H),A=D.next();!A.done;A=D.next())B=A.value,I=z++,E=B.bandwidth||0,B.dependencyStream&&(E+=B.dependencyStream.bandwidth||0),C.push({id:I,language:B.language,disabledUntilTime:0,primary:B.primary,audio:B.type==e.aa?B:null,video:B.type==e.wa?B:null,bandwidth:E,drmInfos:B.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
1242
|
+
decodingInfos:[]});d.l=C;W.j()})};
|
|
1243
|
+
function bx(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P;return G(function(M){switch(M.h){case 1:b=Jc;if(a.length==1)return M.return(a[0]);c=a.map(function(L){return new Map(L.filter(function(Q){return Q.type===b.aa}).map(function(Q){return[Jw(Q),Q]}))});d=a.map(function(L){return new Map(L.filter(function(Q){return Q.type===b.wa}).map(function(Q){return[Kw(Q),Q]}))});e=a.map(function(L){return new Map(L.filter(function(Q){return Q.type===b.Na}).map(function(Q){return[Lw(Q),Q]}))});
|
|
1244
|
+
f=a.map(function(L){return new Map(L.filter(function(Q){return Q.type===b.Vf}).map(function(Q){return[Mw(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=cx(b.Na),k.set(Lw(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,r=cx(b.Vf),q.set(Mw(r),r);u=new Hw;return M.g(Ow(u,[],c,0,dx,ex,0),2);case 2:return v=M.i,M.g(Ow(u,[],d,0,dx,ex,0),3);case 3:return w=M.i,M.g(Ow(u,[],e,0,dx,ex,0),4);case 4:return y=M.i,M.g(Ow(u,[],f,0,dx,ex,0),5);case 5:x=M.i;z=0;if(w.length&&v.length)for(B=
|
|
1245
|
+
t(v),I=B.next();!I.done;I=B.next())for(E=I.value,K=t(w),J=K.next();!J.done;J=K.next())O=J.value,P=z++,O.variantIds.push(P),E.variantIds.push(P);else for(C=w.concat(v),H=t(C),D=H.next();!D.done;D=H.next())A=D.value,A.variantIds=[z++];return M.return(w.concat(v).concat(y).concat(x))}})}
|
|
1246
|
+
function Ow(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E;return G(function(K){switch(K.h){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){K.A(4);break}n=m.value;return K.g(fx(a,n,c,d,f,h,g),5);case 5:q=K.i;if(!q)throw new S(2,4,4037);m=l.next();K.A(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),y=w.next();!y.done;y=w.next())x=y.value,(z=gx(a,b,x,c,e,f,h))&&b.push(z);C=t(h);for(H=
|
|
1247
|
+
C.next();!H.done;H=C.next())for(D=H.value,A=t(D),B=A.next(),I={};!B.done;I={uh:void 0},B=A.next())if(I.uh=B.value,!hx(I.uh)&&(E=b.some(function(J){return function(O){return ix(J.uh,O)}}(I))))throw new S(2,4,4037);return K.return(b)}})}function fx(a,b,c,d,e,f,g){return G(function(h){if(h.h==1)return jx(a,c,b,g>0),b.matchedStreams?b.segmentIndex?h.g(kx(b,d+g),2):h.A(2):h.return(!1);lx(b,d,e,f,g);return h.return(!0)})}
|
|
1248
|
+
function kx(a,b){var c,d,e,f,g,h;return G(function(k){if(k.h==1){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return k.g(Promise.all(c),2)}if(a.segmentIndex instanceof Yl)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);k.j()})}
|
|
1249
|
+
function gx(a,b,c,d,e,f,g){if(hx(c))return null;var h=e(c);jx(a,d,h);h.createSegmentIndex&&(h.createSegmentIndex=function(){return G(function(k){if(h.segmentIndex)return k.A(0);h.segmentIndex=new Yl;return k.g(kx(h,0),0)})},h.closeSegmentIndex=function(){h.segmentIndex&&(h.segmentIndex.release(),h.segmentIndex=null);if(h.matchedStreams)for(var k=t(h.matchedStreams),l=k.next();!l.done;l=k.next()){l=l.value;var m;if(m=l.segmentIndex){a:{m=t(b);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n!==
|
|
1250
|
+
h&&n.segmentIndex&&n.matchedStreams&&n.matchedStreams.includes(l)){m=!0;break a}m=!1}m=!m}m&&(l.segmentIndex.release(),l.segmentIndex=null)}});if(!h.matchedStreams||!h.matchedStreams.length)return null;lx(h,0,f,g,0);return h}
|
|
1251
|
+
function lx(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;a.type=="audio"&&zf(a.language,g.language)==0&&(h=!1);if(h&&((h=d[b-e])&&h.delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
1252
|
+
function Pw(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set(a.keyIds);b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;b.trickModeVideo=null;b.dependencyStream=null;return b}
|
|
1253
|
+
function dx(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set(a.keyIds);b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
|
|
1254
|
+
function Qw(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);a.originalId==null?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Zb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new S(2,
|
|
1255
|
+
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Pw(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
|
|
1256
|
+
for(var g=new Yl,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),Qw(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Qw(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=Pw(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
|
|
1257
|
+
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new Yl,h=t(a.dependencyStream.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.dependencyStream.segmentIndex=g;return Promise.resolve()}),a.dependencyStream.matchedStreams.push(b.dependencyStream),Qw(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),Qw(a.dependencyStream,b))}
|
|
1258
|
+
function ex(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,F(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
1259
|
+
function jx(a,b,c,d){d=(d===void 0?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=mx(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
1260
|
+
function mx(a,b,c){var d={audio:Jw,video:Kw,text:Lw,image:Mw}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return ix(l,m)},video:function(l,m){return ix(l,m)},text:nx,image:ox}[c.type];for(var g={audio:px,video:qx,text:rx,image:sx}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.o&&!hx(e)&&b.delete(d(e));return e}
|
|
1261
|
+
function tx(a,b){return a.mimeType!=b.mimeType?!1:ux(a.codecs)===ux(b.codecs)}p.Ui=function(a){this.o=a};function ix(a,b){return a.drmInfos&&!Xb(a.drmInfos,b.drmInfos)?!1:!0}function nx(a,b){return b.language?a.forced!==b.forced||zf(a.language,b.language)==0||b.kind!=a.kind?!1:!0:!0}function ox(){return!0}
|
|
1262
|
+
function px(a,b,c){var d=vx(a,b,c);if(d===wx)return!0;if(d===xx)return!1;d=zf(a.language,b.language);var e=zf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<b.roles.length}else{if(!c.roles.length&&
|
|
1263
|
+
b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=yx(a.channelsCount,b.channelsCount,c.channelsCount);if(d==wx)return!0;if(d==xx)return!1;d=yx(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==wx?!0:d==xx?!1:a.bandwidth&&zx(a.bandwidth,b.bandwidth,c.bandwidth)==wx?!0:!1}
|
|
1264
|
+
function qx(a,b,c){var d=vx(a,b,c);if(d===wx)return!0;if(d===xx)return!1;d=yx(a.width*a.height,b.width*b.height,c.width*c.height);if(d==wx)return!0;if(d==xx)return!1;if(a.frameRate){d=yx(a.frameRate,b.frameRate,c.frameRate);if(d==wx)return!0;if(d==xx)return!1}return a.bandwidth&&zx(a.bandwidth,b.bandwidth,c.bandwidth)==wx?!0:!1}
|
|
1265
|
+
function rx(a,b,c){var d=zf(a.language,b.language),e=zf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
1266
|
+
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function sx(a,b,c){return yx(a.width*a.height,b.width*b.height,c.width*c.height)==wx?!0:!1}
|
|
1267
|
+
function cx(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}
|
|
1268
|
+
function Nw(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Vl([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
|
|
1269
|
+
baseOriginalId:null}}function yx(a,b,c){if(b==a&&a!=c)return xx;if(c==a&&a!=b)return wx;if(b>a){if(c<=a||c-a<b-a)return wx;if(c-a>b-a)return xx}else{if(c>a)return xx;if(a-c<a-b)return wx;if(a-c>a-b)return xx}return Ax}function vx(a,b,c){var d=a.mimeType===b.mimeType&&a.codecs===b.codecs,e=a.mimeType===c.mimeType&&a.codecs===c.codecs;if(d&&!e)return xx;if(!d&&e)return wx;b=tx(a,b);a=tx(a,c);return b&&!a?xx:!b&&a?wx:Ax}function zx(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?wx:b<a?xx:Ax}
|
|
1270
|
+
function hx(a){switch(a.type){case Hc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function Kw(a){return Bx([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
|
|
1271
|
+
function Jw(a){return Bx([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function Lw(a){return Bx([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function Mw(a){return Bx([a.width,a.codecs,a.mimeType])}function Bx(a){return JSON.stringify(a)}function ux(a){if(!Cx.has(a)){var b=Ve(a);Cx.set(a,b)}return Cx.get(a)}
|
|
1272
|
+
N("shaka.util.PeriodCombiner",Hw);Hw.prototype.setUseStreamOnce=Hw.prototype.Ui;Hw.prototype.combinePeriods=Hw.prototype.hg;Hw.prototype.deleteStream=Hw.prototype.Wh;Hw.prototype.getImageStreams=Hw.prototype.Jj;Hw.prototype.getTextStreams=Hw.prototype.Jg;Hw.prototype.getVariants=Hw.prototype.ck;var wx=1,Ax=0,xx=-1,Cx=new Map;function Dx(a,b){var c=new DOMParser,d=Ex.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Fx(a,b){try{var c=qc(a);return Dx(c,b)}catch(d){return null}}
|
|
1273
|
+
var Ex=new mb(function(){if(typeof trustedTypes!=="undefined"){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Gx(){var a=this;this.j=this.g=null;this.B=[];this.h=null;this.Ga=1;this.H=[];this.l={tf:"",type:"",profiles:[],vc:null,rb:0,bb:null,pe:0};this.u=new Map;this.C=new Map;this.o=new Map;this.D=new Map;this.za=new Map;this.m=new Hw;this.K=0;this.Da=new Ra(5);this.M=new of(function(){if(a.J&&!a.g.continueLoadingWhenPaused&&(a.I.Ma(a.J,"timeupdate"),a.J.paused)){a.I.Aa(a.J,"timeupdate",function(){return Hx(a)});return}Hx(a)});this.R=new Pg;this.O=null;this.G=[];this.ba=Infinity;this.va=!1;this.i=
|
|
1274
|
+
null;this.N=0;this.T=!1;this.I=new gb;this.J=null;this.V=!1;this.$="";this.oa=function(){return!1};this.X=[];this.ma=new Set;this.ya=new Dv}p=Gx.prototype;p.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.oa=b);c&&this.h&&this.h.presentationTimeline.U()&&this.M.Cb();this.i&&this.i.configure(this.g);this.m&&this.m.Ui(this.g.dash.useStreamOnceInPeriodFlattening)};
|
|
1275
|
+
p.start=function(a,b){var c=this,d;return G(function(e){if(e.h==1)return c.va=b.isLowLatencyMode(),c.B=[a],c.j=b,e.g(Ix(c),2);d=e.i;c.j&&Jx(c,d);if(!c.j)throw new S(2,7,7001);return e.return(c.h)})};
|
|
1276
|
+
p.stop=function(){for(var a=t(this.o.values()),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.B=[];this.h=null;this.o.clear();this.D.clear();this.u.clear();this.C.clear();this.l={tf:"",type:"",profiles:[],vc:null,rb:0,bb:null,pe:0};this.m=null;this.M!=null&&(this.M.stop(),this.M=null);this.i&&this.i.destroy();this.I&&(this.I.release(),this.I=null);this.ma.clear();this.ya.release();return this.R.destroy()};
|
|
1277
|
+
p.update=function(){var a=this,b;return G(function(c){if(c.h==1)return c.m(2),c.g(Ix(a),4);if(c.h!=2)return c.o(0);b=c.l();if(!a.j||!b)return c.return();a.j.onError(b);c.j()})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.h&&this.h.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.h.presentationTimeline.Jc();var c=b.segmentIndex.find(a);c!=null&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Jx(this,0))}}};
|
|
1278
|
+
p.banLocation=function(a){this.i&&this.i.banLocation(a)};p.setMediaElement=function(a){this.J=a};
|
|
1279
|
+
function Ix(a){var b,c,d,e,f,g,h,k,l,m,n;return G(function(q){if(q.h==1)return b=4,c="MPD",d=Kx(a),e=a.B,d.length?(e=d,c="Patch",b=6):a.B.length>1&&a.i&&(f=Gw(a.i,"Location",!0),f.length&&(e=f)),g=Wg(e,a.g.retryParameters),h=Date.now(),q.g(Lx(a,g,0,{type:b}),2);if(q.h!=3){k=q.i;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.B.includes(k.uri)&&a.B.unshift(k.uri);l=new zb(k.uri);a.$=l.g.toString();return q.g(Mx(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.Da.sample(1,n);a.ma.clear();
|
|
1280
|
+
return q.return(n)})}
|
|
1281
|
+
function Mx(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return G(function(v){if(v.h==1){e=b;f=a.g.dash.manifestPreprocessor;g=Zn;if(f!=g){ub("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Fx(e,d);if(!h)throw new S(2,4,4001,c);f(h);e=rc(h.outerHTML)}k=wd(e,d);if(!k)throw new S(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=$n;l!=m&&l(k);if(d==="Patch")return v.return(Nx(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Ox(a,k,c));
|
|
1282
|
+
q=a.g.dash.xlinkFailGracefully;r=Sv(k,a.g.retryParameters,q,c,a.j.networkingEngine);Qg(a.R,r);return v.g(r.promise,2)}u=v.i;return v.return(Ox(a,u,c))})}
|
|
1283
|
+
function Ox(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q,R,ia,W,xa,ta,ra,ya,sa,Ea,ma,Aa,qa,ua,lb,pb,nc,$b,lc,Of,jd,kd,Pf,ld,Oj,qh,rh;return G(function($c){switch($c.h){case 1:a.i&&a.i.l.clear();d=[c];e=[];f=new Map;g=Ed(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Gd(l))q=Bc(d,[n])[0],m&&(a.i?Fw(a.i,"Location",m,q):f.set(m,q)),e.push(q);a.i?(r=Gw(a.i,"Location",!0),r.length>0&&(d=a.B=r)):e.length&&(d=a.B=e);a.l.tf=
|
|
1284
|
+
b.attributes.id||"";a.l.pe=Md(b,"publishTime",Pd)||0;a.H=Ed(b,"PatchLocation");u=Promise.resolve();if((v=Id(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.i)a.i.i=d,a.i.h=w;else if(a.i=new Bw(a.j),a.i.configure(a.g),a.i.setManifestType("DASH"),a.i.i=d,a.i.h=w,y=Gd(v))(x=Md(v,"queryBeforeStart",Wd,!1))?u=Cw(a.i,y):Cw(a.i,y);z=t(f.keys());for(C=z.next();!C.done;C=z.next())H=C.value,D=f.get(H),Fw(a.i,"Location",H,D)}A=Ed(b,"BaseURL");B=!1;if(a.i)for(I=t(A),E=I.next();!E.done;E=
|
|
1285
|
+
I.next())K=E.value,J=K.attributes.serviceLocation,O=Gd(K),J&&O&&(Fw(a.i,"BaseURL",J,O),B=!0);a.X.splice(0);B&&a.i||(P=A.map(Gd),a.X.push.apply(a.X,F(Bc(d,P))));M=a.i;L=a.X;Q=Px;R=Q.call(Gx,M,B,L);a.l.bb=R;ia=0;A&&A.length&&(ia=Md(A[0],"availabilityTimeOffset",Vd)||0);a.l.rb=ia;a.K=Md(b,"minimumUpdatePeriod",Qd,-1);W=Md(b,"availabilityStartTime",Pd);xa=Md(b,"timeShiftBufferDepth",Qd);ta=a.g.dash.ignoreSuggestedPresentationDelay;ra=null;ta||(ra=Md(b,"suggestedPresentationDelay",Qd));ya=a.g.dash.ignoreMaxSegmentDuration;
|
|
1286
|
+
sa=null;ya||(sa=Md(b,"maxSegmentDuration",Qd));Ea=b.attributes.type||"static";a.h&&a.h.presentationTimeline&&(a.V=a.h.presentationTimeline.U()&&Ea=="static");a.l.type=Ea;if(a.h)for(ma=a.h.presentationTimeline,Aa=ma.Jb(),qa=t(a.o.values()),ua=qa.next();!ua.done;ua=qa.next())lb=ua.value,lb.segmentIndex&&lb.segmentIndex.Ya(Aa);else pb=a.g.dash.ignoreMinBufferTime,nc=0,pb||(nc=Md(b,"minBufferTime",Qd)||0),$b=0,$b=ra!=null?Math.min(ra,xa||Infinity):a.g.defaultPresentationDelay>0?a.g.defaultPresentationDelay:
|
|
1287
|
+
Math.min(nc*1.5,xa||Infinity),ma=new wl(W,$b,a.g.dash.autoCorrectDrift);ma.$c(Ea=="static");(lc=ma.U())&&!isNaN(a.g.availabilityWindowOverride)&&(xa=a.g.availabilityWindowOverride);xa==null&&(xa=Infinity);ma.If(xa);Of=b.attributes.profiles||"";a.l.profiles=Of.split(",");jd={Gb:Ea!="static",presentationTimeline:ma,ua:null,na:null,qa:null,L:null,bandwidth:0,Lg:!1,rb:ia,vc:null,profiles:Of.split(","),roles:null,Lb:Qx};return $c.g(u,2);case 2:a.N=0;kd=Rx(a,jd,R,b,!1);Pf=kd.duration;ld=kd.periods;(Ea!=
|
|
1288
|
+
"static"||a.V)&&kd.Yh||ma.Ab(Pf||Infinity);a.T&&a.va&&ma.Qi(a.ba);ma.Tg(sa||1);a.T&&a.va&&(Oj=ra!=null?ra:a.g.defaultPresentationDelay,ma.ph(Oj));if(!a.h)return $c.g(a.m.hg(ld,jd.Gb),6);a.h.periodCount=ld.length;a.h.gapCount=a.N;return $c.g(Sx(a,ld,!1),4);case 6:var Pj=ma,Qf=a.m.l,sh=a.m.Jg(),Rf=a.m.i,Qj=a.g.dash.sequenceMode;var qb=Id(b,"ServiceDescription");if(qb){var ac=Id(qb,"Latency");qb=Id(qb,"PlaybackRate");if(ac||qb){var Rb={};ac&&("target"in ac.attributes&&(Rb.targetLatency=parseInt(ac.attributes.target,
|
|
1289
|
+
10)/1E3),"max"in ac.attributes&&(Rb.maxLatency=parseInt(ac.attributes.max,10)/1E3),"min"in ac.attributes&&(Rb.minLatency=parseInt(ac.attributes.min,10)/1E3));qb&&("max"in qb.attributes&&(Rb.maxPlaybackRate=parseFloat(qb.attributes.max)),"min"in qb.attributes&&(Rb.minPlaybackRate=parseFloat(qb.attributes.min)));ac=Rb}else ac=null}else ac=null;a:{qb=Ed(b,"SupplementalProperty");if(qb.length)for(qb=t(qb),Rb=qb.next();!Rb.done;Rb=qb.next())if(Rb=Rb.value,Rb.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016"){qb=
|
|
1290
|
+
Rb.attributes.value;break a}qb=null}a.h={presentationTimeline:Pj,variants:Qf,textStreams:sh,imageStreams:Rf,offlineSessionIds:[],sequenceMode:Qj,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:ac,nextUrl:qb,periodCount:ld.length,gapCount:a.N,isLowLatency:a.T,startTime:null};if(!ma.hj()){$c.A(7);break}qh=Ed(b,"UTCTiming");return $c.g(Tx(a,R,qh),8);case 8:rh=$c.i;if(!a.j)return $c.return();ma.Ri(rh);case 7:ma.nf(),a.m&&!a.h.presentationTimeline.U()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.h),
|
|
1291
|
+
Ux(a),Vx(a,ld),$c.j()}})}function Sx(a,b,c){var d;return G(function(e){if(e.h==1)return e.g(a.m.hg(b,!0,c),2);a.h.variants=a.m.l;d=a.m.Jg();d.length>0&&(a.h.textStreams=d);a.h.imageStreams=a.m.i;a.j.filter(a.h);e.j()})}
|
|
1292
|
+
function Nx(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J;return G(function(O){if(O.h==1){c=b.attributes.mpdId;d=Md(b,"originalPublishTime",Pd);if(!c||c!==a.l.tf||d!==a.l.pe)throw a.H=[],new S(1,4,4052);e=[];f=[];g=new Set;h=t(Dd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Yd(l.attributes.sel||""),n=m[m.length-1],q=Gd(l)||"",n.name==="MPD")if(n.Ec==="mediaPresentationDuration"){r=Gd(l)||"";var P=Qd(r);if(P!=null){a.l.vc=P;for(var M=t(a.u.values()),L=M.next();!L.done;L=M.next())L.value.vc=
|
|
1293
|
+
P}}else if(n.Ec==="type"){a.h.presentationTimeline.$c(q=="static");a.l.type=q;P=t(a.u.values());for(M=P.next();!M.done;M=P.next())M.value.Gb=q=="dynamic";q=="static"&&(a.K=-1)}else n.Ec==="publishTime"?a.l.pe=Pd(q)||0:n.Ec===null&&l.tagName==="add"&&f.push(l);else if(n.name==="PatchLocation")Zd(a.H,l);else if(n.name==="Period")l.tagName==="add"?f.push(l):l.tagName==="remove"&&n.id&&Wx(a,n.id);else if(n.name==="SegmentTemplate"){M=Yd(l.attributes.sel||"");P=M[M.length-1];if(P.Ec){M=Xx(a,M);L=Gd(l)||
|
|
1294
|
+
"";for(var Q=t(M),R=Q.next();!R.done;R=Q.next())R=a.u.get(R.value),ae(R.L.Oc,l.tagName,P.Ec,L);P=M}else P=[];u=P;v=t(u);for(w=v.next();!w.done;w=v.next())y=w.value,g.add(y)}else if(n.name==="SegmentTimeline"||n.name==="S"){P=Yd(l.attributes.sel||"");P=Xx(a,P);M=t(P);for(L=M.next();!L.done;L=M.next())L=a.u.get(L.value),L=Pv(L,rw,"SegmentTimeline"),Q=Ed(L,"S"),Zd(Q,l),L.children=Q;x=P;z=t(x);for(C=z.next();!C.done;C=z.next())H=C.value,g.add(H)}D=t(g);for(A=D.next();!A.done;A=D.next())B=A.value,Yx(a,
|
|
1295
|
+
B);I=t(f);for(E=I.next();!E.done;E=I.next())K=E.value,e.push.apply(e,F(Rx(a,{Gb:a.l.type=="dynamic",presentationTimeline:a.h.presentationTimeline,ua:null,na:null,qa:null,L:null,bandwidth:0,Lg:!1,rb:a.l.rb,profiles:a.l.profiles,vc:a.l.vc,roles:null,Lb:Qx},a.l.bb,K,!0).periods));if(!e.length)return O.A(2);a.h.periodCount+=e.length;a.h.gapCount=a.N;return O.g(Sx(a,e,!0),2)}a.l.type=="static"&&(J=a.l.vc,a.h.presentationTimeline.Ab(J||Infinity));O.j()})}
|
|
1296
|
+
function Wx(a,b){a.h.periodCount--;for(var c=t(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);Pv(e,rw,"SegmentTimeline").children=[];Yx(a,d);a.u.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
|
|
1297
|
+
function Xx(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,g.name==="Period"?c=g.id:g.name==="AdaptationSet"?(d=g.id,g.position!==null&&(e=g.position)):g.name==="Representation"&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.ua.id===c&&a.qa.id===d&&a.L.id&&b.push(c+","+a.L.id);else if(e>-1)for(d=t(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.ua.id===c&&a.qa.position===e&&a.L.id&&b.push(c+
|
|
1298
|
+
","+a.L.id);return b}function Yx(a,b){var c=a.u.get(b),d=a.o.get(b);d.segmentIndex&&d.segmentIndex.Ya(a.h.presentationTimeline.Jb());try{var e=qw(c,function(f,g,h,k){return Zx(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.za,c.L.aesKey,null,!0,a.C);d.createSegmentIndex=function(){return G(function(f){if(f.h==1)return d.segmentIndex?f.A(0):f.g(e.Sc(),3);d.segmentIndex=f.i;f.j()})}}catch(f){if(b=c.L.contentType,b!=Hc&&b!="application"&&b!="image"||f.code!=4002)throw f;}}
|
|
1299
|
+
function Rx(a,b,c,d,e){var f=b.vc;f||(f=Md(d,"mediaPresentationDuration",Qd),a.l.vc=f);var g=0;a.h&&a.h.presentationTimeline&&a.V&&(g=a.h.presentationTimeline.$b());var h=[],k=g;d=Ed(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=Md(m,"start",Qd,k),r=m.attributes.id,u=Md(m,"duration",Qd);q=l==0&&q==0&&a.V?g:q;var v=null;if(n){var w=Md(n,"start",Qd);w!=null&&(v=w-q+g)}else f!=null&&(v=f-q+g);w=Kc;v&&u&&Math.abs(v-u)>w&&v>u&&a.N++;v==null&&(v=u);if(!(a.O!==null&&r!==null&&q!==null&&q<
|
|
1300
|
+
a.O)||a.G.includes(r)||l+1==d.length){q!==null&&(a.O===null||q>a.O)&&(a.O=q);k=$x(a,b,c,{start:q,duration:v,node:m,hf:v==null||!n});h.push(k);b.ua.id&&v&&a.za.set(b.ua.id,v);if(v==null){k=null;break}k=q+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(y){return y.id});return f!=null?{periods:h,duration:f+g,Yh:!1}:{periods:h,duration:k,Yh:!0}}
|
|
1301
|
+
function Ux(a){var b=Array.from(a.D.keys()).filter(function(h){return!a.G.includes(h)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=t(a.D.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.o.get(f);g&&(g.segmentIndex&&g.segmentIndex.getNumReferences()!=0?d=!1:(a.m&&a.m.Wh(g,c),a.o.delete(f)))}d&&a.D.delete(c)}}function Vx(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(a.C.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.C.delete(d)}
|
|
1302
|
+
function $x(a,b,c,d){b.ua=ay(a,d.node,null,c);b.na=d;b.ua.rb=b.rb;b.ua.id||(b.ua.id="__shaka_period_"+d.start);var e=Ed(d.node,"EventStream");c=b.presentationTimeline.Jb();e=t(e);for(var f=e.next();!f.done;f=e.next())by(a,d.start,d.duration,f.value,c);c=Ed(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(e=cy(a,e)))b.Lb=e;c=Ed(d.node,"AdaptationSet").map(function(r,u){return dy(a,b,u,r)}).filter(rf);if(b.Gb){e=
|
|
1303
|
+
[];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.Pk);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new S(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.xj),h=g.next();!h.done;h=g.next()){var k=t(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=t(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=t(h.streams),m=l.next(),n={};!m.done;n={wh:void 0},m=l.next())if(n.wh=m.value,e.has(n.wh.originalId)){f||
|
|
1304
|
+
(f=Ed(d.node,"AdaptationSet").map(function(r,u){return dy(a,b,u,r)}).filter(rf));m=t(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(u){return u.originalId==r.wh.originalId}}(n)))q.dependencyStream=e.get(q.originalId),q.originalId+=q.dependencyStream.originalId,k.push(q)}k.length&&h.streams.push.apply(h.streams,F(k))}d=c.filter(function(r){return!r.Eh});c=c.filter(function(r){return r.Eh});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e=
|
|
1305
|
+
e.value,f=e.Eh.split(" "),g=t(d),h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=t(h.streams),k=h.next();!k.done;k=h.next())tg(k.value,e.streams);c=ey(a.g.disableAudio,d,"audio");e=ey(a.g.disableVideo,d,"video");f=ey(a.g.disableText,d,Hc);d=ey(a.g.disableThumbnails,d,"image");if(e.length===0&&c.length===0)throw new S(2,4,4004);return{id:b.ua.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
|
|
1306
|
+
function ey(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,F(e.streams));return d},[])}
|
|
1307
|
+
function dy(a,b,c,d){function e(J){var O=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"];O&&J&&(J=Bc(b.qa.bb(),[J],b.Lb()),a.j.addFont(O,J[0]))}function f(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.qa=ay(a,d,b.ua,null);b.qa.position=c;var h=!1;c=Ed(d,"Role");var k=c.map(function(J){return J.attributes.value}).filter(rf),
|
|
1308
|
+
l=void 0,m=b.qa.contentType==Hc;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(q==null||q=="urn:mpeg:dash:role:2011")switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=Ed(d,"EssentialProperty");c=null;var u=!1;n=null;q=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if(w=="http://dashif.org/guidelines/trickmode")c=v.attributes.value;else if(w=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var y=
|
|
1309
|
+
g(parseInt(v.attributes.value,10));else if(w=="urn:mpeg:mpegB:cicp:ColourPrimaries")var x=f(parseInt(v.attributes.value,10));else w!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(w=="urn:mpeg:dash:ssr:2023"&&a.g.dash.enableFastSwitching?u=!0:w=="urn:dvb:dash:fontdownload:2014"?e(v):w=="urn:mpeg:dash:urlparam:2014"?(n=cy(a,v))||(q=!0):q=!0)}if(q)return null;var z=null;q=Ed(d,"SupplementalProperty");q=t(q);for(r=q.next();!r.done;r=q.next())r=r.value,v=r.attributes.schemeIdUri,v=="http://dashif.org/guidelines/last-segment-number"?
|
|
1310
|
+
z=parseInt(r.attributes.value,10)-1:v=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?y=g(parseInt(r.attributes.value,10)):v=="urn:mpeg:mpegB:cicp:ColourPrimaries"?x=f(parseInt(r.attributes.value,10)):v=="urn:dvb:dash:fontdownload:2014"?e(r):v=="urn:mpeg:dash:urlparam:2014"&&(n=cy(a,r));n&&(b.Lb=n);n=Ed(d,"Accessibility");var C=new Map,H;n=t(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,q!="urn:scte:dash:cc:cea-608:2015"||a.g.disableText)if(q!="urn:scte:dash:cc:cea-708:2015"||
|
|
1311
|
+
a.g.disableText)q=="urn:mpeg:dash:role:2011"?r!=null&&(k.push(r),r=="captions"&&(l="caption")):q=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(r=="1"?H="visually impaired":r=="2"?H="hard of hearing":r=="9"&&(H="spoken subtitles"));else if(q=1,r!=null)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var D=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],D=w[1].split(",")[0].split(":").pop()):(v="svc"+q,q++,D=w);C.set(v,vf(D))}else C.set("svc1","und");else if(q=1,r!=null)for(r=r.split(";"),
|
|
1312
|
+
v=t(r),w=v.next();!w.done;w=v.next()){D=w.value;var A=w=void 0;D.includes("=")?(D=D.split("="),w=D[0].startsWith("CC")?D[0]:"CC"+D[0],A=D[1]||"und"):(w="CC"+q,r.length==2?q+=2:q++,A=D);C.set(w,vf(A))}else C.set("CC1","und");n=Ed(d,"ContentProtection");var B=Ev(a.ya,n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.qa.encrypted=n.length>0;var I=vf(b.qa.language||"und"),E=b.qa.label,K=new Map;d=Ed(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];q=t(d);for(r=q.next();!r.done;r=q.next())if(v=
|
|
1313
|
+
r.value,r=Nd(v,"urn:scte:dash:scte214-extensions","supplementalCodecs"))v=td(v),v.attributes.codecs=r.split(" ").join(","),v.attributes.id&&(v.attributes.supplementalId=v.attributes.id+"_supplementalCodecs"),n.push(v);d.push.apply(d,F(n))}n=d.map(function(J){var O=fy(a,b,B,l,I,E,h,k,C,J,H,z);return O&&(O.hdr=O.hdr||y,O.colorGamut=O.colorGamut||x,O.fastSwitching=u,J=J.attributes.dependencyId)?(O.baseOriginalId=J,K.set(J,O),null):O}).filter(function(J){return!!J});if(n.length==0&&K.size==0){c=b.qa.contentType==
|
|
1314
|
+
"image";if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new S(2,4,4003);}if(!b.qa.contentType||b.qa.contentType=="application")for(b.qa.contentType=gy(n[0].mimeType,n[0].codecs),m=t(n),q=m.next();!q.done;q=m.next())q.value.type=b.qa.contentType;m=b.qa.id||"__fake__"+a.Ga++;q=t(n);for(r=q.next();!r.done;r=q.next()){r=r.value;v=t(B.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(F(w.keyIds),F(r.keyIds))):w.keyIds||r.keyIds;a.g.enableAudioGroups&&
|
|
1315
|
+
(r.groupId=m)}d=d.map(function(J){return J.attributes.supplementalId||J.attributes.id}).filter(rf);return{id:m,contentType:b.qa.contentType,language:I,Dm:h,streams:n,drmInfos:B.drmInfos,Eh:c,Pk:d,xj:K}}
|
|
1316
|
+
function cy(a,b){if((b=Jd(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&Md(b,"useMPDUrlQuery",Wd,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return c=="$querypart$"?a.$:c.split("&").map(function(d){if(d=="$querypart$")return a.$;var e=/\$query:(.*?)\$/g.exec(d);if(e&&e.length==2){e=e[1];var f=(new Fb(a.$)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
|
|
1317
|
+
function fy(a,b,c,d,e,f,g,h,k,l,m,n){b.L=ay(a,l,b.qa,null);var q=b.L.id;a.ba=Math.min(a.ba,b.L.rb);a.T=a.ba>0;if(!hy(b.L))return null;var r=b.na.start;b.bandwidth=Md(l,"bandwidth",Td)||0;b.roles=h;var u=Ed(l,"SupplementalProperty"),v=Ed(l,"EssentialProperty"),w=Ed(l,"ContentProtection");l=null;var y=v.find(function(M){return M.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});y?l=cy(a,y):(y=u.find(function(M){return M.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"}))&&(l=cy(a,y));l&&
|
|
1318
|
+
(b.Lb=l);y=b.L.contentType;l=y==Hc||y=="application";y=y=="image";w.length&&(b.qa.encrypted=!0);try{var x=void 0;if(c.dg){var z=b.L.bb,C=b.Lb,H=Bc(z(),[c.dg.rk],C()),D=Wg(H,a.g.retryParameters);x={bitsKey:128,blockCipherMode:"CBC",iv:c.dg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var M,L,Q;return G(function(R){if(R.h==1)return R.g(Lx(a,D,6),2);if(R.h!=3){M=R.i;if(!M.data||M.data.byteLength!=16)throw new S(2,4,4049);L={name:"AES-CBC"};Q=x;return R.g(window.crypto.subtle.importKey("raw",M.data,
|
|
1319
|
+
L,!0,["decrypt"]),3)}Q.cryptoKey=R.i;x.fetchKey=void 0;R.j()})}}}b.L.aesKey=x;z=function(M,L,Q,R){return Zx(a,M,L,Q,R)};if(b.L.Jd)var A=fw(b,z,x);else if(b.L.Bc)A=lw(b,a.o,x);else if(b.L.Oc)A=qw(b,z,a.o,!!a.h,a.g.dash.initialSegmentLimit,a.za,x,n,!1,a.C);else{var B=b.na.duration||0,I=b.L.bb,E=b.L.mimeType,K=b.L.codecs;A={endTime:-1,timeline:-1,Sc:function(){var M=Xl(r,B,I());M.Hb(function(L){L.mimeType=E;L.codecs=K});return Promise.resolve(M)},timescale:1}}}catch(M){if((l||y)&&M.code==4002)return null;
|
|
1320
|
+
throw M;}n=Iv(a.ya,w,c,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;u.some(function(M){return M.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&M.attributes.value=="JOC"})&&(w=!0);u=!1;l&&(u=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var J;if(y&&((v=v.find(function(M){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(J=v.attributes.value),!J))return null;
|
|
1321
|
+
var O;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(O="PQ");v=b.L.id?b.ua.id+","+b.L.id:"";a.H.length&&q&&a.u.set(b.ua.id+","+q,iy(b));b.L.zf&&jy(a,b.L.zf,A,b.presentationTimeline);A.endTime!=-1&&b.ua.id!=null&&b.L.id!=null&&((q=a.C.get(b.ua.id))?(q.endTime=A.endTime,q.eh.includes(b.L.id)||q.eh.push(b.L.id),a.C.set(b.ua.id,q)):a.C.set(b.ua.id,{endTime:A.endTime,timeline:A.timeline,eh:[b.L.id]}));
|
|
1322
|
+
var P=v&&a.o.has(v)?a.o.get(v):{id:a.Ga++,originalId:b.L.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){P.segmentIndex&&(P.segmentIndex.release(),P.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:l,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:c.drmInfos.length>0,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.qa.language,label:f,
|
|
1323
|
+
type:b.qa.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:u,channelsCount:b.L.wf,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:O,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Qe(b.L.mimeType,b.L.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};P.createSegmentIndex=function(){var M;return G(function(L){if(L.h==1){if(P.segmentIndex)return L.A(0);
|
|
1324
|
+
M=P;return L.g(A.Sc(),3)}M.segmentIndex=L.i;L.j()})};v&&b.Gb&&!a.o.has(v)&&(b=b.ua.id||"",a.D.has(b)||a.D.set(b,[]),a.o.set(v,P),a.D.get(b).push(v));return P}
|
|
1325
|
+
function jy(a,b,c,d){if(!a.ma.has(b)){a.ma.add(b);var e=Md(b,"presentationTime",Ud)||0,f=Id(b,"UTCTiming"),g;if(g=f&&f.attributes.schemeIdUri)f=f.attributes.schemeIdUri,g=!(f==="urn:mpeg:dash:utc:http-ntp:2014"||f==="urn:mpeg:dash:utc:ntp:2014"||f==="urn:mpeg:dash:utc:sntp:2014");g?b=(Md(b,"wallClockTime",Pd)||0)*1E3:(b=Md(b,"wallClockTime",Ud)||0,b=ck(b));c=new Date(b-e/c.timescale*1E3);e=c.getTime()/1E3;isNaN(e)||(d.o||d.qh(e),d=(new Map).set("detail",{wallClockTime:b,programStartDate:c}),d=new T("prft",
|
|
1326
|
+
d),a.j.onEvent(d))}}function iy(a){function b(c){if(!c)return null;c=ud(c);c.Jd=null;c.Bc=null;c.Oc=ce(c.Oc);c.zf=null;return c}a=ud(a);a.ua=b(a.ua);a.qa=b(a.qa);a.L=b(a.L);a.na&&(a.na=ud(a.na),a.na.node=null);return a}
|
|
1327
|
+
function Hx(a){var b,c;return G(function(d){switch(d.h){case 1:return b=0,d.m(2),d.g(Ix(a),4);case 4:b=d.i;d.o(3);break;case 2:if(c=d.l(),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Jx(a,b);d.j()}})}function Jx(a,b){if(!(a.K<0)){var c=a.K;a.g.updatePeriod>=0&&(c=a.g.updatePeriod);a.M.ka(Math.max(c-b,Sa(a.Da)))}}
|
|
1328
|
+
function ay(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,wf:null,audioSamplingRate:null,rb:0,Ff:1,encrypted:!1};d=d||c.bb;var e=b.attributes.id,f=b.attributes.supplementalId,g=Ed(b,"BaseURL"),h,k=!1;if(a.i)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=Gd(n);m&&n&&(Fw(a.i,e,m,n),k=!0)}k&&a.i||(h=g.map(Gd));var q=a.i;a=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;
|
|
1329
|
+
m=Bm([b.attributes.codecs||c.codecs]).join(",");n=Md(b,"frameRate",Xd)||c.frameRate;var r=b.attributes.sar||c.pixelAspectRatio,u=ky(Ed(b,"InbandEventStream"),c.emsgSchemeIdUris),v=Ed(b,"AudioChannelConfiguration");v=ly(v)||c.wf;var w=Md(b,"audioSamplingRate",Ud)||c.audioSamplingRate;a||(a=gy(l,m));var y=Id(b,"SegmentBase"),x=Id(b,"SegmentTemplate"),z=y?Md(y,"availabilityTimeOffset",Vd)||0:0,C=x?Md(x,"availabilityTimeOffset",Vd)||0:0,H=g&&g.length?Md(g[0],"availabilityTimeOffset",Vd)||0:0;z=c.rb+H+
|
|
1330
|
+
z+C;C=null;(H=Id(b,"SegmentSequenceProperties"))&&(H=Md(H,"cadence",Td))&&(C=H);H=b.attributes.label;var D=Ed(b,"Label");D&&D.length&&(D=D[0],Fd(D)&&(H=Fd(D)));return{bb:function(){return Bc(d(),g.length?q&&k?Gw(q,e):h?h:[]:[])},Jd:y||c.Jd,Bc:Id(b,"SegmentList")||c.Bc,Oc:x||c.Oc,zf:Id(b,"ProducerReferenceTime")||c.zf,width:Md(b,"width",Ud)||c.width,height:Md(b,"height",Ud)||c.height,contentType:a,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e,language:b.attributes.lang,
|
|
1331
|
+
wf:v,audioSamplingRate:w,rb:z,ef:null,Ff:C||c.Ff,label:H||null,encrypted:!1}}function ky(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
1332
|
+
function ly(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
|
|
1333
|
+
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&b>0&&b<c.length)return c[b]}}return null}
|
|
1334
|
+
function hy(a){var b=a.Jd?1:0;b+=a.Bc?1:0;b+=a.Oc?1:0;if(b==0)return a.contentType==Hc||a.contentType=="application"?!0:!1;b!=1&&(a.Jd&&(a.Bc=null),a.Oc=null);return!0}
|
|
1335
|
+
function my(a,b,c,d){var e,f,g,h,k,l,m;return G(function(n){if(n.h==1)return e=[tc(c)],f=Bc(b(),e),g=Wg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.oa()}),Qg(a.R,h),n.g(h.promise,2);k=n.i;if(d=="HEAD"){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=mc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
1336
|
+
function Tx(a,b,c){var d,e,f,g,h,k,l,m;return G(function(n){switch(n.h){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;n.m(5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.A(8);
|
|
1337
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Wa("NTP UTCTiming scheme is not supported");break;default:Wa("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return n.g(my(a,b,l,"HEAD"),10);case 10:return n.return(n.i);case 8:return n.g(my(a,b,l,"GET"),11);case 11:return n.return(n.i);case 9:n.o(3);
|
|
1338
|
+
break;case 5:n.l();case 3:g=f.next();n.A(2);break;case 4:return Wa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
1339
|
+
function by(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=Md(d,"timescale",Ud)||1,k=Md(d,"presentationTimeOffset",Ud)||0;d=t(Ed(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=Md(l,"presentationTime",Ud)||0,n=Md(l,"duration",Ud)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;c!=null&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",timescale:h,eventElement:be(l),eventNode:ce(l)},a.j.onTimelineRegionAdded(l))}}
|
|
1340
|
+
function Zx(a,b,c,d,e){var f,g,h,k;return G(function(l){if(l.h==1)return f=bh,g=e?0:1,h=Im(b,c,d,a.g.retryParameters),l.g(Lx(a,h,f,{type:g}),2);k=l.i;return l.return(k.data)})}function gy(a,b){b=Qe(a,b);return ef(b)?Hc:a.split("/")[0]}function Lx(a,b,c,d){d||(d={});d.isPreload=a.oa();b=a.j.networkingEngine.request(c,b,d);Qg(a.R,b);return b.promise}
|
|
1341
|
+
function Kx(a){var b=a.l.pe;if(!a.l.tf||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=Ud(e.attributes.ttl);return!e||b+e>c}).map(Gd).filter(rf);return d.length?Bc(a.B,d):[]}function Qx(){return""}function Px(a,b,c){return function(){return a&&b?Gw(a,"BaseURL"):c.slice()}}N("shaka.dash.DashParser",Gx);Qc("application/dash+xml",function(){return new Gx});Qc("video/vnd.mpeg.dash.mpd",function(){return new Gx});function ny(){}N("shaka.dependencies",ny);ny.has=function(a){return oy.has(a)};ny.add=function(a,b){if(!py[a])throw Error(a+" is not supported");a==qy?ub("mux.js","mux.js is no longer used in Shaka Player."):oy.set(a,function(){return b})};var qy="muxjs",py={Em:qy,ISOBoxer:"ISOBoxer"};ny.Allowed=py;var oy=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function ry(){this.j=new mb(function(){for(var a=navigator.userAgent.toLowerCase(),b=t([{type:"VR",dh:/oculus|quest/},{type:"TV",dh:/smart[ _]?tv|android ?tv/},{type:"MOBILE",dh:/iphone|ipad|ipod|android/}]),c=b.next();!c.done;c=b.next())if(c=c.value,c.dh.test(a))return c.type;a=navigator.userAgentData;var d;b=(a==null?void 0:(d=a.platform)==null?void 0:d.toLowerCase())||"";if(a){if(a.mobile)return"MOBILE";if(b.includes("android"))return"TV"}return"DESKTOP"});this.l=new mb(function(){var a=navigator.userAgent;
|
|
1342
|
+
return navigator.vendor.includes("Apple")&&(a.includes("Version/")||a.includes("OS/"))?"WEBKIT":a.includes("Edge/")?"EDGE":a.includes("Chrome/")?"CHROMIUM":a.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Tc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=ry.prototype;p.kc=function(){return!!navigator.mediaCapabilities};p.Oa=function(){return this.j.value()};p.Ia=function(){return this.l.value()};p.Gd=function(){return!1};p.gh=function(){return!1};
|
|
1343
|
+
p.gf=function(){return!1};p.Ji=function(){return!1};p.re=function(){return!1};p.dd=function(){return!0};p.Bb=function(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType};p.ve=function(){return!0};p.Oi=function(){return 0};p.nc=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Xi=function(){return!1};p.sh=function(){return!1};
|
|
1344
|
+
p.Wa=function(a){var b=this.Oa();if(b==="TV"||b==="CONSOLE"||b==="CAST")a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.yh=function(){return!!window.indexedDB};p.Hi=function(){return[]};p.rd=function(a){return window.matchMedia!==void 0&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"};p.dj=function(){return!1};p.xi=function(){return!1};p.Cf=function(){return!1};p.Lf=function(){return!0};p.zi=function(){return!1};
|
|
1345
|
+
p.cj=function(){return!0};p.cd=function(){return!1};p.Sg=function(a){return a==="com.apple.fps"};p.Kf=function(){return!0};p.toString=function(){return"Device: "+this.Nb()+" v"+this.Ba()+"; Type: "+this.Oa()};function sy(){ry.call(this);this.g=new mb(function(){var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null});this.h=new mb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}na(sy,ry);p=sy.prototype;p.Ba=function(){return this.g.value()};p.Nb=function(){return"Apple Browser"};p.Oa=function(){return this.h.value()};
|
|
1346
|
+
p.Ia=function(){return"WEBKIT"};p.kc=function(){return!1};p.Gd=function(a,b){return b==="audio"};p.gf=function(){return!0};p.Ji=function(a){return a==="audio"};p.Wa=function(a){ry.prototype.Wa.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.dj=function(){return!0};p.Kf=function(){return!1};
|
|
1347
|
+
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(rb=function(){return new sy});function ty(){if(!uy())throw Error("Not a Chromecast device!");ry.call(this);this.h=new mb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new mb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?vy:a.includes("fuchsia")?wy:xy})}na(ty,ry);p=ty.prototype;p.Ba=function(){return this.h.value()};p.Nb=function(){return"Chromecast with "+this.g.value()};
|
|
1348
|
+
p.Oa=function(){return"CAST"};p.Ia=function(){return"CHROMIUM"};p.kc=function(){return ry.prototype.kc.call(this)&&this.g.value()!==xy};p.Bb=function(){return ry.prototype.Bb.call(this)&&this.g.value()!==xy};p.Oi=function(){switch(this.g.value()){case vy:return 0;case wy:return 3;default:return 1}};
|
|
1349
|
+
p.nc=function(){var a,b,c,d,e;return G(function(f){switch(f.h){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};f.m(2);if(!(c=a)){f.A(4);break}return f.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.i;case 4:if(c){b.width=3840;b.height=2160;f.A(6);break}if(!(d=a)){f.A(7);break}return f.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
|
|
1350
|
+
f.i;case 7:d&&(b.width=1920,b.height=1080);case 6:f.o(3);break;case 2:e=f.l(),Va("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.Wa=function(a){ry.prototype.Wa.call(this,a);a.streaming.stallSkip=0;return a};p.yh=function(){return!1};p.cd=function(){return!0};function uy(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var vy="Android",wy="Fuchsia",xy="Linux";uy()&&(rb=function(){return new ty});function yy(){ry.call(this);var a=this;this.i=new mb(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new mb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new mb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?
|
|
1351
|
+
navigator.platform.toLowerCase().includes("win32"):!1});this.u=new mb(function(){return ry.prototype.Bb.call(a)?navigator.userAgent.match(/Edge?\//)?!a.h.value():!0:!1});this.o=new mb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")});this.m=new mb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":navigator.userAgent.includes("Android")?!0:!1})}na(yy,ry);p=yy.prototype;p.Ba=function(){return this.i.value()};
|
|
1352
|
+
p.Nb=function(){return this.g.value()};p.Gd=function(a){return dc(a)?this.g.value()==="Edge"&&this.h.value():!1};p.gh=function(){return this.g.value()==="Edge"&&this.h.value()};p.gf=function(){return this.g.value()==="Edge"&&this.h.value()};p.Bb=function(){return this.u.value()};
|
|
1353
|
+
p.Wa=function(a){ry.prototype.Wa.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}this.m.value()&&(a.drm.defaultAudioRobustnessForWidevine="",a.drm.defaultVideoRobustnessForWidevine="");
|
|
1354
|
+
return a};p.Cf=function(){return this.g.value()==="Edge"||this.o.value()};p.cd=function(){if(this.Ia()==="GECKO"){var a=this.Ba();return a!==null?a>=100:ry.prototype.cd.call(this)}return ry.prototype.cd.call(this)};p.Sg=function(a){return this.Ia()==="GECKO"?a.startsWith("com.microsoft.playready.recommendation"):ry.prototype.Sg.call(this,a)};sb=function(){return new yy};function zy(){ry.apply(this,arguments)}na(zy,ry);p=zy.prototype;p.Ba=function(){return null};p.Nb=function(){return"Hisense"};p.Oa=function(){return"TV"};p.kc=function(){return!1};p.Bb=function(){return!1};p.nc=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}b==null&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};
|
|
1355
|
+
p.Wa=function(a){ry.prototype.Wa.call(this,a);a.streaming.stallSkip=0;return a};if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))rb=function(){return new zy};function Ay(){ry.call(this);this.g=new mb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}na(Ay,ry);p=Ay.prototype;p.Nb=function(){return"PlayStation"};p.Oa=function(){return"CONSOLE"};p.Ia=function(){return"WEBKIT"};p.Ba=function(){return this.g.value()};p.kc=function(){return!1};p.dd=function(){return!1};p.Bb=function(){return!1};p.sh=function(){return this.Ba()===4};
|
|
1356
|
+
p.nc=function(){var a,b,c,d,e;return G(function(f){switch(f.h){case 1:return a={width:1920,height:1080},b=!1,f.m(2),f.g(window.msdk.device.getDisplayInfo(),4);case 4:c=f.i;b=c.resolution==="4K";f.o(3);break;case 2:return f.l(),f.m(5),f.g(window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.i;b=d.resolution==="4K";f.o(3);break;case 5:e=f.l(),Wa("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
|
|
1357
|
+
p.Wa=function(a){ry.prototype.Wa.call(this,a);this.Ba()===4&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.Cf=function(){return this.Ba()===4};p.Lf=function(){return this.Ba()!==4};navigator.userAgent.includes("PlayStation")&&(rb=function(){return new Ay});function By(){ry.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=a?parseInt(a[1],10):null;this.h=a?parseInt(a[2],10):null}na(By,ry);p=By.prototype;p.Ba=function(){return this.g};p.Nb=function(){return"Tizen"};p.Ia=function(){return"CHROMIUM"};p.Oa=function(){return"TV"};p.Gd=function(){return!0};p.re=function(){return this.Ba()===3};p.kc=function(){return!1};p.dd=function(){var a=this.Ba();return a!==null?a>=4:ry.prototype.dd.call(this)};p.Bb=function(){return!1};
|
|
1358
|
+
p.ve=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:ry.prototype.ve.call(this)};
|
|
1359
|
+
p.nc=function(){var a=window.devicePixelRatio;a={width:window.screen.width*a>1920?3840:1920,height:window.screen.height*a>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,
|
|
1360
|
+
a.height=2160)}catch(c){Wa("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.Wa=function(a){ry.prototype.Wa.call(this,a);a.drm.ignoreDuplicateInitData=this.Ba()!==2;this.Ba()===3&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.Hi=function(){var a=[];this.g!==null&&this.g<5&&a.push("opus");return a};
|
|
1361
|
+
p.rd=function(a){try{if(webapis.avinfo.isHdrTvSupport())return a?"HLG":"PQ"}catch(b){return ry.prototype.rd.call(this,a)}return"SDR"};p.xi=function(){return!0};p.zi=function(){return this.Ba()===3};navigator.userAgent.includes("Tizen")&&(rb=function(){return new By});function Cy(){ry.apply(this,arguments)}na(Cy,ry);Cy.prototype.Ba=function(){return null};Cy.prototype.Nb=function(){return"Vizio"};Cy.prototype.Oa=function(){return"TV"};Cy.prototype.kc=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(rb=function(){return new Cy});function Dy(){ry.call(this);this.i=new mb(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")});this.h=new mb(function(){return navigator.userAgent.includes("SOPOpenBrowser")});this.g=new mb(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null})}na(Dy,ry);p=Dy.prototype;p.Ba=function(){return this.g.value()};
|
|
1362
|
+
p.Nb=function(){return"WebKit STB"};p.Oa=function(){return"TV"};p.Ia=function(){return"WEBKIT"};p.kc=function(){return!1};p.dd=function(){var a=this.g.value();return a!==null?a>=15:!0};p.Gd=function(){return this.h.value()};p.nc=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.Lf=function(){return!this.i.value()};p.Kf=function(){return!1};
|
|
1363
|
+
if(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))rb=function(){return new Dy};function Ey(){ry.call(this);var a=this;this.h=Fy();this.g=null;try{var b=new PalmServiceBridge;b.onservicecallback=function(c){c=JSON.parse(c);var d,e,f,g;a.g=(g=(f=(d=c.configs)==null?void 0:d["tv.model.supportHDR"])!=null?f:(e=c.configs)==null?void 0:e["tv.config.supportDolbyHDRContents"])!=null?g:!1};b.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(c){Wa("WebOS: getConfigs call failed",c)}}
|
|
1364
|
+
na(Ey,ry);p=Ey.prototype;p.Ba=function(){return this.h};p.Nb=function(){return"WebOS"};p.Oa=function(){return"TV"};p.Ia=function(){return"CHROMIUM"};p.kc=function(){return!1};p.dd=function(){var a=this.Ba();return a!==null?a>3:ry.prototype.dd.call(this)};p.Bb=function(){return!1};p.ve=function(){var a=this.Ba();return a!==null?a>3:ry.prototype.ve.call(this)};
|
|
1365
|
+
p.nc=function(){var a={width:1920,height:1080};try{var b=JSON.parse(window.PalmSystem.deviceInfo);a.width=Math.max(1920,b.screenWidth);a.height=Math.max(1080,b.screenHeight)}catch(c){Wa("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.Wa=function(a){ry.prototype.Wa.call(this,a);this.Ba()===3&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};
|
|
1366
|
+
p.rd=function(a){return this.g==null?(Wa("WebOS: getConfigs call haven't finished"),ry.prototype.rd.call(this,a)):this.g?a?"HLG":"PQ":"SDR"};function Fy(){var a=null,b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(a=parseInt(b[1],10));switch(a){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}p.cj=function(){return!1};p.cd=function(){var a=this.Ba();return a!==null?a>=6:ry.prototype.cd.call(this)};
|
|
1367
|
+
if(navigator.userAgent.includes("Web0S")){var Gy=new Ey;rb=function(){return Gy}};function Hy(){ry.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}na(Hy,ry);p=Hy.prototype;p.Ba=function(){return this.h};p.Nb=function(){return"Xbox"};p.Oa=function(){return"CONSOLE"};p.Ia=function(){return this.g?"EDGE":"CHROMIUM"};p.Gd=function(){return!0};p.gh=function(){return!0};p.gf=function(){return!0};p.Xi=function(){return this.g};
|
|
1368
|
+
p.nc=function(){var a={width:1920,height:1080},b=Iy();if(b)try{var c=new b.Media.Protection.ProtectionCapabilities,d=b.Media.Protection.ProtectionCapabilityResult;b=null;do b=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(b===d.maybe);b===d.probably&&(a.width=3840,a.height=2160)}catch(e){Wa("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
|
|
1369
|
+
p.Wa=function(a){ry.prototype.Wa.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};p.Cf=function(){return!0};p.yh=function(){return!1};function Iy(){var a=null;try{a=typeof Windows!=="undefined"?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||Iy()!==null)rb=function(){return new Hy};function Jy(a,b,c){this.type=a;this.ha=b;this.segments=c||null}function Ky(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=d===void 0?null:d}Ky.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);d.length>0&&(c+=":"+d.join(","));return c};
|
|
1370
|
+
function Ly(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function My(a,b){return a.attributes.find(function(c){return c.name===b})||null}function Z(a,b,c){return(a=My(a,b))?a.value:c||null}function Ny(a,b){a=My(a,b);if(!a)throw new S(2,4,4023,b);return a.value}function Oy(a,b,c){c=c===void 0?[]:c;this.ha=b;this.g=a;this.xc=c}function Py(a,b){this.name=a;this.value=b};function Qy(a,b){return a.filter(function(c){return c.name==b})}function Ry(a,b){return a.filter(function(c){return Ny(c,"TYPE")==b})}function Sy(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Ty(a,b,c){c=c===void 0?0:c;return(a=Sy(a,b))?Number(a.value):c}function Uy(a,b,c){return b?Vy(a,[b],c):[]}function Vy(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return Wy(e,c)}));return Bc(a,d)}
|
|
1371
|
+
function Wy(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new S(2,4,4039,e);}}return a};function Xy(){this.g=0}
|
|
1372
|
+
function Yy(a,b){var c=mc(b).trim().split(/[\r\n]+/);if(!Zy.test(c[0]))throw new S(2,4,4015);b=0;for(var d=!1,e=[],f=!0,g=0;g<c.length;g++){var h=c[g],k=c[g+1];if(h.startsWith("#")&&!h.startsWith("#EXT")||f)f=!1;else{h=$y(a,h);d||(az.has(h.name)?(b=1,d=!0):h.name=="EXT-X-STREAM-INF"||h.name=="EXT-X-MEDIA"?d=!0:bz.has(h.name)&&(b=1,d=!0));if(bz.has(h.name)){if(b!=1)throw new S(2,4,4017);f=a;a=Array(Math.max(100,Math.floor((c.length-g)/2)));d=0;h=[];var l=[];for(k=null;g<c.length;g++){var m=c[g];if(m.startsWith("#EXT"))m=
|
|
1373
|
+
$y(f,m),az.has(m.name)?e.push(m):m.name=="EXT-X-MAP"?k=m:m.name=="EXT-X-PART"?l.push(m):m.name=="EXT-X-PRELOAD-HINT"?Z(m,"TYPE")=="PART"?l.push(m):Z(m,"TYPE")=="MAP"&&(m.name="EXT-X-MAP",k=m):h.push(m);else if(!m.startsWith("#")||m.startsWith("#EXT"))m=m.trim(),k&&h.push(k),h=new Oy(m,h,l),d<a.length?a[d++]=h:(a.push(h),d++),h=[],l=[]}l.length&&(k&&h.push(k),c=new Oy("",h,l),d<a.length?a[d++]=c:(a.push(c),d++));return new Jy(b,e,d<a.length?a.slice(0,d):a)}e.push(h);h.name=="EXT-X-STREAM-INF"&&(h.attributes.push(new Py("URI",
|
|
1374
|
+
k)),f=!0)}}return new Jy(b,e)}function $y(a,b){a=a.g++;var c=b.match(cz);if(!c)throw new S(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new hd(d);var f;dz.lastIndex=0;(f=md(d,dz))&&(e=f[1]);ez.lastIndex=0;for(f=md(d,ez);f;)c.push(new Py(f[1],f[2]||f[3])),id(d),f=md(d,ez)}return new Ky(a,b,c,e)}
|
|
1375
|
+
var cz=/^#(EXT[^:]*)(?::(.*))?$/,Zy=/^#EXTM3U($|[ \t\n])/m,dz=/^([^,=]+)(?:,|$)/g,ez=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,az=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),bz=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function fz(){}function gz(a,b){try{var c=hz(a);return Ig({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return Gg(d)}}
|
|
1376
|
+
function hz(a){if(!a.startsWith("data:"))throw new S(2,1,1004,a);var b=a.substring(5),c=b.indexOf(",");if(c<0)throw new S(2,1,1004,a);a=b.substring(0,c);b=decodeURIComponent(b.substring(c+1));c=a.split(";");a=c[0];var d=!1;c.length>1&&c[c.length-1].toLowerCase()=="base64"&&(d=!0,c.pop());var e;d?e=xc(b):e=rc(b);return{data:e,contentType:a,Fh:c}}N("shaka.net.DataUriPlugin",fz);fz.parse=gz;Sg("data",gz);function iz(){var a=this;this.g=this.h=null;this.G=1;this.B=new Map;this.M=new Map;this.C=new Map;this.C.set("video",new Map);this.C.set("audio",new Map);this.C.set(Hc,new Map);this.C.set("image",new Map);this.fc=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return jz(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=Ny(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=Ny(b,"URI");c=hz(e.split("?")[0]);
|
|
1377
|
+
e=e.split("?")[0];if(!a.I.has(e)){var f=Qb(c.data);a.I.set(e,f)}d=Cc("com.widevine.alpha",d,[{initDataType:"cenc",initData:a.I.get(e)}],void 0,c.Fh);(b=Z(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b}).set("com.microsoft.playready",function(b){var c=Ny(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");b=Ny(b,"URI");c=hz(b.split("?")[0]);b=Qb(c.data);var e=new Uint8Array([154,4,240,
|
|
1378
|
+
121,152,64,66,134,171,146,230,91,224,136,95,149]);e=Bh(b,e,new Set,0);d=Cc("com.microsoft.playready",d,[{initDataType:"cenc",initData:e}],void 0,c.Fh);if(b=xd(["<PLAYREADY>",wc(b),"</PLAYREADY>"].join("\n")))d.licenseServerUri=Cv(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Ny(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";c=="SAMPLE-AES"&&(d="cbcs");var e=Ny(b,"URI");c=hz(e.split("?")[0]);
|
|
1379
|
+
e=e.split("?")[0];if(!a.I.has(e)){var f=Qb(c.data);a.I.set(e,f)}d=Cc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:a.I.get(e)}],void 0,c.Fh);(b=Z(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.ob=new Set;this.j=new Map;this.m=null;this.H="";this.ab=new Xy;this.N=-1;this.ma=Infinity;this.ba=this.Ac=this.kb=!1;this.D=new of(function(){if(a.X&&!a.g.continueLoadingWhenPaused&&(a.V.Ma(a.X,"timeupdate"),a.X.paused)){a.V.Aa(a.X,
|
|
1380
|
+
"timeupdate",function(){return kz(a)});return}kz(a)});this.Ga=lz;this.i=null;this.eb=0;this.u=Infinity;this.Ua=this.Ta=this.T=0;this.$=new Pg;this.J=new Map;this.K=new Map;this.Da=new Map;this.va=new Map;this.O=new Map;this.ya=new Map;this.za=new Map;this.zc=this.oa=!1;this.cc=new Ra(5);this.l=null;this.R=!0;this.V=new gb;this.o=this.X=null;this.ec=function(){return!1};this.I=new Map}p=iz.prototype;
|
|
1381
|
+
p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&a.updatePeriod>=0;this.g=a;b&&(this.ec=b);this.l&&this.l.configure(this.g);c&&this.i&&this.i.presentationTimeline.U()&&this.D.Cb()};p.start=function(a,b){var c=this,d;return G(function(e){return e.h==1?(c.h=b,c.oa=b.isLowLatencyMode(),e.g(mz(c,[a]).promise,2)):e.h!=3?(d=e.i,c.H=d.uri,e.g(nz(c,d.data),3)):e.return(c.i)})};
|
|
1382
|
+
p.stop=function(){this.D&&(this.D.stop(),this.D=null);var a=[];this.$&&(a.push(this.$.destroy()),this.$=null);this.g=this.h=null;this.ob.clear();this.i=null;this.j.clear();this.M.clear();this.K.clear();this.B.clear();this.Da.clear();this.va.clear();this.O.clear();this.ya.clear();this.za.clear();this.I.clear();this.l&&this.l.destroy();this.V&&(this.V.release(),this.V=null);return Promise.all(a)};
|
|
1383
|
+
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m;return G(function(n){if(n.h==1){if(!oz(a))return n.return();b=[];c=Array.from(a.j.values());a.u=Infinity;a.i.gapCount=0;d=c.filter(function(q){return!q.stream.isAudioMuxedInVideo&&q.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(pz(a,g));return n.g(Promise.all(b),2)}qz(a,d.map(function(q){return q.stream}));h=d.some(function(q){return q.be==0});d.length&&!h&&(rz(a,lz),sz(a));h&&sz(a);k=t(d);for(l=k.next();!l.done;l=
|
|
1384
|
+
k.next())m=l.value,m.stream.isAudioMuxedInVideo||!m.stream.segmentIndex||jg(m.stream.segmentIndex)||a.h.disableStream(m.stream);n.j()})};function tz(a,b){return oz(a)?a.C.get(b.type):b.pf}
|
|
1385
|
+
function pz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q,R,ia,W,xa,ta;return G(function(ra){switch(ra.h){case 1:if(b.stream.isAudioMuxedInVideo)return ra.return();c=[];d=t(b.P());for(e=d.next();!e.done;e=d.next())f=e.value,g=new zb(f),h=g.g,b.Te&&(b.Qb>=0&&h.add("_HLS_msn",String(b.Qb)),b.Rb>=0&&h.add("_HLS_part",String(b.Rb))),b.Ue&&h.add("_HLS_skip","YES"),c.push(g.toString());ra.m(2);return ra.g(mz(a,c,!0).promise,4);case 4:k=ra.i;ra.o(3);break;case 2:throw l=ra.l(),
|
|
1386
|
+
a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ra.return();m=Yy(a.ab,k.data);if(m.type!=1)throw new S(2,4,4017);n=k.uri;n==k.originalUri||b.P().includes(n)||b.Af.push(n);q=Qy(m.ha,"EXT-X-DEFINE");r=uz(a,q,n);u=b.stream;v=tz(a,b);return ra.g(vz(a,m,u.mimeType,b.P,r),5);case 5:w=ra.i;y=w.keyIds;x=w.drmInfos;z=w.encrypted;C=w.Nh;u.encrypted||!z||C||(u.encrypted=!0);H=function(ya,sa){return ya.size===sa.size&&[].concat(F(ya)).every(function(Ea){return sa.has(Ea)})};H(u.keyIds,
|
|
1387
|
+
y)||(u.keyIds=y,u.drmInfos=x,a.h.newDrmInfo(u));D=wz(a,m,v,r,b.P,b.type);A=D.segments;if(B=D.bandwidth)u.bandwidth=B;I=jm(u);E=t(A);for(K=E.next();!K.done;K=E.next())J=K.value,J.ea&&(J.ea.xd=I);u.segmentIndex.je(A,a.m.Jb());A.length&&(O=Ty(m.ha,"EXT-X-MEDIA-SEQUENCE",0),M=(P=Sy(m.ha,"EXT-X-SKIP"))?Number(Z(P,"SKIPPED-SEGMENTS")):0,L=xz(O,A),Q=L.Qb,R=L.Rb,b.Qb=Q+M,b.Rb=R,ia=v.get(O),u.segmentIndex.Ya(ia));if(W=jg(u.segmentIndex))b.Vc=W.startTime,xa=A[A.length-1],b.Mc=xa.endTime;if(ta=Sy(m.ha,"EXT-X-ENDLIST"))b.be=
|
|
1388
|
+
!0;yz(a,m);zz(a,m.ha,u.type,r,b.P);ra.j()}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.l&&this.l.banLocation(a)};p.setMediaElement=function(a){this.X=a};
|
|
1389
|
+
function Az(a,b,c){c=c===void 0?!1:c;for(var d=a.N==-1,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=tz(a,f);if(g=jg(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.N=Math.max(a.N,l));f.og=l;break}}}}if(!(a.N<0))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Bz(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.N-d.og,f>0&&(e.g.splice(0,f),e=jg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
1390
|
+
Cz(a,d,e)}
|
|
1391
|
+
function Dz(a,b){if(a.ma==Infinity){b=t(b);for(var c=b.next();!c.done;c=b.next())c=jg(c.value.stream.segmentIndex),c!=null&&c.h!=null&&(a.ma=Math.min(a.ma,c.h))}b=a.ma;if(b!=Infinity){c=t(a.j.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Bz(a,d.type)){var e=d.stream.segmentIndex;if(e!=null){var f=jg(e);if(f)if(f.h==null)Va("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.P(),"Expect AV sync issues!");else for(Cz(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Ah(b)}}}}
|
|
1392
|
+
function Cz(a,b,c){if(!(Math.abs(c)<.001)){b.Vc+=c;b.Mc+=c;a=tz(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.P()}}
|
|
1393
|
+
function nz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q,R,ia,W,xa,ta,ra,ya,sa,Ea,ma,Aa;return G(function(qa){switch(qa.h){case 1:c=Jc;d=Yy(a.ab,b);e=Qy(d.ha,"EXT-X-DEFINE");f=[];g=[];h=[];a.m=new wl(null,0);a.m.$c(!0);k=function(){return[a.H]};l=null;m=new Map;a.i={presentationTimeline:a.m,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
1394
|
+
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.o};if(d.type==1)return a.R=!1,Q=Qy(d.ha,"EXT-X-DEFINE"),m=uz(a,Q,a.H),l=c.wa,R="",ia=new Map,qa.g(Ez(a,a.G++,m,d,k,"",l,R,!0,"Media Playlist",null,ia,null,!1,null,!1),7);Fz(a,e);n=Qy(d.ha,"EXT-X-MEDIA");q=Qy(d.ha,"EXT-X-STREAM-INF");r=Qy(d.ha,"EXT-X-IMAGE-STREAM-INF");u=Qy(d.ha,"EXT-X-I-FRAME-STREAM-INF");v=Qy(d.ha,"EXT-X-SESSION-KEY");w=Qy(d.ha,"EXT-X-SESSION-DATA");y=Qy(d.ha,"EXT-X-CONTENT-STEERING");
|
|
1395
|
+
Gz(a,w);return qa.g(Hz(a,y),4);case 4:if(!a.g.ignoreSupplementalCodecs){x=[];z=t(q);C=z.next();for(H={};!C.done;H={aj:void 0},C=z.next())if(D=C.value,A=Z(D,"SUPPLEMENTAL-CODECS"))H.aj=A.split(/\s*,\s*/).map(function(ua){return ua.split("/")[0]}),B=D.attributes.map(function(ua){return function(lb){var pb=lb.name,nc=lb.value;pb=="CODECS"&&(nc=ua.aj.join(","),lb=lb.value.split(","),lb.length>1&&(lb=Fc("audio",lb))&&(nc+=","+lb));return new Py(pb,nc)}}(H)),x.push(new Ky(D.id,D.name,B,null));q.push.apply(q,
|
|
1396
|
+
F(x));I=[];E=t(u);K=E.next();for(J={};!K.done;J={bj:void 0},K=E.next())if(O=K.value,P=Z(O,"SUPPLEMENTAL-CODECS"))J.bj=P.split(/\s*,\s*/).map(function(ua){return ua.split("/")[0]}),M=O.attributes.map(function(ua){return function(lb){var pb=lb.name;lb=lb.value;pb=="CODECS"&&(lb=ua.bj.join(","));return new Py(pb,lb)}}(J)),I.push(new Ky(O.id,O.name,M,null));u.push.apply(u,F(I))}Iz(a,q);Jz(a,n);L=Kz(a,u);return qa.g(Lz(a,q,v,n,k,a.B,L),5);case 5:return f=qa.i,g=Mz(a,n),qa.g(Nz(a,r,u),6);case 6:h=qa.i;
|
|
1397
|
+
qa.A(3);break;case 7:W=qa.i,a.j.set(a.H,W),W.stream&&(xa=jm(W.stream),W.stream.segmentIndex.Hb(function(ua){ua.ea&&(ua.ea.xd=xa)})),l=W.stream.type,ta=!0,a.g.disableAudio&&W.type=="audio"?ta=!1:a.g.disableVideo&&W.type=="video"&&!W.stream.codecs.includes(",")&&(ta=!1),ta&&f.push({id:0,language:vf(R||"und"),disabledUntilTime:0,primary:!0,audio:W.type=="audio"?W.stream:null,video:W.type=="video"?W.stream:null,bandwidth:W.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
1398
|
+
case 3:if(!a.h)throw new S(2,7,7001);Oz(a,d);d.type==1&&(oz(a)&&(Pz(a,d),ra=a.u,a.D.ka(ra)),ya=Array.from(a.j.values()),Qz(a,ya),sz(a),zz(a,d.ha,l,m,k));a.i.variants=f;a.i.textStreams=g;a.i.imageStreams=h;a.i.startTime=a.o;if(a.ba||!a.g.hls.disableCodecGuessing){qa.A(8);break}sa=[];Ea=t(a.i.variants);for(ma=Ea.next();!ma.done;ma=Ea.next())Aa=ma.value,Aa.audio&&Aa.audio.codecs===""&&sa.push(Aa.audio.createSegmentIndex()),Aa.video&&Aa.video.codecs===""&&sa.push(Aa.video.createSegmentIndex());return qa.g(Promise.all(sa),
|
|
1399
|
+
8);case 8:a.h.makeTextStreamsForClosedCaptions(a.i),qa.j()}})}
|
|
1400
|
+
function Rz(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y;return G(function(x){if(x.h==1){c=zm(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return x.return(c);d=Sz(a,b);e=d.segment;f=d.segmentIndex;g=e.P();if(h=Gm(g[0]))if(k=Tz.get(h))return x.return(zm(k));return x.g(Promise.all([Uz(a,e.ea,0),Uz(a,e,f)]),2)}l=x.i;m=l[1].mimeType;n=l[0].data;q=l[1].data;r="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");u=["audio/mp4","video/mp4","video/iso.segment"];v=e.ea||u.includes(m);if(!v&&vk(Qb(q))){var z=
|
|
1401
|
+
q,C=a.g.disableAudio,H=a.g.disableVideo,D=a.g.disableText;var A=Qb(z);var B=(new nk).parse(A),I=B.Yd();A=B.Kg();var E=[],K=!1,J=!1;if(!C)switch(I.audio){case "aac":case "aac-loas":B.ub().length&&(E.push("mp4a.40.2"),K=!0);break;case "mp3":B.ub().length&&(E.push("mp4a.40.34"),K=!0);break;case "ac3":B.ub().length&&(E.push("ac-3"),K=!0);break;case "ec3":B.ub().length&&(E.push("ec-3"),K=!0);break;case "opus":B.ub().length&&(E.push("opus"),K=!0)}if(!H)switch(I.video){case "avc":A.codec?E.push(A.codec):
|
|
1402
|
+
E.push("avc1.42E01E");J=!0;break;case "hvc":A.codec?E.push(A.codec):E.push("hvc1.1.6.L93.90");J=!0;break;case "av1":E.push("av01.0.01M.08"),J=!0}if(E.length){C=K&&!J;H=new Map;if(J&&!D){D=new Yc("video/mp2t");bd(D,z);z=t(D.g.getStreams());for(J=z.next();!J.done;J=z.next())J=J.value,H.set(J,J);D.g.clear()}A={type:C?"audio":"video",mimeType:"video/mp2t",codecs:E.join(", "),language:null,height:A.height,width:A.width,channelCount:null,sampleRate:null,closedCaptions:H,ye:null,colorGamut:null,frameRate:A.frameRate,
|
|
1403
|
+
timescale:null}}else A=null;if(w=A)return x.return(w)}else if(v||r.includes(h))if(y=Am(n,q,a.g.disableText))return x.return(y);return m?x.return(zm(m)):x.return(c)})}
|
|
1404
|
+
function Uz(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.h){case 1:if(!b)return l.return({mimeType:null,data:null});d=bh;e=Im(b.P(),b.Kc(),b.Ic(),a.g.retryParameters);f=b instanceof yj?1:0;return l.g(Vz(a,e,d,{type:f}).promise,2);case 2:g=l.i;h=g.data;if(!b.aesKey){l.A(3);break}return l.g(Em(h,b.aesKey,c),4);case 4:h=l.i;case 3:return b instanceof yj?b.se(h,!0):b.se(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
|
|
1405
|
+
function sz(a){if(oz(a)){if(a.Ga==Wz){for(var b=Infinity,c=Infinity,d=t(a.j.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&e.stream.type!="text"&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.Mc),c=Math.min(c,e.Vc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.m.If(b)}}else a.m.Ab(Xz(a));if(!a.m.o)for(b=t(a.j.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||c.type!="audio"&&c.type!="video"||(c=jg(c.stream.segmentIndex))&&
|
|
1406
|
+
c.h!=null&&a.m.qh(c.h);a.m.nf()}function Fz(a,b){var c=(new zb(a.H)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.B.has(d)||a.B.set(d,f));e&&(d=c.get(e)[0])&&!a.B.has(d)&&a.B.set(e,d)}}
|
|
1407
|
+
function uz(a,b,c){c=(new zb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.B.get(f))&&d.set(f,e)}return d}
|
|
1408
|
+
function Iz(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Yz(a,d);if(f){var g=Fc(Hc,d);a.K.set(f,g);cb(d,g)}e&&(f=Fc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.K.set(e,f));c&&(e=Fc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.K.set(c,e))}}
|
|
1409
|
+
function Gz(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Uy([a.H],c,a.B)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1410
|
+
function Hz(a,b){var c,d,e,f,g,h;return G(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.l=new Bw(a.h);a.l.configure(a.g);a.l.i=[a.H];a.l.setManifestType("HLS");a.l.h=g;c=Cw(a.l,h);break}return k.g(c,0)})}
|
|
1411
|
+
function Mz(a,b){var c=Ry(b,"SUBTITLES"),d={};b=t(c);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ly(e,!a.l);d[f]?d[f].push(e):d[f]=[e]}b=[];if(!a.g.disableText)for(var g in d)try{b.push(Zz(a,d[g],new Map).stream)}catch(h){if(!a.g.hls.ignoreTextStreamFailures)throw h;}g=t(c);for(c=g.next();!c.done;c=g.next())if(d=Ny(c.value,"GROUP-ID"),c=a.K.get(d))if(d=a.M.get(d))for(d=t(d),e=d.next();!e.done;e=d.next())e=e.value,e.stream.codecs=c,e.stream.mimeType=$z(Hc,c)||aA(Hc),bA(e.stream);return b.filter(function(h){return h})}
|
|
1412
|
+
function bA(a){var b=new Set([Qe(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Hb(function(c){c.mimeType&&b.add(Qe(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1413
|
+
function Nz(a,b,c){var d,e;return G(function(f){if(f.h==1)return d=b.map(function(g){var h,k,l;return G(function(m){if(m.h==1){if(h=a.g.disableThumbnails)return m.return(null);m.m(2);return m.g(cA(a,g),4)}if(m.h!=2)return k=m.i,m.return(k.stream);l=m.l();if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=dA(a,g);return h.stream.type!=="image"?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
|
|
1414
|
+
throw k;}})),f.g(Promise.all(d),2);e=f.i;return f.return(e.filter(function(g){return g}))})}function eA(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";h=Z(h,"TYPE");return h!="SUBTITLES"&&(k!=""||h=="AUDIO")});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ly(e,!a.l);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Zz(a,d[g],c,!1)}function Kz(a,b){return b.map(function(c){c=dA(a,c);return c.stream.type!=="video"?null:c.stream}).filter(function(c){return c})}
|
|
1415
|
+
function Lz(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q,R,ia,W,xa,ta,ra,ya,sa,Ea;return G(function(ma){switch(ma.h){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(c.length>0)){ma.A(2);break}l=t(c);m=l.next();case 3:if(m.done){ma.A(2);break}n=m.value;q=Ny(n,"METHOD");r=Z(n,"KEYFORMAT")||"identity";u=null;if(q=="NONE"){ma.A(4);break}if(fA(q)){v=Uy(e(),Ny(n,"URI"),f);w=v.sort().join("");a.O.has(w)||(y=Wg(v,a.g.retryParameters),x=Vz(a,y,6).promise,a.O.set(w,x));ma.A(4);break}if(r==
|
|
1416
|
+
"identity")return ma.g(gA(a,n,"",e,null,f),12);z=a.fc.get(r);if(!z){C=null;ma.A(10);break}return ma.g(z(n,"",null),11);case 11:C=ma.i;case 10:u=C;ma.A(6);break;case 12:u=ma.i;case 6:if(u){if(u.keyIds)for(H=t(u.keyIds),D=H.next();!D.done;D=H.next())A=D.value,k.add(A);h.push(u)}case 4:m=l.next();ma.A(3);break;case 2:B={};I=t(b);for(E=I.next();!E.done;E=I.next())K=E.value,J=Ly(K,!a.l),B[J]?B[J].push(K):B[J]=[K];O=[];for(P in B)M=B[P],L=M[0],Q=Z(L,"FRAME-RATE"),R=Number(Ny(L,"BANDWIDTH"))||Number(Z(L,
|
|
1417
|
+
"AVERAGE-BANDWIDTH")),ia=Z(L,"RESOLUTION"),W=t(ia?ia.split("x"):[null,null]),xa=W.next().value,ta=W.next().value,ra=Z(L,"VIDEO-RANGE"),(ya=Z(L,"REQ-VIDEO-LAYOUT"))&&ya.includes(",")&&(sa=ya.split(",").filter(function(Aa){return Aa=="CH-STEREO"||Aa=="CH-MONO"}),ya=sa[0]),ya=ya||"CH-MONO",Ea=hA(a,M,d),O.push.apply(O,F(iA(a,Ea.audio,Ea.video,R,xa,ta,Q,ra,ya,h,k,g)));return ma.return(O.filter(function(Aa){return Aa!=null}))}})}
|
|
1418
|
+
function hA(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Z(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(u){return f.includes(Ny(u,"GROUP-ID"))}),eA(a,c,e));c=(e=f.sort().join(","))&&a.M.has(e)?a.M.get(e):[];g?d.audio.push.apply(d.audio,F(c)):h&&d.video.push.apply(d.video,F(c));h=!1;var r=b.map(function(u){return Ny(u,
|
|
1419
|
+
"URI")});g=d.audio.find(function(u){return u&&u.P().find(function(v){return r.includes(v)})});c=Yz(a,b[0]);k=Fc("video",c);(l=Fc("audio",c))&&!k?(g="audio",h=d.audio.length>0&&!d.audio.some(function(u){return u.stream.isAudioMuxedInVideo})):!d.audio.length&&!d.video.length&&l&&k?(g="video",c=[[k,l].join()]):d.audio.length&&g?(g="audio",h=!0):g=d.video.length&&!d.audio.length?"audio":"video";h||(b=jA(a,b,c,g),e&&a.g.enableAudioGroups&&(b.stream.groupId=e),b.stream.type=="audio"&&g==="audio"&&d.audio.some(function(u){return u.stream.isAudioMuxedInVideo})&&
|
|
1420
|
+
(a=d.audio[0].stream,b.stream.language=a.language,b.stream.channelsCount=a.channelsCount,b.stream.label=a.label,b.stream.audioSamplingRate=a.audioSamplingRate,b.stream.originalId=a.originalId,b.stream.originalLanguage=a.originalLanguage),d[b.stream.type]=[b]);return d}
|
|
1421
|
+
function Yz(a,b){b=Z(b,"CODECS")||"";a.ba=b.length>0;a.ba||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return Bm(b.split(/\s*,\s*/))}function kA(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function lA(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}
|
|
1422
|
+
function mA(a){a=Z(a,"CHANNELS");if(!a)return!1;a=a.split("/");return a.length!=2?!1:a[1]==="JOC"||a[1].includes("ATMOS")}function nA(a){a=Ny(a,"TYPE").toLowerCase();a=="subtitles"&&(a=Hc);return a}
|
|
1423
|
+
function iA(a,b,c,d,e,f,g,h,k,l,m,n){for(var q=t(c),r=q.next();!r.done;r=q.next())oA(r.value.stream,e,f,g,h,k,null);e=a.g.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(y){return!y.stream.isAudioMuxedInVideo}));e=a.g.disableAudio;if(!b.length||e)b=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var u=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=u?u.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||tg(k,n);k&&
|
|
1424
|
+
!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);q=f?f.stream.drmInfos:null;r=u?u.stream.drmInfos:null;u=u?u.P().sort().join(","):"";var v=f?f.P().sort().join(","):"",w=[];h&&h.codecs&&w.push(h.codecs);k&&k.codecs&&w.push(k.codecs);u=[u,v,w.sort()].join("-");h&&k&&!Xb(q,r)||a.ob.has(u)||(h={id:a.G++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.ob.add(u))}return e}
|
|
1425
|
+
function Jz(a,b){b=Ry(b,"CLOSED-CAPTIONS");a.R=b.length==0;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=vf(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Ny(d,"GROUP-ID");d=Ny(d,"INSTREAM-ID").replace("SERVICE","svc");a.J.get(e)||a.J.set(e,new Map);a.J.get(e).set(d,c)}}
|
|
1426
|
+
function Zz(a,b,c,d){d=d===void 0?!0:d;for(var e=[],f=[],g=new Map,h=t(b),k=h.next(),l={};!k.done;l={li:void 0},k=h.next()){k=k.value;l.li=++a.G;l=function(v){return function(){return"shaka://hls-muxed"+v.li}}(l);var m=d?Ny(k,"URI"):Z(k,"URI")||l();l=Ny(k,"GROUP-ID");e.push(m);f.push(l);g.set(l,m);(k=Z(k,"PATHWAY-ID"))&&c.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=nA(k);if(h==Hc)b=Z(k,"CODECS")||"";else for(f=t(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.K.has(l)){b=a.K.get(l);break}f=e.sort().join(",");
|
|
1427
|
+
h=="audio"&&d&&(f+=d);if(a.j.has(f))return a.j.get(f);l=a.G++;if(a.l)for(g=t(g),m=g.next();!m.done;m=g.next()){var n=t(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&Fw(a.l,l,m,n)}c=Z(k,"LANGUAGE");g=Z(k,"NAME");m=Z(k,"DEFAULT")=="YES";n=h=="audio"?kA(k):null;var q=h=="audio"?mA(k):!1,r=Z(k,"CHARACTERISTICS"),u=Z(k,"FORCED")=="YES";k=h=="audio"?lA(k):null;e=pA(a,l,e,b,h,c,m,g,n,null,r,u,k,q);e.stream&&a.g.enableAudioGroups&&(e.stream.groupId=d);a.M.has(d)?a.M.get(d).push(e):a.M.set(d,[e]);
|
|
1428
|
+
a.j.set(f,e);return e}
|
|
1429
|
+
function cA(a,b){var c,d,e,f,g,h,k,l,m,n;return G(function(q){if(q.h==1){c=Ny(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.j.has(c))return q.return(a.j.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=pA(a,a.G++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?q.g(h.stream.createSegmentIndex(),3):q.A(2)}if(q.h!=2){l=jg(h.stream.segmentIndex);if(m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
1430
|
+
Number(m.split("x")[1]);h.stream.closeSegmentIndex()}if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.j.set(c,h);return q.return(h)})}
|
|
1431
|
+
function dA(a,b){var c="video",d=Ny(b,"URI"),e=Z(b,"CODECS")||"";e=="mjpg"&&(c="image");if(a.j.has(d))return a.j.get(d);var f=Z(b,"LANGUAGE"),g=Z(b,"NAME"),h=Z(b,"CHARACTERISTICS");c=pA(a,a.G++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Z(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=Z(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.j.set(d,c);return c}
|
|
1432
|
+
function jA(a,b,c,d){for(var e=a.G++,f=[],g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Ny(k,"URI");k=Z(k,"PATHWAY-ID");a.l&&k&&Fw(a.l,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.j.has(g))return a.j.get(g);h=f.join(",");a:{b=Z(b[0],"CLOSED-CAPTIONS");if(d=="video"){if(a.g.disableText){a.R=!1;b=null;break a}if(b){if(b!="NONE"){b=a.J.get(b);break a}a.R=!1}else if(!b&&a.J.size)for(b=t(a.J.keys()),b=b.next();!b.done;b=b.next()){b=a.J.get(b.value);break a}}b=null}c=Ec(d,c);d=
|
|
1433
|
+
pA(a,e,f,c,d,null,!1,h,null,b,null,!1,null,!1);a.j.set(g,d);return d}
|
|
1434
|
+
function pA(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function u(C){var H,D,A,B,I,E,K,J,O,P,M,L,Q,R,ia,W,xa,ta,ra,ya;return G(function(sa){switch(sa.h){case 1:return H=Jc,sa.m(2),sa.g(C.promise,4);case 4:D=sa.i;if(C.aborted)return sa.return();A=D.uri;A!=D.originalUri&&(B=y.P(),B.includes(A)||y.Af.push(A));I=Yy(a.ab,D.data);if(I.type!=1)throw new S(2,4,4017);E=Qy(I.ha,"EXT-X-DEFINE");K=uz(a,E,A);J=!1;(!a.ba&&a.g.hls.disableCodecGuessing||a.R&&e==H.wa&&!a.g.hls.disableClosedCaptionsDetection)&&I.segments.length>
|
|
1435
|
+
0&&(a.R=!1,J=!0);O=!a.ba&&a.g.hls.disableCodecGuessing;P=oz(a);return sa.g(Ez(a,0,K,I,v,d,e,f,g,h,k,l,m,n,q,r,void 0,J,O),5);case 5:M=sa.i;if(C.aborted)return sa.return();L=M.stream;Oz(a,I);oz(a)&&!P&&Pz(a,I);y.Vc=M.Vc;y.Mc=M.Mc;y.Ue=M.Ue;y.Te=M.Te;y.be=M.be;y.pf=M.pf;y.Qb=M.Qb;y.Rb=M.Rb;w.segmentIndex=L.segmentIndex;w.encrypted=L.encrypted;w.drmInfos=L.drmInfos;w.keyIds=L.keyIds;w.mimeType=L.mimeType;w.bandwidth=w.bandwidth||L.bandwidth;w.codecs=w.codecs||L.codecs;w.closedCaptions=w.closedCaptions||
|
|
1436
|
+
L.closedCaptions;w.width=w.width||L.width;w.height=w.height||L.height;w.hdr=w.hdr||L.hdr;w.colorGamut=w.colorGamut||L.colorGamut;w.frameRate=w.frameRate||L.frameRate;w.language=="und"&&L.language!="und"&&(w.language=L.language);w.language=w.language||L.language;w.channelsCount=w.channelsCount||L.channelsCount;w.audioSamplingRate=w.audioSamplingRate||L.audioSamplingRate;bA(w);w.drmInfos.length&&a.h.newDrmInfo(w);Q=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)Q=!0;
|
|
1437
|
+
a.i&&Q&&a.h.makeTextStreamsForClosedCaptions(a.i);e==H.Na&&(R=jg(L.segmentIndex))&&R.ea&&(w.mimeType="application/mp4",bA(w));ia=jm(w);w.segmentIndex.Hb(function(Ea){Ea.ea&&(Ea.ea.xd=ia)});qA(a)&&(a.Ac?Qz(a,[y]):(a.Ac=!0,W=Array.from(a.j.values()),xa=W.filter(function(Ea){return Ea.stream.segmentIndex}),Qz(a,xa),sz(a),ta=a.u,ta>0&&a.D.ka(ta)));zz(a,I.ha,w.type,K,v);a.i&&(a.i.startTime=a.o);sa.o(0);break;case 2:ra=sa.l();w.closeSegmentIndex();if(ra.code===7001)return sa.return();ya=a.h.disableStream(w);
|
|
1438
|
+
if(!ya)throw ra;sa.j()}})}function v(){return a.l&&c.length>1?Gw(a.l,b):y.Af.concat(Vy([a.H],c,a.B))}var w=rA(a,d,e,f,g,h,k,l,m,n,q,r);c.some(function(C){return C.startsWith("shaka://hls-muxed")})&&(w.isAudioMuxedInVideo=!0,w.mimeType="video/mp2t",bA(w));var y={stream:w,type:e,Af:[],Vc:0,Mc:0,pf:new Map,Ue:!1,Te:!1,be:!1,og:-1,Qb:-1,Rb:-1,P:v},x=null,z;w.createSegmentIndex=function(){if(x)return x;if(w.isAudioMuxedInVideo)return w.segmentIndex=new Vl([]),Promise.resolve();z=mz(a,y.P(),!0);return x=
|
|
1439
|
+
new Promise(function(C){C(u(z))})};w.closeSegmentIndex=function(){x&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);x=null};return y}function Xz(a){var b=Infinity;a=t(a.j.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&c.stream.type!="text"&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.Mc));return b}
|
|
1440
|
+
function qz(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Hb(function(e){c.push(e)});a.m.le(c)}
|
|
1441
|
+
function Qz(a,b){if(!oz(a))for(var c=Xz(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.nd(0,c);qz(a,b.map(function(f){return f.stream}));d=Array.from(a.j.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return f.stream.type=="audio"});e=d.some(function(f){return f.stream.type=="video"});d=oz(a)&&!a.kb;c=!oz(a)&&a.kb&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?Az(a,b,d):(Dz(a,b),a.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&Az(a,
|
|
1442
|
+
b))}function Bz(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function qA(a){if(!a.i||!a.i.variants.length)return!1;var b=[],c=[];a=t(a.i.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return b.length>0&&!b.some(function(e){return e.segmentIndex})||c.length>0&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1443
|
+
function Ez(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x){y=y===void 0?!0:y;x=x===void 0?!0:x;var z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q,R,ia,W,xa,ta,ra,ya,sa,Ea,ma,Aa,qa,ua,lb;return G(function(pb){switch(pb.h){case 1:z=d.segments||[];C=z.every(function(nc){return Sy(nc.ha,"EXT-X-GAP")?!0:!1});if(!z.length||C)throw new S(2,4,4053);sA(a,d);oz(a)&&yz(a,d);H=oz(a)?a.C.get(g):new Map;D=wz(a,d,H,c,e,g);A=D.segments;B=D.bandwidth;O=J=K=E=I=null;if(!(A.length>0&&y)){pb.A(2);break}return pb.g(Rz(a,A),3);case 3:P=pb.i,g!=
|
|
1444
|
+
P.type&&oz(a)&&(a.C.set(P.type,a.C.get(g)),a.C.set(g,new Map)),g=P.type,h=P.language,m=P.channelCount,u=P.sampleRate,a.g.disableText||(n=P.closedCaptions),E=P.height,I=P.width,K=P.ye,J=P.colorGamut,O=P.frameRate,x&&(w=P.mimeType,f=P.codecs);case 2:if(w){pb.A(4);break}return pb.g(tA(a,g,f,A),5);case 5:w=pb.i,g!=Hc||f||w!="application/mp4"||!A[0]||A[0].ea||(w="text/vtt");case 4:return pb.g(vz(a,d,w,e,c),6);case 6:M=pb.i;L=M.drmInfos;Q=M.keyIds;R=M.encrypted;ia=M.Nh;if(R&&!L.length&&!ia)throw new S(2,
|
|
1445
|
+
4,4026);W=rA(a,f,g,h,k,l,m,n,q,r,u,v);W.encrypted=R&&!ia;W.drmInfos=L;W.keyIds=Q;W.mimeType=w;B&&(W.bandwidth=B);bA(W);g=="video"&&(I||E||K||J)&&oA(W,I,E,O,K,null,J);oz(a)&&yz(a,d);xa=A[0].startTime;ta=A[A.length-1];ra=ta.endTime;ya=new Vl(A);W.segmentIndex=ya;Ea=(sa=Sy(d.ha,"EXT-X-SERVER-CONTROL"))?My(sa,"CAN-SKIP-UNTIL")!=null:!1;ma=sa?My(sa,"CAN-BLOCK-RELOAD")!=null:!1;Aa=Ty(d.ha,"EXT-X-MEDIA-SEQUENCE",0);qa=xz(Aa,A);ua=qa.Qb;lb=qa.Rb;return pb.return({stream:W,type:g,Af:[],P:e,Vc:xa,Mc:ra,Ue:Ea,
|
|
1446
|
+
Te:ma,be:!1,og:-1,Qb:ua,Rb:lb,pf:H})}})}function xz(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Qb:a,Rb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.o&&(c=0),{Qb:a,Rb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Qb:a,Rb:c}}
|
|
1447
|
+
function rA(a,b,c,d,e,f,g,h,k,l,m,n){var q=$z(c,b)||aA(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}u=void 0;k=null;c==Hc?u=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(k="visually impaired");r.length||u!=="subtitle"||r.push("subtitle");u=null;c!="video"&&(u=f);a={id:a.G++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1448
|
+
segmentIndex:null,mimeType:q,codecs:b,kind:c==Hc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:vf(d||"und"),originalLanguage:d,label:u,type:c,primary:e,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:k,external:!1,
|
|
1449
|
+
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};bA(a);return a}
|
|
1450
|
+
function vz(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q;return G(function(R){switch(R.h){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Qy(k.ha,"EXT-X-KEY"),m=null,l.length)for(m=uA(a,b,k.ha,d,e),n=t(l),q=n.next();!q.done;q=n.next())r=q.value,f.set(r,m);v=u=!1;w=[];y=new Set;x=t(f);z=x.next();case 2:if(z.done){R.A(4);break}C=z.value;H=t(C);D=H.next().value;A=H.next().value;B=D;I=A;E=Ny(B,"METHOD");if(E==
|
|
1451
|
+
"NONE"){R.A(3);break}u=!0;K=Z(B,"KEYFORMAT")||"identity";J=null;if(fA(E)){v=!0;R.A(3);break}if(K=="identity")return R.g(gA(a,B,c,d,I,e),11);O=a.fc.get(K);if(!O){P=null;R.A(9);break}return R.g(O(B,c,I),10);case 10:P=R.i;case 9:J=P;R.A(6);break;case 11:J=R.i;case 6:if(J){if(J.keyIds)for(M=t(J.keyIds),L=M.next();!L.done;L=M.next())Q=L.value,y.add(Q);w.push(J)}case 3:z=x.next();R.A(2);break;case 4:return R.return({drmInfos:w,keyIds:y,encrypted:u,Nh:v})}})}
|
|
1452
|
+
function vA(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new S(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=yc(g.substr(2));if(h.byteLength!=16)throw new S(2,4,4048);}else f=Ty(c.ha,"EXT-X-MEDIA-SEQUENCE",0);var k=Uy(d(),Ny(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.va.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Ny(b,
|
|
1453
|
+
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,q,r,u;return G(function(v){if(v.h==1)return a.O.has(l)||(n=Wg(k,a.g.retryParameters),q=Vz(a,n,6).promise,a.O.set(l,q)),v.g(a.O.get(l),2);if(v.h!=3){r=v.i;if(!r.data||r.data.byteLength!=m.bitsKey/8)throw new S(2,4,4049);u={name:m.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:m.bitsKey};return v.g(window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}m.cryptoKey=
|
|
1454
|
+
v.i;m.fetchKey=void 0;v.j()})};a.va.set(c,m)}return a.va.get(c)}function Oz(a,b){a.o==null&&(b=Sy(b.ha,"EXT-X-START"))&&(a.o=Number(Ny(b,"TIME-OFFSET")))}function sA(a,b){var c=Sy(b.ha,"EXT-X-PLAYLIST-TYPE");b=Sy(b.ha,"EXT-X-ENDLIST");b=c&&c.value=="VOD"||b;c=c&&c.value=="EVENT"&&!b;c=!b&&!c;b?rz(a,lz):c?rz(a,Wz):rz(a,wA)}
|
|
1455
|
+
function yz(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;e>=0;){var f=Sy(d[e].ha,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Sy(b.ha,"EXT-X-TARGETDURATION");if(!d)throw new S(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Sy(b.ha,"EXT-X-PART-INF"))a.T=Number(Ny(e,"PART-TARGET"));b=Sy(b.ha,"EXT-X-SERVER-CONTROL");a.oa&&a.T?(a.u=a.zc?a.T*5<=c?Math.min(a.T,a.u):Math.min(c,a.u):Math.min(a.T,a.u),a.Ua=b?Number(Ny(b,"PART-HOLD-BACK")):0):(a.u=Math.min(c,a.u),
|
|
1456
|
+
c=b?My(b,"HOLD-BACK"):null,a.Ta=c?Number(c.value):0);a.eb=Math.max(d,a.eb)}function Pz(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Ua)c=a.Ua;else if(a.Ta)c=a.Ta;else for(var d=b.segments.length,e=d-Math.min(d,a.g.hls.liveSegmentsDelay);e<d;e++){var f=Sy(b.segments[e].ha,"EXTINF");c=f?c+Number(f.value.split(",")[0]):c+a.eb}a.o&&a.o<0&&(c=Math.min(-a.o,c),a.o+=c);a.m.Si(0);a.m.ph(c);a.m.$c(!1)}
|
|
1457
|
+
function uA(a,b,c,d,e){var f=Sy(c,"EXT-X-MAP");if(!f)return null;var g=Ny(f,"URI"),h=Uy(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.Da.has(g)){var k=void 0,l=null,m=!1;c=t(c);for(var n=c.next();!n.done;n=c.next())n=n.value,n.name=="EXT-X-KEY"?(m=Ny(n,"METHOD"),fA(m)&&n.id<f.id?(m=!1,k=vA(a,n,b,d,e)):m=m!="NONE"):n.name=="EXT-X-BYTERANGE"&&n.id<f.id&&(l=n);b=xA(h,f,l,k,m);a.Da.set(g,b)}return a.Da.get(g)}
|
|
1458
|
+
function xA(a,b,c,d,e){var f=0,g=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(f=b.split("@"),g=Number(f[0]),f=Number(f[1]),g=f+g-1,d&&(c=g+1-f,c%16&&(g+=16-c%16)));return new wj(function(){return a},f,g,null,null,null,d,e)}
|
|
1459
|
+
function yA(a,b,c,d,e,f,g,h,k,l){var m=d.ha,n=Sy(m,"EXTINF"),q=0,r=0,u=null;d.xc.length&&(a.i.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Sy(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=Pd(w.value),a.kb=!0)}var y=zj;Sy(m,"EXT-X-GAP")&&(a.i.gapCount++,y=2);if(!n){if(d.xc.length==0)throw new S(2,4,4024,"EXTINF");if(!a.oa)return null}var x=[];w=!1;var z=null,C=!1,H=!1;if(a.oa&&d.xc.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=
|
|
1460
|
+
v,A={},B=0;B<d.xc.length;A={Rf:void 0,oe:void 0},B++){var I=d.xc[B],E=B==0?c:x[x.length-1],K=B==0?e:E.endTime,J=Number(Z(I,"DURATION"))||a.T;if(J){var O=K+J,P=0,M=null;I.name=="EXT-X-PRELOAD-HINT"?(P=(P=Z(I,"BYTERANGE-START"))?Number(P):0,(E=Z(I,"BYTERANGE-LENGTH"))?M=P+Number(E)-1:P&&(M=Number.MAX_SAFE_INTEGER)):(P=Z(I,"BYTERANGE"),M=t(zA(E,P)),P=M.next().value,M=M.next().value);A.oe=Z(I,"URI");if(A.oe){E=zj;Z(I,"GAP")=="YES"&&(a.i.gapCount++,E=2,C=!0);A.Rf=null;var L=function(R){return function(){R.Rf==
|
|
1461
|
+
null&&(R.Rf=Uy(h(),R.oe,f));return R.Rf}}(A);q&&P>=0&&M!=null&&(z=L,w=!0);K=new yj(K,O,L,P,M,b,0,0,Infinity,[],"",null,D,E,l);I.name=="EXT-X-PRELOAD-HINT"&&(K.Rg(),H=!0);Z(I,"INDEPENDENT")!="YES"&&B>0&&K.wd();I=k;I||(x.length&&x[0].mimeType?I=x[0].mimeType:A.oe&&(A=Gm(A.oe),I=AA.get(g).get(A)||null));I&&(K.mimeType=I,BA.has(I)&&(K.ea=null));x.push(K);D&&(D+=J)}}}}if(n){n=Number(n.value.split(",")[0]);if(n==0)return null;q=e+n}else if(x.length)q=x[x.length-1].endTime;else return null;w&&(C||x[0].startByte!=
|
|
1462
|
+
0?(w=!1,z=null):x=[]);(n=Sy(m,"EXT-X-BYTERANGE"))?(u=t(zA(c,n.value)),r=u.next().value,u=u.next().value):x.length&&(r=x[0].startByte,u=x[x.length-1].endByte);c="";n=null;g=="image"&&(c="1x1",g=Sy(m,"EXT-X-TILES"))&&(c=Ny(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(n=Number(g)));var Q=null;b=new yj(e,q,function(){if(z)return z();Q==null&&(Q=Uy(h(),d.g,f));return Q||[]},r,u,b,0,0,Infinity,x,c,n,v,y,l,x.length>0&&!!d.g);k&&(b.mimeType=k,BA.has(k)&&(b.ea=null));w&&(a.zc=!0,b.ti(),H&&b.Rg());return b}
|
|
1463
|
+
function zA(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.endByte+1,d=c+b-1);return[c,d]}
|
|
1464
|
+
function zz(a,b,c,d,e){if(c=="video"||c=="audio"){var f=a.m.m;if(f!=null&&!Bz(a,c))for(b=Qy(b,"EXT-X-DATERANGE"),b=b.filter(function(E){return My(E,"START-DATE")!=null}).sort(function(E,K){E=Ny(E,"START-DATE");K=Ny(K,"START-DATE");return E<K?-1:E>K?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Ny(g,"START-DATE"),k=Pd(h);if(!isNaN(k)){var l=Math.max(0,k-f),m=null,n=Z(g,"END-DATE");if(n){var q=Pd(n);if(!isNaN(q)&&(m=q-f,m<0))continue}if(m==null){var r=Z(g,"DURATION")||Z(g,"PLANNED-DURATION");if(r){var u=
|
|
1465
|
+
parseFloat(r);isNaN(u)||(m=l+u);if(k-f+u<0)continue}}var v=Z(g,"CLASS")||"com.apple.quicktime.HLS",w=Z(g,"END-ON-NEXT")=="YES";if(m==null&&w){for(var y=c+1;y<b.length;y++){var x=Z(b[y],"CLASS")||"com.apple.quicktime.HLS";if(v==x){var z=Ny(b[y],"START-DATE"),C=Pd(z);if(!isNaN(C)&&C&&C>k){m=Math.max(0,C-f);break}}}if(m==null)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var H=[],D=t(g.attributes),A=D.next();!A.done;A=D.next()){var B=A.value;if(!y.includes(B.name)){var I=
|
|
1466
|
+
Wy(B.value,d);if(B.name=="X-ASSET-URI"||B.name=="X-ASSET-LIST")I=Uy(e(),B.value,d)[0];H.push({key:B.name,description:"",data:I,mimeType:null,pictureType:null})}}if(H.length>1)a.h.onMetadata(v,l,m,H)}}catch(E){}}}}
|
|
1467
|
+
function wz(a,b,c,d,e,f){function g(E){E=Gm(E);if(!E)return null;var K=AA.get(f).get(E);K||(K=Tz.get(E));return K}var h=b.segments,k=null,l=null,m=null,n=null,q=void 0,r=Ty(b.ha,"EXT-X-DISCONTINUITY-SEQUENCE",-1),u=Ty(b.ha,"EXT-X-MEDIA-SEQUENCE",0),v=Sy(b.ha,"EXT-X-SKIP"),w=v?Number(Z(v,"SKIPPED-SEGMENTS")):0,y=u+w,x=0;oz(a)&&c.has(y)&&(x=c.get(y));x===0&&a.Ga==Wz&&c.size>0&&!c.has(y)&&a.m.i!=null&&(x=a.m.Jb());var z=[],C=null;v=[];for(var H=0;H<h.length;H++){var D=h[H];(y=Sy(D.ha,"EXT-X-MAP"))&&
|
|
1468
|
+
y.id!==l&&(k=uA(a,b,D.ha,e,d),l=y.id);y=D.g;var A="";y&&(A=Gm(y));A!==n&&(m=g(y),n=A);A=H==0?x:C.endTime;y=u+w+H;Sy(D.ha,"EXT-X-DISCONTINUITY")&&(r++,C&&C.ea&&(C.ea.g=A));for(var B=t(D.ha),I=B.next();!I.done;I=B.next())I=I.value,I.name=="EXT-X-KEY"&&(fA(Ny(I,"METHOD"))?q=vA(a,I,b,e,d):q=void 0);c.set(y,A);if(A=yA(a,k,C,D,A,d,f,e,m,q)){if(C=Ty(D.ha,"EXT-X-BITRATE"))v.push({bitrate:C,duration:A.endTime-A.startTime}),A.bandwidth=C;else if(A.endByte){if(D=Aj(A))C=A.endTime-A.startTime,D=D*8/C/1E3,v.push({bitrate:D,
|
|
1469
|
+
duration:C}),A.bandwidth=D}else v.length&&(C=v.pop(),C.duration+=A.endTime-A.startTime,v.push(C),A.bandwidth=C.bitrate);if(A.bandwidth)for(C=t(A.g),D=C.next();!D.done;D=C.next())D.value.bandwidth=A.bandwidth;C=A;A.i=r;Bz(a,f)&&a.N!=null&&y<a.N||z.push(A)}}b=void 0;v.length&&(b=v.reduce(function(E,K){return E+K.duration},0),b=Math.round(v.reduce(function(E,K){return E+K.bitrate*K.duration},0)/b*1E3));if(v=z.some(function(E){return E.h!=null}))for(c={},d=0;d<z.length;c={Ye:void 0,Xe:void 0,Qe:void 0,
|
|
1470
|
+
Xc:void 0,Pe:void 0},d++)if(c.Xc=z[d],c.Xc.h==null)for(c.Xe=0,c.Ye=d,e=function(E){return function(){var K=z[E.Ye];if(K){if(K.h!=null)return K.h+E.Xe;E.Xe-=K.endTime-K.startTime;E.Ye+=1}return null}}(c),c.Pe=0,c.Qe=d,h=function(E){return function(){var K=z[E.Qe];if(K){K!=E.Xc&&(E.Pe+=K.endTime-K.startTime);if(K.h!=null)return K.h+E.Pe;--E.Qe}return null}}(c);c.Xc.h==null;)c.Xc.h=h(),c.Xc.h==null&&(c.Xc.h=e());if(v)for(c=t(z),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),h=e.next();!h.done;h=
|
|
1471
|
+
e.next())h=h.value,h.h=d,d+=h.endTime-h.startTime;c=a.ma;if(v&&c!=Infinity&&!Bz(a,f))for(a=t(z),v=a.next();!v.done;v=a.next())v.value.Ah(c);return{segments:z,bandwidth:b}}function $z(a,b){if(a==Hc){if(b=="vtt"||b=="wvtt")return"text/vtt";if(b&&b!=="")return"application/mp4"}return a!="image"||b&&b!="jpeg"?a=="audio"&&b=="mp4a.40.34"?"audio/mpeg":b=="mjpg"?"application/mp4":null:"image/jpeg"}function aA(a){return a==Hc?"text/vtt":AA.get(a).get("mp4")}
|
|
1472
|
+
function Sz(a,b){a=oz(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];c.bc()==2&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
|
|
1473
|
+
function tA(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w;return G(function(y){switch(y.h){case 1:e=bh;f=Sz(a,d);g=f.segment;if(g.status==2)return y.return(aA(b));k=g.P();if(l=Gm(k[0]))if(m=AA.get(b),(n=m.get(l))||(n=Tz.get(l)))return y.return(n);if(h=$z(b,c))return y.return(h);r=1;u=Wg(k,a.g.retryParameters);y.m(2);u.method="HEAD";return y.g(Vz(a,u,e,{type:r}).promise,4);case 4:v=y.i;q=v.headers["content-type"];y.o(3);break;case 2:w=y.l();if(!w||w.code!=1002&&w.code!=1001){y.A(3);break}u.method="GET";a.g.hls.allowRangeRequestsToGuessMimeType&&
|
|
1474
|
+
(u.headers.Range="bytes=0-0");return y.g(Vz(a,u,e,{type:r}).promise,6);case 6:v=y.i,q=v.headers["content-type"];case 3:if(!q){y.A(7);break}h=q.toLowerCase().split(";")[0];if(h!="application/octet-stream"){y.A(8);break}if(v.data.byteLength){y.A(9);break}u.method="GET";return y.g(Vz(a,u,e,{type:r}).promise,10);case 10:v=y.i;case 9:vk(Qb(v.data))&&(h="video/mp2t");case 8:if(h!="application/octet-stream")return y.return(h);case 7:return y.return(aA(b))}})}
|
|
1475
|
+
function oA(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function mz(a,b,c){return Vz(a,Wg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1476
|
+
function kz(a){var b,c,d,e,f,g;return G(function(h){switch(h.h){case 1:if(!a.h)return h.return();h.m(2);b=Date.now();return h.g(a.update(),4);case 4:c=Date.now();oz(a)&&(d=(c-b)/1E3,a.cc.sample(1,d),e=a.g.updatePeriod>0?a.g.updatePeriod:a.u,f=Math.max(0,e-Sa(a.cc)),a.D.ka(f));h.o(3);break;case 2:g=h.l();if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.D.ka(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
|
|
1477
|
+
h.j()}})}function oz(a){return a.Ga!=lz}function rz(a,b){a.Ga=b;a.m&&a.m.$c(!oz(a));oz(a)||a.D.stop()}function Vz(a,b,c,d){if(!a.$)throw new S(2,7,7001);d||(d={});d.isPreload=a.ec();b=a.h.networkingEngine.request(c,b,d);Qg(a.$,b);return b}function fA(a){return a=="AES-128"||a=="AES-256"||a=="AES-256-CTR"}
|
|
1478
|
+
function jz(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(m.h==1){if(c=="video/mp2t")throw new S(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new S(2,4,4041);e=Ny(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";e=="SAMPLE-AES"&&(g="cbcs");h=Ny(b,"URI");k=Cc("com.apple.fps",g,null,h);var n=(new zb(h)).Fb.replace(/-/g,"").toLowerCase();return(l=n.length===32&&/^[0-9a-f]+$/.test(n)?n:null)||!d?m.A(2):m.g(CA(a,d),3)}m.h!=2&&(l=m.i);l&&k.keyIds.add(l);
|
|
1479
|
+
return m.return(k)})}
|
|
1480
|
+
function gA(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w,y;return G(function(x){switch(x.h){case 1:if(c=="video/mp2t")throw new S(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new S(2,4,4041);g=Ny(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return x.return(null);k=Uy(d(),Ny(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=zc(xc(k[0].split("data:text/plain;base64,").pop()));x.A(2);break}m=k.sort().join("");a.ya.has(m)||(n=Wg(k,a.g.retryParameters),q=Vz(a,n,6).promise,
|
|
1481
|
+
a.ya.set(m,q));return x.g(a.ya.get(m),3);case 3:r=x.i,l=zc(r.data);case 2:u="00000000000000000000000000000000";if(!e){x.A(4);break}return x.g(CA(a,e),5);case 5:(v=x.i)&&(u=v);case 4:return w=new Map,w.set(u,l),y="cenc",g=="SAMPLE-AES"&&(y="cbcs"),x.return(Dc(w,y))}})}
|
|
1482
|
+
function CA(a,b){var c,d,e,f;return G(function(g){if(g.h==1){c=null;if(a.za.has(b))return c=a.za.get(b),g.A(2);d=Im(b.P(),b.Kc(),b.Ic(),a.g.retryParameters);e=bh;return g.g(Vz(a,d,e,{type:0}).promise,3)}g.h!=2&&(f=g.i,b.se(f.data),c=Dm(f.data),a.za.set(b,c));return g.return(c)})}N("shaka.hls.HlsParser",iz);
|
|
1483
|
+
var Tz=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),DA=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),EA=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts",
|
|
1484
|
+
"video/mp2t").set("tsv","video/mp2t"),FA=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),GA=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),AA=(new Map).set("audio",DA).set("video",EA).set("text",FA).set("image",GA),BA=new Set(["video/mp2t"].concat(F(Re))),
|
|
1485
|
+
lz="VOD",wA="EVENT",Wz="LIVE";Qc("application/x-mpegurl",function(){return new iz});Qc("application/vnd.apple.mpegurl",function(){return new iz});function HA(a){return Cv(a)}var IA=(new Map).set("com.microsoft.playready",HA).set("com.microsoft.playready.recommendation",HA).set("com.microsoft.playready.software",HA).set("com.microsoft.playready.hardware",HA);function JA(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.D=new Ra(5);this.o=new of(function(){KA(a)});this.C=new Pg;this.m=new Map;this.B=function(){return!1}}p=JA.prototype;p.configure=function(a,b){this.g=a;b&&(this.B=b)};p.start=function(a,b){var c=this;return G(function(d){if(d.h==1)return c.l=[a],c.h=b,d.g(LA(c),2);if(!c.h)throw new S(2,7,7001);return d.return(c.j)})};
|
|
1486
|
+
function KA(a){var b;G(function(c){switch(c.h){case 1:return c.m(2),c.g(LA(a),4);case 4:c.o(3);break;case 2:b=c.l(),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();c.j()}})}p.stop=function(){this.g=this.h=null;this.l=[];this.j=null;this.o!=null&&(this.o.stop(),this.o=null);this.m.clear();return this.C.destroy()};
|
|
1487
|
+
p.update=function(){var a=this,b;return G(function(c){if(c.h==1)return c.m(2),c.g(LA(a),4);if(c.h!=2)return c.o(0);b=c.l();if(!a.h||!b)return c.return();a.h.onError(b);c.j()})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};
|
|
1488
|
+
function LA(a){var b,c,d,e,f,g,h;return G(function(k){if(k.h==1)return b=Wg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.B()}),Qg(a.C,e),k.g(e.promise,2);f=k.i;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=Zn){ub("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Fx(m,"SmoothStreamingMedia");if(!m)throw new S(2,
|
|
1489
|
+
4,4046,l);n(m);m=rc(m.outerHTML)}var q=wd(m,"SmoothStreamingMedia");if(!q)throw new S(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=$n&&l(q);a.i||(a.i=new wl(null,0));if(l=Md(q,"IsLive",Wd,!1))throw new S(2,4,4047);a.i.$c(!l);n=Md(q,"TimeScale",Ud,1E7);m=Md(q,"DVRWindowLength",Ud);l&&(m===0||isNaN(m))&&(m=Infinity);var r=Md(q,"CanSeek",Wd,!1);m===0&&r&&(m=Infinity);r=null;m&&m>0&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);r==null&&(r=Infinity);a.i.If(r);
|
|
1490
|
+
m=Md(q,"Duration",Ud,Infinity);l||a.i.Ab(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=Ed(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(Ed(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),y=n[w];if(y){var x;a:{if(x=Av(v)){x=t(Hd(x,"DATA"));for(var z=x.next();!z.done;z=x.next())if(z=Id(z.value,"KID")){x=xc(Fd(z));x=new Uint8Array([x[3],x[2],x[1],x[0],
|
|
1491
|
+
x[5],x[4],x[7],x[6]].concat(F(x.slice(8))));x=zc(x);break a}}x=null}z=xc(Fd(v));w=yc(w.replace(/-/g,""));w=[{initData:Bh(z,w,new Set,0),initDataType:"cenc",keyId:x}];w=Cc(y,"cenc",w);x&&w.keyIds.add(x);if(y=IA.get(y))w.licenseServerUri=y(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];q=Ed(q,"StreamIndex");q=t(q);for(v=q.next();!v.done;v=q.next()){v=v.value;y=Ed(v,"QualityLevel");w=l.timescale;x=l.duration;z=Ed(v,"c");for(var C=[],H=0,D=0;D<z.length;++D){var A=z[D],B=z[D+1],I=Md(A,"t",Ud),E=Md(A,"d",
|
|
1492
|
+
Ud);A=Md(A,"r",Sd);if(!E)break;I=I!=null?I:H;(A=A||0)&&A--;if(A<0)if(B){B=Md(B,"t",Ud);if(B==null)break;else if(I>=B)break;A=Math.ceil((B-I)/E)-1}else{if(x==Infinity)break;else if(I/w>=x)break;A=Math.ceil((x*w-I)/E)-1}for(B=0;B<=A;++B)H=I+E,C.push({start:I/w,end:H/w,Md:I}),I=H}w=C;y=t(y);for(x=y.next();!x.done;x=y.next())(x=MA(a,v,x.value,w,u,l))&&(x.type!="audio"||a.g.disableAudio?x.type!="video"||a.g.disableVideo?x.type!=Hc||a.g.disableText||m.push(x):n.push(x):r.push(x))}q=[];r=t(r.length>0?r:
|
|
1493
|
+
[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(n.length>0?n:[null]),C=v.next();!C.done;C=v.next())y=q,w=y.push,x=a,z=u,C=C.value,D=0,z&&z.bandwidth&&z.bandwidth>0&&(D+=z.bandwidth),C&&C.bandwidth&&C.bandwidth>0&&(D+=C.bandwidth),x={id:x.u++,language:z?z.language:"und",disabledUntilTime:0,primary:!!z&&z.primary||!!C&&C.primary,audio:z,video:C,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(y,x);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,
|
|
1494
|
+
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.nf());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.D.sample(1,h);k.j()})}
|
|
1495
|
+
function MA(a,b,c,d,e,f){var g=b.attributes.Type;if(g!=="audio"&&g!=="video"&&g!=="text")return Wa("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=Md(c,"Bitrate",Td),m=Md(c,"MaxWidth",Td),n=Md(c,"MaxHeight",Td),q=Md(c,"Channels",Td),r=Md(c,"SamplingRate",Td),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ab(Math.min(u,v));(v=b.attributes.Name)&&(v+=c.attributes.Index);v||(v=String(k));var w={id:k,originalId:v,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1496
|
+
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:e.length>0,drmInfos:e,keyIds:new Set,language:vf(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,
|
|
1497
|
+
tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if(e=b.attributes.Subtype)(e=NA.get(e))&&w.roles.push(e),e==="main"&&(w.primary=!0);e=c.attributes.FourCC;if(e===null||e==="")e=b.attributes.FourCC;if(!e)if(g==="audio")e="AAC";else if(g==="video")return Wa('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),
|
|
1498
|
+
null;if(!OA.includes(e.toUpperCase()))return Wa("Codec not supported:",e),null;c=PA(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=QA(e,c);break;case "video":if(!c)return Wa("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=RA(c);break;case "text":if(w.type=Hc,w.mimeType="application/mp4",e==="TTML"||
|
|
1499
|
+
e==="DFXP")w.codecs="stpp"}w.fullMimeTypes.add(Qe(w.mimeType,w.codecs));w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var y=a.m.get(w.id);else y=[],w.type=="video"&&(y=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),y={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Db:y,Ha:new Uint8Array([]),Sa:new Uint8Array([]),Za:0,$a:0,data:null,stream:w},y=Pi(new Oi([y])),
|
|
1500
|
+
a.m.set(w.id,y);y=SA(a,new wj(function(){return[]},0,null,jm(w),w.mssPrivateData.timescale,y,null,w.encrypted),w,b,d);w.segmentIndex=new Vl(y);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1501
|
+
function PA(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if(b!=="audio")return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if(c==="AACH")return c=new Uint8Array(4),a=e[a*2],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1502
|
+
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function QA(a,b){var c=0;a==="AACH"&&(c=5);b?c===0&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,a==="AACH"&&(c=5));return"mp4a.40."+c}function RA(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1503
|
+
function SA(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={Mf:void 0},g=e.next())h.Mf=g.value,d.push(new yj(h.Mf.start,h.Mf.end,function(k){return function(){return Bc(a.l,[f.replace("{start time}",String(k.Mf.Md))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}N("shaka.mss.MssParser",JA);
|
|
1504
|
+
var OA="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),NA=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");Qc("application/vnd.ms-sstr+xml",function(){return new JA});function TA(a,b,c,d,e,f,g){if(c>=200&&c<=299&&c!=202||c==304)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=qc(b)}catch(h){}throw new S(c==401||c==403?2:1,1,1001,d,c,f,a,g,e||d);};function UA(){}
|
|
1505
|
+
function VA(a,b,c,d,e,f){var g=new WA;try{hh(b.headers).forEach(function(m,n){g.append(n,m)})}catch(m){return Gg(new S(1,1,1002,a,m,c))}var h=new XA,k={Sh:!1,fj:!1};a=YA(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Fg(a,function(){k.Sh=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new of(function(){k.fj=!0;h.abort()});l.ka(b/
|
|
1506
|
+
1E3);a.finally(function(){l.stop()})}return a}
|
|
1507
|
+
function YA(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,w,y,x,z,C,H,D,A;return G(function(B){switch(B.h){case 1:return l=ZA,m=$A,q=new ArrayBuffer(0),u=r=0,v={},w=Date.now(),B.m(2),B.g(l(a,d),4);case 4:n=B.i;v=aB(n.headers);g(v);if(d.method=="HEAD"){B.A(5);break}x=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return B.g(n.arrayBuffer(),9);z=n.clone().body.getReader();C=function(I){function E(){var K,J,O,P;return G(function(M){switch(M.h){case 1:return M.m(2),M.g(z.read(),4);case 4:K=M.i;
|
|
1508
|
+
M.o(3);break;case 2:return M.l(),M.return();case 3:if(K.done){M.A(5);break}r+=K.value.byteLength;if(!h){M.A(5);break}return M.g(h(K.value),5);case 5:J=Date.now();O=r-u;if(J-w>100&&O>=k||K.done)P=K.done?0:x-r,f(J-w,O,P),u=r,w=J;K.done?I.close():(I.enqueue(K.value),E());M.j()}})}E()};new m({start:C});return B.g(n.arrayBuffer(),8);case 8:q=B.i;B.A(5);break;case 9:q=B.i,H=Date.now(),f(H-w,q.byteLength,0);case 5:b.headers.Range&&(D=b.headers.Range.replace("bytes=","").split("-").filter(function(I){return I}).map(function(I){return parseInt(I,
|
|
1509
|
+
10)}),D.length==2&&q.byteLength!=D[1]-D[0]+1&&Wa("Payload length does not match range requested bytes",b,n));B.o(3);break;case 2:A=B.l();if(e.Sh)throw new S(1,1,7001,a,c);if(e.fj)throw new S(1,1,1003,a,c);throw new S(1,1,1002,a,A,c);case 3:return B.return(TA(v,q,n.status,a,n.url,b,c))}})}function aB(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
1510
|
+
function bB(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",UA);UA.isSupported=bB;UA.parse=VA;var ZA=window.fetch,XA=window.AbortController,$A=window.ReadableStream,WA=window.Headers;bB()&&(Sg("http",VA,2,!0),Sg("https",VA,2,!0),Sg("blob",VA,2,!0));function cB(){}
|
|
1511
|
+
function dB(a,b,c,d,e,f){var g=new eB,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;var q={};g.onabort=function(){n(new S(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var u=g.getAllResponseHeaders().trim().split("\r\n"),v={};u=t(u);for(var w=u.next();!w.done;w=u.next())w=w.value.split(": "),v[w[0].toLowerCase()]=w.slice(1).join(": ");
|
|
1512
|
+
q=v;e(q)}};g.onload=function(){var u=g.response;try{var v=TA(q,u,g.status,a,g.responseURL,b,c);m(v)}catch(w){n(w)}};g.onerror=function(u){n(new S(1,1,1002,a,u,c))};g.ontimeout=function(){n(new S(1,1,1003,a,c))};g.onprogress=function(u){var v=Date.now(),w=f.minBytesForProgressEvents||0,y=u.loaded-k;if(v-h>100&&y>=w||u.lengthComputable&&u.loaded==u.total)d(v-h,y,g.readyState==4?0:u.total-u.loaded),k=u.loaded,h=v};for(var r in b.headers)try{g.setRequestHeader(r.toLowerCase(),b.headers[r])}catch(u){throw new S(1,
|
|
1513
|
+
1,1002,a,u,c);}g.send(b.body)});return new Fg(l,function(){g.abort();return Promise.resolve()})}N("shaka.net.HttpXHRPlugin",cB);cB.parse=dB;var eB=window.XMLHttpRequest;Sg("http",dB,1,!0);Sg("https",dB,1,!0);Sg("blob",dB,1,!0);function fB(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function gB(a){var b=a.ac(!1);return b?wc(b):a.P().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function hB(a,b){return Im(a.g.P(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function iB(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function jB(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}iB.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function kB(a){return a.i==0?0:a.j/a.i};function lB(a){var b=this;this.u=a;this.i=new Map;this.h=new dh(function(){return mB(b).catch(function(){})});this.j=[];this.o=function(){};this.m=function(){};this.g=new iB;this.l=!1}lB.prototype.destroy=function(){return this.h.destroy()};function nB(a,b,c){a.o=b;a.m=c}function mB(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
|
|
1514
|
+
lB.prototype.queue=function(a,b,c,d,e){var f=this;eh(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return G(function(u){if(u.h==1)return u.g(oB(f,b),2);h=u.i;if(f.h.g)throw new S(2,9,7001);if(d)for(m in k=Qb(h),l=new Ah(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],f.m(q,r);f.g.close(c,h.byteLength);f.o(kB(f.g),f.g.g);return u.return(e(h))})});this.i.set(a,g);return g};
|
|
1515
|
+
function pB(a,b,c,d,e,f){eh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new S(2,9,7001);if(e){var h=Qb(c);h=new Ah(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.o(kB(a.g),a.g.g);return f(c)});a.i.set(b,g)}function qB(a){return G(function(b){return b.h==1?b.g(Promise.all(a.i.values()),2):b.return(a.g.g)})}
|
|
1516
|
+
function oB(a,b){var c,d,e,f;return G(function(g){if(g.h==1)return c=bh,d=a.u.request(c,b),e=function(){return d.abort()},a.j.push(e),g.g(d.promise,2);f=g.i;cb(a.j,e);return g.return(f.data)})};function rB(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Eg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}rB.prototype.abort=function(){var a=this;return G(function(b){if(b.h==1){try{a.i.abort()}catch(c){}b.m(2);return b.g(a.g,4)}if(b.h!=2)return b.o(0);b.l();b.j()})};
|
|
1517
|
+
function sB(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return G(function(g){if(g.h==1){if(e.result==null)return c(),g.return();f=e.result;return g.g(b(f.key,f.value,f),2)}f.continue();g.j()})}})}rB.prototype.store=function(){return this.h};rB.prototype.promise=function(){return this.g};function tB(a){this.h=a;this.g=[]}tB.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function uB(a,b){return vB(a,b,"readwrite")}function vB(a,b,c){c=a.h.transaction([b],c);var d=new rB(c,b);a.g.push(d);d.promise().then(function(){cb(a.g,d)},function(){cb(a.g,d)});return d};function wB(a,b,c){this.h=new tB(a);this.i=b;this.g=c}p=wB.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return xB(this.i)};p.removeSegments=function(a,b){return yB(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return G(function(d){if(d.h==1)return d.g(zB(b,b.i,a),2);c=d.i;return d.return(c.map(function(e){return b.Uh(e)}))})};p.addManifests=function(){return xB(this.g)};
|
|
1518
|
+
p.updateManifest=function(){return Promise.reject(new S(2,9,9016,"Cannot modify values in "+this.g))};function AB(a,b,c){a=uB(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=uB(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return yB(this,this.g,a,b)};
|
|
1519
|
+
p.getManifests=function(a){var b=this,c;return G(function(d){if(d.h==1)return d.g(zB(b,b.g,a),2);c=d.i;return d.return(Promise.all(c.map(function(e){return b.Ud(e)})))})};p.getAllManifests=function(){var a=this,b,c;return G(function(d){return d.h==1?(b=vB(a.h,a.g,"readonly"),c=new Map,d.g(sB(b,function(e,f){var g;return G(function(h){if(h.h==1)return h.g(a.Ud(f),2);g=h.i;c.set(e,g);h.j()})}),2)):d.h!=3?d.g(b.promise(),3):d.return(c)})};p.Uh=function(a){return a};p.Ud=function(a){return Promise.resolve(a)};
|
|
1520
|
+
function xB(a){return Promise.reject(new S(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){if(m.h==1){d=uB(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={fh:void 0},h=g.next())l=h.value,k.fh=e.add(l),k.fh.onsuccess=function(n){return function(){f.push(n.fh.result)}}(k);return m.g(d.promise(),2)}return m.return(f)})};
|
|
1521
|
+
function yB(a,b,c,d){a=uB(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Qg:void 0},e=c.next())f.Qg=e.value,b.delete(f.Qg).onsuccess=function(g){return function(){return d(g.Qg)}}(f);return a.promise()}
|
|
1522
|
+
function zB(a,b,c){var d,e,f,g,h,k,l;return G(function(m){if(m.h==1){d=vB(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={Bf:void 0,jf:void 0},k=h.next())l.jf=k.value,l.Bf=e.get(l.jf),l.Bf.onsuccess=function(n){return function(){n.Bf.result==void 0&&g.push(n.jf);f[n.jf]=n.Bf.result}}(l);return m.g(d.promise(),2)}if(g.length)throw new S(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function BB(a){this.g=new tB(a)}BB.prototype.destroy=function(){return this.g.destroy()};BB.prototype.getAll=function(){var a=this,b,c;return G(function(d){return d.h==1?(b=vB(a.g,"session-ids","readonly"),c=[],d.g(sB(b,function(e,f){c.push(f)}),2)):d.h!=3?d.g(b.promise(),3):d.return(c)})};BB.prototype.add=function(a){var b=uB(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
1523
|
+
BB.prototype.remove=function(a){var b=this,c;return G(function(d){return d.h==1?(c=uB(b.g,"session-ids"),d.g(sB(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):d.g(c.promise(),0)})};function CB(){this.g=new Map}CB.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};CB.prototype.init=function(){var a=this;DB.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1524
|
+
function EB(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Pb:d,cb:f},cb:e})})});if(b)return b;throw new S(2,9,9013,"Could not find a cell that supports add-operations");}function FB(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Pb:d,cb:f},e)})})}
|
|
1525
|
+
function GB(a,b,c){a=a.g.get(b);if(!a)throw new S(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new S(2,9,9013,"Could not find cell with name "+c);return b}function HB(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function IB(a){var b=Array.from(a.g.keys());if(!b.length)throw new S(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1526
|
+
function JB(a){var b,c,d;return G(function(e){return e.h==1?(b=Array.from(a.g.values()),c=b.length>0,c||(d=DB,d.forEach(function(f){(f=f())&&b.push(f)})),e.g(Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):e.g(Promise.all(b.map(function(f){return f.destroy()})),0)})}function KB(a,b){DB.set(a,b)}N("shaka.offline.StorageMuxer",CB);CB.unregister=function(a){DB.delete(a)};CB.register=KB;CB.prototype.destroy=CB.prototype.destroy;var DB=new Map;function LB(){wB.apply(this,arguments)}na(LB,wB);LB.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return G(function(g){d=uB(c.h,c.g);e=d.store();f=new Eg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new S(2,9,9012,"Could not find values for "+a))};return g.g(Promise.all([d.promise(),f]),0)})};
|
|
1527
|
+
LB.prototype.Ud=function(a){var b,c,d,e,f,g;return G(function(h){if(h.h==1){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=MB(a.periods[c],e),b.push(f);return h.g(bx(b),2)}g=h.i;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:a.expiration==null?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1528
|
+
function MB(a,b){NB(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return OB(e,a.startTime,b)})}
|
|
1529
|
+
function OB(a,b,c){var d=a.initSegmentUri?PB(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1530
|
+
PB(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}LB.prototype.Uh=function(a){return{data:a.data}};
|
|
1531
|
+
function PB(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new S(2,9,9004,"Could not parse uri "+a);}
|
|
1532
|
+
function NB(a){var b=a.streams.filter(function(h){return h.contentType=="audio"});a=a.streams.filter(function(h){return h.contentType=="video"});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=
|
|
1533
|
+
c++,e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function QB(){wB.apply(this,arguments)}na(QB,wB);
|
|
1534
|
+
QB.prototype.Ud=function(a){var b,c,d,e,f,g;return G(function(h){if(h.h==1){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,n.variantIds.length!=0&&l.push(RB(n,k.startTime,k.startTime+e));f=l;b.push(f)}return h.g(bx(b),2)}g=h.i;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:a.expiration==
|
|
1535
|
+
null?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1536
|
+
function RB(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1537
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}};function SB(){wB.apply(this,arguments)}na(SB,wB);p=SB.prototype;p.hasFixedKeySpace=function(){return!1};p.addSegments=function(a){return this.add(this.i,a)};p.addManifests=function(a){return this.add(this.g,a)};p.updateManifest=function(a,b){return AB(this,a,b)};p.Ud=function(a){a.expiration==null&&(a.expiration=Infinity);return Promise.resolve(a)};function TB(){this.m=this.j=this.i=this.h=this.g=this.l=null}p=TB.prototype;
|
|
1538
|
+
p.init=function(){var a=this,b=new Eg,c=!1,d=new of(function(){c=!0;b.reject(new S(2,9,9017))});typeof UB==="number"&&UB>0&&d.ka(UB);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){d.stop();var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new LB(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new QB(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;
|
|
1539
|
+
g=g.contains("manifest-v3")&&g.contains("segment-v3")?new QB(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new SB(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new BB(f):null;a.m=f;b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};
|
|
1540
|
+
e.onerror=function(f){c||(d.stop(),b.reject(new S(2,9,9001,e.error)),f.preventDefault())};return b};p.destroy=function(){var a=this;return G(function(b){switch(b.h){case 1:if(!a.g){b.A(2);break}return b.g(a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return b.g(a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return b.g(a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return b.g(a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return b.g(a.m.destroy(),10);case 10:a.l&&a.l.close(),b.j()}})};
|
|
1541
|
+
p.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};p.getEmeSessionCell=function(){return this.m};
|
|
1542
|
+
p.erase=function(){var a=this;return G(function(b){switch(b.h){case 1:if(!a.g){b.A(2);break}return b.g(a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return b.g(a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return b.g(a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return b.g(a.j.destroy(),8);case 8:return a.l&&a.l.close(),b.g(VB(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,b.g(a.init(),0)}})};
|
|
1543
|
+
function VB(){var a=new Eg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new S(2,9,9001,b.error));c.preventDefault()};return a}var UB=5;N("shaka.offline.indexeddb.StorageMechanismOpenTimeout",UB);KB("idb",function(){return nb().yh()?new TB:null});function WB(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}WB.prototype.Pb=function(){return this.i};WB.prototype.cb=function(){return this.h};WB.prototype.key=function(){return this.l};WB.prototype.toString=function(){return this.j};
|
|
1544
|
+
function XB(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(a==null)return null;var b=a[1];if(b!="manifest"&&b!="segment")return null;var c=a[2];if(!c)return null;var d=a[3];return d&&b!=null?new WB(b,c,d,Number(a[4])):null};function YB(a,b){this.h=a;this.g=b}
|
|
1545
|
+
function ZB(a,b){var c=new wl(null,0);c.Ab(b.duration);var d=b.streams.filter(function(l){return l.type=="audio"}),e=b.streams.filter(function(l){return l.type=="video"});d=$B(a,d,e,c);e=b.streams.filter(function(l){return l.type==Hc}).map(function(l){return aC(a,l,c)});var f=b.streams.filter(function(l){return l.type=="image"}).map(function(l){return aC(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1546
|
+
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}
|
|
1547
|
+
function $B(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1548
|
+
b.next())for(g=e.value,e=aC(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=aC(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
|
|
1549
|
+
function aC(a,b,c){var d=b.segments.map(function(e){return bC(a,e,b)});c.le(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Vl(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1550
|
+
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,mssPrivateData:b.mssPrivateData,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Qe(b.mimeType,b.codecs)]),isAudioMuxedInVideo:b.isAudioMuxedInVideo||!1,baseOriginalId:null}}
|
|
1551
|
+
function bC(a,b,c){var d=new WB("segment",a.h,a.g,b.dataKey);a=new yj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,b.initSegmentKey!=null?cC(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.Jf(b.thumbnailSprite);return a}function cC(a,b){var c=new WB("segment",a.h,a.g,b);return new wj(function(){return[c.toString()]},0,null)};function dC(){this.g=null}p=dC.prototype;p.configure=function(){};
|
|
1552
|
+
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.h){case 1:d=XB(a);c.g=d;if(d==null||d.g!="manifest")throw new S(2,1,9004,a);e=new CB;m.D(2);return m.g(e.init(),4);case 4:return m.g(GB(e,d.Pb(),d.cb()),5);case 5:return f=m.i,m.g(f.getManifests([d.key()]),6);case 6:return g=m.i,h=g[0],k=new YB(d.Pb(),d.cb()),l=ZB(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return m.u(),m.g(e.destroy(),7);case 7:m.B(0)}})};p.stop=function(){return Promise.resolve()};
|
|
1553
|
+
p.update=function(){};p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.h){case 1:return d=c.g,e=new CB,m.m(2,3),m.g(e.init(),5);case 5:return m.g(GB(e,d.Pb(),d.cb()),6);case 6:return f=m.i,m.g(f.getManifests([d.key()]),7);case 7:g=m.i;h=g[0];k=h.sessionIds.includes(a);l=h.expiration==void 0||h.expiration>b;if(!k||!l){m.A(3);break}return m.g(f.updateManifestExpiration(d.key(),b),3);case 3:return m.u(),m.g(e.destroy(),10);case 10:m.B(0);break;case 2:m.l(),m.A(3)}})};
|
|
1554
|
+
p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};Qc("application/x-offline-manifest",function(){return new dC});function eC(){}function fC(a,b){var c=XB(a);c&&c.g=="manifest"?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=Ig(a)):a=c&&c.g=="segment"?gC(c.key(),c,b):Gg(new S(2,1,9004,a));return a}
|
|
1555
|
+
function gC(a,b,c){var d=new CB;return Ig(void 0).Xa(function(){return d.init()}).Xa(function(){return GB(d,b.Pb(),b.cb())}).Xa(function(e){return e.getSegments([b.key()])}).Xa(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}N("shaka.offline.OfflineScheme",eC);eC.plugin=fC;Sg("offline",fC);function hC(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.h){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,iC(v.info,q)){v.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=jC(a,b,g);return l.g(h,5);case 5:k=l.i;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})}
|
|
1556
|
+
function jC(a,b,c){var d,e;return G(function(f){switch(f.h){case 1:return d=new Ch({wc:b,onError:function(){},xf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.m(2),d.configure(a),f.g(Nh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:f.o(3);break;case 2:return f.l(),f.g(d.destroy(),5);case 5:return f.return([]);case 3:return e=[],f.g(Promise.all(c.sessionIds.map(function(g){return G(function(h){if(h.h==
|
|
1557
|
+
1)return h.m(2),h.g(Zh(d,g),4);if(h.h!=2)return e.push(g),h.o(0);h.l();h.j()})})),6);case 6:return f.g(d.destroy(),7);case 7:return f.return(e)}})}function iC(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&db(a.audioCapabilities,b.audioCapabilities,c)&&db(a.videoCapabilities,b.videoCapabilities,c)};function kC(a,b,c){var d=b.presentationTimeline.getDuration();b=lC(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function mC(a,b){var c=ZB(new YB(a.Pb(),a.cb()),b),d=b.appMetadata||{};c=lC(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1558
|
+
function lC(a){var b=[],c=pg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(gg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(hg(c.value));return b};function nC(){this.g=new Map}function oC(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(d.id,d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;f<=0&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function pC(a,b){a.g.set(b.id,b.bandwidth||2048)}function qC(a,b){a=a.g.get(b);a==null&&(a=0);return a};function rC(a){var b=this;if(a&&a.constructor!=X)throw new S(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Yb()):(this.h=Yn(),this.g=new Rg,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new dh(function(){var d,e,f,g,h;return G(function(k){switch(k.h){case 1:return k.g(Promise.all(b.l.map(function(l){return mB(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return k.g(Promise.all(e),3);case 3:if(!c){k.A(4);
|
|
1559
|
+
break}return k.g(b.g.destroy(),4);case 4:b.h=null,b.g=null,k.j()}})});this.m=1E9}function sC(){if(Tc(nb()))a:{var a=t(DB.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=rC.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){arguments.length==2&&typeof a=="string"&&(a=Cn(a,b));return co(this.h,a)};p.getConfiguration=function(){var a=Yn();co(a,this.h,Yn());return a};p.Yb=function(){return this.g};
|
|
1560
|
+
p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new lB(this.g);this.l.push(h);b=tC(this,a,b||{},d||[],e||[],function(){var k;return G(function(l){if(l.h==1)return c?l.A(2):l.g(Fm(a,f.g,g.manifest.retryParameters),3);l.h!=2&&(c=l.i);k=Vc(a,c||null);return l.return(k())})},g,h);b=new Fg(b,function(){return mB(h)});b.finally(function(){cb(f.l,h)});return uC(this,b)};
|
|
1561
|
+
function tC(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M;return G(function(L){switch(L.h){case 1:return vC(),l=k=null,m=new CB,r=q=n=null,L.m(2,3),L.g(f(),5);case 5:return k=L.i,L.g(wC(a,b,k,g),6);case 6:u=L.i;xC(a);v=!u.presentationTimeline.U()&&!u.presentationTimeline.Uc();if(!v)throw new S(2,9,9005,b);w=t(d);y=w.next();case 7:if(y.done){L.A(9);break}x=y.value;return L.g(yC(a,x,u),10);case 10:z=L.i;u.imageStreams.push(z);xC(a);y=w.next();L.A(7);break;case 9:C=t(e),H=C.next();
|
|
1562
|
+
case 11:if(H.done)return Ph(g.drm.clearKeys,u.variants),B=u.variants.some(function(Q){if(Q.audio)for(var R=t(Q.audio.drmInfos),ia=R.next();!ia.done;ia=R.next())if(ia.value.licenseServerUri.startsWith("data:"))return!0;if(Q.video)for(Q=t(Q.video.drmInfos),R=Q.next();!R.done;R=Q.next())if(R.value.licenseServerUri.startsWith("data:"))return!0;return!1}),I=g.offline.usePersistentLicense,B&&(I=!1),L.g(a.kd(u,function(Q){r=r||Q},g,I),15);D=H.value;return L.g(zC(a,u,D.uri,D.language,D.kind,D.mime,D.codecs),
|
|
1563
|
+
14);case 14:A=L.i;u.textStreams.push(A);xC(a);H=C.next();L.A(11);break;case 15:l=L.i;xC(a);if(r)throw r;return L.g(AC(u,l,g,I),16);case 16:return L.g(m.init(),17);case 17:return xC(a),L.g(EB(m),18);case 18:return n=L.i,xC(a),E=BC(l,u,b,c,g,h,I),K=E.tk,J=E.Dh,L.g(n.cb.addManifests([K]),19);case 19:O=L.i;xC(a);q=O[0];xC(a);if(r)throw r;return L.g(CC(a,J,q,K,h,g,n.cb,u,l,I),20);case 20:return xC(a),DC(u,K,l,I),L.g(n.cb.updateManifest(q,K),21);case 21:return xC(a),P=new WB("manifest",n.path.Pb,n.path.cb,
|
|
1564
|
+
q),L.return(mC(P,K));case 3:return L.u(),L.g(m.destroy(),22);case 22:if(!k){L.A(23);break}return L.g(k.stop(),23);case 23:if(!l){L.A(25);break}return L.g(l.destroy(),25);case 25:L.B(0);break;case 2:M=L.l();if(q==null){L.A(27);break}return L.g(EC(q),27);case 27:throw r||M;}})}
|
|
1565
|
+
function CC(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,u,v,w,y,x,z,C;return G(function(H){switch(H.h){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new S(2,9,7001);};r=function(D,A){var B,I,E,K,J,O,P,M,L;return G(function(Q){if(Q.h==1){B=t(D);I=B.next();for(E={};!I.done;E={qc:void 0},I=B.next())E.qc=I.value,q(),K=hB(E.qc,f),J=E.qc.i,O=E.qc.h,P=function(R){return function(ia){var W,xa,ta,ra;return G(function(ya){switch(ya.h){case 1:W=R.qc.g;xa=W.ac(!1);if(!W.aesKey||xa){ya.A(2);break}return ya.g(Em(ia,W.aesKey,
|
|
1566
|
+
R.qc.j),3);case 3:ia=ya.i;case 2:return ta=gB(W),ya.g(g.addSegments([{data:ia}]),4);case 4:ra=ya.i,q(),m[ta]=ra[0],n+=ia.byteLength,ya.j()}})}}(E),M=E.qc.g,(L=M.ac(!1))?pB(e,E.qc.groupId,L,J,O,P):e.queue(E.qc.groupId,K,J,O,P);return Q.g(qB(e),2)}q();if(!A||e.l)return Q.A(0);DC(h,d,k,l);return Q.g(g.updateManifest(c,d),0)})};u=!1;H.m(2);if(!FC(h)||!u||GC(h)){H.A(4);break}return H.g(r(b.filter(function(D){return D.h}),!0),5);case 5:return q(),b=b.filter(function(D){return!D.h}),v=m,w=n,m={},n=0,H.g(HC(g,
|
|
1567
|
+
c,d,v,w,function(){return xC(a)}),6);case 6:q();case 4:if(u){H.A(7);break}return H.g(r(b,!1),8);case 8:return q(),y=m,x=n,m={},n=0,H.g(HC(g,c,d,y,x,function(){return q()}),9);case 9:q();case 7:H.o(0);break;case 2:return z=H.l(),C=Object.values(m),H.g(g.removeSegments(C,function(){}),10);case 10:throw z;}})}
|
|
1568
|
+
function EC(a){var b,c,d,e;return G(function(f){switch(f.h){case 1:return b=new CB,f.g(b.init(),2);case 2:return f.g(EB(b),3);case 3:return c=f.i,d=new WB("manifest",c.path.Pb,c.path.cb,a),f.g(b.destroy(),4);case 4:return e=new rC,f.g(e.remove(d.toString()),0)}})}
|
|
1569
|
+
function HC(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w;return G(function(y){switch(y.h){case 1:g=!1;y.m(2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())r=q.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,u!=null&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,u!=null&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
|
|
1570
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return y.g(a.updateManifest(b,c),4);case 4:g=!0;f();y.o(0);break;case 2:return v=y.l(),y.g(EC(b),5);case 5:if(g){y.A(6);break}w=Object.values(d);return y.g(a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
1571
|
+
function AC(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,y,x,z,C,H,D,A,B,I,E,K,J,O,P,M,L,Q;return G(function(R){switch(R.h){case 1:return e={width:Infinity,height:Infinity},Gf(a,c.restrictions,e),R.g(Jf(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;Ef(a,h,k,g,l);m=t(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(gg(q));r=t(a.textStreams);for(u=r.next();!u.done;u=
|
|
1572
|
+
r.next())v=u.value,f.push(hg(v));w=t(a.imageStreams);for(y=w.next();!y.done;y=w.next())x=y.value,f.push(ig(x));return R.g(c.offline.trackSelectionCallback(f),3);case 3:z=R.i;C=a.presentationTimeline.getDuration();H=0;D=t(z);for(A=D.next();!A.done;A=D.next())B=A.value,I=B.bandwidth*C/8,H+=I;R.m(4);return R.g(c.offline.downloadSizeCallback(H),6);case 6:E=R.i;if(!E)throw new S(2,9,9014);R.o(5);break;case 4:K=R.l();if(K instanceof S)throw K;throw new S(2,9,9015);case 5:J=new Set;O=new Set;P=new Set;M=
|
|
1573
|
+
t(z);for(L=M.next();!L.done;L=M.next())Q=L.value,Q.type=="variant"&&J.add(Q.id),Q.type=="text"&&O.add(Q.id),Q.type=="image"&&P.add(Q.id);a.variants=a.variants.filter(function(ia){return J.has(ia.id)});a.textStreams=a.textStreams.filter(function(ia){return O.has(ia.id)});a.imageStreams=a.imageStreams.filter(function(ia){return P.has(ia.id)});IC(a);R.j()}})}
|
|
1574
|
+
function BC(a,b,c,d,e,f,g){var h=kC(c,b,d),k=e.offline.progressCallback;nB(f,function(u,v){h.size=v;k(h,u)},function(u,v){l&&g&&m==v&&Vh(a,"cenc",u)});var l=FC(b)&&!GC(b),m=null;l&&(m=JC.get(a.g.keySystem));for(var n=new nC,q=t(b.textStreams),r=q.next();!r.done;r=q.next())n.g.set(r.value.id,52);q=t(b.imageStreams);for(r=q.next();!r.done;r=q.next())pC(n,r.value);q=t(b.variants);for(r=q.next();!r.done;r=q.next())oC(n,r.value);f=KC(f,n,b,e);e=f.streams;f=f.Dh;(n=a.g)&&g&&(n.initData=[]);return{tk:{creationTime:Date.now(),
|
|
1575
|
+
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Zd(),streams:e,sessionIds:g?di(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Dh:f}}function FC(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1576
|
+
function GC(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function DC(a,b,c,d){b.expiration=c.Zd();c=di(c);b.sessionIds=d?c:[];if(FC(a)&&d&&!c.length)throw new S(2,9,9007);}p.remove=function(a){return LC(this,MC(this,a))};
|
|
1577
|
+
function MC(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.h){case 1:vC();c=XB(b);if(c==null||c.g!="manifest")throw new S(2,9,9004,b);d=c;e=new CB;k.D(2);return k.g(e.init(),4);case 4:return k.g(GB(e,d.Pb(),d.cb()),5);case 5:return f=k.i,k.g(f.getManifests([d.key()]),6);case 6:return g=k.i,h=g[0],k.g(Promise.all([NC(a,h,e),OC(f,d,h)]),2);case 2:return k.u(),k.g(e.destroy(),8);case 8:k.B(0)}})}
|
|
1578
|
+
function PC(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&e.type=="video"?c.push({contentType:Qe(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||e.type!="audio"||c.push({contentType:Qe(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function NC(a,b,c){return G(function(d){return d.g(QC(a.g,a.h.drm,c,b),0)})}
|
|
1579
|
+
function OC(a,b,c){function d(){}var e=RC(c);mC(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Ok=function(){return LC(this,SC(this))};
|
|
1580
|
+
function SC(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.h){case 1:return vC(),b=a.g,c=a.h.drm,d=new CB,e=!1,n.D(2),n.g(d.init(),4);case 4:f=[],HB(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return n.g(k.getAll(),8);case 8:return l=n.i,n.g(hC(c,b,l),9);case 9:return m=n.i,n.g(k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return n.u(),n.g(d.destroy(),11);case 11:n.B(3);break;case 3:return n.return(!e)}})}
|
|
1581
|
+
p.list=function(){return LC(this,TC())};function TC(){var a,b,c;return G(function(d){switch(d.h){case 1:return vC(),a=[],b=new CB,d.D(2),d.g(b.init(),4);case 4:return c=Promise.resolve(),FB(b,function(e,f){c=c.then(function(){var g;return G(function(h){if(h.h==1)return h.g(f.getAllManifests(),2);g=h.i;g.forEach(function(k,l){k=mC(new WB("manifest",e.Pb,e.cb,l),k);a.push(k)});h.j()})})}),d.g(c,2);case 2:return d.u(),d.g(b.destroy(),6);case 6:d.B(3);break;case 3:return d.return(a)}})}
|
|
1582
|
+
function wC(a,b,c,d){var e,f,g,h,k;return G(function(l){if(l.h==1)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},
|
|
1583
|
+
addFont:function(){}},c.configure(d.manifest),xC(a),l.g(c.start(b,g),2);if(l.h!=3)return h=l.i,xC(a),k=UC(h),l.g(Promise.all(fh(k,function(m){return m.createSegmentIndex()})),3);xC(a);if(e)throw e;return l.return(h)})}
|
|
1584
|
+
function yC(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,y;return G(function(x){switch(x.h){case 1:return x.g(VC(a,b),2);case 2:d=x.i;if(d!="text/vtt")throw new S(1,2,2017,b);return x.g(WC(b,a.g,a.h.streaming.retryParameters),3);case 3:e=x.i;f=df(d);if(!f)throw new S(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Qb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);q=n.next();for(r={};!q.done;r={Sf:void 0,md:void 0},q=n.next())r.md=q.value,r.Sf=null,
|
|
1585
|
+
u=function(z){return function(){z.Sf==null&&(z.Sf=Bc([b],[z.md.payload]));return z.Sf||[]}}(r),v=new yj(r.md.startTime,r.md.endTime,u,0,null,null,0,0,Infinity),r.md.payload.includes("#xywh")&&(w=r.md.payload.split("#xywh=")[1].split(","),w.length===4&&v.Jf({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),m.push(v);y=d;if(!m.length){x.A(4);break}return x.g(Fm(m[0].P()[0],a.g,a.h.manifest.retryParameters),5);case 5:y=x.i;case 4:return x.return({id:a.m++,
|
|
1586
|
+
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Vl(m),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Qe(y||
|
|
1587
|
+
"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}
|
|
1588
|
+
function zC(a,b,c,d,e,f,g){var h,k,l;return G(function(m){if(m.h==1)return f?m.A(2):m.g(VC(a,c),3);m.h!=2&&(f=m.i);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Xl(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:Hc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
|
|
1589
|
+
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Qe(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=Qe(h.mimeType,h.codecs);l=ef(k);if(!l)throw new S(2,2,2014,f);return m.return(h)})}
|
|
1590
|
+
function VC(a,b){var c;return G(function(d){switch(d.h){case 1:return d.m(2),d.g(Fm(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.i;d.o(3);break;case 2:d.l();case 3:if(c)return d.return(c);throw new S(1,2,2011,b);}})}function WC(a,b,c){var d,e,f;return G(function(g){if(g.h==1)return d=bh,e=Wg([a],c),e.method="GET",g.g(b.request(d,e).promise,2);f=g.i;return g.return(f.data)})}
|
|
1591
|
+
p.kd=function(a,b,c,d){var e=this,f;return G(function(g){return g.h==1?(f=new Ch({wc:e.g,onError:b,xf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),g.g(Kh(f,a.variants,d),2)):g.h!=3?g.g(Xh(f),3):g.return(f)})};
|
|
1592
|
+
function KC(a,b,c,d){var e=new Map,f=UC(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=XC(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Dh:Array.from(e.values())}}
|
|
1593
|
+
function XC(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1594
|
+
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=h===0?d.id:0;YC(d,c.presentationTimeline.Jb(),function(l,m){var n=gB(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=qC(b,d.id)*r;r=jB(a.g,r);f.set(n,new fB(l,r,k,!1,m))}l.ea&&(q=gB(l.ea),f.has(q)||(r=qC(b,
|
|
1595
|
+
d.id)*.5,r=jB(a.g,r),f.set(q,new fB(l.ea,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});h!==0&&(k=(k+1)%h)});return g}
|
|
1596
|
+
function YC(a,b,c){b=a.segmentIndex.find(b);if(b!=null)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function xC(a){if(a.j.g)throw new S(2,9,7001);}function vC(){if(!sC())throw new S(2,9,9E3);}function LC(a,b){return G(function(c){if(c.h==1)return a.i.push(b),c.D(2),c.g(b,4);if(c.h!=2)return c.return(c.i);c.u();cb(a.i,b);return c.B(0)})}function uC(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){cb(a.i,c)})}
|
|
1597
|
+
function RC(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,d.initSegmentKey!=null&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1598
|
+
function QC(a,b,c,d){var e,f,g;return G(function(h){if(h.h==1){if(!d.drmInfo)return h.return();e=IB(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:PC(d,!1),videoCapabilities:PC(d,!0)}});return h.g(hC(b,a,f),2)}return h.h!=3?(g=h.i,h.g(e.remove(g),3)):h.g(e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1599
|
+
function UC(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
|
|
1600
|
+
function IC(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}N("shaka.offline.Storage",rC);rC.deleteAll=function(){var a;return G(function(b){return b.h==1?(a=new CB,b.D(2),b.g(JB(a),2)):b.h!=5?(b.u(),b.g(a.destroy(),5)):b.B(0)})};rC.prototype.list=rC.prototype.list;
|
|
1601
|
+
rC.prototype.removeEmeSessions=rC.prototype.Ok;rC.prototype.remove=rC.prototype.remove;rC.prototype.store=rC.prototype.store;rC.prototype.getNetworkingEngine=rC.prototype.Yb;rC.prototype.getConfiguration=rC.prototype.getConfiguration;rC.prototype.configure=rC.prototype.configure;rC.prototype.destroy=rC.prototype.destroy;rC.support=sC;
|
|
1602
|
+
var JC=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");
|
|
1603
|
+
Uq("offline",sC);function ZC(){}function $C(a,b){a={priority:b||0,callback:a};for(b=0;b<aD.length;b++)if(aD[b].priority<a.priority){aD.splice(b,0,a);return}aD.push(a)}N("shaka.polyfill",ZC);ZC.register=$C;ZC.installAll=function(){for(var a=t(aD),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Wa("Error installing polyfill!",c)}}};var aD=[];function bD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}bD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};bD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function cD(a){if(ec(a))return"cbcs";if(cc(a)||dc(a)||bc(a)||a==="com.huawei.wiseplay")return"cenc";Wa("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function dD(a){if(!a)return!1;a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&a.encryptionScheme!==void 0?!0:!1}function eD(a,b){return!a||a==b||(a=="cbcs"||a=="cbcs-1-9")&&nb().cd()?!0:!1};function fD(){}var gD;function hD(){nb().Lf()&&!gD&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(gD=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=iD,navigator.emeEncryptionSchemePolyfilled=!0)}
|
|
1604
|
+
function iD(a,b){var c=this,d,e;return G(function(f){if(f.h==1)return f.g(gD.call(c,a,b),2);d=f.i;if(e=dD(d))return navigator.requestMediaKeySystemAccess=gD,f.return(d);navigator.requestMediaKeySystemAccess=jD;return f.return(jD.call(c,a,b))})}
|
|
1605
|
+
function jD(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u;return G(function(v){if(v.h==1){d=cD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=kD(h.videoCapabilities,d),l=kD(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),n.name="NotSupportedError",
|
|
1606
|
+
n.code=DOMException.NOT_SUPPORTED_ERR,n;return v.g(gD.call(c,a,e),2)}q=v.i;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new bD(q,r,u))})}function kD(a,b){return a?a.filter(function(c){return eD(c.encryptionScheme,b)}):a}ZC.EmeEncryptionScheme=fD;fD.install=hD;$C(hD);function lD(){}var mD;function nD(){nb().Lf()&&!mD&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(mD=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=oD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
|
|
1607
|
+
function oD(a){var b=this,c,d,e;return G(function(f){switch(f.h){case 1:return f.g(mD.call(b,a),2);case 2:c=f.i;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=dD(d))return navigator.mediaCapabilities.decodingInfo=mD,f.return(c);navigator.mediaCapabilities.decodingInfo=pD;if(d){f.A(3);break}return f.g(qD(a),4);case 4:return c.keySystemAccess=f.i,f.return(c);case 3:return f.return(pD.call(b,a))}})}
|
|
1608
|
+
function pD(a){var b=this,c,d,e,f,g,h,k;return G(function(l){switch(l.h){case 1:return d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=cD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},eD(d,g)&&eD(c,g))?l.g(mD.call(b,a),2):l.return(h);case 2:k=l.i;if(k.keySystemAccess){k.keySystemAccess=new bD(k.keySystemAccess,c,d);l.A(3);break}if(!a.keySystemConfiguration){l.A(3);
|
|
1609
|
+
break}return l.g(qD(a),5);case 5:k.keySystemAccess=l.i;case 3:return l.return(k)}})}
|
|
1610
|
+
function qD(a){var b,c;return G(function(d){if(d.h==1){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1611
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return d.g(navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.i;return d.return(c)})}ZC.MCapEncryptionScheme=lD;lD.install=nD;$C(nD,-2);function rD(){}function sD(){nb().kc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),rD.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=tD)}
|
|
1612
|
+
function tD(a){var b,c,d,e,f,g,h,k,l,m,n;return G(function(q){switch(q.h){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};nb();c=a.video;d=a.audio;if(a.type!="media-source"){if(a.type=="file"){if(c&&(e=c.contentType,f=Uc().canPlayType(e)!="",!f)||d&&(g=d.contentType,h=Uc().canPlayType(g)!="",!h))return q.return(b)}else return q.return(b);q.A(2);break}if(!Tc())return q.return(b);if(!c){q.A(3);break}return q.g(uD(c),4);case 4:if(k=q.i,!k)return q.return(b);case 3:if(d){var r=
|
|
1613
|
+
nb().Oa(),u=d.contentType;r==="CAST"&&d.spatialRendering&&(u+="; spatialRendering=true");l=Ci(u);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return q.g(vD(c,d,m),6);case 6:if(n=q.i)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}function uD(a){var b,c,d;return G(function(e){return e.h==1?(b=nb(),c=b.Oa(),c!=="CAST"?e.A(2):e.g(wD(a),3)):e.h!=2?(d=e.i,e.return(d)):e.return(Ci(a.contentType))})}
|
|
1614
|
+
function vD(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return G(function(v){switch(v.h){case 1:d=[];e=[];f=[];c.audio&&(g={robustness:c.audio.robustness||"",contentType:b.contentType},nb().xi()&&b.contentType.includes('codecs="ac-3"')&&(g.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(g.encryptionScheme=c.audio.encryptionScheme,f.push(c.audio.encryptionScheme)),d.push(g));c.video&&(h={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(h.encryptionScheme=
|
|
1615
|
+
c.video.encryptionScheme,f.push(c.video.encryptionScheme)),e.push(h));k={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(k.audioCapabilities=d);e.length&&(k.videoCapabilities=e);l=a?a.contentType:"";m=b?b.contentType:"";n=Ye(l)+";"+Xe(l);q=Ye(m)+";"+Xe(m);r=c.keySystem;u=null;v.m(2);var w=fc(n,q,r,f);if(ic.has(w)){w=fc(n,q,r,f);u=ic.get(w)||null;v.A(4);break}return v.g(navigator.requestMediaKeySystemAccess(c.keySystem,
|
|
1616
|
+
[k]),5);case 5:w=u=v.i;var y=fc(n,q,r,f);ic.set(y,w);case 4:v.o(3);break;case 2:v.l();case 3:return v.return(u)}})}
|
|
1617
|
+
function wD(a){var b,c,d,e,f;return G(function(g){if(g.h==1){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Ci(a.contentType));b=a.contentType;a.width&&a.height&&a.width>1280&&a.height>720&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),c<24||c>30)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;
|
|
1618
|
+
default:return g.return(!1)}e=!1;f=xD;return f.has(b)?(e=f.get(b),g.A(2)):g.g(cast.__platform__.canDisplayType(b),3)}g.h!=2&&(e=g.i,f.set(b,e));return g.return(e)})}ZC.MediaCapabilities=rD;rD.install=sD;rD.originalMcap=null;var xD=new Map;$C(sD,-1);function yD(){}function zD(){var a=nb(),b=a.Ia()==="WEBKIT"?a.Ba():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(b<=12?(AD(),BD()):b<=15&&AD());a=t(a.Hi());for(b=a.next();!b.done;b=a.next())CD(b.value);(window.MediaSource||window.ManagedMediaSource)&&DD();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ED()}
|
|
1619
|
+
function AD(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function BD(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1620
|
+
function DD(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return Ue(c)!="mp2t"&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return Ue(c)!="mp2t"&&b(c)}}}
|
|
1621
|
+
function CD(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return Xe(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return Xe(d)!=a&&c(d)}}}
|
|
1622
|
+
function ED(){var a=MediaSource.isTypeSupported;nb().cj()&&(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(d<0)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});f>=0&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}ZC.MediaSource=yD;yD.install=zD;$C(zD);function FD(){}var GD,HD,ID,JD,KD,LD;
|
|
1623
|
+
function MD(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=ND){if(a===void 0?0:a)GD=!0,HD=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),ID=HTMLMediaElement.prototype.setMediaKeys,JD=window.MediaKeys,KD=window.MediaKeySystemAccess,LD=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=OD;window.MediaKeys=PD;window.MediaKeySystemAccess=
|
|
1624
|
+
QD;navigator.requestMediaKeySystemAccess=RD;window.shakaMediaKeysPolyfill=ND;Vf.clear();ic.clear()}}function RD(a,b){try{var c=new QD(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function OD(a){var b=this.mediaKeys;b&&b!=a&&SD(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?SD(a,this):Promise.resolve()}
|
|
1625
|
+
function TD(a){a=Qb(a.initData);if(Wb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=oc(a.subarray(4),!0);a=rc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Sb(a);this.dispatchEvent(b)}ZC.PatchedMediaKeysApple=FD;
|
|
1626
|
+
FD.uninstall=function(){window.shakaMediaKeysPolyfill==ND&&GD&&(GD=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",HD),HTMLMediaElement.prototype.setMediaKeys=ID,window.MediaKeys=JD,window.MediaKeySystemAccess=KD,navigator.requestMediaKeySystemAccess=LD,HD=LD=ID=KD=JD=null,window.shakaMediaKeysPolyfill="",Vf.clear(),ic.clear())};FD.install=MD;
|
|
1627
|
+
function QD(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if(c.persistentState=="required")b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1628
|
+
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1629
|
+
QD.prototype.createMediaKeys=function(){var a=new PD(this.keySystem);return Promise.resolve(a)};QD.prototype.getConfiguration=function(){return this.g};function PD(a){this.h=new WebKitMediaKeys(a);this.g=new gb}PD.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary")throw new TypeError("Session type "+a+" is unsupported on this platform.");return new UD(this.h,a)};PD.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1630
|
+
function SD(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.F(b,"webkitneedkey",TD);try{return El(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}PD.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function UD(a){Og.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new gb;this.sessionId="";this.expiration=NaN;this.closed=new Eg;this.keyStatuses=new VD;this.onkeystatuseschange=null}
|
|
1631
|
+
na(UD,Og);p=UD.prototype;
|
|
1632
|
+
p.generateRequest=function(a,b){var c=this;this.h=new Eg;try{var d=this.l.createSession("video/mp4",Qb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.F(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",c.keyStatuses.bc()==void 0?"license-request":"license-renewal").set("message",Sb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.F(d,"webkitkeyadded",function(){c.g&&(WD(c,"usable"),c.g.resolve(),c.g=null)});this.j.F(d,"webkitkeyerror",
|
|
1633
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(c.h!=null)c.h.reject(e),c.h=null;else if(c.g!=null)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:WD(c,"output-not-allowed");break;default:WD(c,"internal-error")}});WD(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1634
|
+
p.update=function(a){this.g=new Eg;try{this.i.update(Qb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
|
|
1635
|
+
function WD(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}function VD(){this.size=0;this.g=void 0}p=VD.prototype;p.bc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,hc.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=hc.value();return this.g&&Pb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var ND="apple";
|
|
1636
|
+
$C(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||MD())});function XD(){}function YD(){if(window.MediaKeys){var a=nb();MediaKeys.prototype.setServerCertificate&&a.ve()||(MediaKeys.prototype.setServerCertificate=ZD)}}function ZD(){return Promise.resolve(!1)}ZC.PatchedMediaKeysCert=XD;XD.install=YD;$C(YD);function $D(){}
|
|
1637
|
+
function aE(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)bE="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=cE;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=dE;window.MediaKeys=eE;window.MediaKeySystemAccess=fE;window.shakaMediaKeysPolyfill=gE}}
|
|
1638
|
+
function hE(a){var b=bE;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function cE(a,b){try{var c=new fE(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function dE(a){var b=this.mediaKeys;b&&b!=a&&iE(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&iE(a,this);return Promise.resolve()}ZC.PatchedMediaKeysWebkit=$D;$D.install=aE;
|
|
1639
|
+
function fE(a,b){this.g=this.keySystem=a;var c=!1;a=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1640
|
+
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));f.persistentState=="required"&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1641
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if(a=="org.w3.clearkey"||a=="com.widevine.alpha")c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}fE.prototype.createMediaKeys=function(){var a=new eE(this.g);return Promise.resolve(a)};fE.prototype.getConfiguration=function(){return this.h};function eE(a){this.l=a;this.h=null;this.g=new gb;this.i=[];this.j=new Map}
|
|
1642
|
+
function iE(a,b){a.h=b;a.g.Qa();var c=bE;b&&(a.g.F(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Sb(d.initData);a.h.dispatchEvent(e)}),a.g.F(b,c+"keymessage",function(d){var e=jE(a,d.sessionId);e&&(d=(new Map).set("messageType",e.keyStatuses.bc()==void 0?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.F(b,c+"keyadded",function(d){(d=jE(a,d.sessionId))&&d.ready()}),
|
|
1643
|
+
a.g.F(b,c+"keyerror",function(d){var e=jE(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(d.systemCode==45&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?kE(e,"output-restricted"):f==1?kE(e,"expired"):kE(e,"internal-error"))}}))}
|
|
1644
|
+
eE.prototype.createSession=function(a){a=a||"temporary";if(a!="temporary"&&a!="persistent-license")throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new lE(b,this.l,a);this.i.push(a);return a};eE.prototype.setServerCertificate=function(){return Promise.resolve(!1)};eE.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1645
|
+
function jE(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function lE(a,b,c){Og.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Eg;this.keyStatuses=new mE;this.onkeystatuseschange=null}na(lE,Og);p=lE.prototype;p.ready=function(){kE(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
1646
|
+
function nE(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if(a.l=="persistent-license")if(c)var d=Qb(rc("LOAD_SESSION|"+c));else{var e=rc("PERSISTENT|");d=Ac(e,b)}else d=Qb(b)}catch(g){return Promise.reject(g)}a.h=new Eg;var f=hE("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if(g.name!="InvalidStateError")return a.h=null,Promise.reject(g);(new of(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).ka(.01)}return a.h}
|
|
1647
|
+
function oE(a,b,c){if(a.g)a.g.then(function(){return oE(a,b,c)}).catch(function(){return oE(a,b,c)});else{a.g=b;if(a.i=="webkit-org.w3.clearkey"){var d=mc(c);var e=JSON.parse(d);e.keys[0].kty!="oct"&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=xc(e.keys[0].k);e=xc(e.keys[0].kid)}else d=Qb(c),e=null;var f=hE("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1648
|
+
function kE(a,b){var c=a.keyStatuses;c.size=b==void 0?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b);if(a.onkeystatuseschange)a.onkeystatuseschange(b)}p.generateRequest=function(a,b){return nE(this,b,null)};p.load=function(a){return this.l=="persistent-license"?nE(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Eg;oE(this,b,a);return b};
|
|
1649
|
+
p.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=hE("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function mE(){this.size=0;this.g=void 0}p=mE.prototype;p.bc=function(){return this.g};
|
|
1650
|
+
p.forEach=function(a){this.g&&a(this.g,hc.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=hc.value();return this.g&&Pb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var bE="",gE="webkit";$C(aE);function pE(){}function qE(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=rE))}function rE(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}ZC.RandomUUID=pE;pE.install=qE;$C(qE);function sE(){}function tE(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:uE})}function uE(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}ZC.Symbol=sE;sE.install=tE;$C(tE);function vE(){}function wE(){for(var a=t([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next())b=b.value,b.prototype.indexOf||(b.prototype.indexOf=xE),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=yE),b.prototype.includes||(b.prototype.includes=zE)}function xE(a,b){return Array.prototype.indexOf.call(this,a,b)}function yE(a,b){return Array.prototype.lastIndexOf.call(this,a,b)}
|
|
1651
|
+
function zE(a,b){return this.indexOf(a,b)!==-1}ZC.TypedArray=vE;vE.install=wE;$C(wE);function AE(){}function BE(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}ZC.VideoPlayPromise=AE;AE.install=BE;$C(BE);function CE(){}function DE(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||typeof Uc().webkitDroppedFrameCount==="number")&&(a.getVideoPlaybackQuality=EE)}}function EE(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}ZC.VideoPlaybackQuality=CE;CE.install=DE;$C(DE);function FE(){}function GE(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(b==3)a=HE;else if(b==6)a=IE;else{try{var c=!!HE(1,2,"")}catch(d){c=!1}c&&(a=HE)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function HE(a,b,c){return new window.TextTrackCue(a,b,c)}function IE(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}ZC.VTTCue=FE;FE.install=GE;$C(GE);function JE(a){Og.call(this);this.g=a;this.m=null;this.h=[];this.j=-1;this.i=this.l=null;this.o=new gb}na(JE,Og);p=JE.prototype;p.destroy=function(){var a=this;return G(function(b){if(b.h==1)return b.g(a.removeAllItems(),2);a.g=null;a.o&&(a.o.release(),a.o=null);Og.prototype.release.call(a);b.j()})};p.configure=function(a){this.m=a};p.getConfiguration=function(){return this.m};p.getCurrentItem=function(){return this.h.length&&this.j>=0&&this.j<this.h.length?this.h[this.j]:null};
|
|
1652
|
+
p.getCurrentItemIndex=function(){return this.j};p.getItems=function(){return this.h.slice()};p.insertItems=function(a){this.h.push.apply(this.h,F(a));this.dispatchEvent(new T("itemsinserted"))};
|
|
1653
|
+
p.removeAllItems=function(){var a=this,b,c,d,e;return G(function(f){if(f.h==1)return a.o.Qa(),a.h.length&&a.j>=0?f.g(a.g.Dc(),2):f.A(2);if(f.h!=4){b=[];a.i&&(a.i.preloadManager.l||b.push(a.i.preloadManager.destroy()),a.i=null);a.l&&(a.l.preloadManager.l||b.push(a.l.preloadManager.destroy()),a.l=null);c=t(a.h);for(d=c.next();!d.done;d=c.next())e=d.value,e.preloadManager&&!e.preloadManager.l&&b.push(e.preloadManager.destroy());return b.length?f.g(Promise.all(b),4):f.A(4)}a.h=[];a.j=-1;a.dispatchEvent(new T("itemsremoved"));
|
|
1654
|
+
f.j()})};
|
|
1655
|
+
p.playItem=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,y,x;return G(function(z){switch(z.h){case 1:b.o.Qa();if(!b.h.length||a>=b.h.length)throw new S(2,7,7007);c=b.getCurrentItem();d=b.h[a];b.j!=a&&(b.j=a,b.dispatchEvent(new T("currentitemchanged")));e=b.g.$e();f=b.m?b.m.preloadNextUrlWindow:0;f>0&&(g=!1,b.o.F(e,"timeupdate",function(){var C,H,D,A;return G(function(B){switch(B.h){case 1:if(b.l||b.h.length<=1||g||b.g.U()||!e.duration)return B.return();C=b.g.Ra().end-e.currentTime;if(isNaN(C)){B.A(0);
|
|
1656
|
+
break}if(!(C<=f)){B.A(0);break}H=b.m&&b.m.repeatMode;D=null;b.j+1<b.h.length?D=b.h[b.j+1]:H==1&&(D=b.h[0]);if(!D||D.preloadManager&&!D.preloadManager.l){B.A(0);break}g=!0;A=null;B.m(5);return B.g(b.g.preload(D.manifestUri,D.startTime,D.mimeType,D.config),7);case 7:A=B.i;B.o(6);break;case 5:B.l(),A=null;case 6:b.l={item:D,preloadManager:A},g=!1,B.j()}})}));b.o.F(b.g,"complete",function(){var C=b.m&&b.m.repeatMode,H=!1;if(C==2)H=!0;else{var D=b.j+1;D<b.h.length?b.playItem(D):C==1&&(b.h.length==1?H=
|
|
1657
|
+
!0:b.playItem(0))}H&&(e.paused?(e.currentTime=b.g.Ra().start,e.play()):b.o.F(e,"paused",function(){e.currentTime=b.g.Ra().start;e.play()}))});h=d.manifestUri;d.preloadManager&&!d.preloadManager.l&&(h=d.preloadManager);k=!1;b.l&&b.l.item==d&&b.l.preloadManager?h=b.l.preloadManager:b.i&&b.i.item==d&&b.i.preloadManager&&(h=b.i.preloadManager,k=!0);if(!b.i){z.A(2);break}if(k||b.i.preloadManager.l){z.A(3);break}return z.g(b.i.preloadManager.destroy(),3);case 3:b.i=null;case 2:if(!(b.m&&b.m.preloadPrevItem&&
|
|
1658
|
+
c&&b.g.$d()===vr)){z.A(5);break}l=null;z.m(6);return z.g(b.g.gj(),8);case 8:l=z.i;z.o(7);break;case 6:z.l(),l=null;case 7:b.i={item:c,preloadManager:l};case 5:return d.config&&(b.g.Ki(),b.g.configure(d.config)),z.g(b.g.load(h,d.startTime,d.mimeType),9);case 9:b.l=null;if(d.extraText)for(m=t(d.extraText),n=m.next();!n.done;n=m.next())q=n.value,q.mime?b.g.Rd(q.uri,q.language,q.kind,q.mime,q.codecs):b.g.Rd(q.uri,q.language,q.kind);if(d.extraThumbnail)for(r=t(d.extraThumbnail),u=r.next();!u.done;u=r.next())v=
|
|
1659
|
+
u.value,b.g.Oe(v);if(d.extraChapter)for(w=t(d.extraChapter),y=w.next();!y.done;y=w.next())x=y.value,b.g.Ne(x.uri,x.language,x.mime);z.j()}})};N("shaka.queue.QueueManager",JE);JE.prototype.playItem=JE.prototype.playItem;JE.prototype.removeAllItems=JE.prototype.removeAllItems;JE.prototype.insertItems=JE.prototype.insertItems;JE.prototype.getItems=JE.prototype.getItems;JE.prototype.getCurrentItemIndex=JE.prototype.getCurrentItemIndex;JE.prototype.getCurrentItem=JE.prototype.getCurrentItem;
|
|
1660
|
+
JE.prototype.getConfiguration=JE.prototype.getConfiguration;JE.prototype.configure=JE.prototype.configure;JE.prototype.destroy=JE.prototype.destroy;Nq=function(a){return new JE(a)};function KE(){}KE.prototype.parseInit=function(){};KE.prototype.setSequenceMode=function(){};KE.prototype.setManifestType=function(){};KE.prototype.parseMedia=function(a,b){var c=null,d=[];a=mc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=LE.exec(e))){var f=ME.exec(e[1]);f=parseInt(f[1],10)*60+parseFloat(f[2].replace(",","."));e=new de(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1661
|
+
N("shaka.text.LrcTextParser",KE);KE.prototype.parseMedia=KE.prototype.parseMedia;KE.prototype.setManifestType=KE.prototype.setManifestType;KE.prototype.setSequenceMode=KE.prototype.setSequenceMode;KE.prototype.parseInit=KE.prototype.parseInit;var LE=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,ME=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;bf("application/x-subtitle-lrc",function(){return new KE});function NE(){this.g="UNKNOWN"}NE.prototype.parseInit=function(){};NE.prototype.setSequenceMode=function(){};NE.prototype.setManifestType=function(a){this.g=a};
|
|
1662
|
+
NE.prototype.parseMedia=function(a,b,c,d){var e=mc(a);a=[];if(e=="")return a;var f=xd(e,"tt",!0);if(!f)throw new S(2,2,2005,"Failed to parse TTML.");e=Hd(f,"body")[0];if(!e)return[];var g=Od(f,OE,"frameRate"),h=Od(f,OE,"subFrameRate"),k=Od(f,OE,"frameRateMultiplier"),l=Od(f,OE,"tickRate"),m=Od(f,OE,"cellResolution"),n=f.attributes["xml:space"]||"default",q=Od(f,PE,"extent");if(n!="default"&&n!="preserve")throw new S(2,2,2005,"Invalid xml:space value: "+n);n=n=="default";g=new QE(g,h,k,l);m=RE(m);
|
|
1663
|
+
h=Hd(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return v!="\n"});k=Hd(f,"style");f=Hd(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=SE(this,u.value,k,q))&&l.push(u);if(Ed(e,"p").length)throw new S(2,2,2001,"<p> can only be inside <div> in TTML");q=t(Ed(e,"div"));for(r=q.next();!r.done;r=q.next())if(Ed(r.value,"span").length)throw new S(2,2,2001,"<span> can only be inside <p> in TTML");if(b=TE(this,e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor=
|
|
1664
|
+
"transparent"),a.push(b);return a};
|
|
1665
|
+
function TE(a,b,c,d,e,f,g,h,k,l,m,n,q,r){var u=m;if(Cd(b)){if(!n)return null;var v={tagName:"span",children:[Fd(b)],attributes:{},parent:null}}else v=b;for(var w=null,y=t(UE),x=y.next();!x.done&&!(w=VE(v,"backgroundImage",e,"#",x.value)[0]);x=y.next());y=null;x=Od(v,UE,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(x&&z.test(x)){y=parseInt(x.split(":").pop(),10)-1;if(y>=r.length)return null;y=r[y]}else q&&x&&!x.startsWith("#")&&(z=new zb(q),x=new zb(x),(x=z.resolve(x).toString())&&
|
|
1666
|
+
(y=x));if(b.tagName=="p"||w||y)n=!0;b=n;x=(v.attributes["xml:space"]||(k?"default":"preserve"))=="default";z=v.children.every(Cd);k=[];if(!z)for(var C=t(v.children),H=C.next();!H.done;H=C.next())(H=TE(a,H.value,c,d,e,f,g,h,x,l,v,n,q,r))&&k.push(H);e=m!=null;q=Fd(v);q=v.children.length&&q&&/\S/.test(q);C=v.attributes.begin||v.attributes.end||v.attributes.dur;if(!(C||q||v.tagName=="br"||k.length!=0||e&&!x))return null;r=WE(v,d);q=r.start;for(r=r.end;u&&u.tagName&&u.tagName!="tt";)r=XE(u,d,q,r),q=r.start,
|
|
1667
|
+
r=r.end,u=u.parent;q==null&&(q=0);q+=c.periodStart;r=r==null?Infinity:r+c.periodStart;a.g!=="HLS"&&(q=Math.max(q,c.segmentStart),r=Math.min(r,c.segmentEnd));if(!C&&k.length>0)for(q=Infinity,r=0,c=t(k),d=c.next();!d.done;d=c.next())d=d.value,q=Math.min(q,d.startTime),r=Math.max(r,d.endTime);if(v.tagName=="br")return a=new de(q,r,""),a.lineBreak=!0,a;c="";z&&(c=tc(Fd(v)||""),x&&(c=c.replace(/\s+/g," ")));c=new de(q,r,c);c.nestedCues=k;n||(c.isContainer=!0);l&&(c.cellResolution=l);l=VE(v,"region",g,
|
|
1668
|
+
"")[0];if(v.attributes.region&&l&&l.attributes["xml:id"]){var D=l.attributes["xml:id"];c.region=h.filter(function(A){return A.id==D})[0]}h=l;m&&e&&!v.attributes.region&&!v.attributes.style&&(h=VE(m,"region",g,"")[0]);YE(a,c,v,h,w,y,f,b,k.length==0);return c}
|
|
1669
|
+
function SE(a,b,c,d){var e=new ed,f=b.attributes["xml:id"];if(!f)return null;e.id=f;f=null;d&&(f=ZE.exec(d)||$E.exec(d));d=f?Number(f[1]):null;f=f?Number(f[2]):null;var g,h=aF(a,b,c,"extent");if(h){var k=(g=ZE.exec(h))||$E.exec(h);k!=null&&(e.width=Number(k[1]),e.height=Number(k[2]),g||(d!=null&&(e.width=e.width*100/d),f!=null&&(e.height=e.height*100/f)),e.widthUnits=g||d!=null?fd:0,e.heightUnits=g||f!=null?fd:0)}if(a=aF(a,b,c,"origin"))if(k=(g=ZE.exec(a))||$E.exec(a),k!=null)e.viewportAnchorX=Number(k[1]),
|
|
1670
|
+
e.viewportAnchorY=Number(k[2]),g?h||(e.width=100-e.viewportAnchorX,e.widthUnits=fd,e.height=100-e.viewportAnchorY,e.heightUnits=fd):(f!=null&&(e.viewportAnchorY=e.viewportAnchorY*100/f),d!=null&&(e.viewportAnchorX=e.viewportAnchorX*100/d)),e.viewportAnchorUnits=g||d!=null?fd:0;return e}function bF(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),b.length==4)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
|
|
1671
|
+
function YE(a,b,c,d,e,f,g,h,k){h=h||k;cF(a,c,d,g,"direction",h)=="rtl"&&(b.direction="rtl");k=cF(a,c,d,g,"writingMode",h);k=="tb"||k=="tblr"?b.writingMode="vertical-lr":k=="tbrl"?b.writingMode="vertical-rl":k=="rltb"||k=="rl"?b.direction="rtl":k&&(b.direction=ge);(k=cF(a,c,d,g,"textAlign",!0))?(b.positionAlign=dF.get(k),b.lineAlign=eF.get(k),b.textAlign=Ce[k.toUpperCase()]):b.textAlign=fe;if(k=cF(a,c,d,g,"displayAlign",!0))b.displayAlign=De[k.toUpperCase()];if(k=cF(a,c,d,g,"color",h))b.color=bF(k);
|
|
1672
|
+
if(k=cF(a,c,d,g,"backgroundColor",h))b.backgroundColor=bF(k);if(k=cF(a,c,d,g,"border",h))b.border=k;if(k=cF(a,c,d,g,"fontFamily",h))switch(k){case "monospaceSerif":b.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":b.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":b.fontFamily="sans-serif";break;case "monospaceSansSerif":b.fontFamily="Consolas,monospace";break;case "proportionalSerif":b.fontFamily="serif";break;default:b.fontFamily=
|
|
1673
|
+
k.split(",").filter(function(l){return l!="default"}).join(",")}(k=cF(a,c,d,g,"fontWeight",h))&&k=="bold"&&(b.fontWeight=ze);k=cF(a,c,d,g,"wrapOption",h);b.wrapLine=k&&k=="noWrap"?!1:!0;(k=cF(a,c,d,g,"lineHeight",h))&&k.match(fF)&&(b.lineHeight=k);(k=cF(a,c,d,g,"fontSize",h))&&(k.match(fF)||k.match(gF))&&(b.fontSize=k);if(k=cF(a,c,d,g,"fontStyle",h))b.fontStyle=Fe[k.toUpperCase()];e?(f=e.attributes.imageType||e.attributes.imagetype,k=e.attributes.encoding,e=Fd(e).trim(),f=="PNG"&&k=="Base64"&&e&&
|
|
1674
|
+
(b.backgroundImage="data:image/png;base64,"+e)):f&&(b.backgroundImage=f);if(e=cF(a,c,d,g,"textOutline",h))e=e.split(" "),e[0].match(fF)?b.textStrokeColor=b.color:(b.textStrokeColor=bF(e[0]),e.shift()),e[0]&&e[0].match(fF)?b.textStrokeWidth=e[0]:b.textStrokeColor="";(e=cF(a,c,d,g,"letterSpacing",h))&&e.match(fF)&&(b.letterSpacing=e);(e=cF(a,c,d,g,"linePadding",h))&&e.match(fF)&&(b.linePadding=e);if(e=cF(a,c,d,g,"opacity",h))b.opacity=parseFloat(e);(e=aF(a,d,g,"textDecoration"))&&hF(b,e);(e=iF(a,c,
|
|
1675
|
+
g,"textDecoration"))&&hF(b,e);if(e=cF(a,c,d,g,"textCombine",h))b.textCombineUpright=e;switch(cF(a,c,d,g,"ruby",h)){case "container":b.rubyTag="ruby";break;case "text":b.rubyTag="rt"}}
|
|
1676
|
+
function hF(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(Be)||a.textDecoration.push(Be);break;case "noUnderline":a.textDecoration.includes(Be)&&cb(a.textDecoration,Be);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&cb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1677
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&cb(a.textDecoration,"overline")}}function cF(a,b,c,d,e,f){f=f===void 0?!0:f;return(b=iF(a,b,d,e))?b:f?aF(a,c,d,e):null}function aF(a,b,c,d){if(!b)return null;var e=Od(b,PE,d);return e?e:jF(a,b,c,d)}function iF(a,b,c,d){var e=Od(b,PE,d);return e?e:jF(a,b,c,d)}
|
|
1678
|
+
function jF(a,b,c,d){b=VE(b,"style",c,"");for(var e=null,f=0;f<b.length;f++){var g=Nd(b[f],"urn:ebu:tt:style",d);g||(g=Od(b[f],PE,d));g||(g=iF(a,b[f],c,d));g&&(e=g)}return e}function VE(a,b,c,d,e){var f=[];if(!a||c.length<1)return f;var g=a;for(a=null;!a&&!(a=e?Nd(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1679
|
+
function XE(a,b,c,d){a=WE(a,b);c==null?c=a.start:a.start!=null&&(c+=a.start);d==null?d=a.end:a.start!=null&&(d+=a.start);return{start:c,end:d}}function WE(a,b){var c=kF(a.attributes.begin,b),d=kF(a.attributes.end,b);a=kF(a.attributes.dur,b);d==null&&a!=null&&(d=c+a);return{start:c,end:d}}
|
|
1680
|
+
function kF(a,b){var c=null;if(lF.test(a)){a=lF.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+d*60+c*3600}else if(mF.test(a))c=nF(mF,a);else if(oF.test(a))c=nF(oF,a);else if(pF.test(a))a=pF.exec(a),c=Number(a[1])/b.frameRate;else if(qF.test(a))a=qF.exec(a),c=Number(a[1])/b.g;else if(rF.test(a))c=nF(rF,a);else if(a)throw new S(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1681
|
+
function nF(a,b){a=a.exec(b);return a==null||a[0]==""?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+(Number(a[2])||0)*60+(Number(a[1])||0)*3600}function RE(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{columns:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}N("shaka.text.TtmlTextParser",NE);NE.prototype.parseMedia=NE.prototype.parseMedia;NE.prototype.setManifestType=NE.prototype.setManifestType;NE.prototype.setSequenceMode=NE.prototype.setSequenceMode;NE.prototype.parseInit=NE.prototype.parseInit;
|
|
1682
|
+
function QE(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);this.g==0&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
1683
|
+
var ZE=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gF=/^(\d{1,4}(?:\.\d+)?|100)%$/,fF=/^(\d+px|\d+em|\d*\.?\d+c)$/,$E=/^(\d+)px (\d+)px$/,lF=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mF=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,oF=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,pF=/^(\d*(?:\.\d*)?)f$/,qF=/^(\d*(?:\.\d*)?)t$/,rF=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),eF=(new Map).set("left",je).set("center","center").set("right",
|
|
1684
|
+
"end").set("start",je).set("end","end"),dF=(new Map).set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),OE=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],PE=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],UE=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];bf("application/ttml+xml",function(){return new NE});function sF(){this.g=new NE}sF.prototype.parseInit=function(a){var b=!1;(new mh).box("moov",uh).box("trak",uh).box("mdia",uh).box("minf",uh).box("stbl",uh).S("stsd",wh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new S(2,2,2007);};sF.prototype.setSequenceMode=function(a){this.g.setSequenceMode(a)};sF.prototype.setManifestType=function(a){this.g.setManifestType(a)};
|
|
1685
|
+
sF.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new mh).box("moof",uh).box("traf",uh).S("tfhd",function(y){e=Fi(y.reader,y.flags).Xd}).S("trun",function(y){y=Ii(y.reader,y.version,y.flags);y=t(y.jh);for(var x=y.next();!x.done;x=y.next())h.push(x.value.sampleSize||e||0)}).S("subs",function(y){for(var x=y.reader,z=x.W(),C=-1,H=0;H<z;H++){var D=x.W();C+=D;D=x.Ca();for(var A=[],B=0;B<D;B++)y.version==1?A.push(x.W()):A.push(x.Ca()),x.Z(),x.Z(),x.W();g.set(C,A)}}).box("mdat",
|
|
1686
|
+
zh(function(y){f.push(y)},!1)).parse(a,!1);if(f.length==0)throw new S(2,2,2007);a=Ac.apply(uc,F(f));for(var k=0,l=0;l<h.length;l++){var m=Qb(a,k,h[l]);k+=h[l];var n=g.get(l);if(n&&n.length){for(var q=Qb(m,0,n[0]),r=[],u=n[0],v=1;v<n.length;v++){var w=Qb(m,u,n[v]);w=vc(w);r.push("data:image/png;base64,"+w);u+=n[v]}d=d.concat(this.g.parseMedia(q,b,c,r))}else d=d.concat(this.g.parseMedia(m,b,c,[]))}return d};N("shaka.text.Mp4TtmlParser",sF);sF.prototype.parseMedia=sF.prototype.parseMedia;
|
|
1687
|
+
sF.prototype.setManifestType=sF.prototype.setManifestType;sF.prototype.setSequenceMode=sF.prototype.setSequenceMode;sF.prototype.parseInit=sF.prototype.parseInit;bf('application/mp4; codecs="stpp"',function(){return new sF});bf('application/mp4; codecs="stpp.ttml"',function(){return new sF});bf('application/mp4; codecs="stpp.ttml.im1i"',function(){return new sF});bf('application/mp4; codecs="stpp.ttml.im1t"',function(){return new sF});bf('application/mp4; codecs="stpp.ttml.im2i"',function(){return new sF});
|
|
1688
|
+
bf('application/mp4; codecs="stpp.ttml.im2t"',function(){return new sF});bf('application/mp4; codecs="stpp.ttml.etd1"',function(){return new sF});bf('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new sF});bf('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new sF});bf('application/mp4; codecs="stpp.TTML.im1t"',function(){return new sF});function tF(){this.g="UNKNOWN"}tF.prototype.parseInit=function(){};tF.prototype.setSequenceMode=function(){};tF.prototype.setManifestType=function(a){this.g=a};
|
|
1689
|
+
tF.prototype.parseMedia=function(a,b){a=mc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new S(2,2,2E3);a=b.vttOffset;if(this.g=="HLS"&&c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new S(2,2,2E3);a=rd(a[1]);if(a==null)throw new S(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;e>=95443.7176888889;)e-=95443.7176888889,
|
|
1690
|
+
d+=8589934592;a=b.periodStart+d/9E4-a}b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new hd(e);var f=new ed;od(e);id(e);for(var g=od(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
|
|
1691
|
+
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");id(e);g=od(e)}b.push(f)}d=new Map;se(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((f.length!=1||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&f[0]=="STYLE"){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),g!=-1&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
|
|
1692
|
+
(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new de(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var r=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(parseInt(r,10)>=700||r=="bold")m=
|
|
1693
|
+
!0,l.fontWeight=ze;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=me;break;case "italic":m=!0;l.fontStyle=Ae;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine=r!="noWrap"}}}m&&d.set(g,l)}}l=f;m=a;if(l.length==1&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")f=null;else if(f=
|
|
1694
|
+
null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new hd(l[0]),g=pd(h),n=md(h,/[ \t]+--\x3e[ \t]+/g),k=pd(h),g==null||n==null||k==null)Wa("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;g<0&&(g=0);m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new de(g,k,m);id(h);for(g=od(h);g;)uF(l,g,b),id(h),g=od(h);re(l,d);f!=null&&(l.id=f);f=l}f&&e.push(f)}return e};
|
|
1695
|
+
function uF(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],b=="middle"?a.textAlign=fe:a.textAlign=Ce[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode=d[1]=="lr"?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b=="line-left"||b=="start"?"line-left":b=="line-right"||
|
|
1696
|
+
b=="end"?"line-right":b=="center"||b=="middle"?"center":ee);else if(d=/^region:(.*)$/.exec(b)){if(b=vF(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Ee[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ie,a.line=Number(c[1]),c[2]&&(a.lineAlign=Ee[c[2].toUpperCase()])}function vF(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
|
|
1697
|
+
N("shaka.text.VttTextParser",tF);tF.prototype.parseMedia=tF.prototype.parseMedia;tF.prototype.setManifestType=tF.prototype.setManifestType;tF.prototype.setSequenceMode=tF.prototype.setSequenceMode;tF.prototype.parseInit=tF.prototype.parseInit;bf("text/vtt",function(){return new tF});bf('text/vtt; codecs="vtt"',function(){return new tF});bf('text/vtt; codecs="wvtt"',function(){return new tF});function wF(){this.g=null}wF.prototype.parseInit=function(a){var b=this,c=!1;(new mh).box("moov",uh).box("trak",uh).box("mdia",uh).S("mdhd",function(d){d=Hi(d.reader,d.version);b.g=d.timescale}).box("minf",uh).box("stbl",uh).S("stsd",wh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new S(2,2,2008);if(!c)throw new S(2,2,2008);};wF.prototype.setSequenceMode=function(){};wF.prototype.setManifestType=function(){};
|
|
1698
|
+
wF.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new S(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new mh).box("moof",uh).box("traf",uh).S("tfdt",function(z){g=!0;c=Gi(z.reader,z.version).baseMediaDecodeTime}).S("tfhd",function(z){l=Fi(z.reader,z.flags).Wd}).S("trun",function(z){h=!0;d=Ii(z.reader,z.version,z.flags).jh}).box("mdat",zh(function(z){k=!0;e=z},!1)).parse(a,!1);if(!k&&!g&&!h)throw new S(2,2,2008);a=c;for(var m=new jh(e,0),n=t(d),q=n.next();!q.done;q=
|
|
1699
|
+
n.next()){q=q.value;var r=q.kh||l,u=q.Df?c+q.Df:a;a=u+(r||0);var v=0;do{var w=m.W();v+=w;var y=m.W(),x=null;th(y)=="vttc"?w>8&&(x=m.Tb(w-8,!1)):m.skip(w-8);r&&x&&(w=xF(x,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(rf)};function xF(a,b,c){var d,e,f;(new mh).box("payl",zh(function(g){d=mc(g)},!1)).box("iden",zh(function(g){e=mc(g)},!1)).box("sttg",zh(function(g){f=mc(g)},!1)).parse(a);return d?yF(d,e,f,b,c):null}
|
|
1700
|
+
function yF(a,b,c,d,e){a=new de(d,e,a);re(a);b&&(a.id=b);if(c)for(b=new hd(c),c=od(b);c;)uF(a,c,[]),id(b),c=od(b);return a}N("shaka.text.Mp4VttParser",wF);wF.prototype.parseMedia=wF.prototype.parseMedia;wF.prototype.setManifestType=wF.prototype.setManifestType;wF.prototype.setSequenceMode=wF.prototype.setSequenceMode;wF.prototype.parseInit=wF.prototype.parseInit;bf('application/mp4; codecs="wvtt"',function(){return new wF});function zF(){}zF.prototype.parseInit=function(){};zF.prototype.setSequenceMode=function(){};zF.prototype.setManifestType=function(){};zF.prototype.parseMedia=function(a){var b=mc(a).replace(/\r+/g,"");b=b.trim();a=[];if(b=="")return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new hd(c[0]),e=pd(d),f=md(d,/,/g);d=pd(d);if(e==null||f==null||d==null)throw new S(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new de(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1701
|
+
N("shaka.text.SbvTextParser",zF);zF.prototype.parseMedia=zF.prototype.parseMedia;zF.prototype.setManifestType=zF.prototype.setManifestType;zF.prototype.setSequenceMode=zF.prototype.setSequenceMode;zF.prototype.parseInit=zF.prototype.parseInit;bf("text/x-subviewer",function(){return new zF});function AF(){this.g=new tF}AF.prototype.parseInit=function(){};AF.prototype.setSequenceMode=function(){};AF.prototype.setManifestType=function(){};
|
|
1702
|
+
AF.prototype.parseMedia=function(a,b,c){var d=mc(a);a="WEBVTT\n\n";if(d!=""){d=d.replace(/\r+/g,"");d=d.trim();d=t(d.split("\n\n"));for(var e=d.next();!e.done;e=d.next())e=e.value.split(/\n/),e[0].match(/\d+/)&&e.shift(),e[0]=e[0].replace(/,/g,"."),a+=e.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n"}a=Qb(rc(a));return this.g.parseMedia(a,b,c,[])};N("shaka.text.SrtTextParser",AF);
|
|
1703
|
+
AF.prototype.parseMedia=AF.prototype.parseMedia;AF.prototype.setManifestType=AF.prototype.setManifestType;AF.prototype.setSequenceMode=AF.prototype.setSequenceMode;AF.prototype.parseInit=AF.prototype.parseInit;bf("text/srt",function(){return new AF});function BF(){}BF.prototype.parseInit=function(){};BF.prototype.setSequenceMode=function(){};BF.prototype.setManifestType=function(){};
|
|
1704
|
+
BF.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=mc(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=CF.exec(f))d=f[1],e=f[2];d=="V4 Styles"||d=="V4+ Styles"?(b=e,b=c?b+("\n"+e):e):d=="Events"&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=DF.exec(a)))if(a=f[1].trim(),f=f[2].trim(),a=="Format")e=f.split(EF);else if(a=="Style"){a=f.split(EF);f={};for(var g=0;g<e.length&&
|
|
1705
|
+
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Yi:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=DF.exec(f)))if(f=g[1].trim(),g=g[2].trim(),f=="Format")b=g.split(EF);else if(f=="Dialogue"){g=g.split(EF);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=FF(f.Start);var k=FF(f.End);g=new de(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Yi=f.Style;(a=d.find(function(l){return function(m){return m.Name==
|
|
1706
|
+
l.Yi}}(a)))&&GF(g,a);e.push(g)}return e};
|
|
1707
|
+
function GF(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=HF(c))a.color=c;if(c=b.BackColour)if(c=HF(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=ze);b.Italic&&(a.fontStyle=Ae);b.Underline&&a.textDecoration.push(Be);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=ke;a.textAlign="start";break;case 2:a.displayAlign=ke;a.textAlign=fe;break;case 3:a.displayAlign=ke;a.textAlign="end";break;case 5:a.displayAlign=
|
|
1708
|
+
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=fe;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=fe;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function HF(a){a=parseInt(a.replace("&H",""),16);return a>=0?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
|
|
1709
|
+
function FF(a){a=IF.exec(a);return(a[1]?parseInt(a[1].replace(":",""),10):0)*3600+parseInt(a[2],10)*60+parseFloat(a[3])}N("shaka.text.SsaTextParser",BF);BF.prototype.parseMedia=BF.prototype.parseMedia;BF.prototype.setManifestType=BF.prototype.setManifestType;BF.prototype.setSequenceMode=BF.prototype.setSequenceMode;BF.prototype.parseInit=BF.prototype.parseInit;var CF=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,DF=/^\s*([^:]+):\s*(.*)/,EF=/\s*,\s*/,IF=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
|
|
1710
|
+
bf("text/x-ssa",function(){return new BF});function JF(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,a>0)?{ce:c,ra:a}:null}function KF(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
|
|
1711
|
+
function LF(a,b){if(b+1<a.length&&a[b]===255&&(a[b+1]&246)===240){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&a[b]===255&&(a[b+1]&246)===240}return!1}
|
|
1712
|
+
function MF(a,b){switch(a){case "mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(b===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1713
|
+
2,0,178,0,32,8,224]);break;default:if(b===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===2||b===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function NF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=NF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/aac"?Ci(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(Ze(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.j};
|
|
1714
|
+
p.transmux=function(a,b,c,d){for(var e=Qb(a),f=ak(e),g=f.length;g<e.length&&!LF(e,g);g++);a=c.endTime*1E3;f=Zj(f);f.length&&c&&(f=f.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(a=f.data);f=KF(e,g);if(!f)return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=JF(e,g);if(!k)return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));var l=k.ce+k.ra;g+l<=e.length&&
|
|
1715
|
+
h.push({data:e.subarray(g+k.ce,g+l),size:k.ra,duration:1024,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,timescale:e,duration:d,Db:[],Ha:new Uint8Array([]),Sa:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,zb:h},stream:b};d=new Oi([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Pi(d),this.g.set(c,b));c=this.i!==b;d=lj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};
|
|
1716
|
+
N("shaka.transmuxer.AacTransmuxer",NF);NF.prototype.transmux=NF.prototype.transmux;NF.prototype.getOriginalMimeType=NF.prototype.getOriginalMimeType;NF.prototype.convertCodecs=NF.prototype.convertCodecs;NF.prototype.isSupported=NF.prototype.isSupported;NF.prototype.destroy=NF.prototype.destroy;He("audio/aac",function(){return new NF("audio/aac")},Ne);function OF(a,b){if(b+8>a.length||a[b]!==11||a[b+1]!==119)return null;var c=a[b+4]>>6;if(c>=3)return null;var d=a[b+4]&63,e=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1717
|
+
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][d*3+c]*2;if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;f===2?g+=2:(f&1&&f!==1&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,Ha:a,ra:e}}
|
|
1718
|
+
function PF(a,b){if(a[b]===11&&a[b+1]===119){var c=0,d=5;b+=d;for(var e,f;d>0;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(c<16)return!0}return!1};function QF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=QF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ac3"?Ci(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ac3"?nb().re()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j};
|
|
1719
|
+
p.transmux=function(a,b,c,d){a=Qb(a);for(var e=ak(a),f=e.length;f<a.length&&!PF(a,f);f++);var g=c.endTime*1E3;e=Zj(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=OF(a,f);if(!l)return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ha;k.push({data:a.subarray(f,f+l.ra),size:l.ra,duration:1536,
|
|
1720
|
+
sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}});f+=l.ra}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",timescale:e,duration:d,Db:[],Ha:h,Sa:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,zb:k},stream:b};d=new Oi([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Pi(d),this.g.set(c,b));c=this.i!==b;d=lj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};N("shaka.transmuxer.Ac3Transmuxer",QF);QF.prototype.transmux=QF.prototype.transmux;
|
|
1721
|
+
QF.prototype.getOriginalMimeType=QF.prototype.getOriginalMimeType;QF.prototype.convertCodecs=QF.prototype.convertCodecs;QF.prototype.isSupported=QF.prototype.isSupported;QF.prototype.destroy=QF.prototype.destroy;He("audio/ac3",function(){return new QF("audio/ac3")},Ne);function RF(a,b){if(b+8>a.length||(a[b]<<8|a[b+1]<<0)!==2935)return null;var c=new dk(a.subarray(b+2));fk(c,2);fk(c,3);var d=gk(c,11)+1<<1,e=gk(c,2);if(e==3){e=gk(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=gk(c,2);var g=gk(c,3),h=gk(c,1);c=gk(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/([1,2,3,6][f]*16));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,Ha:a,ra:d}};function SF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=SF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/ec3"?Ci(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j};
|
|
1722
|
+
p.transmux=function(a,b,c,d){a=Qb(a);for(var e=ak(a),f=e.length;f<a.length&&(a[f]<<8|a[f+1]<<0)!==2935;f++);var g=c.endTime*1E3;e=Zj(e);e.length&&c&&(e=e.find(function(m){return m.description==="com.apple.streaming.transportStreamTimestamp"}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=RF(a,f);if(!l)return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ha;k.push({data:a.subarray(f,f+l.ra),
|
|
1723
|
+
size:l.ra,duration:1536,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}});f+=l.ra}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",timescale:e,duration:d,Db:[],Ha:h,Sa:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,zb:k},stream:b};d=new Oi([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Pi(d),this.g.set(c,b));c=this.i!==b;d=lj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};N("shaka.transmuxer.Ec3Transmuxer",SF);
|
|
1724
|
+
SF.prototype.transmux=SF.prototype.transmux;SF.prototype.getOriginalMimeType=SF.prototype.getOriginalMimeType;SF.prototype.convertCodecs=SF.prototype.convertCodecs;SF.prototype.isSupported=SF.prototype.isSupported;SF.prototype.destroy=SF.prototype.destroy;He("audio/ec3",function(){return new SF("audio/ec3")},Ne);function TF(a){if(!a.length)return null;var b=a.find(function(v){return v.type==7});a=a.find(function(v){return v.type==8});if(!b||!a)return null;var c=new dk(b.data),d=kk(c);kk(c);kk(c);ik(c);if(UF.includes(d)&&(d=U(c),d===3&&fk(c,1),ik(c),ik(c),fk(c,1),V(c))){d=d!==3?8:12;for(var e=0;e<d;e++)V(c)&&(e<6?lk(c,16):lk(c,64))}ik(c);d=U(c);if(d===0)U(c);else if(d===1)for(fk(c,1),ik(c),ik(c),d=U(c),e=0;e<d;e++)ik(c);ik(c);fk(c,1);var f=U(c),g=U(c),h=gk(c,1);h===0&&fk(c,1);fk(c,1);var k=0,l=0,m=0,n=0;V(c)&&
|
|
1725
|
+
(k=U(c),l=U(c),m=U(c),n=U(c));e=d=1;if(V(c)&&V(c)){var q=kk(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];q>0&&q<=16?(d=r[q-1],e=u[q-1]):q===255&&(d=gk(c,16),e=gk(c,16))}c=(2-h)*(g+1)*16-m*2-n*2;f=(f+1)*16-k*2-l*2;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,F(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,F(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
|
|
1726
|
+
225].concat(k,[1],b));return{height:c,width:f,Sa:a,Za:d,$a:e}}
|
|
1727
|
+
function VF(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],v=t(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var y=w.fullData.byteLength,x=new Uint8Array(4);x[0]=y>>24&255;x[1]=y>>16&255;x[2]=y>>8&255;x[3]=y&255;u.push(x);u.push(w.fullData)}e.data=Ac.apply(uc,F(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=t(h.nalus);for(var m=
|
|
1728
|
+
k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var q=!1;n=!0;var r=m.data;l&&r.length>4&&(r=mk(new dk(r)),r===2||r===4||r===7||r===9)&&(q=!0);q&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=q;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
|
|
1729
|
+
return d}var UF=[100,110,122,244,44,83,86,118,128,138,139,134];function WF(a){if(!a.length)return null;var b=a.find(function(g){return g.type==32}),c=a.find(function(g){return g.type==33}),d=a.find(function(g){return g.type==34});if(!b||!c||!d)return null;var e=XF(b.fullData);a=YF(c.fullData);var f=ZF(d.fullData);b=$F(b.fullData,c.fullData,d.fullData,{Ug:e.Ug,Bh:e.Bh,Eg:a.Eg,Fg:a.Fg,yg:a.yg,Dg:a.Dg,zg:a.zg,Ag:a.Ag,Bg:a.Bg,Cg:a.Cg,rg:a.rg,sg:a.sg,ug:a.ug,vg:a.vg,wg:a.wg,xg:a.xg,rf:a.rf,gg:a.gg,fg:a.fg,eg:a.eg,Wg:f.Wg,qg:a.qg,pg:a.pg});return{height:a.height,width:a.width,
|
|
1730
|
+
Sa:b,Za:a.Sk,$a:a.Rk}}function XF(a){var b=new dk(a,!0);kk(b);kk(b);gk(b,4);gk(b,2);gk(b,6);a=gk(b,3);b=V(b);return{Ug:a+1,Bh:b}}
|
|
1731
|
+
function YF(a){a=new dk(a,!0);kk(a);kk(a);var b=0,c=0,d=0,e=0;gk(a,4);var f=gk(a,3);V(a);for(var g=gk(a,2),h=gk(a,1),k=gk(a,5),l=kk(a),m=kk(a),n=kk(a),q=kk(a),r=kk(a),u=kk(a),v=kk(a),w=kk(a),y=kk(a),x=kk(a),z=kk(a),C=[],H=[],D=0;D<f;D++)C.push(V(a)),H.push(V(a));if(f>0)for(D=f;D<8;D++)gk(a,2);for(D=0;D<f;D++)C[D]&&gk(a,88),H[D]&&kk(a);U(a);C=U(a);C==3&&gk(a,1);H=U(a);D=U(a);V(a)&&(b+=U(a),c+=U(a),d+=U(a),e+=U(a));var A=U(a),B=U(a),I=U(a);if(V(a))for(var E=0;E<=f;E++)U(a),U(a),U(a);else U(a),U(a),
|
|
1732
|
+
U(a);U(a);U(a);U(a);U(a);U(a);U(a);if(V(a)&&V(a))for(E=0;E<4;E++)for(var K=0;K<(E===3?2:6);K++)if(V(a)){var J=Math.min(64,1<<4+(E<<1));E>1&&jk(a);for(var O=0;O<J;O++)jk(a)}else U(a);V(a);V(a);V(a)&&(kk(a),U(a),U(a),V(a));E=U(a);for(J=K=0;J<E;J++)if(O=!1,J!==0&&(O=V(a)),O){J===E&&U(a);V(a);U(a);for(var P=O=0;P<=K;P++){var M=V(a),L=!1;M||(L=V(a));(M||L)&&O++}K=O}else{P=U(a);O=U(a);K=P+O;for(M=0;M<P;M++)U(a),V(a);for(P=0;P<O;P++)U(a),V(a)}if(V(a))for(E=U(a),K=0;K<E;K++){for(J=0;J<I+4;J++)gk(a,1);gk(a,
|
|
1733
|
+
1)}E=I=1;K=!0;J=1;P=O=0;V(a);V(a);if(V(a)){if(V(a)){M=kk(a);L=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var Q=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];M>0&&M<=16?(I=L[M-1],E=Q[M-1]):M===255&&(I=gk(a,16),E=gk(a,16))}V(a)&&V(a);V(a)&&(gk(a,3),V(a),V(a)&&(kk(a),kk(a),kk(a)));V(a)&&(U(a),U(a));V(a);V(a);V(a);if(M=V(a))ik(a),ik(a),ik(a),ik(a);if(V(a)&&(J=gk(a,32),O=gk(a,32),V(a)&&U(a),V(a))){Q=!1;M=V(a);L=V(a);if(M||L){if(Q=V(a))kk(a),gk(a,5),V(a),gk(a,5);gk(a,4);gk(a,4);Q&&gk(a,4);gk(a,5);gk(a,
|
|
1734
|
+
5);gk(a,5)}for(var R=0;R<=f;R++){K=V(a);var ia=!0,W=1;K||(ia=V(a));var xa=!1;ia?U(a):xa=V(a);xa||(W=U(a)+1);if(M){for(ia=0;ia<W;ia++)U(a),U(a),Q&&(U(a),U(a));V(a)}if(L){for(ia=0;ia<W;ia++)U(a),U(a),Q&&(U(a),U(a));V(a)}}}V(a)&&(V(a),V(a),V(a),P=U(a),U(a),U(a),U(a),U(a))}return{yg:z,Eg:g,Fg:h,Dg:k,zg:l,Ag:m,Bg:n,Cg:q,rg:r,sg:u,ug:v,vg:w,wg:y,xg:x,rf:P,gg:C,fg:A,eg:B,width:H-(b+c)*(C===1||C===2?2:1),height:D-(d+e)*(C===1?2:1),Sk:I,Rk:E,qg:O/J,pg:K}}
|
|
1735
|
+
function ZF(a){var b=new dk(a,!0);kk(b);kk(b);U(b);U(b);V(b);V(b);gk(b,3);V(b);V(b);U(b);U(b);jk(b);V(b);V(b);V(b)&&U(b);jk(b);jk(b);V(b);V(b);V(b);V(b);a=V(b);b=V(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Wg:c}}
|
|
1736
|
+
function $F(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Eg&3)<<6|(d.Fg?1:0)<<5|d.Dg&31;e[2]=d.zg;e[3]=d.Ag;e[4]=d.Bg;e[5]=d.Cg;e[6]=d.rg;e[7]=d.sg;e[8]=d.ug;e[9]=d.vg;e[10]=d.wg;e[11]=d.xg;e[12]=d.yg;e[13]=240|(d.rf&3840)>>8;e[14]=d.rf&255;e[15]=252|d.Wg&3;e[16]=252|d.gg&3;e[17]=248|d.fg&7;e[18]=248|d.eg&7;e[19]=0;e[20]=parseInt(d.qg,10);e[21]=((d.pg?1:0)&3)<<6|(d.Ug&7)<<3|(d.Bh?1:0)<<2|3;e[22]=3;a=[a,b,c];b=23;c=a.length-1;for(d=0;d<a.length;d+=
|
|
1737
|
+
1)e.set(new Uint8Array([32+d|(d===c?128:0),0,1]),b),b+=3,e.set(new Uint8Array([a[d].byteLength>>8,a[d].byteLength&255]),b),b+=2,e.set(a[d],b),b+=a[d].byteLength;return e};function aG(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(c!==1&&e!==0&&e!==15&&f!==3){var g=a[b+3]>>6;e=bG[(c===3?3-d:d===3?3:4)*14+e-1]*1E3;f=cG[(c===3?0:c===2?1:2)*3+f];c=dG[c][d];var h=eG[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&l<=87&&d===2&&e>=224E3&&g===0&&(a[b+3]|=128);return{sampleRate:f,channelCount:g===3?1:2,ra:k,Qk:c*8*h}}return null}
|
|
1738
|
+
function fG(a,b){return a[b]===255&&(a[b+1]&224)===224&&(a[b+1]&6)!==0}function gG(a,b){if(b+1<a.length&&fG(a,b)){var c=aG(a,b),d=4;c&&c.ra&&(d=c.ra);b+=d;return b===a.length||b+1<a.length&&fG(a,b)}return!1}
|
|
1739
|
+
var bG=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],cG=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],dG=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],eG=[0,1,1,4];function hG(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=hG.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return a.toLowerCase().split(";")[0]=="audio/mpeg"?Ci(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.j};
|
|
1740
|
+
p.transmux=function(a,b,c,d){for(var e=Qb(a),f=ak(e).length;f<e.length&&!gG(e,f);f++);var g;for(a=[];f<e.length;){var h=aG(e,f);if(!h)return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));g||(g=h);f+h.ra<=e.length&&a.push({data:e.subarray(f,f+h.ra),size:h.ra,duration:1152,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}});f+=h.ra}if(!g)return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));e=g.Qk*9E4/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",timescale:g.sampleRate,duration:d,Db:[],Ha:new Uint8Array([]),
|
|
1741
|
+
Sa:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,zb:a},stream:b};d=new Oi([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Pi(d),this.g.set(c,b));c=this.i!==b;d=lj(d);this.i=b;this.h++;return Promise.resolve({data:d,init:c?b:null})};N("shaka.transmuxer.Mp3Transmuxer",hG);hG.prototype.transmux=hG.prototype.transmux;hG.prototype.getOriginalMimeType=hG.prototype.getOriginalMimeType;hG.prototype.convertCodecs=hG.prototype.convertCodecs;hG.prototype.isSupported=hG.prototype.isSupported;
|
|
1742
|
+
hG.prototype.destroy=hG.prototype.destroy;He("audio/mpeg",function(){return new hG("audio/mpeg")},Ne);function iG(a){this.h=a;this.g=null}p=iG.prototype;p.destroy=function(){};p.isSupported=function(a){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var b=Ze(a).split(","),c=Fc("audio",b);b=Fc("video",b);return!c||b||Ve(c)!="mp3"?!1:Ci(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
|
|
1743
|
+
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new nk;this.g.Hf(c.i);a=Qb(a);a=this.g.parse(a);if(a.Yd().audio!="mp3"||e!="audio")return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));c=new Uint8Array([]);e=t(a.ub());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=aG(a,b))?(b+d.ra<=a.length&&(c=Ac(c,a.subarray(b,b+d.ra))),b+=d.ra):b++;return Promise.resolve(c)};N("shaka.transmuxer.MpegTsTransmuxer",iG);iG.prototype.transmux=iG.prototype.transmux;
|
|
1744
|
+
iG.prototype.getOriginalMimeType=iG.prototype.getOriginalMimeType;iG.prototype.convertCodecs=iG.prototype.convertCodecs;iG.prototype.isSupported=iG.prototype.isSupported;iG.prototype.destroy=iG.prototype.destroy;He("video/mp2t",function(){return new iG("video/mp2t")},Me);/*
|
|
1745
|
+
@license
|
|
1746
|
+
MSS Transmuxer
|
|
1747
|
+
Copyright 2015 Dash Industry Forum
|
|
1748
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
1749
|
+
*/
|
|
1750
|
+
function jG(a){this.h=a;(this.g=oy.get("ISOBoxer")())&&kG(this)}
|
|
1751
|
+
function kG(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1752
|
+
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1753
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;d<16;d++)this.usertype[d]!==lG[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=jG.prototype;p.destroy=function(){};
|
|
1754
|
+
p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Ci(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Ci(b)||Ci(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h};
|
|
1755
|
+
p.transmux=function(a,b,c){if(!c)return Promise.resolve(Qb(a));if(!b.mssPrivateData)return Promise.reject(new S(2,3,3020,c?c.P()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");g===null&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1756
|
+
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(n!==null){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(q===null){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
|
|
1757
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");v!==null&&(v.offset[0]=mG(u,"traf")+mG(h,"senc")+16);var w=Qb(e.write());return Promise.resolve(w)}catch(y){return y instanceof S?Promise.reject(y):Promise.reject(new S(2,3,3022,c?c.P()[0]:null))}};function mG(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}N("shaka.transmuxer.MssTransmuxer",jG);jG.prototype.transmux=jG.prototype.transmux;
|
|
1758
|
+
jG.prototype.getOriginalMimeType=jG.prototype.getOriginalMimeType;jG.prototype.convertCodecs=jG.prototype.convertCodecs;jG.prototype.isSupported=jG.prototype.isSupported;jG.prototype.destroy=jG.prototype.destroy;var lG=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);He("mss/audio/mp4",function(){return new jG("mss/audio/mp4")},Ne);He("mss/video/mp4",function(){return new jG("mss/video/mp4")},Ne);function nG(a){this.m=a;this.g=0;this.j=new Map;this.l=this.i=this.h=null}p=nG.prototype;p.destroy=function(){this.j.clear();this.i&&this.i.destroy()};
|
|
1759
|
+
p.isSupported=function(a,b){if(a.toLowerCase().split(";")[0]!="video/mp2t")return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Ze(c).split(",");c=Fc("audio",d);d=Fc("video",d);if(c&&(c=Ve(c),!oG.includes(c))||d&&(c=Ve(d),!pG.includes(c)))return!1;if(b)return Ci(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Ci(b)||Ci(a)};
|
|
1760
|
+
p.convertCodecs=function(a,b){return b.toLowerCase().split(";")[0]=="video/mp2t"?(b=Ze(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return bg(c,"audio/mp4")}).map(cg).join(","),a=="audio"?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.getOriginalMimeType=function(){return this.m};
|
|
1761
|
+
p.transmux=function(a,b,c,d,e){var f=Qb(a);if(e=="audio"&&!vk(f)){for(var g=ak(f),h=g.length;h<f.length;h++)if(gG(f,h))return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));for(h=g.length;h<f.length;h++)if(LF(f,h))return this.i||(this.i=new NF("audio/aac")),this.i.transmux(a,b,c,d,e);return Promise.reject(new S(2,3,3018,c?c.P()[0]:null))}this.h?this.h.clearData():this.h=new nk;this.h.Hf(c.i);var k=this.h.parse(f),l=[],m=k.Yd();try{var n=null;if(e=="video"){switch(m.video){case "avc":var q=[],r=null,
|
|
1762
|
+
u=k.td(),v=VF(u);if(!v.length)throw new S(2,3,3023,c?c.P()[0]:null);for(var w=0;w<v.length;w++){var y=v[w];r==null&&(r=y.dts);var x=void 0;x=w+1<v.length?(v[w+1].dts||0)-(y.dts||0):v.length>1?(y.dts||0)-(v[w-1].dts||0):(c.endTime-c.startTime)*9E4;q.push({data:y.data,size:y.data.byteLength,duration:x,sb:Math.round((y.pts||0)-(y.dts||0)),flags:{xb:0,mb:0,jb:0,hb:0,ib:y.isKeyframe?2:1,yb:y.isKeyframe?0:1}})}for(var z=[],C=t(u),H=C.next();!H.done;H=C.next())z.push.apply(z,F(H.value.nalus));var D=TF(z);
|
|
1763
|
+
if(!D||r==null)throw new S(2,3,3018,c?c.P()[0]:null);b.height=b.height||D.height;b.width=b.width||D.width;n={id:b.id,type:"video",codecs:"avc1",timescale:9E4,duration:d,Db:[],Ha:new Uint8Array([]),Sa:D.Sa,Za:D.Za,$a:D.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:r,zb:q},stream:b};break;case "hvc":var A=[],B=null,I=[],E=k.td();if(!E.length)throw new S(2,3,3023,c?c.P()[0]:null);for(var K=0;K<E.length;K++){var J=E[K],O=J.nalus;I.push.apply(I,F(O));for(var P=!1,M=[],L=!1,Q=t(O),R=Q.next();!R.done;R=
|
|
1764
|
+
Q.next()){var ia=R.value;switch(ia.type){case 1:case 0:var W=L=!0;break;case 19:case 20:case 21:P=W=L=!0;break;case 32:W=!0;break;case 33:W=!0;break;case 34:W=!0;break;case 35:L=W=!0;break;case 39:case 40:W=!0;break;default:W=!1}if(L&&W){var xa=ia.fullData.byteLength,ta=new Uint8Array(4);ta[0]=xa>>24&255;ta[1]=xa>>16&255;ta[2]=xa>>8&255;ta[3]=xa&255;M.push(ta);M.push(ia.fullData)}}var ra=M.length?{data:Ac.apply(uc,F(M)),isKeyframe:P}:null;if(ra){B==null&&J.dts!=null&&(B=J.dts);var ya=void 0;ya=K+
|
|
1765
|
+
1<E.length?(E[K+1].dts||0)-(J.dts||0):E.length>1?(J.dts||0)-(E[K-1].dts||0):(c.endTime-c.startTime)*9E4;A.push({data:ra.data,size:ra.data.byteLength,duration:ya,sb:Math.round((J.pts||0)-(J.dts||0)),flags:{xb:0,mb:0,jb:0,hb:0,ib:ra.isKeyframe?2:1,yb:ra.isKeyframe?0:1}})}}var sa=WF(I);if(!sa||B==null)throw new S(2,3,3018,c?c.P()[0]:null);b.height=b.height||sa.height;b.width=b.width||sa.width;n={id:b.id,type:"video",codecs:"hvc1",timescale:9E4,duration:d,Db:[],Ha:new Uint8Array([]),Sa:sa.Sa,Za:sa.Za,
|
|
1766
|
+
$a:sa.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:B,zb:A},stream:b}}n&&(l.push(n),n=null)}if(e=="audio"){switch(m.audio){case "aac":for(var Ea=[],ma,Aa=null,qa=null,ua=null,lb=t(k.ub()),pb=lb.next();!pb.done;pb=lb.next()){var nc=pb.value,$b=nc.data;if($b){var lc=0;if(qa==-1&&ua)$b=Ac(ua,nc.data),qa=null;else if(qa!=null&&ua){lc=Math.max(0,qa);var Of=Ac(ua,$b.subarray(0,lc));Ea.push({data:Of,size:Of.byteLength,duration:1024,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}});qa=ua=null}ma=KF($b,lc);
|
|
1767
|
+
if(!ma)throw new S(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=ma.sampleRate;b.channelsCount=ma.channelCount;Aa==null&&nc.pts!==null&&(Aa=nc.pts);for(;lc<$b.length;){var jd=JF($b,lc);if(!jd){ua=$b.subarray(lc,$b.length);qa=-1;break}var kd=jd.ce+jd.ra;qa=Math.max(0,lc+kd-$b.length);qa!=0?ua=$b.subarray(lc+jd.ce,lc+kd):lc+kd<=$b.length&&Ea.push({data:$b.subarray(lc+jd.ce,lc+kd),size:jd.ra,duration:1024,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}});lc+=kd}}}if(!ma||Aa==null){Aa=c.startTime*9E4;var Pf=
|
|
1768
|
+
Fc("audio",b.codecs.split(","));if(!Pf||!b.channelsCount||!b.audioSamplingRate)throw new S(2,3,3018,c?c.P()[0]:null);ma={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Pf};var ld=MF(Pf,b.channelsCount);if(!ld)throw new S(2,3,3018,c?c.P()[0]:null);for(var Oj=Aa+(c.endTime-c.startTime)*9E4,qh=Aa;qh<Oj;)Ea.push({data:ld,size:ld.byteLength,duration:1024,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}}),qh+=1024/ma.sampleRate*9E4}var rh=ma.sampleRate,$c=Aa/9E4*rh;n={id:b.id,type:"audio",
|
|
1769
|
+
codecs:ma.codec,timescale:rh,duration:d,Db:[],Ha:new Uint8Array([]),Sa:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:$c,zb:Ea},stream:b};break;case "ac3":for(var Pj=[],Qf=0,sh=new Uint8Array([]),Rf=null,Qj=t(k.ub()),qb=Qj.next();!qb.done;qb=Qj.next()){var ac=qb.value,Rb=ac.data;Rf==null&&ac.pts!==null&&(Rf=ac.pts);for(var Xf=0;Xf<Rb.length;){var ne=OF(Rb,Xf);ne?(b.audioSamplingRate=ne.sampleRate,b.channelsCount=ne.channelCount,Qf=ne.sampleRate,sh=ne.Ha,Pj.push({data:Rb.subarray(Xf,
|
|
1770
|
+
Xf+ne.ra),size:ne.ra,duration:1536,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}}),Xf+=ne.ra):Xf++}}if(Qf==0||sh.byteLength==0||Rf==null)throw new S(2,3,3018,c?c.P()[0]:null);var rG=Rf/9E4*Qf;n={id:b.id,type:"audio",codecs:"ac-3",timescale:Qf,duration:d,Db:[],Ha:sh,Sa:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:rG,zb:Pj},stream:b};break;case "ec3":for(var Rw=[],zk=0,Ao=new Uint8Array([]),Ak=null,Sw=t(k.ub()),Bo=Sw.next();!Bo.done;Bo=Sw.next()){var Co=Bo.value,Do=Co.data;
|
|
1771
|
+
Ak==null&&Co.pts!==null&&(Ak=Co.pts);for(var Yf=0;Yf<Do.length;){var oe=RF(Do,Yf);oe?(b.audioSamplingRate=oe.sampleRate,b.channelsCount=oe.channelCount,zk=oe.sampleRate,Ao=oe.Ha,Rw.push({data:Do.subarray(Yf,Yf+oe.ra),size:oe.ra,duration:1536,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}}),Yf+=oe.ra):Yf++}}if(zk==0||Ao.byteLength==0||Ak==null)throw new S(2,3,3018,c?c.P()[0]:null);var sG=Ak/9E4*zk;n={id:b.id,type:"audio",codecs:"ec-3",timescale:zk,duration:d,Db:[],Ha:Ao,Sa:new Uint8Array([]),Za:0,$a:0,
|
|
1772
|
+
data:{sequenceNumber:this.g,baseMediaDecodeTime:sG,zb:Rw},stream:b};break;case "mp3":for(var Tw=[],Bk,Ck=null,Uw=t(k.ub()),Eo=Uw.next();!Eo.done;Eo=Uw.next()){var Fo=Eo.value,Eh=Fo.data;if(Eh){Ck==null&&Fo.pts!==null&&(Ck=Fo.pts);for(var Pe=0;Pe<Eh.length;){var Zf=aG(Eh,Pe);Zf?(Bk||(Bk=Zf),Pe+Zf.ra<=Eh.length&&Tw.push({data:Eh.subarray(Pe,Pe+Zf.ra),size:Zf.ra,duration:1152,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}}),Pe+=Zf.ra):Pe++}}}if(!Bk||Ck==null)throw new S(2,3,3018,c?c.P()[0]:null);var Vw=
|
|
1773
|
+
Bk.sampleRate,tG=Ck/9E4*Vw;n={id:b.id,type:"audio",codecs:"mp3",timescale:Vw,duration:d,Db:[],Ha:new Uint8Array([]),Sa:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:tG,zb:Tw},stream:b};break;case "opus":var Ww=[],Dk=null,nd=k.H;if(!nd)throw new S(2,3,3018,c?c.P()[0]:null);var Tb=[];switch(nd.rj){case 1:case 2:Tb=[0];break;case 0:Tb=[255,1,1,0,1];break;case 128:Tb=[255,2,0,0,1];break;case 3:Tb=[1,2,1,0,2,1];break;case 4:Tb=[1,2,2,0,1,2,3];break;case 5:Tb=[1,3,2,0,4,1,
|
|
1774
|
+
2,3];break;case 6:Tb=[1,4,2,0,4,1,2,3,5];break;case 7:Tb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Tb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Tb=[1,1,2,0,1];break;case 131:Tb=[1,1,3,0,1,2];break;case 132:Tb=[1,1,4,0,1,2,3];break;case 133:Tb=[1,1,5,0,1,2,3,4];break;case 134:Tb=[1,1,6,0,1,2,3,4,5];break;case 135:Tb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Tb=[1,1,8,0,1,2,3,4,5,6,7]}var Xw=new Uint8Array([0,nd.channelCount,0,0,nd.sampleRate>>>24&255,nd.sampleRate>>>17&255,nd.sampleRate>>>8&255,nd.sampleRate>>>0&
|
|
1775
|
+
255,0,0].concat(F(Tb)));for(var Yw=nd.sampleRate,Zw=t(k.ub()),Go=Zw.next();!Go.done;Go=Zw.next()){var Ho=Go.value,$f=Ho.data;Dk==null&&Ho.pts!==null&&(Dk=Ho.pts);for(var Fh=0;Fh<$f.length;){for(var uG=($f[Fh+1]&16)!==0,vG=($f[Fh+1]&8)!==0,Ld=Fh+2,Ek=0;$f[Ld]===255;)Ek+=255,Ld+=1;Ek+=$f[Ld];Ld+=1;Ld+=uG?2:0;Ld+=vG?2:0;var $w=$f.slice(Ld,Ld+Ek);Ww.push({data:$w,size:$w.byteLength,duration:960,sb:0,flags:{xb:0,mb:0,jb:0,hb:0,ib:2,yb:0}});Fh=Ld+Ek}}if(Xw.byteLength==0||Dk==null)throw new S(2,3,3018,c?
|
|
1776
|
+
c.P()[0]:null);b.audioSamplingRate=nd.sampleRate;b.channelsCount=nd.channelCount;var wG=Dk/9E4*Yw;n={id:b.id,type:"audio",codecs:"opus",timescale:Yw,duration:d,Db:[],Ha:Xw,Sa:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:wG,zb:Ww},stream:b}}n&&(l.push(n),n=null)}}catch(Io){return Io&&Io.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(Io)}if(!l.length)return Promise.reject(new S(2,3,3018,c?c.P()[0]:null));var ax=new Oi(l),Jo=b.id+"_"+c.i;if(this.j.has(Jo))var Gh=
|
|
1777
|
+
this.j.get(Jo);else Gh=Pi(ax),this.j.set(Jo,Gh);var xG=this.l!==Gh,yG=lj(ax);this.l=Gh;this.g++;return Promise.resolve({data:yG,init:xG?Gh:null})};N("shaka.transmuxer.TsTransmuxer",nG);nG.prototype.transmux=nG.prototype.transmux;nG.prototype.getOriginalMimeType=nG.prototype.getOriginalMimeType;nG.prototype.convertCodecs=nG.prototype.convertCodecs;nG.prototype.isSupported=nG.prototype.isSupported;nG.prototype.destroy=nG.prototype.destroy;var oG=["aac","ac-3","ec-3","mp3","opus"],pG=["avc","hevc"];
|
|
1778
|
+
He("video/mp2t",function(){return new nG("video/mp2t")},Le);function qG(){}na(qG,Fn);N("shaka.util.FairPlayUtils",qG);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1779
|
+
|
|
1780
|
+
//# sourceMappingURL=shaka-player.compiled.map
|