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.
Files changed (339) hide show
  1. package/LICENSE +397 -0
  2. package/README.md +435 -0
  3. package/dist/lib/237.js +34 -0
  4. package/dist/lib/274.js +103 -0
  5. package/dist/lib/2a7d8bfaf2d43f53bd71.mjs +21 -0
  6. package/dist/lib/3683cfffdcbd73685ff2.svg +8 -0
  7. package/dist/lib/42e4e1954f25f8c7b965.svg +6 -0
  8. package/dist/lib/492.js +34 -0
  9. package/dist/lib/59fe962b3e6bd8bfdda7.svg +3 -0
  10. package/dist/lib/5ea0869845becef03a06.svg +4 -0
  11. package/dist/lib/671.js +34 -0
  12. package/dist/lib/76692c54994797ddfb04.svg +3 -0
  13. package/dist/lib/815.js +34 -0
  14. package/dist/lib/8475f8e672ed83e24520.svg +6 -0
  15. package/dist/lib/88.css +23 -0
  16. package/dist/lib/9fb032a1799ca2a1c751.svg +3 -0
  17. package/dist/lib/assets/loading_ghost.gif +0 -0
  18. package/dist/lib/bb72d81b39be40898db2.svg +3 -0
  19. package/dist/lib/cmaps/78-EUC-H.bcmap +0 -0
  20. package/dist/lib/cmaps/78-EUC-V.bcmap +0 -0
  21. package/dist/lib/cmaps/78-H.bcmap +0 -0
  22. package/dist/lib/cmaps/78-RKSJ-H.bcmap +0 -0
  23. package/dist/lib/cmaps/78-RKSJ-V.bcmap +0 -0
  24. package/dist/lib/cmaps/78-V.bcmap +0 -0
  25. package/dist/lib/cmaps/78ms-RKSJ-H.bcmap +0 -0
  26. package/dist/lib/cmaps/78ms-RKSJ-V.bcmap +0 -0
  27. package/dist/lib/cmaps/83pv-RKSJ-H.bcmap +0 -0
  28. package/dist/lib/cmaps/90ms-RKSJ-H.bcmap +0 -0
  29. package/dist/lib/cmaps/90ms-RKSJ-V.bcmap +0 -0
  30. package/dist/lib/cmaps/90msp-RKSJ-H.bcmap +0 -0
  31. package/dist/lib/cmaps/90msp-RKSJ-V.bcmap +0 -0
  32. package/dist/lib/cmaps/90pv-RKSJ-H.bcmap +0 -0
  33. package/dist/lib/cmaps/90pv-RKSJ-V.bcmap +0 -0
  34. package/dist/lib/cmaps/Add-H.bcmap +0 -0
  35. package/dist/lib/cmaps/Add-RKSJ-H.bcmap +0 -0
  36. package/dist/lib/cmaps/Add-RKSJ-V.bcmap +0 -0
  37. package/dist/lib/cmaps/Add-V.bcmap +0 -0
  38. package/dist/lib/cmaps/Adobe-CNS1-0.bcmap +0 -0
  39. package/dist/lib/cmaps/Adobe-CNS1-1.bcmap +0 -0
  40. package/dist/lib/cmaps/Adobe-CNS1-2.bcmap +0 -0
  41. package/dist/lib/cmaps/Adobe-CNS1-3.bcmap +0 -0
  42. package/dist/lib/cmaps/Adobe-CNS1-4.bcmap +0 -0
  43. package/dist/lib/cmaps/Adobe-CNS1-5.bcmap +0 -0
  44. package/dist/lib/cmaps/Adobe-CNS1-6.bcmap +0 -0
  45. package/dist/lib/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  46. package/dist/lib/cmaps/Adobe-GB1-0.bcmap +0 -0
  47. package/dist/lib/cmaps/Adobe-GB1-1.bcmap +0 -0
  48. package/dist/lib/cmaps/Adobe-GB1-2.bcmap +0 -0
  49. package/dist/lib/cmaps/Adobe-GB1-3.bcmap +0 -0
  50. package/dist/lib/cmaps/Adobe-GB1-4.bcmap +0 -0
  51. package/dist/lib/cmaps/Adobe-GB1-5.bcmap +0 -0
  52. package/dist/lib/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  53. package/dist/lib/cmaps/Adobe-Japan1-0.bcmap +0 -0
  54. package/dist/lib/cmaps/Adobe-Japan1-1.bcmap +0 -0
  55. package/dist/lib/cmaps/Adobe-Japan1-2.bcmap +0 -0
  56. package/dist/lib/cmaps/Adobe-Japan1-3.bcmap +0 -0
  57. package/dist/lib/cmaps/Adobe-Japan1-4.bcmap +0 -0
  58. package/dist/lib/cmaps/Adobe-Japan1-5.bcmap +0 -0
  59. package/dist/lib/cmaps/Adobe-Japan1-6.bcmap +0 -0
  60. package/dist/lib/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  61. package/dist/lib/cmaps/Adobe-Korea1-0.bcmap +0 -0
  62. package/dist/lib/cmaps/Adobe-Korea1-1.bcmap +0 -0
  63. package/dist/lib/cmaps/Adobe-Korea1-2.bcmap +0 -0
  64. package/dist/lib/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  65. package/dist/lib/cmaps/B5-H.bcmap +0 -0
  66. package/dist/lib/cmaps/B5-V.bcmap +0 -0
  67. package/dist/lib/cmaps/B5pc-H.bcmap +0 -0
  68. package/dist/lib/cmaps/B5pc-V.bcmap +0 -0
  69. package/dist/lib/cmaps/CNS-EUC-H.bcmap +0 -0
  70. package/dist/lib/cmaps/CNS-EUC-V.bcmap +0 -0
  71. package/dist/lib/cmaps/CNS1-H.bcmap +0 -0
  72. package/dist/lib/cmaps/CNS1-V.bcmap +0 -0
  73. package/dist/lib/cmaps/CNS2-H.bcmap +0 -0
  74. package/dist/lib/cmaps/CNS2-V.bcmap +3 -0
  75. package/dist/lib/cmaps/ETHK-B5-H.bcmap +0 -0
  76. package/dist/lib/cmaps/ETHK-B5-V.bcmap +0 -0
  77. package/dist/lib/cmaps/ETen-B5-H.bcmap +0 -0
  78. package/dist/lib/cmaps/ETen-B5-V.bcmap +0 -0
  79. package/dist/lib/cmaps/ETenms-B5-H.bcmap +3 -0
  80. package/dist/lib/cmaps/ETenms-B5-V.bcmap +0 -0
  81. package/dist/lib/cmaps/EUC-H.bcmap +0 -0
  82. package/dist/lib/cmaps/EUC-V.bcmap +0 -0
  83. package/dist/lib/cmaps/Ext-H.bcmap +0 -0
  84. package/dist/lib/cmaps/Ext-RKSJ-H.bcmap +0 -0
  85. package/dist/lib/cmaps/Ext-RKSJ-V.bcmap +0 -0
  86. package/dist/lib/cmaps/Ext-V.bcmap +0 -0
  87. package/dist/lib/cmaps/GB-EUC-H.bcmap +0 -0
  88. package/dist/lib/cmaps/GB-EUC-V.bcmap +0 -0
  89. package/dist/lib/cmaps/GB-H.bcmap +4 -0
  90. package/dist/lib/cmaps/GB-V.bcmap +0 -0
  91. package/dist/lib/cmaps/GBK-EUC-H.bcmap +0 -0
  92. package/dist/lib/cmaps/GBK-EUC-V.bcmap +0 -0
  93. package/dist/lib/cmaps/GBK2K-H.bcmap +0 -0
  94. package/dist/lib/cmaps/GBK2K-V.bcmap +0 -0
  95. package/dist/lib/cmaps/GBKp-EUC-H.bcmap +0 -0
  96. package/dist/lib/cmaps/GBKp-EUC-V.bcmap +0 -0
  97. package/dist/lib/cmaps/GBT-EUC-H.bcmap +0 -0
  98. package/dist/lib/cmaps/GBT-EUC-V.bcmap +0 -0
  99. package/dist/lib/cmaps/GBT-H.bcmap +0 -0
  100. package/dist/lib/cmaps/GBT-V.bcmap +0 -0
  101. package/dist/lib/cmaps/GBTpc-EUC-H.bcmap +0 -0
  102. package/dist/lib/cmaps/GBTpc-EUC-V.bcmap +0 -0
  103. package/dist/lib/cmaps/GBpc-EUC-H.bcmap +0 -0
  104. package/dist/lib/cmaps/GBpc-EUC-V.bcmap +0 -0
  105. package/dist/lib/cmaps/H.bcmap +0 -0
  106. package/dist/lib/cmaps/HKdla-B5-H.bcmap +0 -0
  107. package/dist/lib/cmaps/HKdla-B5-V.bcmap +0 -0
  108. package/dist/lib/cmaps/HKdlb-B5-H.bcmap +0 -0
  109. package/dist/lib/cmaps/HKdlb-B5-V.bcmap +0 -0
  110. package/dist/lib/cmaps/HKgccs-B5-H.bcmap +0 -0
  111. package/dist/lib/cmaps/HKgccs-B5-V.bcmap +0 -0
  112. package/dist/lib/cmaps/HKm314-B5-H.bcmap +0 -0
  113. package/dist/lib/cmaps/HKm314-B5-V.bcmap +0 -0
  114. package/dist/lib/cmaps/HKm471-B5-H.bcmap +0 -0
  115. package/dist/lib/cmaps/HKm471-B5-V.bcmap +0 -0
  116. package/dist/lib/cmaps/HKscs-B5-H.bcmap +0 -0
  117. package/dist/lib/cmaps/HKscs-B5-V.bcmap +0 -0
  118. package/dist/lib/cmaps/Hankaku.bcmap +0 -0
  119. package/dist/lib/cmaps/Hiragana.bcmap +0 -0
  120. package/dist/lib/cmaps/KSC-EUC-H.bcmap +0 -0
  121. package/dist/lib/cmaps/KSC-EUC-V.bcmap +0 -0
  122. package/dist/lib/cmaps/KSC-H.bcmap +0 -0
  123. package/dist/lib/cmaps/KSC-Johab-H.bcmap +0 -0
  124. package/dist/lib/cmaps/KSC-Johab-V.bcmap +0 -0
  125. package/dist/lib/cmaps/KSC-V.bcmap +0 -0
  126. package/dist/lib/cmaps/KSCms-UHC-H.bcmap +0 -0
  127. package/dist/lib/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  128. package/dist/lib/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  129. package/dist/lib/cmaps/KSCms-UHC-V.bcmap +0 -0
  130. package/dist/lib/cmaps/KSCpc-EUC-H.bcmap +0 -0
  131. package/dist/lib/cmaps/KSCpc-EUC-V.bcmap +0 -0
  132. package/dist/lib/cmaps/Katakana.bcmap +0 -0
  133. package/dist/lib/cmaps/LICENSE +36 -0
  134. package/dist/lib/cmaps/NWP-H.bcmap +0 -0
  135. package/dist/lib/cmaps/NWP-V.bcmap +0 -0
  136. package/dist/lib/cmaps/RKSJ-H.bcmap +0 -0
  137. package/dist/lib/cmaps/RKSJ-V.bcmap +0 -0
  138. package/dist/lib/cmaps/Roman.bcmap +0 -0
  139. package/dist/lib/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  140. package/dist/lib/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  141. package/dist/lib/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  142. package/dist/lib/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  143. package/dist/lib/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  144. package/dist/lib/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  145. package/dist/lib/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  146. package/dist/lib/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  147. package/dist/lib/cmaps/UniGB-UCS2-H.bcmap +0 -0
  148. package/dist/lib/cmaps/UniGB-UCS2-V.bcmap +0 -0
  149. package/dist/lib/cmaps/UniGB-UTF16-H.bcmap +0 -0
  150. package/dist/lib/cmaps/UniGB-UTF16-V.bcmap +0 -0
  151. package/dist/lib/cmaps/UniGB-UTF32-H.bcmap +0 -0
  152. package/dist/lib/cmaps/UniGB-UTF32-V.bcmap +0 -0
  153. package/dist/lib/cmaps/UniGB-UTF8-H.bcmap +0 -0
  154. package/dist/lib/cmaps/UniGB-UTF8-V.bcmap +0 -0
  155. package/dist/lib/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  156. package/dist/lib/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  157. package/dist/lib/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  158. package/dist/lib/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  159. package/dist/lib/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  160. package/dist/lib/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  161. package/dist/lib/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  162. package/dist/lib/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  163. package/dist/lib/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  164. package/dist/lib/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  165. package/dist/lib/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  166. package/dist/lib/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  167. package/dist/lib/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  168. package/dist/lib/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  169. package/dist/lib/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  170. package/dist/lib/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  171. package/dist/lib/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  172. package/dist/lib/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  173. package/dist/lib/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  174. package/dist/lib/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  175. package/dist/lib/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  176. package/dist/lib/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  177. package/dist/lib/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  178. package/dist/lib/cmaps/UniKS-UCS2-H.bcmap +0 -0
  179. package/dist/lib/cmaps/UniKS-UCS2-V.bcmap +0 -0
  180. package/dist/lib/cmaps/UniKS-UTF16-H.bcmap +0 -0
  181. package/dist/lib/cmaps/UniKS-UTF16-V.bcmap +0 -0
  182. package/dist/lib/cmaps/UniKS-UTF32-H.bcmap +0 -0
  183. package/dist/lib/cmaps/UniKS-UTF32-V.bcmap +0 -0
  184. package/dist/lib/cmaps/UniKS-UTF8-H.bcmap +0 -0
  185. package/dist/lib/cmaps/UniKS-UTF8-V.bcmap +0 -0
  186. package/dist/lib/cmaps/V.bcmap +0 -0
  187. package/dist/lib/cmaps/WP-Symbol.bcmap +0 -0
  188. package/dist/lib/exif/exif-reader.min.js +8 -0
  189. package/dist/lib/exif/exif.js +822 -0
  190. package/dist/lib/exif/exif.min.js +21 -0
  191. package/dist/lib/fde82a50e6de20239861.svg +5 -0
  192. package/dist/lib/ff2dfa442d903d9d5e30.gif +0 -0
  193. package/dist/lib/index.css +84 -0
  194. package/dist/lib/index.d.ts +147 -0
  195. package/dist/lib/index.js +41639 -0
  196. package/dist/lib/pdfjs-lib.js +46 -0
  197. package/dist/lib/pdfjs-viewer-css.js +36 -0
  198. package/dist/lib/pdfjs-viewer.js +8118 -0
  199. package/dist/lib/third-party/media/0.127.0/shaka-player.compiled.js +371 -0
  200. package/dist/lib/third-party/media/1.30.0/shaka-player.compiled.js +438 -0
  201. package/dist/lib/third-party/media/1.33.0/shaka-player.compiled.js +438 -0
  202. package/dist/lib/third-party/media/1.8.0/shaka-player.compiled.js +376 -0
  203. package/dist/lib/third-party/media/2.14.0/shaka-player.compiled.js +609 -0
  204. package/dist/lib/third-party/media/2.66.0/manifest.json +8 -0
  205. package/dist/lib/third-party/media/2.66.0/shaka-player.compiled.js +752 -0
  206. package/dist/lib/third-party/media/2.93.0/manifest.json +8 -0
  207. package/dist/lib/third-party/media/2.93.0/shaka-player.compiled.js +975 -0
  208. package/dist/lib/third-party/media/3.25.0/manifest.json +8 -0
  209. package/dist/lib/third-party/media/3.25.0/shaka-player.compiled.js +1780 -0
  210. package/dist/lib/third-party/model3d/1.10.1/WebVR/VRConfig.js +49 -0
  211. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  212. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  213. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  214. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  215. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  216. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchCommon/entities.json +322 -0
  217. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/entities.json +755 -0
  218. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  219. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/entities.json +746 -0
  220. package/dist/lib/third-party/model3d/1.10.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  221. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/entities.json +1811 -0
  222. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/geometry.bin +0 -0
  223. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/1.png +0 -0
  224. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/2.jpg +0 -0
  225. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/1024/3.jpg +0 -0
  226. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/1.png +0 -0
  227. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/2.jpg +0 -0
  228. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/3.jpg +0 -0
  229. package/dist/lib/third-party/model3d/1.10.1/WebVR/viveController/images/64/4.png +0 -0
  230. package/dist/lib/third-party/model3d/1.10.1/box3d-player.json +1 -0
  231. package/dist/lib/third-party/model3d/1.10.1/box3d-runtime.min.js +2 -0
  232. package/dist/lib/third-party/model3d/1.10.1/boxsdk.min.js +2 -0
  233. package/dist/lib/third-party/model3d/1.10.1/matcap.png +0 -0
  234. package/dist/lib/third-party/model3d/1.10.1/three.min.js +882 -0
  235. package/dist/lib/third-party/model3d/1.10.1/webvr-polyfill.js +6341 -0
  236. package/dist/lib/third-party/model3d/1.12.0/WebVR/VRConfig.js +49 -0
  237. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  238. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  239. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  240. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  241. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  242. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchCommon/entities.json +322 -0
  243. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/entities.json +755 -0
  244. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchLeft/geometry.bin +0 -0
  245. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/entities.json +746 -0
  246. package/dist/lib/third-party/model3d/1.12.0/WebVR/oculusTouchRight/geometry.bin +0 -0
  247. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/entities.json +1811 -0
  248. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/geometry.bin +0 -0
  249. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/1.png +0 -0
  250. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/2.jpg +0 -0
  251. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/1024/3.jpg +0 -0
  252. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/1.png +0 -0
  253. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/2.jpg +0 -0
  254. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/3.jpg +0 -0
  255. package/dist/lib/third-party/model3d/1.12.0/WebVR/viveController/images/64/4.png +0 -0
  256. package/dist/lib/third-party/model3d/1.12.0/box3d-player.json +1 -0
  257. package/dist/lib/third-party/model3d/1.12.0/box3d-runtime.min.js +2 -0
  258. package/dist/lib/third-party/model3d/1.12.0/boxsdk.min.js +2 -0
  259. package/dist/lib/third-party/model3d/1.12.0/matcap.png +0 -0
  260. package/dist/lib/third-party/model3d/1.12.0/three.min.js +882 -0
  261. package/dist/lib/third-party/model3d/1.12.0/webvr-polyfill.js +6341 -0
  262. package/dist/lib/third-party/model3d/1.6.1/WebVR/VRConfig.js +49 -0
  263. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  264. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  265. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  266. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  267. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  268. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchCommon/entities.json +439 -0
  269. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/entities.json +755 -0
  270. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  271. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/entities.json +746 -0
  272. package/dist/lib/third-party/model3d/1.6.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  273. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/entities.json +1869 -0
  274. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/geometry.bin +0 -0
  275. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/1.png +0 -0
  276. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/2.jpg +0 -0
  277. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/1024/3.jpg +0 -0
  278. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/1.png +0 -0
  279. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/2.jpg +0 -0
  280. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/3.jpg +0 -0
  281. package/dist/lib/third-party/model3d/1.6.1/WebVR/viveController/images/64/4.png +0 -0
  282. package/dist/lib/third-party/model3d/1.6.1/box3d-player.json +1 -0
  283. package/dist/lib/third-party/model3d/1.6.1/box3d-runtime.min.js +2 -0
  284. package/dist/lib/third-party/model3d/1.6.1/boxsdk.min.js +2 -0
  285. package/dist/lib/third-party/model3d/1.6.1/matcap.png +0 -0
  286. package/dist/lib/third-party/model3d/1.6.1/three.min.js +43300 -0
  287. package/dist/lib/third-party/model3d/1.6.1/webvr-polyfill.js +6341 -0
  288. package/dist/lib/third-party/model3d/1.9.1/WebVR/VRConfig.js +49 -0
  289. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/1024/1.jpg +0 -0
  290. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/256/3.jpg +0 -0
  291. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/512/2.jpg +0 -0
  292. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/1.jpg +0 -0
  293. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/64/2.jpg +0 -0
  294. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchCommon/entities.json +439 -0
  295. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/entities.json +755 -0
  296. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchLeft/geometry.bin +0 -0
  297. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/entities.json +746 -0
  298. package/dist/lib/third-party/model3d/1.9.1/WebVR/oculusTouchRight/geometry.bin +0 -0
  299. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/entities.json +1869 -0
  300. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/geometry.bin +0 -0
  301. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/1.png +0 -0
  302. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/2.jpg +0 -0
  303. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/1024/3.jpg +0 -0
  304. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/1.png +0 -0
  305. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/2.jpg +0 -0
  306. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/3.jpg +0 -0
  307. package/dist/lib/third-party/model3d/1.9.1/WebVR/viveController/images/64/4.png +0 -0
  308. package/dist/lib/third-party/model3d/1.9.1/box3d-player.json +1 -0
  309. package/dist/lib/third-party/model3d/1.9.1/box3d-runtime.min.js +2 -0
  310. package/dist/lib/third-party/model3d/1.9.1/boxsdk.min.js +2 -0
  311. package/dist/lib/third-party/model3d/1.9.1/matcap.png +0 -0
  312. package/dist/lib/third-party/model3d/1.9.1/three.min.js +882 -0
  313. package/dist/lib/third-party/model3d/1.9.1/webvr-polyfill.js +6341 -0
  314. package/dist/lib/third-party/swf/0.112.0/swfobject.js +6 -0
  315. package/dist/lib/third-party/text/0.112.0/github-markdown.css +681 -0
  316. package/dist/lib/third-party/text/0.112.0/github.css +123 -0
  317. package/dist/lib/third-party/text/0.112.0/highlight.min.js +3 -0
  318. package/dist/lib/third-party/text/0.112.0/papaparse.js +1457 -0
  319. package/dist/lib/third-party/text/0.112.0/papaparse.min.js +34 -0
  320. package/dist/lib/third-party/text/0.112.0/remarkable.min.js +4 -0
  321. package/dist/lib/third-party/text/0.114.0/github-markdown.css +681 -0
  322. package/dist/lib/third-party/text/0.114.0/github-markdown.min.css +1 -0
  323. package/dist/lib/third-party/text/0.114.0/github.css +123 -0
  324. package/dist/lib/third-party/text/0.114.0/github.min.css +1 -0
  325. package/dist/lib/third-party/text/0.114.0/highlight.min.js +3 -0
  326. package/dist/lib/third-party/text/0.114.0/manifest.json +10 -0
  327. package/dist/lib/third-party/text/0.114.0/papaparse.js +1457 -0
  328. package/dist/lib/third-party/text/0.114.0/papaparse.min.js +34 -0
  329. package/dist/lib/third-party/text/0.114.0/remarkable.min.js +4 -0
  330. package/dist/lib/third-party/text/2.65.0/github-markdown.css +681 -0
  331. package/dist/lib/third-party/text/2.65.0/github-markdown.min.css +1 -0
  332. package/dist/lib/third-party/text/2.65.0/github.css +99 -0
  333. package/dist/lib/third-party/text/2.65.0/github.min.css +1 -0
  334. package/dist/lib/third-party/text/2.65.0/highlight.min.js +2 -0
  335. package/dist/lib/third-party/text/2.65.0/manifest.json +10 -0
  336. package/dist/lib/third-party/text/2.65.0/papaparse.js +1897 -0
  337. package/dist/lib/third-party/text/2.65.0/papaparse.min.js +7 -0
  338. package/dist/lib/third-party/text/2.65.0/remarkable.min.js +1 -0
  339. package/package.json +198 -0
@@ -0,0 +1,752 @@
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;function ba(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
13
+ function da(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 ea=da(this);function fa(a,b){if(b)a:{for(var c=ea,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ca(c,d,{configurable:!0,writable:!0,value:f})}}
14
+ fa("Symbol",function(a){function b(e){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c("jscomp_symbol_"+(e||"")+"_"+d++,e)}function c(e,f){this.a=e;ca(this,"description",{configurable:!0,writable:!0,value:f})}if(a)return a;c.prototype.toString=function(){return this.a};var d=0;return b});
15
+ fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(ba(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
+ function q(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function ia(a){if(!(a instanceof Array)){a=q(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
+ if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={ae:!0},na={};try{na.__proto__=ma;la=na.ae;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
18
+ function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Rf=b.prototype}function qa(){this.j=!1;this.g=null;this.b=void 0;this.a=1;this.f=this.h=0;this.v=this.c=null}function ra(a){if(a.j)throw new TypeError("Generator is already running");a.j=!0}qa.prototype.m=function(a){this.b=a};
19
+ function sa(a,b){a.c={zd:b,Fd:!0};a.a=a.h||a.f}qa.prototype["return"]=function(a){this.c={"return":a};this.a=this.f};function t(a,b,c){a.a=c;return{value:b}}qa.prototype.u=function(a){this.a=a};function w(a){a.a=0}function x(a,b,c){a.h=b;void 0!=c&&(a.f=c)}function ta(a){a.h=0;a.f=2}function ua(a,b){a.a=b;a.h=0}function C(a){a.h=0;var b=a.c.zd;a.c=null;return b}function va(a){a.v=[a.c];a.h=0;a.f=0}
20
+ function wa(a,b){var c=a.v.splice(0)[0];(c=a.c=a.c||c)?c.Fd?a.a=a.h||a.f:void 0!=c.u&&a.f<c.u?(a.a=c.u,a.c=null):a.a=a.f:a.a=b}function xa(a){this.a=new qa;this.b=a}function za(a,b){ra(a.a);var c=a.a.g;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.a["return"]);a.a["return"](b);return Ca(a)}
21
+ function Ba(a,b,c,d){try{var e=b.call(a.a.g,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.a.j=!1,e;var f=e.value}catch(g){return a.a.g=null,sa(a.a,g),Ca(a)}a.a.g=null;d.call(a.a,f);return Ca(a)}
22
+ function Ca(a){for(;a.a.a;)try{var b=a.b(a.a);if(b)return a.a.j=!1,{value:b.value,done:!1}}catch(c){a.a.b=void 0,sa(a.a,c)}a.a.j=!1;if(a.a.c){b=a.a.c;a.a.c=null;if(b.Fd)throw b.zd;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
+ function Ea(a){this.next=function(b){ra(a.a);a.a.g?b=Ba(a,a.a.g.next,b,a.a.m):(a.a.m(b),b=Ca(a));return b};this["throw"]=function(b){ra(a.a);a.a.g?b=Ba(a,a.a.g["throw"],b,a.a.m):(sa(a.a,b),b=Ca(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(a,b){var c=new Ea(new xa(b));oa&&a.prototype&&oa(c,a.prototype);return c}
24
+ function Ga(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())})}function J(a){return Ga(new Ea(new xa(a)))}
25
+ fa("Promise",function(a){function b(g){this.b=0;this.c=void 0;this.a=[];this.j=!1;var h=this.f();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.b=function(g){if(null==this.a){this.a=[];var h=this;this.c(function(){h.g()})}this.a.push(g)};var e=ea.setTimeout;c.prototype.c=function(g){e(g,0)};c.prototype.g=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
26
+ g[h];g[h]=null;try{k()}catch(l){this.f(l)}}}this.a=null};c.prototype.f=function(g){this.c(function(){throw g;})};b.prototype.f=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.g)}};b.prototype.G=function(g){if(g===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.h(g)}};
27
+ b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.g(k);return}"function"==typeof h?this.M(h,g):this.h(g)};b.prototype.g=function(g){this.m(2,g)};b.prototype.h=function(g){this.m(1,g)};b.prototype.m=function(g,h){if(0!=this.b)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.b);this.b=g;this.c=h;2===this.b&&this.I();this.v()};b.prototype.I=function(){var g=this;e(function(){if(g.A()){var h=ea.console;"undefined"!==typeof h&&h.error(g.c)}},1)};b.prototype.A=
28
+ function(){if(this.j)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.c;return k(g)};b.prototype.v=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.b(this.a[g]);this.a=null}};var f=new c;
29
+ b.prototype.J=function(g){var h=this.f();g.dc(h.resolve,h.reject)};b.prototype.M=function(g,h){var k=this.f();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(r,u){return"function"==typeof r?function(v){try{l(r(v))}catch(A){m(A)}}:u}var l,m,n=new b(function(r,u){l=r;m=u});this.dc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.dc=function(g,h){function k(){switch(l.b){case 1:g(l.c);break;case 2:h(l.c);
30
+ break;default:throw Error("Unexpected state: "+l.b);}}var l=this;null==this.a?f.b(k):this.a.push(k);this.j=!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=q(g),m=l.next();!m.done;m=l.next())d(m.value).dc(h,k)})};b.all=function(g){var h=q(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(A){r[v]=A;u--;0==u&&l(r)}}var r=[],u=0;do r.push(void 0),u++,d(k.value).dc(n(r.length-1),m),k=h.next();
31
+ while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
+ fa("WeakMap",function(a){function b(k){this.a=(h+=Math.random()+1).toString();if(k){k=q(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"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ca(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({}),
33
+ m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}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(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.a]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.a]:void 0};b.prototype.has=function(k){return d(k)&&
34
+ Ja(k,g)&&Ja(k[g],this.a)};b.prototype["delete"]=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.a)?delete k[g][this.a]:!1};return b});
35
+ fa("Map",function(a){function b(){var h={};return h.Ha=h.next=h.head=h}function c(h,k){var l=h.a;return ha(function(){if(l){for(;l.head!=h.a;)l=l.Ha;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;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.b[l];if(m&&Ja(h.b,l))for(var n=0;n<m.length;n++){var r=m[n];if(k!==k&&r.key!==r.key||k===r.key)return{id:l,list:m,index:n,Y:r}}return{id:l,
36
+ list:m,index:-1,Y:void 0}}function e(h){this.b={};this.a=b();this.size=0;if(h){h=q(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(q([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.b[l.id]=[]);l.Y?l.Y.value=k:(l.Y={next:this.a,Ha:this.a.Ha,head:this.a,key:h,value:k},l.list.push(l.Y),this.a.Ha.next=l.Y,this.a.Ha=l.Y,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.Y&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.b[h.id],h.Y.Ha.next=h.Y.next,h.Y.next.Ha=h.Y.Ha,h.Y.head=
38
+ null,this.size--,!0):!1};e.prototype.clear=function(){this.b={};this.a=this.a.Ha=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).Y};e.prototype.get=function(h){return(h=d(this,h).Y)&&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=function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=
39
+ m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
+ fa("Set",function(a){function b(c){this.a=new Map;if(c){c=q(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.a.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(q([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)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||4!=f.value[0].x||
41
+ f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.a.set(c,c);this.size=this.a.size;return this};b.prototype["delete"]=function(c){c=this.a["delete"](c);this.size=this.a.size;return c};b.prototype.clear=function(){this.a.clear();this.size=0};b.prototype.has=function(c){return this.a.has(c)};b.prototype.entries=function(){return this.a.entries()};b.prototype.values=function(){return this.a.values()};b.prototype.keys=b.prototype.values;
42
+ b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.a.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(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{Z:e,Yd:f}}return{Z:-1,Yd:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Z}});
43
+ fa("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;})})}});function La(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}
44
+ fa("Array.prototype.keys",function(a){return a?a:function(){return La(this,function(b){return b})}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});
45
+ function Ma(a,b,c){if(null==a)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+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ma(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.values",function(a){return a?a:function(){return La(this,function(b,c){return c})}});
46
+ fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){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}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).Yd}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
47
+ var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ja(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Na});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});
48
+ fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ma(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});var Oa=this||self;function K(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
49
+ @license
50
+ Shaka Player
51
+ Copyright 2016 Google LLC
52
+ SPDX-License-Identifier: Apache-2.0
53
+ */
54
+ function Pa(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function Qa(a,b,c){var d=Math.pow(a.c,b);c=c*(1-d)+d*a.a;isNaN(c)||(a.a=c,a.b+=b)}function Ra(a){return a.a/(1-Math.pow(a.c,a.b))};function Ua(){this.b=new Pa(2);this.c=new Pa(5);this.a=0}Ua.prototype.getBandwidthEstimate=function(a){return 128E3>this.a?a:Math.min(Ra(this.b),Ra(this.c))};function Va(){}function Wa(){}function Xa(){}function Ya(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Za.has(a)||(Za.add(a),Xa.apply(Va,ia(c)))}function $a(){}function ab(){}function bb(){}var Za=new Set;if(window.console&&window.console.log.bind){var cb={},db=(cb[1]=console.error.bind(console),cb[2]=console.warn.bind(console),cb[3]=console.info.bind(console),cb[4]=console.log.bind(console),cb[5]=console.debug.bind(console),cb[6]=console.debug.bind(console),cb);Xa=db[2];Wa=db[1]};function eb(a,b){for(var c=[],d=q(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function fb(a,b){for(var c=q(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
55
+ var hb=function gb(a){var c;return Fa(gb,function(d){1==d.a&&(c=0);if(3!=d.a)return c<a?t(d,c,3):d.u(0);c++;return d.u(2)})},jb=function ib(a){var c,d,e,f,g,h;return Fa(ib,function(k){1==k.a&&(c=-1,e=d=void 0,f=q(a),g=f.next());if(5!=k.a){if(g.done)return-1==c?k.u(0):t(k,{Z:c,Oe:d,item:e,next:void 0},0);h=g.value;return 0<=c?t(k,{Z:c,item:e,Oe:d,next:h},5):k.u(5)}c++;d=e;e=h;g=f.next();return k.u(2)})};function kb(){}function lb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(mb(a)==mb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=L(a),d=L(b),e=q(hb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function mb(a){return a instanceof ArrayBuffer?a:a.buffer}function nb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
56
+ function L(a,b,c){c=void 0===c?Infinity:c;return ob(a,void 0===b?0:b,c,Uint8Array)}function pb(a,b,c){c=void 0===c?Infinity:c;return ob(a,void 0===b?0:b,c,DataView)}function ob(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(mb(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",kb);kb.toDataView=pb;kb.toUint8=L;kb.toArrayBuffer=nb;kb.equal=lb;function M(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};K("shaka.util.Error",M);M.Severity={RECOVERABLE:1,CRITICAL:2};M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
57
+ M.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,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,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
58
+ 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,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,
59
+ CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,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,
60
+ HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,
61
+ NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,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,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,
62
+ OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,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,
63
+ CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,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};/*
64
+ @license
65
+ Copyright 2008 The Closure Library Authors
66
+ SPDX-License-Identifier: Apache-2.0
67
+ */
68
+ var qb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
69
+ @license
70
+ Copyright 2006 The Closure Library Authors
71
+ SPDX-License-Identifier: Apache-2.0
72
+ */
73
+ function rb(a){var b;a instanceof rb?(sb(this,a.va),this.Za=a.Za,this.ua=a.ua,tb(this,a.qb),this.ka=a.ka,ub(this,a.a.clone()),this.Qa=a.Qa):a&&(b=String(a).match(qb))?(sb(this,b[1]||"",!0),this.Za=vb(b[2]||""),this.ua=vb(b[3]||"",!0),tb(this,b[4]),this.ka=vb(b[5]||"",!0),ub(this,b[6]||"",!0),this.Qa=vb(b[7]||"")):this.a=new wb(null)}p=rb.prototype;p.va="";p.Za="";p.ua="";p.qb=null;p.ka="";p.Qa="";
74
+ p.toString=function(){var a=[],b=this.va;b&&a.push(xb(b,yb,!0),":");if(b=this.ua){a.push("//");var c=this.Za;c&&a.push(xb(c,yb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.qb;null!=b&&a.push(":",String(b))}if(b=this.ka)this.ua&&"/"!=b.charAt(0)&&a.push("/"),a.push(xb(b,"/"==b.charAt(0)?zb:Ab,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Qa)&&a.push("#",xb(b,Bb));return a.join("")};
75
+ p.resolve=function(a){var b=this.clone();"data"===b.va&&(b=new rb);var c=!!a.va;c?sb(b,a.va):c=!!a.Za;c?b.Za=a.Za:c=!!a.ua;c?b.ua=a.ua:c=null!=a.qb;var d=a.ka;if(c)tb(b,a.qb);else if(c=!!a.ka){if("/"!=d.charAt(0))if(this.ua&&!this.ka)d="/"+d;else{var e=b.ka.lastIndexOf("/");-1!=e&&(d=b.ka.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
76
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ka=d:c=""!==a.a.toString();c?ub(b,a.a.clone()):c=!!a.Qa;c&&(b.Qa=a.Qa);return b};p.clone=function(){return new rb(this)};function sb(a,b,c){a.va=c?vb(b,!0):b;a.va&&(a.va=a.va.replace(/:$/,""))}function tb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.qb=b}else a.qb=null}function ub(a,b,c){b instanceof wb?a.a=b:(c||(b=xb(b,Cb)),a.a=new wb(b))}
77
+ function vb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function xb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Db),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Db(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var yb=/[#\/\?@]/g,Ab=/[#\?:]/g,zb=/[#\?]/g,Cb=/[#\?@]/g,Bb=/#/g;function wb(a){this.a=a||null}p=wb.prototype;p.ha=null;p.fc=null;
78
+ p.add=function(a,b){if(!this.ha&&(this.ha={},this.fc=0,this.a))for(var c=this.a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.a=null;(c=this.ha.hasOwnProperty(a)&&this.ha[a])||(this.ha[a]=c=[]);c.push(b);this.fc++;return this};
79
+ p.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var a=[],b;for(b in this.ha)for(var c=encodeURIComponent(b),d=this.ha[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.a=a.join("&")};p.clone=function(){var a=new wb;a.a=this.a;if(this.ha){var b={},c;for(c in this.ha)b[c]=this.ha[c].concat();a.ha=b;a.fc=this.fc}return a};function Eb(a,b){this.a=a;this.b=b}Eb.prototype.toString=function(){return"v"+this.a+"."+this.b};function Fb(a,b){var c=new Eb(4,0),d=Gb,e=d.a,f=c.b-e.b;(0<(c.a-e.a||f)?d.c:d.b)(d.a,c,a,b)}function Hb(a,b,c,d){Xa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ib(a,b,c,d){Wa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Gb=null;function Jb(a,b){return a.concat(b)}function Kb(){}function Lb(a){return null!=a}function Mb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Fb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Fb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Nb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new rb(d)});return a.map(function(d){return new rb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Jb,[]).map(function(d){return d.toString()})}function Ob(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:new Set}}
80
+ var Pb={Da:"video",fb:"audio",aa:"text",vf:"image",mf:"application"};function Rb(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Rb.prototype.resolve=function(){};Rb.prototype.reject=function(){};function Sb(a){this.b=a;this.a=void 0}Sb.prototype.value=function(){void 0==this.a&&(this.a=this.b());return this.a};function Tb(){}function Ub(a){if(!a)return"";a=L(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=Vb(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new M(2,2,2004);}}function Wb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new M(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=pb(a);d=q(hb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Vb(c)}
81
+ function Xb(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=L(a);if(239==c[0]&&187==c[1]&&191==c[2])return Ub(c);if(254==c[0]&&255==c[1])return Wb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Wb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Wb(a,!1);if(0==c[1]&&0==c[3])return Wb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Ub(a);throw new M(2,2,2003);}
82
+ function Yb(a){a=encodeURIComponent(a);var b=unescape(a);a=new Uint8Array(b.length);b=q(jb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.Z]=c.item.charCodeAt(0);return nb(a)}function Zb(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=q(jb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.Z,f.item.charCodeAt(0),b);return c}function Vb(a){return $b.value()(a)}K("shaka.util.StringUtils",Tb);Tb.resetFromCharCode=function(){$b.a=void 0};Tb.toUTF16=Zb;Tb.toUTF8=Yb;
83
+ Tb.fromBytesAutoDetect=Xb;Tb.fromUTF16=Wb;Tb.fromUTF8=Ub;var $b=new Sb(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ka:65536};0<b.Ka;b={Ka:b.Ka},b.Ka/=2)if(a(b.Ka))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ka)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ka));return e}}(b);return null});function ac(){}function bc(a){a=Vb(L(a));return btoa(a)}function cc(a,b){b=void 0==b?!0:b;var c=bc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function dc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=q(jb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.Z]=c.item.charCodeAt(0);return a}
84
+ function ec(a){var b=a.length/2,c=new Uint8Array(b);b=q(hb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function fc(a){var b=L(a);a="";b=q(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}
85
+ function gc(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=q(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=q(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(L(c),e),e+=c.byteLength;return d}K("shaka.util.Uint8ArrayUtils",ac);ac.concat=gc;ac.toHex=fc;ac.fromHex=ec;ac.fromBase64=dc;ac.toBase64=cc;ac.toStandardBase64=bc;
86
+ ac.equal=function(a,b){Fb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return lb(a,b)};function hc(){var a=this;this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.h=[];this.c=[];this.g=[];this.f=!1;this.a.on("data",function(b){a.c=b.captions;a.g=b.metadata;a.h.push(gc(b.initSegment,b.data))});this.a.on("done",function(){var b={data:gc.apply(ac,ia(a.h)),captions:a.c,metadata:a.g};a.b.resolve(b);a.f=!1})}hc.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};
87
+ function ic(a,b){if(!window.muxjs||"mp2t"!=a.toLowerCase().split(";")[0].split("/")[1])return!1;if(b)return MediaSource.isTypeSupported(jc(b,a));var c=jc("audio",a),d=jc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}
88
+ function jc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function kc(a,b){a.f=!0;a.b=new Rb;a.h=[];a.c=[];a.g=[];var c=L(b);a.a.push(c);a.a.flush();a.f&&a.b.reject(new M(2,3,3018));return a.b};function lc(a){this.b=a;this.a=null}lc.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.a=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.b()},1E3*a);return this};lc.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function N(a){this.b=a;this.a=null}N.prototype.Qb=function(){this.stop();this.b();return this};N.prototype.R=function(a){var b=this;this.stop();this.a=(new lc(function(){b.b()})).R(a);return this};N.prototype.ra=function(a){var b=this;this.stop();this.a=(new lc(function(){b.a.R(a);b.b()})).R(a);return this};N.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};K("shaka.util.Timer",N);N.prototype.stop=N.prototype.stop;N.prototype.tickEvery=N.prototype.ra;N.prototype.tickAfter=N.prototype.R;
89
+ N.prototype.tickNow=N.prototype.Qb;function mc(a,b){var c=nc();this.j=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.f=null==a.baseDelay?c.baseDelay:a.baseDelay;this.h=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.g=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===b?!1:b)this.a=1}
90
+ function oc(a){var b,c;return J(function(d){if(1==d.a){if(a.a>=a.j)if(a.c)a.a=1,a.b=a.f;else throw new M(2,7,1010);b=a.a;a.a++;if(0==b)return d["return"]();c=a.b*(1+(2*Math.random()-1)*a.h);return t(d,new Promise(function(e){(new N(e)).R(c/1E3)}),2)}a.b*=a.g;w(d)})}function nc(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function pc(a,b){this.promise=a;this.c=b;this.a=!1}function qc(a){return new pc(Promise.reject(a),function(){return Promise.resolve()})}function rc(){var a=Promise.reject(new M(2,7,7001));a["catch"](function(){});return new pc(a,function(){return Promise.resolve()})}function sc(a){return new pc(Promise.resolve(a),function(){return Promise.resolve()})}function tc(a){return new pc(a,function(){return a["catch"](function(){})})}pc.prototype.abort=function(){this.a=!0;return this.c()};
91
+ function uc(a){return new pc(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}pc.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
92
+ pc.prototype.U=function(a,b){function c(h){return function(k){if(e.a&&h)f.reject(g);else{var l=h?a:b;l?d=vc(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Rb,g=new M(2,7,7001);this.promise.then(c(!0),c(!1));return new pc(f,function(){return d()})};
93
+ function vc(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()}}}K("shaka.util.AbortableOperation",pc);pc.prototype.chain=pc.prototype.U;pc.prototype["finally"]=pc.prototype["finally"];pc.all=uc;pc.prototype.abort=pc.prototype.abort;pc.notAbortable=tc;pc.completed=sc;pc.aborted=rc;pc.failed=qc;function Q(a,b){b=void 0===b?{}:b;for(var 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.a=!1}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.a=!0};
94
+ Q.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",Q);function wc(){this.a={}}wc.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]};wc.prototype.get=function(a){return(a=this.a[a])?a.slice():null};wc.prototype.remove=function(a,b){a in this.a&&(this.a[a]=this.a[a].filter(function(c){return c!=b}))};function xc(a,b){for(var c in a.a)b(c,a.a[c])};function yc(){this.Lc=new wc;this.Zb=this}yc.prototype.addEventListener=function(a,b){this.Lc.push(a,b)};yc.prototype.removeEventListener=function(a,b){this.Lc.remove(a,b)};yc.prototype.dispatchEvent=function(a){var b=this.Lc.get(a.type)||[];b=q(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Zb;a.currentTarget=this.Zb;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.a)break}return a.defaultPrevented};function zc(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;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 Set;return b(a)}function Ac(a){var b={},c;for(c in a)b[c]=a[c];return b};function Bc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Cc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function Dc(a,b,c){c||(c=Bc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=q(a);for(var e=a.next();!e.done;d={zc:d.zc},e=a.next()){d.zc=e.value;e=b.findIndex(function(f){return function(g){return c(f.zc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
95
+ function Ec(a,b,c){c||(c=Bc);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 Fc(){this.a=[]}function Gc(a,b){a.a.push(b["finally"](function(){Cc(a.a,b)}))}Fc.prototype.destroy=function(){for(var a=[],b=q(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.a=[];return Promise.all(a)};function Hc(a){yc.call(this);this.f=!1;this.g=new Fc;this.a=new Set;this.b=new Set;this.c=a||null}pa(Hc,yc);function Ic(a,b,c){c=c||Jc;var d=Kc[a];if(!d||c>=d.priority)Kc[a]={priority:c,Ne:b}}p=Hc.prototype;p.Pe=function(a){this.a.add(a)};p.hf=function(a){this.a["delete"](a)};p.ge=function(){this.a.clear()};p.Qe=function(a){this.b.add(a)};p.jf=function(a){this.b["delete"](a)};p.he=function(){this.b.clear()};
96
+ function Lc(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null}}p.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};
97
+ p.request=function(a,b){var c=this,d=new Mc;if(this.f){var e=Promise.reject(new M(2,7,7001));e["catch"](function(){});return new Nc(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?zc(b.retryParameters):nc();b.uris=zc(b.uris);e=Oc(this,a,b);var f=e.U(function(){return Pc(c,a,b,new mc(b.retryParameters,!1),0,null,d)}),g=f.U(function(n){return Qc(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
98
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.U(function(n){var r=Date.now()-l,u=n.response;u.timeMs+=k;u.timeMs+=r;n.Fe||!c.c||u.fromCache||a!=Rc||c.c(u.timeMs,u.data.byteLength);return u},function(n){n&&(n.severity=2);throw n;});e=new Nc(m.promise,function(){return m.abort()},d);Gc(this.g,e);return e};
99
+ function Oc(a,b,c){var d=sc(void 0),e={};a=q(a.a);for(var f=a.next();!f.done;e={Dc:e.Dc},f=a.next())e.Dc=f.value,d=d.U(function(g){return function(){c.body&&(c.body=nb(c.body));return g.Dc(b,c)}}(e));return d.U(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
100
+ function Pc(a,b,c,d,e,f,g){var h=new rb(c.uris[e]),k=h.va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),sb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Kc[k])?k.Ne:null;if(!m)return qc(new M(2,1,1E3,h));var n;return tc(oc(d)).U(function(){if(a.f)return rc();n=Date.now();return m(c.uris[e],c,b,function(r,u,v){a.c&&b==Rc&&(a.c(r,u),l=!0,g.a=v)})}).U(function(r){void 0==r.timeMs&&(r.timeMs=Date.now()-n);return{response:r,Fe:l}},function(r){if(a.f)return rc();if(r instanceof M){if(7001==r.code)throw r;
101
+ if(1010==r.code)throw f;if(1==r.severity){var u=new Q("retry",{error:r});a.dispatchEvent(u);e=(e+1)%c.uris.length;return Pc(a,b,c,d,e,r,g)}}throw r;})}
102
+ function Qc(a,b,c){var d=sc(void 0),e={};a=q(a.b);for(var f=a.next();!f.done;e={Ec:e.Ec},f=a.next())e.Ec=f.value,d=d.U(function(g){return function(){var h=c.response;h.data&&(h.data=nb(h.data));return g.Ec(b,h)}}(e));return d.U(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}K("shaka.net.NetworkingEngine",Hc);Hc.prototype.request=Hc.prototype.request;Hc.prototype.destroy=Hc.prototype.destroy;Hc.makeRequest=Lc;
103
+ Hc.defaultRetryParameters=function(){return nc()};Hc.prototype.clearAllResponseFilters=Hc.prototype.he;Hc.prototype.unregisterResponseFilter=Hc.prototype.jf;Hc.prototype.registerResponseFilter=Hc.prototype.Qe;Hc.prototype.clearAllRequestFilters=Hc.prototype.ge;Hc.prototype.unregisterRequestFilter=Hc.prototype.hf;Hc.prototype.registerRequestFilter=Hc.prototype.Pe;Hc.unregisterScheme=function(a){delete Kc[a]};Hc.registerScheme=Ic;function Mc(){this.a=0}Hc.NumBytesRemainingClass=Mc;
104
+ function Nc(a,b,c){pc.call(this,a,b);this.b=c}pa(Nc,pc);Hc.PendingRequest=Nc;var Rc=1;Hc.RequestType={MANIFEST:0,SEGMENT:Rc,LICENSE:2,APP:3,TIMING:4};var Jc=3;Hc.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Jc};var Kc={};function Sc(a){this.a=!1;this.b=new Rb;this.c=a}Sc.prototype.destroy=function(){var a=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){a.b.resolve()},function(){a.b.resolve()})};function Tc(a,b){if(a.a){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function Uc(){this.a=new wc}p=Uc.prototype;p.release=function(){this.Xa();this.a=null};p.l=function(a,b,c,d){this.a&&(a=new Vc(a,b,c,d),this.a.push(b,a))};p.ia=function(a,b,c,d){function e(g){f.sa(a,b,e);c(g)}var f=this;this.l(a,b,e,d)};p.sa=function(a,b,c){if(this.a){var d=this.a.get(b)||[];d=q(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.sa(),this.a.remove(b,e))}};
105
+ p.Xa=function(){if(this.a){var a=this.a,b=[],c;for(c in a.a)b.push.apply(b,ia(a.a[c]));a=q(b);for(b=a.next();!b.done;b=a.next())b.value.sa();this.a.a={}}};K("shaka.util.EventManager",Uc);Uc.prototype.removeAll=Uc.prototype.Xa;Uc.prototype.unlisten=Uc.prototype.sa;Uc.prototype.listenOnce=Uc.prototype.ia;Uc.prototype.listen=Uc.prototype.l;Uc.prototype.release=Uc.prototype.release;function Vc(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.a=Wc(a,d);this.target.addEventListener(b,c,this.a)}
106
+ Vc.prototype.sa=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};function Wc(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Xc(a)?b:b.capture||!1}
107
+ function Xc(a){var b=Yc;if(void 0==b){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}Yc=b}return b||!1}var Yc=void 0;function Zc(){}function $c(a){a=Xb(a);return(new rb(a)).ua}function ad(a,b,c){function d(h){pb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(L(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=Zb(b,!0):e=b;a=Xb(a);a=Zb(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}K("shaka.util.FairPlayUtils",Zc);Zc.initDataTransform=ad;Zc.defaultGetContentId=$c;function bd(a){for(var b=new Map,c=q(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function cd(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function dd(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=q(a),d=c.next();!d.done;d=c.next()){var e=q(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function ed(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function fd(a){var b=[a.mimeType];gd.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});return b.join(";")}function hd(a){a=a.split(".");var b=a[0];a.pop();return b}var gd=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function id(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function jd(a){return""!=kd().canPlayType(a)}function ld(){return md("Tizen")}function nd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!ld()}function od(){if(!nd())return null;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}function md(a){return(navigator.userAgent||"").includes(a)}
108
+ function kd(){if(pd)return pd;qd||(qd=new N(function(){pd=null}));(pd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pd=document.createElement("video"));qd.R(1);return pd}var qd=null,pd=null;function rd(a,b){var c=this;b=void 0===b?1:b;this.s=a;this.m=new Set;this.a=this.h=null;this.M=!1;this.G=0;this.c=null;this.b=new Uc;this.f=new Map;this.v=[];this.j=new Rb;this.i=null;this.g=function(d){c.j.reject(d);a.onError(d)};this.da=new Map;this.T=new Map;this.J=new N(function(){return sd(c)});this.A=!1;this.D=[];this.I=!1;this.X=(new N(function(){td(c)})).ra(b);this.j["catch"](function(){});this.F=new Sc(function(){return ud(c)})}rd.prototype.destroy=function(){return this.F.destroy()};
109
+ function ud(a){return J(function(b){switch(b.a){case 1:return a.b.release(),a.b=null,a.j.reject(),a.X.stop(),a.X=null,a.J.stop(),a.J=null,t(b,vd(a),2);case 2:if(!a.a){b.u(3);break}x(b,4);return t(b,a.a.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:C(b);case 5:a.a=null;case 3:a.c=null,a.m.clear(),a.h=null,a.v=[],a.i=null,a.g=function(){},a.s=null,w(b)}})}rd.prototype.configure=function(a){this.i=a};function wd(a,b,c){a.v=[];a.A=c;return xd(a,b)}
110
+ function yd(a,b,c){a.v=c;a.A=0<c.length;return xd(a,b)}function zd(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,initData:null,keyIds:null}];g.set(b,e);return Ad(a,g)}
111
+ function xd(a,b){var c=Bd(a);if(c)for(var d=q(b),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=[c]),e.audio&&(e.audio.drmInfos=[c]);c=b.some(function(g){return g.video&&g.video.drmInfos.length||g.audio&&g.audio.drmInfos.length?!0:!1});c||(d=bd(a.i.servers),Cd(b,d));d=q(b);for(e=d.next();!e.done;e=d.next()){e=e.value;e=q((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())Dd(f.value,bd(a.i.servers),bd(a.i.advanced||{}))}d=Ed(a,
112
+ b);if(!d.size)return a.M=!0,Promise.resolve();d=Ad(a,d);return c?d:d["catch"](function(){})}
113
+ rd.prototype.zb=function(a){var b=this,c,d;return J(function(e){if(1==e.a){if(!b.h)return b.b.ia(a,"encrypted",function(){b.g(new M(2,6,6010))}),e["return"]();b.a=a;b.b.ia(b.a,"play",function(){for(var f=q(b.D),g=f.next();!g.done;g=f.next())Fd(b,g.value);b.I=!0;b.D=[]});"webkitCurrentPlaybackTargetIsWireless"in b.a&&b.b.l(b.a,"webkitcurrentplaybacktargetiswirelesschanged",function(){return vd(b)});c=b.a.setMediaKeys(b.h);c=c["catch"](function(f){return Promise.reject(new M(2,6,6003,f.message))});
114
+ return t(e,c,2)}Tc(b.F);Gd(b);b.c.initData.length||b.v.length||(d=function(f){return Hd(b,f.initDataType,L(f.initData))},b.b.l(b.a,"encrypted",d));w(e)})};function Id(a){var b;return J(function(c){if(1==c.a){if(!(a.h&&a.c&&a.c.serverCertificate&&a.c.serverCertificate.length))return c.u(0);x(c,3);return t(c,a.h.setServerCertificate(a.c.serverCertificate),5)}if(3!=c.a)return ua(c,0);b=C(c);throw new M(2,6,6004,b.message);})}
115
+ function Jd(a,b){var c,d,e;return J(function(f){if(1==f.a)return t(f,Kd(a,b),2);c=f.b;if(!c)return f["return"]();d=[];if(e=a.f.get(c))e.Aa=new Rb,d.push(e.Aa);d.push(c.remove());return t(f,Promise.all(d),0)})}function Gd(a){for(var b=(a.c?a.c.initData:[])||[],c=q(b),d=c.next();!d.done;d=c.next())d=d.value,Hd(a,d.initDataType,d.initData);c=q(a.v);for(d=c.next();!d.done;d=c.next())Kd(a,d.value);b.length||a.v.length||a.j.resolve();return a.j}
116
+ function Hd(a,b,c){var d=a.f.values();d=q(d);for(var e=d.next();!e.done;e=d.next())if(lb(c,e.value.initData)&&!md("Tizen 2"))return;Ld(a,b,c)}function Md(a){return a?a.keySystem:""}function Nd(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(ld()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.m.has(b)||a.m.has(c)}return a.m.has(b)}function Od(a){a=a.f.keys();a=eb(a,function(b){return b.sessionId});return Array.from(a)}
117
+ rd.prototype.Eb=function(){var a=Infinity,b=this.f.keys();b=q(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};
118
+ function Ed(a,b){for(var c=new Set,d=q(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=q((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=q(c);for(e=d.next();!e.done;e=d.next())Dd(e.value,bd(a.i.servers),bd(a.i.advanced||{}));f=a.A?"required":"optional";var g=a.A?["persistent-license"]:["temporary"];d=new Map;c=q(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],
119
+ distinctiveIdentifier:"optional",persistentState:f,sessionTypes:g,label:e.keySystem,drmInfos:[]});c=q(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=q([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Pd(g),k=null;"ac-3"==g.codecs.toLowerCase()&&ld()&&(k=Pd(g,"ec-3"));var l=q(g.drmInfos);for(e=l.next();!e.done;e=l.next()){var m=e.value;e=d.get(m.keySystem);e.drmInfos.push(m);m.initData&&m.initData.length&&(e.initDataTypes=ia(new Set(m.initData.map(function(r){return r.initDataType}))).concat());
120
+ m.distinctiveIdentifierRequired&&(e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");m="audio"==g.type?m.audioRobustness:m.videoRobustness;var n={robustness:m||"",contentType:h};"audio"==g.type?e.audioCapabilities.push(n):e.videoCapabilities.push(n);k&&(m={robustness:m||"",contentType:k},"audio"==g.type?e.audioCapabilities.push(m):e.videoCapabilities.push(m))}}return d}function Pd(a,b){var c=ed(a.mimeType,b||a.codecs);return ic(c)?jc(a.type,c):c}
121
+ function Ad(a,b){var c,d,e,f,g,h,k,l,m,n,r,u,v,A,y,z,D,B,E,H,G,F;return J(function(I){switch(I.a){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);c=q(b.values());for(d=c.next();!d.done;d=c.next())e=d.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;g=q([!0,!1]);h=g.next();case 2:if(h.done){I.u(4);break}k=h.value;l=q(b.keys());m=l.next();case 5:if(m.done){I.u(7);break}n=m.value;r=b.get(n);u=r.drmInfos.some(function(O){return!!O.licenseServerUri});
122
+ if(u!=k){I.u(6);break}x(I,8);return t(I,navigator.requestMediaKeySystemAccess(n,[r]),10);case 10:f=I.b;I.u(7);break;case 8:C(I);case 9:Tc(a.F);case 6:m=l.next();I.u(5);break;case 7:if(f){I.u(4);break}h=g.next();I.u(2);break;case 4:if(!f)throw new M(2,6,6001);Tc(a.F);x(I,11);a.m.clear();v=f.getConfiguration();A=v.audioCapabilities||[];y=v.videoCapabilities||[];z=q(A);for(D=z.next();!D.done;D=z.next())B=D.value,a.m.add(B.contentType.toLowerCase());E=q(y);for(D=E.next();!D.done;D=E.next())H=D.value,
123
+ a.m.add(H.contentType.toLowerCase());a.c=Qd(f.keySystem,b.get(f.keySystem));if(!a.c.licenseServerUri)throw new M(2,6,6012,a.c.keySystem);return t(I,f.createMediaKeys(),13);case 13:return G=I.b,Tc(a.F),a.h=G,a.M=!0,t(I,Id(a),14);case 14:Tc(a.F);ua(I,0);break;case 11:F=C(I);Tc(a.F,F);a.c=null;a.m.clear();if(F instanceof M)throw F;throw new M(2,6,6002,F.message);}})}
124
+ function Bd(a){a=bd(a.i.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=ec(f),h=ec(e);g={kty:"oct",kid:cc(g,!1),k:cc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:L(Yb(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
125
+ initData:d,keyIds:new Set(c)}}
126
+ function Kd(a,b){var c,d,e,f,g;return J(function(h){switch(h.a){case 1:try{c=a.h.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.g(d),h["return"](Promise.reject(d))}a.b.l(c,"message",function(k){a.a&&a.i.delayLicenseRequestUntilPlayed&&a.a.paused&&!a.I?a.D.push(k):Fd(a,k)});a.b.l(c,"keystatuseschange",function(k){return Rd(a,k)});e={initData:null,loaded:!1,$c:Infinity,Aa:null};a.f.set(c,e);x(h,2);return t(h,c.load(b),4);case 4:f=h.b;Tc(a.F);if(!f)return a.f["delete"](c),
127
+ a.g(new M(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Sd(a)&&a.j.resolve();return h["return"](c);case 2:g=C(h),Tc(a.F,g),a.f["delete"](c),a.g(new M(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
128
+ function Ld(a,b,c){try{var d=a.A?a.h.createSession("persistent-license"):a.h.createSession()}catch(e){a.g(new M(2,6,6005,e.message));return}a.b.l(d,"message",function(e){a.a&&a.i.delayLicenseRequestUntilPlayed&&a.a.paused&&!a.I?a.D.push(e):Fd(a,e)});a.b.l(d,"keystatuseschange",function(e){return Rd(a,e)});a.f.set(d,{initData:c,loaded:!1,$c:Infinity,Aa:null});try{c=a.i.initDataTransform(c,b,a.c)}catch(e){b=e;e instanceof M||(b=new M(2,6,6016,e));a.g(b);return}a.i.logLicenseExchange&&cc(c);d.generateRequest(b,
129
+ c)["catch"](function(e){if(!a.F.a){a.f["delete"](d);var f=e.errorCode;if(f&&f.systemCode){var g=f.systemCode;0>g&&(g+=Math.pow(2,32));g="0x"+g.toString(16)}a.g(new M(2,6,6006,e.message,e,g))}})}function Td(a,b,c){"skd"==b&&(b=c.serverCertificate,c=$c(a),a=ad(a,c,b));return a}
130
+ function Fd(a,b){var c,d,e,f,g,h,k,l,m,n,r,u,v,A;J(function(y){switch(y.a){case 1:return c=b.target,a.i.logLicenseExchange&&cc(b.message),d=a.f.get(c),e=a.c.licenseServerUri,f=a.i.advanced[a.c.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Lc([e],a.i.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,"com.microsoft.playready"!=a.c.keySystem&&"com.chromecast.playready"!=a.c.keySystem||
131
+ Ud(g),h=Date.now(),x(y,2),l=a.s.nb.request(2,g),t(y,l.promise,4);case 4:k=y.b;ua(y,3);break;case 2:return m=C(y),n=new M(2,6,6007,m),a.g(n),d&&d.Aa&&d.Aa.reject(n),y["return"]();case 3:if(a.F.a)return y["return"]();a.G+=(Date.now()-h)/1E3;a.i.logLicenseExchange&&cc(k.data);x(y,5);return t(y,c.update(k.data),7);case 7:ua(y,6);break;case 5:return r=C(y),u=new M(2,6,6008,r.message),a.g(u),d&&d.Aa&&d.Aa.reject(u),y["return"]();case 6:v=new Q("drmsessionupdate"),a.s.onEvent(v),d&&(d.Aa&&d.Aa.resolve(),
132
+ A=new N(function(){d.loaded=!0;Sd(a)&&a.j.resolve()}),A.R(Vd)),w(y)}})}
133
+ function Ud(a){var b=Wb(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=q(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=dc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
134
+ function Rd(a,b){var c=b.target,d=a.f.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if("com.microsoft.playready"==a.c.keySystem&&16==h.byteLength&&(md("Trident/")||navigator.userAgent.match(/Edge?\//))){k=pb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"com.microsoft.playready"==a.c.keySystem&&"status-pending"==g&&(g="usable");"status-pending"!=g&&(d.loaded=!0);"expired"==g&&
135
+ (e=!0);k=fc(h);a.da.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Aa&&(a.f["delete"](c),c.close()["catch"](function(){}));Sd(a)&&(a.j.resolve(),a.J.R(Wd))}function sd(a){var b=a.da,c=a.T;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.g(new M(2,6,6014));a.s.nc(cd(c))}
136
+ function Xd(){var a,b,c,d,e,f,g,h;return J(function(k){return 1==k.a?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,r;
137
+ return J(function(u){switch(u.a){case 1:return x(u,2),t(u,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=u.b,r=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,md("Tizen 3")&&(r=!1),f.set(l,{persistentState:r}),t(u,m.createMediaKeys(),5);case 5:ua(u,0);break;case 2:C(u),f.set(l,null),w(u)}})},h=a.map(function(l){return g(l)}),t(k,Promise.all(h),2)):k["return"](cd(f))})}
138
+ function Yd(a){var b;return J(function(c){if(1==c.a)return b=new Promise(function(d,e){(new N(e)).R(Zd)}),x(c,2),t(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.a)return ua(c,0);C(c);w(c)})}function vd(a){var b;return J(function(c){b=Array.from(a.f.keys());a.f.clear();return t(c,Promise.all(b.map(function(d){return J(function(e){if(1==e.a)return x(e,2),t(e,Yd(d),4);if(2!=e.a)return ua(e,0);C(e);w(e)})})),0)})}
139
+ function $d(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted){var e=Pd(c);if(!Nd(a,e))return!1}if(d&&d.encrypted&&(e=Pd(d),!Nd(a,e)))return!1;var f=Md(a.c);c=(d?d.drmInfos:[]).concat(c?c.drmInfos:[]);return 0==c.length||c.some(function(g){return g.keySystem==f})}
140
+ function ae(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=q(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=q(b),g=f.next();!g.done;g=f.next())if(g=g.value,e.keySystem==g.keySystem){f=[];f=f.concat(e.initData||[]);f=f.concat(g.initData||[]);var h=e.keyIds&&g.keyIds?new Set(ia(e.keyIds).concat(ia(g.keyIds))):e.keyIds||g.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||
141
+ g.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||g.persistentStateRequired,videoRobustness:e.videoRobustness||g.videoRobustness,audioRobustness:e.audioRobustness||g.audioRobustness,serverCertificate:e.serverCertificate||g.serverCertificate,initData:f,keyIds:h});break}}return c}function td(a){a.f.forEach(function(b,c){var d=b.$c,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.s.onExpirationUpdated(c.sessionId,e),b.$c=e)})}
142
+ function Sd(a){a=a.f.values();return fb(a,function(b){return b.loaded})}function Cd(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})});for(var d=q(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
143
+ function Qd(a,b){var c=[],d=[],e=[],f=new Set;be(b.drmInfos,c,d,e,f);return{keySystem:a,licenseServerUri:c[0],distinctiveIdentifierRequired:"required"==b.distinctiveIdentifier,persistentStateRequired:"required"==b.persistentState,audioRobustness:(b.audioCapabilities?b.audioCapabilities[0].robustness:"")||"",videoRobustness:(b.videoCapabilities?b.videoCapabilities[0].robustness:"")||"",serverCertificate:d[0],initData:e,keyIds:f}}
144
+ function be(a,b,c,d,e){var f={};a=q(a);for(var g=a.next();!g.done;f={na:f.na},g=a.next()){f.na=g.value;b.includes(f.na.licenseServerUri)||b.push(f.na.licenseServerUri);f.na.serverCertificate&&(c.some(function(l){return function(m){return lb(m,l.na.serverCertificate)}}(f))||c.push(f.na.serverCertificate));if(f.na.initData){g={};for(var h=q(f.na.initData),k=h.next();!k.done;g={Tb:g.Tb},k=h.next())g.Tb=k.value,d.some(function(l){return function(m){var n=l.Tb;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
145
+ n.initDataType&&lb(m.initData,n.initData)}}(g))||d.push(g.Tb)}if(f.na.keyIds)for(g=q(f.na.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
146
+ function Dd(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
147
+ (a.serverCertificate=c.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var Zd=1,Vd=5,Wd=.5,ce=new Sb(function(){return nb(new Uint8Array([0]))});function R(a,b){this.P=pb(a);this.a=b==de;this.C=0}p=R.prototype;p.wa=function(){return this.C<this.P.byteLength};p.ye=function(){return this.C};p.oe=function(){return this.P.byteLength};p.qa=function(){try{var a=this.P.getUint8(this.C);this.C+=1;return a}catch(b){throw ee();}};p.Mb=function(){try{var a=this.P.getUint16(this.C,this.a);this.C+=2;return a}catch(b){throw ee();}};p.K=function(){try{var a=this.P.getUint32(this.C,this.a);this.C+=4;return a}catch(b){throw ee();}};
148
+ p.Od=function(){try{var a=this.P.getInt32(this.C,this.a);this.C+=4;return a}catch(b){throw ee();}};p.rb=function(){try{if(this.a){var a=this.P.getUint32(this.C,!0);var b=this.P.getUint32(this.C+4,!0)}else b=this.P.getUint32(this.C,!1),a=this.P.getUint32(this.C+4,!1)}catch(c){throw ee();}if(2097151<b)throw new M(2,3,3001);this.C+=8;return b*Math.pow(2,32)+a};p.Wa=function(a){if(this.C+a>this.P.byteLength)throw ee();var b=L(this.P,this.C,a);this.C+=a;return b};
149
+ p.skip=function(a){if(this.C+a>this.P.byteLength)throw ee();this.C+=a};p.Qd=function(a){if(this.C<a)throw ee();this.C-=a};p.seek=function(a){if(0>a||a>this.P.byteLength)throw ee();this.C=a};p.dd=function(){for(var a=this.C;this.wa()&&0!=this.P.getUint8(this.C);)this.C+=1;a=L(this.P,a,this.C-a);this.C+=1;return Ub(a)};function ee(){return new M(2,3,3E3)}K("shaka.util.DataViewReader",R);R.prototype.readTerminatedString=R.prototype.dd;R.prototype.seek=R.prototype.seek;R.prototype.rewind=R.prototype.Qd;
150
+ R.prototype.skip=R.prototype.skip;R.prototype.readBytes=R.prototype.Wa;R.prototype.readUint64=R.prototype.rb;R.prototype.readInt32=R.prototype.Od;R.prototype.readUint32=R.prototype.K;R.prototype.readUint16=R.prototype.Mb;R.prototype.readUint8=R.prototype.qa;R.prototype.getLength=R.prototype.oe;R.prototype.getPosition=R.prototype.ye;R.prototype.hasMoreData=R.prototype.wa;var de=1;R.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:de};function fe(){this.c=[];this.b=[];this.a=!1}p=fe.prototype;p.box=function(a,b){var c=ge(a);this.c[c]=he;this.b[c]=b;return this};p.V=function(a,b){var c=ge(a);this.c[c]=ie;this.b[c]=b;return this};p.stop=function(){this.a=!0};p.parse=function(a,b){var c=new R(a,0);for(this.a=!1;c.wa()&&!this.a;)this.pc(0,c,b)};
151
+ p.pc=function(a,b,c){var d=b.C,e=b.K(),f=b.K(),g=!1;switch(e){case 0:e=b.P.byteLength-d;break;case 1:e=b.rb(),g=!0}var h=this.b[f];if(h){var k=null,l=null;this.c[f]==ie&&(l=b.K(),k=l>>>24,l&=16777215);f=d+e;c&&f>b.P.byteLength&&(f=b.P.byteLength);f-=b.C;b=0<f?b.Wa(f):new Uint8Array(0);b=new R(b,0);h({parser:this,partialOkay:c||!1,version:k,flags:l,reader:b,size:e,start:d+a,has64BitSize:g})}else b.skip(Math.min(d+e-b.C,b.P.byteLength-b.C))};
152
+ function je(a){for(var b=ke(a);a.reader.wa()&&!a.parser.a;)a.parser.pc(a.start+b,a.reader,a.partialOkay)}function le(a){var b=ke(a),c=a.reader.K();c=q(hb(c));for(var d=c.next();!d.done&&(a.parser.pc(a.start+b,a.reader,a.partialOkay),!a.parser.a);d=c.next());}function me(a){return function(b){a(b.reader.Wa(b.reader.P.byteLength-b.reader.C))}}function ge(a){var b=0;a=q(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}
153
+ function ne(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function ke(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",fe);fe.headerSize=ke;fe.typeToString=ne;fe.allData=me;fe.sampleDescription=le;fe.children=je;fe.prototype.parseNext=fe.prototype.pc;fe.prototype.parse=fe.prototype.parse;fe.prototype.stop=fe.prototype.stop;fe.prototype.fullBox=fe.prototype.V;fe.prototype.box=fe.prototype.box;var he=0,ie=1;function oe(a){function b(){d=!0}function c(l){f.push(l);je(l)}a=L(a);var d=!1,e,f=[],g=[];(new fe).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).V("stsd",function(l){e=l;f.push(l);le(l)}).V("encv",b).V("enca",b).V("avc1",function(l){g.push({box:l,Kd:1701733238})}).V("mp4a",function(l){g.push({box:l,Kd:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(fc(a)),new M(2,3,3019);g.reverse();for(var h=q(g),k=h.next();!k.done;k=h.next())k=k.value,a=pe(a,e,k.box,f,
154
+ k.Kd);return a}
155
+ function pe(a,b,c,d,e){var f=qe.value(),g=a.subarray(c.start,c.start+c.size),h=pb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=pb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);re(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=md("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=q(d);for(d=a.next();!d.done;d=a.next())d=d.value,re(e,d.start,d.size+k.byteLength);k=pb(e,b.start);b=ke(b);
156
+ a=k.getUint32(b);k.setUint32(b,a+1);return e}function re(a,b,c){a=pb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var qe=new Sb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function se(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}se.prototype.init=function(a){var b=muxjs.mp4.probe;a=L(a);this.g=b.videoTrackIds(a);this.f=b.timescale(a);this.a.init()};se.prototype.b=function(a,b){var c=L(a);(c=this.a.parse(c,this.g,this.f))&&c.captions&&b(c.captions);this.a.clearParsedCaptions()};se.prototype.c=function(){this.a.resetCaptionStream()};function te(){}te.prototype.init=function(){};te.prototype.b=function(){};te.prototype.c=function(){};function ue(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ve(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function we(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=q(xe(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
157
+ function ye(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;var c=navigator.userAgent.match(/Edge\//)||md("Trident/")||ld()||md("CrKey")?.5:.1,d=xe(a).findIndex(function(e,f,g){return e.start>b&&(0==f||g[f-1].end-b<=c)});return 0<=d?d:null}function xe(a){if(!a)return[];for(var b=[],c=q(hb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function ze(a,b,c){this.startTime=a;this.direction=Ae;this.endTime=b;this.payload=c;this.region=new Be;this.position=null;this.positionAlign=Ce;this.size=0;this.textAlign=Ee;this.writingMode=Fe;this.lineInterpretation=Ge;this.line=null;this.lineHeight="";this.lineAlign=He;this.displayAlign=Ie;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Je;this.fontStyle=Ke;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
158
+ [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=!1;this.cellResolution={columns:32,rows:15}}ze.prototype.clone=function(){var a=new ze(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
159
+ function Le(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Ec(a.nestedCues,b.nestedCues,Le))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Ec(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",ze);var Ce="auto";
160
+ ze.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ce};var Ee="center",Me={LEFT:"left",RIGHT:"right",CENTER:Ee,START:"start",END:"end"};ze.textAlign=Me;var Ie="after",Ne={BEFORE:"before",CENTER:"center",AFTER:Ie};ze.displayAlign=Ne;var Ae="ltr";ze.direction={HORIZONTAL_LEFT_TO_RIGHT:Ae,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Fe="horizontal-tb";ze.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Fe,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ge=0;
161
+ ze.lineInterpretation={LINE_NUMBER:Ge,PERCENTAGE:1};var He="start",Oe={CENTER:"center",START:He,END:"end"};ze.lineAlign=Oe;var Je=400;ze.fontWeight={NORMAL:Je,BOLD:700};var Ke="normal",Pe={NORMAL:Ke,ITALIC:"italic",OBLIQUE:"oblique"};ze.fontStyle=Pe;ze.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
162
+ function Be(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Qe;this.scroll=Re}K("shaka.text.CueRegion",Be);var Qe=1;Be.units={PX:0,PERCENTAGE:Qe,LINES:2};var Re="";Be.scrollMode={NONE:Re,UP:"up"};function Se(a){this.m=null;this.c=a;this.f=this.v=0;this.g=Infinity;this.b=this.a=null;this.j="";this.h=new Map}function Te(a){return Ue[a]||window.muxjs&&"application/cea-608"==a?!0:!1}Se.prototype.destroy=function(){this.c=this.m=null;this.h.clear();return Promise.resolve()};
163
+ function Ve(a,b,c,d){var e,f,g;return J(function(h){if(1==h.a)return t(h,Promise.resolve(),2);if(!a.m||!a.c)return h["return"]();if(null==c||null==d)return a.m.parseInit(L(b)),h["return"]();e={periodStart:a.v,segmentStart:c,segmentEnd:d};f=a.m.parseMedia(L(b),e);g=f.filter(function(k){return k.startTime>=a.f&&k.startTime<a.g});a.c.append(g);null==a.a&&(a.a=Math.max(c,a.f));a.b=Math.min(d,a.g);w(h)})}
164
+ Se.prototype.remove=function(a,b){var c=this;return J(function(d){if(1==d.a)return t(d,Promise.resolve(),2);!c.c||!c.c.remove(a,b)||null==c.a||b<=c.a||a>=c.b||(a<=c.a&&b>=c.b?c.a=c.b=null:a<=c.a&&b<c.b?c.a=b:a>c.a&&b>=c.b&&(c.b=a));w(d)})};function We(a,b,c){a.f=b;a.g=c}function Xe(a,b,c){a.j=b;if(b=a.h.get(b))for(var d=q(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.c.append(e)}
165
+ function Ye(a,b,c,d,e){var f=c+" "+d,g=new Map;b=q(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);k.startTime+=e;k.endTime+=e;k.startTime>=a.f&&k.startTime<a.g&&(k=new ze(k.startTime,k.endTime,k.text),g.get(h).get(f).push(k),h==a.j&&a.c.append([k]))}e=q(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.h.has(f)||a.h.set(f,new Map),b=q(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),
166
+ a.h.get(f).set(h,k);a.a=null==a.a?Math.max(c,a.f):Math.min(a.a,Math.max(c,a.f));a.b=Math.max(a.b,Math.min(d,a.g))}K("shaka.text.TextEngine",Se);Se.prototype.destroy=Se.prototype.destroy;Se.unregisterParser=function(a){delete Ue[a]};Se.registerParser=function(a,b){Ue[a]=b};var Ue={};function Ze(a,b,c,d){var e=this;this.a=a;this.h=c;this.f={};this.G={};this.c=null;this.I=d||function(){};this.g={};this.b=new Uc;this.m={};this.v=b;this.A=new Rb;this.j=$e(this,this.A);this.F=new Sc(function(){return af(e)});this.D=""}function $e(a,b){var c=new MediaSource;a.b.ia(c,"sourceopen",function(){URL.revokeObjectURL(a.D);b.resolve()});a.D=bf(c);a.a.src=a.D;return c}function cf(a){var b=ed(a.mimeType,a.codecs),c=fd(a);return Te(b)||MediaSource.isTypeSupported(c)||ic(b,a.type)}p=Ze.prototype;
167
+ p.destroy=function(){return this.F.destroy()};
168
+ function af(a){var b,c,d,e,f,g,h,k;return J(function(l){if(1==l.a){b=[];for(c in a.g)for(d=a.g[c],e=d[0],a.g[c]=d.slice(0,1),e&&b.push(e.p["catch"](Kb)),f=q(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new M(2,7,7003,void 0));a.c&&b.push(a.c.destroy());a.h&&b.push(a.h.destroy());for(k in a.m)b.push(a.m[k].destroy());return t(l,Promise.all(b),2)}a.b&&(a.b.release(),a.b=null);a.a&&(a.a.removeAttribute("src"),a.a.load(),a.a=null);a.j=null;a.c=null;a.h=null;a.f={};a.m={};a.v=null;a.g=
169
+ {};w(l)})}
170
+ p.init=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){if(1==m.a)return d=Pb,t(m,c.A,2);e={};f=q(a.keys());for(g=f.next();!g.done;e={ea:e.ea},g=f.next())e.ea=g.value,h=a.get(e.ea),k=ed(h.mimeType,h.codecs),e.ea==d.aa?df(c,k):(!b&&MediaSource.isTypeSupported(k)||!ic(k,e.ea)||(c.m[e.ea]=new hc,k=jc(e.ea,k)),l=c.j.addSourceBuffer(k),c.b.l(l,"error",function(n){return function(){c.g[n.ea][0].p.reject(new M(2,3,3014,c.a.error?c.a.error.code:0))}}(e)),c.b.l(l,"updateend",function(n){return function(){return ef(c,n.ea)}}(e)),
171
+ c.f[e.ea]=l,c.G[e.ea]=k,c.g[e.ea]=[]);w(m)})};function df(a,b){a.c||(a.c=new Se(a.h));"application/cea-608"!=b&&(a.c.m=Mb(Ue[b]))}function ff(a){return a.j?"ended"==a.j.readyState:!0}function gf(a,b){if("text"==b)var c=a.c.a;else c=hf(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function jf(a,b){return"text"==b?a.c.b:ue(hf(a,b))}
172
+ function kf(a,b,c){if("text"==b)return a=a.c,null==a.b||a.b<c?0:a.b-Math.max(c,a.a);a=hf(a,b);return we(a,c)}p.hc=function(){var a={total:xe(this.a.buffered),audio:xe(hf(this,"audio")),video:xe(hf(this,"video")),text:[]};if(this.c){var b=this.c.a,c=this.c.b;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function hf(a,b){try{return a.f[b].buffered}catch(c){return null}}
173
+ function lf(a,b,c,d,e,f){var g,h,k,l,m;return J(function(n){if(1==n.a){g=Pb;if(b==g.aa)return t(n,Ve(a.c,c,d,e),0);if(a.m[b])return t(n,kc(a.m[b],c),10);if(f&&window.muxjs)return a.c||df(a,"text/vtt"),null==d&&null==e?a.v.init(c):a.v.b(c,function(r){r.length&&Ye(a.c,r,d,e,a.f[g.Da].timestampOffset)}),c=mf(a,c,d,b),t(n,nf(a,b,function(){a.f[b].appendBuffer(c)}),0);c=mf(a,c,d,b);return t(n,nf(a,b,function(){a.f[b].appendBuffer(c)}),0)}h=n.b;a.c||df(a,"text/vtt");h.metadata&&(k=a.f[b].timestampOffset,
174
+ a.I(h.metadata,k,e));h.captions&&h.captions.length&&(l=a.f[g.Da].timestampOffset,Ye(a.c,h.captions,d,e,l));m=h.data;m=mf(a,m,d,b);return t(n,nf(a,b,function(){a.f[b].appendBuffer(m)}),0)})}function of(a,b){var c=jf(a,"video")||0;Xe(a.c,b,c)}p.remove=function(a,b,c){var d=this,e;return J(function(f){e=Pb;return a==e.aa?t(f,d.c.remove(b,c),0):t(f,nf(d,a,function(){c<=b?ef(d,a):d.f[a].remove(b,c)}),0)})};
175
+ function pf(a,b){var c;return J(function(d){c=Pb;return b==c.aa?a.c?t(d,a.c.remove(0,Infinity),0):d["return"]():t(d,nf(a,b,function(){var e=a.j.duration;0>=e?ef(a,b):a.f[b].remove(0,e)}),0)})}p.flush=function(a){var b=this,c;return J(function(d){c=Pb;return a==c.aa?d["return"]():t(d,nf(b,a,function(){b.a.currentTime-=.001;ef(b,a)}),0)})};
176
+ function qf(a,b,c,d,e){var f;return J(function(g){f=Pb;return b==f.aa?(a.c.v=c,We(a.c,d,e),g["return"]()):t(g,Promise.all([nf(a,b,function(){var h=a.f[b].appendWindowStart,k=a.f[b].appendWindowEnd;a.f[b].abort();a.f[b].appendWindowStart=h;a.f[b].appendWindowEnd=k;ef(a,b)}),nf(a,b,function(){var h=c;0>h&&(h+=.001);a.f[b].timestampOffset=h;ef(a,b)}),nf(a,b,function(){a.f[b].appendWindowStart=0;a.f[b].appendWindowEnd=e;a.f[b].appendWindowStart=d;ef(a,b)})]),0)})}
177
+ p.endOfStream=function(a){var b=this;return J(function(c){return t(c,rf(b,function(){ff(b)||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};p.za=function(a){var b=this;return J(function(c){return t(c,rf(b,function(){b.j.duration=a}),0)})};p.getDuration=function(){return this.j.duration};function ef(a,b){var c=a.g[b][0];c&&(c.p.resolve(),sf(a,b))}function nf(a,b,c){Tc(a.F);c={start:c,p:new Rb};a.g[b].push(c);1==a.g[b].length&&tf(a,b);return c.p}
178
+ function rf(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:Tc(a.F);c=[];d={};for(e in a.f)d.vb=new Rb,f={start:function(l){return function(){return l.vb.resolve()}}(d),p:d.vb},a.g[e].push(f),c.push(d.vb),1==a.g[e].length&&f.start(),d={vb:d.vb};x(k,2);return t(k,Promise.all(c),4);case 4:ua(k,3);break;case 2:throw g=C(k),g;case 3:try{b()}catch(l){throw new M(2,3,3015,l);}finally{for(h in a.f)sf(a,h)}w(k)}})}function sf(a,b){a.g[b].shift();tf(a,b)}
179
+ function tf(a,b){var c=a.g[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new M(2,3,3017,b)):c.p.reject(new M(2,3,3015,d)),sf(a,b)}}function mf(a,b,c,d){var e=a.a.mediaKeys;null==c&&e&&(ld()||md("Xbox One"))&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=oe(b));return b}var bf=window.URL.createObjectURL;function uf(a,b){a=S(a);b=S(b);return a.split("-")[0]==b.split("-")[0]}function vf(a,b){a=S(a);b=S(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function wf(a,b){a=S(a);b=S(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function S(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=xf.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function yf(a,b){a=S(a);b=S(b);return b==a?4:vf(b,a)?3:wf(b,a)?2:vf(a,b)?1:0}
180
+ function zf(a){return a.language?S(a.language):a.audio&&a.audio.language?S(a.audio.language):a.video&&a.video.language?S(a.video.language):"und"}
181
+ function Af(a,b){for(var c=S(a),d=new Set,e=q(b),f=e.next();!f.done;f=e.next())d.add(S(f.value));e=q(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=q(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,vf(f,c))return f;e=q(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,wf(f,c))return f;d=q(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,vf(c,f))return f;return null}
182
+ var xf=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",
183
+ "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",
184
+ "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",
185
+ "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",
186
+ "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",
187
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Bf(a,b){function c(l){var m="";l.video&&(m=hd(l.video.codecs));var n="";l.audio&&(n=hd(l.audio.codecs));return m+"-"+n}var d=Cf(a.variants,b),e=new wc;d=q(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c(f);e.push(g,f)}var h=null,k=Infinity;xc(e,function(l,m){for(var n=0,r=0,u=q(m),v=u.next();!v.done;v=u.next())n+=v.value.bandwidth||0,++r;n/=r;n<k&&(h=l,k=n)});a.variants=a.variants.filter(function(l){return c(l)==h?!0:!1})}
188
+ function Df(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
189
+ function Ef(a,b,c){c.variants=c.variants.filter(function(d){if(a&&a.M&&!$d(a,d))return!1;var e=d.audio;d=d.video;return e&&!cf(e)||d&&!cf(d)||e&&b&&b.audio&&!Ff(e,b.audio)||d&&b&&b.video&&!Ff(d,b.video)?!1:!0});c.textStreams=c.textStreams.filter(function(d){return Te(ed(d.mimeType,d.codecs))})}function Ff(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
190
+ function Gf(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=q(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=q(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
191
+ frameRate:null,pixelAspectRatio:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};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=
192
+ c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
193
+ function Hf(a){return{id:a.id,active:!1,type:"text",bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:a.originalId}}
194
+ function If(a){a.__shaka_id||(a.__shaka_id=Jf++);return a.__shaka_id}function Kf(a){var b=Lf(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind]);return b}
195
+ function Lf(a){return{id:If(a),active:!1,type:"",bandwidth:0,language:S(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
196
+ function Mf(a){return a.allowedByApplication&&a.allowedByKeySystem}function Nf(a){return a.filter(function(b){return Mf(b)})}
197
+ function Cf(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=q(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
198
+ function Of(a,b,c){var d=a,e=a.filter(function(h){return h.primary});e.length&&(d=e);var f=d.length?d[0].language:"";d=d.filter(function(h){return h.language==f});if(b){var g=Af(S(b),a.map(function(h){return h.language}));g&&(d=a.filter(function(h){return S(h.language)==g}))}if(c){if(a=Pf(d,c),a.length)return a}else if(a=d.filter(function(h){return 0==h.roles.length}),a.length)return a;a=d.map(function(h){return h.roles}).reduce(Jb,[]);return a.length?Pf(d,a[0]):d}
199
+ function Pf(a,b){return a.filter(function(c){return c.roles.includes(b)})}var Jf=0;function Qf(){this.h=null;this.c=!1;this.a=new Ua;this.b=[];this.g=1;this.j=!1;this.i=this.f=null}p=Qf.prototype;p.stop=function(){this.h=null;this.c=!1;this.b=[];this.g=1;this.f=null};p.init=function(a){this.h=a};
200
+ p.chooseVariant=function(){var a=Rf(this.i.restrictions,this.b),b=this.a.getBandwidthEstimate(this.i.defaultBandwidthEstimate);this.b.length&&!a.length&&(a=Rf(null,this.b),a=[a[0]]);var c=a[0]||null;a=q(jb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.g)?1:Math.abs(this.g);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.i.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.i.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.f=Date.now();return c};
201
+ p.enable=function(){this.c=!0};p.disable=function(){this.c=!1};p.segmentDownloaded=function(a,b){var c=this.a;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.a+=b;Qa(c.b,e,d);Qa(c.c,e,d)}if(null!=this.f&&this.c)a:{if(!this.j){if(!(128E3<=this.a.a))break a;this.j=!0}else if(Date.now()-this.f<1E3*this.i.switchInterval)break a;c=this.chooseVariant();this.a.getBandwidthEstimate(this.i.defaultBandwidthEstimate);c&&this.h(c)}};p.getBandwidthEstimate=function(){return this.a.getBandwidthEstimate(this.i.defaultBandwidthEstimate)};
202
+ p.setVariants=function(a){this.b=a};p.playbackRateChanged=function(a){this.g=a};p.configure=function(a){this.i=a};function Rf(a,b){a&&(b=b.filter(function(c){return Df(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}K("shaka.abr.SimpleAbrManager",Qf);Qf.prototype.configure=Qf.prototype.configure;Qf.prototype.playbackRateChanged=Qf.prototype.playbackRateChanged;Qf.prototype.setVariants=Qf.prototype.setVariants;
203
+ Qf.prototype.getBandwidthEstimate=Qf.prototype.getBandwidthEstimate;Qf.prototype.segmentDownloaded=Qf.prototype.segmentDownloaded;Qf.prototype.disable=Qf.prototype.disable;Qf.prototype.enable=Qf.prototype.enable;Qf.prototype.chooseVariant=Qf.prototype.chooseVariant;Qf.prototype.init=Qf.prototype.init;Qf.prototype.stop=Qf.prototype.stop;function Sf(a,b){this.a=a;this.b=new Set([a]);b=b||[];for(var c=q(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Sf.prototype.add=function(a){return Tf(this.a,a)?(this.b.add(a),!0):!1};function Tf(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!(c.channelsCount==d.channelsCount&&Uf(c,d)&&Vf(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Uf(c,d)&&Vf(c.roles,d.roles)));return c?!1:!0}
204
+ Sf.prototype.values=function(){return this.b.values()};function Uf(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return hd(g)}),d=b.codecs.split(",").map(function(g){return hd(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=q(hb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
205
+ function Vf(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=q(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Wf(a){this.a=a;this.b=new Xf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Wf.prototype.create=function(a){var b=this,c=a.filter(function(d){return Tf(b.a,d)});return c.length?new Sf(c[0],c):this.b.create(a)};function Xf(a,b,c,d){this.c=a;this.f=b;this.a=c;this.b=void 0===d?"":d}
206
+ Xf.prototype.create=function(a){var b=[];b=Yf(a,this.c);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Zf(b,this.f);a.length&&(b=a);this.a&&(a=Cf(b,this.a),a.length&&(b=a));this.b&&(a=$f(b,this.b),a.length&&(b=a));a=new Sf(b[0]);b=q(b);for(c=b.next();!c.done;c=b.next())c=c.value,Tf(a.a,c)&&a.add(c);return a};function Yf(a,b){var c=S(b),d=Af(c,a.map(function(e){return zf(e)}));return d?a.filter(function(e){return d==zf(e)}):[]}
207
+ function Zf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function $f(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function ag(){this.a=bg;this.b=(new Map).set(bg,2).set(cg,1)}function dg(a,b,c){a.b.set(bg,c).set(cg,b)}var cg=0,bg=1;function eg(){}function fg(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.a){if(d&&(e=gg[d.toLowerCase()]))return k["return"](e);if(f=hg(a))if(g=ig[f])return k["return"](g);return d?k.u(2):t(k,jg(a,b,c),3)}if(2!=k.a&&(d=k.b)&&(h=gg[d]))return k["return"](h);throw new M(2,4,4E3,a);})}
208
+ function jg(a,b,c){var d,e,f;return J(function(g){if(1==g.a)return d=Lc([a],c),d.method="HEAD",t(g,b.request(0,d).promise,2);e=g.b;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function hg(a){a=(new rb(a)).ka.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",eg);eg.unregisterParserByMime=function(a){delete gg[a]};eg.registerParserByMime=function(a,b){gg[a]=b};
209
+ eg.registerParserByExtension=function(a,b){ig[a]=b};var gg={},ig={};function kg(a,b,c){this.c=a;this.b=b;this.a=c}kg.prototype.Hb=function(){return this.b};kg.prototype.Db=function(){return this.a};function lg(a,b){return a&&b?a.Hb()==b.Hb()&&a.Db()==b.Db()&&Ec(a.c(),b.c()):a==b}K("shaka.media.InitSegmentReference",kg);kg.prototype.getEndByte=kg.prototype.Db;kg.prototype.getStartByte=kg.prototype.Hb;
210
+ function mg(a,b,c,d,e,f,g,h,k){this.startTime=a;this.endTime=b;this.c=c;this.b=d;this.a=e;this.f=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k}mg.prototype.Ae=function(){return this.startTime};mg.prototype.ne=function(){return this.endTime};mg.prototype.Hb=function(){return this.b};mg.prototype.Db=function(){return this.a};K("shaka.media.SegmentReference",mg);mg.prototype.getEndByte=mg.prototype.Db;mg.prototype.getStartByte=mg.prototype.Hb;mg.prototype.getEndTime=mg.prototype.ne;
211
+ mg.prototype.getStartTime=mg.prototype.Ae;function T(a,b,c){this.f=a;this.qc=b;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.j=0;this.m=!0;this.v=0;this.A=void 0===c?!0:c}p=T.prototype;p.getDuration=function(){return this.g};p.se=function(){return this.a};p.za=function(a){this.g=a};p.ze=function(){return this.f};p.Td=function(a){this.j=a};p.Pb=function(a){this.m=a};p.od=function(a){this.h=a};p.bf=function(a){this.qc=a};p.me=function(){return this.qc};
212
+ p.ob=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Yc(a[0].startTime);this.a=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.a);this.b=Math.max(this.b,b);null!=this.f&&this.A&&(this.f=(Date.now()+this.j)/1E3-this.b-this.a)}};p.Yc=function(a){this.c=null==this.c?a:Math.min(this.c,a)};p.Xc=function(a){this.a=Math.max(this.a,a)};p.offset=function(a){null!=this.c&&(this.c+=a);null!=this.b&&(this.b+=a)};p.S=function(){return Infinity==this.g&&!this.m};
213
+ p.Ua=function(){return Infinity!=this.g&&!this.m};p.Ra=function(){return Math.max(this.v,this.Ga()-this.h)};p.Ud=function(a){this.v=a};p.Ga=function(){return this.S()||this.Ua()?Math.min(Math.max(0,(Date.now()+this.j)/1E3-this.a-this.f),this.g):this.g};p.Gb=function(a){var b=Math.max(this.c,this.v);return Infinity==this.h?b:Math.max(b,Math.min(this.Ga()-this.h+a,this.Fa()))};p.kb=function(){return this.Gb(0)};p.Fa=function(){return Math.max(0,this.Ga()-(this.S()||this.Ua()?this.qc:0))};
214
+ p.Xd=function(){return null==this.f||null!=this.b&&this.A?!1:!0};K("shaka.media.PresentationTimeline",T);T.prototype.usingPresentationStartTime=T.prototype.Xd;T.prototype.getSeekRangeEnd=T.prototype.Fa;T.prototype.getSeekRangeStart=T.prototype.kb;T.prototype.getSafeSeekRangeStart=T.prototype.Gb;T.prototype.getSegmentAvailabilityEnd=T.prototype.Ga;T.prototype.setUserSeekStart=T.prototype.Ud;T.prototype.getSegmentAvailabilityStart=T.prototype.Ra;T.prototype.isInProgress=T.prototype.Ua;
215
+ T.prototype.isLive=T.prototype.S;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Xc;T.prototype.notifyMinSegmentStartTime=T.prototype.Yc;T.prototype.notifySegments=T.prototype.ob;T.prototype.getDelay=T.prototype.me;T.prototype.setDelay=T.prototype.bf;T.prototype.setSegmentAvailabilityDuration=T.prototype.od;T.prototype.setStatic=T.prototype.Pb;T.prototype.setClockOffset=T.prototype.Td;T.prototype.getPresentationStartTime=T.prototype.ze;
216
+ T.prototype.setDuration=T.prototype.za;T.prototype.getMaxSegmentDuration=T.prototype.se;T.prototype.getDuration=T.prototype.getDuration;function ng(a,b){this.g=a;this.h=og(a);this.a=a.a.currentTime;this.f=Date.now()/1E3;this.b=!1;this.j=b;this.c=function(){}}ng.prototype.release=function(){this.g=null;this.c=function(){}};function pg(a,b){a.c=b}function qg(a){this.a=a}function og(a){if(a.a.paused||0==a.a.playbackRate||0==a.a.buffered.length)var b=!1;else a:{b=a.a.currentTime;a=q(xe(a.a.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};function rg(a,b,c,d,e){var f=this;this.a=a;this.A=b;this.i=c;this.v=e;this.b=new Uc;this.j=!1;this.m=a.readyState;this.f=!1;this.c=d;this.h=!1;this.b.l(a,"waiting",function(){return sg(f)});this.g=(new N(function(){sg(f)})).ra(.25)}rg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.g&&(this.g.stop(),this.g=null);this.c&&(this.c.release(),this.c=null);this.a=this.A=this.v=null};rg.prototype.bd=function(){this.h=!0;sg(this)};
217
+ function sg(a){if(0!=a.a.readyState){if(a.a.seeking){if(!a.j)return}else a.j=!1;if(!a.a.paused){a.a.readyState!=a.m&&(a.f=!1,a.m=a.a.readyState);var b;if(!(b=!a.c)){b=a.c;var c=b.g,d=og(c),e=c.a.currentTime,f=Date.now()/1E3;if(b.a!=e||b.h!=d)b.f=f,b.a=e,b.h=d,b.b=!1;e=f-b.f;if(d=e>=b.j&&d&&!b.b)b.c(b.a,e),b.b=!0,b.a=c.a.currentTime;b=!d}if(b){var g=a.i.smallGapLimit;e=a.a.currentTime;b=a.a.buffered;c=ye(b,e);if(!(null==c||0==c&&!a.h||(d=b.start(c),d>=a.A.Fa()))){f=d-e;g=f<=g;var h=!1;.001>f||(g||
218
+ a.f||(a.f=!0,e=new Q("largegap",{currentTime:e,gapSize:f}),e.cancelable=!0,a.v(e),a.i.jumpLargeGaps&&!e.defaultPrevented&&(h=!0)),!g&&!h)||(0!=c&&b.end(c-1),a.a.currentTime=d)}}}}};function tg(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ug.value().get(b),c.ia(a,b,d))}var ug=new Sb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function vg(a,b,c){var d=this;this.a=a;this.g=b;this.f=c;this.h=!1;this.b=new Uc;this.c=new wg(a);tg(this.a,HTMLMediaElement.HAVE_METADATA,this.b,function(){xg(d,d.f)})}vg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.g=function(){};this.a=null};function yg(a){return a.h?a.a.currentTime:a.f}function zg(a,b){0<a.a.readyState?Ag(a.c,b):tg(a.a,HTMLMediaElement.HAVE_METADATA,a.b,function(){xg(a,a.f)})}
219
+ function xg(a,b){.001>Math.abs(a.a.currentTime-b)?Bg(a):(a.b.ia(a.a,"seeking",function(){Bg(a)}),Ag(a.c,0==a.a.currentTime?b:a.a.currentTime))}function Bg(a){a.h=!0;a.b.l(a.a,"seeking",function(){return a.g()})}function wg(a){var b=this;this.b=a;this.h=10;this.g=this.f=this.c=0;this.a=new N(function(){0>=b.c?b.a.stop():b.b.currentTime!=b.f?b.a.stop():(b.b.currentTime=b.g,b.c--)})}wg.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
220
+ function Ag(a,b){a.f=a.b.currentTime;a.g=b;a.c=a.h;a.b.currentTime=b;a.a.ra(.1)};function Cg(a){function b(){null==c.c?c.f=!0:(c.b.ia(c.a,"seeking",function(){c.f=!0}),c.a.currentTime=Math.max(0,c.a.currentTime+c.c))}var c=this;this.a=a;this.f=!1;this.c=null;this.b=new Uc;tg(this.a,HTMLMediaElement.HAVE_CURRENT_DATA,this.b,function(){b()})}Cg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.a=null};Cg.prototype.m=function(a){this.c=this.f?this.c:a};Cg.prototype.g=function(){return(this.f?this.a.currentTime:this.c)||0};Cg.prototype.v=function(){};
221
+ function Dg(a,b,c,d,e,f){var g=this;this.c=a;this.a=b.presentationTimeline;this.D=b.minBufferTime||0;this.i=c;this.A=e;this.j=null;this.f=new rg(a,b.presentationTimeline,c,Eg(a,c),f);this.b=new vg(a,function(){a:{var h=g.f;h.j=!0;h.h=!1;h.f=!1;var k=yg(g.b);h=Ig(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.j||g.j<k-1)){g.j=k;zg(g.b,h);h=void 0;break a}g.A();h=void 0}return h},Jg(this,d));this.h=(new N(function(){if(0!=g.c.readyState&&!g.c.paused){var h=yg(g.b),k=g.a.kb(),l=g.a.Fa();3>l-k&&(k=
222
+ l-3);h<k&&(h=Ig(g,h),g.c.currentTime=h)}})).ra(.25)}Dg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.f&&(this.f.release(),this.f=null);this.h&&(this.h.stop(),this.h=null);this.c=this.b=this.a=this.i=null;this.A=function(){}};Dg.prototype.m=function(a){zg(this.b,a)};Dg.prototype.g=function(){var a=yg(this.b);return 0<this.c.readyState&&!this.c.paused?Kg(this,a):a};
223
+ function Jg(a,b){null==b?b=Infinity>a.a.getDuration()?a.a.kb():a.a.Fa():0>b&&(b=a.a.Fa()+b);return Lg(a,Kg(a,b))}Dg.prototype.v=function(){this.f.bd()};function Lg(a,b){var c=a.a.getDuration();return b>=c?c-a.i.durationBackoff:b}function Ig(a,b){var c=Math.max(a.D,a.i.rebufferingGoal),d=a.i.safeSeekOffset,e=a.a.kb(),f=a.a.Fa(),g=a.a.getDuration();3>f-e&&(e=f-3);var h=a.a.Gb(c),k=a.a.Gb(d);c=a.a.Gb(c+d);return b>=g?Lg(a,b):b>f?f:b<e?ve(a.c.buffered,k)?k:c:b>=h||ve(a.c.buffered,b)?b:c}
224
+ function Kg(a,b){var c=a.a.kb();if(b<c)return c;c=a.a.Fa();return b>c?c:b}function Eg(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ng(new qg(a),b.stallThreshold);pg(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function V(a){this.a=a;this.b=null;this.c=0;this.f=!1}p=V.prototype;p.destroy=function(){Fb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};p.release=function(){this.f||(this.a=[],this.b&&this.b.stop(),this.b=null)};p.Ie=function(){this.f=!0};p.find=function(a){for(var b=this.a.length-1;0<=b;--b){var c=this.a[b];if(a>=c.startTime&&a<c.endTime)return b+this.c}return this.a.length&&a<this.a[0].startTime?this.c:null};
225
+ p.get=function(a){if(0==this.a.length)return null;a-=this.c;return 0>a||a>=this.a.length?null:this.a[a]};p.offset=function(a){if(!this.f)for(var b=q(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};p.mb=function(a){!this.f&&a.length&&(this.a=this.a.filter(function(b){return b.startTime<a[0].startTime}),this.a.push.apply(this.a,ia(a)))};p.Pa=function(a){if(!this.f){var b=this.a.length;this.a=this.a.filter(function(c){return c.endTime>a});this.c+=b-this.a.length}};
226
+ p.La=function(a,b){if(!this.f){for(;this.a.length;)if(this.a[this.a.length-1].startTime>=b)this.a.pop();else break;for(;this.a.length;)if(this.a[0].endTime<=a)this.a.shift(),this.c++;else break;if(0!=this.a.length){var c=this.a[this.a.length-1];this.a[this.a.length-1]=new mg(c.startTime,b,c.c,c.b,c.a,c.f,c.timestampOffset,c.appendWindowStart,c.appendWindowEnd)}}};
227
+ p.sc=function(a,b){var c=this;this.f||(this.b&&this.b.stop(),this.b=new N(function(){var d=b();d?c.a.push.apply(c.a,ia(d)):(c.b.stop(),c.b=null)}),this.b.ra(a))};V.prototype[Symbol.iterator]=function(){return this.jb(0)};V.prototype.jb=function(a){return new Mg(this,this.find(a)||0)};function Ng(a,b,c){return new V([new mg(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",V);V.forSingleSegment=Ng;V.prototype.getIteratorForTime=V.prototype.jb;V.prototype.updateEvery=V.prototype.sc;
228
+ V.prototype.fit=V.prototype.La;V.prototype.evict=V.prototype.Pa;V.prototype.merge=V.prototype.mb;V.prototype.offset=V.prototype.offset;V.prototype.get=V.prototype.get;V.prototype.find=V.prototype.find;V.prototype.markImmutable=V.prototype.Ie;V.prototype.release=V.prototype.release;V.prototype.destroy=V.prototype.destroy;function Mg(a,b){this.b=a;this.a=b}Mg.prototype.seek=function(a){this.a=this.b.jb(a).a;return this.next().value};Mg.prototype.current=function(){return this.b.get(this.a-1)};
229
+ Mg.prototype.next=function(){var a=this.b.get(this.a++);return{value:a,done:!a}};K("shaka.media.SegmentIterator",Mg);Mg.prototype.next=Mg.prototype.next;Mg.prototype.current=Mg.prototype.current;Mg.prototype.seek=Mg.prototype.seek;function Og(){V.call(this,[]);this.g=[]}pa(Og,V);p=Og.prototype;p.clone=function(){var a=new Og;a.g=this.g.slice();return a};p.release=function(){for(var a=q(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};
230
+ p.find=function(a){for(var b=0,c=q(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.c+d.a.length}return null};p.get=function(a){for(var b=0,c=q(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.c+d.a.length}return null};p.offset=function(){};p.mb=function(){};p.Pa=function(){};p.La=function(){};p.sc=function(){};K("shaka.media.MetaSegmentIndex",Og);Og.prototype.updateEvery=Og.prototype.sc;Og.prototype.fit=Og.prototype.La;
231
+ Og.prototype.evict=Og.prototype.Pa;Og.prototype.merge=Og.prototype.mb;Og.prototype.offset=Og.prototype.offset;Og.prototype.get=Og.prototype.get;Og.prototype.find=Og.prototype.find;Og.prototype.release=Og.prototype.release;function Pg(a){var b=this;this.a=a;this.f=!1;this.b=this.a.jc();this.c=new N(function(){b.a.Jd(.25*b.b)})}Pg.prototype.release=function(){this.c&&(this.c.stop(),this.c=null);this.a=null};Pg.prototype.set=function(a){this.b=a;Qg(this)};function Qg(a){a.c.stop();var b=a.f?0:a.b;if(0<=b)try{a.a.jc()!=b&&a.a.nd(b);return}catch(c){}a.c.ra(.25);0!=a.a.jc()&&a.a.nd(0)};function Rg(a){var b=this;this.c=a;this.a=new Set;this.b=(new N(function(){Sg(b,!1)})).ra(.25)}Rg.prototype.release=function(){this.b.stop();for(var a=q(this.a),b=a.next();!b.done;b=a.next())b.value.release();this.a.clear()};
232
+ function Sg(a,b){for(var c=q(a.a),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.c.currentTime,f=b,g=q(d.g.a),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.f.get(h),l=e<h.startTime?Tg:e>h.endTime?Ug:Vg;d.f.set(h,l);for(var m=q(d.h),n=m.next();!n.done;n=m.next())n=n.value,n.bb==k&&n.ab==l&&n.Ta(h,f)}}};function Wg(a){var b=this;this.b=function(){};this.a=new Set;this.f=a;this.c=(new N(function(){for(var c=b.f(),d=q(b.a),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.a["delete"](e)})).ra(2)}Wg.prototype.release=function(){this.b=function(){};this.a.clear();this.c.stop()};function Xg(a,b){a.b=b};function Yg(a){var b=this;this.g=a;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.h=[{bb:null,ab:Vg,Ta:function(c,d){return b.a(c,d)}},{bb:Tg,ab:Vg,Ta:function(c,d){return b.a(c,d)}},{bb:Ug,ab:Vg,Ta:function(c,d){return b.a(c,d)}},{bb:Vg,ab:Tg,Ta:function(c,d){return b.b(c,d)}},{bb:Vg,ab:Ug,Ta:function(c,d){return b.b(c,d)}},{bb:Tg,ab:Ug,Ta:function(c,d){return b.c(c,d)}},{bb:Ug,ab:Tg,Ta:function(c,d){return b.c(c,d)}}]}
233
+ Yg.prototype.release=function(){this.g=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};function Zg(a,b,c,d){a.a=b;a.b=c;a.c=d}var Tg=1,Vg=2,Ug=3;function $g(a,b,c,d){a=Lc(a,d);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ah(a,b){var c=this;this.s=b;this.o=a;this.i=null;this.f=1;this.c=this.b=null;this.a=new Map;this.h=!1;this.j=null;this.g=!1;this.F=new Sc(function(){return bh(c)})}ah.prototype.destroy=function(){return this.F.destroy()};function bh(a){var b,c,d,e;return J(function(f){if(1==f.a){b=[];c=q(a.a.values());for(d=c.next();!d.done;d=c.next())e=d.value,ch(e),b.push(dh(e));return t(f,Promise.all(b),2)}a.a.clear();a.s=null;a.o=null;a.i=null;w(f)})}
234
+ ah.prototype.configure=function(a){this.i=a;this.j=new mc({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0},!0)};ah.prototype.start=function(){var a=this;return J(function(b){if(1==b.a)return t(b,eh(a),2);Tc(a.F);a.h=!0;w(b)})};
235
+ function fh(a,b){var c,d,e,f,g,h;J(function(k){switch(k.a){case 1:return c=Pb,x(k,2),t(k,pf(a.s.L,c.aa),4);case 4:ua(k,3);break;case 2:if(d=C(k),a.s)a.s.onError(d);case 3:e=ed(b.mimeType,b.codecs);df(a.s.L,e);f=a.s.L.h;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=gh(b),a.a.set(c.aa,h),hh(a,h,0);w(k)}})}function ih(a){var b=a.a.get("text");b&&(ch(b),dh(b)["catch"](function(){}),a.a["delete"]("text"));a.c=null}
236
+ function jh(a,b){var c=a.a.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Ya&&(kh(a,e,!1,0,!1),c.Ya=d)}else if(d=c.Ya)c.Ya=null,kh(a,d,!0,0,!1)}}function lh(a,b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;a.b=b;a.h&&(b.video&&kh(a,b.video,c,d,!1),b.audio&&kh(a,b.audio,c,d,!1))}function mh(a,b){a.c=b;a.h&&kh(a,b,!0,0,!1)}
237
+ function kh(a,b,c,d,e){var f=a.a.get(b.type);f||"text"!=b.type?f&&(f.Ya&&(b.trickModeVideo?(f.Ya=b,b=b.trickModeVideo):f.Ya=null),f.stream!=b||e)&&("text"==b.type&&df(a.s.L,ed(b.mimeType,b.codecs)),f.stream=b,f.ma=null,c&&(f.Ab?f.vc=!0:f.Ma?(f.$a=!0,f.ec=d,f.vc=!0):(ch(f),nh(a,f,!0,d)["catch"](function(g){if(a.s)a.s.onError(g)}))),oh(a,f)["catch"](function(g){if(a.s)a.s.onError(g)})):fh(a,b)}
238
+ function oh(a,b){var c,d;return J(function(e){if(1==e.a){if(!b.ja)return e["return"]();c=b.stream;d=b.ja;return c.segmentIndex?e.u(2):t(e,c.createSegmentIndex(),2)}if(b.ja!=d||b.stream!=c)return e["return"]();var f=a.s.ic();var g=jf(a.s.L,b.type),h=b.stream.segmentIndex.find(b.pa?b.pa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.a?k.a-k.b:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.f)&&(h+=(k.a?k.a-k.b:null)||0),k=a.s.getBandwidthEstimate(),f=8*h/
239
+ k<(g||0)-f-Math.max(a.o.minBufferTime||0,a.i.rebufferingGoal)||b.ja.b.a>h?!0:!1):f=!1;f&&b.ja.abort();w(e)})}function ph(a,b){b.Ab||b.$a||(b.Ma?(b.$a=!0,b.ec=0):null==gf(a.s.L,b.type)?null==b.Ja&&hh(a,b,0):(ch(b),nh(a,b,!1,0)["catch"](function(c){if(a.s)a.s.onError(c)})))}
240
+ function eh(a){var b,c,d,e,f,g,h,k,l,m;return J(function(n){if(1==n.a){b=Pb;if(!a.b)throw new M(2,5,5006);c=new Map;d=new Set;a.b.audio&&(c.set(b.fb,a.b.audio),d.add(a.b.audio));a.b.video&&(c.set(b.Da,a.b.video),d.add(a.b.video));a.c&&(c.set(b.aa,a.c),d.add(a.c));e=a.s.L;f=a.i.forceTransmuxTS;return t(n,e.init(c,f),2)}Tc(a.F);var r=a.o.presentationTimeline.getDuration();Infinity>r?a.s.L.za(r):a.s.L.za(Math.pow(2,32));g=q(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.a.has(k)||
241
+ (m=gh(l),a.a.set(k,m),hh(a,m,0));w(n)})}function gh(a){return{stream:a,type:a.type,ma:null,pa:null,lc:null,Vc:null,Uc:null,Tc:null,Ya:null,endOfStream:!1,Ma:!1,Ja:null,$a:!1,ec:0,vc:!1,Ab:!1,fd:!1,Ib:!1,ja:null}}
242
+ ah.prototype.Kb=function(a){var b=this,c,d,e,f,g;return J(function(h){switch(h.a){case 1:Tc(b.F);if(a.Ma||null==a.Ja||a.Ab)return h["return"]();a.Ja=null;if(!a.$a){h.u(2);break}return t(h,nh(b,a,a.vc,a.ec),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.u(4);break}c=a.stream;return t(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.Ja&&hh(b,a,0),h["return"]();case 4:x(h,6);d=qh(b,a);null!=d&&(hh(b,a,d),a.Ib=!1);ua(h,7);break;case 6:return e=C(h),t(h,rh(b,e),
243
+ 8);case 8:return h["return"]();case 7:f=Array.from(b.a.values());if(!b.h||!f.every(function(k){return k.endOfStream})){h.u(0);break}return t(h,b.s.L.endOfStream(),10);case 10:Tc(b.F),g=b.s.L.getDuration(),0!=g&&g<b.o.presentationTimeline.getDuration()&&b.o.presentationTimeline.za(g),w(h)}})};
244
+ function qh(a,b){if(sh(b))return of(a.s.L,b.stream.originalId||""),null;var c=a.s.ic(),d=b.pa?b.pa.endTime:c,e=kf(a.s.L,b.type,c),f=Math.max(a.o.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.f;if(d>=a.o.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.a.get("text"))&&sh(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=jf(a.s.L,b.type);e=th(a,b,c,e);if(!e||!uh(a,e))return 1;f=Infinity;var g=Array.from(a.a.values());g=q(g);for(var h=g.next();!h.done;h=
245
+ g.next())h=h.value,sh(h)||(f=Math.min(f,h.pa?h.pa.endTime:c));if(d>=f+a.o.presentationTimeline.a)return 1;vh(a,b,c,e)["catch"](function(){});return null}function th(a,b,c,d){if(b.ma)return b.ma.current();if(b.pa||d)return b.ma=b.stream.segmentIndex.jb(b.pa?b.pa.endTime:d),b.ma.next().value;b.ma=b.stream.segmentIndex.jb(Math.max(c-a.i.inaccurateManifestTolerance,0));d=b.ma.next().value;d&&uh(a,d)||(b.ma=b.stream.segmentIndex.jb(c),d=b.ma.next().value);return d}
246
+ function uh(a,b){var c=a.o.presentationTimeline,d=c.Ga();return b.endTime<c.Ra()||b.startTime>d?!1:!0}
247
+ function vh(a,b,c,d){var e,f,g,h,k,l,m,n,r;return J(function(u){switch(u.a){case 1:return e=Pb,f=b.stream,g=b.ma,b.Ma=!0,h=wh(a,b,d),k=xh(a,b,d),x(u,2),t(u,Promise.all([h,k]),4);case 4:return l=u.b,Tc(a.F),a.g?u["return"]():b.$a?(b.Ma=!1,hh(a,b,0),u["return"]()):t(u,yh(a,b,c,f,d,l[1]),5);case 5:Tc(a.F);if(a.g)return u["return"]();b.pa=d;g.next();b.Ma=!1;b.fd=!1;m=a.s.L.hc();n=m[b.type];JSON.stringify(n);b.$a||a.s.bd();hh(a,b,0);ua(u,0);break;case 2:r=C(u);Tc(a.F,r);if(a.g)return u["return"]();b.Ma=
248
+ !1;if(b.type==e.aa&&a.i.ignoreTextStreamFailures)a.a["delete"](e.aa),u.u(0);else if(7001==r.code)b.Ma=!1,b.Ja=null,hh(a,b,0),u.u(0);else if(3017==r.code)zh(a,b,r),u.u(0);else return b.Ib=!0,r.severity=2,t(u,rh(a,r),0)}})}function zh(a,b,c){if(!Array.from(a.a.values()).some(function(e){return e!=b&&e.fd})){var d=Math.round(100*a.f);if(20<d)a.f-=.2;else if(4<d)a.f-=.04;else{b.Ib=!0;a.g=!0;a.s.onError(c);return}b.fd=!0}hh(a,b,4)}
249
+ function wh(a,b,c){var d,e,f,g,h,k,l;return J(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Vc||e!=b.Uc||f!=b.Tc)h=function(){var n;return J(function(r){if(1==r.a)return x(r,2),b.Uc=e,b.Tc=f,b.Vc=g,t(r,qf(a.s.L,b.type,g,e,f),4);if(2!=r.a)return ua(r,0);n=C(r);b.Uc=null;b.Tc=null;b.Vc=null;throw n;})},d.push(h());!lg(c.f,b.lc)&&(b.lc=c.f)&&(k=xh(a,b,c.f),l=function(){var n,r,u;return J(function(v){switch(v.a){case 1:return x(v,2),t(v,k,4);
250
+ case 4:return n=v.b,Tc(a.F),r=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,t(v,lf(a.s.L,b.type,n,null,null,r),5);case 5:ua(v,0);break;case 2:throw u=C(v),b.lc=null,u;}})},d.push(l()));return t(m,Promise.all(d),0)})}
251
+ function yh(a,b,c,d,e,f){var g;return J(function(h){if(1==h.a)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new fe).V("emsg",function(k){var l=d.emsgSchemeIdUris,m=k.reader.dd(),n=k.reader.dd(),r=k.reader.K(),u=k.reader.K(),v=k.reader.K(),A=k.reader.K();k=k.reader.Wa(k.reader.P.byteLength-k.reader.C);var y=e.startTime+u/r;l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.s.Me():(l=new Q(Ah,{detail:{startTime:y,endTime:y+v/r,schemeIdUri:m,
252
+ value:n,timescale:r,presentationTimeDelta:u,eventDuration:v,id:A,messageData:k}}),a.s.onEvent(l)))}).parse(f),t(h,Bh(a,b,c),2);if(3!=h.a)return Tc(a.F),t(h,lf(a.s.L,b.type,f,e.startTime,e.endTime,g),3);Tc(a.F);w(h)})}function Bh(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a){d=Math.max(a.i.bufferBehind,a.o.presentationTimeline.a);e=gf(a.s.L,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():t(h,a.s.L.remove(b.type,e,e+g),2)}Tc(a.F);w(h)})}
253
+ function sh(a){return a&&"text"==a.type&&"application/cea-608"==a.stream.mimeType}function xh(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a)return d=Rc,e=$g(c.c(),c.b,c.a,a.i.retryParameters),f=a.s.nb.request(d,e),b.ja=f,t(h,f.promise,2);g=h.b;b.ja=null;return h["return"](g.data)})}
254
+ function nh(a,b,c,d){var e,f;return J(function(g){if(1==g.a)return b.$a=!1,b.vc=!1,b.ec=0,b.Ab=!0,b.pa=null,b.lc=null,b.ma=null,d?(e=a.s.ic(),f=a.s.L.getDuration(),t(g,a.s.L.remove(b.type,e+d,f),3)):t(g,pf(a.s.L,b.type),4);if(3!=g.a)return Tc(a.F),c?t(g,a.s.L.flush(b.type),3):g.u(3);Tc(a.F);b.Ab=!1;b.endOfStream=!1;hh(a,b,0);w(g)})}
255
+ function hh(a,b,c){var d=b.type;if("text"!=d||a.a.has(d))b.Ja=(new lc(function(){var e;return J(function(f){if(1==f.a)return x(f,2),t(f,a.Kb(b),4);if(2!=f.a)return ua(f,0);e=C(f);if(a.s)a.s.onError(e);w(f)})})).R(c)}function ch(a){null!=a.Ja&&(a.Ja.stop(),a.Ja=null)}function dh(a){return J(function(b){return a.ja?t(b,a.ja.abort(),0):b.u(0)})}function rh(a,b){return J(function(c){if(1==c.a)return t(c,oc(a.j),2);Tc(a.F);a.s.onError(b);b.handled||a.i.failureCallback(b);w(c)})};function Ch(a,b){var c=Dh(),d=this;this.h=b;this.c=a;this.f=c;this.j=null;this.g=[];this.b=this.a=null;this.m=Promise.resolve().then(function(){return Eh(d)});this.F=new Sc(function(){return Fh(d)})}Ch.prototype.destroy=function(){return this.F.destroy()};function Fh(a){var b,c,d;return J(function(e){if(1==e.a)return a.b&&a.b.abort(),Gh(a),t(e,a.m,2);a.a&&a.a.xa.Va();b=q(a.g);for(c=b.next();!c.done;c=b.next())d=c.value,d.xa.Va();a.a=null;a.g=[];a.h=null;w(e)})}
256
+ function Hh(a,b){var c={pb:function(){},mc:function(){},Va:function(){},onError:function(){},oc:function(){},Qf:function(){}};a.g.push({create:b,xa:c});a.b&&a.b.abort();Gh(a);return c}
257
+ function Eh(a){return J(function(b){if(a.F.a)b=b.u(0);else{if(0==a.g.length||a.a&&!a.a.Sa)var c=!1;else{a.a&&(a.a.xa.Va(),a.a=null);c=a.g.shift();var d=c.create(a.f);d?(c.xa.pb(),a.a={node:d.node,payload:d.payload,Sa:d.Sa,xa:c.xa}):c.xa.oc();c=!0}c?c=Promise.resolve():a.a?c=Ih(a):(a.h.Le(a.c),a.j=new Rb,c=a.j);b=t(b,c,1)}return b})}
258
+ function Ih(a){var b,c;return J(function(d){switch(d.a){case 1:return a.c=a.h.ue(a.c,a.f,a.a.node,a.a.payload),x(d,2),a.b=a.h.je(a.c,a.f,a.a.payload),t(d,a.b.promise,4);case 4:a.b=null;a.c==a.a.node&&(a.a.xa.mc(),a.a=null);ua(d,0);break;case 2:b=C(d);if(7001==b.code)a.a.xa.Va();else a.a.xa.onError(b);a.a=null;a.b=null;c=a;return t(d,a.h.handleError(a.f,b),5);case 5:c.c=d.b,w(d)}})}function Gh(a){a.j&&(a.j.resolve(),a.j=null)};function Jh(a){this.a=null;for(var b=q(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.a=c);this.a||(this.a=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}p=Jh.prototype;p.remove=function(a,b){if(!this.a)return!1;Kh(this.a,function(c){return c.startTime<b&&c.endTime>a});return!0};
259
+ p.append=function(a){function b(g){return g.spacer?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):g.payload}var c=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.a.cues?Array.from(this.a.cues):[];var e={};c=q(c);for(var f=c.next();!f.done;e={cb:e.cb},f=c.next())e.cb=f.value,a.some(function(g){return function(h){return h.startTime==g.cb.startTime&&h.endTime==g.cb.endTime&&h.text==g.cb.payload?!0:!1}}(e))||(f=Lh(e.cb))&&
260
+ d.push(f);a=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)-d.indexOf(h)});a=q(a);for(e=a.next();!e.done;e=a.next())this.a.addCue(e.value)};p.destroy=function(){this.a&&(Kh(this.a,function(){return!0}),this.a.mode="disabled");this.a=null;return Promise.resolve()};p.isTextVisible=function(){return"showing"==this.a.mode};
261
+ p.setTextVisibility=function(a){this.a.mode=a?"showing":"hidden"};
262
+ function Lh(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
263
+ function Kh(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=q(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}K("shaka.text.SimpleTextDisplayer",Jh);Jh.prototype.setTextVisibility=Jh.prototype.setTextVisibility;Jh.prototype.isTextVisible=Jh.prototype.isTextVisible;Jh.prototype.destroy=Jh.prototype.destroy;Jh.prototype.append=Jh.prototype.append;Jh.prototype.remove=Jh.prototype.remove;function Mh(){}function Nh(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",Mh);Mh.removeAllChildren=Nh;function Oh(a,b){var c=this;this.h=!1;this.f=[];this.a=a;this.g=b;this.b=document.createElement("div");this.b.classList.add("shaka-text-container");this.b.style.textAlign="center";this.b.style.display="flex";this.b.style.flexDirection="column";this.b.style.alignItems="center";this.b.style.justifyContent="flex-end";this.g.appendChild(this.b);this.j=(new N(function(){Ph(c)})).ra(.25);this.c=new Map}p=Oh.prototype;
264
+ p.append=function(a){var b=ia(this.f).concat(),c={};a=q(a);for(var d=a.next();!d.done;c={Rb:c.Rb},d=a.next())c.Rb=d.value,b.some(function(e){return function(f){return Le(f,e.Rb)}}(c))||this.f.push(c.Rb);Ph(this)};p.destroy=function(){this.g.removeChild(this.b);this.b=null;this.h=!1;this.f=[];this.j&&this.j.stop();this.c.clear()};p.remove=function(a,b){if(!this.b)return!1;this.f=this.f.filter(function(c){return c.startTime<a||c.endTime>=b});Ph(this);return!0};p.isTextVisible=function(){return this.h};
265
+ p.setTextVisibility=function(a){this.h=a};
266
+ function Ph(a){function b(g){return a.f.includes(g)&&a.h&&g.startTime<=c&&g.endTime>=c}for(var c=a.a.currentTime,d=q(a.c.keys()),e=d.next();!e.done;e=d.next())if(e=e.value,!b(e)){var f=a.c.get(e);a.b.removeChild(f);a.c["delete"](e)}d=new Set(a.c.values());e=q(Array.from(a.b.childNodes));for(f=e.next();!f.done;f=e.next())f=f.value,d.has(f)||a.b.removeChild(f);d=a.f.filter(function(g){return b(g)&&!a.c.has(g)}).sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime-h.endTime});
267
+ d=q(d);for(e=d.next();!e.done;e=d.next())Qh(a,a.b,e.value)}function Rh(a,b,c,d){var e=document.createElement("span");d&&e.classList.add("shaka-nested-cue");Sh(a,e,c,!0);b.appendChild(e);return e}function Qh(a,b,c){if(c.nestedCues.length){var d=document.createElement("p");d.style.width="100%";Sh(a,d,c,!1);for(var e=0;e<c.nestedCues.length;e++)Rh(a,d,c.nestedCues[e],!0);b.appendChild(d);a.c.set(c,d)}else a.c.set(c,Rh(a,b,c,!1))}
268
+ function Sh(a,b,c,d){var e=b.style,f=0==c.nestedCues.length;c.spacer?(e.flexBasis="100%",e.height="0"):(e.whiteSpace="pre-line",b.textContent=c.payload,f&&(e.backgroundColor=c.backgroundColor),e.border=c.border,e.color=c.color,e.direction=c.direction,e.opacity=c.opacity,e.paddingLeft=Th(c.linePadding,c,a.g),e.paddingRight=Th(c.linePadding,c,a.g),c.backgroundImage&&(e.backgroundImage="url('"+c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition="center",
269
+ ""==c.backgroundColor&&(e.backgroundColor="transparent")),c.backgroundImage&&c.region&&(b=c.region.widthUnits==Qe?"%":"px",e.height=c.region.height+(c.region.heightUnits==Qe?"%":"px"),e.width=c.region.width+b),e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end",f?e.display="inline-block":(e.display="flex",e.flexDirection="row",e.flexWrap="wrap",e.margin="0",e.alignItems=e.justifyContent,e.justifyContent="center"),d&&(e.maxWidth="100%"),e.fontFamily=
270
+ c.fontFamily,e.fontWeight=c.fontWeight.toString(),e.fontStyle=c.fontStyle,e.letterSpacing=c.letterSpacing,e.fontSize=Th(c.fontSize,c,a.g),c.line?1==c.lineInterpretation&&(e.position="absolute",c.writingMode==Fe?c.lineAlign==He?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%"):"vertical-lr"==c.writingMode?c.lineAlign==He?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%"):c.lineAlign==He?e.right=c.line+"%":"end"==c.lineAlign&&(e.left=c.line+"%")):c.region&&c.region.id&&!f&&(a=c.region.widthUnits==
271
+ Qe?"%":"px",d=c.region.viewportAnchorUnits==Qe?"%":"px",e.height=c.region.height+(c.region.heightUnits==Qe?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+d,e.left=c.region.viewportAnchorX+d),e.lineHeight=c.lineHeight,c.position&&(c.writingMode==Fe?e.paddingLeft=c.position:e.paddingTop=c.position),"line-left"==c.positionAlign?e.cssFloat="left":"line-right"==c.positionAlign&&(e.cssFloat="right"),e.textAlign=c.textAlign,e.textDecoration=c.textDecoration.join(" "),
272
+ e.writingMode=c.writingMode,c.size&&(c.writingMode==Fe?e.width=c.size+"%":e.height=c.size+"%"))}function Th(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),gf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.gf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}K("shaka.text.UITextDisplayer",Oh);Oh.prototype.setTextVisibility=Oh.prototype.setTextVisibility;
273
+ Oh.prototype.isTextVisible=Oh.prototype.isTextVisible;Oh.prototype.remove=Oh.prototype.remove;Oh.prototype.destroy=Oh.prototype.destroy;Oh.prototype.append=Oh.prototype.append;function Uh(){}
274
+ function Vh(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=zc(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=zc(l)),k=Vh(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Wa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Xa("Unexpected number of arguments for "+k),a[h]=b[h]):(Wa("Invalid config, unrecognized key "+
275
+ k),g=!1)}return g}function Wh(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=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}K("shaka.util.ConfigUtils",Uh);Uh.convertToConfigObject=Wh;Uh.mergeConfigObjects=Vh;function Xh(){}
276
+ function Yh(){var a=1E6,b=Infinity;navigator.connection&&(navigator.connection.downlink&&(a=1E6*navigator.connection.downlink),navigator.connection.saveData&&(b=360));var c={retryParameters:nc(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Td,logLicenseExchange:!1,updateExpirationTime:1},d={retryParameters:nc(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,
277
+ ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},e={retryParameters:nc(),failureCallback:function(h){return[h]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,
278
+ stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2};if(md("Web0S")||ld()||md("CrKey"))e.stallSkip=0;var f={trackSelectionCallback:function(h){return J(function(k){return k["return"](h)})},progressCallback:function(h,k){return[h,k]},usePersistentLicense:!0},g={drm:c,manifest:d,streaming:e,offline:f,abrFactory:function(){return new Qf},abr:{enabled:!0,defaultBandwidthEstimate:a,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,
279
+ minHeight:0,maxHeight:b,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};
280
+ f.trackSelectionCallback=function(h){return J(function(k){return k["return"](Zh(h,g.preferredAudioLanguage))})};return g}function $h(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Vh(a,b,c||Yh(),d,"")}
281
+ function Zh(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Af(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return S(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
282
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=q(a);for(g=d.next();!g.done;g=d.next())g=g.value,"text"==g.type&&c.push(g);return c}K("shaka.util.PlayerConfiguration",Xh);Xh.mergeConfigObjects=$h;function ai(){this.a=null;this.b=[]}function bi(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!=b&&(a.b.push(a.a),a.a={timestamp:c,state:b,duration:0})}}function ci(a,b){var c=0;a.a&&a.a.state==b&&(c+=a.a.duration);for(var d=q(a.b),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
283
+ function di(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=q(a.b),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.a&&c.push(b(a.a));return c};function ei(){this.b=this.c=null;this.a=[]}function fi(a,b,c){a.c!=b&&(a.c=b,a.a.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function gi(a,b,c){a.b!=b&&(a.b=b,a.a.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function hi(){this.g=this.h=this.A=this.m=this.D=this.c=this.v=this.f=this.G=this.I=this.J=this.j=this.M=NaN;this.b=new ai;this.a=new ei};function W(a,b){yc.call(this);var c=this;this.g=ii;this.bc=this.a=null;this.T=!1;this.b=new Uc;this.Hc=this.j=this.xb=this.o=this.$b=this.m=this.c=this.ac=this.D=this.Xb=this.A=this.Ba=this.v=this.G=this.h=this.N=null;this.ud=1E9;this.i=ji(this);this.wc={width:Infinity,height:Infinity};this.f=null;this.yb=new Xf(this.i.preferredAudioLanguage,this.i.preferredVariantRole,this.i.preferredAudioChannelCount);this.da=this.i.preferredTextLanguage;this.Yb=this.i.preferredTextRole;this.Ic=[];b&&b(this);this.N=
284
+ ki(this);this.I=null;li&&(this.I=Mb(li));this.b.l(window,"online",function(){c.gd()});this.fa={name:"detach"};this.Ea={name:"attach"};this.M={name:"unload"};this.Nc={name:"manifest-parser"};this.Mc={name:"manifest"};this.ta={name:"media-source"};this.Jc={name:"drm-engine"};this.J={name:"load"};this.Oc={name:"src-equals-drm-engine"};this.Ca={name:"src-equals"};var d=new Map;d.set(this.Ea,function(e,f){return tc(mi(c,e,f))});d.set(this.fa,function(e){e.B&&(c.b.sa(e.B,"error"),e.B=null);c.a=null;e=Promise.resolve();
285
+ return tc(e)});d.set(this.M,function(e){return tc(ni(c,e))});d.set(this.ta,function(e){e=oi(c,e);return tc(e)});d.set(this.Nc,function(e,f){var g=pi(c,e,f);return tc(g)});d.set(this.Mc,function(e){return qi(c,e)});d.set(this.Jc,function(e){e=ri(c,e);return tc(e)});d.set(this.J,function(e,f){return tc(si(c,e,f))});d.set(this.Oc,function(e){e=ti(c,e);return tc(e)});d.set(this.Ca,function(e,f){return ui(c,e,f)});this.X=new Ch(this.fa,{ue:function(e,f,g,h){var k=null;e==c.fa&&(k=g==c.fa?c.fa:c.Ea);e==
286
+ c.Ea&&(k=g==c.fa||f.B!=h.B?c.fa:g==c.Ea?c.Ea:g==c.ta||g==c.J?c.ta:g==c.Ca?c.Oc:null);e==c.ta&&(k=g==c.J&&f.B==h.B?c.Nc:c.M);e==c.Nc&&(k=vi(c.J,c.Mc,c.M,g,f,h));e==c.Mc&&(k=vi(c.J,c.Jc,c.M,g,f,h));e==c.Jc&&(k=vi(c.J,c.J,c.M,g,f,h));e==c.Oc&&(k=g==c.Ca&&f.B==h.B?c.Ca:c.M);if(e==c.J||e==c.Ca)k=c.M;e==c.M&&(k=h.B&&f.B==h.B?c.Ea:c.fa);return k},je:function(e,f,g){c.dispatchEvent(wi(xi,{state:e.name}));return d.get(e)(f,g)},handleError:function(e){return J(function(f){return 1==f.a?t(f,ni(c,e),2):f["return"](e.B?
287
+ c.Ea:c.fa)})},Le:function(e){c.dispatchEvent(wi(yi,{state:e.name}))}});a&&this.zb(a,!0)}pa(W,yc);function wi(a,b){return new Q(a,b)}p=W.prototype;
288
+ p.destroy=function(){var a=this,b;return J(function(c){switch(c.a){case 1:if(a.g==zi)return c["return"]();a.g=zi;b=Hh(a.X,function(){return{node:a.fa,payload:Dh(),Sa:!1}});return t(c,new Promise(function(d){b.pb=function(){};b.mc=function(){d()};b.Va=function(){d()};b.onError=function(){d()};b.oc=function(){d()}}),2);case 2:return t(c,a.X.destroy(),3);case 3:a.b&&(a.b.release(),a.b=null);a.Hc=null;a.j=null;a.i=null;a.f=null;a.bc=null;if(!a.N){c.u(0);break}return t(c,a.N.destroy(),5);case 5:a.N=null,
289
+ w(c)}})};p.zb=function(a,b){b=void 0===b?!0:b;if(this.g==zi)return Promise.reject(Ai());var c=Dh();c.B=a;id()||(b=!1);var d=b?this.ta:this.Ea,e=Hh(this.X,function(){return{node:d,payload:c,Sa:!1}});e.pb=function(){};return Bi(e)};p.detach=function(){var a=this;if(this.g==zi)return Promise.reject(Ai());var b=Hh(this.X,function(){return{node:a.fa,payload:Dh(),Sa:!1}});b.pb=function(){};return Bi(b)};
290
+ p.sd=function(a){var b=this;a=void 0===a?!0:a;if(this.g==zi)return Promise.reject(Ai());id()||(a=!1);var c=Dh(),d=Hh(this.X,function(e){var f=e.B&&a?b.ta:e.B?b.Ea:b.fa;c.B=e.B;return{node:f,payload:c,Sa:!1}});d.pb=function(){};return Bi(d)};
291
+ p.load=function(a,b,c){var d=this;if(this.g==zi)return Promise.reject(Ai());this.dispatchEvent(wi(Ci));var e=Dh();e.uri=a;e.pd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Di(this,e)?this.Ca:this.J,g=Hh(this.X,function(h){if(null==h.B)return null;e.B=h.B;return{node:f,payload:e,Sa:!0}});this.f=new hi;g.pb=function(){};return new Promise(function(h,k){g.oc=function(){return k(new M(2,7,7002))};g.mc=function(){h();d.dispatchEvent(wi(Ei))};g.Va=function(){return k(Ai())};g.onError=
292
+ function(l){return k(l)}})};
293
+ function Di(a,b){if(!id())return!0;var c=b.mimeType,d=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[hg(d)]);return c?""==(b.B||kd()).canPlayType(c)?!1:id()&&(c in gg||hg(d)in ig)?nd()&&a.i.streaming.useNativeHlsOnSafari:!0:!1}
294
+ function mi(a,b,c){null==b.B&&(b.B=c.B,a.b.l(b.B,"error",function(){var d=Fi(a);d&&Gi(a,d)}));a.a=b.B;return Promise.resolve()}
295
+ function ni(a,b){var c,d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:return a.g!=zi&&(a.g=ii),c=a.Ic.map(function(r){return r()}),a.Ic=[],t(n,Promise.all(c),2);case 2:a.dispatchEvent(wi(Hi));b.mimeType=null;b.startTime=null;b.uri=null;b.B&&(a.b.sa(b.B,"loadedmetadata"),a.b.sa(b.B,"playing"),a.b.sa(b.B,"pause"),a.b.sa(b.B,"ended"),a.b.sa(b.B,"ratechange"));a.Ba&&(a.Ba.release(),a.Ba=null);a.Xb&&(a.Xb.stop(),a.Xb=null);if(!a.m){n.u(3);break}return t(n,a.m.stop(),4);case 4:a.m=null,a.$b=null;
296
+ case 3:if(!a.j){n.u(5);break}return t(n,a.j.stop(),5);case 5:if(!a.c){n.u(7);break}return t(n,a.c.destroy(),8);case 8:a.c=null;case 7:a.A&&(a.A.release(),a.A=null);a.v&&(a.v.release(),a.v=null);if(!a.G){n.u(9);break}return t(n,a.G.destroy(),10);case 10:a.G=null;case 9:if(a.I)a.I.onAssetUnload();if(!b.B||!b.B.src){n.u(11);break}return t(n,new Promise(function(r){return(new N(r)).R(.1)}),12);case 12:b.B.removeAttribute("src"),b.B.load();case 11:if(!a.h){n.u(13);break}return t(n,a.h.destroy(),14);case 14:a.h=
297
+ null;case 13:a.xb=null;a.D=null;if(a.o){d=q(a.o.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=q([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=q(a.o.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.o=null;a.f=new hi;a.Kc=null;Ii(a);w(n)}})}
298
+ function oi(a,b){var c,d,e,f;return J(function(g){if(1==g.a)return c=window.muxjs?new se:new te,d=a.i.textDisplayFactory,e=Mb(d),a.Kc=d,f=Ji(b.B,c,e,function(h,k,l){h=q(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,r=l,u=q(m.frames),v=u.next();!v.done;v=u.next())Ki(a,n,r,"ID3",v.value);if(a.I)a.I.onHlsTimedMetadata(m,n)}}),t(g,f.A,2);a.G=f;w(g)})}
299
+ function pi(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.N,a.xb=d,f=a,t(h,fg(d,e,a.i.manifest.retryParameters,b.mimeType),2);f.$b=h.b;a.m=Mb(a.$b);g=zc(a.i.manifest);c.B&&"AUDIO"===c.B.nodeName&&(g.disableVideo=!0);a.m.configure(g);w(h)})}
300
+ function qi(a,b){var c=b.uri,d=a.N;a.ac=new Wg(function(){return a.hd()});Xg(a.ac,function(g){Li(a,Mi,g);if(a.I)a.I.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return J(function(h){return h["return"](a.gb(g))})},makeTextStreamsForClosedCaptions:function(g){return Ni(a,g)},onTimelineRegionAdded:function(g){var h=a.ac;a:{var k=q(h.a);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
301
+ l;break a}k=null}null==k&&(h.a.add(g),h.b(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Gi(a,g)}},f=Date.now()/1E3;return new pc(function(){var g,h,k,l;return J(function(m){if(1==m.a)return g=a,t(m,a.m.start(c,e),2);g.o=m.b;h=wi(Oi);a.dispatchEvent(h);if(0==a.o.variants.length)throw new M(2,4,4036);Pi(a.o);k=Date.now()/1E3;l=k-f;a.f.v=l;w(m)})}(),function(){return a.m.stop()})}
302
+ function ri(a,b){var c,d;return J(function(e){if(1==e.a)return c=Date.now()/1E3,d=!0,a.h=Qi(a,{nb:a.N,onError:function(f){Gi(a,f)},nc:function(f){Ri(a,f)},onExpirationUpdated:function(f,g){Si(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Ti&&d&&(d=!1,a.f.c=Date.now()/1E3-c)}}),a.h.configure(a.i.drm),t(e,yd(a.h,a.o.variants,a.o.offlineSessionIds),2);if(3!=e.a)return t(e,a.h.zb(b.B),3);a.gb(a.o);w(e)})}
303
+ function si(a,b,c){var d,e,f,g,h,k,l,m,n,r;return J(function(u){switch(u.a){case 1:b.startTime=c.startTime;d=b.B;e=b.uri;a.xb=e;a.A=new Pg({jc:function(){return b.B.playbackRate},nd:function(v){b.B.playbackRate=v},Jd:function(v){b.B.currentTime+=v}});f=function(){return Ui(a)};g=function(){return Vi(a)};a.b.l(d,"playing",f);a.b.l(d,"pause",f);a.b.l(d,"ended",f);a.b.l(d,"ratechange",g);h=a.i.abrFactory;a.j&&a.Hc==h||(a.Hc=h,a.j=Mb(h),"function"!=typeof a.j.playbackRateChanged&&(Fb("AbrManager","Please use an AbrManager with playbackRateChanged function."),
304
+ a.j.playbackRateChanged=function(){}),a.j.configure(a.i.abr));a.yb=new Xf(a.i.preferredAudioLanguage,a.i.preferredVariantRole,a.i.preferredAudioChannelCount);a.da=a.i.preferredTextLanguage;Wi(a.o.presentationTimeline,a.i.playRangeStart,a.i.playRangeEnd);a.j.init(function(v,A,y){A=void 0===A?!1:A;y=void 0===y?0:y;a.c&&v!=a.c.b&&(fi(a.f.a,v,!0),lh(a.c,v,A,y),Xi(a))});a.v=Yi(a,b.startTime);a.Ba=Zi(a);k=Math.max(a.o.minBufferTime,a.i.streaming.rebufferingGoal);$i(a,k);Bf(a.o,a.i.preferredAudioChannelCount);
305
+ a.c=aj(a);a.c.configure(a.i.streaming);a.g=bj;a.dispatchEvent(wi(cj));l=dj(a)?a.j.chooseVariant():null;fi(a.f.a,l,!0);lh(a.c,l,!1,0);(m=Of(a.o.textStreams,a.da,a.Yb)[0]||null)&&gi(a.f.a,m,!0);m?(l.audio&&ej(a,l.audio,m)&&(a.T=!0),a.T&&a.G.h.setTextVisibility(!0),fj(a)):a.T=!1;m&&(a.i.streaming.alwaysStreamText||a.Sc())&&mh(a.c,m);if(!a.i.streaming.startAtSegmentBoundary){u.u(2);break}n=a.v.g();return t(u,gj(l,n),3);case 3:r=u.b,a.v.m(r);case 2:return t(u,a.c.start(),4);case 4:a.i.abr.enabled&&(a.j.enable(),
306
+ hj(a)),a.gb(a.o),ij(a),Xi(a),dj(a),a.o.variants.some(function(v){return v.primary}),a.b.ia(d,"loadedmetadata",function(){a.f.f=Date.now()/1E3-c.pd}),w(u)}})}
307
+ function ti(a,b){var c,d,e,f;return J(function(g){return 1==g.a?(c=Pb,d=Date.now()/1E3,e=!0,a.h=Qi(a,{nb:a.N,onError:function(h){Gi(a,h)},nc:function(h){Ri(a,h)},onExpirationUpdated:function(h,k){Si(a,h,k)},onEvent:function(h){a.dispatchEvent(h);h.type==Ti&&e&&(e=!1,a.f.c=Date.now()/1E3-d)}}),a.h.configure(a.i.drm),f={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"video/mp4",codecs:"",encrypted:!0,
308
+ drmInfos:[],keyIds:new Set,language:"und",label:null,type:c.Da,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0},t(g,yd(a.h,[f],[]),2)):t(g,a.h.zb(b.B),0)})}
309
+ function ui(a,b,c){function d(){return Ui(a)}b.uri=c.uri;b.startTime=c.startTime;a.xb=b.uri;a.v=new Cg(b.B);null!=b.startTime&&a.v.m(b.startTime);a.A=new Pg({jc:function(){return b.B.playbackRate},nd:function(g){b.B.playbackRate=g},Jd:function(g){b.B.currentTime+=g}});$i(a,a.i.streaming.rebufferingGoal);a.b.l(b.B,"playing",d);a.b.l(b.B,"pause",d);a.b.l(b.B,"ended",d);a.b.l(b.B,"ratechange",function(){return Vi(a)});"none"!=a.a.preload&&a.b.ia(a.a,"loadedmetadata",function(){a.f.f=Date.now()/1E3-c.pd});
310
+ a.a.audioTracks&&(a.b.l(a.a.audioTracks,"addtrack",function(){return ij(a)}),a.b.l(a.a.audioTracks,"removetrack",function(){return ij(a)}),a.b.l(a.a.audioTracks,"change",function(){return ij(a)}));a.a.textTracks&&(a.b.l(a.a.textTracks,"addtrack",function(g){ij(a);jj(a,g)}),a.b.l(a.a.textTracks,"removetrack",function(){return ij(a)}),a.b.l(a.a.textTracks,"change",function(){return ij(a)}));b.B.src=b.uri;(ld()||md("Web0S"))&&b.B.load();a.g=kj;a.dispatchEvent(wi(cj));var e=new Rb;tg(a.a,HTMLMediaElement.HAVE_METADATA,
311
+ a.b,function(){e.resolve()});var f=!1;a.Ic.push(function(){f=!0});tg(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.b,function(){var g;return J(function(h){if(1==h.a){if(f)return h["return"]();lj(a);g=mj(a);return g.find(function(k){return"disabled"!=k.mode})?h.u(2):t(h,new Promise(function(k){a.b.ia(a.a.textTracks,"change",k);(new N(k)).R(1)}),2)}if(f)return h["return"]();nj(a);w(h)})});a.a.error?e.reject(Fi(a)):"none"==a.a.preload&&(Xa('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.'),
312
+ e.resolve());a.b.ia(a.a,"error",function(){e.reject(Fi(a))});return new pc(e,function(){e.reject(new M(2,7,7001));return Promise.resolve()})}function lj(a){var b=a.i.preferredAudioLanguage;if(""!=b){a.jd(b);var c=a.i.preferredVariantRole;""!=c&&a.jd(b,c)}}function nj(a){var b=a.i.preferredTextLanguage;if(""!=b){a.kd(b);var c=a.i.preferredTextRole;""!=c&&a.kd(b,c)}}
313
+ function jj(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.b.l(c,"cuechange",function(){if(c.activeCues)for(var d=q(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ki(a,e.startTime,e.endTime,e.type,e.value),a.I)a.I.onCueMetadataChange(e.value)}),(new N(function(){var d=oj(a);d=q(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Qb().R(.5))}function Ki(a,b,c,d,e){a.dispatchEvent(wi(pj,{startTime:b,endTime:c,Of:d,payload:e}))}
314
+ function Pi(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))}function Qi(a,b){return new rd(b,a.i.drm.updateExpirationTime)}function ki(a){return new Hc(function(b,c){a.j&&a.j.segmentDownloaded(b,c)})}
315
+ function Yi(a,b){return new Dg(a.a,a.o,a.i.streaming,b,function(){a.Ba&&Sg(a.Ba,!0);if(a.c)for(var c=a.c,d=c.s.ic(),e=c.i.smallGapLimit,f=q(c.a.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.a.get(g);h.ma=null;var k=c.s.L;"text"==g?(k=k.c,k=null==k.a||null==k.b?!1:d>=k.a&&d<k.b):(k=hf(k,g),k=ve(k,d,e));k||(null!=jf(c.s.L,g)&&ph(c,h),h.ja&&(h.ja.abort(),h.ja=null),"text"===g&&c.s.L.v.c())}a.D&&qj(a)},function(c){return a.dispatchEvent(c)})}
316
+ function Zi(a){var b=new Yg(a.ac);Zg(b,function(d){Li(a,rj,d)},function(d){Li(a,sj,d)},function(d,e){e||(Li(a,rj,d),Li(a,sj,d))});var c=new Rg(a.a);c.a.add(b);return c}function $i(a,b){a.D=new ag;a.D.a=cg;dg(a.D,b,Math.min(.5,b/2));Ii(a);a.Xb=(new N(function(){qj(a)})).ra(.25)}
317
+ function qj(a){switch(a.g){case kj:if(a.a.ended)var b=!0;else{var c=ue(a.a.buffered);b=null!=c&&c>=a.a.duration-1}break;case bj:a:if(a.a.ended||ff(a.G))b=!0;else{if(a.o.presentationTimeline.S()){c=a.o.presentationTimeline.Ga();var d=ue(a.a.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=we(a.a.buffered,a.a.currentTime);c=a.D;var e=b,f=c.b.get(c.a);b=c.a;d=e||d>=f?bg:cg;c.a=d;b!=d&&Ii(a)}function Ji(a,b,c,d){return new Ze(a,b,c,d)}
318
+ function aj(a){return new ah(a.o,{ic:function(){return a.v.g()},getBandwidthEstimate:function(){return a.j.getBandwidthEstimate()},L:a.G,nb:a.N,onError:function(b){return Gi(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Me:function(){a.m&&a.m.update&&a.m.update()},bd:function(){a.v&&a.v.v();qj(a)}})}
319
+ p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Wh(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Fb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);var c=$h(this.i,a,ji(this));tj(this);return c};
320
+ function tj(a){if(a.m){var b=zc(a.i.manifest);a.a&&"AUDIO"===a.a.nodeName&&(b.disableVideo=!0);a.m.configure(b)}a.h&&a.h.configure(a.i.drm);if(a.c){a.c.configure(a.i.streaming);try{a.gb(a.o)}catch(f){Gi(a,f)}a.j&&dj(a);b=a.c.b;!b||b.allowedByApplication&&b.allowedByKeySystem||uj(a)}if(a.G&&(b=a.i.textDisplayFactory,a.Kc!=b)){var c=Mb(b),d=a.G,e=d.h;d.h=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.c&&(d.c.c=c);a.Kc=b;a.c&&(b=a.c,(c=b.a.get("text"))&&kh(b,c.stream,!0,0,!0))}a.j&&(a.j.configure(a.i.abr),
321
+ a.i.abr.enabled?a.j.enable():a.j.disable(),hj(a));a.D&&(b=a.i.streaming.rebufferingGoal,a.o&&(b=Math.max(b,a.o.minBufferTime)),dg(a.D,b,Math.min(.5,b/2)))}p.getConfiguration=function(){var a=ji(this);$h(a,this.i,ji(this));return a};p.Ve=function(){for(var a in this.i)delete this.i[a];$h(this.i,ji(this),ji(this));tj(this)};p.pe=function(){return this.g};p.te=function(){return this.a};p.Fb=function(){return this.N};p.Pc=function(){return this.xb};
322
+ p.Cd=function(){Ya("getAdManager","Shaka Player's ad features are currently in BETA and are NOT yet covered by semantic versioning compatibility guarantees. The API may change at any time!");return this.I};p.S=function(){return this.o?this.o.presentationTimeline.S():this.a&&this.a.src?Infinity==this.a.duration:!1};p.Ua=function(){return this.o?this.o.presentationTimeline.Ua():!1};
323
+ p.Ge=function(){if(this.o){var a=this.o.variants;return a.length?!a[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};p.hd=function(){if(this.o){var a=this.o.presentationTimeline;return{start:a.kb(),end:a.Fa()}}return this.a&&this.a.src&&(a=this.a.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};p.keySystem=function(){return Md(this.drmInfo())};p.drmInfo=function(){return this.h?this.h.c:null};
324
+ p.Eb=function(){return this.h?this.h.Eb():Infinity};p.Rc=function(){return this.D?this.D.a==cg:!1};p.ve=function(){return this.a?this.A?this.A.b:1:0};p.ff=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.A.set(a),this.g==bj&&(this.j.playbackRateChanged(a),jh(this.c,1<Math.abs(a))))};p.ee=function(){this.g==kj&&this.A.set(1);this.g==bj&&(this.A.set(1),this.j.playbackRateChanged(1),jh(this.c,!1))};
325
+ p.Qc=function(){if(this.o){for(var a=this.c?this.c.b:null,b=[],c=q(this.o.variants),d=c.next();!d.done;d=c.next())if(d=d.value,Mf(d)){var e=Gf(d);e.active=d==a;b.push(e)}return b}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(f){return Kf(f)}):[]};
326
+ p.kc=function(){if(this.o){for(var a=this.c?this.c.c:null,b=[],c=q(this.o.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Hf(d);e.active=d==a;b.push(e)}return b}return this.a&&this.a.src&&this.a.textTracks?mj(this).map(function(f){var g=Lf(f);g.active="disabled"!=f.mode;g.type="text";g.originalTextId=f.id;"captions"==f.kind&&(g.mimeType="application/cea-608");f.kind&&(g.roles=[f.kind]);return g}):[]};
327
+ p.Sd=function(a){if(this.o&&this.c){var b=this.o.textStreams.find(function(d){return d.id==a.id});b&&b!=this.c.c&&(gi(this.f.a,b,!1),mh(this.c,b),vj(this),this.da=b.language)}else if(this.a&&this.a.src&&this.a.textTracks){b=mj(this);b=q(b);for(var c=b.next();!c.done;c=b.next())c=c.value,If(c)==a.id?c.mode=this.T?"showing":"hidden":c.mode="disabled";vj(this)}};
328
+ p.We=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.o&&this.c){this.i.abr.enabled&&Xa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.o.variants.find(function(e){return e.id==a.id});d&&Mf(d)&&d!=this.c.b&&(fi(this.f.a,d,!1),lh(this.c,d,b,c),wj(this),this.yb=new Wf(d),dj(this))}else if(this.a&&this.a.audioTracks){b=Array.from(this.a.audioTracks);b=q(b);for(c=
329
+ b.next();!c.done;c=b.next())c=c.value,If(c)==a.id&&(c.enabled=!0);wj(this)}};p.le=function(){return xj(this.Qc())};p.De=function(){return xj(this.kc())};p.ke=function(){return Array.from(yj(this.Qc()))};p.Ce=function(){return Array.from(yj(this.kc()))};
330
+ p.jd=function(a,b){if(this.o&&this.v)this.yb=new Xf(a,b||"",0,""),uj(this);else if(this.a&&this.a.audioTracks){var c=Array.from(this.a.audioTracks),d=S(a),e=null,f=null;c=q(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Kf(g);S(h.language)==d&&(e=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?(f.enabled=!0,wj(this)):e&&(e.enabled=!0,wj(this))}};
331
+ p.kd=function(a,b){if(this.o&&this.v){this.da=a;this.Yb=b||"";var c=Of(this.o.textStreams,this.da,this.Yb)[0]||null;c&&c!=this.c.c&&(gi(this.f.a,c,!1),this.i.streaming.alwaysStreamText||this.Sc())&&(mh(this.c,c),vj(this))}else{var d=S(a);(c=this.kc().find(function(e){return S(e.language)==d&&(!b||e.roles.includes(b))}))&&this.Sd(c)}};
332
+ p.Xe=function(a){if(this.o&&this.v){for(var b=null,c=q(this.o.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.yb=new Xf(b.language,"",0,a),uj(this))}};p.Sc=function(){var a=this.T;return this.G?this.G.h.isTextVisible():this.a&&this.a.src&&this.a.textTracks?mj(this).some(function(b){return"showing"==b.mode}):a};
333
+ function mj(a){return Array.from(a.a.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function oj(a){return Array.from(a.a.textTracks).filter(function(b){return"metadata"==b.kind})}
334
+ p.cf=function(a){a=!!a;if(this.T!=a){this.T=a;if(this.g==bj)this.G.h.setTextVisibility(a),this.i.streaming.alwaysStreamText||(a?this.c.c||(a=Of(this.o.textStreams,this.da,this.Yb),0<a.length&&(mh(this.c,a[0]),vj(this))):ih(this.c));else if(this.a&&this.a.src&&this.a.textTracks){var b=mj(this);b=q(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}fj(this)}};
335
+ p.xe=function(){if(!this.S())return null;var a=this.X.f,b=0;if(this.v)b=this.v.g();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.o?new Date(1E3*(this.o.presentationTimeline.f+b)):this.a&&this.a.getStartDate?(a=this.a.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
336
+ p.Dd=function(){if(!this.S())return null;if(this.o)return new Date(1E3*this.o.presentationTimeline.f);if(this.a&&this.a.getStartDate){var a=this.a.getStartDate();return isNaN(a.getTime())?null:a}return null};p.hc=function(){if(this.g==bj)return this.G.hc();var a={total:[],audio:[],video:[],text:[]};this.g==kj&&(a.total=xe(this.a.buffered));return a};
337
+ p.getStats=function(){if(this.g!=bj&&this.g!=kj)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Ui(this);var a=this.a;if(a.getVideoPlaybackQuality){a=a.getVideoPlaybackQuality();var b=this.f,c=Number(a.totalVideoFrames);b.J=Number(a.droppedVideoFrames);
338
+ b.I=c;this.f.G=Number(a.corruptedVideoFrames)}this.h?(a=this.h,a=a.G?a.G:NaN):a=NaN;this.f.D=a;if(this.g==bj){if(a=this.c.b)this.f.h=(this.A?this.A.b:1)*a.bandwidth;a&&a.video&&(b=this.f,c=a.video.height||NaN,b.M=a.video.width||NaN,b.j=c);this.S()&&(a=this.Dd().valueOf()+1E3*this.hd().end,this.f.m=(Date.now()-a)/1E3);this.o&&this.o.presentationTimeline&&(this.f.A=this.o.presentationTimeline.a);a=this.j.getBandwidthEstimate();this.f.g=a}var d=this.f;a=d.M;b=d.j;c=d.h;var e=d.I,f=d.J,g=d.G,h=d.g,k=
339
+ d.f,l=d.v,m=d.c,n=ci(d.b,"playing"),r=ci(d.b,"paused"),u=ci(d.b,"buffering"),v=d.D,A=d.m,y=d.A,z=di(d.b),D=[];d=q(d.a.a);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:b,streamBandwidth:c,decodedFrames:e,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,loadLatency:k,manifestTimeSeconds:l,drmTimeSeconds:m,playTime:n,pauseTime:r,bufferingTime:u,licenseTime:v,liveLatency:A,
340
+ maxSegmentDuration:y,stateHistory:z,switchHistory:D}};
341
+ p.addTextTrack=function(a,b,c,d,e,f){if(this.g==kj)throw Error("State error!");if(this.g!=bj)throw Error("State error!");var g=this.o.presentationTimeline.getDuration();if(Infinity==g)throw new M(1,4,4033);a={id:this.ud++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ng(0,g,[a]),mimeType:d,codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,
342
+ audioSamplingRate:null,closedCaptions:null};this.o.textStreams.push(a);ij(this);return Hf(a)};p.md=function(a,b){this.wc.width=a;this.wc.height=b};p.gd=function(){if(this.g==bj){var a=this.c;if(a.F.a)a=!1;else if(a.g)a=!1;else{for(var b=q(a.a.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Ib&&(c.Ib=!1,hh(a,c,.1));a=!0}}else a=!1;return a};
343
+ p.qe=function(){Xa("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.o};p.re=function(){return this.$b};
344
+ function ji(a){var b=Yh();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.S()&&d.includes(c.code)&&(c.severity=1,a.gd())};b.textDisplayFactory=function(){return a.bc?new Oh(a.a,a.bc):new Jh(a.a)};return b}p.Vd=function(a){this.bc=a};
345
+ function Ni(a,b){for(var c=new Set,d=q(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"==e.mimeType&&c.add(e.originalId);d=q(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=q(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=new Og;h={id:a.ud++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:h,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,
346
+ drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};b.textStreams.push(h);c.add(g)}}
347
+ p.gb=function(a){Ef(this.h,this.c?this.c.b:null,a);if(!a.variants.some(Mf))throw new M(2,4,4032);for(var b=this.i.restrictions,c=this.wc,d=!1,e=q(a.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.allowedByApplication;f.allowedByApplication=Df(f,b,c);g!=f.allowedByApplication&&(d=!0)}d&&this.c&&ij(this);if(b=this.h?this.h.c:null)for(c=q(a.variants),d=c.next();!d.done;d=c.next())for(d=d.value,d=q((d.video?d.video.drmInfos:[]).concat(d.audio?d.audio.drmInfos:[])),e=d.next();!e.done;e=d.next())if(e=
348
+ e.value,e.keySystem==b.keySystem)for(e=q(e.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,Hd(this.h,f.initDataType,f.initData);zj(this,a)};
349
+ function gj(a,b){var c,d,e,f,g;return J(function(h){if(1==h.a)return c=a.audio,d=a.video,e=function(k,l){var m,n;return J(function(r){if(1==r.a)return k?t(r,k.createSegmentIndex(),2):r["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return r["return"](null);n=m.startTime;return r["return"](n)})},t(h,e(c,b),2);if(3!=h.a)return f=h.b,t(h,e(d,b),3);g=h.b;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
350
+ function Ii(a){var b=a.Rc();if(a.f&&a.D&&a.v){var c=a.A;c.f=b;Qg(c);Ui(a)}a.dispatchEvent(wi(Aj,{buffering:b}))}function Vi(a){var b=a.a.playbackRate;0!=b&&(a.A&&a.A.set(b),b=wi(Bj),a.dispatchEvent(b))}function Ui(a){if(a.f&&a.D){var b=a.f.b;a.D.a==cg?bi(b,"buffering"):a.a.paused?bi(b,"paused"):a.a.ended?bi(b,"ended"):bi(b,"playing")}}
351
+ function dj(a){try{zj(a,a.o)}catch(c){return Gi(a,c),!1}var b=a.o.variants.filter(function(c){return Mf(c)});b=a.yb.create(b);a.j.setVariants(Array.from(b.values()));return!0}function uj(a){var b;if(b=dj(a)?a.j.chooseVariant():null){if(b==a.c.b)return;fi(a.f.a,b,!0);lh(a.c,b,!0,0);wj(a)}Xi(a)}function ej(a,b,c){a=S(a.i.preferredTextLanguage);b=S(b.language);c=S(c.language);return uf(c,a)&&!uf(b,c)}function Xi(a){var b=wi(Cj);Dj(a,b)}function ij(a){var b=wi(Ej);Dj(a,b)}
352
+ function wj(a){var b=wi(Fj);Dj(a,b)}function vj(a){var b=wi(Gj);Dj(a,b)}function fj(a){var b=wi(Hj);Dj(a,b)}function hj(a){var b=wi(Ij,{Pf:a.i.abr.enabled});Dj(a,b)}function Gi(a,b){if(a.g!=zi){var c=wi(Jj,{detail:b});a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Li(a,b,c){a.dispatchEvent(wi(b,{detail:{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement}}))}
353
+ function Fi(a){if(!a.a.error)return null;var b=a.a.error.code;if(1==b)return null;var c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new M(2,3,3016,b,c,a.a.error.message)}
354
+ function Ri(a,b){if(a.c){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=q(a.o.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=q(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=q(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Kj.includes(l)}h!=f.allowedByKeySystem&&
355
+ (e=!0)}}}e&&dj(a);(d=a.c.b)&&!d.allowedByKeySystem&&uj(a);e&&ij(a)}}function Si(a,b,c){if(a.m&&a.m.onExpirationUpdated)a.m.onExpirationUpdated(b,c);b=wi(Lj);a.dispatchEvent(b)}function Wi(a,b,c){0<b&&(a.S()||a.Ud(b));b=a.getDuration();c<b&&(a.S()||a.za(c))}
356
+ function zj(a,b){var c=a.h?cd(a.h.T):{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=q(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=q(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=q(n.keyIds);for(var r=n.next();!r.done;r=n.next()){r=r.value;var u=c[d?"00":r];u?Kj.includes(u)&&h.add(u):g.add(r)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
357
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new M(2,4,4012,c);}function Dj(a,b){J(function(c){if(1==c.a)return t(c,Promise.resolve(),2);a.g!=zi&&a.dispatchEvent(b);w(c)})}function yj(a){var b=new Set;a=q(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(S(c.language)):b.add("und");return b}
358
+ function xj(a){var b=new Map;a=q(a);for(var c=a.next();!c.done;c=a.next()){var d=c.value;c="und";var e=[];d.language&&(c=S(d.language));"variant"==d.type?e=d.audioRoles:e=d.roles;e&&e.length||(e=[""]);b.has(c)||b.set(c,new Set);d=q(e);for(e=d.next();!e.done;e=d.next())e=e.value,b.get(c).add(e)}var f=[];b.forEach(function(g,h){for(var k=q(g),l=k.next();!l.done;l=k.next())f.push({language:h,role:l.value})});return f}function Ai(){return new M(2,7,7E3)}
359
+ function vi(a,b,c,d,e,f){return d==a&&e.B==f.B&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Dh(){return{B:null,mimeType:null,startTime:null,pd:NaN,uri:null}}function Bi(a){return new Promise(function(b,c){a.Va=function(){return c(Ai())};a.mc=function(){return b()};a.onError=function(d){return c(d)};a.oc=function(){return c(Ai())}})}K("shaka.Player",W);W.prototype.setVideoContainer=W.prototype.Vd;W.prototype.getManifestParserFactory=W.prototype.re;W.prototype.getManifest=W.prototype.qe;
360
+ W.prototype.retryStreaming=W.prototype.gd;W.prototype.setMaxHardwareResolution=W.prototype.md;W.prototype.addTextTrack=W.prototype.addTextTrack;W.prototype.getStats=W.prototype.getStats;W.prototype.getBufferedInfo=W.prototype.hc;W.prototype.getPresentationStartTimeAsDate=W.prototype.Dd;W.prototype.getPlayheadTimeAsDate=W.prototype.xe;W.prototype.setTextTrackVisibility=W.prototype.cf;W.prototype.isTextTrackVisible=W.prototype.Sc;W.prototype.selectVariantsByLabel=W.prototype.Xe;
361
+ W.prototype.selectTextLanguage=W.prototype.kd;W.prototype.selectAudioLanguage=W.prototype.jd;W.prototype.getTextLanguages=W.prototype.Ce;W.prototype.getAudioLanguages=W.prototype.ke;W.prototype.getTextLanguagesAndRoles=W.prototype.De;W.prototype.getAudioLanguagesAndRoles=W.prototype.le;W.prototype.selectVariantTrack=W.prototype.We;W.prototype.selectTextTrack=W.prototype.Sd;W.prototype.getTextTracks=W.prototype.kc;W.prototype.getVariantTracks=W.prototype.Qc;W.prototype.cancelTrickPlay=W.prototype.ee;
362
+ W.prototype.trickPlay=W.prototype.ff;W.prototype.getPlaybackRate=W.prototype.ve;W.prototype.isBuffering=W.prototype.Rc;W.prototype.getExpiration=W.prototype.Eb;W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.keySystem=W.prototype.keySystem;W.prototype.seekRange=W.prototype.hd;W.prototype.isAudioOnly=W.prototype.Ge;W.prototype.isInProgress=W.prototype.Ua;W.prototype.isLive=W.prototype.S;W.prototype.getAdManager=W.prototype.Cd;W.prototype.getAssetUri=W.prototype.Pc;
363
+ W.prototype.getNetworkingEngine=W.prototype.Fb;W.prototype.getMediaElement=W.prototype.te;W.prototype.getLoadMode=W.prototype.pe;W.prototype.resetConfiguration=W.prototype.Ve;W.prototype.getConfiguration=W.prototype.getConfiguration;W.prototype.configure=W.prototype.configure;W.prototype.load=W.prototype.load;W.prototype.unload=W.prototype.sd;W.prototype.detach=W.prototype.detach;W.prototype.attach=W.prototype.zb;
364
+ W.probeSupport=function(){var a,b,c,d,e,f;return J(function(g){if(1==g.a)return t(g,Xd(),2);a=g.b;var h={};if(id()){for(var k in gg)h[k]=!0;for(var l in ig)h[l]=!0}k={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};l=q(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,h[m]=id()?!!gg[m]:jd(m);for(var n in k)h[n]=id()?!!ig[n]:jd(k[n]);b=h;h={};n=q('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="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(","));
365
+ for(k=n.next();!k.done;k=n.next())k=k.value,h[k]=id()?Te(k)?!0:MediaSource.isTypeSupported(k)||ic(k):jd(k),l=k.split(";")[0],h[l]=h[l]||h[k];c=h;d={manifest:b,media:c,drm:a};e=Mj;for(f in e)d[f]=e[f]();return g["return"](d)})};
366
+ W.isBrowserSupported=function(){if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach))return!1;var a=od();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:id()?!0:jd("application/x-mpegurl")};W.setAdManagerFactory=function(a){li=a};W.registerSupportPlugin=function(a,b){Mj[a]=b};W.prototype.destroy=W.prototype.destroy;
367
+ var Ij="abrstatuschanged",Cj="adaptation",Aj="buffering",Ti="drmsessionupdate",Ah="emsg",Jj="error",Lj="expirationupdated",Ei="loaded",Ci="loading",Oi="manifestparsed",pj="metadata",xi="onstatechange",yi="onstateidle",Bj="ratechange",cj="streaming",Gj="textchanged",Hj="texttrackvisibility",Mi="timelineregionadded",rj="timelineregionenter",sj="timelineregionexit",Ej="trackschanged",Hi="unloading",Fj="variantchanged",Nj={nf:Ij,pf:Cj,qf:Aj,rf:Ti,tf:Ah,Error:Jj,uf:Lj,wf:"largegap",xf:Ei,yf:Ci,zf:Oi,Metadata:pj,
368
+ Af:xi,Bf:yi,Cf:Bj,Df:cj,Ef:Gj,Ff:Hj,Gf:Mi,Hf:rj,If:sj,Jf:Ej,Kf:Hi,Lf:Fj},zi=0,ii=1,bj=2,kj=3;W.LoadMode={DESTROYED:zi,NOT_LOADED:ii,MEDIA_SOURCE:bj,SRC_EQUALS:kj};W.version="v3.0.8";var Oj=["3","0"];Gb=new function(a){this.a=a;this.c=Hb;this.b=Ib}(new Eb(Number(Oj[0]),Number(Oj[1])));var Kj=["output-restricted","internal-error"],Mj={},li=null;function Pj(){this.a=[];this.f=this.b=this.c=0};function X(a,b){var c=this;this.c=a;this.a=b;this.f=!1;this.g=this.a.getVolume();this.b=new Uc;this.b.l(this.a,google.ima.AdEvent.Type.PAUSED,function(){c.f=!0});this.b.l(this.a,google.ima.AdEvent.Type.RESUMED,function(){c.f=!1})}p=X.prototype;p.getDuration=function(){return this.c.getDuration()};p.getMinSuggestedDuration=function(){return this.c.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.a.getRemainingTime()};p.isPaused=function(){return this.f};
369
+ p.isSkippable=function(){return 0<=this.c.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.c.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.a.getAdSkippableState()};p.skip=function(){return this.a.skip()};p.pause=function(){return this.a.pause()};p.play=function(){return this.a.resume()};p.getVolume=function(){return this.a.getVolume()};p.setVolume=function(a){return this.a.setVolume(a)};p.isMuted=function(){return 0==this.a.getVolume()};
370
+ p.resize=function(a,b){this.a.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};p.setMuted=function(a){a?(this.g=this.getVolume(),this.setVolume(0)):this.setVolume(this.g)};p.getSequenceLength=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getAdPosition()};p.release=function(){this.a=this.c=null};K("shaka.ads.ClientSideAd",X);
371
+ X.prototype.release=X.prototype.release;X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;
372
+ X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;X.prototype.getDuration=X.prototype.getDuration;function Qj(a,b,c,d){var e=this;this.h=a;this.a=b;this.m=NaN;this.f=d;this.j=null;this.b=new Uc;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.h,this.a);a.initialize();this.g=new google.ima.AdsLoader(a);this.g.getSettings().setPlayerType("shaka-player");this.g.getSettings().setPlayerVersion("v3.0.8");this.c=null;this.b.ia(this.g,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Rj(e,f)});this.b.l(this.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(f){Sj(e,
373
+ f)});this.a.onended=function(){e.g.contentComplete()}}Qj.prototype.stop=function(){this.c&&this.c.stop();this.h&&Nh(this.h)};function Sj(a,b){b.getError();Tj(a,null);a.f(new Q("ad-cue-points-changed",{cuepoints:[]}))}
374
+ function Rj(a,b){a.f(new Q("ads-loaded",{loadTime:Date.now()/1E3-a.m}));a.c=b.getAdsManager(a.a);a.f(new Q("ima-ad-manager-loaded",{imaAdsManager:a.c}));var c=a.c.getCuePoints();if(c.length){var d=[];c=q(c);for(var e=c.next();!e.done;e=c.next())d.push(new Uj(e.value));a.f(new Q("ad-cue-points-changed",{cuepoints:d}))}Vj(a);try{a.c.init(a.a.offsetWidth,a.a.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.b.l(a.a,"loadeddata",function(){a.c.resize(a.a.offsetWidth,
375
+ a.a.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.c.start()}catch(f){Tj(a,null)}}
376
+ function Vj(a){a.b.l(a.c,google.ima.AdErrorEvent.Type.AD_ERROR,function(b){Sj(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(b){Wj(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.STARTED,function(b){Wj(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.FIRST_QUARTILE,function(b){a.f(new Q("ad-first-quartile",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.MIDPOINT,function(b){a.f(new Q("ad-midpoint",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.THIRD_QUARTILE,function(b){a.f(new Q("ad-third-quartile",
377
+ {originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.COMPLETE,function(b){a.f(new Q("ad-complete",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(b){Tj(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(b){Tj(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.SKIPPED,function(b){a.f(new Q("ad-skipped",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.VOLUME_CHANGED,function(b){a.f(new Q("ad-volume-changed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.VOLUME_MUTED,
378
+ function(b){a.f(new Q("ad-muted",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.PAUSED,function(b){a.j.f=!0;a.f(new Q("ad-paused",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.RESUMED,function(b){a.j.f=!1;a.f(new Q("ad-resumed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(b){a.f(new Q("ad-skip-state-changed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.CLICK,function(){a.f(new Q("ad-clicked"))});a.b.l(a.c,google.ima.AdEvent.Type.AD_PROGRESS,
379
+ function(b){a.f(new Q("ad-progress",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.AD_BUFFERING,function(b){a.f(new Q("ad-buffering",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.IMPRESSION,function(b){a.f(new Q("ad-impression",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.DURATION_CHANGE,function(b){a.f(new Q("ad-duration-changed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.USER_CLOSE,function(b){a.f(new Q("ad-closed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.LOADED,
380
+ function(b){a.f(new Q("ad-loaded",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(b){a.f(new Q("all-ads-completed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.LINEAR_CHANGED,function(b){a.f(new Q("ad-linear-changed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.AD_METADATA,function(b){a.f(new Q("ad-metadata",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.LOG,function(b){a.f(new Q("ad-recoverable-error",{originalEvent:b}))});a.b.l(a.c,
381
+ google.ima.AdEvent.Type.AD_BREAK_READY,function(b){a.f(new Q("ad-break-ready",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.INTERACTION,function(b){a.f(new Q("ad-interaction",{originalEvent:b}))})}function Wj(a,b){var c=b.getAd();a.j=new X(c,a.c);a.f(new Q("ad-started",{ad:a.j,sdkAdObject:c,originalEvent:b}));a.h.setAttribute("ad-active","true");a.a.pause()}function Tj(a,b){a.f(new Q("ad-stopped",{originalEvent:b}));a.h.removeAttribute("ad-active");a.a.play()};function Y(a,b){this.c=a;this.b=null;this.a=b}p=Y.prototype;p.getDuration=function(){return this.b?this.b.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.b?this.b.duration-this.b.currentTime:-1};p.isPaused=function(){return this.a.paused};p.isSkippable=function(){return this.c.isSkippable()};p.getTimeUntilSkippable=function(){var a=this.c.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
382
+ p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.a.currentTime+=this.getRemainingTime()};p.pause=function(){return this.a.pause()};p.play=function(){return this.a.play()};p.getVolume=function(){return this.a.volume};p.setVolume=function(a){this.a.volume=a};p.isMuted=function(){return this.a.muted};p.resize=function(){};p.setMuted=function(a){this.a.muted=a};p.getSequenceLength=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getTotalAds()};
383
+ p.getPositionInSequence=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getAdPosition()};p.release=function(){this.a=this.b=this.c=null};K("shaka.ads.ServerSideAd",Y);Y.prototype.release=Y.prototype.release;Y.prototype.getPositionInSequence=Y.prototype.getPositionInSequence;Y.prototype.getSequenceLength=Y.prototype.getSequenceLength;Y.prototype.setMuted=Y.prototype.setMuted;Y.prototype.resize=Y.prototype.resize;Y.prototype.isMuted=Y.prototype.isMuted;Y.prototype.setVolume=Y.prototype.setVolume;
384
+ Y.prototype.getVolume=Y.prototype.getVolume;Y.prototype.play=Y.prototype.play;Y.prototype.pause=Y.prototype.pause;Y.prototype.skip=Y.prototype.skip;Y.prototype.canSkipNow=Y.prototype.canSkipNow;Y.prototype.getTimeUntilSkippable=Y.prototype.getTimeUntilSkippable;Y.prototype.isSkippable=Y.prototype.isSkippable;Y.prototype.isPaused=Y.prototype.isPaused;Y.prototype.getRemainingTime=Y.prototype.getRemainingTime;Y.prototype.getMinSuggestedDuration=Y.prototype.getMinSuggestedDuration;
385
+ Y.prototype.getDuration=Y.prototype.getDuration;function Xj(a,b,c,d){var e=this;this.v=a;this.a=b;this.g=null;this.G=NaN;this.f=d;this.D=!1;this.A=this.h=this.j=null;this.m="";this.b=new Uc;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.c=new google.ima.dai.api.StreamManager(this.a,this.v,a);this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Yj(e,f)});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.m.length?e.g.resolve(e.m):e.g.reject("IMA Stream request returned an error and there was no backup asset uri provided.");
386
+ e.g=null});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.h=new Y(f,e.a);e.A&&(e.h.b=e.A);e.f(new Q("ad-started",{ad:e.h}));e.v.setAttribute("ad-active","true")});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.v.removeAttribute("ad-active");var f=e.a.currentTime;e.j&&e.j>f&&(e.a.currentTime=e.j,e.j=null)});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,
387
+ function(f){e.A=f.getStreamData().adProgressData;e.h&&(e.h.b=e.A)});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.f(new Q("ad-first-quartile"))});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.f(new Q("ad-midpoint"))});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.f(new Q("ad-third-quartile"))});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.f(new Q("ad-complete"));e.f(new Q("ad-stopped"));
388
+ e.v.removeAttribute("ad-active");e.h=null});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.f(new Q("ad-skipped"));e.f(new Q("ad-stopped"))});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=q(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new Uj(h.start,h.end));e.f(new Q("ad-cue-points-changed",{cuepoints:f}))})}Xj.prototype.stop=function(){this.c.reset();this.m="";this.j=null};
389
+ Xj.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.c.onTimedMetadata(b)}};function Yj(a,b){a.f(new Q("ads-loaded",{loadTime:Date.now()/1E3-a.G}));var c=b.getStreamData().url;a.g.resolve(c);a.g=null;a.D||a.b.l(a.a,"seeked",function(){var d=a.a.currentTime;if(0!=d){a.c.streamTimeForContentTime(d);var e=a.c.previousCuePointForStreamTime(d);e&&!e.played&&(a.j=d,a.a.currentTime=e.start)}})};function Z(){yc.call(this);this.a=this.b=null;this.f=new Pj;this.c=navigator.language}pa(Z,yc);p=Z.prototype;p.setLocale=function(a){this.c=a};p.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.b=new Qj(a,b,this.c,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.f.a.push(d.loadTime);break;case "ad-started":c.f.c++;break;case "ad-complete":c.f.b++;break;case "ad-skipped":c.f.f++}c.dispatchEvent(d)})};
390
+ p.onAssetUnload=function(){this.b&&this.b.stop();this.dispatchEvent(new Q("ad-stopped"));this.f=new Pj};p.requestClientSideAds=function(a){if(!this.b)throw new M(1,10,10001);var b=this.b;b.m=Date.now()/1E3;b.g.requestAds(a)};
391
+ p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.a=new Xj(a,b,this.c,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.f.a.push(d.loadTime);break;case "ad-started":c.f.c++;break;case "ad-complete":c.f.b++;break;case "ad-skipped":c.f.f++}c.dispatchEvent(d)})};
392
+ p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.a)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Xa('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 overriden.');a.adTagParameters.mpt="Shaka Player";a.adTagParameters.mpv="v3.0.8";c=this.a;var d=b;c.g?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
393
+ (c.D=!0),c.g=new Rb,c.c.requestStream(a),c.m=d||"",c.G=Date.now()/1E3,c=c.g);return c};p.replaceServerSideAdTagParameters=function(a){if(!this.a)throw new M(1,10,10003);(a.mpt||a.mpv)&&Xa('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 overriden.');a.mpt="Shaka Player";a.mpv="v3.0.8";this.a.c.replaceAdTagParameters(a)};
394
+ p.getStats=function(){var a=this.f;return{loadTimes:a.a,started:a.c,playedCompletely:a.b,skipped:a.f}};p.onDashTimedMetadata=function(a){if(this.a&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.a.c.processMetadata(b,c,a.startTime)}};p.onHlsTimedMetadata=function(a,b){this.a&&this.a.c.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.a)this.a.onCueMetadataChange(a)};K("shaka.ads.AdManager",Z);
395
+ Z.prototype.onCueMetadataChange=Z.prototype.onCueMetadataChange;Z.prototype.onHlsTimedMetadata=Z.prototype.onHlsTimedMetadata;Z.prototype.onDashTimedMetadata=Z.prototype.onDashTimedMetadata;Z.prototype.getStats=Z.prototype.getStats;Z.prototype.replaceServerSideAdTagParameters=Z.prototype.replaceServerSideAdTagParameters;Z.prototype.requestServerSideStream=Z.prototype.requestServerSideStream;Z.prototype.initServerSide=Z.prototype.initServerSide;Z.prototype.requestClientSideAds=Z.prototype.requestClientSideAds;
396
+ Z.prototype.onAssetUnload=Z.prototype.onAssetUnload;Z.prototype.initClientSide=Z.prototype.initClientSide;Z.prototype.setLocale=Z.prototype.setLocale;function Uj(a,b){this.start=a;this.end=void 0===b?null:b}Z.ADS_LOADED="ads-loaded";Z.AD_STARTED="ad-started";Z.AD_FIRST_QUARTILE="ad-first-quartile";Z.AD_MIDPOINT="ad-midpoint";Z.AD_THIRD_QUARTILE="ad-third-quartile";Z.AD_COMPLETE="ad-complete";Z.AD_STOPPED="ad-stopped";Z.AD_SKIPPED="ad-skipped";Z.AD_VOLUME_CHANGED="ad-volume-changed";Z.AD_MUTED="ad-muted";
397
+ Z.AD_PAUSED="ad-paused";Z.AD_RESUMED="ad-resumed";Z.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Z.CUEPOINTS_CHANGED="ad-cue-points-changed";Z.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Z.AD_CLICKED="ad-clicked";Z.AD_PROGRESS="ad-progress";Z.AD_BUFFERING="ad-buffering";Z.AD_IMPRESSION="ad-impression";Z.AD_DURATION_CHANGED="ad-duration-changed";Z.AD_CLOSED="ad-closed";Z.AD_LOADED="ad-loaded";Z.ALL_ADS_COMPLETED="all-ads-completed";Z.AD_LINEAR_CHANGED="ad-linear-changed";Z.AD_METADATA="ad-metadata";
398
+ Z.AD_RECOVERABLE_ERROR="ad-recoverable-error";Z.AD_BREAK_READY="ad-break-ready";Z.AD_INTERACTION="ad-interaction";li=function(){return new Z};function Zj(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof Q){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(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);e=q(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=q(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
399
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=q(xe(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
400
+ function ak(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=bk(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
401
+ function bk(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
402
+ var ck="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),dk="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ek=["loop","playbackRate"],fk=["pause","play"],gk={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,
403
+ isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},hk={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ik=[["getConfiguration","configure"]],jk=[["isTextTrackVisible","setTextTrackVisibility"]],kk="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),lk=["attach","detach","load",
404
+ "unload"];function mk(a,b,c,d,e,f){var g=this;this.T=a;this.f=new N(b);this.X=c;this.m=!1;this.D=d;this.M=e;this.I=f;this.b=this.h=!1;this.J="";this.j=null;this.v=function(){return nk(g)};this.A=function(h,k){var l=ak(k);switch(l.type){case "event":var m=l.targetName;l=l.event;l=new Q(l.type,l);g.D(m,l);break;case "update":m=l.update;for(var n in m){l=g.a[n]||{};for(var r in m[n])l[r]=m[n][r]}g.m&&(g.X(),g.m=!1);break;case "asyncComplete":if(n=l.id,l=l.error,r=g.c[n],delete g.c[n],r)if(l){n=new M(l.severity,
405
+ l.category,l.code);for(m in l)n[m]=l[m];r.reject(n)}else r.resolve()}};this.a={video:{},player:{}};this.G=0;this.c={};this.g=null;ok.add(this)}p=mk.prototype;p.destroy=function(){ok["delete"](this);pk(this);qk&&rk(this);this.f&&(this.f.stop(),this.f=null);this.M=this.D=null;this.b=this.h=!1;this.A=this.v=this.g=this.c=this.a=this.j=null;return Promise.resolve()};p.ga=function(){return this.b};p.ed=function(){return this.J};
406
+ p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable&&this.T.length){this.h=!0;this.f.Qb();var a=new chrome.cast.SessionRequest(this.T);a=new chrome.cast.ApiConfig(a,function(b){for(var c=q(ok),d=c.next();!d.done;d=c.next())sk(d.value,b)},function(b){for(var c=q(ok),d=c.next();!d.done;d=c.next())d=d.value,tk="available"==b,d.f.Qb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});tk&&this.f.R(uk);(a=qk)&&a.status!=chrome.cast.SessionStatus.STOPPED?sk(this,
407
+ a):qk=null}};p.ld=function(a){this.j=a;this.b&&vk(this,{type:"appData",appData:this.j})};p.cast=function(a){var b=this;return J(function(c){if(!b.h)throw new M(1,8,8E3);if(!tk)throw new M(1,8,8001);if(b.b)throw new M(1,8,8002);b.g=new Rb;chrome.cast.requestSession(function(d){return wk(b,a,d)},function(d){return xk(b,d)});return t(c,b.g,0)})};function yk(a){if(a.b){var b=a.I();chrome.cast.requestSession(function(c){return wk(a,b,c)},function(c){return xk(a,c)})}}
408
+ p.hb=function(){if(this.b){pk(this);if(qk){rk(this);try{qk.stop(function(){},function(){})}catch(a){}qk=null}nk(this)}};
409
+ p.get=function(a,b){var c=this;if("video"==a){if(fk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Pd.apply(c,[a,b].concat(ia(e)))}}else if("player"==a){if(hk[b]&&!this.get("player","isLive")())return function(){};if(kk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Pd.apply(c,[a,b].concat(ia(e)))};if(lk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Se.apply(c,
410
+ [a,b].concat(ia(e)))};if(gk[b])return function(){return c.a[a][b]}}return this.a[a][b]};p.set=function(a,b,c){this.a[a][b]=c;vk(this,{type:"set",targetName:a,property:b,value:c})};function wk(a,b,c){qk=c;c.addUpdateListener(a.v);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.A);nk(a);vk(a,{type:"init",initState:b,appData:a.j});a.g.resolve()}
411
+ function xk(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.g.reject(new M(2,8,c,b))}p.Pd=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];vk(this,{type:"call",targetName:a,methodName:b,args:d})};p.Se=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Rb;var f=this.G.toString();this.G++;this.c[f]=e;try{vk(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
412
+ function sk(a,b){var c=a.I();a.g=new Rb;a.m=!0;wk(a,c,b)}function rk(a){var b=qk;b.removeUpdateListener(a.v);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.A)}function nk(a){var b=qk?"connected"==qk.status:!1;if(a.b&&!b){a.M();for(var c in a.a)a.a[c]={};pk(a)}a.b=b;a.J=b?qk.receiver.friendlyName:"";a.f.Qb()}function pk(a){for(var b in a.c){var c=a.c[b];delete a.c[b];c.reject(new M(1,7,7E3))}}
413
+ function vk(a,b){var c=Zj(b),d=qk;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},$a)}catch(e){throw c=new M(2,8,8005,e),d=new Q("error",{detail:c}),a.D("player",d),a.hb(),c;}}var uk=.02,tk=!1,qk=null,ok=new Set;window.__onGCastApiAvailable=function(a){if(a){a=q(ok);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function zk(a,b,c){yc.call(this);var d=this;this.f=a;this.c=b;this.b=this.j=this.g=this.m=this.h=null;this.A=c;this.v=new Map;this.a=new mk(c,function(){return Ak(d)},function(){return Bk(d)},function(e,f){return Ck(d,e,f)},function(){return Dk(d)},function(){return Ek(d)});Fk(this)}pa(zk,yc);p=zk.prototype;
414
+ p.destroy=function(a){a&&this.a.hb();this.b&&(this.b.release(),this.b=null);a=[];this.c&&(a.push(this.c.destroy()),this.c=null);this.a&&(a.push(this.a.destroy()),this.a=null);this.m=this.h=this.f=null;return Promise.all(a)};p.Ee=function(){return this.h};p.we=function(){return this.m};p.de=function(){return this.a.h&&tk};p.ga=function(){return this.a.ga()};p.ed=function(){return this.a.ed()};
415
+ p.cast=function(){var a=this,b;return J(function(c){return 1==c.a?(b=Ek(a),t(c,a.a.cast(b),2)):a.c?t(c,a.c.sd(),0):c["return"]()})};p.ld=function(a){this.a.ld(a)};p.df=function(){yk(this.a)};p.hb=function(){this.a.hb()};
416
+ p.fe=function(a){var b=this;return J(function(c){if(1==c.a){if(a==b.A)return c["return"]();b.A=a;b.a.hb();return t(c,b.a.destroy(),2)}b.a=null;b.a=new mk(a,function(){return Ak(b)},function(){return Bk(b)},function(d,e){return Ck(b,d,e)},function(){return Dk(b)},function(){return Ek(b)});b.a.init();w(c)})};
417
+ function Fk(a){a.a.init();a.b=new Uc;for(var b=q(ck),c=b.next();!c.done;c=b.next())a.b.l(a.f,c.value,function(f){a.a.ga()||(f=new Q(f.type,f),a.g.dispatchEvent(f))});for(var d in Nj)a.b.l(a.c,Nj[d],function(f){a.a.ga()||a.j.dispatchEvent(f)});a.h={};b={};for(var e in a.f)b.tb=e,Object.defineProperty(a.h,b.tb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Gk(a,f.tb)}}(b),set:function(f){return function(g){var h=f.tb;a.a.ga()?a.a.set("video",h,g):a.f[h]=g}}(b)}),b={tb:b.tb};
418
+ a.m={};Hk(a,function(f){Object.defineProperty(a.m,f,{configurable:!1,enumerable:!0,get:function(){return Ik(a,f)}})});Jk(a);a.g=new yc;a.g.Zb=a.h;a.j=new yc;a.j.Zb=a.m}function Jk(a){var b=new Map;Hk(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.v.set(c,e):a.v.set(e,c)}else b.set(d,c)})}
419
+ function Hk(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.c,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=q(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
420
+ function Ek(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.c.Pc(),startTime:null};a.f.pause();for(var c=q(ek),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.f[d];a.f.ended||(b.startTime=a.f.currentTime);c=q(ik);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.c[e[0]]();b.player[d]=e}c=q(jk);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.c[e[0]](),b.playerAfterLoad[d]=e;return b}function Ak(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
421
+ function Bk(a){var b=new Q(a.h.paused?"pause":"play");a.g.dispatchEvent(b)}
422
+ function Dk(a){for(var b=q(ik),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.a.get("player",d[0])();a.c[c](d)}var e=a.a.get("player","getAssetUri")();c=a.a.get("video","ended");b=Promise.resolve();var f=a.f.autoplay;d=null;c||(d=a.a.get("video","currentTime"));e&&(a.f.autoplay=!1,b=a.c.load(e,d));var g={};c=q(ek);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.a.get("video",d);b.then(function(){if(a.f){for(var h=q(ek),k=h.next();!k.done;k=h.next())k=k.value,a.f[k]=g[k];h=q(jk);for(k=
423
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.a.get("player",l[0])();a.c[k](l)}a.f.autoplay=f;e&&a.f.play()}},function(h){h=new Q(Jj,{detail:h});a.c.dispatchEvent(h)})}
424
+ function Gk(a,b){if("addEventListener"==b)return function(d,e,f){return a.g.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.g.removeEventListener(d,e,f)};if(a.a.ga()&&0==Object.keys(a.a.a.video).length){var c=a.f[b];if("function"!=typeof c)return c}return a.a.ga()?a.a.get("video",b):(c=a.f[b],"function"==typeof c&&(c=c.bind(a.f)),c)}
425
+ function Ik(a,b){a.v.has(b)&&(b=a.v.get(b));if("addEventListener"==b)return function(c,d,e){return a.j.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.j.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.h};if("getSharedConfiguration"==b)return a.a.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.c.Fb()};if("getAdManager"==b)return function(){return a.c.Cd()};if("setVideoContainer"==b)return function(c){return a.c.Vd(c)};
426
+ if(a.a.ga()){if("getManifest"==b||"drmInfo"==b)return function(){Xa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Xa(b+"() does not work while casting!");return Promise.resolve()}}return a.a.ga()&&0==Object.keys(a.a.a.video).length&&gk[b]||!a.a.ga()?a.c[b].bind(a.c):a.a.get("player",b)}function Ck(a,b,c){a.a.ga()&&("video"==b?a.g.dispatchEvent(c):"player"==b&&a.j.dispatchEvent(c))}K("shaka.cast.CastProxy",zk);zk.prototype.changeReceiverId=zk.prototype.fe;
427
+ zk.prototype.forceDisconnect=zk.prototype.hb;zk.prototype.suggestDisconnect=zk.prototype.df;zk.prototype.setAppData=zk.prototype.ld;zk.prototype.cast=zk.prototype.cast;zk.prototype.receiverName=zk.prototype.ed;zk.prototype.isCasting=zk.prototype.ga;zk.prototype.canCast=zk.prototype.de;zk.prototype.getPlayer=zk.prototype.we;zk.prototype.getVideo=zk.prototype.Ee;zk.prototype.destroy=zk.prototype.destroy;function Kk(a,b,c,d){yc.call(this);var e=this;this.a=a;this.c=b;this.b=new Uc;this.J={video:a,player:b};this.D=c||function(){};this.M=d||function(f){return f};this.f=null;this.G=!1;this.j=!0;this.h=0;this.A=!1;this.v=!0;this.m=this.g=null;this.I=new N(function(){Lk(e)});Mk(this)}pa(Kk,yc);p=Kk.prototype;p.isConnected=function(){return this.G};p.He=function(){return this.j};p.$e=function(a){this.f=a};p.ie=function(){this.f=null};
428
+ p.af=function(a){this.f||(this.f={metadataType:cast.receiver.media.MetadataType.GENERIC});this.f.title=a};p.Ze=function(a){this.f||(this.f={metadataType:cast.receiver.media.MetadataType.GENERIC});this.f.images=[{url:a}]};p.Ye=function(a){this.f||(this.f={});this.f.artist=a;this.f.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
429
+ p.destroy=function(){var a=this,b,c;return J(function(d){if(1==d.a)return a.b&&(a.b.release(),a.b=null),b=[],a.c&&(b.push(a.c.destroy()),a.c=null),a.I&&(a.I.stop(),a.I=null),a.a=null,a.J=null,a.D=null,a.G=!1,a.j=!0,a.g=null,a.m=null,t(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();w(d)})};
430
+ function Mk(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Nk(a)};b.onSenderDisconnected=function(){return Nk(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Ok(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.g);Ok(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.g)};a.m=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.m.onMessage=function(e){return Pk(a,
431
+ e)};a.g=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.g.onMessage=function(e){return Qk(a,e)};b.start();b=q(ck);for(var c=b.next();!c.done;c=b.next())a.b.l(a.a,c.value,function(e){return Rk(a,"video",e)});for(var d in Nj)a.b.l(a.c,Nj[d],function(e){return Rk(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.c.md(3840,2160):a.c.md(1920,1080);a.b.l(a.a,"loadeddata",function(){a.A=!0});a.b.l(a.c,"loading",function(){a.j=
432
+ !1;Sk(a)});a.b.l(a.a,"playing",function(){a.j=!1;Sk(a)});a.b.l(a.a,"pause",function(){Sk(a)});a.b.l(a.c,"unloading",function(){a.j=!0;Sk(a)});a.b.l(a.a,"ended",function(){(new N(function(){a.a&&a.a.ended&&(a.j=!0,Sk(a))})).R(Tk)})}function Nk(a){a.h=0;a.v=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Sk(a)}
433
+ function Sk(a){var b;J(function(c){if(1==c.a)return t(c,Promise.resolve(),2);if(!a.c)return c["return"]();b=new Q("caststatuschanged");a.dispatchEvent(b);Uk(a)||Vk(a);w(c)})}
434
+ function Wk(a,b,c){var d,e,f,g,h,k,l,m,n,r;J(function(u){switch(u.a){case 1:for(d in b.player)e=b.player[d],a.c[d](e);a.D(c);f=a.a.autoplay;return b.manifest?(a.a.autoplay=!1,x(u,5),t(u,a.c.load(b.manifest,b.startTime),7)):t(u,Promise.resolve(),3);case 7:ua(u,3);break;case 5:return g=C(u),h=Jj,k=new Q(h,{detail:g}),a.c.dispatchEvent(k),u["return"]();case 3:if(!a.c)return u["return"]();for(l in b.video)m=b.video[l],a.a[l]=m;for(n in b.playerAfterLoad)r=b.playerAfterLoad[n],a.c[n](r);a.a.autoplay=f;
435
+ b.manifest&&(a.a.play(),Vk(a));w(u)}})}function Rk(a,b,c){a.c&&(Lk(a),Ok(a,{type:"event",targetName:b,event:c},a.g))}
436
+ function Lk(a){a.I.R(Xk);for(var b={video:{},player:{}},c=q(dk),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.a[d];if(a.c.S())for(var e in hk)0==a.h%hk[e]&&(b.player[e]=a.c[e]());for(var f in gk)0==a.h%gk[f]&&(b.player[f]=a.c[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.A&&(a.h+=1);Ok(a,{type:"update",update:b},a.g);Uk(a)}function Uk(a){return a.v&&(a.a.duration||a.c.S())?(Yk(a),a.v=!1,!0):!1}
437
+ function Yk(a,b){var c={contentId:a.c.Pc(),streamType:a.c.S()?"LIVE":"BUFFERED",contentType:""};a.c.S()||(c.duration=a.a.duration);a.f&&(c.metadata=a.f);Vk(a,void 0===b?0:b,c)}
438
+ function Qk(a,b){var c=ak(b.data);switch(c.type){case "init":a.h=0;a.A=!1;a.v=!0;Wk(a,c.initState,c.appData);Lk(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
439
+ c.methodName;"player"==d&&"load"==e&&(a.h=0,a.A=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.v=!0}));c.then(function(){return Zk(a,h,g,null)},function(k){return Zk(a,h,g,k)})}}
440
+ function Pk(a,b){var c=ak(b.data);switch(c.type){case "PLAY":a.a.play();Vk(a);break;case "PAUSE":a.a.pause();Vk(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.a.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.a.play(),Vk(a)):e&&"PLAYBACK_PAUSE"==e&&(a.a.pause(),Vk(a));break;case "STOP":a.c.sd().then(function(){a.c&&Vk(a)});break;case "GET_STATUS":Yk(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.a.volume,g=a.a.muted;null!=d&&(a.a.volume=Number(d));
441
+ null!=e&&(a.a.muted=e);f==a.a.volume&&g==a.a.muted||Vk(a);break;case "LOAD":a.h=0;a.A=!1;a.v=!1;d=c.media;e=c.currentTime;f=a.M(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.a.autoplay=!0);a.c.load(f,e).then(function(){a.c&&Yk(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Ok(a,{requestId:Number(c.requestId),type:k},a.m)});break;default:Ok(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.m)}}
442
+ function Zk(a,b,c,d){a.c&&Ok(a,{type:"asyncComplete",id:c,error:d},a.g,b)}function Ok(a,b,c,d){a.G&&(a=Zj(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Vk(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.a.playbackRate,playerState:a.j?$k:a.c.Rc()?al:a.a.paused?bl:cl,currentTime:a.a.currentTime,supportedMediaCommands:63,volume:{level:a.a.volume,muted:a.a.muted}};c&&(d.media=c);Ok(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.m)}
443
+ K("shaka.cast.CastReceiver",Kk);Kk.prototype.destroy=Kk.prototype.destroy;Kk.prototype.setContentArtist=Kk.prototype.Ye;Kk.prototype.setContentImage=Kk.prototype.Ze;Kk.prototype.setContentTitle=Kk.prototype.af;Kk.prototype.clearContentMetadata=Kk.prototype.ie;Kk.prototype.setContentMetadata=Kk.prototype.$e;Kk.prototype.isIdle=Kk.prototype.He;Kk.prototype.isConnected=Kk.prototype.isConnected;var Xk=.5,Tk=5,$k="IDLE",cl="PLAYING",al="BUFFERING",bl="PAUSED";function dl(a){var b=this;this.a=[];this.b=[];this.data=[];(new fe).box("moov",je).V("pssh",function(c){if(!(1<c.version)){var d=L(c.reader.P,-12,c.size);b.data.push(d);b.a.push(fc(c.reader.Wa(16)));if(0<c.version){d=c.reader.K();d=q(hb(d));for(var e=d.next();!e.done;e=d.next())e=fc(c.reader.Wa(16)),b.b.push(e)}}}).parse(a)}
444
+ function el(a){if(!a)return a;var b=new dl(a);if(1>=b.data.length)return a;a=[];var c={};b=q(b.data);for(var d=b.next();!d.done;c={Sb:c.Sb},d=b.next())c.Sb=d.value,a.some(function(e){return function(f){return lb(f,e.Sb)}}(c))||a.push(c.Sb);return gc.apply(ac,ia(a))};function fl(a,b){var c=gl(a,b);return 1!=c.length?null:c[0]}function nl(a,b,c){a=ol(a,b,c);return 1!=a.length?null:a[0]}function gl(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function ol(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}function pl(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}
445
+ function ql(a){return Array.from(a.childNodes).every(function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?a.textContent.trim():null}function rl(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function sl(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:Math.floor(a/1E3)}
446
+ function tl(a){if(!a)return null;a=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.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}function ul(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}
447
+ function vl(a){a=Number(a);return 0===a%1?a:null}function wl(a){a=Number(a);return 0===a%1&&0<a?a:null}function xl(a){a=Number(a);return 0===a%1&&0<=a?a:null}function yl(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}function zl(a,b){var c=new DOMParser,d=null,e=null;try{e=c.parseFromString(a,"text/xml")}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d}
448
+ function Al(a,b){try{var c=Ub(a);return zl(c,b)}catch(d){return null}};function Bl(a,b){var c=Cl(a),d=null,e=[],f=[],g=new Set(c.map(function(k){return k.keyId}));g["delete"](null);if(1<g.size)throw new M(2,4,4010);b||(f=c.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.Rd?(d=k.init||d,!1):!0}),f.length&&(e=Dl(d,f),0==e.length&&(e=[Ob("",d)])));if(c.length&&(b||!f.length))for(e=[],c=q(El.values()),f=c.next();!f.done;f=c.next())f=f.value,"org.w3.clearkey"!=f&&e.push(Ob(f,d));if(g=Array.from(g)[0]||null)for(c=q(e),f=c.next();!f.done;f=c.next()){f=q(f.value.initData);
449
+ for(var h=f.next();!h.done;h=f.next())h.value.keyId=g}return{xd:g,Mf:d,drmInfos:e,Bd:!0}}function Fl(a,b,c){var d=Bl(a,c);if(b.Bd){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==d.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=d.drmInfos;b.Bd=!1}else if(0<d.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(e){return d.drmInfos.some(function(f){return f.keySystem==e.keySystem})}),0==b.drmInfos.length))throw new M(2,4,4008);return d.xd||b.xd}
450
+ function Gl(a){var b=0,c=pb(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(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=L(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
451
+ function Hl(a){a=q(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=q(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}
452
+ function Dl(a,b){for(var c=[],d=q(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=El.get(e.Rd);if(f){var g;if(g=nl(e.node,"urn:microsoft:playready","pro")){g=dc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),k=g.length,l=h.length+16+k,m=new Uint8Array(l),n=pb(m),r=0;n.setUint32(r,l);r+=4;n.setUint32(r,1886614376);r+=4;n.setUint32(r,0);r+=4;m.set(h,r);r+=h.length;n.setUint32(r,k);r+=4;m.set(g,r);g=[{initData:m,initDataType:"cenc",keyId:e.keyId}]}else g=
453
+ null;g=Ob(f,e.init||a||g);if(f=Il.get(f))g.licenseServerUri=f(e);c.push(g)}}return c}function Cl(a){var b=[];a=q(a);for(var c=a.next();!c.done;c=a.next())(c=Jl(c.value))&&b.push(c);return b}
454
+ function Jl(a){var b=a.getAttribute("schemeIdUri"),c=pl(a,"urn:mpeg:cenc:2013","default_KID"),d=ol(a,"urn:mpeg:cenc:2013","pssh").map(ql);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:dc(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,Rd:b,keyId:c,init:0<e.length?e:null}}
455
+ var El=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime"),Il=(new Map).set("com.widevine.alpha",function(a){return(a=nl(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||
456
+ "":""}).set("com.microsoft.playready",function(a){a=nl(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=dc(a.textContent);a=Gl(a).filter(function(b){return 1===b.type})[0];if(!a)return"";a=Wb(a.value,!0);return(a=zl(a,"WRMHEADER"))?Hl(a):""});function Kl(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
457
+ window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
458
+ function Ll(a,b){var c=Ml(a,b,"timescale"),d=1;c&&(d=wl(c)||1);c=Ml(a,b,"duration");(c=wl(c||""))&&(c/=d);var e=Ml(a,b,"startNumber"),f=Number(Ml(a,b,"presentationTimeOffset"))||0,g=xl(e||"");if(null==e||null==g)g=1;var h=Nl(a,b,"SegmentTimeline");e=null;if(h){e=d;var k=a.O.duration||Infinity,l=gl(h,"S");h=[];var m=-f;l=q(jb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var r=n.item,u=n.next,v=rl(r,"t",xl);n=rl(r,"d",xl);var A=rl(r,"r",vl);null!=v&&(v-=f);if(!n)break;r=null!=v?v:m;v=A||0;if(0>
459
+ v)if(u){u=rl(u,"t",xl);if(null==u)break;else if(r>=u)break;v=Math.ceil((u-r)/n)-1}else{if(Infinity==k)break;else if(r/e>=k)break;v=Math.ceil((k*e-r)/n)-1}0<h.length&&r!=m&&(h[h.length-1].end=r/e);u=q(hb(v+1));for(v=u.next();!v.done;v=u.next())m=r+n,h.push({start:r/e,end:m/e,kf:r}),r=m}e=h}return{timescale:d,$:c,sb:g,Ia:f/d||0,td:f,timeline:e}}function Ml(a,b,c){return[b(a.H),b(a.ba),b(a.la)].filter(Lb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
460
+ function Nl(a,b,c){return[b(a.H),b(a.ba),b(a.la)].filter(Lb).map(function(d){return fl(d,c)}).reduce(function(d,e){return d||e})}
461
+ function Ol(a,b,c,d,e,f){for(var g=pl(a,"http://www.w3.org/1999/xlink","href"),h=pl(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=q(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return qc(new M(2,4,4028));if("onLoad"!=h)return qc(new M(2,4,4027));var m=Nb([d],[g]);return e.request(0,Lc(m,b)).U(function(n){n=Al(n.data,a.tagName);if(!n)return qc(new M(2,4,4001,g));
462
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var r=n.childNodes[0];n.removeChild(r);a.appendChild(r)}n=q(Array.from(n.attributes));for(r=n.next();!r.done;r=n.next())a.setAttributeNode(r.value.cloneNode(!1));return Pl(a,b,c,m[0],e,f+1)})}
463
+ function Pl(a,b,c,d,e,f){f=void 0===f?0:f;if(pl(a,"http://www.w3.org/1999/xlink","href")){var g=Ol(a,b,c,d,e,f);c&&(g=g.U(void 0,function(){return Pl(a,b,c,d,e,f)}));return g}g=[];for(var h=q(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==pl(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Pl(k,b,c,d,e,f)));return uc(g).U(function(){return a})};function Ql(a,b,c,d,e,f,g){var h,k=(new fe).V("sidx",function(l){h=Rl(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
464
+ function Rl(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.rb(),m=g.reader.rb();g.reader.skip(2);var n=g.reader.Mb();a=a+g.size+m;n=q(hb(n));for(m=n.next();!m.done;m=n.next()){var r=g.reader.K();m=(r&2147483648)>>>31;r&=2147483647;var u=g.reader.K();g.reader.skip(4);if(1==m)throw new M(2,3,3006);h.push(new mg(l/k+c,(l+u)/k+c,function(){return f},a,a+r-1,b,c,d,e));l+=u;a+=r}g.parser.stop();
465
+ return h};function Sl(a){this.b=pb(a);this.a=new R(this.b,0)}Sl.prototype.wa=function(){return this.a.wa()};
466
+ function Tl(a){var b=Ul(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=q(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Ul(a);a:{d=q(Vl);for(var e=d.next();!e.done;e=d.next())if(lb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.b.byteLength-a.a.C;else{if(8==b.length&&b[1]&224)throw new M(2,3,3001);d=0;e=q(jb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.Z?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.a.C+b<=a.b.byteLength?b:a.b.byteLength-a.a.C;d=pb(a.b,a.a.C,
467
+ b);a.a.skip(b);return new Wl(c,d)}function Ul(a){var b=a.a.C,c=a.a.qa();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.a.skip(c-1);return L(a.b,b,c)}var Vl=[[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 Wl(a,b){this.id=a;this.a=b}
468
+ function Xl(a){if(8<a.a.byteLength)throw new M(2,3,3002);if(8==a.a.byteLength&&a.a.getUint8(0)&224)throw new M(2,3,3001);for(var b=0,c=q(hb(a.a.byteLength)),d=c.next();!d.done;d=c.next())d=a.a.getUint8(d.value),b=256*b+d;return b};function Yl(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Sl(a.a);for(var n=null,r=null;a.wa();){var u=Tl(a);if(187==u.id){var v=Zl(u);v&&(u=c*v.lf,v=b+v.Re,null!=n&&m.push(new mg(n+g,u+g,l,r,v-1,f,g,h,k)),n=u,r=v)}}null!=n&&m.push(new mg(n+g,d+g,l,r,null,f,g,h,k));return m}
469
+ function Zl(a){var b=new Sl(a.a);a=Tl(b);if(179!=a.id)throw new M(2,3,3013);a=Xl(a);b=Tl(b);if(183!=b.id)throw new M(2,3,3012);b=new Sl(b.a);for(var c=0;b.wa();){var d=Tl(b);if(241==d.id){c=Xl(d);break}}return{lf:a,Re:c}};function $l(a,b){var c=Nl(a,b,"Initialization");if(!c)return null;var d=a.H.oa,e=c.getAttribute("sourceURL");e&&(d=Nb(a.H.oa,[e]));e=0;var f=null;if(c=rl(c,"range",ul))e=c.start,f=c.end;return new kg(function(){return d},e,f)}
470
+ function am(a,b){var c=Number(Ml(a,bm,"presentationTimeOffset"))||0,d=Ml(a,bm,"timescale"),e=1;d&&(e=wl(d)||1);var f=c/e||0,g=$l(a,bm);cm(a,g);var h=Ac(a);return{ib:function(){var k=Nl(h,bm,"RepresentationIndex"),l=h.H.oa;k&&(k=k.getAttribute("sourceURL"))&&(l=Nb(h.H.oa,[k]));k=dm(h);return em(h,b,g,l,k.start,k.end,f)}}}
471
+ function em(a,b,c,d,e,f,g){var h,k,l,m,n,r,u,v,A,y,z,D,B,E,H;return J(function(G){var F;if(1==G.a)return h=a.presentationTimeline,k=!a.Oa||!a.O.Gd,l=a.O.start,m=a.O.duration,n=a.H.mimeType.split("/")[1],r=b,u=null,v=[r(d,e,f),"webm"==n?r(c.c(),c.b,c.a):null],r=null,t(G,Promise.all(v),2);A=G.b;y=A[0];z=A[1]||null;D=null;B=l-g;E=l;H=m?l+m:Infinity;if("mp4"==n)var I=Ql(y,e,d,c,B,E,H);else{I=new Sl(z);if(440786851!=Tl(I).id)throw new M(2,3,3008);var O=Tl(I);if(408125543!=O.id)throw new M(2,3,3009);I=
472
+ O.a.byteOffset;O=new Sl(O.a);for(F=null;O.wa();){var U=Tl(O);if(357149030==U.id){F=U;break}}if(!F)throw new M(2,3,3010);F=new Sl(F.a);U=1E6;for(O=null;F.wa();){var P=Tl(F);if(2807729==P.id)U=Xl(P);else if(17545==P.id)if(4==P.a.byteLength)O=P.a.getFloat32(0);else if(8==P.a.byteLength)O=P.a.getFloat64(0);else throw new M(2,3,3003);}if(null==O)throw new M(2,3,3011);F=U/1E9;F={ef:F,duration:O*F};O=F.ef;F=F.duration;U=Tl(new Sl(y));if(475249515!=U.id)throw new M(2,3,3007);I=Yl(U,I,O,F,d,c,B,E,H)}D=I;h.ob(D);
473
+ u=new V(D);k&&u.La(E,H);return G["return"](u)})}function bm(a){return a.Nb}function dm(a){var b=Nl(a,bm,"RepresentationIndex");a=Ml(a,bm,"indexRange");a=ul(a||"");b&&(a=rl(b,"range",ul,a));return a}function cm(a,b){fm(a,b);if(!dm(a))throw new M(2,4,4002);}function fm(a,b){var c=a.H.mimeType.split("/")[1];if("text"!=a.H.contentType&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);};function gm(a,b){var c=$l(a,hm),d=im(a);if(!d.$&&!d.timeline&&1<d.lb.length)throw new M(2,4,4002);if(!d.$&&!a.O.duration&&!d.timeline&&1==d.lb.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.la.id&&a.H.id&&(f=a.la.id+","+a.H.id,e=b[f]);c=jm(a.O.start,a.O.duration,a.H.oa,d,c);e?(e.mb(c),e.Pa(a.presentationTimeline.Ra())):(a.presentationTimeline.ob(c),e=new V(c),f&&a.Oa&&(b[f]=e));a.Oa&&a.O.Gd||e.La(a.O.start,a.O.duration?a.O.start+a.O.duration:
474
+ Infinity);return{ib:function(){return Promise.resolve(e)}}}function hm(a){return a.Na}function im(a){var b=km(a);a=Ll(a,hm);var c=a.sb;0==c&&(c=1);var d=0;a.$?d=a.$*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{$:a.$,startTime:d,sb:c,Ia:a.Ia,timeline:a.timeline,lb:b}}
475
+ function jm(a,b,c,d,e){var f=d.lb.length;d.timeline&&d.timeline.length!=d.lb.length&&(f=Math.min(d.timeline.length,d.lb.length));var g=a-d.Ia,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=q(hb(f));for(var n=f.next();!n.done;m={Bc:m.Bc},n=f.next()){n=n.value;var r=d.lb[n];m.Bc=Nb(c,[r.Ke]);var u=void 0;u=null!=d.$?l+d.$:d.timeline?d.timeline[n].end:l+b;k.push(new mg(a+l,a+u,function(v){return function(){return v.Bc}}(m),r.start,r.end,e,g,a,h));l=u}return k}
476
+ function km(a){return[a.H.Na,a.ba.Na,a.la.Na].filter(Lb).map(function(b){return gl(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ed&&(a.Ed=!0);var c=b.getAttribute("media");b=rl(b,"mediaRange",ul,{start:0,end:null});return{Ke:c,start:b.start,end:b.end}})};function lm(a,b,c,d,e){var f=mm(a),g=nm(a);om(g);var h=Ac(a);if(g.Jb)return fm(a,f),{ib:function(){var u=Kl(g.Jb,h.H.id,null,h.bandwidth||null,null);u=Nb(h.H.oa,[u]);return em(h,b,f,u,0,null,g.Ia)}};if(g.$)return d||(a.presentationTimeline.Xc(g.$),a.presentationTimeline.Yc(a.O.start)),{ib:function(){return pm(h,g,e,f)}};var k=null;d=null;a.la.id&&a.H.id&&(d=a.la.id+","+a.H.id,k=c[d]);var l=qm(h,g,f),m=a.O.start,n=a.O.duration?a.O.start+a.O.duration:Infinity,r=Infinity!=n;k?(r&&(new V(l)).La(m,n),
477
+ k.mb(l),k.Pa(a.presentationTimeline.Ra())):(a.presentationTimeline.ob(l),k=new V(l),d&&a.Oa&&(c[d]=k));r&&k.La(m,n);return{ib:function(){return Promise.resolve(k)}}}function rm(a){return a.Ob}function nm(a){var b=Ll(a,rm),c=Ml(a,rm,"media");a=Ml(a,rm,"index");return{$:b.$,timescale:b.timescale,sb:b.sb,Ia:b.Ia,td:b.td,timeline:b.timeline,Wc:c,Jb:a}}
478
+ function om(a){var b=a.Jb?1:0;b+=a.timeline?1:0;b+=a.$?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Jb&&(a.timeline=null),a.$=null);if(!a.Jb&&!a.Wc)throw new M(2,4,4002);}
479
+ function pm(a,b,c,d){function e(G){var F=(G-n)*m,I=F+b.Ia;F+=h;return new mg(F,Math.min(F+m,l),function(){var O=Kl(u,A,G,v,I*r);return Nb(y,[O])},0,null,d,z,h,l)}function f(){var G=[Math.max(g.Ra(),h),Math.min(g.Ga(),l)].map(function(F){return F-h});return[Math.ceil(G[0]/m),Math.ceil(G[1]/m)-1].map(function(F){return F+n})}var g=a.presentationTimeline,h=a.O.start,k=a.O.duration,l=k?h+k:Infinity,m=b.$,n=b.sb,r=b.timescale,u=b.Wc,v=a.bandwidth||null,A=a.H.id,y=a.H.oa,z=h-b.Ia;k=f();a=a.Oa?Math.max(k[0],
480
+ k[1]-c+1):k[0];c=k[1];k=[];for(var D=a;D<=c;++D){var B=e(D);k.push(B)}var E=new V(k);if(g.Ga()<l){var H=Math.max(a,c+1);E.sc(m,function(){E.Pa(g.Ra());var G=q(f());G.next();G=G.next().value;for(var F=[];H<=G;){var I=e(H);F.push(I);H++}return g.Ga()>=l&&!F.length?null:F})}return Promise.resolve(E)}
481
+ function qm(a,b,c){var d=a.O.start,e=a.O.duration,f=d-b.Ia;e=e?d+e:Infinity;for(var g=[],h={},k=q(jb(b.timeline)),l=k.next();!l.done;h={Ac:h.Ac,Cc:h.Cc,Fc:h.Fc,xc:h.xc,Gc:h.Gc,yc:h.yc},l=k.next()){l=l.value;var m=l.item,n=m.start,r=m.kf;m=m.end;h.Fc=l.Z+b.sb;h.Gc=r+b.td;h.Cc=a.H.id;h.xc=a.bandwidth||null;h.Ac=b.Wc;h.yc=a.H.oa;g.push(new mg(d+n,d+m,function(u){return function(){var v=Kl(u.Ac,u.Cc,u.Fc,u.xc||null,u.Gc);return Nb(u.yc,[v]).map(function(A){return A.toString()})}}(h),0,null,c,f,d,e))}return g}
482
+ function mm(a){var b=Ml(a,rm,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.oa;return new kg(function(){var f=Kl(b,c,null,d,null);return Nb(e,[f])},0,null)};function sm(){this.f=[];this.a=[];this.b=[];this.c=[];this.g=new Set}sm.prototype.release=function(){for(var a=q(this.a.concat(this.b,this.c)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.a=[];this.b=[];this.c=[];this.f=[]};
483
+ function tm(a,b,c){var d,e,f,g,h,k,l,m,n,r,u,v,A,y,z,D,B,E,H,G,F,I,O,U,P,Ha,aa,Da,ya,Sa;return J(function(Ia){switch(Ia.a){case 1:d=Pb;um(b);vm(b);wm(b);if(!c&&1==b.length){e=b[0];a.a=e.cc;a.b=e.uc;a.c=e.textStreams;Ia.u(2);break}f=-1;g=q(jb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.Z,n=l.item,a.g.has(n.id)||(a.g.add(n.id),-1==f&&(f=m));if(-1==f)return Ia["return"]();r=b.map(function(Aa){return Aa.cc});u=b.map(function(Aa){return Aa.uc});v=b.map(function(Aa){return Aa.textStreams});A=
484
+ q(v);for(y=A.next();!y.done;y=A.next())z=y.value,z.push(xm());return t(Ia,ym(a.a,r,f,zm,Am),3);case 3:return t(Ia,ym(a.b,u,f,zm,Am),4);case 4:return t(Ia,ym(a.c,v,f,zm,Am),2);case 2:D=0;B=[];if(a.b.length&&a.a.length)for(O=q(a.a),U=O.next();!U.done;U=O.next())for(P=U.value,Ha=q(a.b),aa=Ha.next();!aa.done;aa=Ha.next())Da=aa.value,ya=ae(P.drmInfos,Da.drmInfos),P.drmInfos.length&&Da.drmInfos.length&&!ya.length||(Sa=D++,B.push({id:Sa,language:P.language,primary:P.primary,audio:P,video:Da,bandwidth:(P.bandwidth||
485
+ 0)+(Da.bandwidth||0),drmInfos:ya,allowedByApplication:!0,allowedByKeySystem:!0}));else for(E=a.b.concat(a.a),H=q(E),G=H.next();!G.done;G=H.next())F=G.value,I=D++,B.push({id:I,language:F.language,primary:F.primary,audio:F.type==d.fb?F:null,video:F.type==d.Da?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0});a.f=B;w(Ia)}})}
486
+ function um(a){a=q(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=q(b.cc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=q(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&Dc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.cc=c}}
487
+ function wm(a){a=q(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=q(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=q(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&Dc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
488
+ function vm(a){a=q(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=q(b.uc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=q(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&Dc(e.roles,h.roles)&&dd(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.uc=c}}
489
+ function Bm(a){var b,c,d,e,f,g,h,k,l,m,n,r,u,v,A,y,z,D,B,E,H,G;return J(function(F){switch(F.a){case 1:b=Pb;if(1==a.length)return F["return"](a[0]);c=a.map(function(I){return I.filter(function(O){return O.type==b.fb})});d=a.map(function(I){return I.filter(function(O){return O.type==b.Da})});e=a.map(function(I){return I.filter(function(O){return O.type==b.aa})});f=q(e);for(g=f.next();!g.done;g=f.next())h=g.value,h.push({id:0,originalId:"",primary:!1,type:"text",mimeType:"",codecs:"",language:"",label:null,
490
+ width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null});return t(F,ym([],c,0,Cm,Dm),2);case 2:return k=F.b,t(F,ym([],d,0,Cm,Dm),3);case 3:return l=F.b,t(F,ym([],e,0,Cm,Dm),4);case 4:m=F.b;n=0;if(l.length&&k.length)for(y=q(k),z=y.next();!z.done;z=y.next())for(D=z.value,B=q(l),E=B.next();!E.done;E=B.next())H=E.value,G=n++,H.variantIds.push(G),D.variantIds.push(G);else for(r=l.concat(k),u=q(r),v=u.next();!v.done;v=
491
+ u.next())A=v.value,A.variantIds=[n++];return F["return"](l.concat(k,m))}})}
492
+ function ym(a,b,c,d,e){var f,g,h,k,l,m,n,r,u,v,A,y,z,D,B,E,H,G,F,I,O,U,P,Ha;return J(function(aa){switch(aa.a){case 1:f=Pb;g=[];h=q(jb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.Z,r=m.item,n>=c?g.push(new Set(r)):g.push(new Set);u=q(a);v=u.next();case 2:if(v.done){aa.u(4);break}A=v.value;return t(aa,Em(A,b,c,e,g),5);case 5:y=aa.b;if(!y)throw new M(2,4,4037);v=u.next();aa.u(2);break;case 4:z=q(g),D=z.next();case 6:if(D.done){aa.u(8);break}B=D.value;E=q(B);H=E.next();case 9:if(H.done){D=
493
+ z.next();aa.u(6);break}G=H.value;return t(aa,Fm(G,b,d,e,g),12);case 12:(F=aa.b)&&a.push(F);H=E.next();aa.u(9);break;case 8:I=q(g);for(D=I.next();!D.done;D=I.next())for(O=D.value,U={},P=q(O),H=P.next();!H.done;U={eb:U.eb},H=P.next())if(U.eb=H.value,U.eb.type!=f.aa||U.eb.language)if(Ha=a.some(function(Da){return function(ya){return ya.mimeType==Da.eb.mimeType&&hd(ya.codecs)==hd(Da.eb.codecs)}}(U)))throw new M(2,4,4037);return aa["return"](a)}})}
494
+ function Em(a,b,c,d,e){var f;return J(function(g){if(1==g.a)return(f=Gm(b,a))?t(g,Promise.all(f.map(function(h){return h.createSegmentIndex()})),2):g["return"](!1);Hm(a,f,c,d,e);return g["return"](!0)})}function Fm(a,b,c,d,e){var f,g;return J(function(h){if(1==h.a)return f=c(a),(g=Gm(b,f))?f.createSegmentIndex?t(h,Promise.all(g.map(function(k){return k.createSegmentIndex()})),2):h.u(2):h["return"](null);Hm(f,g,0,d,e);return h["return"](f)})}
495
+ function Hm(a,b,c,d,e){b=q(jb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.Z;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==yf(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}function zm(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Og;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}
496
+ function Cm(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
497
+ function Am(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set(ia(a.keyIds).concat(ia(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=ae(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
498
+ (a.closedCaptions=new Map);c=q(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=q(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.g.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=zm(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Am(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Am(a.trickModeVideo,b)}
499
+ function Dm(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set(ia(a.keyIds).concat(ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=q(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=q(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
500
+ function Gm(a,b){for(var c=[],d=q(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Im,video:Im,text:Jm}[f.type],h={audio:Km,video:Lm,text:Mm}[f.type],k=null;e=q(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function Im(a,b){var c;if(!(c=b.mimeType!=a.mimeType||hd(b.codecs)!=hd(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ae(c,d).length:1)}return c?!1:!0}
501
+ function Jm(a,b){return a.language?b.language?0==yf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}
502
+ function Km(a,b,c){if(a.id==c.id)return!0;var d=yf(a.language,b.language),e=yf(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(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
503
+ d=Nm(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Om)return!0;if(d==Pm)return!1;d=Nm(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Om?!0:d==Pm?!1:a.bandwidth&&Qm(a.bandwidth,b.bandwidth,c.bandwidth)==Om?!0:!1}
504
+ function Lm(a,b,c){if(a.id==c.id)return!0;var d=Nm(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Om)return!0;if(d==Pm)return!1;if(a.frameRate){d=Nm(a.frameRate,b.frameRate,c.frameRate);if(d==Om)return!0;if(d==Pm)return!1}return a.bandwidth&&Qm(a.bandwidth,b.bandwidth,c.bandwidth)==Om?!0:!1}
505
+ function Mm(a,b,c){if(a.id==c.id)return!0;var d=yf(a.language,b.language),e=yf(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(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;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
506
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function xm(){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new V([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null}}
507
+ function Nm(a,b,c){if(b==a&&a!=c)return Pm;if(c==a&&a!=b)return Om;if(b>a){if(c<=a||c-a<b-a)return Om;if(c-a>b-a)return Pm}else{if(c>a)return Pm;if(a-c<a-b)return Om;if(a-c>a-b)return Pm}return Rm}function Qm(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Om:b<a?Pm:Rm}var Om=1,Rm=0,Pm=-1;function Sm(){var a=this;this.s=this.i=null;this.b=[];this.o=null;this.m=1;this.f={};this.a=new sm;this.h=0;this.j=new Pa(5);this.g=new N(function(){a.Kb()});this.c=new Fc}p=Sm.prototype;p.configure=function(a){this.i=a};p.start=function(a,b){var c=this,d;return J(function(e){if(1==e.a)return c.b=[a],c.s=b,t(e,Tm(c),2);d=e.b;c.s&&Um(c,d);if(!c.s)throw new M(2,7,7001);return e["return"](c.o)})};
508
+ p.stop=function(){for(var a=q(Object.values(this.f)),b=a.next();!b.done;b=a.next())b.value.release();this.a&&this.a.release();this.i=this.s=null;this.b=[];this.o=null;this.f={};this.a=null;null!=this.g&&(this.g.stop(),this.g=null);return this.c.destroy()};p.update=function(){var a=this,b;return J(function(c){if(1==c.a)return x(c,2),t(c,Tm(a),4);if(2!=c.a)return ua(c,0);b=C(c);if(!a.s||!b)return c["return"]();a.s.onError(b);w(c)})};p.onExpirationUpdated=function(){};
509
+ function Tm(a){var b,c,d,e,f,g,h;return J(function(k){if(1==k.a)return b=Lc(a.b,a.i.retryParameters),c=a.s.networkingEngine,d=Date.now(),e=c.request(0,b),Gc(a.c,e),t(k,e.promise,2);if(3!=k.a){f=k.b;if(!a.s)return k["return"](0);f.uri&&!a.b.includes(f.uri)&&a.b.unshift(f.uri);return t(k,Vm(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Qa(a.j,1,h);return k["return"](h)})}
510
+ function Vm(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a){d=Al(b,"MPD");if(!d)throw new M(2,4,4001,c);e=a.i.dash.xlinkFailGracefully;f=Pl(d,a.i.retryParameters,e,c,a.s.networkingEngine);Gc(a.c,f);return t(h,f.promise,2)}g=h.b;return h["return"](Wm(a,g,c))})}
511
+ function Wm(a,b,c){var d,e,f,g,h,k,l,m,n,r,u,v,A,y,z,D,B,E,H,G,F,I,O;return J(function(U){switch(U.a){case 1:d=[c];e=gl(b,"Location").map(ql).filter(Lb);0<e.length&&(f=Nb(d,e),d=a.b=f);g=gl(b,"BaseURL").map(ql);h=Nb(d,g);k=a.i.dash.ignoreMinBufferTime;l=0;k||(l=rl(b,"minBufferTime",tl)||0);a.h=rl(b,"minimumUpdatePeriod",tl,-1);m=rl(b,"availabilityStartTime",sl);n=rl(b,"timeShiftBufferDepth",tl);r=a.i.dash.ignoreSuggestedPresentationDelay;u=null;r||(u=rl(b,"suggestedPresentationDelay",tl));v=rl(b,
512
+ "maxSegmentDuration",tl);A=b.getAttribute("type")||"static";a.o?y=a.o.presentationTimeline:(z=a.i.defaultPresentationDelay||1.5*l,D=null!=u?u:z,y=new T(m,D,a.i.dash.autoCorrectDrift));B={Oa:"static"!=A,presentationTimeline:y,la:null,O:null,ba:null,H:null,bandwidth:0,Ed:!1};var P=rl(b,"mediaPresentationDuration",tl),Ha=[],aa=0,Da=gl(b,"Period");Da=q(jb(Da));for(var ya=Da.next();!ya.done;ya=Da.next()){var Sa=ya.value;ya=Sa.item;Sa=Sa.next;aa=rl(ya,"start",tl,aa);var Ia=rl(ya,"duration",tl),Aa=null;
513
+ if(Sa){var Qb=rl(Sa,"start",tl);null!=Qb&&(Aa=Qb-aa)}else null!=P&&(Aa=P-aa);null==Aa&&(Aa=Ia);ya=Xm(a,B,h,{start:aa,duration:Aa,node:ya,Gd:null==Aa||!Sa});Ha.push(ya);if(null==Aa){aa=null;break}aa+=Aa}E=null!=P?{periods:Ha,duration:P,yd:!1}:{periods:Ha,duration:aa,yd:!0};H=E.duration;G=E.periods;y.Pb("static"==A);"static"!=A&&E.yd||y.za(H||Infinity);(F=y.S())&&!isNaN(a.i.availabilityWindowOverride)&&(n=a.i.availabilityWindowOverride);null==n&&(n=Infinity);y.od(n);y.Xc(v||1);return t(U,tm(a.a,G,B.Oa),
514
+ 2);case 2:if(a.o){a.o.variants=a.a.f;a.o.textStreams=a.a.c;U.u(3);break}a.o={presentationTimeline:y,variants:a.a.f,textStreams:a.a.c,offlineSessionIds:[],minBufferTime:l||0};if(!y.Xd()){U.u(3);break}I=gl(b,"UTCTiming");return t(U,Ym(a,h,I),5);case 5:O=U.b;if(!a.s)return U["return"]();y.Td(O);case 3:return a.s.makeTextStreamsForClosedCaptions(a.o),t(U,a.s.filter(a.o),0)}})}
515
+ function Xm(a,b,c,d){b.la=Zm(d.node,null,c);b.O=d;b.la.id||(b.la.id="__shaka_period_"+d.start);c=gl(d.node,"EventStream");c=q(c);for(var e=c.next();!e.done;e=c.next())$m(a,d.start,d.duration,e.value);c=gl(d.node,"AdaptationSet").map(function(m){return an(a,b,m)}).filter(Lb);if(b.Oa){d=[];e=q(c);for(var f=e.next();!f.done;f=e.next()){f=q(f.value.Ue);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);}d=c.filter(function(m){return!m.rd});c=c.filter(function(m){return m.rd});
516
+ c=q(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.rd.split(" ");g=q(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=q(k.streams);for(var l=k.next();!l.done;h={Wb:h.Wb},l=k.next())h.Wb=l.value,h.Wb.trickModeVideo=e.streams.find(function(m){return function(n){return hd(m.Wb.codecs)==hd(n.codecs)}}(h))}}}e=a.i.disableAudio?[]:bn(d,"audio");f=a.i.disableVideo?[]:bn(d,"video");c=a.i.disableText?[]:bn(d,"text");if(!f.length&&!e.length)throw new M(2,4,4004);d=[];
517
+ e=q(e);for(g=e.next();!g.done;g=e.next())d.push.apply(d,ia(g.value.streams));e=[];f=q(f);for(g=f.next();!g.done;g=f.next())e.push.apply(e,ia(g.value.streams));f=[];c=q(c);for(g=c.next();!g.done;g=c.next())f.push.apply(f,ia(g.value.streams));return{id:b.la.id,cc:d,uc:e,textStreams:f}}function bn(a,b){return a.filter(function(c){return c.contentType==b})}
518
+ function an(a,b,c){b.ba=Zm(c,b.la,null);if("image"==b.ba.contentType)return null;var d=!1,e=gl(c,"Role"),f=e.map(function(B){return B.getAttribute("value")}).filter(Lb),g=void 0,h="text"==b.ba.contentType;h&&(g="subtitle");e=q(e);for(var k=e.next();!k.done;k=e.next()){k=k.value;var l=k.getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(k=k.getAttribute("value"),k){case "main":d=!0;break;case "caption":case "subtitle":g=k}}l=gl(c,"EssentialProperty");e=null;k=!1;l=q(l);for(var m=
519
+ l.next();!m.done;m=l.next())m=m.value,"http://dashif.org/guidelines/trickmode"==m.getAttribute("schemeIdUri")?e=m.getAttribute("value"):k=!0;l=gl(c,"Accessibility");var n=new Map;l=q(l);for(m=l.next();!m.done;m=l.next()){var r=m.value;m=r.getAttribute("schemeIdUri");r=r.getAttribute("value");if("urn:scte:dash:cc:cea-608:2015"==m||"urn:scte:dash:cc:cea-708:2015"==m)if(m=1,null!=r){r=q(r.split(";"));for(var u=r.next();!u.done;u=r.next()){var v=u.value,A=u=void 0;v.includes("=")?(v=v.split("="),u=v[0].startsWith("CC")?
520
+ v[0]:"CC"+v[0],A=v[1].split(",")[0].split(":").pop()):(u="CC"+m,m+=2,A=v);n.set(u,S(A))}}else n.set("CC1","und");else"urn:mpeg:dash:role:2011"==m&&null!=r&&(f.push(r),"captions"==r&&(g="caption"))}if(k)return null;k=gl(c,"ContentProtection");var y=Bl(k,a.i.dash.ignoreDrmInfo),z=S(c.getAttribute("lang")||"und"),D=c.getAttribute("label");(k=gl(c,"Label"))&&k.length&&(k=k[0],k.textContent&&(D=k.textContent));k=gl(c,"Representation");c=k.map(function(B){return cn(a,b,y,g,z,D,d,f,n,B)}).filter(function(B){return!!B});
521
+ if(0==c.length){if(a.i.dash.ignoreEmptyAdaptationSet||h)return null;throw new M(2,4,4003);}if(!b.ba.contentType||"application"==b.ba.contentType)for(b.ba.contentType=dn(c[0].mimeType,c[0].codecs),h=q(c),l=h.next();!l.done;l=h.next())l.value.type=b.ba.contentType;h=q(c);for(l=h.next();!l.done;l=h.next())for(l=l.value,m=q(y.drmInfos),r=m.next();!r.done;r=m.next())r=r.value,r.keyIds=r.keyIds&&l.keyIds?new Set(ia(r.keyIds).concat(ia(l.keyIds))):r.keyIds||l.keyIds;h=k.map(function(B){return B.getAttribute("id")}).filter(Lb);
522
+ return{id:b.ba.id||"__fake__"+a.m++,contentType:b.ba.contentType,language:z,Nf:d,streams:c,drmInfos:y.drmInfos,rd:e,Ue:h}}
523
+ function cn(a,b,c,d,e,f,g,h,k,l){b.H=Zm(l,b.ba,null);if(!en(b.H))return null;var m=b.O.start;b.bandwidth=rl(l,"bandwidth",wl)||0;var n=b.H.contentType;n="text"==n||"application"==n;try{var r=function(z,D,B){return fn(a,z,D,B)};if(b.H.Nb)var u=am(b,r);else if(b.H.Na)u=gm(b,a.f);else if(b.H.Ob)u=lm(b,r,a.f,!!a.o,a.i.dash.initialSegmentLimit);else{var v=b.H.oa,A=b.O.duration||0;u={ib:function(){return Promise.resolve(Ng(m,A,v))}}}}catch(z){if(n&&4002==z.code)return null;throw z;}n=gl(l,"ContentProtection");
524
+ n=Fl(n,c,a.i.dash.ignoreDrmInfo);n=new Set(n?[n]:[]);gl(l,"SupplementalProperty").some(function(z){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==z.getAttribute("schemeIdUri")&&"JOC"==z.getAttribute("value")})&&(b.H.mimeType="audio/eac3-joc");var y={id:a.m++,originalId:b.H.id,createSegmentIndex:function(){var z;return J(function(D){if(1==D.a){if(y.segmentIndex)return D.u(0);z=y;return t(D,u.ib(),3)}z.segmentIndex=D.b;w(D)})},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,
525
+ pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,label:f,type:b.ba.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,channelsCount:b.H.Zc,audioSamplingRate:b.H.audioSamplingRate,closedCaptions:k};return y}
526
+ p.Kb=function(){var a=this,b,c;return J(function(d){switch(d.a){case 1:return b=0,x(d,2),t(d,Tm(a),4);case 4:b=d.b;ua(d,3);break;case 2:c=C(d),a.s&&(c.severity=1,a.s.onError(c));case 3:if(!a.s)return d["return"]();Um(a,b);w(d)}})};function Um(a,b){0>a.h||a.g.R(Math.max(3,a.h-b,Ra(a.j)))}
527
+ function Zm(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Zc:null,audioSamplingRate:null};c=c||b.oa;var d=gl(a,"BaseURL").map(ql),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=rl(a,"frameRate",yl)||b.frameRate,k=a.getAttribute("sar")||b.pixelAspectRatio,l=gl(a,"InbandEventStream"),m=b.emsgSchemeIdUris.slice();l=q(l);for(var n=l.next();!n.done;n=l.next())n=
528
+ n.value.getAttribute("schemeIdUri"),m.includes(n)||m.push(n);l=gl(a,"AudioChannelConfiguration");l=gn(l)||b.Zc;n=rl(a,"audioSamplingRate",xl)||b.audioSamplingRate;e||(e=dn(f,g));return{oa:Nb(c,d),Nb:fl(a,"SegmentBase")||b.Nb,Na:fl(a,"SegmentList")||b.Na,Ob:fl(a,"SegmentTemplate")||b.Ob,width:rl(a,"width",xl)||b.width,height:rl(a,"height",xl)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,pixelAspectRatio:k,emsgSchemeIdUris:m,id:a.getAttribute("id"),Zc:l,audioSamplingRate:n}}
529
+ function gn(a){a=q(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(b=
530
+ parseInt(c,16)){for(a=0;b;)b&1&&++a,b>>=1;return a}}}return null}function en(a){var b=a.Nb?1:0;b+=a.Na?1:0;b+=a.Ob?1:0;if(0==b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Nb&&(a.Na=null),a.Ob=null);return!0}
531
+ function hn(a,b,c,d){var e,f,g,h,k,l;return J(function(m){if(1==m.a)return e=Nb(b,[c]),f=Lc(e,a.i.retryParameters),f.method=d,g=a.s.networkingEngine.request(4,f),Gc(a.c,g),t(m,g.promise,2);h=m.b;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Ub(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
532
+ function Ym(a,b,c){var d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:d=c.map(function(r){return{scheme:r.getAttribute("schemeIdUri"),value:r.getAttribute("value")}}),e=a.i.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=q(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;x(n,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.u(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.u(8);
533
+ 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":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return t(n,hn(a,b,l,"HEAD"),10);case 10:return n["return"](n.b);case 8:return t(n,hn(a,b,l,"GET"),11);case 11:return n["return"](n.b);
534
+ case 9:ua(n,3);break;case 5:C(n);case 3:g=f.next();n.u(2);break;case 4:return Xa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
535
+ function $m(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=rl(d,"timescale",xl)||1;d=q(gl(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=rl(h,"presentationTime",xl)||0,l=rl(h,"duration",xl)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.s.onTimelineRegionAdded(h)}}
536
+ function fn(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.a)return e=Rc,f=$g(b,c,d,a.i.retryParameters),g=a.s.networkingEngine,h=g.request(e,f),Gc(a.c,h),t(l,h.promise,2);k=l.b;return l["return"](k.data)})}function dn(a,b){return Te(ed(a,b))?"text":a.split("/")[0]}K("shaka.dash.DashParser",Sm);ig.mpd=function(){return new Sm};gg["application/dash+xml"]=function(){return new Sm};gg["video/vnd.mpeg.dash.mpd"]=function(){return new Sm};function jn(a,b,c,d){this.a=a;this.type=b;this.W=c;this.segments=d||null}function kn(a,b,c,d){this.id=a;this.name=b;this.a=c;this.value=void 0===d?null:d}kn.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.a?this.a.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
537
+ kn.prototype.getAttribute=function(a){var b=this.a.filter(function(c){return c.name==a});return b.length?b[0]:null};function ln(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function mn(a,b){var c=a.getAttribute(b);if(!c)throw new M(2,4,4023,b);return c.value}function nn(a,b){this.W=b;this.a=a}function on(a,b){this.name=a;this.value=b};function pn(a,b){return a.filter(function(c){return c.name==b})}function qn(a,b){return a.filter(function(c){return mn(c,"TYPE")==b})}function rn(a,b){var c=pn(a,b);return c.length?c[0]:null}function sn(a,b,c){c=void 0===c?0:c;return(a=rn(a,b))?Number(a.value):c};function tn(a){this.b=a;this.a=0}function un(a){vn(a,/[ \t]+/gm)}function vn(a,b){b.lastIndex=a.a;var c=b.exec(a.b);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.a==a.b.length||null==c||c.position!=a.a)return null;a.a+=c.length;return c.results}function wn(a){return a.a==a.b.length?null:(a=vn(a,/[^ \t\n]*/gm))?a[0]:null};function xn(){this.a=0}
538
+ function yn(a,b,c){b=Ub(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new M(2,4,4015);b=0;for(var e=!0,f=q(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=zn(a.a++,g),--a.a,An.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=q(jb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.Z;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=zn(a.a++,
539
+ l);if(Bn.includes(l.name)){if(1!=b)throw new M(2,4,4017);l=d.splice(h,d.length-h);d=c;e=[];g=[];h=null;l=q(l);for(k=l.next();!k.done;k=l.next())k=k.value,/^(#EXT)/.test(k)?(k=zn(a.a++,k),An.includes(k.name)?f.push(k):"EXT-X-MAP"==k.name?h=k:g.push(k)):/^#(?!EXT)/m.test(k)||(k=Nb([d],[k.trim()])[0],h&&g.push(h),e.push(new nn(k,g)),g=[]);return new jn(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.a.push(new on("URI",k)),e=!0)}}return new jn(c,b,f)}
540
+ function zn(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new tn(e);var g;(g=vn(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=vn(e,h);)c.push(new on(g[1],g[2]||g[3]))}return new kn(a,d,c,f)}var An="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Bn="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Cn(){}function Dn(a){try{var b=En(a);return sc({uri:a,Nd:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return qc(c)}}function En(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=dc(a):e=Yb(a);return{data:e,contentType:c}}
541
+ K("shaka.net.DataUriPlugin",Cn);Cn.parse=Dn;Ic("data",Dn);function Fn(){var a=this;this.i=this.s=null;this.Ca=1;this.j=new Map;this.g=new Map;this.ta=new Set;this.a=new Map;this.b=null;this.J="";this.G=new xn;this.da=0;this.h=new N(function(){a.Kb()});this.c=Gn;this.o=null;this.M=0;this.T=Infinity;this.m=new Fc;this.X=[];this.A=new Map;this.Ba=!1;this.f=new Map;this.D=null;this.I=new Map;this.v=new Map}p=Fn.prototype;p.configure=function(a){this.i=a};
542
+ p.start=function(a,b){var c=this,d,e;return J(function(f){if(1==f.a)return c.s=b,t(f,Hn(c,Lc([a],c.i.retryParameters),0),2);if(3!=f.a)return d=f.b,c.J=d.uri,t(f,In(c,d.data),3);e=c.da;0<e&&c.h.R(e);return f["return"](c.o)})};p.stop=function(){this.h&&(this.h.stop(),this.h=null);var a=[];this.m&&(a.push(this.m.destroy()),this.m=null);this.i=this.s=null;this.ta.clear();this.o=null;this.a.clear();this.g.clear();this.f.clear();this.j.clear();return Promise.all(a)};
543
+ p.update=function(){var a=this,b,c,d;return J(function(e){if(1==e.a){if(a.c==Gn)return e["return"]();b=[];a.D=null;c=Array.from(a.a.values());return c.length?t(e,Jn(a,c[0]),2):e.u(2)}for(d=1;d<c.length;d++)b.push(Jn(a,c[d]));return t(e,Promise.all(b),0)})};
544
+ function Jn(a,b){var c,d,e,f,g,h,k,l,m,n;return J(function(r){if(1==r.a)return c=Kn,d=b.be,t(r,Hn(a,Lc([d],a.i.retryParameters),0),2);if(3!=r.a){e=r.b;f=yn(a.G,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=pn(f.W,"EXT-X-DEFINE");h=Ln(a,g);k=b.stream;return t(r,Mn(a,b.tc,f,k.mimeType,b.Hd,h),3)}l=r.b;k.segmentIndex.mb(l);l.length&&k.segmentIndex.Pa(l[0].startTime);m=l[l.length-1];if(n=rn(f.W,"EXT-X-ENDLIST"))Nn(a,c.$d),a.b.za(m.endTime);w(r)})}p.onExpirationUpdated=function(){};
545
+ function In(a,b){var c,d,e,f,g,h,k,l,m,n,r,u,v,A,y;return J(function(z){switch(z.a){case 1:c=yn(a.G,b,a.J);if(0!=c.type)throw new M(2,4,4022);d=pn(c.W,"EXT-X-DEFINE");for(var D=q(d),B=D.next();!B.done;B=D.next()){var E=B.value;B=ln(E,"NAME");E=ln(E,"VALUE");B&&E&&(a.j.has(B)||a.j.set(B,E))}e=pn(c.W,"EXT-X-MEDIA");f=pn(c.W,"EXT-X-STREAM-INF");D=q(f);for(B=D.next();!B.done;B=D.next()){var H=B.value;E=ln(H,"AUDIO");B=ln(H,"VIDEO");var G=ln(H,"SUBTITLES");H=On(a,H);if(G){var F=Pn("text",H);a.f.set(G,
546
+ F);Cc(H,F)}E&&(G=Qn("audio",H),a.f.set(E,G));B&&(E=Qn("video",H),a.f.set(B,E))}return t(z,Rn(a,e),2);case 2:D=qn(e,"CLOSED-CAPTIONS");D=q(D);for(B=D.next();!B.done;B=D.next())G=B.value,B=Sn(G),E=mn(G,"GROUP-ID"),G=mn(G,"INSTREAM-ID"),a.A.get(E)||a.A.set(E,new Map),a.A.get(E).set(G,B);return t(z,Tn(a,f),3);case 3:return g=z.b,t(z,Un(a,e),4);case 4:h=z.b;if(!a.s)throw new M(2,7,7001);if(a.Ba&&0==g.length)throw new M(2,4,4034);l=k=Infinity;m=q(a.a.values());for(n=m.next();!n.done;n=m.next())r=n.value,
547
+ k=Math.min(k,r.Id),"text"!=r.stream.type&&(l=Math.min(l,r.Je-r.Id));a.c!=Gn?(a.b=new T(0,a.i.defaultPresentationDelay||3*a.M),a.b.Pb(!1)):(a.b=new T(null,0),a.b.Pb(!0));Vn(a);if(a.c!=Gn)a.da=a.T,u=Kn,a.c==u.Zd&&(v=a.b.qc,isNaN(a.i.availabilityWindowOverride)||(v=a.i.availabilityWindowOverride),a.b.od(v));else for(a.b.za(l),a.b.offset(-k),A=q(a.a.values()),n=A.next();!n.done;n=A.next())y=n.value,y.stream.segmentIndex.offset(-k),y.stream.segmentIndex.La(0,l);a.o={presentationTimeline:a.b,variants:g,
548
+ textStreams:h,offlineSessionIds:[],minBufferTime:0};a.s.makeTextStreamsForClosedCaptions(a.o);return t(z,a.s.filter(a.o),0)}})}function Ln(a,b){for(var c=new Map,d=q(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=ln(f,"NAME");var g=ln(f,"VALUE");f=ln(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.j.get(f))&&c.set(f,e)}return c}
549
+ function Un(a,b){var c,d,e,f,g,h,k,l,m,n,r,u;return J(function(v){if(1==v.a)return c=qn(b,"SUBTITLES"),d=c.map(function(A){var y,z,D;return J(function(B){if(1==B.a){if(y=a.i.disableText)return B["return"](null);x(B,2);return t(B,Wn(a,A),4)}if(2!=B.a)return z=B.b,B["return"](z.stream);D=C(B);if(a.i.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),t(v,Promise.all(d),2);e=v.b;f=q(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=mn(h,"GROUP-ID"),l=a.f.get(k))if(m=a.g.get(k))for(n=
550
+ q(m),r=n.next();!r.done;r=n.next())u=r.value,u.stream.codecs=l;return v["return"](e.filter(function(A){return A}))})}function Rn(a,b){var c;return J(function(d){if(1==d.a)return b=b.filter(function(e){var f=ln(e,"URI")||"";return"SUBTITLES"!=ln(e,"TYPE")&&""!=f}),b.length?t(d,Wn(a,b[0]),2):d.u(2);c=b.slice(1).map(function(e){return Wn(a,e)});return t(d,Promise.all(c),0)})}
551
+ function Tn(a,b){var c,d,e;return J(function(f){if(1==f.a)return c=b.map(function(g){var h,k,l,m,n,r,u;return J(function(v){return 1==v.a?(h=ln(g,"FRAME-RATE"),k=Number(mn(g,"BANDWIDTH")),l=ln(g,"RESOLUTION"),m=q(l?l.split("x"):[null,null]),n=m.next().value,r=m.next().value,t(v,Xn(a,g,l,h),2)):(u=v.b)?v["return"](Yn(a,u.audio,u.video,k,n,r,h)):v["return"]([])})}),t(f,Promise.all(c),2);d=f.b;e=d.reduce(Jb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
552
+ function Xn(a,b,c,d){var e,f,g,h,k,l,m,n,r,u,v,A,y,z;return J(function(D){if(1==D.a)return e=Pb,f=On(a,b),g=ln(b,"AUDIO"),h=ln(b,"VIDEO"),l=(k=g||h)&&a.g.has(k)?a.g.get(k):[],m={audio:g?l:[],video:h?l:[]},r=!1,u=mn(b,"URI"),v=m.audio.find(function(B){return B&&B.tc==u}),A=Pn(e.Da,f),y=c||d||A,1!=f.length||y?!l.length&&1<f.length?(n=e.Da,f=[f.join(",")]):m.audio.length&&v?(n=e.fb,r=!0):n=m.video.length?e.fb:e.Da:n=e.fb,r?D.u(2):t(D,Zn(a,b,f,n),3);2!=D.a&&(z=D.b);if(z)m[z.stream.type]=[z];else if(null===
553
+ z)return D["return"](null);$n(m);return D["return"](m)})}function On(a,b){var c=[];a.i.disableVideo||c.push("avc1.42E01E");a.i.disableAudio||c.push("mp4a.40.2");var d=ln(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=q(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=hd(f);c.has(g)||(e.push(f),c.add(g))}return e}function Sn(a){a=ln(a,"LANGUAGE")||"und";return S(a)}
554
+ function $n(a){a=q(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}
555
+ function Yn(a,b,c,d,e,f,g){for(var h=q(c),k=h.next();!k.done;k=h.next()){k=k.value.stream;var l=f,m=g;k&&(k.width=Number(e)||void 0,k.height=Number(l)||void 0,k.frameRate=Number(m)||void 0)}e=a.i.disableAudio;if(!b.length||e)b=[null];e=a.i.disableVideo;if(!c.length||e)c=[null];e=[];b=q(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=q(c),h=g.next();!h.done;h=g.next()){var n=h.value;h=f?f.stream:null;k=n?n.stream:null;l=f?f.stream.drmInfos:null;m=n?n.stream.drmInfos:null;n=(n?n.tc:"")+" - "+(f?
556
+ f.tc:"");h&&k&&!(l.length&&m.length?0<ae(l,m).length:1)||a.ta.has(n)||(h={id:a.Ca++,language:h?h.language:"und",primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0},e.push(h),a.ta.add(n))}return e}
557
+ function Wn(a,b){var c,d,e,f,g,h,k,l,m,n,r;return J(function(u){if(1==u.a){c=mn(b,"GROUP-ID");d="";var v=mn(b,"TYPE").toLowerCase();"subtitles"==v&&(v="text");e=v;"text"!=e&&c&&a.f.has(c)&&(d=a.f.get(c));f=ao(mn(b,"URI"),a.j);if(a.a.has(f))return u["return"](a.a.get(f));g=Sn(b);h=ln(b,"NAME");k=b.getAttribute("DEFAULT");l="YES"==k;v="audio"==e?(v=ln(b,"CHANNELS"))?parseInt(v.split("/")[0],10):null:null;m=v;n=ln(b,"CHARACTERISTICS");return t(u,bo(a,f,d,e,g,l,h,m,null,n),2)}r=u.b;a.g.has(c)?a.g.get(c).push(r):
558
+ a.g.set(c,[r]);if(null==r)return u["return"](null);if(a.a.has(f))return u["return"](a.a.get(f));a.a.set(f,r);return u["return"](r)})}
559
+ function Zn(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.a){e=ao(mn(b,"URI"),a.j);if(a.a.has(e))return k["return"](a.a.get(e));var l=ln(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.A.get(l):null;g=Qn(d,c);return t(k,bo(a,e,g,d,"und",!1,null,null,f,null),2)}h=k.b;if(null==h)return k["return"](null);if(a.a.has(e))return k["return"](a.a.get(e));a.a.set(e,h);return k["return"](h)})}
560
+ function bo(a,b,c,d,e,f,g,h,k,l){var m,n,r,u,v,A,y,z,D,B,E,H,G,F,I,O,U,P,Ha,aa,Da,ya,Sa,Ia,Aa,Qb,Fg,hl,il,jl,kl,Gg,Hg,De,ll,ml;return J(function(Ta){switch(Ta.a){case 1:return m=Nb([a.J],[b])[0],t(Ta,Hn(a,Lc([m],a.i.retryParameters),0),2);case 2:n=Ta.b;m=n.uri;r=yn(a.G,n.data,m);if(1!=r.type)throw new M(2,4,4017);u=[];if(r.segments)for(v=q(r.segments),A=v.next();!A.done;A=v.next())y=A.value,z=pn(y.W,"EXT-X-KEY"),u.push.apply(u,ia(z));D=!1;B=[];E=new Set;H=q(u);for(G=H.next();!G.done;G=H.next())if(F=
561
+ G.value,I=mn(F,"METHOD"),"NONE"!=I){D=!0;if("AES-128"==I)return a.Ba=!0,Ta["return"](null);O=mn(F,"KEYFORMAT");if(P=(U=co[O])?U(F):null){if(P.keyIds)for(Ha=q(P.keyIds),aa=Ha.next();!aa.done;aa=Ha.next())Da=aa.value,E.add(Da);B.push(P)}}if(D&&!B.length)throw new M(2,4,4026);ya=pn(r.W,"EXT-X-DEFINE");Sa=Ln(a,ya);eo(a,r);return t(Ta,fo(a,d,c,r,Sa),3);case 3:return Ia=Ta.b,go.includes(Ia)&&(c=""),Aa=new Map,x(Ta,4),t(Ta,Mn(a,b,r,Ia,Aa,Sa),6);case 6:Qb=Ta.b;ua(Ta,5);break;case 4:Fg=C(Ta);if(4035==Fg.code)return Xa("Skipping unsupported HLS stream",
562
+ Ia,b),Ta["return"](null);throw Fg;case 5:hl=Qb[0].startTime;il=Qb[Qb.length-1].endTime;jl=new V(Qb);kl="text"==d?"subtitle":void 0;Gg=[];if(l)for(Hg=q(l.split(",")),De=Hg.next();!De.done;De=Hg.next())ll=De.value,Gg.push(ll);ml={id:a.Ca++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:jl,mimeType:Ia,codecs:c,kind:kl,encrypted:D,drmInfos:B,keyIds:E,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,
563
+ width:void 0,height:void 0,bandwidth:void 0,roles:Gg,channelsCount:h,audioSamplingRate:null,closedCaptions:k};return Ta["return"]({stream:ml,tc:b,be:m,Id:hl,Je:il,Hd:Aa})}})}function eo(a,b){var c=rn(b.W,"EXT-X-PLAYLIST-TYPE"),d=rn(b.W,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;d?Nn(a,Gn):(c?Nn(a,ho):Nn(a,io),d=jo(b.W,"EXT-X-TARGETDURATION"),d=Number(d.value),a.M=Math.max(d,a.M),a.T=Math.min(d,a.T))}
564
+ function ko(a,b,c,d){c=rn(c,"EXT-X-MAP");if(!c)return null;var e=mn(c,"URI");d=ao(Nb([b],[e])[0],d);b=[d,ln(c,"BYTERANGE","")].join("-");a.I.has(b)||(c=lo(d,c),a.I.set(b,c));return a.I.get(b)}function lo(a,b){var c=0,d=null,e=ln(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new kg(function(){return[a]},c,d)}
565
+ function mo(a,b,c,d,e,f){var g=c.W,h=ao(c.a,f);c=jo(g,"EXTINF").value.split(",");c=d+Number(c[0]);f=0;var k=null;if(g=rn(g,"EXT-X-BYTERANGE"))f=g.value.split("@"),g=Number(f[0]),f=f[1]?Number(f[1]):b.a+1,k=f+g-1;return new mg(d,c,function(){return[h]},f,k,a,e,0,Infinity)}function Vn(a){if(a.b){for(var b=q(a.X),c=b.next();!c.done;c=b.next())a.b.ob(c.value);a.X=[]}}
566
+ function Mn(a,b,c,d,e,f){var g,h,k,l,m,n,r,u,v,A,y,z,D,B,E,H,G,F,I,O,U;return J(function(P){switch(P.a){case 1:g=c.segments;k=sn(c.W,"EXT-X-MEDIA-SEQUENCE",0);if(a.c!=Gn&&e.has(k)){l=e.get(k);P.u(2);break}if(null!=a.D){P.u(3);break}h=ko(a,c.a,g[0].W,f);m=a;return t(P,no(a,b,h,d,k,!1,g[0],f),4);case 4:m.D=P.b;case 3:l=a.D;case 2:n=g[0].a,ab(n.split("/").pop()),r=sn(c.W,"EXT-X-DISCONTINUITY-SEQUENCE"),u=a.v.get(r)||0,v=[],A=function(Ha){return jb(Ha)},y=q(A(g)),z=y.next();case 5:if(z.done){P.u(7);break}B=
567
+ D=z.value;E=B.Z;H=B.item;G=v[v.length-1];F=0==E?l:G.endTime;I=k+E;e.set(I,F);h=ko(a,c.a,H.W,f);O=rn(H.W,"EXT-X-DISCONTINUITY");if(!O){P.u(8);break}r++;return t(P,oo(a,r,b,h,d,I,H,f,F),9);case 9:u=P.b;case 8:U=mo(h,G,H,F,u,f);v.push(U);z=y.next();P.u(5);break;case 7:return a.X.push(v),Vn(a),P["return"](v)}})}
568
+ function oo(a,b,c,d,e,f,g,h,k){var l,m;return J(function(n){if(1==n.a)return l=0,a.v.has(b)?(l=a.v.get(b),n.u(2)):t(n,no(a,c,d,e,f,!0,g,h),3);2!=n.a&&(m=n.b,l=k-m,a.v.set(b,l));return n["return"](l)})}
569
+ function po(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:c=Rc;d=$g(b.c(),b.b,b.a,a.i.retryParameters);if(a.i.hls.useFullSegmentsForStartTime)return k["return"](Hn(a,d,c));e=$g(b.c(),b.b,b.b+2048-1,a.i.retryParameters);x(k,2);return t(k,Hn(a,e,c),4);case 4:return f=k.b,k["return"](f);case 2:g=C(k);if(7001==g.code)throw g;Xa("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
570
+ e.uris[0]);return t(k,Hn(a,d,c),5);case 5:return h=k.b,k["return"](h)}})}
571
+ function no(a,b,c,d,e,f,g,h){var k,l,m,n,r,u,v,A;return J(function(y){switch(y.a){case 1:k=mo(c,null,g,0,0,h);if(a.o&&!f&&(l=a.a.get(b),m=l.Hd.get(e),void 0!=m))return y["return"](m);d=d.toLowerCase();if(go.includes(d))throw Xa("Raw formats are not yet supported. Skipping "+d),new M(1,4,4035);if("video/webm"==d)throw Xa("WebM in HLS is not yet supported. Skipping."),new M(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){y.u(2);break}n=[po(a,k)];c&&n.push(po(a,c));return t(y,Promise.all(n),3);case 3:return r=
572
+ y.b,u=r[0],v=r[1]||r[0],y["return"](qo(b,u.uri,u.data,v.data));case 2:if("video/mp2t"!=d){y.u(4);break}return t(y,po(a,k),5);case 5:return A=y.b,y["return"](ro(b,A.uri,A.data));case 4:throw new M(2,4,4030,b);}})}
573
+ function qo(a,b,c,d){var e=0;(new fe).box("moov",je).box("trak",je).box("mdia",je).V("mdhd",function(h){h.reader.skip(0==h.version?8:16);e=h.reader.K();h.parser.stop()}).parse(d,!0);if(!e)throw new M(2,4,4030,a,b);var f=0,g=!1;(new fe).box("moof",je).box("traf",je).V("tfdt",function(h){f=(0==h.version?h.reader.K():h.reader.rb())/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new M(2,4,4030,a,b);return f}
574
+ function ro(a,b,c){function d(){f.seek(g+188);h=f.qa();71!=h&&(f.seek(g+192),h=f.qa());71!=h&&(f.seek(g+204),h=f.qa());71!=h&&e();f.Qd(1)}function e(){throw new M(2,4,4030,a,b);}for(var f=new R(c,0),g=0,h=0;;)if(g=f.C,h=f.qa(),71!=h&&e(),c=f.Mb(),8191==(c&8191))d();else if(c&16384)if(c=(f.qa()&48)>>4,0!=c&&2!=c||e(),3==c&&(c=f.qa(),f.skip(c)),1!=f.K()>>8)d();else{f.skip(3);c=f.qa()>>6;0!=c&&1!=c||e();0==f.qa()&&e();c=f.qa();var k=f.Mb(),l=f.Mb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>
575
+ 1))/9E4}else d()}function Qn(a,b){if(1==b.length)return b[0];var c=Pn(a,b);if(null!=c)return c;throw new M(2,4,4025,b);}function Pn(a,b){for(var c=q(so[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=q(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return"text"==a?"":null}
576
+ function ao(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=q(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new M(2,4,4039,f);}}return c}
577
+ function fo(a,b,c,d,e){var f,g,h,k,l,m,n,r,u,v;return J(function(A){if(1==A.a){f=Pb;g=Rc;h=ao(d.segments[0].a,e);k=new rb(h);l=k.ka.split(".").pop();m=to[b];if(n=m[l])return A["return"](n);if(b==f.aa)return c&&"vtt"!=c&&"wvtt"!=c?A["return"]("application/mp4"):A["return"]("text/vtt");r=Lc([h],a.i.retryParameters);r.method="HEAD";return t(A,Hn(a,r,g),2)}u=A.b;v=u.headers["content-type"];if(!v)throw new M(2,4,4021,l);return A["return"](v.split(";")[0])})}
578
+ function jo(a,b){var c=rn(a,b);if(!c)throw new M(2,4,4024,b);return c}p.Kb=function(){var a=this,b,c;return J(function(d){if(1==d.a){if(!a.s)return d["return"]();x(d,2);return t(d,a.update(),4)}if(2!=d.a)return b=a.da,a.h.R(b),ua(d,0);c=C(d);if(!a.s)return d["return"]();c.severity=1;a.s.onError(c);a.h.R(.1);w(d)})};function Nn(a,b){a.c=b;a.b&&a.b.Pb(a.c==Gn);a.c!=Gn||a.h.stop()}function Hn(a,b,c){if(!a.m)throw new M(2,7,7001);b=a.s.networkingEngine.request(c,b);Gc(a.m,b);return b.promise}
579
+ K("shaka.hls.HlsParser",Fn);
580
+ var so={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},go=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],to={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",
581
+ cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}},co={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=mn(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=mn(a,"URI");b=En(b);b=L(b.data);b=Ob("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=ln(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
582
+ return b}},Gn="VOD",io="EVENT",ho="LIVE",Kn={$d:Gn,sf:io,Zd:ho};ig.m3u8=function(){return new Fn};gg["application/x-mpegurl"]=function(){return new Fn};gg["application/vnd.apple.mpegurl"]=function(){return new Fn};function uo(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Nd:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Xb(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function vo(){}function wo(a,b,c,d){var e=new xo;bd(b.headers).forEach(function(k,l){e.append(l,k)});var f=new yo,g={vd:!1,Wd:!1};a=zo(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d);a=new pc(a,function(){g.vd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new N(function(){g.Wd=!0;f.abort()});h.R(b/1E3);a["finally"](function(){h.stop()})}return a}
583
+ function zo(a,b,c,d,e){var f,g,h,k,l,m,n,r,u,v,A,y,z,D;return J(function(B){switch(B.a){case 1:return f=Ao,g=Bo,m=l=0,n=Date.now(),x(B,2),t(B,f(a,c),4);case 4:return h=B.b,r=h.clone().body.getReader(),v=(u=h.headers.get("Content-Length"))?parseInt(u,10):0,A=function(E){function H(){var G,F;return J(function(I){switch(I.a){case 1:return x(I,2),t(I,r.read(),4);case 4:G=I.b;ua(I,3);break;case 2:return C(I),I["return"]();case 3:G.done||(l+=G.value.byteLength);F=Date.now();if(100<F-n||G.done)e(F-n,l-m,
584
+ v-l),m=l,n=F;G.done?E.close():(E.enqueue(G.value),H());w(I)}})}H()},new g({start:A}),t(B,h.arrayBuffer(),5);case 5:k=B.b;ua(B,3);break;case 2:y=C(B);if(d.vd)throw new M(1,1,7001,a,b);if(d.Wd)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,y,b);case 3:return z={},D=h.headers,D.forEach(function(E,H){z[H.trim()]=E}),B["return"](uo(z,k,h.status,a,h.url,b))}})}
585
+ function Co(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",vo);vo.isSupported=Co;vo.parse=wo;var Ao=window.fetch,yo=window.AbortController,Bo=window.ReadableStream,xo=window.Headers;Co()&&(Ic("http",wo,2),Ic("https",wo,2));function Do(){}
586
+ function Eo(a,b,c,d){var e=new Fo,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new M(1,1,7001,a,c))};e.onload=function(n){n=n.target;var r=n.getAllResponseHeaders().trim().split("\r\n"),u={};r=q(r);for(var v=r.next();!v.done;v=r.next())v=v.value.split(": "),u[v[0].toLowerCase()]=v.slice(1).join(": ");try{var A=uo(u,n.response,n.status,a,n.responseURL,
587
+ c);k(A)}catch(y){l(y)}};e.onerror=function(n){l(new M(1,1,1002,a,n,c))};e.ontimeout=function(){l(new M(1,1,1003,a,c))};e.onprogress=function(n){var r=Date.now();if(100<r-f||n.lengthComputable&&n.loaded==n.total)d(r-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=r};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new pc(h,function(){e.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",Do);Do.parse=Eo;var Fo=window.XMLHttpRequest;
588
+ Ic("http",Eo,1);Ic("https",Eo,1);function Go(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function Ho(a,b){a.b+=b;var c=a.g;a.g++;a.c.set(c,b);return c}Go.prototype.close=function(a,b){if(this.c.has(a)){var c=this.c.get(a);this.c["delete"](a);this.f+=c;this.a+=b}};function Io(a){var b=this;this.N=a;this.a=new Map;this.F=new Sc(function(){var c=Array.from(b.a.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.b=[];this.Md=function(){};this.Ld=function(){};this.Cb=new Go}Io.prototype.destroy=function(){return this.F.destroy()};function Jo(a,b,c){a.Md=b;a.Ld=c}function Ko(a){var b=a.b.map(function(c){return c()});a.b=[];return Promise.all(b)}
589
+ function Lo(a,b,c,d,e,f){Tc(a.F);var g=Ho(a.Cb,d);d=(a.a.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,r,u;return J(function(v){if(1==v.a)return t(v,Mo(a,c),2);h=v.b;if(a.F.a)throw new M(2,9,7001);if(e)for(m in k=L(h),l=new dl(k),l.data)n=Number(m),r=l.data[n],u=l.a[n],a.Ld(r,u);a.Cb.close(g,h.byteLength);var A=a.Cb;a.Md(0==A.b?0:A.f/A.b,a.Cb.a);return v["return"](f(h))})});a.a.set(b,d);return d}
590
+ function No(a,b,c){Tc(a.F);var d=(a.a.get(b)||Promise.resolve()).then(function(){return J(function(e){return t(e,c(),0)})});a.a.set(b,d)}function Oo(a){return J(function(b){return 1==b.a?t(b,Promise.all(a.a.values()),2):b["return"](a.Cb.a)})}function Mo(a,b){var c,d,e,f;return J(function(g){if(1==g.a)return c=Rc,d=a.N.request(c,b),e=function(){return d.abort()},a.b.push(e),t(g,d.promise,2);f=g.b;Cc(a.b,e);return g["return"](f.data)})};function Po(a,b){var c=this;this.c=a;this.b=a.objectStore(b);this.a=new Rb;a.onabort=function(d){d.preventDefault();c.a.reject()};a.onerror=function(d){d.preventDefault();c.a.reject()};a.oncomplete=function(){c.a.resolve()}}Po.prototype.abort=function(){var a=this;return J(function(b){if(1==b.a){try{a.c.abort()}catch(c){}x(b,2);return t(b,a.a,4)}if(2!=b.a)return ua(b,0);C(b);w(b)})};
591
+ function Qo(a,b){return new Promise(function(c,d){var e=a.b.openCursor();e.onerror=d;e.onsuccess=function(){var f;return J(function(g){if(1==g.a){if(null==e.result)return c(),g["return"]();f=e.result;return t(g,b(f.key,f.value,f),2)}f["continue"]();w(g)})}})}Po.prototype.store=function(){return this.b};Po.prototype.promise=function(){return this.a};function Ro(a){this.b=a;this.a=[]}Ro.prototype.destroy=function(){return Promise.all(this.a.map(function(a){return a.abort()}))};function So(a,b){return To(a,b,"readwrite")}function To(a,b,c){c=a.b.transaction([b],c);var d=new Po(c,b);a.a.push(d);d.promise().then(function(){Cc(a.a,d)},function(){Cc(a.a,d)});return d};function Uo(a,b,c){this.b=new Ro(a);this.c=b;this.a=c}p=Uo.prototype;p.destroy=function(){return this.b.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return Vo(this.c)};p.removeSegments=function(a,b){return Wo(this,this.c,a,b)};p.getSegments=function(a){var b=this,c;return J(function(d){if(1==d.a)return t(d,Xo(b,b.c,a),2);c=d.b;return d["return"](c.map(function(e){return b.wd(e)}))})};p.addManifests=function(){return Vo(this.a)};
592
+ p.updateManifestExpiration=function(a,b){var c=So(this.b,this.a),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 Wo(this,this.a,a,b)};p.getManifests=function(a){var b=this,c;return J(function(d){if(1==d.a)return t(d,Xo(b,b.a,a),2);c=d.b;return d["return"](Promise.all(c.map(function(e){return b.Bb(e)})))})};
593
+ p.getAllManifests=function(){var a=this,b,c;return J(function(d){return 1==d.a?(b=To(a.b,a.a,"readonly"),c=new Map,t(d,Qo(b,function(e,f){var g;return J(function(h){if(1==h.a)return t(h,a.Bb(f),2);g=h.b;c.set(e,g);w(h)})}),2)):3!=d.a?t(d,b.promise(),3):d["return"](c)})};p.wd=function(a){return a};p.Bb=function(a){return Promise.resolve(a)};function Vo(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}
594
+ p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){if(1==m.a){d=So(c.b,a);e=d.store();f=[];g={};h=q(b);for(k=h.next();!k.done;g={Vb:g.Vb},k=h.next())l=k.value,g.Vb=e.add(l),g.Vb.onsuccess=function(n){return function(){f.push(n.Vb.result)}}(g);return t(m,d.promise(),2)}return m["return"](f)})};
595
+ function Wo(a,b,c,d){a=So(a.b,b);b=a.store();var e={};c=q(c);for(var f=c.next();!f.done;e={Ub:e.Ub},f=c.next())e.Ub=f.value,b["delete"](e.Ub).onsuccess=function(g){return function(){return d(g.Ub)}}(e);return a.promise()}
596
+ function Xo(a,b,c){var d,e,f,g,h,k,l;return J(function(m){if(1==m.a){d=To(a.b,b,"readonly");e=d.store();f={};g=[];h={};k=q(c);for(l=k.next();!l.done;h={wb:h.wb,ub:h.ub},l=k.next())h.ub=l.value,h.wb=e.get(h.ub),h.wb.onsuccess=function(n){return function(){void 0==n.wb.result&&g.push(n.ub);f[n.ub]=n.wb.result}}(h);return t(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Yo(a){this.a=new Ro(a)}Yo.prototype.destroy=function(){return this.a.destroy()};Yo.prototype.getAll=function(){var a=this,b,c;return J(function(d){return 1==d.a?(b=To(a.a,"session-ids","readonly"),c=[],t(d,Qo(b,function(e,f){c.push(f)}),2)):3!=d.a?t(d,b.promise(),3):d["return"](c)})};Yo.prototype.add=function(a){var b=So(this.a,"session-ids"),c=b.store();a=q(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
597
+ Yo.prototype.remove=function(a){var b=this,c;return J(function(d){return 1==d.a?(c=So(b.a,"session-ids"),t(d,Qo(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):t(d,c.promise(),0)})};function Zo(){this.a=new Map}Zo.prototype.destroy=function(){for(var a=[],b=q(this.a.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.a.clear();return Promise.all(a)};Zo.prototype.init=function(){var a=this;$o.forEach(function(e,f){var g=e();g&&a.a.set(f,g)});for(var b=[],c=q(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
598
+ function ap(a){var b=null;a.a.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{ya:d,ca:f},ca:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function bp(a,b){a.a.forEach(function(c,d){c.getCells().forEach(function(e,f){b({ya:d,ca:f},e)})})}
599
+ function cp(a,b,c){a=a.a.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function dp(a,b){a.a.forEach(function(c){b(c.getEmeSessionCell())})}function ep(a){var b=Array.from(a.a.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.a.get(b[0]).getEmeSessionCell()}
600
+ function fp(a){var b,c,d;return J(function(e){return 1==e.a?(b=Array.from(a.a.values()),c=0<b.length,c||(d=$o,d.forEach(function(f){(f=f())&&b.push(f)})),t(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):t(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function gp(a,b){$o.set(a,b)}K("shaka.offline.StorageMuxer",Zo);Zo.unregister=function(a){$o["delete"](a)};Zo.register=gp;Zo.prototype.destroy=Zo.prototype.destroy;var $o=new Map;function hp(){Uo.apply(this,arguments)}pa(hp,Uo);hp.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return J(function(g){d=So(c.b,c.a);e=d.store();f=new Rb;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return t(g,Promise.all([d.promise(),f]),0)})};
601
+ hp.prototype.Bb=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.a){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=ip(a.periods[c],e),b.push(f);return t(h,Bm(b),2)}g=h.b;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
602
+ function ip(a,b){jp(a);for(var c=q(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return kp(e,a.startTime,b)})}
603
+ function kp(a,b,c){var d=a.initSegmentUri?lp(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,kind:a.kind,language:a.language,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=lp(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,
604
+ initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}}hp.prototype.wd=function(a){return{data:a.data}};function lp(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 M(2,9,9004,"Could not parse uri "+a);}
605
+ function jp(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=q(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=q(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=q(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
606
+ f=q(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=q(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=q(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function mp(){Uo.apply(this,arguments)}pa(mp,Uo);
607
+ mp.prototype.Bb=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.a){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=q(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(np(n,k.startTime,k.startTime+e));f=l;b.push(f)}return t(h,Bm(b),2)}g=h.b;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
608
+ a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
609
+ function np(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,kind:a.kind,language:a.language,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,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
610
+ dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}};function op(){Uo.apply(this,arguments)}pa(op,Uo);op.prototype.hasFixedKeySpace=function(){return!1};op.prototype.addSegments=function(a){return this.add(this.c,a)};op.prototype.addManifests=function(a){return this.add(this.a,a)};op.prototype.Bb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function pp(){this.h=this.f=this.c=this.b=this.a=this.g=null}p=pp.prototype;
611
+ p.init=function(){var a=this,b=new Rb,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.g=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new hp(d,"segment","manifest"):null;a.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new mp(d,"segment-v2","manifest-v2"):null;a.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new mp(d,"segment-v3","manifest-v3"):null;a.c=e;e=d.objectStoreNames;
612
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new op(d,"segment-v5","manifest-v5"):null;a.f=e;d=d.objectStoreNames.contains("session-ids")?new Yo(d):null;a.h=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=q(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new M(2,9,9001,c.error));d.preventDefault()};return b};
613
+ p.destroy=function(){var a=this;return J(function(b){switch(b.a){case 1:if(!a.a){b.u(2);break}return t(b,a.a.destroy(),2);case 2:if(!a.b){b.u(4);break}return t(b,a.b.destroy(),4);case 4:if(!a.c){b.u(6);break}return t(b,a.c.destroy(),6);case 6:if(!a.f){b.u(8);break}return t(b,a.f.destroy(),8);case 8:if(!a.h){b.u(10);break}return t(b,a.h.destroy(),10);case 10:a.g&&a.g.close(),w(b)}})};
614
+ p.getCells=function(){var a=new Map;this.a&&a.set("v1",this.a);this.b&&a.set("v2",this.b);this.c&&a.set("v3",this.c);this.f&&a.set("v5",this.f);return a};p.getEmeSessionCell=function(){return this.h};
615
+ p.erase=function(){var a=this;return J(function(b){switch(b.a){case 1:if(!a.a){b.u(2);break}return t(b,a.a.destroy(),2);case 2:if(!a.b){b.u(4);break}return t(b,a.b.destroy(),4);case 4:if(!a.c){b.u(6);break}return t(b,a.c.destroy(),6);case 6:if(!a.f){b.u(8);break}return t(b,a.f.destroy(),8);case 8:return a.g&&a.g.close(),t(b,qp(),10);case 10:return a.g=null,a.a=null,a.b=null,a.c=null,a.f=null,t(b,a.init(),0)}})};
616
+ function qp(){var a=new Rb,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}gp("idb",function(){return md("CrKey")||!window.indexedDB?null:new pp});function rp(a,b,c,d){this.a=a;this.g=b;this.f=c;this.c=d;this.b=["offline:",a,"/",b,"/",c,"/",d].join("")}rp.prototype.ya=function(){return this.g};rp.prototype.ca=function(){return this.f};rp.prototype.key=function(){return this.c};rp.prototype.toString=function(){return this.b};
617
+ function sp(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new rp(b,c,d,Number(a[4])):null};function tp(a,b){this.b=a;this.a=b}
618
+ function up(a,b){var c=new T(null,0);c.za(b.duration);var d=b.streams.filter(function(k){return"audio"==k.type}),e=b.streams.filter(function(k){return"video"==k.type});d=vp(a,d,e,c);e=b.streams.filter(function(k){return"text"==k.type}).map(function(k){return wp(a,k,c)});var f=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var g=q(d.values()),h=g.next();!h.done;h=g.next())h=h.value,h.audio&&h.audio.encrypted&&(h.audio.drmInfos=f),h.video&&h.video.encrypted&&(h.video.drmInfos=f);return{presentationTimeline:c,
619
+ minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e}}
620
+ function vp(a,b,c,d){for(var e=new Set,f=q(b),g=f.next();!g.done;g=f.next()){var h=q(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=q(c);for(g=f.next();!g.done;g=f.next())for(h=q(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=q(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0});b=q(b);for(e=b.next();!e.done;e=b.next())for(e=e.value,
621
+ g=wp(a,e,d),h=q(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=q(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=wp(a,e,d),g=q(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
622
+ function wp(a,b,c){var d=b.segments.map(function(e){return xp(a,e)});c.ob(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new V(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
623
+ roles:b.roles,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,closedCaptions:b.closedCaptions}}function xp(a,b){var c=new rp("segment",a.b,a.a,b.dataKey);return new mg(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?yp(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}function yp(a,b){var c=new rp("segment",a.b,a.a,b);return new kg(function(){return[c.toString()]},0,null)};function zp(){this.a=null}p=zp.prototype;p.configure=function(){};
624
+ p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.a){case 1:d=sp(a);c.a=d;if(null==d||"manifest"!=d.a)throw new M(2,1,9004,a);e=new Zo;ta(m);return t(m,e.init(),4);case 4:return t(m,cp(e,d.ya(),d.ca()),5);case 5:return f=m.b,t(m,f.getManifests([d.key()]),6);case 6:return g=m.b,h=g[0],k=new tp(d.ya(),d.ca()),l=up(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return va(m),t(m,e.destroy(),7);case 7:wa(m,0)}})};p.stop=function(){return Promise.resolve()};
625
+ p.update=function(){};p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.a){case 1:return d=c.a,e=new Zo,x(m,2,3),t(m,e.init(),5);case 5:return t(m,cp(e,d.ya(),d.ca()),6);case 6:return f=m.b,t(m,f.getManifests([d.key()]),7);case 7:g=m.b;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return t(m,f.updateManifestExpiration(d.key(),b),3);case 3:return va(m),t(m,e.destroy(),10);case 10:wa(m,0);break;case 2:C(m),m.u(3)}})};
626
+ gg["application/x-offline-manifest"]=function(){return new zp};function Ap(){}function Bp(a){var b=sp(a);b&&"manifest"==b.a?(a={uri:a,Nd:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=sc(a)):a=b&&"segment"==b.a?Cp(b.key(),b):qc(new M(2,1,9004,a));return a}
627
+ function Cp(a,b){var c=new Zo;return sc(void 0).U(function(){return c.init()}).U(function(){return cp(c,b.ya(),b.ca())}).U(function(d){return d.getSegments([b.key()])}).U(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}K("shaka.offline.OfflineScheme",Ap);Ap.plugin=Bp;Ic("offline",Bp);function Dp(a,b,c){var d,e,f,g,h,k;return J(function(l){switch(l.a){case 1:d=[];for(var m=[],n=q(c),r=n.next();!r.done;r=n.next()){r=r.value;for(var u=!1,v=q(m),A=v.next();!A.done;A=v.next())if(A=A.value,Ep(A.info,r)){A.sessionIds.push(r.sessionId);u=!0;break}u||m.push({info:r,sessionIds:[r.sessionId]})}e=q(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Fp(a,b,g);return t(l,h,5);case 5:k=l.b;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l["return"](d)}})}
628
+ function Fp(a,b,c){var d,e;return J(function(f){switch(f.a){case 1:return d=new rd({nb:b,onError:function(){},nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),x(f,2),d.configure(a),t(f,zd(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return C(f),t(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return x(f,6),t(f,Id(d),8);case 8:ua(f,7);break;case 6:return C(f),t(f,d.destroy(),
629
+ 9);case 9:return f["return"]([]);case 7:return e=[],t(f,Promise.all(c.sessionIds.map(function(g){return J(function(h){if(1==h.a)return x(h,2),t(h,Jd(d,g),4);if(2!=h.a)return e.push(g),ua(h,0);C(h);w(h)})})),10);case 10:return t(f,d.destroy(),11);case 11:return f["return"](e)}})}
630
+ function Ep(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Dc(a.audioCapabilities,b.audioCapabilities,c)&&Dc(a.videoCapabilities,b.videoCapabilities,c)};function Gp(a,b,c){var d=b.presentationTimeline.getDuration();b=Hp(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function Ip(a,b){var c=up(new tp(a.ya(),a.ca()),b),d=b.appMetadata||{};c=Hp(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
631
+ function Hp(a){var b=[],c=Nf(a.variants);c=q(c);for(var d=c.next();!d.done;d=c.next())b.push(Gf(d.value));a=q(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Hf(c.value));return b};function Jp(){this.a={}}function Kp(a,b,c){c=c.endTime-c.startTime;return Lp(a,b)*c}function Lp(a,b){var c=a.a[b];null==c&&(c=0);return c};function Mp(a,b,c){a.variants=a.variants.filter(function(d){return Df(d,b,c)})}function Np(a){a.variants=a.variants.filter(function(b){var c=!0;b.audio&&(c=c&&cf(b.audio));b.video&&(c=c&&cf(b.video));return c})}function Op(a,b){a.variants=a.variants.filter(function(c){return $d(b,c)})};function Pp(a){var b=this;if(a&&a.constructor!=W)throw new M(2,9,9008);this.N=this.i=null;a?(this.i=a.i,this.N=a.Fb()):(this.i=Yh(),this.N=new Hc);this.rc=[];this.Lb=[];this.cd=[];this.a=new Map;this.a.set(null,Promise.resolve(null));this.b=new Map;var c=!a;this.F=new Sc(function(){var d,e,f,g,h;return J(function(k){switch(k.a){case 1:return t(k,Promise.all(b.cd.map(function(l){return Ko(l)})),2);case 2:d=function(){};e=[];f=q(b.Lb);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));
632
+ return t(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return t(k,b.N.destroy(),4);case 4:b.i=null,b.N=null,w(k)}})})}function Qp(){if(id())a:{var a=q($o.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=Pp.prototype;p.destroy=function(){return this.F.destroy()};
633
+ p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Wh(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Fb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return $h(this.i,a)};p.getConfiguration=function(){var a=Yh();$h(a,this.i,Yh());return a};p.Fb=function(){return this.N};
634
+ p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Io(this.N);this.cd.push(f);b=Rp(this,a,b||{},function(){var h;return J(function(k){if(1==k.a)return t(k,fg(a,d.N,e.manifest.retryParameters,c||null),2);h=k.b;return k["return"](Mb(h))})},e,f);var g=new pc(b,function(){return Ko(f)});g["finally"](function(){Cc(d.cd,f)});g.then=function(h){Fb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
635
+ return g.promise.then(h)};return Sp(this,g)};p.Be=function(){Fb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
636
+ function Rp(a,b,c,d,e,f){var g,h,k,l,m,n,r,u,v,A,y;return J(function(z){switch(z.a){case 1:return Tp(),h=g=null,k=new Zo,m=l=null,x(z,2,3),t(z,d(),5);case 5:return g=z.b,t(z,Up(a,b,g,e),6);case 6:n=z.b;Vp(a);r=!n.presentationTimeline.S()&&!n.presentationTimeline.Ua();if(!r)throw new M(2,9,9005,b);return t(z,Wp(a,n,function(D){m=m||D},e),7);case 7:h=z.b;Vp(a);if(m)throw m;return t(z,a.gb(n,h,e),8);case 8:return t(z,k.init(),9);case 9:return Vp(a),t(z,ap(k),10);case 10:return l=z.b,Vp(a),t(z,Xp(a,l.ca,
637
+ h,n,b,c,e,f),11);case 11:u=z.b;Vp(a);if(m)throw m;return t(z,l.ca.addManifests([u]),12);case 12:return v=z.b,Vp(a),A=new rp("manifest",l.path.ya,l.path.ca,v[0]),z["return"](Ip(A,u));case 3:return va(z),a.rc=[],t(z,k.destroy(),13);case 13:if(!g){z.u(14);break}return t(z,g.stop(),14);case 14:if(!h){z.u(16);break}return t(z,h.destroy(),16);case 16:wa(z,0);break;case 2:y=C(z);if(!l){z.u(18);break}return t(z,l.ca.removeSegments(a.rc,function(){}),18);case 18:throw m||y;}})}
638
+ p.gb=function(a,b,c){var d,e,f,g,h,k,l,m,n,r,u,v,A,y,z;return J(function(D){if(1==D.a){d={width:Infinity,height:Infinity};Mp(a,c.restrictions,d);Np(a);Op(a,b);e=[];f=c.preferredAudioChannelCount;Bf(a,f);g=q(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(Gf(k));l=q(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(Hf(n));return t(D,c.offline.trackSelectionCallback(e),2)}r=D.b;u=new Set;v=new Set;A=q(r);for(y=A.next();!y.done;y=A.next())z=y.value,"variant"==z.type&&u.add(z.id),
639
+ "text"==z.type&&v.add(z.id);a.variants=a.variants.filter(function(B){return u.has(B.id)});a.textStreams=a.textStreams.filter(function(B){return v.has(B.id)});Yp(a);w(D)})};
640
+ function Xp(a,b,c,d,e,f,g,h){var k,l,m,n,r,u,v,A,y,z,D,B;return J(function(E){switch(E.a){case 1:return k=Gp(e,d,f),l=g.offline.progressCallback,m=function(H,G){k.size=G;l(k,H)},n=function(H,G){v&&g.offline.usePersistentLicense&&A==G&&Hd(c,"cenc",H)},Jo(h,m,n),r=d.variants.some(function(H){var G=H.audio&&H.audio.encrypted;return H.video&&H.video.encrypted||G}),u=d.variants.some(function(H){return(H.video?H.video.drmInfos:[]).concat(H.audio?H.audio.drmInfos:[]).some(function(G){return G.initData&&
641
+ G.initData.length})}),v=r&&!u,A=null,v&&(y=c.c,A=Zp.get(y.keySystem)),ta(E),D=z=$p(a,h,b,c,d,e,f,g),t(E,Oo(h),4);case 4:D.size=E.b;z.expiration=c.Eb();B=Od(c);z.sessionIds=g.offline.usePersistentLicense?B:[];if(r&&g.offline.usePersistentLicense&&!B.length)throw new M(2,9,9007);return E["return"](z);case 2:return va(E),t(E,h.destroy(),5);case 5:wa(E,0)}})}p.remove=function(a){return aq(this,bq(this,a))};
642
+ function bq(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:Tp();c=sp(b);if(null==c||"manifest"!=c.a)throw new M(2,9,9004,b);d=c;e=new Zo;ta(k);return t(k,e.init(),4);case 4:return t(k,cp(e,d.ya(),d.ca()),5);case 5:return f=k.b,t(k,f.getManifests([d.key()]),6);case 6:return g=k.b,h=g[0],t(k,Promise.all([cq(a,h,e),dq(f,d,h)]),2);case 2:return va(k),t(k,e.destroy(),8);case 8:wa(k,0)}})}
643
+ function eq(a,b){for(var c=[],d=q(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:ed(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ed(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function cq(a,b,c){return J(function(d){return t(d,fq(a.N,a.i.drm,c,b),0)})}
644
+ function dq(a,b,c){function d(){}var e=gq(c);Ip(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Te=function(){return aq(this,hq(this))};
645
+ function hq(a){var b,c,d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:return Tp(),b=a.N,c=a.i.drm,d=new Zo,e=!1,ta(n),t(n,d.init(),4);case 4:f=[],dp(d,function(r){return f.push(r)}),g=q(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return t(n,k.getAll(),8);case 8:return l=n.b,t(n,Dp(c,b,l),9);case 9:return m=n.b,t(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return va(n),t(n,d.destroy(),11);case 11:wa(n,3);break;case 3:return n["return"](!e)}})}
646
+ p.list=function(){return aq(this,iq())};function iq(){var a,b,c;return J(function(d){switch(d.a){case 1:return Tp(),a=[],b=new Zo,ta(d),t(d,b.init(),4);case 4:return c=Promise.resolve(),bp(b,function(e,f){c=c.then(function(){var g;return J(function(h){if(1==h.a)return t(h,f.getAllManifests(),2);g=h.b;g.forEach(function(k,l){var m=Ip(new rp("manifest",e.ya,e.ca,l),k);a.push(m)});w(h)})})}),t(d,c,2);case 2:return va(d),t(d,b.destroy(),6);case 6:wa(d,3);break;case 3:return d["return"](a)}})}
647
+ function Up(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.a)return e=null,f=a.N,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m}},c.configure(d.manifest),Vp(a),t(l,c.start(b,g),2);if(3!=l.a)return h=l.b,Vp(a),k=jq(h),t(l,Promise.all(eb(k,function(m){return m.createSegmentIndex()})),3);Vp(a);if(e)throw e;return l["return"](h)})}
648
+ function Wp(a,b,c,d){var e;return J(function(f){switch(f.a){case 1:return e=new rd({nb:a.N,onError:c,nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),t(f,wd(e,b.variants,d.offline.usePersistentLicense),2);case 2:return t(f,Id(e),3);case 3:return t(f,Gd(e),4);case 4:return f["return"](e)}})}
649
+ function $p(a,b,c,d,e,f,g,h){for(var k=new Jp,l=q(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var r=m.audio,u=m.video;r&&!u&&(n.a[r.id]=r.bandwidth||m.bandwidth);!r&&u&&(n.a[u.id]=u.bandwidth||m.bandwidth);if(r&&u){var v=r.bandwidth||393216,A=u.bandwidth||m.bandwidth-v;0>=A&&(A=m.bandwidth);n.a[r.id]=v;n.a[u.id]=A}}l=q(e.textStreams);for(n=l.next();!n.done;n=l.next())k.a[n.value.id]=52;n=jq(e);l=new Map;n=q(n);for(m=n.next();!m.done;m=n.next())m=m.value,r=kq(a,b,c,k,e,m,h),l.set(m.id,
650
+ r);a=q(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.c)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,expiration:d.Eb(),streams:a,sessionIds:h?Od(d):[],drmInfo:b,appMetadata:g}}
651
+ function kq(a,b,c,d,e,f,g){var h={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,closedCaptions:f.closedCaptions},k=f.id;lq(f,e.presentationTimeline.Ra(),function(l){var m=
652
+ mq(a,b,k,f.id,c,d,l.f,g),n=nq(a,b,k,f.id,c,d,l,g);No(b,k,function(){var r,u;return J(function(v){if(1==v.a)return t(v,m,2);if(3!=v.a)return r=v.b,t(v,n,3);u=v.b;h.segments.push({initSegmentKey:r,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,dataKey:u});w(v)})})});return h}
653
+ function mq(a,b,c,d,e,f,g,h){if(a.a.has(g))return a.a.get(g);h=$g(g.c(),g.b,g.a,h.streaming.retryParameters);b=Lo(b,c,h,.5*Lp(f,d),!0,function(k){var l;return J(function(m){if(1==m.a)return t(m,e.addSegments([{data:k}]),2);l=m.b;a.rc.push(l[0]);return m["return"](l[0])})});a.a.set(g,b);return b}
654
+ function nq(a,b,c,d,e,f,g,h){var k=[g.c()[0],g.b,g.a].join("-");if(a.b.has(k))return a.b.get(k);h=$g(g.c(),g.b,g.a,h.streaming.retryParameters);b=Lo(b,c,h,Kp(f,d,g),!1,function(l){var m;return J(function(n){if(1==n.a)return t(n,e.addSegments([{data:l}]),2);m=n.b;a.rc.push(m[0]);return n["return"](m[0])})});a.b.set(k,b);return b}function lq(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Vp(a){if(a.F.a)throw new M(2,9,7001);}
655
+ function Tp(){if(!Qp())throw new M(2,9,9E3);}function aq(a,b){return J(function(c){if(1==c.a)return a.Lb.push(b),ta(c),t(c,b,4);if(2!=c.a)return c["return"](c.b);va(c);Cc(a.Lb,b);return wa(c,0)})}function Sp(a,b){var c=b.promise;a.Lb.push(c);return b["finally"](function(){Cc(a.Lb,c)})}
656
+ function gq(a){var b=[];a=q(a.streams);for(var c=a.next();!c.done;c=a.next()){c=q(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
657
+ function fq(a,b,c,d){var e,f,g;return J(function(h){if(1==h.a){if(!d.drmInfo)return h["return"]();e=ep(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:eq(d,!1),videoCapabilities:eq(d,!0)}});return t(h,Dp(b,a,f),2)}return 3!=h.a?(g=h.b,t(h,e.remove(g),3)):t(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
658
+ function jq(a){for(var b=new Set,c=q(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);a=q(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
659
+ function Yp(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=q(b),d=c.next();!d.done;d=c.next()){d=q(b);for(var e=d.next();!e.done;e=d.next());}b=q(a);for(c=b.next();!c.done;c=b.next())for(c=q(a),d=c.next();!d.done;d=c.next());}K("shaka.offline.Storage",Pp);Pp.deleteAll=function(){var a;return J(function(b){return 1==b.a?(a=new Zo,ta(b),t(b,fp(a),2)):5!=b.a?(va(b),t(b,a.destroy(),5)):wa(b,0)})};Pp.prototype.list=Pp.prototype.list;
660
+ Pp.prototype.removeEmeSessions=Pp.prototype.Te;Pp.prototype.remove=Pp.prototype.remove;Pp.prototype.getStoreInProgress=Pp.prototype.Be;Pp.prototype.store=Pp.prototype.store;Pp.prototype.getNetworkingEngine=Pp.prototype.Fb;Pp.prototype.getConfiguration=Pp.prototype.getConfiguration;Pp.prototype.configure=Pp.prototype.configure;Pp.prototype.destroy=Pp.prototype.destroy;Pp.support=Qp;
661
+ var Zp=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Mj.offline=Qp;function oq(){}function pq(a,b){for(var c={priority:b||0,ce:a},d=q(jb(qq)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.Z;if(e.item.priority<c.priority){qq.splice(f,0,c);return}}qq.push(c)}K("shaka.polyfill",oq);oq.register=pq;oq.installAll=function(){for(var a=q(qq),b=a.next();!b.done;b=a.next()){b=b.value;try{b.ce()}catch(c){Xa("Error installing polyfill!",c)}}};var qq=[];pq(function(){rq()},-1);function sq(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}
662
+ pq(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||
663
+ document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",sq);document.addEventListener("webkitfullscreenerror",sq);document.addEventListener("mozfullscreenchange",sq);document.addEventListener("mozfullscreenerror",sq);document.addEventListener("MSFullscreenChange",sq);document.addEventListener("MSFullscreenError",
664
+ sq)}});function tq(a,b,c){if("input"==a)switch(this.type){case "range":a="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,a,b,c)}pq(function(){md("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=tq)});pq(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});pq(function(){});function uq(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function vq(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function wq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
665
+ function xq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=hd(b)&&a(b)}}function yq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
666
+ pq(function(){var a=od();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?yq():a?(wq(),12>=a?(uq(),vq()):uq()):(md("Tizen 2")||md("Tizen 3")||md("Tizen 4"))&&xq())});function zq(a,b){try{var c=new Aq(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Bq(a){var b=this.mediaKeys;b&&b!=a&&Cq(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Cq(a,this):Promise.resolve()}function Dq(a){a=L(a.initData);if(pb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Wb(a.subarray(4),!0);a=Yb(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=nb(a);this.dispatchEvent(b)}
667
+ function Aq(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=q(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=q(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
668
+ k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=q(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.a=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
669
+ Aq.prototype.createMediaKeys=function(){var a=new Eq(this.keySystem);return Promise.resolve(a)};Aq.prototype.getConfiguration=function(){return this.a};function Eq(a){this.a=new WebKitMediaKeys(a);this.b=new Uc}Eq.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Fq(this.a,a)};Eq.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
670
+ function Cq(a,b){a.b.Xa();if(!b)return Promise.resolve();a.b.l(b,"webkitneedkey",Dq);try{return tg(b,HTMLMediaElement.HAVE_METADATA,a.b,function(){b.webkitSetMediaKeys(a.a)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Fq(a){yc.call(this);this.f=null;this.g=a;this.c=this.a=null;this.b=new Uc;this.sessionId="";this.expiration=NaN;this.closed=new Rb;this.keyStatuses=new Gq}pa(Fq,yc);p=Fq.prototype;
671
+ p.generateRequest=function(a,b){var c=this;this.a=new Rb;try{var d=this.g.createSession("video/mp4",L(b));this.f=d;this.sessionId=d.sessionId||"";this.b.l(this.f,"webkitkeymessage",function(e){c.a&&(c.a.resolve(),c.a=null);e=new Q("message",{messageType:void 0==c.keyStatuses.a?"license-request":"license-renewal",message:nb(e.message)});c.dispatchEvent(e)});this.b.l(d,"webkitkeyadded",function(){c.c&&(Hq(c,"usable"),c.c.resolve(),c.c=null)});this.b.l(d,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");
672
+ e.errorCode=c.f.error;if(null!=c.a)c.a.reject(e),c.a=null;else if(null!=c.c)c.c.reject(e),c.c=null;else switch(c.f.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Hq(c,"output-not-allowed");break;default:Hq(c,"internal-error")}});Hq(this,"status-pending")}catch(e){this.a.reject(e)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(a){this.c=new Rb;try{this.f.update(L(a))}catch(b){this.c.reject(b)}return this.c};
673
+ p.close=function(){try{this.f.close(),this.closed.resolve(),this.b.Xa()}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"))};function Hq(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}function Gq(){this.size=0;this.a=void 0}p=Gq.prototype;p.forEach=function(a){this.a&&a(this.a,ce.value())};
674
+ p.get=function(a){if(this.has(a))return this.a};p.has=function(a){var b=ce.value();return this.a&&lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};pq(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Bq,window.MediaKeys=Eq,window.MediaKeySystemAccess=Aq,navigator.requestMediaKeySystemAccess=zq)});function Iq(a,b){try{var c=new Jq(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Kq(a){if(a.initData){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";b.initData=nb(el(a.initData));this.dispatchEvent(b)}}
675
+ function Jq(a,b){this.keySystem=a;for(var c=!1,d=q(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=q(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
676
+ !0));if(e.videoCapabilities)for(h=q(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.a=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
677
+ Jq.prototype.createMediaKeys=function(){var a=new Lq(this.keySystem);return Promise.resolve(a)};Jq.prototype.getConfiguration=function(){return this.a};function Mq(a){var b=this.mediaKeys;b&&b!=a&&Nq(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Nq(a,this):Promise.resolve()}function Lq(a){this.a=new MSMediaKeys(a);this.b=new Uc}
678
+ Lq.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Oq(this.a,a)};Lq.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Nq(a,b){a.b.Xa();if(!b)return Promise.resolve();a.b.l(b,"msneedkey",Kq);try{return tg(b,HTMLMediaElement.HAVE_METADATA,a.b,function(){b.msSetMediaKeys(a.a)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
679
+ function Oq(a){yc.call(this);this.f=null;this.g=a;this.c=this.a=null;this.b=new Uc;this.sessionId="";this.expiration=NaN;this.closed=new Rb;this.keyStatuses=new Pq}pa(Oq,yc);p=Oq.prototype;
680
+ p.generateRequest=function(a,b){var c=this;this.a=new Rb;try{this.f=this.g.createSession("video/mp4",L(b),null),this.b.l(this.f,"mskeymessage",function(d){c.a&&(c.a.resolve(),c.a=null);d=new Q("message",{messageType:void 0==c.keyStatuses.a?"license-request":"license-renewal",message:nb(d.message)});c.dispatchEvent(d)}),this.b.l(this.f,"mskeyadded",function(){c.a?(Qq(c,"usable"),c.a.resolve(),c.a=null):c.c&&(Qq(c,"usable"),c.c.resolve(),c.c=null)}),this.b.l(this.f,"mskeyerror",function(){var d=Error("EME PatchedMediaKeysMs key error");
681
+ d.errorCode=c.f.error;if(null!=c.a)c.a.reject(d),c.a=null;else if(null!=c.c)c.c.reject(d),c.c=null;else switch(c.f.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Qq(c,"output-not-allowed");break;default:Qq(c,"internal-error")}}),Qq(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(a){this.c=new Rb;try{this.f.update(L(a))}catch(b){this.c.reject(b)}return this.c};
682
+ p.close=function(){try{this.f.close(),this.closed.resolve(),this.b.Xa()}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"))};function Qq(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}function Pq(){this.size=0;this.a=void 0}p=Pq.prototype;p.forEach=function(a){this.a&&a(this.a,ce.value())};
683
+ p.get=function(a){if(this.has(a))return this.a};p.has=function(a){var b=ce.value();return this.a&&lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
684
+ pq(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Lq,window.MediaKeySystemAccess=Jq,navigator.requestMediaKeySystemAccess=Iq,HTMLMediaElement.prototype.setMediaKeys=Mq)});function Rq(){return Promise.reject(Error("The key system specified is not supported."))}function Sq(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Tq(){throw new TypeError("Illegal constructor.");}Tq.prototype.createSession=function(){};Tq.prototype.setServerCertificate=function(){};function Uq(){this.keySystem="";throw new TypeError("Illegal constructor.");}Uq.prototype.getConfiguration=function(){};Uq.prototype.createMediaKeys=function(){};
685
+ pq(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Rq,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Sq,window.MediaKeys=Tq,window.MediaKeySystemAccess=Uq)},-10);function Vq(a){var b=Wq;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Xq(a,b){try{var c=new Yq(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Zq(a){var b=this.mediaKeys;b&&b!=a&&$q(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&$q(a,this);return Promise.resolve()}
686
+ function Yq(a,b){this.a=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.a="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=q(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=q(g.audioCapabilities),
687
+ m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.a)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=q(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.a)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.a)||e.canPlayType("video/webm",this.a));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
688
+ d=!1);if(d){this.b=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Yq.prototype.createMediaKeys=function(){var a=new ar(this.a);return Promise.resolve(a)};Yq.prototype.getConfiguration=function(){return this.b};function ar(a){this.g=a;this.a=null;this.b=new Uc;this.c=[];this.f=new Map}
689
+ function $q(a,b){a.a=b;a.b.Xa();var c=Wq;b&&(a.b.l(b,c+"needkey",function(d){var e=document.createEvent("CustomEvent");e.initCustomEvent("encrypted",!1,!1,null);e.initDataType="cenc";e.initData=nb(d.initData);a.a.dispatchEvent(e)}),a.b.l(b,c+"keymessage",function(d){var e=br(a,d.sessionId);e&&(d=new Q("message",{messageType:void 0==e.keyStatuses.a?"licenserequest":"licenserenewal",message:d.message}),e.b&&(e.b.resolve(),e.b=null),e.dispatchEvent(d))}),a.b.l(b,c+"keyadded",function(d){if(d=br(a,d.sessionId))cr(d,
690
+ "usable"),d.a&&d.a.resolve(),d.a=null}),a.b.l(b,c+"keyerror",function(d){var e=br(a,d.sessionId);e&&e.handleError(d)}))}ar.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.a||document.createElement("video");b.src||(b.src="about:blank");a=new dr(b,this.g,a);this.c.push(a);return a};ar.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
691
+ function br(a,b){var c=a.f.get(b);return c?c:(c=a.c.shift())?(c.sessionId=b,a.f.set(b,c),c):null}function dr(a,b,c){yc.call(this);this.f=a;this.h=!1;this.a=this.b=null;this.c=b;this.g=c;this.sessionId="";this.expiration=NaN;this.closed=new Rb;this.keyStatuses=new er}pa(dr,yc);p=dr.prototype;
692
+ p.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.b?(45==a.systemCode&&(b.message="Unsupported session type."),this.b.reject(b),this.b=null):a.sessionId&&this.a?(this.a.reject(b),this.a=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?cr(this,"output-restricted"):1==b?cr(this,"expired"):cr(this,"internal-error"))};
693
+ function fr(a,b,c){if(a.h)return Promise.reject(Error("The session is already initialized."));a.h=!0;try{if("persistent-license"==a.g)if(c)var d=L(Yb("LOAD_SESSION|"+c));else{var e=Yb("PERSISTENT|");d=gc(e,b)}else d=L(b)}catch(g){return Promise.reject(g)}a.b=new Rb;var f=Vq("generateKeyRequest");try{a.f[f](a.c,d)}catch(g){if("InvalidStateError"!=g.name)return a.b=null,Promise.reject(g);(new N(function(){try{a.f[f](a.c,d)}catch(h){a.b.reject(h),a.b=null}})).R(.01)}return a.b}
694
+ function gr(a,b,c){if(a.a)a.a.then(function(){return gr(a,b,c)})["catch"](function(){return gr(a,b,c)});else{a.a=b;if("webkit-org.w3.clearkey"==a.c){var d=Ub(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=dc(e.keys[0].k);e=dc(e.keys[0].kid)}else d=L(c),e=null;var f=Vq("addKey");try{a.f[f](a.c,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}}
695
+ function cr(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}p.generateRequest=function(a,b){return fr(this,b,null)};p.load=function(a){return"persistent-license"==this.g?fr(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Rb;gr(this,b,a);return b};
696
+ p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Vq("cancelKeyRequest");try{this.f[a](this.c,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function er(){this.size=0;this.a=void 0}p=er.prototype;p.forEach=function(a){this.a&&a(this.a,ce.value())};p.get=function(a){if(this.has(a))return this.a};
697
+ p.has=function(a){var b=ce.value();return this.a&&lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var Wq="";
698
+ pq(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Wq="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Xq;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Zq;window.MediaKeys=ar;window.MediaKeySystemAccess=Yq}});function hr(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
699
+ function ir(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function jr(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
700
+ function kr(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function lr(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}
701
+ pq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ir,Object.defineProperty(a,"disablePictureInPicture",{get:kr,set:lr,enumerable:!0,configurable:!0}),document.exitPictureInPicture=jr,document.addEventListener("webkitpresentationmodechanged",hr,!0))}});pq(function(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}});function mr(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}pq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=mr)}});function nr(a,b,c){return new window.TextTrackCue(a,b,c)}function or(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}pq(function(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=nr;else if(6==b)a=or;else{try{var c=!!nr(1,2,"")}catch(d){c=!1}c&&(a=nr)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}});function pr(){}pr.prototype.parseInit=function(){};
702
+ pr.prototype.parseMedia=function(a,b){var c=Ub(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new M(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new M(2,2,2005,c.textContent);if(e=f.getElementsByTagName("tt")[0]){var g=pl(e,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=pl(e,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var k=pl(e,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");
703
+ var l=pl(e,"http://www.w3.org/ns/ttml#parameter","tickRate");var m=pl(e,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=e.getAttribute("xml:space")||"default";c=pl(e,"http://www.w3.org/ns/ttml#styling","extent")}else throw new M(2,2,2005,"TTML does not contain <tt> tag.");if("default"!=f&&"preserve"!=f)throw new M(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;g=new qr(g,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:null:null;h=rr(e.getElementsByTagName("metadata")[0]);
704
+ k=rr(e.getElementsByTagName("styling")[0]);l=rr(e.getElementsByTagName("layout")[0]);for(var n=[],r=q(l),u=r.next();!u.done;u=r.next()){var v=u.value,A=c;u=new Be;var y=v.getAttribute("xml:id");if(y){u.id=y;y=null;A&&(y=sr.exec(A)||tr.exec(A));A=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,D;if(z=ur(v,k,"extent"))z=(D=sr.exec(z))||tr.exec(z),null!=z&&(u.width=null!=A?100*Number(z[1])/A:Number(z[1]),u.height=null!=y?100*Number(z[2])/y:Number(z[2]),u.widthUnits=D||null!=A?Qe:0,u.heightUnits=D||null!=
705
+ y?Qe:0);if(v=ur(v,k,"origin"))z=(D=sr.exec(v))||tr.exec(v),null!=z&&(u.viewportAnchorX=null!=A?100*Number(z[1])/A:Number(z[1]),u.viewportAnchorY=null!=y?100*Number(z[2])/y:Number(z[2]),u.viewportAnchorUnits=D||null!=A?Qe:0)}else u=null;u&&n.push(u)}c=vr(e.getElementsByTagName("body")[0]);c=q(c);for(e=c.next();!e.done;e=c.next())(e=wr(e.value,b.periodStart,g,h,k,l,n,f,!1,m))&&d.push(e)}return d};
706
+ function rr(a){var b=[];if(!a)return b;for(var c=q(a.childNodes),d=c.next();!d.done;d=c.next())d=d.value,d.nodeType==Node.ELEMENT_NODE&&"br"!==d.nodeName&&(d=rr(d),b=b.concat(d));b.length||b.push(a);return b}function vr(a){if(!a)return[];var b=[];a=q(a.childNodes);for(var c=a.next();!c.done;c=a.next())c=c.value,c instanceof Element&&(c.hasAttribute("begin")?b.push(c):b=b.concat(vr(c)));return b}
707
+ function xr(a,b){for(var c="",d=q(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,"br"==e.nodeName&&a.childNodes[0]!==e?c+="\n":e.childNodes&&0<e.childNodes.length?c+=xr(e,b):b?(e=e.textContent.trim(),e=e.replace(/\s+/g," "),c+=e):c+=e.textContent;return c}
708
+ function wr(a,b,c,d,e,f,g,h,k,l){if(k&&"br"==a.nodeName)return a=new ze(0,0,""),a.spacer=!0,a;var m=/^[\s\n]*$/.test(a.textContent),n=a.nodeType==Node.ELEMENT_NODE&&!a.hasAttribute("begin")&&!a.hasAttribute("end");if(a.nodeType!=Node.ELEMENT_NODE||n&&m||n&&!k)return null;m=yr(a.getAttribute("begin"),c);n=yr(a.getAttribute("end"),c);var r=yr(a.getAttribute("dur"),c);null==n&&null!=r&&(n=m+r);if(!k&&(null==m||null==n))throw new M(2,2,2001);m=k&&null==m?0:m+b;n=k&&null==n?0:n+b;r="";k=[];if(Array.from(a.childNodes).some(function(y){return y.nodeType==
709
+ Node.TEXT_NODE&&/\S+/.test(y.textContent)}))r=xr(a,h);else for(var u=q(a.childNodes),v=u.next();!v.done;v=u.next())if(v=wr(v.value,b,c,d,e,f,g,h,!0,l))v.startTime=v.startTime||m,v.endTime=v.endTime||n,k.push(v);b=new ze(m,n,r);b.nestedCues=k;l&&(b.cellResolution=l);if((f=zr(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var A=f.getAttribute("xml:id");b.region=g.filter(function(y){return y.id==A})[0]}d=zr(a,"backgroundImage",d,"#","http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt")[0];Ar(b,a,
710
+ f,d,e);return b}
711
+ function Ar(a,b,c,d,e){"rtl"==Br(b,c,e,"direction")&&(a.direction="rtl");var f=Br(b,c,e,"writingMode");"tb"==f||"tblr"==f?a.writingMode="vertical-lr":"tbrl"==f?a.writingMode="vertical-rl":"rltb"==f||"rl"==f?a.direction="rtl":f&&(a.direction=Ae);(f=Br(b,c,e,"textAlign"))?(a.positionAlign=Cr[f],a.lineAlign=Dr[f],a.textAlign=Me[f.toUpperCase()]):a.textAlign="start";if(f=Br(b,c,e,"displayAlign"))a.displayAlign=Ne[f.toUpperCase()];if(f=Br(b,c,e,"color"))a.color=f;if(f=Br(b,c,e,"backgroundColor"))a.backgroundColor=f;
712
+ if(f=Br(b,c,e,"border"))a.border=f;if(f=Br(b,c,e,"fontFamily"))a.fontFamily=f;(f=Br(b,c,e,"fontWeight"))&&"bold"==f&&(a.fontWeight=700);(f=Br(b,c,e,"wrapOption"))&&"noWrap"==f&&(a.wrapLine=!1);(f=Br(b,c,e,"lineHeight"))&&f.match(Er)&&(a.lineHeight=f);(f=Br(b,c,e,"fontSize"))&&(f.match(Er)||f.match(Fr))&&(a.fontSize=f);if(f=Br(b,c,e,"fontStyle"))a.fontStyle=Pe[f.toUpperCase()];if(d){f=d.getAttribute("imagetype");var g=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==f&&"Base64"==g&&d&&(a.backgroundImage=
713
+ "data:image/png;base64,"+d)}(d=Br(b,c,e,"letterSpacing"))&&d.match(Er)&&(a.letterSpacing=d);(d=Br(b,c,e,"linePadding"))&&d.match(Er)&&(a.linePadding=d);if(d=Br(b,c,e,"opacity"))a.opacity=parseFloat(d);(c=ur(c,e,"textDecoration"))&&Gr(a,c);(b=Hr(b,e,"textDecoration"))&&Gr(a,b)}
714
+ function Gr(a,b){for(var c=q(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Cc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Cc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
715
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Cc(a.textDecoration,"overline")}}function Br(a,b,c,d){return(a=Hr(a,c,d))?a:ur(b,c,d)}function ur(a,b,c){if(!a)return null;var d=rr(a);d=q(d);for(var e=d.next();!e.done;e=d.next())if(e=pl(e.value,"http://www.w3.org/ns/ttml#styling",c))return e;return Ir(a,b,c)}function Hr(a,b,c){var d=pl(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Ir(a,b,c)}
716
+ function Ir(a,b,c){a=zr(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=pl(a[e],"urn:ebu:tt:style",c);f||(f=pl(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=Hr(a[e],b,c));f&&(d=f)}return d}
717
+ function zr(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?pl(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=q(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=q(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}
718
+ function yr(a,b){var c=null;if(Jr.test(a)){c=Jr.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.b;f+=g/b.frameRate;c=f+60*e+3600*d}else Kr.test(a)?c=Lr(Kr,a):Mr.test(a)?c=Lr(Mr,a):Nr.test(a)?(c=Nr.exec(a),c=Number(c[1])/b.frameRate):Or.test(a)?(c=Or.exec(a),c=Number(c[1])/b.a):Pr.test(a)&&(c=Lr(Pr,a));return c}
719
+ function Lr(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}K("shaka.text.TtmlTextParser",pr);pr.prototype.parseMedia=pr.prototype.parseMedia;pr.prototype.parseInit=pr.prototype.parseInit;function qr(a,b,c,d){this.frameRate=Number(a)||30;this.b=Number(b)||1;this.a=Number(d);0==this.a&&(this.a=a?this.frameRate*this.b:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
720
+ var sr=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Fr=/^(\d{1,2}(?:\.\d+)?|100)%$/,Er=/^(\d+px|\d+em|\d*\.?\d+c)$/,tr=/^(\d+)px (\d+)px$/,Jr=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Kr=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Mr=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Nr=/^(\d*(?:\.\d*)?)f$/,Or=/^(\d*(?:\.\d*)?)t$/,Pr=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Dr={left:He,center:"center",right:"end",start:He,end:"end"},Cr=
721
+ {left:"line-left",center:"center",right:"line-right"};Ue["application/ttml+xml"]=function(){return new pr};function Qr(){this.m=new pr}Qr.prototype.parseInit=function(a){var b=!1;(new fe).box("moov",je).box("trak",je).box("mdia",je).box("minf",je).box("stbl",je).V("stsd",le).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Qr.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new fe).box("mdat",me(function(f){d=!0;e=e.concat(c.m.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};K("shaka.text.Mp4TtmlParser",Qr);Qr.prototype.parseMedia=Qr.prototype.parseMedia;
722
+ Qr.prototype.parseInit=Qr.prototype.parseInit;Ue['application/mp4; codecs="stpp"']=function(){return new Qr};Ue['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Qr};Ue['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Qr};function Rr(){}Rr.prototype.parseInit=function(){};
723
+ Rr.prototype.parseMedia=function(a,b){var c=Ub(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new M(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Sr(new tn(e[1]));if(null==c)throw new M(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
724
+ [];e=q(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new tn(g);var h=new Be;wn(g);un(g);for(var k=wn(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
725
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");un(g);k=wn(g)}f.push(h)}e=[];d=q(d.slice(1));for(g=d.next();!g.done;g=d.next()){l=g.value.split("\n");k=c;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0])g=null;else{g=null;l[0].includes("--\x3e")||(g=l[0],l.splice(0,1));h=new tn(l[0]);m=Sr(h);var n=vn(h,/[ \t]+--\x3e[ \t]+/g),r=Sr(h);if(null==m||null==n||null==r)throw new M(2,2,2001);l=new ze(m+k,r+k,l.slice(1).join("\n").trim());
726
+ un(h);for(k=wn(h);k;)Tr(l,k,f),un(h),k=wn(h);null!=g&&(l.id=g);g=l}g&&e.push(g)}return e};
727
+ function Tr(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ee:a.textAlign=Me[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"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|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
728
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Ur(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=Oe[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ge,a.line=Number(c[1]),c[2]&&(a.lineAlign=Oe[c[2].toUpperCase()])}function Ur(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
729
+ function Sr(a){a=vn(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}K("shaka.text.VttTextParser",Rr);Rr.prototype.parseMedia=Rr.prototype.parseMedia;Rr.prototype.parseInit=Rr.prototype.parseInit;Ue["text/vtt"]=function(){return new Rr};Ue['text/vtt; codecs="vtt"']=function(){return new Rr};Ue['text/vtt; codecs="wvtt"']=function(){return new Rr};function Vr(){this.a=null}Vr.prototype.parseInit=function(a){var b=this,c=!1;(new fe).box("moov",je).box("trak",je).box("mdia",je).V("mdhd",function(d){0==d.version?(d.reader.skip(4),d.reader.skip(4),b.a=d.reader.K(),d.reader.skip(4)):(d.reader.skip(8),d.reader.skip(8),b.a=d.reader.K(),d.reader.skip(8));d.reader.skip(4)}).box("minf",je).box("stbl",je).V("stsd",le).box("wvtt",function(){c=!0}).parse(a);if(!this.a)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};
730
+ Vr.prototype.parseMedia=function(a,b){if(!this.a)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new fe).box("moof",je).box("traf",je).V("tfdt",function(E){g=!0;c=0==E.version?E.reader.K():E.reader.rb()}).V("tfhd",function(E){var H=E.flags;E=E.reader;E.skip(4);H&1&&E.skip(8);H&2&&E.skip(4);l=H&8?E.K():null}).V("trun",function(E){h=!0;var H=E.version,G=E.flags;E=E.reader;var F=E.K();G&1&&E.skip(4);G&4&&E.skip(4);var I=[];F=q(hb(F));for(var O=F.next();!O.done;O=F.next())O={duration:null,
731
+ sampleSize:null,qd:null},G&256&&(O.duration=E.K()),G&512&&(O.sampleSize=E.K()),G&1024&&E.skip(4),G&2048&&(O.qd=0==H?E.K():E.Od()),I.push(O);d=I}).box("mdat",me(function(E){k=!0;e=E})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);for(var m=c,n=new R(e,0),r=q(d),u=r.next();!u.done;u=r.next()){u=u.value;var v=u.duration||l,A=u.qd?c+u.qd:m;m=A+(v||0);var y=0;do{var z=n.K();y+=z;var D=n.K(),B=null;"vttc"==ne(D)?8<z&&(B=n.Wa(z-8)):n.skip(z-8);v&&B&&(z=Wr(B,b.periodStart+A/this.a,b.periodStart+m/this.a),
732
+ f.push(z))}while(u.sampleSize&&y<u.sampleSize)}return f.filter(Lb)};function Wr(a,b,c){var d,e,f;(new fe).box("payl",me(function(g){d=Ub(g)})).box("iden",me(function(g){e=Ub(g)})).box("sttg",me(function(g){f=Ub(g)})).parse(a);return d?Xr(d,e,f,b,c):null}function Xr(a,b,c,d,e){a=new ze(d,e,a);b&&(a.id=b);if(c)for(b=new tn(c),c=wn(b);c;)Tr(a,c,[]),un(b),c=wn(b);return a}K("shaka.text.Mp4VttParser",Vr);Vr.prototype.parseMedia=Vr.prototype.parseMedia;Vr.prototype.parseInit=Vr.prototype.parseInit;
733
+ Ue['application/mp4; codecs="wvtt"']=function(){return new Vr};/*
734
+ @license
735
+ EME Encryption Scheme Polyfill
736
+ Copyright 2019 Google LLC
737
+ SPDX-License-Identifier: Apache-2.0
738
+ */
739
+ function Yr(){}var Zr;function $r(){Zr?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Zr=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=as):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
740
+ function as(a,b){var c=this,d;return J(function(e){if(1==e.a)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),t(e,Zr.call(c,a,b),2);d=e.b;if(bs(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Zr,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=cs;return e["return"](cs.call(c,
741
+ a,b))})}
742
+ function cs(a,b){var c=this,d,e,f,g,h,k,l,m,n,r;return J(function(u){if(1==u.a){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=ds(a);e=[];f=q(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=es(h.videoCapabilities,d),l=es(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."),
743
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return t(u,Zr.call(c,a,e),2)}r=u.b;return u["return"](new fs(r,d))})}function es(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",Yr);Yr.install=$r;function gs(){}var hs;
744
+ function is(){hs?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(hs=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=js):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
745
+ function js(a){var b=this,c,d;return J(function(e){if(1==e.a)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t(e,hs.call(b,a),2);c=e.b;if(!a.keySystemConfiguration||!c.keySystemAccess)return e["return"](c);d=c.keySystemAccess;if(bs(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=hs,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
746
+ navigator.mediaCapabilities.decodingInfo=ks;return e["return"](ks.call(b,a))})}
747
+ function ks(a){var b=this,c,d,e,f,g,h,k;return J(function(l){if(1==l.a)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=ds(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?l["return"](h):t(l,hs.call(b,a),2);k=l.b;k.keySystemAccess&&(k.keySystemAccess=new fs(k.keySystemAccess,
748
+ c));return l["return"](k)})}K("McEncryptionSchemePolyfill",gs);gs.install=is;function fs(a,b){this.b=a;this.a=b;this.keySystem=a.keySystem}fs.prototype.getConfiguration=function(){var a=this.b.getConfiguration();if(a.videoCapabilities)for(var b=q(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.a;if(a.audioCapabilities)for(b=q(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.a;return a};fs.prototype.createMediaKeys=function(){return this.b.createMediaKeys()};
749
+ function ds(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function bs(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function ls(){}
750
+ function rq(){$r();is()}K("EncryptionSchemePolyfills",ls);ls.install=rq;"undefined"!==typeof module&&module.exports&&(module.exports=ls);}).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})();
751
+
752
+ //# sourceMappingURL=shaka-player.compiled.map