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,609 @@
1
+ (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=ea)}var ea=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
2
+ function fa(){ca();var b=ba.Symbol.iterator;b||(b=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ia(b){fa();b={next:b};b[ba.Symbol.iterator]=function(){return this};return b}function r(b){fa();var c=b[Symbol.iterator];return c?c.call(b):ha(b)}
3
+ function ka(b,c){if(c){for(var d=ba,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
4
+ ka("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.h()})};var f=ba.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.h=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
5
+ [];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.o),reject:b(this.f)}};c.prototype.o=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.v(b);else{a:switch(typeof b){case "object":var d=null!=b;break a;case "function":d=!0;
6
+ break a;default:d=!1}d?this.m(b):this.h(b)}};c.prototype.m=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.C(c,b):this.h(b)};c.prototype.f=function(b){this.i(2,b)};c.prototype.h=function(b){this.i(1,b)};c.prototype.i=function(b,c){if(0!=this.b)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.b);this.b=b;this.g=c;this.l()};c.prototype.l=function(){if(null!=this.a){for(var b=0;b<this.a.length;++b)g.b(this.a[b]);this.a=null}};
7
+ var g=new d;c.prototype.v=function(b){var c=this.c();b.Xb(c.resolve,c.reject)};c.prototype.C=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(C){g(C)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.Xb(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.Xb=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
8
+ case 2:c(e.g);break;default:throw Error("Unexpected state: "+e.b);}}var e=this;null==this.a?g.b(d):this.a.push(d)};c.resolve=e;c.reject=function(b){return new c(function(c,d){d(b)})};c.race=function(b){return new c(function(c,d){for(var f=r(b),g=f.next();!g.done;g=f.next())e(g.value).Xb(c,d)})};c.all=function(b){var d=r(b),f=d.next();return f.done?e([]):new c(function(b,c){function g(c){return function(d){h[c]=d;k--;0==k&&b(h)}}var h=[],k=0;do h.push(void 0),k++,e(f.value).Xb(g(h.length-1),c),f=d.next();
9
+ while(!f.done)})};return c});ka("Promise.prototype.finally",function(b){return b?b: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(b){function c(c){return b.next(c)}function d(c){return b["throw"](c)}return new Promise(function(e,f){function g(b){b.done?e(b.value):Promise.resolve(b.value).then(c,d).then(g,f)}g(b.next())})}function t(b){return la(b())}
10
+ var na="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},oa;if("function"==typeof Object.setPrototypeOf)oa=Object.setPrototypeOf;else{var pa;a:{var qa={oe:!0},ra={};try{ra.__proto__=qa;pa=ra.oe;break a}catch(b){}pa=!1}oa=pa?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var sa=oa;function ta(){this.g=!1;this.c=null;this.s=void 0;this.j=1;this.b=this.f=0;this.i=this.a=null}
11
+ function ua(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}ta.prototype.h=function(b){this.s=b};function xa(b,c){b.a={xd:c,Hd:!0};b.j=b.f||b.b}ta.prototype["return"]=function(b){this.a={"return":b};this.j=this.b};function u(b,c,d){b.j=d;return{value:c}}ta.prototype.A=function(b){this.j=b};function v(b){b.j=0}function ya(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function za(b,c){b.f=0;b.b=c||0}function Ca(b,c){b.j=c;b.f=0}function Da(b){b.f=0;var c=b.a.xd;b.a=null;return c}
12
+ function Ea(b){b.i=[b.a];b.f=0;b.b=0}function Fa(b,c){var d=b.i.splice(0)[0];(d=b.a=b.a||d)?d.Hd?b.j=b.f||b.b:void 0!=d.A&&b.b<d.A?(b.j=d.A,b.a=null):b.j=b.b:b.j=c}function Ja(b){this.a=new ta;this.b=b}function Ka(b,c){ua(b.a);var d=b.a.c;if(d)return La(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return Ma(b)}
13
+ function La(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,xa(b.a,h),Ma(b)}b.a.c=null;e.call(b.a,g);return Ma(b)}
14
+ function Ma(b){for(;b.a.j;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.s=void 0,xa(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.Hd)throw c.xd;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
15
+ function Na(b){this.next=function(c){ua(b.a);b.a.c?c=La(b,b.a.c.next,c,b.a.h):(b.a.h(c),c=Ma(b));return c};this["throw"]=function(c){ua(b.a);b.a.c?c=La(b,b.a.c["throw"],c,b.a.h):(xa(b.a,c),c=Ma(b));return c};this["return"]=function(c){return Ka(b,c)};fa();this[Symbol.iterator]=function(){return this}}function y(b,c){Na.prototype=b.prototype;return new Na(new Ja(c))}function Oa(b){if(!(b instanceof Array)){b=r(b);for(var c,d=[];!(c=b.next()).done;)d.push(c.value);b=d}return b}
16
+ function Pa(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
17
+ ka("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){ca();fa();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Pa(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
18
+ var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!Pa(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Pa(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Pa(b,f)&&Pa(b[f],this.a)};c.prototype["delete"]=function(b){return Pa(b,f)&&Pa(b[f],this.a)?delete b[f][this.a]:!1};return c});
19
+ ka("Map",function(b){function c(){var b={};return b.Ca=b.next=b.head=b}function d(b,c){var d=b.a;return ia(function(){if(d){for(;d.head!=b.a;)d=d.Ca;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Pa(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,X:k}}return{id:d,
20
+ list:e,index:-1,X:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=r(b);for(var d;!(d=b.next()).done;)d=d.value,this.set(d[0],d[1])}}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b(r([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||
21
+ "t"!=f.value[1]||!e.next().done?!1:!0}catch(q){return!1}}())return b;ca();fa();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.X?d.X.value=c:(d.X={next:this.a,Ca:this.a.Ca,head:this.a,key:b,value:c},d.list.push(d.X),this.a.Ca.next=d.X,this.a.Ca=d.X,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.X&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.X.Ca.next=b.X.next,b.X.next.Ca=b.X.Ca,b.X.head=
22
+ null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Ca=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).X};f.prototype.get=function(b){return(b=e(this,b).X)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),e;!(e=d.next()).done;)e=
23
+ e.value,b.call(c,e[1],e[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var h=0;return f});
24
+ ka("Set",function(b){function c(b){this.a=new Map;if(b){b=r(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(r([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
25
+ g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;ca();fa();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
26
+ c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function Qa(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{Dd:f,je:g}}return{Dd:-1,je:void 0}}ka("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Qa(this,b,d).Dd}});
27
+ function Ra(b,c){fa();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}ka("Array.prototype.keys",function(b){return b?b:function(){return Ra(this,function(b){return b})}});ka("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});
28
+ ka("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});function Sa(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}
29
+ ka("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Sa(this,b,"includes").indexOf(b,d||0)}});ka("Array.from",function(b){return b?b:function(b,d,e){fa();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});
30
+ ka("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Sa(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return Qa(this,b,d).je}});var Ua=this;Ua.a=!0;
31
+ function z(b,c){var d=b.split("."),e=Ua;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Va(b,c){function d(){}d.prototype=c.prototype;b.eg=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.sg=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*
32
+
33
+ Copyright 2016 Google Inc.
34
+
35
+ Licensed under the Apache License, Version 2.0 (the "License");
36
+ you may not use this file except in compliance with the License.
37
+ You may obtain a copy of the License at
38
+
39
+ http://www.apache.org/licenses/LICENSE-2.0
40
+
41
+ Unless required by applicable law or agreed to in writing, software
42
+ distributed under the License is distributed on an "AS IS" BASIS,
43
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
+ See the License for the specific language governing permissions and
45
+ limitations under the License.
46
+ */
47
+ function Wa(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Xa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Ya(b){return b.a/(1-Math.pow(b.c,b.b))};function Za(){this.b=new Wa(2);this.c=new Wa(5);this.a=0}Za.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Ya(this.b),Ya(this.c))};function $a(){}function ab(){}function bb(){}window.console&&window.console.log.bind&&(ab=console.warn.bind(console),$a=console.error.bind(console));var fb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function gb(b){var c;b instanceof gb?(hb(this,b.va),this.$a=b.$a,this.ra=b.ra,ib(this,b.xb),this.ia=b.ia,jb(this,b.a.clone()),this.Qa=b.Qa):b&&(c=String(b).match(fb))?(hb(this,c[1]||"",!0),this.$a=kb(c[2]||""),this.ra=kb(c[3]||"",!0),ib(this,c[4]),this.ia=kb(c[5]||"",!0),jb(this,c[6]||"",!0),this.Qa=kb(c[7]||"")):this.a=new lb(null)}p=gb.prototype;p.va="";p.$a="";p.ra="";p.xb=null;p.ia="";p.Qa="";
48
+ p.toString=function(){var b=[],c=this.va;c&&b.push(mb(c,nb,!0),":");if(c=this.ra){b.push("//");var d=this.$a;d&&b.push(mb(d,nb,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.xb;null!=c&&b.push(":",String(c))}if(c=this.ia)this.ra&&"/"!=c.charAt(0)&&b.push("/"),b.push(mb(c,"/"==c.charAt(0)?ob:pb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.Qa)&&b.push("#",mb(c,qb));return b.join("")};
49
+ p.resolve=function(b){var c=this.clone();"data"===c.va&&(c=new gb);var d=!!b.va;d?hb(c,b.va):d=!!b.$a;d?c.$a=b.$a:d=!!b.ra;d?c.ra=b.ra:d=null!=b.xb;var e=b.ia;if(d)ib(c,b.xb);else if(d=!!b.ia){if("/"!=e.charAt(0))if(this.ra&&!this.ia)e="/"+e;else{var f=c.ia.lastIndexOf("/");-1!=f&&(e=c.ia.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;h<e.length;){var k=e[h++];"."==k?f&&h==e.length&&g.push(""):".."==
50
+ k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.ia=e:d=""!==b.a.toString();d?jb(c,b.a.clone()):d=!!b.Qa;d&&(c.Qa=b.Qa);return c};p.clone=function(){return new gb(this)};function hb(b,c,d){b.va=d?kb(c,!0):c;b.va&&(b.va=b.va.replace(/:$/,""))}function ib(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.xb=c}else b.xb=null}function jb(b,c,d){c instanceof lb?b.a=c:(d||(c=mb(c,rb)),b.a=new lb(c))}
51
+ function kb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function mb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,sb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function sb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var nb=/[#\/\?@]/g,pb=/[#\?:]/g,ob=/[#\?]/g,rb=/[#\?@]/g,qb=/#/g;function lb(b){this.a=b||null}p=lb.prototype;p.ga=null;p.Zb=null;
52
+ p.add=function(b,c){if(!this.ga&&(this.ga={},this.Zb=0,this.a))for(var d=this.a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.a=null;(d=this.ga.hasOwnProperty(b)&&this.ga[b])||(this.ga[b]=d=[]);d.push(c);this.Zb++;return this};
53
+ p.toString=function(){if(this.a)return this.a;if(!this.ga)return"";var b=[],c;for(c in this.ga)for(var d=encodeURIComponent(c),e=this.ga[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};p.clone=function(){var b=new lb;b.a=this.a;if(this.ga){var c={},d;for(d in this.ga)c[d]=this.ga[d].concat();b.ga=c;b.Zb=this.Zb}return b};function xb(b){this.b=b;this.a=null}xb.prototype.O=function(b){var c=this;this.stop();var d=!0,e=null;this.a=function(){window.clearTimeout(e);d=!1};e=window.setTimeout(function(){d&&c.b()},1E3*b);return this};xb.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function B(b){this.b=b;this.a=null}z("shaka.util.Timer",B);B.prototype.sc=function(){this.stop();this.b();return this};B.prototype.tickNow=B.prototype.sc;B.prototype.O=function(b){var c=this;this.stop();this.a=(new xb(function(){c.b()})).O(b);return this};B.prototype.tickAfter=B.prototype.O;B.prototype.La=function(b){var c=this;this.stop();this.a=(new xb(function(){c.a.O(b);c.b()})).O(b);return this};B.prototype.tickEvery=B.prototype.La;B.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};
54
+ B.prototype.stop=B.prototype.stop;function yb(b,c){var d=zb();this.i=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.h=null==b.fuzzFactor?d.fuzzFactor:b.fuzzFactor;this.g=null==b.backoffFactor?d.backoffFactor:b.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===c?!1:c)this.a=1}
55
+ function Ab(b){return t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:if(b.a>=b.i)if(b.c)b.a=1,b.b=b.f;else return d["return"](Promise.reject());e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new B(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function zb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}z("shaka.util.Error",D);D.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};D.Severity={RECOVERABLE:1,CRITICAL:2};D.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
56
+ D.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,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,
57
+ 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,
58
+ 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,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
59
+ 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,INVALID_STREAMS_CHOSEN:5005,
60
+ 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,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,
61
+ ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,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};function G(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}G.prototype.resolve=function(){};G.prototype.reject=function(){};function H(b,c){this.promise=b;this.Kd=c;this.a=!1}z("shaka.util.AbortableOperation",H);function Bb(b){return new H(Promise.reject(b),function(){return Promise.resolve()})}H.failed=Bb;function Cb(){var b=Promise.reject(new D(2,7,7001));b["catch"](function(){});return new H(b,function(){return Promise.resolve()})}H.aborted=Cb;function Db(b){return new H(Promise.resolve(b),function(){return Promise.resolve()})}H.completed=Db;
62
+ function Fb(b){return new H(b,function(){return b["catch"](function(){})})}H.notAbortable=Fb;H.prototype.abort=function(){this.a=!0;return this.Kd()};H.prototype.abort=H.prototype.abort;function Gb(b){return new H(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}H.all=Gb;H.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};H.prototype["finally"]=H.prototype["finally"];
63
+ H.prototype.U=function(b,c){function d(){f.reject(new D(2,7,7001));return e.abort()}var e=this,f=new G;this.promise.then(function(c){e.a?f.reject(new D(2,7,7001)):b?d=Hb(b,c,f):f.resolve(c)},function(b){c?d=Hb(c,b,f):f.reject(b)});return new H(f,function(){return d()})};H.prototype.chain=H.prototype.U;
64
+ function Hb(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function I(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}I.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};I.prototype.stopImmediatePropagation=function(){this.a=!0};I.prototype.stopPropagation=function(){};function Ib(){this.a={}}p=Ib.prototype;p.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};p.get=function(b){return(b=this.a[b])?b.slice():null};p.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};p.remove=function(b,c){var d=this.a[b];if(d)for(var e=0;e<d.length;++e)d[e]==c&&(d.splice(e,1),--e)};p.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function J(){this.Bc=new Ib;this.Ub=this}J.prototype.addEventListener=function(b,c){this.Bc.push(b,c)};J.prototype.removeEventListener=function(b,c){this.Bc.remove(b,c)};J.prototype.dispatchEvent=function(b){for(var c=this.Bc.get(b.type)||[],d=0;d<c.length;++d){b.target=this.Ub;b.currentTarget=this.Ub;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function Jb(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function Kb(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function Lb(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function Mb(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
65
+ function Nb(b,c,d){d||(d=Kb);if(b.length!=c.length)return!1;c=c.slice();var e={};b=r(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function Ob(){this.a=[]}function Pb(b,c){b.a.push(c["finally"](function(){Lb(b.a,c)}))}Ob.prototype.destroy=function(){var b=[];this.a.forEach(function(c){c.promise["catch"](function(){});b.push(c.abort())});this.a=[];return Promise.all(b)};function K(b){J.call(this);this.f=!1;this.g=new Ob;this.a=new Set;this.b=new Set;this.c=b||null}Va(K,J);z("shaka.net.NetworkingEngine",K);var Qb={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};K.RequestType=Qb;K.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Rb={};function Sb(b,c,d){d=d||3;var e=Rb[b];if(!e||d>=e.priority)Rb[b]={priority:d,zf:c}}K.registerScheme=Sb;K.unregisterScheme=function(b){delete Rb[b]};K.prototype.Bf=function(b){this.a.add(b)};K.prototype.registerRequestFilter=K.prototype.Bf;
66
+ K.prototype.gg=function(b){this.a["delete"](b)};K.prototype.unregisterRequestFilter=K.prototype.gg;K.prototype.we=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.we;K.prototype.Cf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.Cf;K.prototype.hg=function(b){this.b["delete"](b)};K.prototype.unregisterResponseFilter=K.prototype.hg;K.prototype.xe=function(){this.b.clear()};K.prototype.clearAllResponseFilters=K.prototype.xe;
67
+ function Tb(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;
68
+ K.prototype.request=function(b,c){var d=this,e=new Ub;if(this.f){var f=Promise.reject(new D(2,7,7001));f["catch"](function(){});return new Vb(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Jb(c.retryParameters):zb();c.uris=Jb(c.uris);f=Wb(this,b,c);var g=f.U(function(){return Xb(d,b,c,new yb(c.retryParameters,!1),0,null,e)}),h=g.U(function(c){return Yb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},
69
+ function(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.U(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ze||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Vb(f.promise,f.Kd,e);Pb(this.g,f);return f};K.prototype.request=K.prototype.request;
70
+ function Wb(b,c,d){var e=Db(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={ed:f.ed},g=b.next())f.ed=g.value,e=e.U(function(b){return function(){return b.ed(c,d)}}(f));return e.U(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})}
71
+ function Xb(b,c,d,e,f,g,h){var k=new gb(d.uris[f]),l=k.va,m=!1;l||(l=location.protocol,l=l.slice(0,-1),hb(k,l),d.uris[f]=k.toString());var n=(l=Rb[l])?l.zf:null;if(!n)return Bb(new D(2,1,1E3,k));var q;return Fb(Ab(e)).U(function(){if(b.f)return Cb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).U(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ze:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Cb();if(k&&1==k.severity)return b.dispatchEvent(new I("retry",
72
+ {error:k instanceof D?k:null})),f=(f+1)%d.uris.length,Xb(b,c,d,e,f,k,h);throw k||g;})}function Yb(b,c,d){var e=Db(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.U(f.value.bind(null,c,d.response));return e.U(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Ub(){this.a=0}K.NumBytesRemainingClass=Ub;function Vb(b,c,d){H.call(this,b,c);this.b=d}var Zb=Vb;Zb.prototype=na(H.prototype);
73
+ Zb.prototype.constructor=Zb;if(sa)sa(Zb,H);else for(var $b in H)if("prototype"!=$b)if(Object.defineProperties){var ac=Object.getOwnPropertyDescriptor(H,$b);ac&&Object.defineProperty(Zb,$b,ac)}else Zb[$b]=H[$b];Zb.eg=H.prototype;K.PendingRequest=Vb;Vb.all=Gb;Vb.notAbortable=Fb;Vb.completed=Db;Vb.aborted=Cb;Vb.failed=Bb;function bc(){}z("shaka.util.IReleasable",bc);bc.prototype.release=function(){};function L(){this.a=new Ib}z("shaka.util.EventManager",L);L.prototype.release=function(){this.Ya();this.a=null};L.prototype.release=L.prototype.release;L.prototype.w=function(b,c,d,e){this.a&&(b=new cc(b,c,d,e),this.a.push(c,b))};L.prototype.listen=L.prototype.w;L.prototype.ha=function(b,c,d,e){function f(e){g.da(b,c,f);d(e)}var g=this;this.w(b,c,f,e)};L.prototype.listenOnce=L.prototype.ha;
74
+ L.prototype.da=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.da(),this.a.remove(c,f))}};L.prototype.unlisten=L.prototype.da;L.prototype.Ya=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.da();this.a.a={}}};L.prototype.removeAll=L.prototype.Ya;
75
+ function cc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=dc(b,e);this.target.addEventListener(c,d,this.a)}cc.prototype.da=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};cc.prototype.unlisten=cc.prototype.da;function dc(b,c){if(void 0==c)return!1;if("boolean"==typeof c)return c;var d=new Set(["passive","capture"]);Object.keys(c).filter(function(b){return!d.has(b)});return ec(b)?c:c.capture||!1}
76
+ function ec(b){var c=fc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}fc=c}return c||!1}var fc=void 0;function gc(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function hc(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0};function ic(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function jc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function kc(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function lc(b){var c=[b.mimeType];mc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function nc(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var mc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pc(b){return""!=qc().canPlayType(b)}function rc(b){return(navigator.userAgent||"").includes(b)}function qc(){if(sc)return sc;tc||(tc=new B(function(){sc=null}));(sc=document.querySelector("video")||document.querySelector("audio"))||(sc=document.createElement("video"));tc.O(1);return sc}var tc=null,sc=null;function wc(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=xc(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new D(2,2,2004);}}z("shaka.util.StringUtils.fromUTF8",wc);
77
+ function yc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new D(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f<b;f++)d[f]=e.getUint16(2*f,c);return xc(d)}z("shaka.util.StringUtils.fromUTF16",yc);
78
+ function zc(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return wc(c);if(254==c[0]&&255==c[1])return yc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return yc(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return yc(b,!1);if(0==c[1]&&0==c[3])return yc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return wc(b);throw new D(2,2,2003);}z("shaka.util.StringUtils.fromBytesAutoDetect",zc);
79
+ function Ac(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c.buffer}z("shaka.util.StringUtils.toUTF8",Ac);function Bc(b,c){for(var d=new Uint8Array(2*b.length),e=new DataView(d.buffer),f=0;f<b.length;++f)e.setUint16(2*f,b.charCodeAt(f),c);return d.buffer}z("shaka.util.StringUtils.toUTF16",Bc);
80
+ function xc(b){if(!Cc)for(var c=function(b){try{var c=new Uint8Array(b);Oa(c);return!0}catch(g){return!1}},d={size:65536};0<d.size;d={size:d.size},d.size/=2)if(c(d.size)){Cc=function(b){return function(c){for(var d="",e=0;e<c.length;e+=b.size)d+=String.fromCharCode.apply(String,Oa(c.subarray(e,e+b.size)));return d}}(d);break}return Cc(b)}var Cc=null;function Dc(b,c){var d=xc(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}z("shaka.util.Uint8ArrayUtils.toBase64",Dc);function Ec(b){b=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c}z("shaka.util.Uint8ArrayUtils.fromBase64",Ec);function Fc(b){for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2)c[d/2]=window.parseInt(b.substr(d,2),16);return c}
81
+ z("shaka.util.Uint8ArrayUtils.fromHex",Fc);function Gc(b){for(var c="",d=0;d<b.length;++d){var e=b[d].toString(16);1==e.length&&(e="0"+e);c+=e}return c}z("shaka.util.Uint8ArrayUtils.toHex",Gc);function Hc(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;for(var d=0;d<b.length;++d)if(b[d]!=c[d])return!1;return!0}z("shaka.util.Uint8ArrayUtils.equal",Hc);
82
+ function Ic(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}z("shaka.util.Uint8ArrayUtils.concat",Ic);function Jc(b){var c=this;this.C=b;this.v=new Set;this.m=this.h=null;this.P=!1;this.a=null;this.i=new L;this.b=new Map;this.o=[];this.l=new G;this.f=null;this.g=function(d){c.l.reject(d);b.onError(d)};this.na=new Map;this.T=new Map;this.M=new B(function(){return Kc(c)});this.c=!1;this.$=new G;this.D=!1;this.G=[];this.ma=!1;this.W=(new B(function(){Lc(c)})).La(1);this.l["catch"](function(){})}p=Jc.prototype;
83
+ p.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.j){case 1:if(b.c)return u(d,b.$,0);b.c=!0;return u(d,Mc(b),4);case 4:b.$.resolve(),d.A(0)}})})};
84
+ function Mc(b){return t(function d(){var e;return y(d,function(d){switch(d.j){case 1:return b.i.release(),b.i=null,b.l.reject(),b.W.stop(),b.W=null,b.M.stop(),b.M=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return t(function k(){return y(k,function(d){switch(d.j){case 1:return ya(d,2),u(d,Nc(b),4);case 4:Ca(d,0);break;case 2:Da(d),v(d)}})})})})),2);case 2:if(!b.m){d.A(3);break}ya(d,4);return u(d,b.m.setMediaKeys(null),6);case 6:Ca(d,
85
+ 5);break;case 4:Da(d);case 5:b.m=null;case 3:b.a=null,b.v.clear(),b.h=null,b.o=[],b.f=null,b.g=null,b.C=null,v(d)}})})}p.configure=function(b){this.f=b};function Oc(b,c,d){b.o=[];b.D=d;return Pc(b,c)}function Qc(b,c,d){b.o=d;b.D=0<d.length;return Pc(b,c)}
86
+ function Rc(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return Sc(b,h)}
87
+ function Pc(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=ic(b.f.servers);Tc(c,e)}var f=Uc(b);if(f){var g=r(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=r(c);for(e=f.next();!e.done;e=f.next())for(e=r(e.value.drmInfos),g=e.next();!g.done;g=e.next())Vc(g.value,ic(b.f.servers),ic(b.f.advanced||{}));e=Wc(b,c);if(!e.size)return b.P=!0,Promise.resolve();e=Sc(b,e);return d?e:e["catch"](function(){})}
88
+ p.Cb=function(b){var c=this;if(!this.h)return this.i.ha(b,"encrypted",function(){c.g(new D(2,6,6010))}),Promise.resolve();this.m=b;this.i.ha(this.m,"play",function(){for(var b=0;b<c.G.length;b++)Xc(c,c.G[b]);c.ma=!0;c.G=[]});b=this.m.setMediaKeys(this.h);b=b["catch"](function(b){return Promise.reject(new D(2,6,6003,b.message))});var d=Yc(this);return Promise.all([b,d]).then(function(){if(c.c)return Promise.reject();Zc(c);c.a.initData.length||c.o.length||c.i.w(c.m,"encrypted",function(b){return $c(c,
89
+ b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.c)return Promise.reject(b)})};function Yc(b){return t(function d(){var e;return y(d,function(d){switch(d.j){case 1:if(!(b.h&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.A(0);break}ya(d,3);return u(d,b.h.setServerCertificate(b.a.serverCertificate),5);case 5:Ca(d,0);break;case 3:return e=Da(d),d["return"](Promise.reject(new D(2,6,6004,e.message)))}})})}
90
+ function ad(b,c){return t(function e(){var f,g,h;return y(e,function(e){switch(e.j){case 1:return u(e,bd(b,c),2);case 2:f=e.s;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.xa=new G,g.push(h.xa);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function Zc(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return cd(b,c.initDataType,c.initData)});b.o.forEach(function(c){return bd(b,c)});c.length||b.o.length||b.l.resolve();return b.l}
91
+ function $c(b,c,d){var e=b.b.values();e=r(e);for(var f=e.next();!f.done;f=e.next())if(Hc(d,f.value.initData))return;cd(b,c,d)}p.keySystem=function(){return this.a?this.a.keySystem:""};function dd(b,c){return rc("Edge/")?!0:b.v.has(c)}function ed(b){b=b.b.keys();b=gc(b,function(b){return b.sessionId});return Array.from(b)}p.dc=function(){var b=Infinity,c=this.b.keys();c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
92
+ function Wc(b,c){for(var d=new Set,e=r(c),f=e.next();!f.done;f=e.next()){var g=r(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=r(d);for(f=e.next();!f.done;f=e.next())Vc(f.value,ic(b.f.servers),ic(b.f.advanced||{}));g=b.D?"required":"optional";var h=b.D?["persistent-license"]:["temporary"];e=new Map;d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
93
+ label:f.keySystem,drmInfos:[]});d=r(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?kc(g.mimeType,g.codecs):"",l=h?kc(h.mimeType,h.codecs):"",m=r(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var n=e.get(f.keySystem);n.drmInfos.push(f);f.distinctiveIdentifierRequired&&(n.distinctiveIdentifier="required");f.persistentStateRequired&&(n.persistentState="required");g&&n.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&n.videoCapabilities.push({robustness:f.videoRobustness||
94
+ "",contentType:l})}}return e}
95
+ function Sc(b,c){if(1==c.size&&c.has(""))return Promise.reject(new D(2,6,6E3));for(var d=r(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new G;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.c)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.bind(b));
96
+ f=f["catch"](function(){return Promise.reject(new D(2,6,6001))});f=f.then(function(b){if(this.c)return Promise.reject();this.v.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=r(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.v.add(d.value.contentType);e=r(e);for(d=e.next();!d.done;d=e.next())this.v.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],n=[],q=[];fd(d.drmInfos,f,g,n,q);this.a={keySystem:e,licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==
97
+ d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:n,keyIds:q};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new D(2,6,6012,this.a.keySystem))}.bind(b)).then(function(b){if(this.c)return Promise.reject();this.h=b;this.P=!0}.bind(b))["catch"](function(b){if(!this.c)return this.a=
98
+ null,this.v.clear(),b instanceof D?Promise.reject(b):Promise.reject(new D(2,6,6002,b.message))}.bind(b));d.reject();return f}
99
+ function Uc(b){b=ic(b.f.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Fc(e),g=Fc(b);f={kty:"oct",kid:Dc(f,!1),k:Dc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(Ac(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
100
+ initData:e,keyIds:[]}}
101
+ function bd(b,c){try{var d=b.h.createSession("persistent-license")}catch(g){var e=new D(2,6,6005,g.message);b.g(e);return Promise.reject(e)}b.i.w(d,"message",b.Sd.bind(b));b.i.w(d,"keystatuseschange",b.Qd.bind(b));var f={initData:null,loaded:!1,Xc:Infinity,xa:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.c)return Promise.reject();if(b)return f.loaded=!0,gd(this)&&this.l.resolve(),d;this.b["delete"](d);this.g(new D(2,6,6013))}.bind(b),function(b){this.c||(this.b["delete"](d),this.g(new D(2,
102
+ 6,6005,b.message)))}.bind(b))}
103
+ function cd(b,c,d){try{var e=b.D?b.h.createSession("persistent-license"):b.h.createSession()}catch(f){b.g(new D(2,6,6005,f.message));return}b.i.w(e,"message",b.Sd.bind(b));b.i.w(e,"keystatuseschange",b.Qd.bind(b));b.b.set(e,{initData:d,loaded:!1,Xc:Infinity,xa:null});e.generateRequest(c,d.buffer)["catch"](function(c){if(!b.c){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})}
104
+ p.Sd=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ma?this.G.push(b):Xc(this,b)};
105
+ function Xc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Tb([f],b.f.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||hd(f);b.a.keySystem.startsWith("com.apple.fps")&&id(f);b.C.rb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();
106
+ this.a.keySystem.startsWith("com.apple.fps")&&jd(b);return d.update(b.data).then(function(){var b=this;this.C.onEvent(new I("drmsessionupdate"));e&&(e.xa&&e.xa.resolve(),(new B(function(){e.loaded=!0;gd(b)&&b.l.resolve()})).O(kd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.xa&&e.xa.reject(b))}.bind(b))["catch"](function(b){this.c||(b=new D(2,6,6008,b.message),this.g(b),e&&e.xa&&e.xa.reject(b))}.bind(b))}
107
+ function hd(b){var c=yc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector("value").textContent;b.body=Ec(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
108
+ function id(b){var c=new Uint8Array(b.body);c="spc="+Dc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Ac(c)}function jd(b){try{var c=wc(b.data)}catch(d){return}c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Ec(c).buffer}
109
+ p.Qd=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!rc("Tizen")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=Gc(new Uint8Array(e));
110
+ this.na.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.xa&&(this.b["delete"](b),b.close()["catch"](function(){}));gd(this)&&(this.l.resolve(),this.M.O(ld))};function Kc(b){var c=b.na,d=b.T;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new D(2,6,6014));b.C.kc(jc(d))}
111
+ function md(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.j){case 1:return ya(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.s,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,rc("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Ca(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
112
+ persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="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(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return jc(e)})}
113
+ function nd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!dd(b,kc(d.mimeType,d.codecs))||e&&e.encrypted&&!dd(b,kc(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
114
+ function od(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;e<b.length;e++)for(var f=0;f<c.length;f++)if(b[e].keySystem==c[f].keySystem){var g=b[e];f=c[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);var k=[];k=k.concat(g.keyIds);k=k.concat(f.keyIds);d.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||
115
+ f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}function Lc(b){b.b.forEach(function(c,d){var e=c.Xc,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.C.onExpirationUpdated(d.sessionId,f),c.Xc=f)})}function gd(b){b=b.b.values();return hc(b,function(b){return b.loaded})}
116
+ function Tc(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=r(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
117
+ function fd(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return Hc(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&Hc(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
118
+ function Vc(b,c,d){if(b.keySystem&&("org.w3.clearkey"!=b.keySystem||!b.licenseServerUri)){c.size&&(c=c.get(b.keySystem)||"",b.licenseServerUri=c);b.keyIds||(b.keyIds=[]);if(d=d.get(b.keySystem))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||
119
+ (b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function Nc(b){return t(function d(){var e;return y(d,function(d){switch(d.j){case 1:return e=new Promise(function(b){(new B(b)).O(pd)}),u(d,Promise.race([b.close().then(function(){return!0}),e.then(function(){return!1})]),2);case 2:v(d)}})})}var pd=1,kd=5,ld=.5;function qd(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}qd.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};qd.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};qd.prototype.c=function(){this.a.resetCaptionStream()};function rd(){}rd.prototype.init=function(){};rd.prototype.b=function(){};rd.prototype.c=function(){};function sd(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function td(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function ud(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}
120
+ function vd(b){if(!b)return[];for(var c=[],d=0;d<b.length;d++)c.push({start:b.start(d),end:b.end(d)});return c};var xd={ye:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},yc:function(b,c){return b.concat(c)},ic:function(){},Ga:function(b){return null!=b}};function yd(b,c){if(0==c.length)return b;var d=c.map(function(b){return new gb(b)});return b.map(function(b){return new gb(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(xd.yc,[]).map(function(b){return b.toString()})}function zd(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var Ad={Na:"video",Ab:"audio",qa:"text",og:"application"},Bd=1/15;function Cd(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.i.bind(this));this.a.on("done",this.h.bind(this))}Cd.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function Dd(b,c){return window.muxjs&&"mp2t"==b.split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(Ed(c,b)):MediaSource.isTypeSupported(Ed("audio",b))||MediaSource.isTypeSupported(Ed("video",b)):!1}
121
+ function Ed(b,c){var d=c.replace("mp2t","mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Fd(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b}
122
+ Cd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};Cd.prototype.h=function(){var b={data:Ic.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Gd(b,c,d){this.startTime=b;this.direction=Hd;this.endTime=c;this.payload=d;this.region=new Id;this.position=null;this.positionAlign=Jd;this.size=100;this.textAlign=Kd;this.writingMode=Ld;this.lineInterpretation=Md;this.line=null;this.lineHeight="";this.lineAlign=Nd;this.displayAlign=Od;this.backgroundColor=this.color="";this.backgroundImage=null;this.fontSize="";this.fontWeight=Pd;this.fontStyle=Qd;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}z("shaka.text.Cue",Gd);
123
+ var Jd="auto";Gd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Jd};var Kd="center",Rd={LEFT:"left",RIGHT:"right",CENTER:Kd,START:"start",END:"end"};Gd.textAlign=Rd;var Od="after",Sd={BEFORE:"before",CENTER:"center",AFTER:Od};Gd.displayAlign=Sd;var Hd="ltr";Gd.direction={HORIZONTAL_LEFT_TO_RIGHT:Hd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ld="horizontal-tb";Gd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ld,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
124
+ var Md=0;Gd.lineInterpretation={LINE_NUMBER:Md,PERCENTAGE:1};var Nd="start",Td={CENTER:"center",START:Nd,END:"end"};Gd.lineAlign=Td;var Pd=400;Gd.fontWeight={NORMAL:Pd,BOLD:700};var Qd="normal",Ud={NORMAL:Qd,ITALIC:"italic",OBLIQUE:"oblique"};Gd.fontStyle=Ud;Gd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
125
+ function Id(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Vd;this.scroll=Wd}z("shaka.text.CueRegion",Id);var Vd=1;Id.units={PX:0,PERCENTAGE:Vd,LINES:2};var Wd="";Id.scrollMode={NONE:Wd,UP:"up"};function Xd(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.l="";this.i=new Map}var Yd={};z("shaka.text.TextEngine.registerParser",function(b,c){Yd[b]=c});z("shaka.text.TextEngine.unregisterParser",function(b){delete Yd[b]});function Zd(b){return Yd[b]||window.muxjs&&"application/cea-608"==b?!0:!1}Xd.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function $d(b,c){"application/cea-608"!=c&&(b.g=new Yd[c])}
126
+ Xd.prototype.Lc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}};
127
+ function ae(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.h}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.h)}}.bind(b))}
128
+ Xd.prototype.remove=function(b,c){return Promise.resolve().then(function(){!this.c||!this.c.remove(b,c)||null==this.a||c<=this.a||b>=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&c<this.b?this.a=c:b>this.a&&c>=this.b&&(this.b=b))}.bind(this))};Xd.prototype.re=function(b){this.c.append(b)};Xd.prototype.appendCues=Xd.prototype.re;
129
+ Xd.prototype.rc=function(b,c){this.l=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Xd.prototype.setSelectedClosedCaptionId=Xd.prototype.rc;
130
+ function be(b,c,d,e,f){var g=d+" "+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.h&&(l=new Gd(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.l&&b.c.append([l]))}f=r(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.i.has(g)||b.i.set(g,new Map),c=r(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
131
+ b.i.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.h))};function ce(b,c,d){this.f=b;this.g=d;this.b={};this.a=null;this.c={};this.i=new L;this.v=!1;this.l={};this.m=c;b=this.o=new G;c=new MediaSource;this.i.ha(c,"sourceopen",b.resolve);this.f.src=de(c);this.h=c}var de=window.URL.createObjectURL;function ee(b){var c=kc(b.mimeType,b.codecs),d=lc(b);return Zd(c)||MediaSource.isTypeSupported(d)||Dd(c,b.type)}p=ce.prototype;
132
+ p.destroy=function(){var b=this;this.v=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"](xd.ic));for(f=1;f<e.length;++f)e[f].p.reject()}this.a&&c.push(this.a.destroy());this.g&&c.push(this.g.destroy());for(var g in this.l)c.push(this.l[g].destroy());return Promise.all(c).then(function(){b.i&&(b.i.release(),b.i=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.h=null;b.a=null;b.g=null;b.b={};b.l={};b.m=null;b.c={}})};
133
+ p.init=function(b,c){var d=this;return t(function f(){var g;return y(f,function(f){switch(f.j){case 1:return g=Ad,u(f,d.o,2);case 2:b.forEach(function(b,f){var h=kc(b.mimeType,b.codecs);f==g.qa?fe(d,h):(!c&&MediaSource.isTypeSupported(h)||!Dd(h,f)||(d.l[f]=new Cd,h=Ed(f,h)),h=d.h.addSourceBuffer(h),d.i.w(h,"error",d.Xf.bind(d,f)),d.i.w(h,"updateend",d.ub.bind(d,f)),d.b[f]=h,d.c[f]=[])}),v(f)}})})};function fe(b,c){b.a||(b.a=new Xd(b.g));$d(b.a,c)}
134
+ function ge(b,c){if("text"==c)var d=b.a.a;else d=he(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function ie(b,c){return"text"==c?b.a.b:sd(he(b,c))}function je(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=he(b,c);return ud(b,d)}
135
+ p.Ic=function(b){b.total=vd(this.f.buffered);b.audio=vd(he(this,"audio"));b.video=vd(he(this,"video"));b.text=[];if(this.a){var c=this.a.a,d=this.a.b;null!=c&&null!=d&&b.text.push({start:c,end:d})}};function he(b,c){try{return b.b[c].buffered}catch(d){return null}}
136
+ function ke(b,c,d,e,f,g){if("text"==c)return ae(b.a,d,e,f);if(b.l[c])return Fd(b.l[c],d).then(function(b){this.a||fe(this,"text/vtt");b.captions&&be(this.a,b.captions,e,f,this.b.video.timestampOffset);return le(this,c,this.fe.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||fe(b,"text/vtt"),null==e&&null==f?b.m.init(d):b.m.b(d,function(c){c.length&&be(b.a,c,e,f,b.b.video.timestampOffset)}));return le(b,c,b.fe.bind(b,c,d))}p.rc=function(b){var c=ie(this,"video")||0;this.a.rc(b,c)};
137
+ p.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):le(this,b,this.ge.bind(this,b,c,d))};function me(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.m.c();return b.a.remove(0,Infinity)}return le(b,c,b.ge.bind(b,c,0,b.h.duration))}p.flush=function(b){return"text"==b?Promise.resolve():le(this,b,this.Ce.bind(this,b))};
138
+ function ne(b,c,d,e,f){return"text"==c?(b.a.m=d,b=b.a,b.f=e,b.h=f,Promise.resolve()):Promise.all([le(b,c,b.pe.bind(b,c)),le(b,c,b.Sf.bind(b,c,d)),le(b,c,b.Pf.bind(b,c,e,f))])}p.endOfStream=function(b){return oe(this,function(){b?this.h.endOfStream(b):this.h.endOfStream()}.bind(this))};p.wa=function(b){return oe(this,function(){this.h.duration=b}.bind(this))};p.Y=function(){return this.h.duration};p.fe=function(b,c){this.b[b].appendBuffer(c)};
139
+ p.ge=function(b,c,d){d<=c?this.ub(b):this.b[b].remove(c,d)};p.pe=function(b){var c=this.b[b].appendWindowStart,d=this.b[b].appendWindowEnd;this.b[b].abort();this.b[b].appendWindowStart=c;this.b[b].appendWindowEnd=d;this.ub(b)};p.Ce=function(b){this.f.currentTime-=.001;this.ub(b)};p.Sf=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.ub(b)};p.Pf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.ub(b)};
140
+ p.Xf=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};p.ub=function(b){var c=this.c[b][0];c&&(c.p.resolve(),pe(this,b))};function le(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new G};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),pe(b,c)}return d.p}
141
+ function oe(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new G,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)pe(this,d);return b}.bind(b),function(b){throw b;}.bind(b))}function pe(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),pe(b,c)}};function qe(b,c){b=M(b);c=M(c);return b.split("-")[0]==c.split("-")[0]}function re(b,c){b=M(b);c=M(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=se.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function te(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):"und"}
142
+ function ue(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,re(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,re(d,f))return f;return null}
143
+ var se=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",
144
+ "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",
145
+ "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",
146
+ "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",
147
+ "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",
148
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ve(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function we(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=ve(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}
149
+ function xe(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.P&&!nd(b,e))return!1;var f=e.audio;e=e.video;return f&&!ee(f)||e&&!ee(e)||f&&c&&!ye(f,c)||e&&d&&!ye(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Zd(kc(b.mimeType,b.codecs))})}function ye(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0}
150
+ function ze(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "),
151
+ audioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||
152
+ null,b.label=c.label,b.audioRoles=c.roles);return b}function Ae(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}
153
+ function Be(b){b.__shaka_id||(b.__shaka_id=Ce++);return b.__shaka_id}var Ce=0;function De(b){return{id:Be(b),active:!1,type:"",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
154
+ function Ee(b){return b.allowedByApplication&&b.allowedByKeySystem}function Fe(b){return b.filter(function(b){return Ee(b)})}
155
+ function Ge(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}
156
+ function He(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=ue(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Ie(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(xd.yc,[]);return b.length?Ie(e,b[0]):e}
157
+ function Ie(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Je(b,c,d){for(var e=0;e<d.length;e++)if(d[e].audio==b&&d[e].video==c)return d[e];return null}function Ke(b){var c=[];b.audio&&c.push(b.audio);b.video&&c.push(b.video);return c};function N(){this.h=null;this.f=!1;this.b=new Za;this.c=[];this.i=!1;this.a=this.g=null}z("shaka.abr.SimpleAbrManager",N);N.prototype.stop=function(){this.h=null;this.f=!1;this.c=[];this.g=null};N.prototype.stop=N.prototype.stop;N.prototype.init=function(b){this.h=b};N.prototype.init=N.prototype.init;
158
+ N.prototype.chooseVariant=function(){var b=Le(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Le(null,this.c),b=[b[0]]);for(var d=b[0]||null,e=0;e<b.length;++e){var f=b[e],g=(b[e+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};
159
+ N.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Xa(d.b,f,e);Xa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};
160
+ N.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;
161
+ function Le(b,c){b&&(c=c.filter(function(c){return ve(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Me(b,c){this.a=b;this.b=c}Me.prototype.toString=function(){return"v"+this.a+"."+this.b};function Ne(b,c){var d=new Me(2,6),e=Oe,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Pe(b,c,d,e){ab([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Qe(b,c,d,e){$a([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Oe=null;var Re="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Se="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Te=["loop","playbackRate"],Ue=["pause","play"],Ve="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),We={getAssetUri:2,
162
+ getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Xe={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ye=[["getConfiguration","configure"]],Ze=[["isTextTrackVisible","setTextTrackVisibility"]],
163
+ $e="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),af=["attach","detach","load","unload"];
164
+ function bf(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;f<d.length;++f)c.start.push(d.start(f)),c.end.push(d.end(f));else c=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
165
+ d:0>d?"-Infinity":"Infinity":d;return c}})}function cf(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?df(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function df(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function ef(b,c,d,e,f,g){this.P=b;this.f=new B(c);this.T=d;this.l=!1;this.G=e;this.M=f;this.C=g;this.b=this.h=!1;this.D="";this.i=null;this.m=this.Od.bind(this);this.o=this.kf.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var ff=!1,gf=null;p=ef.prototype;p.destroy=function(){hf(this);gf&&jf(this);this.f&&(this.f.stop(),this.f=null);this.M=this.G=null;this.b=this.h=!1;this.o=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.fa=function(){return this.b};
166
+ p.bd=function(){return this.D};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.sc();var b=new chrome.cast.SessionRequest(this.P);b=new chrome.cast.ApiConfig(b,this.Pd.bind(this),this.pf.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});ff&&this.f.O(.02);(b=gf)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Pd(b):gf=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
167
+ p.hd=function(b){this.i=b;this.b&&kf({type:"appData",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!ff)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new G;chrome.cast.requestSession(this.Zc.bind(this,b),this.Nd.bind(this));return this.g};p.ac=function(){this.b&&(hf(this),gf&&(jf(this),gf.stop(function(){},function(){}),gf=null))};
168
+ p.get=function(b,c){if("video"==b){if(Ue.includes(c))return this.Zd.bind(this,b,c)}else if("player"==b){if(Xe[c]&&!this.get("player","isLive")())return function(){};if($e.includes(c))return this.Zd.bind(this,b,c);if(af.includes(c))return this.Ef.bind(this,b,c);if(We[c])return this.Wd.bind(this,b,c)}return this.Wd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;kf({type:"set",targetName:b,property:c,value:d})};
169
+ p.Zc=function(b,c){gf=c;c.addUpdateListener(this.m);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.o);this.Od();kf({type:"init",initState:b,appData:this.i});this.g.resolve()};p.Nd=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.g.reject(new D(2,8,c,b))};p.Wd=function(b,c){return this.a[b][c]};
170
+ p.Zd=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];kf({type:"call",targetName:b,methodName:c,args:e})};p.Ef=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new G;var g=this.v.toString();this.v++;this.c[g]=f;kf({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};p.Pd=function(b){var c=this.C();this.g=new G;this.l=!0;this.Zc(c,b)};p.pf=function(b){ff="available"==b;this.f.sc()};
171
+ function jf(b){var c=gf;c.removeUpdateListener(b.m);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.o)}p.Od=function(){var b=gf?"connected"==gf.status:!1;if(this.b&&!b){this.M();for(var c in this.a)this.a[c]={};hf(this)}this.D=(this.b=b)?gf.receiver.friendlyName:"";this.f.sc()};function hf(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new D(1,7,7E3))}}
172
+ p.kf=function(b,c){var d=cf(c);switch(d.type){case "event":var e=d.event;this.G(d.targetName,new I(e.type,e));break;case "update":e=d.update;for(var f in e){d=this.a[f]||{};for(var g in e[f])d[g]=e[f][g]}this.l&&(this.T(),this.l=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new D(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function kf(b){b=bf(b);gf.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},bb)};function O(b,c,d){J.call(this);this.c=b;this.b=c;this.i=this.g=this.f=this.l=this.h=null;this.a=new ef(d,this.Tf.bind(this),this.Uf.bind(this),this.Vf.bind(this),this.Wf.bind(this),this.Bd.bind(this));lf(this)}Va(O,J);z("shaka.cast.CastProxy",O);O.prototype.destroy=function(b){b&&this.a&&this.a.ac();this.i&&(this.i.release(),this.i=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.l=this.h=this.c=null;return Promise.all(b)};
173
+ O.prototype.destroy=O.prototype.destroy;O.prototype.Ye=function(){return this.h};O.prototype.getVideo=O.prototype.Ye;O.prototype.Re=function(){return this.l};O.prototype.getPlayer=O.prototype.Re;O.prototype.te=function(){return this.a?this.a.h&&ff:!1};O.prototype.canCast=O.prototype.te;O.prototype.fa=function(){return this.a?this.a.fa():!1};O.prototype.isCasting=O.prototype.fa;O.prototype.bd=function(){return this.a?this.a.bd():""};O.prototype.receiverName=O.prototype.bd;
174
+ O.prototype.cast=function(){var b=this.Bd();return this.a.cast(b).then(function(){if(this.b)return this.b.qd()}.bind(this))};O.prototype.cast=O.prototype.cast;O.prototype.hd=function(b){this.a.hd(b)};O.prototype.setAppData=O.prototype.hd;O.prototype.dg=function(){var b=this.a;if(b.b){var c=b.C();chrome.cast.requestSession(b.Zc.bind(b,c),b.Nd.bind(b))}};O.prototype.suggestDisconnect=O.prototype.dg;O.prototype.ac=function(){this.a.ac()};O.prototype.forceDisconnect=O.prototype.ac;
175
+ function lf(b){b.a.init();b.i=new L;Re.forEach(function(b){this.i.w(this.c,b,this.mg.bind(this))}.bind(b));Ve.forEach(function(b){this.i.w(this.b,b,this.yf.bind(this))}.bind(b));b.h={};for(var c in b.c)Object.defineProperty(b.h,c,{configurable:!1,enumerable:!0,get:b.lg.bind(b,c),set:b.ng.bind(b,c)});b.l={};for(var d in b.b)Object.defineProperty(b.l,d,{configurable:!1,enumerable:!0,get:b.Vd.bind(b,d)});b.f=new J;b.f.Ub=b.h;b.g=new J;b.g.Ub=b.l}p=O.prototype;
176
+ p.Bd=function(){var b={video:{},player:{},playerAfterLoad:{},manifest:this.b.bc(),startTime:null};this.c.pause();Te.forEach(function(c){b.video[c]=this.c[c]}.bind(this));this.c.ended||(b.startTime=this.c.currentTime);Ye.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.player[d]=c}.bind(this));Ze.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.playerAfterLoad[d]=c}.bind(this));return b};p.Tf=function(){this.dispatchEvent(new I("caststatuschanged"))};
177
+ p.Uf=function(){this.f.dispatchEvent(new I(this.h.paused?"pause":"play"))};
178
+ p.Wf=function(){var b=this;Ye.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(this));var c=this.a.get("player","getAssetUri")(),d=this.a.get("video","ended"),e=Promise.resolve(),f=this.c.autoplay,g=null;d||(g=this.a.get("video","currentTime"));c&&(this.c.autoplay=!1,e=this.b.load(c,g));var h={};Te.forEach(function(b){h[b]=this.a.get("video",b)}.bind(this));e.then(function(){b.c&&(Te.forEach(function(b){this.c[b]=h[b]}.bind(b)),Ze.forEach(function(b){var c=b[1];b=this.a.get("player",
179
+ b[0])();this.b[c](b)}.bind(b)),b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new I("error",{detail:c}))})};p.lg=function(b){if("addEventListener"==b)return this.f.addEventListener.bind(this.f);if("removeEventListener"==b)return this.f.removeEventListener.bind(this.f);if(this.a.fa()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a.fa()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
180
+ p.ng=function(b,c){this.a.fa()?this.a.set("video",b,c):this.c[b]=c};p.mg=function(b){this.a.fa()||this.f.dispatchEvent(new I(b.type,b))};
181
+ p.Vd=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.h}.bind(this);if("getSharedConfiguration"==b)return this.a.get("player","getConfiguration");if("getNetworkingEngine"==b)return this.b.Eb.bind(this.b);if(this.a.fa()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("getManifestUri"==
182
+ b)return Ne("getManifestUri",'Please use "getAssetUri" instead.'),this.Vd("getAssetUri");if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return this.a.fa()&&0==Object.keys(this.a.a.video).length&&We[b]||!this.a.fa()?this.b[b].bind(this.b):this.a.get("player",b)};p.yf=function(b){this.a.fa()||this.g.dispatchEvent(b)};p.Vf=function(b,c){this.a.fa()&&("video"==b?this.f.dispatchEvent(c):"player"==b&&this.g.dispatchEvent(c))};function mf(b,c,d,e){var f=this;J.call(this);this.a=b;this.b=c;this.c=new L;this.D={video:b,player:c};this.o=d||function(){};this.G=e||function(b){return b};this.v=!1;this.h=!0;this.g=0;this.m=!1;this.l=!0;this.i=this.f=null;this.C=new B(function(){nf(f)});of(this)}Va(mf,J);z("shaka.cast.CastReceiver",mf);mf.prototype.isConnected=function(){return this.v};mf.prototype.isConnected=mf.prototype.isConnected;mf.prototype.bf=function(){return this.h};mf.prototype.isIdle=mf.prototype.bf;
183
+ mf.prototype.destroy=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:return b.c&&(b.c.release(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),b.C&&(b.C.stop(),b.C=null),b.a=null,b.D=null,b.o=null,b.v=!1,b.h=!0,b.f=null,b.i=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),v(d)}})})};mf.prototype.destroy=mf.prototype.destroy;
184
+ function of(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.Rd.bind(b);c.onSenderDisconnected=b.Rd.bind(b);c.onSystemVolumeChanged=b.Be.bind(b);b.i=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.i.onMessage=b.ef.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.rf.bind(b);c.start();Re.forEach(function(b){this.c.w(this.a,b,this.Xd.bind(this,"video"))}.bind(b));Ve.forEach(function(b){this.c.w(this.b,b,this.Xd.bind(this,"player"))}.bind(b));
185
+ cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.jd(3840,2160):b.b.jd(1920,1080);b.c.w(b.a,"loadeddata",function(){this.m=!0}.bind(b));b.c.w(b.b,"loading",function(){this.h=!1;pf(this)}.bind(b));b.c.w(b.a,"playing",function(){this.h=!1;pf(this)}.bind(b));b.c.w(b.a,"pause",function(){pf(this)}.bind(b));b.c.w(b.b,"unloading",function(){this.h=!0;pf(this)}.bind(b));b.c.w(b.a,"ended",function(){var b=this;(new B(function(){b.a&&b.a.ended&&
186
+ (b.h=!0,pf(b))})).O(5)}.bind(b))}p=mf.prototype;p.Rd=function(){this.g=0;this.l=!0;this.v=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;pf(this)};function pf(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new I("caststatuschanged")),qf(this)||rf(this,0))}.bind(b))}
187
+ function sf(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.o(d);d=Promise.resolve();var f=b.a.autoplay;c.manifest&&(b.a.autoplay=!1,d=b.b.load(c.manifest,c.startTime));d.then(function(){if(b.b){for(var d in c.video)b.a[d]=c.video[d];for(var e in c.playerAfterLoad)b.b[e](c.playerAfterLoad[e]);b.a.autoplay=f;c.manifest&&(b.a.play(),rf(b,0))}},function(c){b.b.dispatchEvent(new I("error",{detail:c}))})}p.Xd=function(b,c){this.b&&(nf(this),tf(this,{type:"event",targetName:b,event:c},this.f))};
188
+ function nf(b){b.C.O(.5);var c={video:{},player:{}};Se.forEach(function(b){c.video[b]=this.a[b]}.bind(b));if(b.b.V())for(var d in Xe)0==b.g%Xe[d]&&(c.player[d]=b.b[d]());for(var e in We)0==b.g%We[e]&&(c.player[e]=b.b[e]());if(d=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())c.video.volume=d.level,c.video.muted=d.muted;b.m&&(b.g+=1);tf(b,{type:"update",update:c},b.f);qf(b)}function qf(b){return b.l&&(b.a.duration||b.b.V())?(uf(b),b.l=!1,!0):!1}
189
+ function uf(b){var c={contentId:b.b.bc(),streamType:b.b.V()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};rf(b,0,c)}p.Be=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&tf(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);tf(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
190
+ p.rf=function(b){var c=cf(b.data);switch(c.type){case "init":this.g=0;this.m=!1;this.l=!0;sf(this,c.initState,c.appData);nf(this);break;case "appData":this.o(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}}this.D[d][e]=c;break;case "call":d=this.D[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=
191
+ c.targetName;e=c.methodName;"player"==d&&"load"==e&&(this.g=0,this.m=!1);f=c.id;b=b.senderId;var g=this.D[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.l=!0}.bind(this)));c.then(this.ce.bind(this,b,f,null),this.ce.bind(this,b,f))}};
192
+ p.ef=function(b){var c=cf(b.data);switch(c.type){case "PLAY":this.a.play();rf(this,0);break;case "PAUSE":this.a.pause();rf(this,0);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(this.a.currentTime=Number(b));d&&"PLAYBACK_START"==d?(this.a.play(),rf(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),rf(this,0));break;case "STOP":this.b.qd().then(function(){this.b&&rf(this,0)}.bind(this));break;case "GET_STATUS":rf(this,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=
193
+ d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||rf(this,0);break;case "LOAD":this.g=0;this.l=this.m=!1;b=c.media;d=c.currentTime;e=this.G(b.contentId);f=c.autoplay||!0;this.o(b.customData);f&&(this.a.autoplay=!0);this.b.load(e,d).then(function(){this.b&&uf(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");tf(this,{requestId:Number(c.requestId),type:d},
194
+ this.i)}.bind(this));break;default:tf(this,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}};p.ce=function(b,c,d){this.b&&tf(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function tf(b,c,d,e){b.v&&(b=bf(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
195
+ function rf(b,c,d){var e=b.a.playbackRate;var f=vf;f=b.h?f.IDLE:b.b.Nc()?f.ke:b.a.paused?f.me:f.ne;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);tf(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.i)}var vf={IDLE:"IDLE",ne:"PLAYING",ke:"BUFFERING",me:"PAUSED"};var P={$b:function(b,c){var d=P.R(b,c);return 1!=d.length?null:d[0]},yd:function(b,c,d){b=P.zd(b,c,d);return 1!=b.length?null:b[0]},R:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},zd:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},cc:function(b){return Array.prototype.every.call(b.childNodes,
196
+ function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},J:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},vf:function(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)},Ba:function(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);
197
+ if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null},oc:function(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null},parseInt:function(b){b=Number(b);return 0===b%1?b:null},nc:function(b){b=Number(b);return 0===b%1&&0<b?b:null},vb:function(b){b=Number(b);return 0===
198
+ b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},Ae:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1])/Number(c[2]):Number(b);return isNaN(b)?null:b},Ud:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},Td:function(b,c){try{var d=wc(b);return P.Ud(d,c)}catch(e){}}};var wf=(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:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
199
+ function xf(b,c,d){var e=yf(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new D(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.be?(f=b.init||f,!1):!0}),g.length&&(b=zf(f,c,g),0==b.length&&(b=[zd("",f)])));if(e.length&&(d||!g.length))for(b=[],c=r(wf.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(zd(d,f));if(h=Array.from(h)[0]||null)for(c=r(b),d=c.next();!d.done;d=c.next())for(d=
200
+ r(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{vd:h,tg:f,drmInfos:b,Ad:!0}}function Af(b,c,d,e){var f=xf(b,c,e);if(d.Ad){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.Ad=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new D(2,4,4008);return f.vd||d.vd}
201
+ function Bf(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function Cf(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
202
+ function zf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=wf.get(f.be);if(g){var h=zd(g,f.init||b);if(g=Df.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}
203
+ var Df=(new Map).set("com.widevine.alpha",function(b){return(b=P.yd(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=P.yd(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=Ec(b.textContent);b=Bf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=yc(b.value,!0);return(b=P.Ud(b,"WRMHEADER"))?Cf(b):""});function yf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Ef(d.value))&&c.push(d);return c}
204
+ function Ef(b){var c=b.getAttribute("schemeIdUri"),d=P.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=P.zd(b,"urn:mpeg:cenc:2013","pssh").map(P.cc);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Ec(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,be:c,keyId:d,init:0<f.length?f:null}};function Ff(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);"Time"==c&&(f=Math.round(f));switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
205
+ window.parseInt(d,10)||1;return Array(Math.max(0,d-b.length)+1).join("0")+b})}
206
+ function Gf(b,c){var d=Hf(b,c,"timescale"),e=1;d&&(e=P.nc(d)||1);d=Hf(b,c,"duration");(d=P.nc(d||""))&&(d/=e);var f=Hf(b,c,"startNumber"),g=Number(Hf(b,c,"presentationTimeOffset"))||0,h=P.vb(f||"");if(null==f||null==h)h=1;var k=If(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.S.duration||Infinity;k=P.R(k,"S");for(var m=[],n=0,q=0;q<k.length;++q){var x=k[q],w=P.J(x,"t",P.vb),A=P.J(x,"d",P.vb);x=P.J(x,"r",P.parseInt);null!=w&&(w-=g);if(!A)break;w=null!=w?w:n;x=x||0;if(0>x)if(q+1<k.length){x=P.J(k[q+
207
+ 1],"t",P.vb);if(null==x)break;else if(w>=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0<m.length&&w!=n&&(m[m.length-1].end=w/f);for(var C=0;C<=x;++C)n=w+A,m.push({start:w/f,end:n/f,ig:w}),w=n}f=m}return{timescale:e,Z:d,Za:h,la:g/e||0,rd:g,N:f}}function Hf(b,c,d){return[c(b.B),c(b.ca),c(b.ja)].filter(xd.Ga).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
208
+ function If(b,c,d){return[c(b.B),c(b.ca),c(b.ja)].filter(xd.Ga).map(function(b){return P.$b(b,d)}).reduce(function(b,c){return b||c})}
209
+ function Jf(b,c,d,e,f,g){for(var h=P.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=P.getAttributeNS(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<b.attributes.length;l++){var m=b.attributes[l];"http://www.w3.org/1999/xlink"==m.namespaceURI&&(b.removeAttributeNS(m.namespaceURI,m.localName),--l)}if(5<=g)return Bb(new D(2,4,4028));if("onLoad"!=k)return Bb(new D(2,4,4027));var n=yd([e],[h]);return f.request(0,Tb(n,c)).U(function(e){e=P.Td(e.data,b.tagName);if(!e)return Bb(new D(2,
210
+ 4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return Kf(b,c,d,n[0],f,g+1)})}
211
+ function Kf(b,c,d,e,f,g){g=void 0===g?0:g;if(P.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=Jf(b,c,d,e,f,g);d&&(h=h.U(void 0,function(){return Kf(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==P.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push(Kf(l,c,d,e,f,g)))}return Gb(h).U(function(){return b})};function Lf(b,c,d){this.c=b;this.b=c;this.a=d}z("shaka.media.InitSegmentReference",Lf);Lf.prototype.Ac=function(){return this.c()};Lf.prototype.createUris=Lf.prototype.Ac;Lf.prototype.Kc=function(){return this.b};Lf.prototype.getStartByte=Lf.prototype.Kc;Lf.prototype.Jc=function(){return this.a};Lf.prototype.getEndByte=Lf.prototype.Jc;function Q(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}z("shaka.media.SegmentReference",Q);Q.prototype.ba=function(){return this.position};
212
+ Q.prototype.getPosition=Q.prototype.ba;Q.prototype.Lc=function(){return this.startTime};Q.prototype.getStartTime=Q.prototype.Lc;Q.prototype.Ge=function(){return this.endTime};Q.prototype.getEndTime=Q.prototype.Ge;Q.prototype.Ac=function(){return this.c()};Q.prototype.createUris=Q.prototype.Ac;Q.prototype.Kc=function(){return this.b};Q.prototype.getStartByte=Q.prototype.Kc;Q.prototype.Jc=function(){return this.a};Q.prototype.getEndByte=Q.prototype.Jc;function R(b,c){this.K=b;this.b=c==Mf;this.a=0}z("shaka.util.DataViewReader",R);var Mf=1;R.Endianness={pg:0,qg:Mf};R.prototype.sa=function(){return this.a<this.K.byteLength};R.prototype.hasMoreData=R.prototype.sa;R.prototype.ba=function(){return this.a};R.prototype.getPosition=R.prototype.ba;R.prototype.Ie=function(){return this.K.byteLength};R.prototype.getLength=R.prototype.Ie;R.prototype.ka=function(){try{var b=this.K.getUint8(this.a);this.a+=1;return b}catch(c){Nf()}};R.prototype.readUint8=R.prototype.ka;
213
+ R.prototype.Lb=function(){try{var b=this.K.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Nf()}};R.prototype.readUint16=R.prototype.Lb;R.prototype.F=function(){try{var b=this.K.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Nf()}};R.prototype.readUint32=R.prototype.F;R.prototype.Yd=function(){try{var b=this.K.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Nf()}};R.prototype.readInt32=R.prototype.Yd;
214
+ R.prototype.yb=function(){try{if(this.b){var b=this.K.getUint32(this.a,!0);var c=this.K.getUint32(this.a+4,!0)}else c=this.K.getUint32(this.a,!1),b=this.K.getUint32(this.a+4,!1)}catch(d){Nf()}if(2097151<c)throw new D(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};R.prototype.readUint64=R.prototype.yb;R.prototype.Xa=function(b){this.a+b>this.K.byteLength&&Nf();var c=new Uint8Array(this.K.buffer,this.K.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Xa;
215
+ R.prototype.L=function(b){this.a+b>this.K.byteLength&&Nf();this.a+=b};R.prototype.skip=R.prototype.L;R.prototype.ae=function(b){this.a<b&&Nf();this.a-=b};R.prototype.rewind=R.prototype.ae;R.prototype.seek=function(b){(0>b||b>this.K.byteLength)&&Nf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.ad=function(){for(var b=this.a;this.sa()&&0!=this.K.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.K.buffer,this.K.byteOffset+b,this.a-b);this.a+=1;return wc(b)};
216
+ R.prototype.readTerminatedString=R.prototype.ad;function Nf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z("shaka.util.Mp4Parser",S);S.prototype.H=function(b,c){var d=Of(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.H;S.prototype.ea=function(b,c){var d=Of(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ea;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;
217
+ S.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.sa()&&!this.a;)this.mc(0,d,c)};S.prototype.parse=S.prototype.parse;
218
+ S.prototype.mc=function(b,c,d){var e=c.ba(),f=c.F(),g=c.F();switch(f){case 0:f=c.K.byteLength-e;break;case 1:f=c.yb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.F(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.K.byteLength&&(g=c.K.byteLength);g-=c.ba();c=0<g?c.Xa(g):new Uint8Array(0);c=new R(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.L(Math.min(e+f-c.ba(),c.K.byteLength-c.ba()))};
219
+ S.prototype.parseNext=S.prototype.mc;function Pf(b){for(;b.reader.sa()&&!b.parser.a;)b.parser.mc(b.start,b.reader,b.partialOkay)}S.children=Pf;function Qf(b){for(var c=b.reader.F();0<c&&!b.parser.a;--c)b.parser.mc(b.start,b.reader,b.partialOkay)}S.sampleDescription=Qf;function Rf(b){return function(c){b(c.reader.Xa(c.reader.K.byteLength-c.reader.ba()))}}S.allData=Rf;function Of(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
220
+ function Sf(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Sf;function Tf(b,c,d,e){var f,g=(new S).ea("sidx",function(b){f=Uf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);}
221
+ function Uf(b,c,d,e){var f=[];e.reader.L(4);var g=e.reader.F();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.F();var k=e.reader.F()}else h=e.reader.yb(),k=e.reader.yb();e.reader.L(2);var l=e.reader.Lb();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.F(),n=(m&2147483648)>>>31;m&=2147483647;var q=e.reader.F();e.reader.L(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z("shaka.media.SegmentIndex",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};T.prototype.find=T.prototype.find;
222
+ T.prototype.get=function(b){if(0==this.a.length)return null;b-=this.a[0].position;return 0>b||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};T.prototype.offset=T.prototype.offset;
223
+ T.prototype.Sc=function(b){for(var c=[],d=0,e=0;d<this.a.length&&e<b.length;){var f=this.a[d],g=b[e];f.startTime<g.startTime?(c.push(f),d++):(f.startTime>g.startTime?0==d&&c.push(g):(.1<Math.abs(f.endTime-g.endTime)?c.push(new Q(f.position,g.startTime,g.endTime,g.c,g.b,g.a)):c.push(f),d++),e++)}for(;d<this.a.length;)c.push(this.a[d++]);if(c.length)for(d=c[c.length-1].position+1;e<b.length;)f=b[e++],f=new Q(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};T.prototype.merge=T.prototype.Sc;
224
+ T.prototype.Dc=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.Dc;function Vf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Wf(b){this.b=b;this.a=new R(b,0);Xf||(Xf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Xf;Wf.prototype.sa=function(){return this.a.sa()};
225
+ function Yf(b){var c=Zf(b);if(7<c.length)throw new D(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=Zf(b);a:{for(e=0;e<Xf.length;e++)if(Hc(d,Xf[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.ba();else{if(8==d.length&&d[1]&224)throw new D(2,3,3001);e=d[0]&(1<<8-d.length)-1;for(var f=1;f<d.length;f++)e=256*e+d[f];d=e}d=b.a.ba()+d<=b.b.byteLength?d:b.b.byteLength-b.a.ba();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.ba(),d);b.a.L(d);return new $f(c,e)}
226
+ function Zf(b){var c=b.a.ka(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new D(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.ka();return e}function $f(b,c){this.id=b;this.a=c}function ag(b){if(8<b.a.byteLength)throw new D(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new D(2,3,3001);for(var c=0,d=0;d<b.a.byteLength;d++){var e=b.a.getUint8(d);c=256*c+e}return c};function bg(){}
227
+ bg.prototype.parse=function(b,c,d,e){var f;c=new Wf(new DataView(c));if(440786851!=Yf(c).id)throw new D(2,3,3008);var g=Yf(c);if(408125543!=g.id)throw new D(2,3,3009);c=g.a.byteOffset;g=new Wf(g.a);for(f=null;g.sa();){var h=Yf(g);if(357149030==h.id){f=h;break}}if(!f)throw new D(2,3,3010);g=new Wf(f.a);f=1E6;for(h=null;g.sa();){var k=Yf(g);if(2807729==k.id)f=ag(k);else if(17545==k.id)if(h=k,4==h.a.byteLength)h=h.a.getFloat32(0);else if(8==h.a.byteLength)h=h.a.getFloat64(0);else throw new D(2,3,3003);
228
+ }if(null==h)throw new D(2,3,3011);g=f/1E9;f=h*g;b=Yf(new Wf(new DataView(b)));if(475249515!=b.id)throw new D(2,3,3007);return cg(b,c,g,f,d,e)};function cg(b,c,d,e,f,g){function h(){return f}var k=[];b=new Wf(b.a);for(var l=null,m=null;b.sa();){var n=Yf(b);if(187==n.id){var q=dg(n);q&&(n=d*q.jg,q=c+q.Df,null!=l&&k.push(new Q(k.length,l-g,n-g,h,m,q-1)),l=n,m=q)}}null!=l&&k.push(new Q(k.length,l-g,e-g,h,m,null));return k}
229
+ function dg(b){var c=new Wf(b.a);b=Yf(c);if(179!=b.id)throw new D(2,3,3013);b=ag(b);c=Yf(c);if(183!=c.id)throw new D(2,3,3012);c=new Wf(c.a);for(var d=0;c.sa();){var e=Yf(c);if(241==e.id){d=ag(e);break}}return{jg:b,Df:d}};function eg(b,c){var d=If(b,c,"Initialization");if(!d)return null;var e=b.B.oa,f=d.getAttribute("sourceURL");f&&(e=yd(b.B.oa,[f]));f=0;var g=null;if(d=P.J(d,"range",P.oc))f=d.start,g=d.end;return new Lf(function(){return e},f,g)}
230
+ function fg(b,c){var d=Number(Hf(b,gg,"presentationTimeOffset"))||0,e=Hf(b,gg,"timescale"),f=1;e&&(f=P.nc(e)||1);d=d/f||0;e=eg(b,gg);var g=b.B.contentType;f=b.B.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new D(2,4,4006);if("webm"==f&&!e)throw new D(2,4,4005);g=If(b,gg,"RepresentationIndex");var h=Hf(b,gg,"indexRange"),k=b.B.oa;h=P.oc(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=yd(b.B.oa,[l]));h=P.J(g,"range",P.oc,h)}if(!h)throw new D(2,4,4002);f=hg(b,c,e,k,h.start,h.end,
231
+ f,d);return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,la:d}}
232
+ function hg(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.kb||!b.S.Pc,n=b.S.start,q=b.S.duration,x=c,w=null;return{createSegmentIndex:function(){var b=[x(e,f,g),"webm"==h?x(d.c(),d.b,d.a):null];x=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?Tf(c,f,e,k):(new bg).parse(c,b,e,k);l.sb(c,n);w=new T(c);m&&Vf(w,q)})},findSegmentPosition:function(b){return w.find(b)},getSegmentReference:function(b){return w.get(b)}}}function gg(b){return b.Nb};function ig(b,c){var d=eg(b,jg);var e=kg(b);var f=Gf(b,jg),g=f.Za;0==g&&(g=1);var h=0;f.Z?h=f.Z*(g-1):f.N&&0<f.N.length&&(h=f.N[0].start);e={Z:f.Z,startTime:h,Za:g,la:f.la,N:f.N,qb:e};if(!e.Z&&!e.N&&1<e.qb.length)throw new D(2,4,4002);if(!e.Z&&!b.S.duration&&!e.N&&1==e.qb.length)throw new D(2,4,4002);if(e.N&&0==e.N.length)throw new D(2,4,4002);g=f=null;b.ja.id&&b.B.id&&(g=b.ja.id+","+b.B.id,f=c[g]);h=lg(b.S.duration,e.Za,b.B.oa,e);f?(f.Sc(h),g=b.presentationTimeline.Gb(),f.Dc(g-b.S.start)):(b.presentationTimeline.sb(h,
233
+ b.S.start),f=new T(h),g&&b.kb&&(c[g]=f));b.kb&&b.S.Pc||Vf(f,b.S.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,la:e.la}}function jg(b){return b.Ja}
234
+ function lg(b,c,d,e){var f=e.qb.length;e.N&&e.N.length!=e.qb.length&&(f=Math.min(e.N.length,e.qb.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.qb[k],m=yd(d,[l.cf]),n=void 0;n=null!=e.Z?h+e.Z:e.N?e.N[k].end:h+b;g.push(new Q(k+c,h,n,function(b){return b}.bind(null,m),l.start,l.end));h=n}return g}
235
+ function kg(b){return[b.B.Ja,b.ca.Ja,b.ja.Ja].filter(xd.Ga).map(function(b){return P.R(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.Gd&&(b.Gd=!0);var d=c.getAttribute("media");c=P.J(c,"mediaRange",P.oc,{start:0,end:null});return{cf:d,start:c.start,end:c.end}})};function mg(b,c,d,e){var f=ng(b);var g=Gf(b,og);var h=Hf(b,og,"media"),k=Hf(b,og,"index");g={Z:g.Z,timescale:g.timescale,Za:g.Za,la:g.la,rd:g.rd,N:g.N,Rc:h,Ib:k};h=g.Ib?1:0;h+=g.N?1:0;h+=g.Z?1:0;if(0==h)throw new D(2,4,4002);1!=h&&(g.Ib&&(g.N=null),g.Z=null);if(!g.Ib&&!g.Rc)throw new D(2,4,4002);if(g.Ib){d=b.B.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new D(2,4,4006);if("webm"==d&&!f)throw new D(2,4,4005);e=Ff(g.Ib,b.B.id,null,b.bandwidth||null,null);e=yd(b.B.oa,[e]);b=hg(b,c,f,e,0,null,
236
+ d,g.la)}else g.Z?(e||(b.presentationTimeline.Uc(g.Z),b.presentationTimeline.Vc(b.S.start)),b=pg(b,g)):(h=c=null,b.ja.id&&b.B.id&&(h=b.ja.id+","+b.B.id,c=d[h]),k=qg(b,g),e=!b.kb||!b.S.Pc,c?(e&&Vf(new T(k),b.S.duration),c.Sc(k),d=b.presentationTimeline.Gb(),c.Dc(d-b.S.start)):(b.presentationTimeline.sb(k,b.S.start),c=new T(k),h&&b.kb&&(d[h]=c)),e&&Vf(c,b.S.duration),b={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:c.find.bind(c),getSegmentReference:c.get.bind(c)});return{createSegmentIndex:b.createSegmentIndex,
237
+ findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,la:g.la}}function og(b){return b.Pb}
238
+ function pg(b,c){var d=b.S.duration,e=c.Z,f=c.Za,g=c.timescale,h=c.Rc,k=b.bandwidth||null,l=b.B.id,m=b.B.oa;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0>b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new Q(b,c,n,function(){var d=Ff(h,l,b+f,k,c*g);return yd(m,[d])},0,null)}}}
239
+ function qg(b,c){for(var d=[],e=0;e<c.N.length;e++){var f=e+c.Za;d.push(new Q(f,c.N[e].start,c.N[e].end,function(b,c,d,e,f,n){b=Ff(b,c,f,d,n);return yd(e,[b]).map(function(b){return b.toString()})}.bind(null,c.Rc,b.B.id,b.bandwidth||null,b.B.oa,f,c.N[e].ig+c.rd),0,null))}return d}function ng(b){var c=Hf(b,og,"initialization");if(!c)return null;var d=b.B.id,e=b.bandwidth||null,f=b.B.oa;return new Lf(function(){var b=Ff(c,d,null,e,null);return yd(f,[b])},0,null)};var U={wb:{},Kb:{},dd:function(b,c){U.Kb[b]=c}};z("shaka.media.ManifestParser.registerParserByExtension",U.dd);U.Mb=function(b,c){U.wb[b]=c};z("shaka.media.ManifestParser.registerParserByMime",U.Mb);
240
+ U.Af=function(){var b={};if(oc()){for(var c in U.wb)b[c]=!0;for(var d in U.Kb)b[d]=!0}c={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};d=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var e=d.next();!e.done;e=d.next())e=e.value,b[e]=oc()?!!U.wb[e]:pc(e);for(var f in c)b[f]=oc()?!!U.Kb[f]:pc(c[f]);return b};
241
+ U.create=function(b,c,d,e){return t(function g(){var h,k;return y(g,function(g){switch(g.j){case 1:return ya(g,2),u(g,U.He(b,c,d,e),4);case 4:return h=g.s,g["return"](new h);case 2:throw k=Da(g),k.severity=2,k;}})})};
242
+ U.He=function(b,c,d,e){return t(function g(){var h,k,l,m,n;return y(g,function(g){switch(g.j){case 1:h=U;if(e&&(k=h.wb[e.toLowerCase()]))return g["return"](k);if(l=h.getExtension(b))if(m=h.Kb[l])return g["return"](m);if(e){g.A(2);break}return u(g,h.Oe(b,c,d),3);case 3:if(e=g.s)if(n=U.wb[e])return g["return"](n);case 2:throw new D(2,4,4E3,b);}})})};
243
+ U.Oe=function(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.j){case 1:return g=Tb([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.s,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};U.getExtension=function(b){b=(new gb(b)).ia.split("/").pop().split(".");return 1==b.length?"":b.pop().toLowerCase()};U.isSupported=function(b,c){return oc()?c in U.wb||U.getExtension(b)in U.Kb?!0:!1:!1};function W(b,c,d){this.f=b;this.pc=c;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.l=0;this.m=!0;this.i=0;this.o=void 0===d?!0:d}z("shaka.media.PresentationTimeline",W);W.prototype.Y=function(){return this.g};W.prototype.getDuration=W.prototype.Y;W.prototype.wa=function(b){this.g=b};W.prototype.setDuration=W.prototype.wa;W.prototype.Te=function(){return this.f};W.prototype.getPresentationStartTime=W.prototype.Te;W.prototype.de=function(b){this.l=b};W.prototype.setClockOffset=W.prototype.de;
244
+ W.prototype.Qb=function(b){this.m=b};W.prototype.setStatic=W.prototype.Qb;W.prototype.ld=function(b){this.h=b};W.prototype.setSegmentAvailabilityDuration=W.prototype.ld;W.prototype.Qf=function(b){this.pc=b};W.prototype.setDelay=W.prototype.Qf;W.prototype.Fe=function(){return this.pc};W.prototype.getDelay=W.prototype.Fe;
245
+ W.prototype.sb=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.Vc(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.o&&(this.f=(Date.now()+this.l)/1E3-this.b-this.a)}};W.prototype.notifySegments=W.prototype.sb;W.prototype.Vc=function(b){this.c=null==this.c?b:Math.min(this.c,b)};W.prototype.notifyMinSegmentStartTime=W.prototype.Vc;W.prototype.Uc=function(b){this.a=Math.max(this.a,b)};
246
+ W.prototype.notifyMaxSegmentDuration=W.prototype.Uc;W.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};W.prototype.offset=W.prototype.offset;W.prototype.V=function(){return Infinity==this.g&&!this.m};W.prototype.isLive=W.prototype.V;W.prototype.Va=function(){return Infinity!=this.g&&!this.m};W.prototype.isInProgress=W.prototype.Va;W.prototype.Gb=function(){if(Infinity==this.h)return this.i;var b=this.nb()-this.h;return Math.max(this.i,b)};
247
+ W.prototype.getSegmentAvailabilityStart=W.prototype.Gb;W.prototype.ee=function(b){this.i=b};W.prototype.setUserSeekStart=W.prototype.ee;W.prototype.nb=function(){return this.V()||this.Va()?Math.min(Math.max(0,(Date.now()+this.l)/1E3-this.a-this.f),this.g):this.g};W.prototype.getSegmentAvailabilityEnd=W.prototype.nb;W.prototype.Fb=function(b){var c=Math.max(this.c,this.i);if(Infinity==this.h)return c;var d=this.nb()-this.h;b=Math.min(d+b,this.za());return Math.max(c,b)};
248
+ W.prototype.getSafeSeekRangeStart=W.prototype.Fb;W.prototype.mb=function(){return this.Fb(0)};W.prototype.getSeekRangeStart=W.prototype.mb;W.prototype.za=function(){var b=this.V()||this.Va()?this.pc:0;return Math.max(0,this.nb()-b)};W.prototype.getSeekRangeEnd=W.prototype.za;W.prototype.ie=function(){return null==this.f||null!=this.b?!1:!0};W.prototype.usingPresentationStartTime=W.prototype.ie;function rg(b,c,d,e){b=Tb(b,e);if(0!=c||null!=d)b.headers.Range=d?"bytes="+c+"-"+d:"bytes="+c+"-";return b};function sg(){var b=this;this.a=this.b=null;this.f=[];this.c=null;this.l=[];this.h=1;this.m={};this.o=0;this.v=new Wa(5);this.i=new B(function(){tg(b)});this.g=new Ob}z("shaka.dash.DashParser",sg);p=sg.prototype;p.configure=function(b){this.b=b};p.start=function(b,c){var d=this;return t(function f(){var g;return y(f,function(f){switch(f.j){case 1:return d.f=[b],d.a=c,u(f,ug(d),2);case 2:g=f.s;d.a&&vg(d,g);if(!d.a)throw new D(2,7,7001);return f["return"](d.c)}})})};
249
+ p.stop=function(){this.b=this.a=null;this.f=[];this.c=null;this.l=[];this.m={};null!=this.i&&(this.i.stop(),this.i=null);return this.g.destroy()};p.update=function(){ug(this)["catch"](function(b){if(this.a)this.a.onError(b)}.bind(this))};p.onExpirationUpdated=function(){};
250
+ function ug(b){var c=Date.now(),d=b.a.networkingEngine.request(0,Tb(b.f,b.b.retryParameters));Pb(b.g,d);return d.promise.then(function(c){if(b.a)return c.uri&&!b.f.includes(c.uri)&&b.f.unshift(c.uri),wg(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;Xa(b.v,1,d);return d})}function wg(b,c,d){c=P.Td(c,"MPD");if(!c)throw new D(2,4,4001,d);c=Kf(c,b.b.retryParameters,b.b.dash.xlinkFailGracefully,d,b.a.networkingEngine);Pb(b.g,c);return c.promise.then(function(c){return xg(b,c,d)})}
251
+ function xg(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,va,Aa,da,ma,wa,ja,Ta,Ba,tb,Ga,cb;return y(f,function(f){switch(f.j){case 1:l=xd;m=P;n=[d];q=m.R(c,"Location").map(m.cc).filter(l.Ga);0<q.length&&(x=yd(n,q),n=b.f=x);w=m.R(c,"BaseURL").map(m.cc);A=yd(n,w);C=b.b.dash.ignoreMinBufferTime;E=0;C||(E=m.J(c,"minBufferTime",m.Ba));b.o=m.J(c,"minimumUpdatePeriod",m.Ba,-1);F=m.J(c,"availabilityStartTime",m.vf);V=m.J(c,"timeShiftBufferDepth",m.Ba);Y=m.J(c,"suggestedPresentationDelay",
252
+ m.Ba);va=m.J(c,"maxSegmentDuration",m.Ba);Aa=c.getAttribute("type")||"static";b.c?da=b.c.presentationTimeline:(ma=Math.max(b.b.dash.defaultPresentationDelay,1.5*E),wa=null!=Y?Y:ma,da=new W(F,wa,b.b.dash.autoCorrectDrift));ja={kb:"static"!=Aa,presentationTimeline:da,ja:null,S:null,ca:null,B:null,bandwidth:0,Gd:!1};for(var uc=ja,ub=A,Eb=P.J(c,"mediaPresentationDuration",P.Ba),vb=[],Ha=0,vc=P.R(c,"Period"),eb=0;eb<vc.length;eb++){var Ia=vc[eb];Ha=P.J(Ia,"start",P.Ba,Ha);var wd=P.J(Ia,"duration",P.Ba),
253
+ wb=null;if(eb!=vc.length-1){var db=P.J(vc[eb+1],"start",P.Ba);null!=db&&(wb=db-Ha)}else null!=Eb&&(wb=Eb-Ha);null==wb&&(wb=wd);Ia=yg(b,uc,ub,{start:Ha,duration:wb,node:Ia,Pc:null==wb||eb==vc.length-1});vb.push(Ia);wd=uc.ja.id;b.l.includes(wd)||(b.l.push(wd),b.c&&(b.a.filterNewPeriod(Ia),b.c.periods.push(Ia)));if(null==wb){Ha=null;break}Ha+=wb}null==b.c&&b.a.filterAllPeriods(vb);null!=Eb?(g=vb,h=Eb,k=!1):(g=vb,h=Ha,k=!0);Ta=h;Ba=g;da.Qb("static"==Aa);"static"!=Aa&&k||da.wa(Ta||Infinity);(tb=da.V())&&
254
+ !isNaN(b.b.availabilityWindowOverride)&&(V=b.b.availabilityWindowOverride);null==V&&(V=Infinity);da.ld(V);da.Uc(va||1);if(b.c){f.A(0);break}b.c={presentationTimeline:da,periods:Ba,offlineSessionIds:[],minBufferTime:E||0};if(!da.ie()){f.A(0);break}Ga=m.R(c,"UTCTiming");return u(f,zg(b,A,Ga),4);case 4:cb=f.s;if(!b.a)return f["return"]();da.de(cb);v(f)}})})}
255
+ function yg(b,c,d,e){c.ja=Ag(e.node,null,d);c.S=e;c.ja.id||(c.ja.id="__shaka_period_"+e.start);P.R(e.node,"EventStream").forEach(b.wf.bind(b,e.start,e.duration));d=P.R(e.node,"AdaptationSet").map(b.uf.bind(b,c)).filter(xd.Ga);if(c.kb){c=[];for(var f=r(d),g=f.next();!g.done;g=f.next()){g=r(g.value.Gf);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new D(2,4,4018);}var k=d.filter(function(b){return!b.pd});d.filter(function(b){return b.pd}).forEach(function(b){var c=
256
+ b.streams[0],d=b.pd;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=Bg(k,"video");f=Bg(k,"audio");if(!c.length&&!f.length)throw new D(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)Cg(b,f[g],c[h],d);b=Bg(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function Bg(b,c){return b.filter(function(b){return b.contentType==c})}
257
+ function Cg(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<od(f,g).length:1){g=od(c.drmInfos,d.drmInfos);for(var h=0;h<c.streams.length;h++)for(var k=0;k<d.streams.length;k++)f=(d.streams[k].bandwidth||0)+(c.streams[h].bandwidth||0),f={id:b.h++,language:c.language,primary:c.Qc||d.Qc,audio:c.streams[h],video:d.streams[k],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}}else for(g=c||d,h=0;h<g.streams.length;h++)f=g.streams[h].bandwidth||
258
+ 0,f={id:b.h++,language:g.language||"und",primary:g.Qc,audio:c?g.streams[h]:null,video:d?g.streams[h]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
259
+ p.uf=function(b,c){b.ca=Ag(c,b.ja,null);var d=!1,e=P.R(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter(xd.Ga),g=void 0,h="text"==b.ca.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,n=!1;P.R(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
260
+ m=b.getAttribute("value"):n=!0});k=P.R(c,"Accessibility");var q=new Map;e={};k=r(k);for(l=k.next();!l.done;e={Db:e.Db},l=k.next()){l=l.value;var x=l.getAttribute("schemeIdUri");if("urn:scte:dash:cc:cea-608:2015"==x||"urn:scte:dash:cc:cea-708:2015"==x)e.Db=1,l=l.getAttribute("value"),null!=l?l.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.Db,b.Db+=2;q.set(d,M(c))}}(e)):
261
+ q.set("CC1","und")}if(n)return null;e=P.R(c,"ContentProtection");var w=xf(e,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);e=M(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=P.R(c,"Representation");f=k.map(this.xf.bind(this,b,w,g,e,l,d,f,q)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new D(2,4,4003);}b.ca.contentType&&"application"!=b.ca.contentType||(b.ca.contentType=Dg(f[0].mimeType,f[0].codecs),f.forEach(function(c){c.type=b.ca.contentType}));f.forEach(function(b){w.drmInfos.forEach(function(c){b.keyId&&
262
+ c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter(xd.Ga);return{id:b.ca.id||"__fake__"+this.h++,contentType:b.ca.contentType,language:e,Qc:d,streams:f,drmInfos:w.drmInfos,pd:m,Gf:h}};
263
+ p.xf=function(b,c,d,e,f,g,h,k,l){b.B=Ag(l,b.ca,null);if(!Eg(b.B))return null;b.bandwidth=P.J(l,"bandwidth",P.nc)||0;var m=b.B.contentType;m="text"==m||"application"==m;try{var n=this.Hf.bind(this);if(b.B.Nb)var q=fg(b,n);else if(b.B.Ja)q=ig(b,this.m);else if(b.B.Pb)q=mg(b,n,this.m,!!this.c);else{var x=b.B.oa,w=b.S.duration||0;q={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<w?1:null},getSegmentReference:function(b){return 1!=b?null:new Q(1,0,w,function(){return x},
264
+ 0,null)},initSegmentReference:null,la:0}}}catch(A){if(m&&4002==A.code)return null;throw A;}l=P.R(l,"ContentProtection");l=Af(l,this.b.dash.customScheme,c,this.b.dash.ignoreDrmInfo);return{id:this.h++,originalId:b.B.id,createSegmentIndex:q.createSegmentIndex,findSegmentPosition:q.findSegmentPosition,getSegmentReference:q.getSegmentReference,initSegmentReference:q.initSegmentReference,presentationTimeOffset:q.la,mimeType:b.B.mimeType,codecs:b.B.codecs,frameRate:b.B.frameRate,bandwidth:b.bandwidth,width:b.B.width,
265
+ height:b.B.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.B.emsgSchemeIdUris,roles:h,channelsCount:b.B.Wc,closedCaptions:k}};function tg(b){t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:return e=0,ya(d,2),u(d,ug(b),4);case 4:e=d.s;Ca(d,3);break;case 2:f=Da(d),b.a&&(f.severity=1,b.a.onError(f));case 3:if(!b.a)return d["return"]();vg(b,e);v(d)}})})}
266
+ function vg(b,c){0>b.o||b.i.O(Math.max(3,b.o-c,Ya(b.v)))}
267
+ function Ag(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Wc:null};d=d||c.oa;var e=P.vb,f=P.Ae,g=P.R(b,"BaseURL").map(P.cc),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=P.J(b,"frameRate",f)||c.frameRate;var m=P.R(b,"InbandEventStream"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute("schemeIdUri"),n.includes(q)||n.push(q);m=P.R(b,
268
+ "AudioChannelConfiguration");m=Fg(m)||c.Wc;h||(h=Dg(k,l));return{oa:yd(d,g),Nb:P.$b(b,"SegmentBase")||c.Nb,Ja:P.$b(b,"SegmentList")||c.Ja,Pb:P.$b(b,"SegmentTemplate")||c.Pb,width:P.J(b,"width",e)||c.width,height:P.J(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute("id"),Wc:m}}
269
+ function Fg(b){for(var c=0;c<b.length;++c){var d=b[c],e=d.getAttribute("schemeIdUri");if(e&&(d=d.getAttribute("value")))switch(e){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":e=parseInt(d,10);if(!e)continue;return e;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(e=parseInt(d,
270
+ 16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function Eg(b){var c=b.Nb?1:0;c+=b.Ja?1:0;c+=b.Pb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.Nb&&(b.Ja=null),b.Pb=null);return!0}
271
+ function Gg(b,c,d,e){c=yd(c,[d]);c=Tb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Pb(b.g,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=wc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
272
+ function zg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return xd.ye(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Gg(this,c,b,"HEAD");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 Gg(this,
273
+ c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return ab("NTP UTCTiming scheme is not supported"),Promise.reject();default:return ab("Unrecognized scheme in UTCTiming element",d),Promise.reject()}}.bind(b))["catch"](function(){ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!");
274
+ return 0})}p.wf=function(b,c,d){var e=P.vb,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=P.J(d,"timescale",e)||1;P.R(d,"Event").forEach(function(d){var k=P.J(d,"presentationTime",e)||0,m=P.J(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};
275
+ p.Hf=function(b,c,d){b=rg(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Pb(this.g,b);return b.promise.then(function(b){return b.data})};function Dg(b,c){return Zd(kc(b,c))?"text":b.split("/")[0]}U.dd("mpd",sg);U.Mb("application/dash+xml",sg);function Hg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Ig(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Ig.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function Jg(b,c){this.name=b;this.value=c}
276
+ Ig.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function Kg(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function Lg(b,c){this.b=c;this.a=b};var Mg={lb:function(b,c){return b.filter(function(b){return b.name==c})},Ra:function(b,c){var d=Mg.lb(b,c);return d.length?d[0]:null},Gc:function(b,c,d){return b.filter(function(b){var e=b.getAttribute("TYPE");b=b.getAttribute("GROUP-ID");return e.value==c&&b.value==d})},zc:function(b,c){return yd([b],[c])[0]},Oc:function(b){return/^#(?!EXT)/m.test(b)}};function Ng(b){this.b=b;this.a=0}function Og(b){Pg(b,/[ \t]+/gm)}function Pg(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Jf:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Jf}function Qg(b){return b.a==b.b.length?null:(b=Pg(b,/[^ \t\n]*/gm))?b[0]:null};function Rg(){this.a=0}
277
+ function Sg(b,c,d){c=wc(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new D(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!Mg.Oc(e[f])){var g=Tg(b,e[f]);--b.a;if(Ug.includes(g.name)){c=1;break}else"EXT-X-STREAM-INF"==g.name&&(f+=1)}f=[];for(g=1;g<e.length;)if(Mg.Oc(e[g]))g+=1;else{var h=Tg(b,e[g]);if(Vg.includes(h.name)){if(1!=c)throw new D(2,4,4017);e=e.splice(g,e.length-g);b=Wg(b,d,e,f);return new Hg(d,c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==
278
+ h.name&&(h.a.push(new Jg("URI",e[g])),g+=1)}return new Hg(d,c,f)}function Wg(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=Tg(b,d),Ug.includes(d.name)?e.push(d):g.push(d);else{if(Mg.Oc(d))return[];d=Mg.zc(c,d.trim());f.push(new Lg(d,g));g=[]}});return f}
279
+ function Tg(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new D(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new Ng(g);var k;(k=Pg(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=Pg(g,l);)e.push(new Jg(k[1],k[2]||k[3]))}return new Ig(d,f,e,h)}var Ug="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Vg="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function Xg(b){try{var c=Xg.parse(b);return Db({uri:b,$c:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return Bb(d)}}z("shaka.net.DataUriPlugin",Xg);
280
+ Xg.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=Ec(c).buffer;else{if(e)throw new D(2,1,1005,b);b=Ac(c)}return{data:b,contentType:d[0]}};Sb("data",Xg);function Yg(){var b=this;this.c=this.g=null;this.$=1;this.D=new Map;this.T=new Set;this.a=new Map;this.b=null;this.v="";this.o=new Rg;this.P=0;this.h=new B(function(){Zg(b)});this.f=$g;this.m=null;this.C=0;this.G=Infinity;this.i=new Ob;this.M=[];this.l=new Map;this.W=!1}z("shaka.hls.HlsParser",Yg);p=Yg.prototype;p.configure=function(b){this.c=b};
281
+ p.start=function(b,c){var d=this;return t(function f(){var g,h;return y(f,function(f){switch(f.j){case 1:return d.g=c,u(f,ah(d,b),2);case 2:return g=f.s,d.v=g.uri,u(f,bh(d,g.data),3);case 3:return h=d.P,0<h&&d.h.O(h),f["return"](d.m)}})})};p.stop=function(){this.h&&(this.h.stop(),this.h=null);var b=[];this.i&&(b.push(this.i.destroy()),this.i=null);this.c=this.g=null;this.D.clear();this.T.clear();this.a.clear();this.m=null;return Promise.all(b)};
282
+ p.update=function(){if(this.f!=ch.Oa){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(dh(this,d.value));return Promise.all(b)}};
283
+ function dh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A;return y(e,function(e){switch(e.j){case 1:return f=Mg,g=ch,h=c.qe,u(e,ah(b,h),2);case 2:k=e.s;l=Sg(b.o,k.data,k.uri);if(1!=l.type)throw new D(2,4,4017);n=(m=f.Ra(l.a,"EXT-X-MEDIA-SEQUENCE"))?Number(m.value):0;q=c.stream;return u(e,eh(b,c.tc,l,n,q.mimeType,q.codecs),3);case 3:x=e.s;c.Ob.a=x;w=x[x.length-1];if(A=f.Ra(l.a,"EXT-X-ENDLIST"))fh(b,g.Oa),b.b.wa(w.endTime);v(e)}})})}p.onExpirationUpdated=function(){};
284
+ function bh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A;return y(e,function(e){switch(e.j){case 1:f=Sg(b.o,c,b.v);if(0!=f.type)throw new D(2,4,4022);return u(e,gh(b,f),2);case 2:g=e.s;if(!b.g)throw new D(2,7,7001);if(b.W&&0==g.variants.length)throw new D(2,4,4034);b.g.filterAllPeriods([g]);h=Infinity;k=0;l=Infinity;for(var E=r(b.a.values()),F=E.next();!F.done;F=E.next())m=F.value,h=Math.min(h,m.Tc),k=Math.max(k,m.Tc),"text"!=m.stream.type&&(l=Math.min(l,m.duration));b.f!=ch.Oa?(b.b=new W(0,
285
+ 3*b.C),b.b.Qb(!1)):(b.b=new W(null,0),b.b.Qb(!0));hh(b);if(b.f!=ch.Oa){b.P=b.G;n=ch;b.f==n.sd&&(q=b.b.pc,isNaN(b.c.availabilityWindowOverride)||(q=b.c.availabilityWindowOverride),b.b.ld(q));for(x=0;95443.7176888889<=k;)x+=95443.7176888889,k-=95443.7176888889;if(x)for(E=r(b.a.values()),F=E.next();!F.done;F=E.next())w=F.value,95443.7176888889>w.Tc&&(w.stream.presentationTimeOffset=-x,w.Ob.offset(x))}else for(b.b.wa(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())A=F.value,A.stream.presentationTimeOffset=
286
+ h,A.Ob.offset(-h),Vf(A.Ob,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}
287
+ function gh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,C;return y(e,function(e){switch(e.j){case 1:return f=Mg,g=xd,h=c.a,k=f.lb(c.a,"EXT-X-MEDIA"),l=k.filter(function(b){return"SUBTITLES"==ih(b,"TYPE")}.bind(b)),m=l.map(function(b){return jh(this,b)}.bind(b)),n=k.filter(function(b){return"CLOSED-CAPTIONS"==ih(b,"TYPE")}),kh(b,n),u(e,Promise.all(m),2);case 2:return q=e.s,x=f.lb(h,"EXT-X-STREAM-INF"),w=x.map(function(b){return lh(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A=
288
+ e.s,C=A.reduce(g.yc,[]),C=C.filter(function(b){return null!=b}),e["return"]({startTime:0,variants:C,textStreams:q})}})})}
289
+ function lh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,va,Aa,da,ma,wa,ja,Ta,Ba,tb,Ga,cb,db;return y(f,function(f){switch(f.j){case 1:g=Ad;h=Mg;k=Kg(c,"CODECS","avc1.42E01E,mp4a.40.2");l=mh(k.split(/\s*,\s*/));m=c.getAttribute("RESOLUTION");q=n=null;x=Kg(c,"FRAME-RATE");w=Number(ih(c,"BANDWIDTH"));m&&(A=m.value.split("x"),n=A[0],q=A[1]);C=h.lb(d.a,"EXT-X-MEDIA");C=C.filter(function(b){return"CLOSED-CAPTIONS"!=ih(b,"TYPE")});C=C.filter(function(b){var c=Kg(b,"URI")||"";return"SUBTITLES"==
290
+ (Kg(b,"TYPE")||"")||""!=c});E=Kg(c,"AUDIO");F=Kg(c,"VIDEO");E?C=h.Gc(C,"AUDIO",E):F&&(C=h.Gc(C,"VIDEO",F));if(V=nh(g.qa,l)){if(Y=Kg(c,"SUBTITLES"))va=h.Gc(C,"SUBTITLES",Y),va.length&&(Aa=b.D.get(va[0].id),Aa.stream.codecs=V);Lb(l,V)}da=C.map(function(b){return oh(this,b,l)}.bind(b));ma=[];wa=[];return u(f,Promise.all(da),2);case 2:Ta=f.s;Ta=Ta.filter(function(b){return null!=b});E?ma=Ta:F&&(wa=Ta);tb=!1;ma.length||wa.length?ma.length?(cb=ih(c,"URI"),db=ma[0].tc,cb==db?(Ba=g.Ab,tb=!0):Ba=g.Na):Ba=
291
+ g.Ab:1==l.length?(Ga=nh(g.Na,l),Ba=m||x||Ga?g.Na:g.Ab):(Ba=g.Na,l=[l.join(",")]);if(tb){f.A(3);break}return u(f,ph(b,c,l,Ba),4);case 4:ja=f.s;case 3:if(ja)ja.stream.type==g.Ab?ma=[ja]:wa=[ja];else if(null===ja)return f["return"]([]);wa&&qh(wa);ma&&qh(ma);return f["return"](rh(b,ma,wa,w,n,q,x))}})})}function qh(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})}
292
+ function rh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.tc:"")+" - "+(l?l.tc:"");var C=void 0;if(n&&x)if(w.length&&A.length?0<od(w,A).length:1)C=od(w,
293
+ A);else continue;else n?C=w:x&&(C=A);b.T.has(q)||(n=sh(b,n,x,e,C),k.push(n),b.T.add(q))}}return k}function sh(b,c,d,e,f){return{id:b.$++,language:c?c.language:"und",primary:!!c&&c.primary||!!d&&d.primary,audio:c,video:d,bandwidth:e,drmInfos:f,allowedByApplication:!0,allowedByKeySystem:!0}}function jh(b,c){return t(function e(){var f;return y(e,function(e){switch(e.j){case 1:return ih(c,"TYPE"),u(e,oh(b,c,[]),2);case 2:return f=e.s,e["return"](f.stream)}})})}
294
+ function kh(b,c){for(var d=r(c),e=d.next();!e.done;e=d.next()){e=e.value;ih(e,"TYPE");var f=Kg(e,"LANGUAGE")||"und";f=M(f);var g=ih(e,"GROUP-ID");e=ih(e,"INSTREAM-ID");b.l.get(g)||b.l.set(g,new Map);b.l.get(g).set(e,f)}}
295
+ function oh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C;return y(f,function(f){switch(f.j){case 1:g=ih(c,"URI");if(b.a.has(g))return f["return"](b.a.get(g));h=ih(c,"TYPE").toLowerCase();k=Ad;"subtitles"==h&&(h=k.qa);l=M(Kg(c,"LANGUAGE","und"));m=Kg(c,"NAME");n=c.getAttribute("DEFAULT");q=c.getAttribute("AUTOSELECT");x=Kg(c,"CHANNELS");if("audio"==h)if(x){var E=x.split("/")[0];E=parseInt(E,10)}else E=null;else E=null;w=E;A=!!n||!!q;return u(f,th(b,g,d,h,l,A,m,w,null),2);case 2:C=f.s;if(null==
296
+ C)return f["return"](null);if(b.a.has(g))return f["return"](b.a.get(g));b.D.set(c.id,C);b.a.set(g,C);return f["return"](C)}})})}
297
+ function ph(b,c,d,e){return t(function g(){var h,k,l,m,n;return y(g,function(g){switch(g.j){case 1:h=Ad;k=ih(c,"URI");if(b.a.has(k))return g["return"](b.a.get(k));l=Kg(c,"CLOSED-CAPTIONS");m=null;e==h.Na&&l&&"NONE"!=l&&(m=b.l.get(l));return u(g,th(b,k,d,e,"und",!1,null,null,m),2);case 2:n=g.s;if(null==n)return g["return"](null);if(b.a.has(k))return g["return"](b.a.get(k));b.a.set(k,n);return g["return"](n)}})})}
298
+ function th(b,c,d,e,f,g,h,k,l){return t(function n(){var q,x,w,A,C,E,F,V,Y,va,Aa,da,ma,wa,ja,Ta,Ba,tb,Ga,cb,db,uc,ub,Eb,vb,Ha;return y(n,function(n){switch(n.j){case 1:return q=Mg,x=q.zc(b.v,c),A="",u(n,ah(b,x),2);case 2:E=n.s;x=E.uri;w=Sg(b.o,E.data,x);if(1!=w.type)throw new D(2,4,4017);F=[];w.segments.forEach(function(b){b=q.lb(b.b,"EXT-X-KEY");F.push.apply(F,b)});V=!1;Y=[];va=null;for(var eb=r(F),Ia=eb.next();!Ia.done;Ia=eb.next())if(Aa=Ia.value,da=ih(Aa,"METHOD"),"NONE"!=da){V=!0;if("AES-128"==
299
+ da)return b.W=!0,n["return"](null);ma=ih(Aa,"KEYFORMAT");if(ja=(wa=uh[ma])?wa(Aa):null)ja.keyIds.length&&(va=ja.keyIds[0]),Y.push(ja)}if(V&&!Y.length)throw new D(2,4,4026);vh(b,w);A=wh(e,d);return u(n,xh(b,e,A,w),3);case 3:return C=Ta=n.s,tb=(Ba=q.Ra(w.a,"EXT-X-MEDIA-SEQUENCE"))?Number(Ba.value):0,u(n,eh(b,c,w,tb,C,A),4);case 4:return Ga=n.s,cb=Ga[0].startTime,db=Ga[Ga.length-1].endTime,uc=db-cb,ub=new T(Ga),Eb=yh(w),vb=void 0,"text"==e&&(vb="subtitle"),Ha={id:b.$++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),
300
+ findSegmentPosition:ub.find.bind(ub),getSegmentReference:ub.get.bind(ub),initSegmentReference:Eb,presentationTimeOffset:0,mimeType:C,codecs:A,kind:vb,encrypted:V,keyId:va,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},n["return"]({stream:Ha,Ob:ub,drmInfos:Y,tc:c,qe:x,Tc:cb,ug:db,duration:uc})}})})}
301
+ function vh(b,c){var d=ch,e=Mg.Ra(c.a,"EXT-X-PLAYLIST-TYPE"),f=Mg.Ra(c.a,"EXT-X-ENDLIST");f=e&&"VOD"==e.value||f;e=e&&"EVENT"==e.value&&!f;e=!f&&!e;f?fh(b,d.Oa):(e?fh(b,d.sd):fh(b,d.le),d=zh(c.a,"EXT-X-TARGETDURATION"),d=Number(d.value),b.C=Math.max(d,b.C),b.G=Math.min(d,b.G))}
302
+ function yh(b){var c=Mg.lb(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new D(2,4,4020);c=c[0];var d=ih(c,"URI"),e=Mg.zc(b.b,d);b=0;d=null;if(c=Kg(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new Lf(function(){return[e]},b,d)}
303
+ function Ah(b,c,d,e){var f=c.b,g=c.a;c=zh(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=Mg.Ra(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new Q(d,e,c,function(){return[g]},h,k)}function hh(b){b.b&&(b.M.forEach(function(c){b.b.sb(c,0)}),b.M=[])}
304
+ function eh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,x,w,A,C,E,F,V;return y(k,function(k){switch(k.j){case 1:return l=d.segments,m=[],n=l[0].a,q=Ah(null,l[0],e,0),x=yh(d),u(k,Bh(b,c,x,q,f,g),2);case 2:w=k.s;n.split("/").pop();for(var Y=0;Y<l.length;++Y)A=l[Y],C=m[m.length-1],E=0==Y?w:C.endTime,F=e+Y,V=Ah(C,A,F,E),m.push(V);b.M.push(m);hh(b);return k["return"](m)}})})}
305
+ function Ch(b,c){return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.j){case 1:return f=Qb,g=rg(c.c(),c.b,c.b+2048-1,b.c.retryParameters),h=rg(c.c(),c.b,c.a,b.c.retryParameters),ya(e,2),u(e,Dh(b,g,f.td),4);case 4:return k=e.s,e["return"](k);case 2:l=Da(e);if(7001==l.code)throw l;ab("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.",g.uris[0]);return u(e,Dh(b,h,f.td),
306
+ 5);case 5:return m=e.s,e["return"](m)}})})}
307
+ function Bh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,x,w,A,C,E;return y(k,function(k){switch(k.j){case 1:if(b.m&&(l=b.a.get(c),m=l.Ob,n=m.get(e.position)))return k["return"](n.startTime);if("audio/mpeg"==f)return k["return"](0);if("video/mp4"!=f&&"audio/mp4"!=f){k.A(2);break}q=[Ch(b,e)];d&&q.push(Ch(b,d));return u(k,Promise.all(q),3);case 3:return x=k.s,w=x[0],A=x[1]||x[0],k["return"](Eh(w.data,A.data));case 2:if("video/mp2t"!=f){k.A(4);break}return u(k,Ch(b,e),5);case 5:return C=k.s,k["return"](Fh(C.data));
308
+ case 4:if("application/mp4"!=f&&!f.startsWith("text/")){k.A(6);break}return u(k,Ch(b,e),7);case 7:return E=k.s,k["return"](Gh(f,g,E.data));case 6:throw new D(2,4,4030);}})})}
309
+ function Eh(b,c){var d=0;(new S).H("moov",Pf).H("trak",Pf).H("mdia",Pf).ea("mdhd",function(b){b.reader.L(0==b.version?8:16);d=b.reader.F();b.parser.stop()}).parse(c,!0);if(!d)throw new D(2,4,4030);var e=0,f=!1;(new S).H("moof",Pf).H("traf",Pf).ea("tfdt",function(b){e=(0==b.version?b.reader.F():b.reader.yb())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new D(2,4,4030);return e}
310
+ function Fh(b){function c(){throw new D(2,4,4030);}b=new R(new DataView(b),0);for(var d=0,e=0;;)if(d=b.ba(),e=b.ka(),71!=e&&c(),b.Lb()&16384||c(),e=(b.ka()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.ka(),b.L(e)),1!=b.F()>>8)b.seek(d+188),e=b.ka(),71!=e&&(b.seek(d+192),e=b.ka()),71!=e&&(b.seek(d+204),e=b.ka()),71!=e&&c(),b.ae(1);else return b.L(3),d=b.ka()>>6,0!=d&&1!=d||c(),0==b.ka()&&c(),d=b.ka(),e=b.Lb(),b=b.Lb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
311
+ function Gh(b,c,d){b=kc(b,c);if(!Zd(b))return 0;c=new Xd(null);$d(c,b);return c.Lc(d)}function mh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=nc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function nh(b,c){for(var d=Hh[b],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(d[e].test(c[f].trim()))return c[f].trim();return"text"==b?"":null}function wh(b,c){if(1==c.length)return c[0];var d=nh(b,c);if(null!=d)return d;throw new D(2,4,4025,c);}
312
+ function xh(b,c,d,e){return t(function g(){var h,k,l,m,n,q,x,w,A,C;return y(g,function(g){switch(g.j){case 1:h=Ad;k=Qb;l=e.segments[0].a;m=new gb(l);n=m.ia.split(".").pop();q=Ih[c];if(x=q[n])return g["return"](x);if(c==h.qa)return d&&"vtt"!=d?g["return"]("application/mp4"):g["return"]("text/vtt");w=Tb([l],b.c.retryParameters);w.method="HEAD";return u(g,Dh(b,w,k.td),2);case 2:A=g.s;C=A.headers["content-type"];if(!C)throw new D(2,4,4021,n);return g["return"](C.split(";")[0])}})})}
313
+ function ih(b,c){var d=b.getAttribute(c);if(!d)throw new D(2,4,4023,c);return d.value}function zh(b,c){var d=Mg.Ra(b,c);if(!d)throw new D(2,4,4024,c);return d}function ah(b,c){return Dh(b,Tb([c],b.c.retryParameters),Qb.rg)}
314
+ var Hh={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Ih={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
315
+ function Zg(b){t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:if(!b.g)return d["return"]();ya(d,2);return u(d,b.update(),4);case 4:e=b.P;b.h.O(e);Ca(d,0);break;case 2:f=Da(d),f.severity=1,b.g.onError(f),b.h.O(.1),v(d)}})})}function fh(b,c){b.f=c;b.b&&b.b.Qb(b.f==ch.Oa);b.f!=ch.Oa||b.h.stop()}function Dh(b,c,d){if(!b.i)throw new D(2,7,7001);c=b.g.networkingEngine.request(d,c);Pb(b.i,c);return c.promise}
316
+ var uh={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=ih(b,"METHOD");Ne("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=ih(b,"URI");c=Xg.parse(c);c=new Uint8Array(c.data);c=zd("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=Kg(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},$g="VOD",ch={Oa:$g,le:"EVENT",sd:"LIVE"};U.dd("m3u8",Yg);
317
+ U.Mb("application/x-mpegurl",Yg);U.Mb("application/vnd.apple.mpegurl",Yg);function Jh(){this.a=new Map}function Kh(b,c,d){Lh(b,c).text=d}function Lh(b,c){b.a.has(c)||b.a.set(c,new Mh);return b.a.get(c)}function Mh(){this.text=this.variant=null};function Nh(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=r(c),e=d.next();!e.done;e=d.next())this.add(e.value)}Nh.prototype.add=function(b){return Oh(this.a,b)?(this.b.add(b),!0):!1};function Oh(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&Ph(d,e)&&Qh(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(Ph(d,e)&&Qh(d.roles,e.roles)));return d?!1:!0}
318
+ Nh.prototype.values=function(){return this.b.values()};function Ph(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return nc(b)[0]}),e=c.codecs.split(",").map(function(b){return nc(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
319
+ function Qh(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=r(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function Rh(b){this.a=b;this.b=new Sh(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}Rh.prototype.create=function(b){var c=this,d=b.filter(function(b){return Oh(c.a,b)});return d.length?new Nh(d[0],d):this.b.create(b)};function Sh(b,c,d){this.c=b;this.b=c;this.a=d}
320
+ Sh.prototype.create=function(b){var c=[];c=Th(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=Uh(c,this.b),b.length&&(c=b));this.a&&(b=Ge(c,this.a),b.length&&(c=b));b=new Nh(c[0]);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Oh(b.a,d)&&b.add(d);return b};function Th(b,c){var d=M(c),e=ue(d,b.map(function(b){return te(b)}));return e?b.filter(function(b){return e==te(b)}):[]}
321
+ function Uh(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function Vh(b,c){this.a=Wh;this.b=(new Map).set(Wh,c).set(Xh,b)}var Xh=0,Wh=1;function Yh(b,c){this.f=b;this.g=Zh(b);this.b=b.a.currentTime;this.c=Date.now()/1E3;this.h=c;this.a=function(){}}Yh.prototype.release=function(){this.f=null;this.a=function(){}};function $h(b,c){b.a=c}function ai(b){this.a=b}function Zh(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function bi(b,c,d,e,f){var g=this;this.a=b;this.v=c;this.o=d;this.l=f;this.f=new L;this.i=!1;this.m=b.readyState;this.c=!1;this.b=e;this.h=!1;this.f.w(b,"waiting",function(){return ci(g)});this.g=(new B(function(){ci(g)})).La(.25)}bi.prototype.release=function(){this.f&&(this.f.release(),this.f=null);null!=this.g&&(this.g.stop(),this.g=null);this.b&&(this.b.release(),this.b=null);this.a=this.v=this.l=null};bi.prototype.Yc=function(){this.h=!0;ci(this)};
322
+ function ci(b){if(0!=b.a.readyState){if(b.a.seeking){if(!b.i)return}else b.i=!1;if(!b.a.paused){b.a.readyState!=b.m&&(b.c=!1,b.m=b.a.readyState);var c=b.o.smallGapLimit,d=b.a.currentTime,e=b.a.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=rc("Edge/")||rc("Trident/")||rc("Tizen")||rc("CrKey")?.5:.1;for(var g=0;g<e.length;g++)if(e.start(g)>d&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.b){b=b.b;d=b.f;e=Zh(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.b!=
323
+ d||b.g!=e)b.c=f,b.b=d,b.g=e;d=f-b.c;d>=b.h&&e&&b.a(b.b,d)}}else if(0!=f||b.h){g=e.start(f);var h=b.v.za();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=!0,d=new I("largegap",{currentTime:d,gapSize:h}),d.cancelable=!0,b.l(d),b.o.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.a.currentTime=g)}}}}};function di(b){var c=this;this.c=b;this.a=new Set;this.b=(new B(function(){ei(c,!1)})).La(.25)}di.prototype.release=function(){this.b.stop();for(var b=r(this.a),c=b.next();!c.done;c=b.next())c.value.release();this.a.clear()};function ei(b,c){for(var d=r(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function fi(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function gi(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function hi(b){this.c=b;this.a=null;this.b=function(){}}hi.prototype.release=function(){this.a=this.c=null;this.b=function(){}};hi.prototype.g=function(b){var c=this.a,d=this.c.periods;b=gi(d,b)||d[0];c!=b&&this.b(b);this.a=b};function ii(b,c){b.b=c};function ji(b){var c=this;this.a=b;this.f=!1;this.c=this.a.ec();this.b=new B(function(){c.a.Jd(.25*c.c)})}ji.prototype.release=function(){this.b&&(this.b.stop(),this.b=null);this.a=null};ji.prototype.set=function(b){this.c=b;ki(this)};function ki(b){b.b.stop();var c=b.f?0:b.c;if(0<=c)try{b.a.ec()!=c&&b.a.kd(c);return}catch(d){}b.b.La(.25);0!=b.a.ec()&&b.a.kd(0)};function li(b,c,d){this.a=b;this.f=c;this.g=d;this.b=new L;this.c=new mi(b);0<b.readyState?ni(this,d):oi(this,d)}li.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.f=function(){};this.a=null};function pi(b){return 0<b.a.readyState?b.a.currentTime:b.g}function oi(b,c){b.g=c;b.b.da(b.a,"loadedmetadata");b.b.ha(b.a,"loadedmetadata",function(){ni(b,c)})}
324
+ function ni(b,c){.001>Math.abs(b.a.currentTime-c)?qi(b):(b.b.ha(b.a,"seeking",function(){qi(b)}),ri(b.c,0==b.a.currentTime?c:b.a.currentTime))}function qi(b){b.b.w(b.a,"seeking",function(){return b.f()})}function mi(b){var c=this;this.b=b;this.h=10;this.g=this.f=this.c=0;this.a=new B(function(){0>=c.c?c.a.stop():c.b.currentTime!=c.f?c.a.stop():(c.b.currentTime=c.g,c.c--)})}mi.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
325
+ function ri(b,c){b.f=b.b.currentTime;b.g=c;b.c=b.h;b.b.currentTime=c;b.a.La(.1)};function si(b){function c(){d.f=!0;null!=d.b&&(d.a.currentTime=d.b)}var d=this;this.a=b;this.f=!1;this.b=null;this.c=new L;0==this.a.readyState?this.c.ha(this.a,"loadedmetadata",c):c()}si.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.a=null};si.prototype.m=function(b){this.b=this.f?this.b:b};si.prototype.h=function(){return(this.f?this.a.currentTime:this.b)||0};si.prototype.o=function(){};
326
+ function ti(b,c,d,e,f,g){var h=this;this.b=b;this.a=c.presentationTimeline;this.C=c.minBufferTime||0;this.g=d;this.v=f;this.l=null;this.f=new bi(b,c.presentationTimeline,d,ui(b,d),g);this.c=new li(b,function(){a:{var b=h.f;b.i=!0;b.h=!1;b.c=!1;var c=pi(h.c);b=vi(h,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!h.l||h.l<c-1)){h.l=c;c=h.c;0<c.a.readyState?ri(c.c,b):oi(c,b);b=void 0;break a}h.v();b=void 0}return b},wi(this,e));this.i=(new B(function(){if(0!=h.b.readyState&&!h.b.paused){var b=
327
+ h.b.currentTime,c=h.a.mb(),d=h.a.za();3>d-c&&(c=d-3);b<c&&(b=vi(h,b),h.b.currentTime=b)}})).La(.25)}ti.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.f&&(this.f.release(),this.f=null);this.i&&(this.i.stop(),this.i=null);this.b=this.c=this.a=this.g=null;this.v=function(){}};ti.prototype.m=function(b){var c=this.c;0<c.a.readyState?ri(c.c,b):oi(c,b)};ti.prototype.h=function(){var b=pi(this.c);return 0<this.b.readyState&&!this.b.paused?xi(this,b):b};
328
+ function wi(b,c){null==c?c=Infinity>b.a.Y()?b.a.mb():b.a.za():0>c&&(c=b.a.za()+c);return yi(b,xi(b,c))}ti.prototype.o=function(){this.f.Yc()};function yi(b,c){var d=b.a.Y();return c>=d?d-b.g.durationBackoff:c}function vi(b,c){var d=td.bind(null,b.b.buffered),e=Math.max(b.C,b.g.rebufferingGoal),f=b.g.safeSeekOffset,g=b.a.mb(),h=b.a.za(),k=b.a.Y();3>h-g&&(g=h-3);var l=b.a.Fb(e),m=b.a.Fb(f);e=b.a.Fb(e+f);return c>=k?yi(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}
329
+ function xi(b,c){var d=b.a.mb();if(c<d)return d;d=b.a.za();return c>d?d:c}function ui(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new Yh(new ai(b),c.stallThreshold);$h(e,function(){b.currentTime+=d});return e};function zi(){this.b=function(){};this.a=new Set}zi.prototype.release=function(){this.b=function(){};this.a.clear()};function Ai(b,c){b.b=c};function Bi(b){var c=this;this.h=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.i=[{bb:null,ab:Ci,Ua:function(b,e){return c.a(b,e)}},{bb:Di,ab:Ci,Ua:function(b,e){return c.a(b,e)}},{bb:Ei,ab:Ci,Ua:function(b,e){return c.a(b,e)}},{bb:Ci,ab:Di,Ua:function(b,e){return c.b(b,e)}},{bb:Ci,ab:Ei,Ua:function(b,e){return c.b(b,e)}},{bb:Di,ab:Ei,Ua:function(b,e){return c.c(b,e)}},{bb:Ei,ab:Di,Ua:function(b,e){return c.c(b,e)}}]}
330
+ Bi.prototype.release=function(){this.h=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Bi.prototype.g=function(b,c){for(var d=r(this.h.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?Di:b>e.endTime?Ei:Ci;this.f.set(e,g);for(var h=r(this.i),k=h.next();!k.done;k=h.next())k=k.value,k.bb==f&&k.ab==g&&k.Ua(e,c)}};function Fi(b,c,d,e){b.a=c;b.b=d;b.c=e}var Di=1,Ci=2,Ei=3;function Gi(b,c){this.a=c;this.c=b;this.g=null;this.l=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.o=!1;this.G=null;this.D=this.f=this.m=!1;this.C=0}Gi.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Hi(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};
331
+ Gi.prototype.configure=function(b){this.g=b;this.G=new yb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};
332
+ Gi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.j){case 1:return e=b.a.Sa(),f=Ii(b,e),g=b.a.Md(b.c.periods[f]),g.variant||g.text?u(d,Ji(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](new D(2,5,5005));case 2:if(b.f)return d["return"]();b.a&&b.a.gf&&b.a.gf();v(d)}})})};function Ki(b){return Li(b,"audio")}function Mi(b){return Li(b,"video")}
333
+ function Li(b,c){var d=b.b.get(c);return d?d.Ia||d.stream:null}
334
+ function Ni(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w;return y(e,function(e){switch(e.j){case 1:return f=Ad,u(e,me(b.a.I,f.qa),2);case 2:return b.C++,b.D=!1,g=b.C,h=b.a.I,k=new Map,l=new Set,k.set(f.qa,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e["return"]():u(e,Oi(b,l),4);case 4:if(b.f)return e["return"]();n=(m=b.a.I.g.isTextVisible())||b.g.alwaysStreamText;b.C!=g||b.b.has(f.qa)||b.D||!n||(q=b.a.Sa(),x=Ii(b,q),w=Pi(c,x,0),b.b.set(f.qa,w),Qi(b,w,0));v(e)}})})}
335
+ function Ri(b,c){var d=b.b.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Ia&&(Si(b,f,!1,0,!1),d.Ia=e)}else if(e=d.Ia)d.Ia=null,Si(b,e,!0,0,!1)}}function Ti(b,c,d,e){c.video&&Si(b,c.video,d,e,!1);c.audio&&Si(b,c.audio,d,e,!1)}
336
+ function Si(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&"text"==c.type&&b.g.ignoreTextStreamFailures)Ni(b,c);else if(g){var h=Ui(b,c),k=Array.from(b.b.values()).every(function(b){return b.pa==g.pa});d&&h!=g.pa&&k?b.b.forEach(function(c){Vi(b,c)}):(g.Ia&&(c.trickModeVideo?(g.Ia=c,c=c.trickModeVideo):g.Ia=null),(k=b.h[h])&&k.zb&&(k=b.i.get(c.id))&&k.zb&&(g.stream!=c||f)&&("text"==c.type&&fe(b.a.I,kc(c.mimeType,c.codecs)),g.stream=c,g.hc=!0,Wi(b,g,h)&&g.Jb.abort(),d&&(g.Pa?g.uc=!0:g.Ha?(g.Ma=!0,g.Yb=e,g.uc=
337
+ !0):(Hi(g),Xi(b,g,!0,e)["catch"](function(c){if(b.a)b.a.onError(c)})))))}}function Wi(b,c,d){if(!c.Jb)return!1;var e=b.a.Sa(),f=ie(b.a.I,c.type);d=(d=Yi(b,c,e,f,d))?d.a?d.a-d.b:null:null;if(null==d)return!1;var g=c.stream.initSegmentReference;g&&(d+=(g.a?g.a-g.b:null)||0);g=b.a.getBandwidthEstimate();return 8*d/g<f-e-Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal)||c.Jb.b.a>d?!0:!1}
338
+ function Zi(b){function c(c){var f=b.a.I;"text"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&d<c.b):(c=he(f,c),c=td(c,d,e));return c}var d=b.a.Sa(),e=b.g.smallGapLimit,f=Ii(b,d);if(hc(b.b.values(),function(b){return b.pa==f}))for(var g=r(b.b.keys()),h=g.next();!h.done;h=g.next())h=h.value,c(h)||Vi(b,b.b.get(h));else hc(b.b.keys(),c)||b.b.forEach(function(c){Vi(b,c)})}
339
+ function Vi(b,c){c.Pa||c.Ma||(c.Ha?(c.Ma=!0,c.Yb=0):null==ge(b.a.I,c.type)?null==c.Da&&Qi(b,c,0):(Hi(c),Xi(b,c,!1,0)["catch"](function(c){if(b.a)b.a.onError(c)})))}
340
+ function Ji(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w;return y(h,function(h){switch(h.j){case 1:return k=b.a.Sa(),l=Ii(b,k),m=Ad,n=new Map,q=new Set,c&&(n.set(m.Ab,c),q.add(c)),d&&(n.set(m.Na,d),q.add(d)),e&&(n.set(m.qa,e),q.add(e)),x=b.a.I,w=b.g.forceTransmuxTS,u(h,x.init(n,w),2);case 2:if(b.f)return h["return"]();$i(b);return u(h,Oi(b,q),3);case 3:if(b.f)return h["return"]();n.forEach(function(c,d){if(!b.b.has(d)){var e=Pi(c,l,f);b.b.set(d,e);Qi(b,e,0)}});v(h)}})})}
341
+ function Pi(b,c,d){return{stream:b,type:b.type,pb:null,Aa:null,Ia:null,hc:!0,pa:c,endOfStream:!1,Ha:!1,Da:null,Ma:!1,Yb:0,uc:!1,Pa:!1,cd:!1,Hb:!1,$d:d||0,Jb:null}}
342
+ function aj(b,c){var d=b.h[c];if(d)return d.promise;d={promise:new G,zb:!1};b.h[c]=d;for(var e=new Set,f=r(b.c.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=r(b.c.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.v=b.v.then(function(){if(!this.f)return Oi(this,e)}.bind(b)).then(function(){this.f||(this.h[c].promise.resolve(),this.h[c].zb=!0)}.bind(b))["catch"](function(b){this.f||
343
+ (this.h[c].promise["catch"](function(){}),this.h[c].promise.reject(),delete this.h[c],this.a.onError(b))}.bind(b));return d.promise}
344
+ function Oi(b,c){return t(function e(){var f,g,h,k,l,m,n;return y(e,function(e){switch(e.j){case 1:f=[];for(var q=r(c),w=q.next();!w.done;w=q.next())g=w.value,(h=b.i.get(g.id))?f.push(h.promise):(b.i.set(g.id,{promise:new G,zb:!1}),f.push(g.createSegmentIndex()));ya(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();Ca(e,3);break;case 2:k=Da(e);if(b.f)return e["return"]();e=r(c);for(w=e.next();!w.done;w=e.next())l=w.value,b.i.get(l.id).promise["catch"](function(){}),b.i.get(l.id).promise.reject(),
345
+ b.i["delete"](l.id);throw k;case 3:q=r(c);for(w=q.next();!w.done;w=q.next())m=w.value,n=b.i.get(m.id),n.zb||(n.promise.resolve(),n.zb=!0);v(e)}})})}function $i(b){var c=b.c.presentationTimeline.Y();Infinity>c?b.a.I.wa(c):b.a.I.wa(Math.pow(2,32))}
346
+ function bj(b,c){if(!b.f&&!c.Ha&&null!=c.Da&&!c.Pa)if(c.Da=null,c.Ma)Xi(b,c,c.uc,c.Yb);else{try{var d=cj(b,c);null!=d&&(Qi(b,c,d),c.Hb=!1)}catch(e){dj(b,e);return}d=Array.from(b.b.values());ej(b,c);b.o&&d.every(function(b){return b.endOfStream})&&b.a.I.endOfStream().then(function(){if(!this.f){var b=this.a.I.Y();0!=b&&b<this.c.presentationTimeline.Y()&&this.c.presentationTimeline.wa(b)}}.bind(b))}}
347
+ function cj(b,c){function d(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}if(d(c))return b.a.I.rc(c.stream.originalId||""),null;var e=b.a.Sa(),f=fj(b,c,e),g=Ui(b,c.stream),h=Ii(b,f),k=je(b.a.I,c.type,e),l=Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.l;if(f>=b.c.presentationTimeline.Y())return c.endOfStream=!0,"video"==c.type&&(f=b.b.get("text"))&&"application/cea-608"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.pa=h;if(h!=g)return null;
348
+ if(k>=l)return.5;h=ie(b.a.I,c.type);h=Yi(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=fj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.$d=0;gj(b,c,e,g,h);return null}function fj(b,c,d){if(!c.pb||!c.Aa)return Math.max(d,c.$d);d=Ui(b,c.pb);return b.c.periods[d].startTime+c.Aa.endTime}
349
+ function Yi(b,c,d,e,f){if(c.Aa&&c.stream==c.pb)return hj(b,c,f,c.Aa.position+1);c.Aa?(d=Ui(b,c.pb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.Aa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=hj(b,c,f,Math.max(0,d-1)));return g||hj(b,c,f,d)}
350
+ function hj(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Gb();e=e.nb();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
351
+ function gj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=ij(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ha=!0;c.hc=!1;k=jj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return kj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ha=!1,c.cd=!1,c.Ma||this.a.Yc(),Qi(this,c,0),lj(this,h))}.bind(b))["catch"](function(b){this.f||this.m||(c.Ha=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.b["delete"]("text"):
352
+ 7001==b.code?(c.Ha=!1,c.Da=null,Qi(this,c,0)):3017==b.code?mj(this,c,b):(c.Hb=!0,b.severity=2,dj(this,b)))}.bind(b))}function mj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.cd})){var e=Math.round(100*b.l);if(20<e)b.l-=.2;else if(4<e)b.l-=.04;else{c.Hb=!0;b.m=!0;b.a.onError(d);return}c.cd=!0}Qi(b,c,4)}
353
+ function ij(b,c,d,e,f){if(!c.hc)return Promise.resolve();d=ne(b.a.I,c.type,b.c.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=jj(b,c,c.stream.initSegmentReference).then(function(b){if(!this.f)return ke(this.a.I,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.hc=!0;return Promise.reject(b)});return Promise.all([d,b])}
354
+ function kj(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new S).ea("emsg",b.M.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return nj(b,c,d).then(function(){if(!this.f)return ke(this.a.I,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.pb=f,c.Aa=g,Promise.resolve()}.bind(b))}
355
+ Gi.prototype.M=function(b,c,d,e){var f=e.reader.ad(),g=e.reader.ad(),h=e.reader.F(),k=e.reader.F(),l=e.reader.F(),m=e.reader.F();e=e.reader.Xa(e.reader.K.byteLength-e.reader.ba());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.hf();else this.a.onEvent(new I("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
356
+ function nj(b,c,d){var e=Math.max(b.g.bufferBehind,b.c.presentationTimeline.a),f=ge(b.a.I,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.I.remove(c.type,f,f+d).then(function(){}.bind(b))}
357
+ function lj(b,c){if(!b.o){var d=Array.from(b.b.values());if(1!=d.length||"text"!=d[0].type)b.o=d.every(function(b){return"text"==b.type?!0:!b.Ma&&!b.Pa&&b.Aa});if(b.o){d=Ui(b,c);b.h[d]||aj(b,d).then(function(){this.f||this.a.Ld()}.bind(b))["catch"](xd.ic);for(d=0;d<b.c.periods.length;++d)aj(b,d)["catch"](xd.ic);b.a.sf&&b.a.sf()}}}
358
+ function ej(b,c){var d=Ui(b,c.stream);if(c.pa!=d){var e=c.pa,f=Array.from(b.b.values());f.every(function(b){return b.pa==e})&&f.every(oj)&&aj(b,e).then(function(){if(!this.f&&f.every(function(b){var c=oj(b),d=Ui(this,b.stream);return c&&b.pa==e&&d!=e}.bind(this))){var b=this.c.periods[e],c=this.a.Md(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=r(this.b.keys());for(c=l.next();!c.done;c=
359
+ l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new D(2,5,5005));return}l=r(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.b.has(c))if("text"==c)Ji(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new D(2,5,5005));return}b=r(Array.from(this.b.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(Si(this,l,!1,0,!1),Qi(this,this.b.get(c),0)):this.b["delete"](c);this.a.Ld()}}.bind(b))["catch"](xd.ic)}}
360
+ function oj(b){return!b.Ha&&null==b.Da&&!b.Ma&&!b.Pa}function Ii(b,c){var d=gi(b.c.periods,c+Bd);return d?b.c.periods.indexOf(d):0}function Ui(b,c){for(var d=b.c.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=r(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=r(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}
361
+ function jj(b,c,d){d=rg(d.c(),d.b,d.a,b.g.retryParameters);b=b.a.rb.request(1,d);c.Jb=b;return b.promise.then(function(b){c.Jb=null;return b.data})}
362
+ function Xi(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.j){case 1:return c.Ma=!1,c.uc=!1,c.Yb=0,c.Pa=!0,e?(k=b.a.Sa(),l=b.a.I.Y(),h=b.a.I.remove(c.type,k+e,l)):h=me(b.a.I,c.type).then(function(){if(!this.f&&d)return this.a.I.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.pb=null;c.Aa=null;c.Pa=!1;c.endOfStream=!1;Qi(b,c,0);v(g)}})})}
363
+ function Qi(b,c,d){c.Da=(new xb(function(){return t(function f(){var d;return y(f,function(f){switch(f.j){case 1:return ya(f,2),u(f,bj(b,c),4);case 4:Ca(f,0);break;case 2:d=Da(f);if(b.a)b.a.onError(d);v(f)}})})})).O(d)}function Hi(b){null!=b.Da&&(b.Da.stop(),b.Da=null)}function dj(b,c){Ab(b.G).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function pj(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return{uri:f||e,$c:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=zc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function qj(b,c,d,e){var f=new qj.b;ic(c.headers).forEach(function(b,c){f.append(c,b)});var g=new qj.a,h={ud:!1,he:!1};b=qj.l(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h,e);b=new H(b,function(){h.ud=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new B(function(){h.he=!0;g.abort()});k.O(c/1E3);b["finally"](function(){k.stop()})}return b}z("shaka.net.HttpFetchPlugin",qj);
364
+ qj.l=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,C,E,F,V,Y,va;return y(h,function(h){switch(h.j){case 1:return k=qj.g,l=qj.c,x=q=0,w=Date.now(),ya(h,2),u(h,k(b,d),4);case 4:return m=h.s,A=m.clone().body.getReader(),E=(C=m.headers.get("Content-Length"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return y(ja,function(h){switch(h.j){case 1:return ya(h,2),u(h,A.read(),4);case 4:d=h.s;Ca(h,3);break;case 2:return Da(h),h["return"]();case 3:d.done||(q+=d.value.byteLength);
365
+ e=Date.now();if(100<e-w||d.done)f(e-w,q-x,E-q),x=q,w=e;d.done?b.close():(b.enqueue(d.value),c());v(h)}})})}c()},new l({start:F}),u(h,m.arrayBuffer(),5);case 5:n=h.s;Ca(h,3);break;case 2:V=Da(h);if(e.ud)throw new D(1,1,7001,b,c);if(e.he)throw new D(1,1,1003,b,c);throw new D(1,1,1002,b,V,c);case 3:return Y={},va=m.headers,va.forEach(function(b,c){Y[c.trim()]=b}),h["return"](pj(Y,n,m.status,b,m.url,c))}})})};
366
+ qj.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};qj.isSupported=qj.isSupported;qj.g=window.fetch;qj.a=window.AbortController;qj.c=window.ReadableStream;qj.b=window.Headers;qj.isSupported()&&(Sb("http",qj,2),Sb("https",qj,2));function rj(b,c,d,e){var f=new rj.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new D(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=pj(f,c.response,c.status,b,c.responseURL,
367
+ d);k(h)}catch(E){m(E)}};f.onerror=function(c){m(new D(1,1,1002,b,c,d))};f.ontimeout=function(){m(new D(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h,b.total-b.loaded),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new H(k,function(){f.abort();return Promise.resolve()})}z("shaka.net.HttpXHRPlugin",rj);rj.f=window.XMLHttpRequest;Sb("http",rj,1);
368
+ Sb("https",rj,1);function sj(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function tj(b,c){b.b+=c;var d=b.g;b.g++;b.c.set(d,c);return d}sj.prototype.close=function(b,c){if(this.c.has(b)){var d=this.c.get(b);this.c["delete"](b);this.f+=d;this.a+=c}};function uj(b,c){this.g=b;this.b=new Map;this.c=!1;this.f=c;this.a=new sj}uj.prototype.destroy=function(){this.c=!0;return Promise.all(this.b.values()).then(function(){},function(){})};
369
+ function vj(b,c,d,e,f){var g=tj(b.a,e);e=b.b.get(c)||Promise.resolve();b.b.set(c,e.then(function(){return t(function k(){var c;return y(k,function(e){switch(e.j){case 1:return u(e,wj(b,d),2);case 2:c=e.s;if(b.c)throw new D(2,9,7001);b.a.close(g,c.byteLength);var k=b.a;b.f(0==k.b?0:k.f/k.b,b.a.a);return e["return"](f(c))}})})}))}function xj(b){return t(function d(){return y(d,function(d){switch(d.j){case 1:return u(d,Promise.all(b.b.values()),2);case 2:return d["return"](b.a.a)}})})}
370
+ function wj(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.j){case 1:return f=b.g.request(1,c),u(e,f.promise,2);case 2:return g=e.s,e["return"](g.data)}})})};function yj(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new G;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}yj.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
371
+ function zj(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}yj.prototype.store=function(){return this.b};yj.prototype.promise=function(){return this.a};function Aj(b){this.b=b;this.a=[]}Aj.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function Bj(b,c){return Cj(b,c,"readonly")}function Dj(b,c){return Cj(b,c,"readwrite")}function Cj(b,c,d){d=b.b.transaction([c],d);var e=new yj(d,c);b.a.push(e);e.promise().then(function(){Lb(b.a,e)},function(){Lb(b.a,e)});return e};function Ej(b){this.a=new Aj(b)}Ej.prototype.destroy=function(){return this.a.destroy()};Ej.prototype.getAll=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:return e=Bj(b.a,"session-ids"),f=[],u(d,zj(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};Ej.prototype.add=function(b){var c=Dj(this.a,"session-ids"),d=c.store();b=r(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
372
+ Ej.prototype.remove=function(b){var c=this;return t(function e(){var f;return y(e,function(e){switch(e.j){case 1:return f=Dj(c.a,"session-ids"),u(e,zj(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function Fj(){this.a=new Map}Fj.prototype.destroy=function(){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Fj.prototype.init=function(){var b=this;Gj.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=r(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
373
+ function Hj(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{ua:e,aa:d},aa:b})})});if(c)return c;throw new D(2,9,9013,"Could not find a cell that supports add-operations");}function Ij(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({ua:e,aa:d},b)})})}
374
+ function Jj(b,c,d){b=b.a.get(c);if(!b)throw new D(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new D(2,9,9013,"Could not find cell with name "+d);return c}function Kj(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function Lj(b){var c=Array.from(b.a.keys());if(!c.length)throw new D(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
375
+ Fj.prototype.erase=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.j){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Gj,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.A(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function Mj(b,c){Gj.set(b,c)}z("shaka.offline.StorageMuxer.register",Mj);z("shaka.offline.StorageMuxer.unregister",function(b){Gj["delete"](b)});
376
+ var Gj=new Map;function Nj(b){this.a=new Aj(b)}p=Nj.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return Oj("segment")};p.removeSegments=function(b,c){return Pj(this,"segment",b,c)};p.getSegments=function(b){return Qj(this,"segment",b).then(function(b){return b.map(Rj)})};p.addManifests=function(){return Oj("manifest")};
377
+ p.updateManifestExpiration=function(b,c){var d=Dj(this.a,"manifest"),e=d.store(),f=new G;e.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,e.put(d),f.resolve()):f.reject(new D(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};p.removeManifests=function(b,c){return Pj(this,"manifest",b,c)};p.getManifests=function(b){return Qj(this,"manifest",b).then(function(b){return b.map(Sj)})};
378
+ p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:return e=Bj(b.a,"manifest"),f=new Map,u(d,zj(e,function(b,d){f.set(b,Sj(d))}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};function Oj(b){return Promise.reject(new D(2,9,9011,"Cannot add new value to "+b))}function Pj(b,c,d,e){b=Dj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
379
+ function Qj(b,c,d){b=Bj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){e.get(b).onsuccess=function(c){c=c.target.result;void 0==c&&g.push(b);f[b]=c}});return b.promise().then(function(){return g.length?Promise.reject(new D(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
380
+ function Sj(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(Tj),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function Tj(b){Uj(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(Vj)}}
381
+ function Vj(b){var c=b.$e?Wj(b.$e):null;return{id:b.id,originalId:null,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(Xj),variantIds:b.variantIds}}function Xj(b){var c=Wj(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
382
+ function Rj(b){return{data:b.data}}function Wj(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new D(2,9,9004,"Could not parse uri "+b);}
383
+ function Uj(b){var c=b.streams.filter(function(b){return"audio"==b.contentType}),d=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!d.every(function(b){return b.variantIds})){c.forEach(function(b){b.variantIds=[]});d.forEach(function(b){b.variantIds=[]});var e=0;if(d.length&&!c.length){var f=e++;d.forEach(function(b){b.variantIds.push(f)})}if(!d.length&&c.length){var g=e++;c.forEach(function(b){b.variantIds.push(g)})}d.length&&c.length&&c.forEach(function(b){d.forEach(function(c){var d=
384
+ e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function Yj(b,c,d,e){this.a=new Aj(b);this.c=c;this.b=d;this.f=e}p=Yj.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return this.f};p.addSegments=function(b){return Zj(this,this.c,b)};p.removeSegments=function(b,c){return ak(this,this.c,b,c)};p.getSegments=function(b){return bk(this,this.c,b)};p.addManifests=function(b){return Zj(this,this.b,b)};
385
+ p.updateManifestExpiration=function(b,c){var d=Dj(this.a,this.b),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};p.removeManifests=function(b,c){return ak(this,this.b,b,c)};p.getManifests=function(b){return bk(this,this.b,b)};
386
+ p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:return e=Bj(b.a,b.b),f=new Map,u(d,zj(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
387
+ function Zj(b,c,d){if(b.f)return Promise.reject(new D(1,9,9011,"Cannot add new value to "+c));b=Dj(b.a,c);var e=b.store(),f=[];d.forEach(function(b){e.add(b).onsuccess=function(b){f.push(b.target.result)}});return b.promise().then(function(){return f})}function ak(b,c,d,e){b=Dj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
388
+ function bk(b,c,d){b=Bj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){var c=e.get(b);c.onsuccess=function(){void 0==c.result&&g.push(b);f[b]=c.result}});return b.promise().then(function(){return g.length?Promise.reject(new D(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function ck(){this.g=this.c=this.b=this.a=this.f=null}p=ck.prototype;
389
+ p.init=function(){var b=this,c=new G,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Nj(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Yj(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Yj(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
390
+ new Ej(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=r(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new D(2,9,9001,d.error));b.preventDefault()};return c};
391
+ p.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.j){case 1:if(!b.a){d.A(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.A(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.A(6);break}return u(d,b.c.destroy(),6);case 6:if(!b.g){d.A(8);break}return u(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),v(d)}})})};p.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};p.getEmeSessionCell=function(){return this.g};
392
+ p.erase=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.j){case 1:if(!b.a){d.A(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.A(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.A(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,dk(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
393
+ function dk(){var b=new G,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new D(2,9,9001,c.error));d.preventDefault()};return b}Mj("idb",function(){return window.indexedDB?new ck:null});function ek(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}ek.prototype.ua=function(){return this.g};ek.prototype.aa=function(){return this.f};ek.prototype.key=function(){return this.c};ek.prototype.toString=function(){return this.b};
394
+ function fk(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new ek(c,d,e,Number(b[4])):null};function gk(b,c){this.b=b;this.a=c}function hk(b,c){var d=new W(null,0);d.wa(c.duration);var e=c.periods.map(function(c){return ik(b,c,d)}),f=c.drmInfo?[c.drmInfo]:[];c.drmInfo&&e.forEach(function(b){b.variants.forEach(function(b){b.drmInfos=f})});return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
395
+ function ik(b,c,d){var e=c.streams.filter(function(b){return"audio"==b.contentType}),f=c.streams.filter(function(b){return"video"==b.contentType});e=jk(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return kk(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return lk(b,d,c)});d.sb(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
396
+ function jk(b,c,d){for(var e=new Set,f=r(c),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(d);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(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,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=r(c);for(e=c.next();!e.done;e=c.next())for(e=
397
+ e.value,g=kk(b,e),h=r(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;d=r(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=kk(b,e),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
398
+ function kk(b,c){var d=c.segments.map(function(c,d){return lk(b,d,c)}),e=new T(d);d={id:c.id,originalId:c.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(b){return e.find(b)},getSegmentReference:function(b){return e.get(b)},initSegmentReference:null,presentationTimeOffset:c.presentationTimeOffset,mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,
399
+ language:c.language,label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=mk(b,c.initSegmentKey));return d}function lk(b,c,d){var e=new ek("segment",b.b,b.a,d.dataKey);return new Q(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function mk(b,c){var d=new ek("segment",b.b,b.a,c);return new Lf(function(){return[d.toString()]},0,null)};function nk(){this.a=null}p=nk.prototype;p.configure=function(){};
400
+ p.start=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.j){case 1:f=fk(b);c.a=f;if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new D(2,1,9004,f)));g=new Fj;za(e,2);return u(e,g.init(),4);case 4:return u(e,Jj(g,f.ua(),f.aa()),5);case 5:return h=e.s,u(e,h.getManifests([f.key()]),6);case 6:return k=e.s,l=k[0],m=new gk(f.ua(),f.aa()),e["return"](hk(m,l));case 2:return Ea(e),u(e,g.destroy(),7);case 7:Fa(e,0)}})})};p.stop=function(){return Promise.resolve()};
401
+ p.update=function(){};
402
+ p.onExpirationUpdated=function(b,c){var d=this;return t(function f(){var g,h,k,l,m,n,q;return y(f,function(f){switch(f.j){case 1:return g=d.a,h=new Fj,ya(f,2,3),u(f,h.init(),5);case 5:return u(f,Jj(h,g.ua(),g.aa()),6);case 6:return k=f.s,u(f,k.getManifests([g.key()]),7);case 7:l=f.s;m=l[0];n=m.sessionIds.includes(b);q=void 0==m.expiration||m.expiration>c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Ea(f),u(f,h.destroy(),10);case 10:Fa(f,0);break;case 2:Da(f),
403
+ f.A(3)}})})};U.Mb("application/x-offline-manifest",nk);function ok(b){var c=fk(b);return c&&"manifest"==c.a?ok.h(b):c&&"segment"==c.a?ok.i(c.key(),c):Bb(new D(2,1,9004,b))}z("shaka.offline.OfflineScheme",ok);ok.h=function(b){b={uri:b,$c:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Db(b)};ok.i=function(b,c){var d=new Fj;return Db(void 0).U(function(){return d.init()}).U(function(){return Jj(d,c.ua(),c.aa())}).U(function(b){return b.getSegments([c.key()])}).U(function(b){return{uri:c,$c:c,data:b[0].data,headers:{}}})["finally"](function(){return d.destroy()})};
404
+ Sb("offline",ok);function pk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.j){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,qk(F.info,A)){F.sessionIds.push(A.sessionId);C=!0;break}C||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=rk(b,c,l);return u(f,m,5);case 5:n=f.s;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f["return"](g)}})})}
405
+ function rk(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.j){case 1:return g=new Jc({rb:c,onError:function(){},kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ya(f,2),g.configure(b),u(f,Rc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Ca(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return ya(f,6),u(f,Yc(g),8);case 8:Ca(f,7);break;case 6:return Da(f),
406
+ u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.j){case 1:return ya(c,2),u(c,ad(g,b),4);case 4:h.push(b);Ca(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
407
+ function qk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Nb(b.audioCapabilities,c.audioCapabilities,d)&&Nb(b.videoCapabilities,c.videoCapabilities,d)};function sk(b,c){var d=tk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.l=!0;this.m=Promise.resolve().then(function(){return uk(e)})}sk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.j){case 1:return b.l=!1,b.b&&b.b.abort(),vk(b),u(d,b.m,2);case 2:b.a&&b.a.ta.Wa();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.ta.Wa();b.a=null;b.f=[];b.g=null;v(d)}})})};
408
+ function wk(b,c){var d={tb:function(){},jc:function(){},Wa:function(){},onError:function(){},lc:function(){},wg:function(){}};b.f.push({create:c,ta:d});b.b&&b.b.abort();vk(b);return d}
409
+ function uk(b){return t(function d(){return y(d,function(d){switch(d.j){case 1:if(b.l){if(0==b.f.length||b.a&&!b.a.Ta)var e=!1;else{b.a&&(b.a.ta.Wa(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.ta.tb(),b.a={node:g.node,payload:g.payload,Ta:g.Ta,ta:e.ta}):e.ta.lc();e=!0}e?e=Promise.resolve():b.a?e=xk(b):(b.g.ff(b.c),b.h=new G,e=b.h);return u(d,e,1)}d.A(0)}})})}
410
+ function xk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:return b.c=b.g.Pe(b.c,b.i,b.a.node,b.a.payload),ya(d,2),b.b=b.g.ze(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.ta.jc(),b.a=null);Ca(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.ta.Wa();else b.a.ta.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.s,v(d)}})})}function vk(b){b.h&&(b.h.resolve(),b.h=null)};function yk(b){this.a=null;for(var c=0;c<b.textTracks.length;++c){var d=b.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.a=d)}this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}z("shaka.text.SimpleTextDisplayer",yk);yk.prototype.remove=function(b,c){if(!this.a)return!1;zk(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};yk.prototype.remove=yk.prototype.remove;
411
+ yk.prototype.append=function(b){for(var c=Ak,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};yk.prototype.append=yk.prototype.append;yk.prototype.destroy=function(){this.a&&zk(this.a,function(){return!0});this.a=null;return Promise.resolve()};yk.prototype.destroy=yk.prototype.destroy;
412
+ yk.prototype.isTextVisible=function(){return"showing"==this.a.mode};yk.prototype.isTextVisible=yk.prototype.isTextVisible;yk.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};yk.prototype.setTextVisibility=yk.prototype.setTextVisibility;
413
+ function Ak(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
414
+ function zk(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function Bk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Jb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Jb(m)),l=Bk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z("shaka.util.ConfigUtils.mergeConfigObjects",Bk);
415
+ function Ck(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(".",f);if(0>f)break;if(0==f||"\\"!=b[f-1])g=b.substring(g,f).replace(/\\\./g,"."),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\./g,".")]=c;return d}z("shaka.util.ConfigUtils.convertToConfigObject",Ck);function Dk(){}z("shaka.util.PlayerConfiguration",Dk);
416
+ function Ek(){var b=5E5,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:zb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:zb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:zb(),failureCallback:function(){},
417
+ 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,stallSkip:.1};rc("Web0S")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,
418
+ bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};
419
+ g.trackSelectionCallback=function(b){return Fk(b,h.preferredAudioLanguage)};return h}function Gk(b,c,d){var e={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Bk(b,c,d||Ek(),e,"")}Dk.mergeConfigObjects=Gk;
420
+ function Fk(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=ue(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
421
+ 2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function Hk(){this.a=null;this.b=[]}function Ik(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Jk(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}
422
+ function Kk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Lk(){this.b=this.c=null;this.a=[]};function Mk(){this.f=this.l=this.b=this.h=this.i=this.g=this.m=NaN;this.a=new Hk;this.c=new Lk};function X(b,c){var d=this;J.call(this);this.h=Nk;this.a=null;this.eb=!1;this.i=new L;this.vc=this.l=this.Bb=this.c=this.m=this.f=this.Rb=this.P=this.Sb=this.W=this.gb=this.o=this.D=this.g=this.G=null;this.Id=1E9;this.Vb=new Set;this.ib=!0;this.Ea=null;this.Ed=!1;this.Cd=0;this.na=null;this.$=new Jh;this.b=Ok(this);this.Wb={width:Infinity,height:Infinity};this.v=null;this.Tb=new Sh(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.ma=this.b.preferredTextLanguage;
423
+ this.cb=this.b.preferredTextRole;c&&c(this);this.G=Pk(this);this.i.w(window,"online",function(){d.fd()});this.C={name:"detach"};this.M={name:"attach"};this.Fa={name:"unload"};this.Ec={name:"manifest-parser"};this.Cc={name:"manifest"};this.fb={name:"media-source"};this.wc={name:"drm-engine"};this.T={name:"load"};this.Hc={name:"src-equals-drm-engine"};this.hb={name:"src-equals"};var e=new Map;e.set(this.M,function(b,c){return Fb(Qk(d,b,c))});e.set(this.C,function(b){b.u&&(d.i.da(b.u,"error"),b.u=null);
424
+ d.a=null;b=Promise.resolve();return Fb(b)});e.set(this.Fa,function(b){return Fb(Rk(d,b))});e.set(this.fb,function(b){b=Sk(d,b);return Fb(b)});e.set(this.Ec,function(b,c){var e=Tk(d,b,c);return Fb(e)});e.set(this.Cc,function(b){return Uk(d,b)});e.set(this.wc,function(){var b=Vk(d);return Fb(b)});e.set(this.T,function(b,c){return Fb(Wk(d,b,c))});e.set(this.Hc,function(b){b=Xk(d,b);return Fb(b)});e.set(this.hb,function(b,c){return Yk(d,b,c)});this.jb=new sk(this.C,{Pe:function(b,c,e,k){var f=null;b==
425
+ d.C&&(f=e==d.C?d.C:d.M);b==d.M&&(f=e==d.C||c.u!=k.u?d.C:e==d.M?d.M:e==d.fb||e==d.T?d.fb:e==d.hb?d.Hc:null);b==d.fb&&(f=e==d.T&&c.u==k.u?d.Ec:d.Fa);b==d.Ec&&(f=Zk(d.T,d.Cc,d.Fa,e,c,k));b==d.Cc&&(f=Zk(d.T,d.wc,d.Fa,e,c,k));b==d.wc&&(f=Zk(d.T,d.T,d.Fa,e,c,k));b==d.Hc&&(f=e==d.hb&&c.u==k.u?d.hb:d.Fa);if(b==d.T||b==d.hb)f=d.Fa;b==d.Fa&&(f=k.u&&c.u==k.u?d.M:d.C);return f},ze:function(b,c,h){d.dispatchEvent(new I("onstatechange",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,
426
+ function(c){switch(c.j){case 1:return u(c,Rk(d,b),2);case 2:return c["return"](b.u?d.M:d.C)}})})},ff:function(b){d.dispatchEvent(new I("onstateidle",{state:b.name}))}});b&&this.Cb(b,!0)}Va(X,J);z("shaka.Player",X);
427
+ X.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.j){case 1:if(b.h==$k)return d["return"]();b.h=$k;e=wk(b.jb,function(){return{node:b.C,payload:tk(),Ta:!1}});return u(d,new Promise(function(b){e.tb=function(){};e.jc=function(){b()};e.Wa=function(){b()};e.onError=function(){b()};e.lc=function(){b()}}),2);case 2:return u(d,b.jb.destroy(),3);case 3:b.i&&(b.i.release(),b.i=null);b.vc=null;b.l=null;b.b=null;if(!b.G){d.A(0);break}return u(d,b.G.destroy(),
428
+ 5);case 5:b.G=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version="v2.5.3";var al=["2","5"];Oe=new function(b){this.a=b;this.c=Pe;this.b=Qe}(new Me(Number(al[0]),Number(al[1])));var bl=["output-restricted","internal-error"],cl={};X.registerSupportPlugin=function(b,c){cl[b]=c};
429
+ X.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?oc()?!0:pc("application/x-mpegurl"):!1};
430
+ X.probeSupport=function(){return md().then(function(b){for(var c=U.Af(),d={},e=r('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",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(",")),f=
431
+ e.next();!f.done;f=e.next()){f=f.value;d[f]=oc()?Zd(f)?!0:MediaSource.isTypeSupported(f)||Dd(f):pc(f);var g=f.split(";")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in cl)b[h]=cl[h]();return b})};X.prototype.Cb=function(b,c){c=void 0===c?!0:c;if(this.h==$k)return Promise.reject(dl());var d=tk();d.u=b;oc()||(c=!1);var e=c?this.fb:this.M,f=wk(this.jb,function(){return{node:e,payload:d,Ta:!1}});f.tb=function(){};return el(f)};X.prototype.attach=X.prototype.Cb;
432
+ X.prototype.detach=function(){var b=this;if(this.h==$k)return Promise.reject(dl());var c=wk(this.jb,function(){return{node:b.C,payload:tk(),Ta:!1}});c.tb=function(){};return el(c)};X.prototype.detach=X.prototype.detach;X.prototype.qd=function(b){var c=this;b=void 0===b?!0:b;if(this.h==$k)return Promise.reject(dl());oc()||(b=!1);var d=tk(),e=wk(this.jb,function(e){var f=e.u&&b?c.fb:e.u?c.M:c.C;d.u=e.u;return{node:f,payload:d,Ta:!1}});e.tb=function(){};return el(e)};X.prototype.unload=X.prototype.qd;
433
+ X.prototype.load=function(b,c,d){if(this.h==$k)return Promise.reject(dl());this.dispatchEvent(new I("loading"));var e=tk();e.uri=b;e.nd=Date.now()/1E3;d&&"string"!=typeof d&&(Ne("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),e.ya=function(){return new d});d&&"string"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=fl(e)?this.hb:this.T,g=wk(this.jb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ta:!0}});g.tb=function(){};
434
+ return new Promise(function(b,c){g.lc=function(){return c(new D(2,7,7002))};g.jc=function(){return b()};g.Wa=function(){return c(dl())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;
435
+ function fl(b){if(b.ya)return!1;if(!oc())return!0;var c=b.mimeType;b=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[U.getExtension(b)]);return c?pc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes("Apple"):!0:!1:!1}function Qk(b,c,d){null==c.u&&(c.u=d.u,b.i.w(c.u,"error",function(){var c=gl(b);c&&b.Ka(c)}));b.a=c.u;return Promise.resolve()}
436
+ function Rk(b,c){return t(function e(){return y(e,function(e){switch(e.j){case 1:b.h!=$k&&(b.h=Nk);b.dispatchEvent(new I("unloading"));c.ya=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.da(c.u,"loadeddata"),b.i.da(c.u,"playing"),b.i.da(c.u,"pause"),b.i.da(c.u,"ended"),b.i.da(c.u,"ratechange"));b.gb&&(b.gb.release(),b.gb=null);b.Sb&&(b.Sb.stop(),b.Sb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.l){e.A(4);break}return u(e,b.l.stop(),4);case 4:if(!b.f){e.A(6);
437
+ break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.o&&(b.o.release(),b.o=null);if(!b.D){e.A(8);break}return u(e,b.D.destroy(),9);case 9:b.D=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute("src"),c.u.load());if(!b.g){e.A(10);break}return u(e,b.g.destroy(),11);case 11:b.g=null;case 10:b.$.a.clear(),b.Bb=null,b.P=null,b.Vb.clear(),b.c=null,b.v=null,b.xc=null,b.ib=!0,hl(b),v(e)}})})}
438
+ function Sk(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.j){case 1:return f=window.muxjs?new qd:new rd,g=b.b.textDisplayFactory,h=new g,b.xc=g,k=new ce(c.u,f,h),u(e,k.o,2);case 2:b.D=k,v(e)}})})}
439
+ function Tk(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.j){case 1:c.ya=d.ya;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.G;b.Bb=g;if(c.ya){b.m=c.ya();f.A(2);break}k=b;return u(f,U.create(g,h,b.b.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.s;case 2:b.m.configure(b.b.manifest),v(f)}})})}
440
+ function Uk(b,c){var d=c.uri,e=b.G;b.Rb=new zi;Ai(b.Rb,function(c){il(b,"timelineregionadded",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Fc(c)},filterAllPeriods:function(c){return jl(b,c)},onTimelineRegionAdded:function(c){var d=b.Rb;a:{var e=r(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ka(c)}};
441
+ return new H(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.j){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.c=e.s;b.dispatchEvent(new I("manifestparsed"));if(0==b.c.periods.length)throw new D(2,4,4014);kl(b.c.periods);v(e)}})})}),function(){return b.m.stop()})}
442
+ function Vk(b){return t(function d(){return y(d,function(d){switch(d.j){case 1:return b.g=new Jc({rb:b.G,onError:function(d){b.Ka(d)},kc:function(d){ll(b,d)},onExpirationUpdated:function(d,e){ml(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.g.configure(b.b.drm),u(d,Qc(b.g,fi(b.c.periods),b.c.offlineSessionIds),2);case 2:jl(b,b.c.periods),v(d)}})})}
443
+ function Wk(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.j){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.Bb=h,b.v=new Mk,k=function(){return nl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.W.set(c)},b.i.w(g,"playing",k),b.i.w(g,"pause",k),b.i.w(g,"ended",k),b.i.w(g,"ratechange",l),m=b.b.abrFactory,b.l&&b.vc==m||(b.vc=m,b.l=new m,b.l.configure(b.b.abr)),ol(b,b.c.periods),b.Tb=new Sh(b.b.preferredAudioLanguage,b.b.preferredVariantRole,b.b.preferredAudioChannelCount),
444
+ b.ma=b.b.preferredTextLanguage,pl(b.c.presentationTimeline,b.b.playRangeStart,b.b.playRangeEnd),u(f,b.g.Cb(g),2);case 2:return b.l.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.c.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}ql(b,g,c,!0);b.f&&(Ti(b.f,c,d,f),rl(b))}),b.o=sl(b,c.startTime),b.gb=tl(b),b.W=new ji({ec:function(){return c.u.playbackRate},kd:function(b){c.u.playbackRate=b},Jd:function(b){c.u.currentTime+=b}}),
445
+ n=Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),ul(b,n),b.f=vl(b),b.f.configure(b.b.streaming),wl(b),b.h=xl,b.dispatchEvent(new I("streaming")),u(f,b.f.start(),3);case 3:b.b.streaming.startAtSegmentBoundary&&(q=b.o.h(),x=yl(b,q),b.o.m(x)),b.c.periods.forEach(b.Fc.bind(b)),zl(b),rl(b),w=Al(b),w.variants.some(function(b){return b.primary}),Bl(b,w.variants),b.i.ha(g,"loadeddata",function(){b.v.b=Date.now()/1E3-d.nd}),v(f)}})})}
446
+ function Xk(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.j){case 1:return f=Ad,b.g=new Jc({rb:b.G,onError:function(c){b.Ka(c)},kc:function(c){ll(b,c)},onExpirationUpdated:function(c,e){ml(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.g.configure(b.b.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,
447
+ presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:f.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Qc(b.g,[g],[]),2);case 2:return u(e,b.g.Cb(c.u),0)}})})}
448
+ function Yk(b,c,d){function e(){return nl(b)}c.uri=d.uri;c.startTime=d.startTime;b.Bb=c.uri;b.v=new Mk;b.o=new si(c.u);null!=c.startTime&&b.o.m(c.startTime);b.W=new ji({ec:function(){return c.u.playbackRate},kd:function(b){c.u.playbackRate=b},Jd:function(b){c.u.currentTime+=b}});ul(b,b.b.streaming.rebufferingGoal);b.i.w(c.u,"playing",e);b.i.w(c.u,"pause",e);b.i.w(c.u,"ended",e);b.i.ha(c.u,"loadeddata",function(){b.v.b=Date.now()/1E3-d.nd});b.a.audioTracks&&(b.i.w(b.a.audioTracks,"addtrack",function(){return zl(b)}),
449
+ b.i.w(b.a.audioTracks,"removetrack",function(){return zl(b)}));if(b.a.textTracks){var f=b.a.textTracks;b.i.w(f,"addtrack",function(){return zl(b)});b.i.w(f,"removetrack",function(){return zl(b)})}c.u.src=c.uri;b.h=Cl;b.dispatchEvent(new I("streaming"));var g=new G;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(gl(b)):(b.i.ha(b.a,"loadeddata",function(){g.resolve()}),b.i.ha(b.a,"error",function(){g.reject(gl(b))}));return new H(g,function(){g.reject(new D(2,7,7001));
450
+ return Promise.resolve()})}function kl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}
451
+ function wl(b){function c(b){var c="";b.video&&(c=nc(b.video.codecs)[0]);var d="";b.audio&&(d=nc(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=Ge(d,b.b.preferredAudioChannelCount);var e=new Ib;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h<g&&(f=b,g=h)});b.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
452
+ f?!0:!1})})}function Pk(b){return new K(function(c,d){b.l&&b.l.segmentDownloaded(c,d)})}function sl(b,c){return new ti(b.a,b.c,b.b.streaming,c,function(){b.gb&&ei(b.gb,!0);b.f&&Zi(b.f)},function(c){return b.dispatchEvent(c)})}
453
+ function tl(b){var c=new hi(b.c);ii(c,function(){zl(b)});var d=new Bi(b.Rb);Fi(d,function(c){il(b,"timelineregionenter",c)},function(c){il(b,"timelineregionexit",c)},function(c,d){d||(il(b,"timelineregionenter",c),il(b,"timelineregionexit",c))});var e=new di(b.a);e.a.add(c);e.a.add(d);return e}
454
+ function ul(b,c){b.P=new Vh(c,Math.min(.5,c/2));b.P.a=Xh;hl(b);b.Sb=(new B(function(){switch(b.h){case Cl:var c=b.a.ended?!0:sd(b.a.buffered)>=b.a.duration-.1;break;case xl:a:{var e;(e=b.a.ended)||(e=b.D,e=e.h?"ended"==e.h.readyState:!0);if(e)c=!0;else{if(b.c.presentationTimeline.V()&&(e=b.c.presentationTimeline.nb(),sd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=ud(b.a.buffered,b.a.currentTime);e=b.P;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?Wh:Xh;e.a=f;c!=f&&hl(b)})).La(.25)}
455
+ function vl(b){return new Gi(b.c,{Sa:function(){return b.o.h()},getBandwidthEstimate:function(){return b.l.getBandwidthEstimate()},I:b.D,rb:b.G,Md:b.df.bind(b),Ld:b.ue.bind(b),onError:b.Ka.bind(b),onEvent:function(c){return b.dispatchEvent(c)},hf:b.jf.bind(b),Yc:b.qf.bind(b)})}X.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Ck(b,c));var d=Gk(this.b,b,Ok(this));Dl(this);return d};X.prototype.configure=X.prototype.configure;
456
+ function Dl(b){b.m&&b.m.configure(b.b.manifest);b.g&&b.g.configure(b.b.drm);if(b.f){b.f.configure(b.b.streaming);try{b.c.periods.forEach(b.Fc.bind(b))}catch(g){b.Ka(g)}var c=Ki(b.f),d=Mi(b.f),e=Al(b);c=Je(c,d,e.variants);b.l&&c&&c.allowedByApplication&&c.allowedByKeySystem?Bl(b,e.variants):El(b,e)}if(b.D&&(e=b.b.textDisplayFactory,b.xc!=e)){c=new e;d=b.D;var f=d.g;d.g=c;f&&(c.setTextVisibility(f.isTextVisible()),f.destroy());d.a&&(d.a.c=c);b.xc=e;b.f&&(e=b.f,(c=e.b.get("text"))&&Si(e,c.stream,!0,
457
+ 0,!0))}b.l&&(b.l.configure(b.b.abr),b.b.abr.enabled&&!b.ib?b.l.enable():b.l.disable(),Fl(b))}X.prototype.getConfiguration=function(){var b=Ok(this);Gk(b,this.b,Ok(this));return b};X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.If=function(){for(var b in this.b)delete this.b[b];Gk(this.b,Ok(this),Ok(this));Dl(this)};X.prototype.resetConfiguration=X.prototype.If;X.prototype.Je=function(){return this.h};X.prototype.getLoadMode=X.prototype.Je;X.prototype.Ne=function(){return this.a};
458
+ X.prototype.getMediaElement=X.prototype.Ne;X.prototype.Eb=function(){return this.G};X.prototype.getNetworkingEngine=X.prototype.Eb;X.prototype.bc=function(){return this.Bb};X.prototype.getAssetUri=X.prototype.bc;X.prototype.Me=function(){Ne("getManifestUri",'Please use "getAssetUri" instead.');return this.bc()};X.prototype.getManifestUri=X.prototype.Me;X.prototype.V=function(){return this.c?this.c.presentationTimeline.V():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.V;
459
+ X.prototype.Va=function(){return this.c?this.c.presentationTimeline.Va():!1};X.prototype.isInProgress=X.prototype.Va;X.prototype.af=function(){if(this.c){if(!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.af;
460
+ X.prototype.Kf=function(){if(this.c){var b=this.c.presentationTimeline;return{start:b.mb(),end:b.za()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};X.prototype.seekRange=X.prototype.Kf;X.prototype.keySystem=function(){return this.g?this.g.keySystem():""};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.g?this.g.a:null};X.prototype.drmInfo=X.prototype.drmInfo;
461
+ X.prototype.dc=function(){return this.g?this.g.dc():Infinity};X.prototype.getExpiration=X.prototype.dc;X.prototype.Nc=function(){return this.P?this.P.a==Xh:!1};X.prototype.isBuffering=X.prototype.Nc;X.prototype.Qe=function(){if(this.W){var b=this.W;b=b.f?0:b.c}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Qe;X.prototype.fg=function(b){0==b?ab("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(b),this.h==xl&&Ri(this.f,1<Math.abs(b)))};
462
+ X.prototype.trickPlay=X.prototype.fg;X.prototype.ve=function(){this.h==Cl&&this.W.set(1);this.h==xl&&(this.W.set(1),Ri(this.f,!1))};X.prototype.cancelTrickPlay=X.prototype.ve;
463
+ X.prototype.Mc=function(){if(this.c&&this.o){for(var b=Gl(this),c=[],d=r(Hl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=ze(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(b){var c=De(b);c.active=b.enabled;c.type="variant";c.originalAudioId=b.id;"main"==b.kind?(c.primary=!0,c.roles=["main"],c.audioRoles=["main"]):c.audioRoles=[];return c}):[]};X.prototype.getVariantTracks=X.prototype.Mc;
464
+ X.prototype.ob=function(){if(this.c&&this.o){for(var b=Il(this),c=[],d=r(Jl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=Ae(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map(function(b){var c=De(b);c.active="disabled"!=b.mode;c.type="text";c.originalTextId=b.id;"captions"==b.kind&&(c.mimeType="application/cea-608");return c}):[]};X.prototype.getTextTracks=X.prototype.ob;
465
+ X.prototype.gd=function(b){if(this.c&&this.f){var c=Al(this),d=c.textStreams.find(function(c){return c.id==b.id});d&&(Kl(this,c,d,!1),Ll(this,d),this.ma=d.language)}else if(this.a&&this.a.src&&this.a.textTracks){c=Array.from(this.a.textTracks);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Be(d)==b.id?d.mode=this.eb?"showing":"hidden":d.mode="disabled";Ml(this)}};X.prototype.selectTextTrack=X.prototype.gd;
466
+ X.prototype.Mf=function(){Ne("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.ob().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.gd(b[0])};X.prototype.selectEmbeddedTextTrack=X.prototype.Mf;
467
+ X.prototype.kg=function(){Ne("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.ob().filter(function(b){return b.active})[0];return b?"application/cea-608"==b.mimeType:!1};X.prototype.usingEmbeddedTextTrack=X.prototype.kg;
468
+ X.prototype.Of=function(b,c,d){d=void 0===d?0:d;if(this.c&&this.f){var e=Al(this);this.b.abr.enabled&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var f=e.variants.find(function(c){return c.id==b.id});f&&Ee(f)&&(ql(this,e,f,!1),Nl(this,f,c,d),this.Tb=new Rh(f),Bl(this,e.variants))}else if(this.a&&this.a.audioTracks){c=Array.from(this.a.audioTracks);c=r(c);for(d=c.next();!d.done;d=
469
+ c.next())d=d.value,Be(d)==b.id&&(d.enabled=!0);Ol(this)}};X.prototype.selectVariantTrack=X.prototype.Of;X.prototype.Ee=function(){return Pl(this.Mc())};X.prototype.getAudioLanguagesAndRoles=X.prototype.Ee;X.prototype.Xe=function(){return Pl(this.ob())};X.prototype.getTextLanguagesAndRoles=X.prototype.Xe;X.prototype.De=function(){return Array.from(Ql(this.Mc()))};X.prototype.getAudioLanguages=X.prototype.De;X.prototype.We=function(){return Array.from(Ql(this.ob()))};X.prototype.getTextLanguages=X.prototype.We;
470
+ X.prototype.Lf=function(b,c){if(this.c&&this.o){var d=Al(this);this.Tb=new Sh(b,c||"",0);El(this,d)}else if(this.a&&this.a.audioTracks){d=Array.from(this.a.audioTracks);d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.language==b&&(e.enabled=!0);Ol(this)}};X.prototype.selectAudioLanguage=X.prototype.Lf;
471
+ X.prototype.Nf=function(b,c){if(this.c&&this.o){var d=Al(this);this.ma=b;this.cb=c||"";var e=He(d.textStreams,this.ma,this.cb)[0]||null;e&&(Kl(this,d,e,!1),(this.b.streaming.alwaysStreamText||this.gc())&&Ll(this,e))}else(d=this.ob().filter(function(c){return c.language==b})[0])&&this.gd(d)};X.prototype.selectTextLanguage=X.prototype.Nf;
472
+ X.prototype.gc=function(){var b=this.eb;return this.c?this.D.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some(function(b){return"showing"==b.mode}):b};X.prototype.isTextTrackVisible=X.prototype.gc;
473
+ X.prototype.Rf=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.j){case 1:f=c.eb;g=b;if(f==g)return e["return"]();c.eb=g;if(c.h!=xl){if(c.a&&c.a.src&&c.a.textTracks){h=Array.from(c.a.textTracks);for(var n=r(h),x=n.next();!x.done;x=n.next())k=x.value,"disabled"!=k.mode&&(k.mode=b?"showing":"hidden")}e.A(2);break}c.D.g.setTextVisibility(b);if(c.b.streaming.alwaysStreamText){e.A(2);break}if(!b){n=c.f;n.D=!0;if(x=n.b.get("text"))Hi(x),n.b["delete"]("text");
474
+ e.A(2);break}l=Al(c);m=He(l.textStreams,c.ma,c.cb);if(!(0<m.length)){e.A(2);break}return u(e,Ni(c.f,m[0]),2);case 2:Rl(c),v(e)}})})};X.prototype.setTextTrackVisibility=X.prototype.Rf;X.prototype.Se=function(){if(!this.V())return null;if(this.c)return new Date(1E3*(this.c.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*this.a.currentTime)}return null};X.prototype.getPlayheadTimeAsDate=X.prototype.Se;
475
+ X.prototype.Ue=function(){if(!this.V())return null;if(this.c)return new Date(1E3*this.c.presentationTimeline.f);if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:b}return null};X.prototype.getPresentationStartTimeAsDate=X.prototype.Ue;X.prototype.Ic=function(){var b={total:[],audio:[],video:[],text:[]};this.h==Cl&&(b.total=vd(this.a.buffered));this.h==xl&&this.D.Ic(b);return b};X.prototype.getBufferedInfo=X.prototype.Ic;
476
+ X.prototype.getStats=function(){if(this.h!=xl&&this.h!=Cl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};nl(this);var b=this.a;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.v,d=Number(b.totalVideoFrames);c.i=Number(b.droppedVideoFrames);c.h=d}if(this.h==xl){if(b=Gl(this))this.v.l=b.bandwidth;b&&b.video&&(c=this.v,d=b.video.height||
477
+ NaN,c.m=b.video.width||NaN,c.g=d);b=this.l.getBandwidthEstimate();this.v.f=b}var e=this.v;b=e.m;c=e.g;d=e.l;var f=e.h,g=e.i,h=e.f,k=e.b,l=Jk(e.a,"playing"),m=Jk(e.a,"paused"),n=Jk(e.a,"buffering"),q=Kk(e.a),x=[];e=r(e.c.a);for(var w=e.next();!w.done;w=e.next())w=w.value,x.push({timestamp:w.timestamp,id:w.id,type:w.type,fromAdaptation:w.fromAdaptation,bandwidth:w.bandwidth});return{width:b,height:c,streamBandwidth:d,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,pauseTime:m,
478
+ bufferingTime:n,stateHistory:q,switchHistory:x}};X.prototype.getStats=X.prototype.getStats;
479
+ X.prototype.addTextTrack=function(b,c,d,e,f,g){var h=this;return t(function l(){var m,n,q,x,w,A,C,E,F;return y(l,function(l){switch(l.j){case 1:if(h.h==Cl)throw Error("State error!");if(h.h!=xl)throw Error("State error!");m=Al(h);n=Ad;q=h.c.periods.indexOf(m);x=q+1;w=x>=h.c.periods.length?h.c.presentationTimeline.Y():h.c.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new D(1,4,4033);C=new Q(1,0,A,function(){return[b]},0,null);E={id:h.Id++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),
480
+ findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Vb.add(E);m.textStreams.push(E);return u(l,Ni(h.f,E),2);case 2:return(F=Li(h.f,"text"))&&Kh(h.$,m,F),h.Vb["delete"](E),El(h,m),zl(h),l["return"](Ae(E))}})})};
481
+ X.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.jd=function(b,c){this.Wb.width=b;this.Wb.height=c};X.prototype.setMaxHardwareResolution=X.prototype.jd;X.prototype.fd=function(){if(this.h==xl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Hb&&(d.Hb=!1,Qi(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.fd;X.prototype.Ke=function(){return this.c};X.prototype.getManifest=X.prototype.Ke;
482
+ X.prototype.Le=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Le;function ql(b,c,d,e){Lh(b.$,c).variant=d;b=b.v.c;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}function Kl(b,c,d,e){Kh(b.$,c,d);b=b.v.c;b.b!=d&&(b.b=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"text",fromAdaptation:e,bandwidth:null}))}
483
+ function Ok(b){var c=Ek();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.V()&&d.includes(c.code)&&(c.severity=1,b.fd())};c.textDisplayFactory=function(){return new yk(b.a)};return c}
484
+ function ol(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=r(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=r(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.Id++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
485
+ codecs:"",kind:"caption",encrypted:!1,keyId:null,language:h.closedCaptions.get(l),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:h.roles,channelsCount:null,closedCaptions:null};f.set(l,m)}}f=r(f.values());for(g=f.next();!g.done;g=f.next())e.textStreams.push(g.value)}}
486
+ function jl(b,c){var d=b.f?Ki(b.f):null,e=b.f?Mi(b.f):null;c.forEach(xe.bind(null,b.g,d,e));d=Mb(c,function(b){return b.variants.some(Ee)});if(0==d)throw new D(2,4,4032);if(d<c.length)throw new D(2,4,4011);c.forEach(function(b){we(b.variants,this.b.restrictions,this.Wb)&&this.f&&Al(this)==b&&zl(this);Sl(this,b.variants)}.bind(b))}p=X.prototype;
487
+ p.Fc=function(b){var c=this.f?Ki(this.f):null,d=this.f?Mi(this.f):null;xe(this.g,c,d,b);c=b.variants;if(!c.some(Ee))throw new D(2,4,4011);Sl(this,b.variants);we(c,this.b.restrictions,this.Wb)&&this.f&&Al(this)==b&&zl(this);if(b=this.g?this.g.a:null)for(c=r(c),d=c.next();!d.done;d=c.next()){d=r(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=r(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,$c(this.g,f.initDataType,f.initData)}}};
488
+ function Nl(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.ib?(b.Ea=c,b.Ed=d,b.Cd=e):(Ti(b.f,c,d,e),Ol(b))}function Ll(b,c){b.ib?b.na=c:(Si(b.f,c,!0,0,!1),Ml(b))}function yl(b,c){function d(b,c){if(!b)return null;var d=b.findSegmentPosition(c-g.startTime);return null==d?null:(d=b.getSegmentReference(d))?d.startTime+g.startTime:null}var e=Ki(b.f),f=Mi(b.f),g=Al(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
489
+ function hl(b){var c=b.Nc();if(b.v&&b.P&&b.o){var d=b.W;d.f=c;ki(d);nl(b)}b.dispatchEvent(new I("buffering",{buffering:c}))}function nl(b){if(b.v&&b.P){var c=b.v.a;b.P.a==Xh?Ik(c,"buffering"):b.a.paused?Ik(c,"paused"):b.a.ended?Ik(c,"ended"):Ik(c,"playing")}}function Bl(b,c){try{Sl(b,c)}catch(e){return b.Ka(e),null}var d=c.filter(function(b){return Ee(b)});d=b.Tb.create(d);b.l.setVariants(Array.from(d.values()));return b.l.chooseVariant()}
490
+ function El(b,c){var d=Bl(b,c.variants);d&&(ql(b,c,d,!0),Nl(b,d,!0));(d=He(c.textStreams,b.ma,b.cb)[0]||null)&&(b.b.streaming.alwaysStreamText||b.gc())&&(Kl(b,c,d,!0),Ll(b,d));rl(b)}
491
+ p.df=function(b){try{this.ib=!0;this.l.disable();Fl(this);var c=Bl(this,b.variants),d=He(b.textStreams,this.ma,this.cb)[0]||null;this.Ea&&(b.variants.includes(this.Ea)&&(c=this.Ea),this.Ea=null);this.na&&(b.textStreams.includes(this.na)&&(d=this.na),this.na=null);c&&ql(this,b,c,!0);d&&Kl(this,b,d,!0);var e=this.f,f=e.b.get("video");if(f)var g=e.c.periods[f.pa];else{var h=e.b.get("audio");g=h?e.c.periods[h.pa]:null}var k=c?c.audio:null;if(!g&&d){var l;if(l=k){b=d;var m=M(this.b.preferredTextLanguage),
492
+ n=M(k.language),q=M(b.language);l=qe(q,m)&&!qe(n,q)}l&&(this.eb=!0);this.eb&&this.D.g.setTextVisibility(!0);Rl(this)}return this.b.streaming.alwaysStreamText||this.gc()?{variant:c,text:d}:{variant:c,text:null}}catch(x){return this.Ka(x),{variant:null,text:null}}};p.ue=function(){this.ib=!1;this.b.abr.enabled&&(this.l.enable(),Fl(this));this.Ea&&(Ti(this.f,this.Ea,this.Ed,this.Cd),Ol(this),this.Ea=null);this.na&&(Si(this.f,this.na,!0,0,!1),Ml(this),this.na=null)};
493
+ p.jf=function(){this.m&&this.m.update&&this.m.update()};p.qf=function(){this.o&&this.o.o()};function rl(b){Tl(b,new I("adaptation"))}function zl(b){Tl(b,new I("trackschanged"))}function Ol(b){Tl(b,new I("variantchanged"))}function Ml(b){Tl(b,new I("textchanged"))}function Rl(b){Tl(b,new I("texttrackvisibility"))}function Fl(b){Tl(b,new I("abrstatuschanged",{vg:b.b.abr.enabled}))}p.Ka=function(b){if(this.h!=$k){var c=new I("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};
494
+ function il(b,c,d){b.dispatchEvent(new I(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}function gl(b){if(!b.a.error)return null;var c=b.a.error.code;if(1==c)return null;var d=b.a.error.msExtendedCode;d&&(0>d&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)}
495
+ function ll(b,c){if(b.f){var d=Al(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){Ke(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!bl.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Ki(b.f);var h=Mi(b.f);(f=Je(f,h,d.variants))&&!f.allowedByKeySystem&&El(b,d);e&&(zl(b),Bl(b,d.variants))}}
496
+ function ml(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new I("expirationupdated"))}function pl(b,c,d){0<c&&(b.V()||b.ee(c));d<b.Y()&&(b.V()||b.wa(d))}
497
+ function Sl(b,c){var d=b.g?jc(b.g.T):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=r(c),m=l.next();!m.done;m=l.next()){m=m.value;var n=[];m.audio&&n.push(m.audio);m.video&&n.push(m.video);n=r(n);for(var q=n.next();!q.done;q=n.next())if(q=q.value,q.keyId){var x=d[e?"00":q.keyId];x?bl.includes(x)&&(k.includes(x)||k.push(x)):h.includes(q.keyId)||h.push(q.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new D(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
498
+ restrictedKeyStatuses:k});}function Tl(b,c){t(function e(){return y(e,function(e){switch(e.j){case 1:return u(e,Promise.resolve(),2);case 2:b.h!=$k&&b.dispatchEvent(c),v(e)}})})}function Ql(b){var c=new Set;b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.language?c.add(M(d.language)):c.add("und");return c}
499
+ function Pl(b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d="und";var f=[];e.language&&(d=M(e.language));"variant"==e.type?f=e.audioRoles:f=e.roles;f&&f.length||(f=[""]);c.has(d)||c.set(d,new Set);e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,c.get(d).add(f)}var g=[];c.forEach(function(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())g.push({language:c,role:e.value})});return g}
500
+ function Hl(b){b=Al(b);return null==b?[]:b.variants.filter(function(b){return Ee(b)})}function Jl(b){var c=Al(b);return null==c?[]:c.textStreams.filter(function(c){return!b.Vb.has(c)})}function Al(b){var c=b.o.h(),d=null;b=r(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function Gl(b){var c=Al(b);return Lh(b.$,c).variant}
501
+ function Il(b){var c=Al(b);if(null==c)return null;if(!Lh(b.$,c).text){var d=He(c.textStreams,b.ma,b.cb);d.length&&Kh(b.$,c,d[0])}return Lh(b.$,c).text}function dl(){return new D(2,7,7E3)}function Zk(b,c,d,e,f,g){return e==b&&f.u==g.u&&f.uri==g.uri&&f.mimeType==g.mimeType&&f.ya==g.ya?c:d}function tk(){return{ya:null,u:null,mimeType:null,startTime:null,nd:null,uri:null}}
502
+ function el(b){return new Promise(function(c,d){b.Wa=function(){return d(dl())};b.jc=function(){return c()};b.onError=function(b){return d(b)};b.lc=function(){return d(dl())}})}var $k=0,Nk=1,xl=2,Cl=3;X.LoadMode={DESTROYED:$k,NOT_LOADED:Nk,MEDIA_SOURCE:xl,SRC_EQUALS:Cl};function Ul(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.Y();c=Vl(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function Wl(b,c){var d=ik(new gk(b.ua(),b.aa()),c.periods[0],new W(null,0)),e=c.appMetadata||{};d=Vl(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
503
+ function Vl(b){var c=[],d=Fe(b.variants);d=r(d);for(var e=d.next();!e.done;e=d.next())c.push(ze(e.value));b=r(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(Ae(d.value));return c};function Xl(){this.a={}}function Yl(b,c,d){d=d.endTime-d.startTime;return Zl(b,c)*d}function Zl(b,c){var d=b.a[c];null==d&&(d=0);return d};function $l(b){this.a=!1;this.b=new G;this.c=b}$l.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function am(b,c){for(var d={width:Infinity,height:Infinity},e=r(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return ve(b,c,d)})}function bm(b){b=r(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&ee(b.audio));b.video&&(c=c&&ee(b.video));return c})}
504
+ function cm(b,c){for(var d=r(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return nd(c,b)})}function dm(b){var c=new em;b.periods.forEach(function(b,d){var e=fm(b.variants);if(0==d){e=r(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else gm(c,e)});b=r(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return hm(c,new im(b))})}
505
+ function jm(b,c){var d=new em;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return hm(d,new im(b))}));c(b);d=fm(b.variants)})}function im(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function em(){this.a=[]}em.prototype.add=function(b){hm(this,b)||this.a.push(b)};function gm(b,c){b.a=b.a.filter(function(b){return hm(c,b)})}
506
+ function hm(b,c){return b.a.some(function(b){return c.b==b.b&&c.a==b.a&&c.f==b.f&&c.c==b.c})}function fm(b){var c=new em;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(new im(d.value));return c};function Z(b){var c=this;if(b&&b.constructor!=X)throw new D(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.Eb()):(this.a=Ek(),this.b=new K);this.f=!1;this.c=[];this.g=[];var d=!b;this.h=new $l(function(){return t(function f(){var b;return y(f,function(f){switch(f.j){case 1:return b=function(){},u(f,Promise.all(c.g.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.A(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,v(f)}})})})}z("shaka.offline.Storage",Z);
507
+ function km(){if(oc())a:{var b=r(Gj.values());for(var c=b.next();!c.done;c=b.next())if(c=c.value,c=c()){c.destroy();b=!0;break a}b=!1}else b=!1;return b}Z.support=km;Z.prototype.destroy=function(){return this.h.destroy()};Z.prototype.destroy=Z.prototype.destroy;
508
+ Z.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Ck(b,c));var d=b,e=!1;null!=d.trackSelectionCallback&&(e=!0,d.offline=d.offline||{},d.offline.trackSelectionCallback=d.trackSelectionCallback,delete d.trackSelectionCallback);null!=d.progressCallback&&(e=!0,d.offline=d.offline||{},d.offline.progressCallback=d.progressCallback,delete d.progressCallback);null!=d.usePersistentLicense&&(e=!0,d.offline=d.offline||{},d.offline.usePersistentLicense=d.usePersistentLicense,delete d.usePersistentLicense);
509
+ e&&Ne("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return Gk(this.a,b)};Z.prototype.configure=Z.prototype.configure;Z.prototype.getConfiguration=function(){var b=Ek();Gk(b,this.a,Ek());return b};Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.Eb=function(){return this.b};Z.prototype.getNetworkingEngine=Z.prototype.Eb;
510
+ Z.prototype.store=function(b,c,d){var e=this;return lm(this,mm(this,b,c||{},function(){return t(function g(){var c,k;return y(g,function(g){switch(g.j){case 1:return d&&"string"!=typeof d?(Ne("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,U.create(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.s,g["return"](k)}})})}))};Z.prototype.store=Z.prototype.store;Z.prototype.Ve=function(){return this.f};
511
+ Z.prototype.getStoreInProgress=Z.prototype.Ve;
512
+ function mm(b,c,d,e){return t(function g(){var h,k,l,m,n,q,x,w,A,C;return y(g,function(g){switch(g.j){case 1:nm();if(b.f)return g["return"](Promise.reject(new D(2,9,9006)));b.f=!0;return u(g,om(b,c,e),2);case 2:h=g.s;pm(b);k=!h.presentationTimeline.V()&&!h.presentationTimeline.Va();if(!k)throw new D(2,9,9005,c);l=null;m=new Fj;q=n=null;ya(g,3,4);return u(g,qm(b,h,function(b){q=q||b}),6);case 6:l=g.s;pm(b);if(q)throw q;rm(b,h,l);return u(g,m.init(),7);case 7:return pm(b),u(g,Hj(m),8);case 8:return n=
513
+ g.s,pm(b),u(g,sm(b,n.aa,l,h,c,d),9);case 9:x=g.s;pm(b);if(q)throw q;return u(g,n.aa.addManifests([x]),10);case 10:return w=g.s,pm(b),A=new ek("manifest",n.path.ua,n.path.aa,w[0]),g["return"](Wl(A,x));case 4:return Ea(g),b.f=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.A(12);break}return u(g,l.destroy(),12);case 12:Fa(g,0);break;case 3:C=Da(g);if(!n){g.A(14);break}return u(g,n.aa.removeSegments(b.c,function(){}),14);case 14:throw q||C;}})})}
514
+ function rm(b,c,d){am(c,b.a.restrictions);bm(c);cm(c,d);dm(c);jm(c,function(c){for(var d=[],e=r(c.variants),h=e.next();!h.done;h=e.next())d.push(ze(h.value));e=r(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(Ae(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
515
+ tm(c)}function sm(b,c,d,e,f,g){return t(function k(){var l,m,n,q;return y(k,function(k){switch(k.j){case 1:return l=Ul(f,e,g),m=new uj(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),za(k,2),q=n=um(b,m,c,d,e,f,g),u(k,xj(m),4);case 4:return q.size=k.s,k["return"](n);case 2:return Ea(k),u(k,m.destroy(),5);case 5:Fa(k,0)}})})}Z.prototype.remove=function(b){return lm(this,vm(this,b))};Z.prototype.remove=Z.prototype.remove;
516
+ function vm(b,c){return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.j){case 1:nm();f=fk(c);if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new D(2,9,9004,c)));g=f;h=new Fj;za(e,2);return u(e,h.init(),4);case 4:return u(e,Jj(h,g.ua(),g.aa()),5);case 5:return k=e.s,u(e,k.getManifests([g.key()]),6);case 6:return l=e.s,m=l[0],u(e,Promise.all([wm(b,m,h),xm(b,k,g,m)]),2);case 2:return Ea(e),u(e,h.destroy(),8);case 8:Fa(e,0)}})})}
517
+ function ym(b,c){for(var d=[],e=r(b.periods),f=e.next();!f.done;f=e.next()){f=r(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:kc(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:kc(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function wm(b,c,d){return t(function f(){return y(f,function(f){switch(f.j){case 1:return u(f,zm(b.b,b.a.drm,d,c),0)}})})}
518
+ function xm(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Am(e),h=g.length+1,k=0,l=Wl(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}Z.prototype.Ff=function(){return lm(this,Bm(this))};Z.prototype.removeEmeSessions=Z.prototype.Ff;
519
+ function Bm(b){return t(function d(){var e,f,g,h,k,l,m,n,q;return y(d,function(d){switch(d.j){case 1:return nm(),e=b.b,f=b.a.drm,g=new Fj,h=!1,za(d,2),u(d,g.init(),4);case 4:k=[];Kj(g,function(b){return k.push(b)});l=Promise.resolve();m={};n=r(k);for(q=n.next();!q.done;m={qc:m.qc},q=n.next())m.qc=q.value,l=l.then(function(b){return function(){return t(function C(){var d,g;return y(C,function(k){switch(k.j){case 1:return u(k,b.qc.getAll(),2);case 2:return d=k.s,u(k,pk(f,e,d),3);case 3:return g=k.s,
520
+ u(k,b.qc.remove(g),4);case 4:g.length!=d.length&&(h=!0),v(k)}})})}}(m));return u(d,l,2);case 2:return Ea(d),u(d,g.destroy(),6);case 6:Fa(d,3);break;case 3:return d["return"](!h)}})})}Z.prototype.list=function(){return lm(this,Cm())};Z.prototype.list=Z.prototype.list;
521
+ function Cm(){return t(function c(){var d,e,f;return y(c,function(c){switch(c.j){case 1:return nm(),d=[],e=new Fj,za(c,2),u(c,e.init(),4);case 4:return f=Promise.resolve(),Ij(e,function(c,e){f=f.then(function(){return t(function m(){var f;return y(m,function(g){switch(g.j){case 1:return u(g,e.getAllManifests(),2);case 2:f=g.s,f.forEach(function(e,f){var g=Wl(new ek("manifest",c.ua,c.aa,f),e);d.push(g)}),v(g)}})})})}),u(c,f,2);case 2:return Ea(c),u(c,e.destroy(),6);case 6:Fa(c,3);break;case 3:return c["return"](d)}})})}
522
+ function om(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.j){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.s,l.configure(b.a.manifest),pm(b),za(f,3),u(f,l.start(c,k),5);case 5:return m=f.s,pm(b),n=Dm(m),u(f,Promise.all(Array.from(n).map(function(b){return b.createSegmentIndex()})),6);case 6:pm(b);
523
+ if(g)throw g;return f["return"](m);case 3:return Ea(f),u(f,l.stop(),7);case 7:Fa(f,0)}})})}function qm(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.j){case 1:return g=new Jc({rb:b.b,onError:d,kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=fi(c.periods),k=b.a,g.configure(k.drm),u(f,Oc(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,Yc(g),3);case 3:return u(f,Zc(g),4);case 4:return f["return"](g)}})})}
524
+ function um(b,c,d,e,f,g,h){var k=new Xl,l=f.periods.map(function(e){return Em(b,c,d,k,f,e)}),m=e.a,n=ed(e);if(m&&b.a.offline.usePersistentLicense){if(!n.length)throw new D(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.Y(),size:0,expiration:e.dc(),periods:l,sessionIds:b.a.offline.usePersistentLicense?n:[],drmInfo:m,appMetadata:h}}
525
+ function Em(b,c,d,e,f,g){f.periods.forEach(function(b){b.variants.forEach(function(b){var c=b.audio,d=b.video;c&&!d&&(e.a[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(e.a[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var f=c.bandwidth||393216,g=d.bandwidth||b.bandwidth-f;0>=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=Dm(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Fm(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
526
+ k.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}
527
+ function Fm(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Gb();var k=g.id;Gm(g,f,function(f){var l=rg(f.c(),f.b,f.a,b.a.streaming.retryParameters);vj(c,k,
528
+ l,Yl(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=rg(f.c(),f.b,f.a,b.a.streaming.retryParameters),vj(c,k,f,.5*Zl(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}
529
+ function Gm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function pm(b){if(b.h.a)throw new D(2,9,7001);}function nm(){if(!km())throw new D(2,9,9E3);}function lm(b,c){return t(function e(){return y(e,function(e){switch(e.j){case 1:return b.g.push(c),za(e,2),u(e,c,4);case 4:return e["return"](e.s);case 2:Ea(e),Lb(b.g,c),Fa(e,0)}})})}
530
+ function Am(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.j){case 1:return d=new Fj,za(c,2),u(c,d.erase(),2);case 2:return Ea(c),u(c,d.destroy(),5);case 5:Fa(c,0)}})})};
531
+ function zm(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.j){case 1:if(!e.drmInfo)return g["return"]();h=Lj(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:ym(e,!1),videoCapabilities:ym(e,!0)}});return u(g,pk(c,b,k),2);case 2:return l=g.s,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
532
+ 0)}})})}function Dm(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function tm(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Hm(c.value)}
533
+ function Hm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}cl.offline=km;z("shaka.polyfill.installAll",function(){for(var b=0;b<Im.length;++b)Im[b].se()});var Im=[];function Jm(b,c){c=c||0;for(var d={priority:c,se:b},e=0;e<Im.length;e++)if(Im[e].priority<c){Im.splice(e,0,d);return}Im.push(d)}z("shaka.polyfill.register",Jm);function Km(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
534
+ Jm(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
535
+ "fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Km);document.addEventListener("webkitfullscreenerror",Km);document.addEventListener("mozfullscreenchange",Km);document.addEventListener("mozfullscreenerror",Km);document.addEventListener("MSFullscreenChange",Km);document.addEventListener("MSFullscreenError",Km)}});Jm(function(){rc("CrKey")&&delete window.indexedDB});function Lm(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,b,c,d)}Jm(function(){rc("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Lm)});Jm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});Jm(function(){});function Mm(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function Nm(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
536
+ function Om(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.Fd=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].wd=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
537
+ function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",Pm,!1);c||(this.addEventListener("sourceclose",Qm,!1),c=!0);return e}}function Pm(b){var c=b.target,d=c.mediaSource_;if(d.Fd){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.wd=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].wd)return;d.Fd=!1}}
538
+ function Qm(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",Pm,!1);b.removeEventListener("sourceclose",Qm,!1)}function Rm(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1]?!1:b(c)}}function Sm(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=nc(c)[0]&&b(c)}}
539
+ function Tm(){var b=MediaSource.isTypeSupported,c=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(d){for(var e=d.split(/ *; */),f=e[0],g={},h=1;h<e.length;++h){var k=e[h].split("="),l=k[0];k=k[1].replace(/"(.*)"/,"$1");g[l]=k}e=g.codecs;if(!e)return b(d);var m=!1,n=!1;d=e.split(",").filter(function(b){c.test(b)&&(n=!0);/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});n&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var q in g)f+="; "+q+'="'+g[q]+'"';return cast.__platform__.canDisplayType(f)}}
540
+ Jm(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)Tm();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;Rm();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))Mm();else if(b.includes("Version/10"))Mm(),Om();else if(b.includes("Version/11")||b.includes("Version/12"))Mm(),Nm()}else rc("Tizen")&&Sm()});function Um(b,c){try{var d=new Vm(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
541
+ function Vm(b,c){this.keySystem=b;if(b.startsWith("com.apple.fps"))for(var d=r(c),e=d.next();!e.done;e=d.next()){var f=e.value;if("required"==f.persistentState)e=null;else{e={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label};var g=!1,h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){g=!0;var m=l.contentType.split(";")[0];
542
+ WebKitMediaKeys.isTypeSupported(this.keySystem,m)&&(e.audioCapabilities.push(l),h=!0)}if(f.videoCapabilities)for(f=r(f.videoCapabilities),l=f.next();!l.done;l=f.next())k=l.value,k.contentType&&(g=!0,l=k.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(e.videoCapabilities.push(k),h=!0));g||(h=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));e=h?e:null}if(e){this.a=e;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;
543
+ throw d;}Vm.prototype.createMediaKeys=function(){var b=new Wm(this.keySystem);return Promise.resolve(b)};Vm.prototype.getConfiguration=function(){return this.a};function Xm(b){var c=this.mediaKeys;c&&c!=b&&Ym(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?Ym(b,this):Promise.resolve()}function Wm(b){this.b=new WebKitMediaKeys(b);this.a=new L;this.c=null}
544
+ Wm.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new Zm(this.b,b)};Wm.prototype.setServerCertificate=function(b){this.c=b?new Uint8Array(b):null;return Promise.resolve(!0)};
545
+ function Ym(b,c){b.a.Ya();if(!c)return Promise.resolve();b.a.w(c,"webkitneedkey",$m);try{return 1<=c.readyState?c.webkitSetMediaKeys(b.b):b.a.ha(c,"loadedmetadata",function(){c.webkitSetMediaKeys(b.b)}),Promise.resolve()}catch(d){return Promise.reject(d)}}function Zm(b){J.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new L;this.sessionId="";this.expiration=NaN;this.closed=new G;this.keyStatuses=new an}Va(Zm,J);p=Zm.prototype;
546
+ p.generateRequest=function(b,c){this.a=new G;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c)),this.f.w(this.c,"webkitkeymessage",this.$f.bind(this)),this.f.w(this.c,"webkitkeyadded",this.Yf.bind(this)),this.f.w(this.c,"webkitkeyerror",this.Zf.bind(this)),bn(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(b){this.b=new G;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
547
+ p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.Ya()}catch(b){this.closed.reject(b)}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"))};
548
+ function cn(b,c){function d(b){(new DataView(g.buffer)).setUint32(h,b.byteLength,!0);h+=4;g.set(b,h);h+=b.byteLength}var e=new Uint8Array(b);if((new DataView(e.buffer)).getUint32(0,!0)+4!=e.byteLength)throw Error("Malformed init data!");var f=yc(e.slice(4),!0);f=(new gb(f)).ra;f=new Uint8Array(Bc(f,!0));var g=new Uint8Array(e.byteLength+4+f.byteLength+4+c.byteLength),h=0;g.set(e,h);h+=e.byteLength;d(f);d(new Uint8Array(c));return g}
549
+ function $m(b){var c=this.mediaKeys.c,d=new Event("encrypted");d.initDataType="cenc";d.initData=cn(b.initData,c);this.dispatchEvent(d)}p.$f=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new I("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.Yf=function(){this.b&&(bn(this,"usable"),this.b.resolve(),this.b=null)};
550
+ p.Zf=function(){var b=Error("EME PatchedMediaKeysApple key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:bn(this,"output-not-allowed");break;default:bn(this,"internal-error")}};function bn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new I("keystatuseschange"))}
551
+ function an(){this.size=0;this.a=void 0}var dn;p=an.prototype;p.forEach=function(b){this.a&&b(this.a,dn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=dn;return this.a&&Hc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
552
+ Jm(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(dn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xm,window.MediaKeys=Wm,window.MediaKeySystemAccess=Vm,navigator.requestMediaKeySystemAccess=Um)});function en(b){this.f=[];this.b=[];this.a=[];(new S).ea("pssh",this.c.bind(this)).parse(b.buffer)}en.prototype.c=function(b){if(!(1<b.version)){var c=Gc(b.reader.Xa(16)),d=[];if(0<b.version)for(var e=b.reader.F(),f=0;f<e;++f){var g=Gc(b.reader.Xa(16));d.push(g)}e=b.reader.F();b.reader.L(e);this.b.push.apply(this.b,d);this.f.push(c);this.a.push({start:b.start,end:b.start+b.size-1})}};function fn(b,c){try{var d=new gn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
553
+ function gn(b,c){this.keySystem=b;for(var d=!1,e=0;e<c.length;++e){var f=c[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=0;k<f.audioCapabilities.length;++k){var l=f.audioCapabilities[k];if(l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),d=!0)}}if(f.videoCapabilities)for(k=
554
+ 0;k<f.videoCapabilities.length;++k)l=f.videoCapabilities[k],l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}gn.prototype.createMediaKeys=function(){var b=new hn(this.keySystem);return Promise.resolve(b)};
555
+ gn.prototype.getConfiguration=function(){return this.a};function jn(b){var c=this.mediaKeys;c&&c!=b&&kn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?kn(b,this):Promise.resolve()}function hn(b){this.a=new MSMediaKeys(b);this.b=new L}hn.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new ln(this.a,b)};hn.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
556
+ function kn(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}b.b.Ya();if(!c)return Promise.resolve();b.b.w(c,"msneedkey",mn);var e=b;try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(f){return Promise.reject(f)}}function ln(b){J.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new L;this.sessionId="";this.expiration=NaN;this.closed=new G;this.keyStatuses=new nn}Va(ln,J);p=ln.prototype;
557
+ p.generateRequest=function(b,c){this.a=new G;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),this.f.w(this.c,"mskeymessage",this.nf.bind(this)),this.f.w(this.c,"mskeyadded",this.lf.bind(this)),this.f.w(this.c,"mskeyerror",this.mf.bind(this)),on(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(b){this.b=new G;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
558
+ p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.Ya()}catch(b){this.closed.reject(b)}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 mn(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=pn(b.initData);this.dispatchEvent(c)}}
559
+ function pn(b){if(!b)return b;var c=new en(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=r(d);for(d=e.next();!d.done;c={fc:c.fc},d=e.next())c.fc=d.value,b.some(function(b){return function(c){return Hc(c,b.fc)}}(c))||b.push(c.fc);c=0;e=r(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=r(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
560
+ p.nf=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new I("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.lf=function(){this.a?(on(this,"usable"),this.a.resolve(),this.a=null):this.b&&(on(this,"usable"),this.b.resolve(),this.b=null)};
561
+ p.mf=function(){var b=Error("EME PatchedMediaKeysMs key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:on(this,"output-not-allowed");break;default:on(this,"internal-error")}};function on(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new I("keystatuseschange"))}
562
+ function nn(){this.size=0;this.a=void 0}var qn;p=nn.prototype;p.forEach=function(b){this.a&&b(this.a,qn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=qn;return this.a&&Hc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
563
+ Jm(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(qn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=jn,window.MediaKeys=hn,window.MediaKeySystemAccess=gn,navigator.requestMediaKeySystemAccess=fn)});function rn(){return Promise.reject(Error("The key system specified is not supported."))}function sn(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function tn(){throw new TypeError("Illegal constructor.");}tn.prototype.createSession=function(){};tn.prototype.setServerCertificate=function(){};function un(){throw new TypeError("Illegal constructor.");}un.prototype.getConfiguration=function(){};un.prototype.createMediaKeys=function(){};
564
+ Jm(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=rn,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=sn,window.MediaKeys=tn,window.MediaKeySystemAccess=un)},-10);var vn="";function wn(b){var c=vn;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function xn(b,c){try{var d=new yn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function zn(b){var c=this.mediaKeys;c&&c!=b&&An(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&An(b,this);return Promise.resolve()}
565
+ function yn(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var n=
566
+ h.audioCapabilities[m];if(n.contentType){l=!0;var q=n.contentType.split(";")[0];f.canPlayType(q,this.a)&&(k.audioCapabilities.push(n),e=!0)}}if(h.videoCapabilities)for(m=0;m<h.videoCapabilities.length;++m)n=h.videoCapabilities[m],n.contentType&&(l=!0,f.canPlayType(n.contentType,this.a)&&(k.videoCapabilities.push(n),e=!0));l||(e=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==h.persistentState&&(d?(k.persistentState="required",k.sessionTypes=["persistent-license"]):
567
+ e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}yn.prototype.createMediaKeys=function(){var b=new Bn(this.a);return Promise.resolve(b)};yn.prototype.getConfiguration=function(){return this.b};function Bn(b){this.g=b;this.b=null;this.a=new L;this.c=[];this.f={}}
568
+ function An(b,c){b.b=c;b.a.Ya();var d=vn;c&&(b.a.w(c,d+"needkey",b.tf.bind(b)),b.a.w(c,d+"keymessage",b.cg.bind(b)),b.a.w(c,d+"keyadded",b.ag.bind(b)),b.a.w(c,d+"keyerror",b.bg.bind(b)))}p=Bn.prototype;p.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new Cn(c,this.g,b);this.c.push(b);return b};
569
+ p.setServerCertificate=function(){return Promise.resolve(!1)};p.tf=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};p.cg=function(b){var c=Dn(this,b.sessionId);c&&(b=new I("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
570
+ p.ag=function(b){if(b=Dn(this,b.sessionId))En(b,"usable"),b.a&&b.a.resolve(),b.a=null};p.bg=function(b){var c=Dn(this,b.sessionId);c&&c.handleError(b)};function Dn(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function Cn(b,c,d){J.call(this);this.f=b;this.h=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new G;this.keyStatuses=new Fn}Va(Cn,J);p=Cn.prototype;
571
+ p.handleError=function(b){var c=Error("EME v0.1b key error");c.errorCode=b.errorCode;c.errorCode.systemCode=b.systemCode;!b.sessionId&&this.b?(c.method="generateRequest",45==b.systemCode&&(c.message="Unsupported session type."),this.b.reject(c),this.b=null):b.sessionId&&this.a?(c.method="update",this.a.reject(c),this.a=null):(c=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?En(this,"output-restricted"):1==c?En(this,"expired"):En(this,"internal-error"))};
572
+ function Gn(b,c,d){if(b.h)return Promise.reject(Error("The session is already initialized."));b.h=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(Ac("LOAD_SESSION|"+d));else{var f=Ac("PERSISTENT|"),g=new Uint8Array(f.byteLength+c.byteLength);g.set(new Uint8Array(f),0);g.set(new Uint8Array(c),f.byteLength);e=g}else e=new Uint8Array(c)}catch(k){return Promise.reject(k)}b.b=new G;var h=wn("generateKeyRequest");try{b.f[h](b.c,e)}catch(k){if("InvalidStateError"!=k.name)return b.b=null,Promise.reject(k);
573
+ (new B(function(){try{b.f[h](b.c,e)}catch(l){b.b.reject(l),b.b=null}})).O(.01)}return b.b}
574
+ p.md=function(b,c){if(this.a)this.a.then(this.md.bind(this,b,c))["catch"](this.md.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=wc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);d=Ec(e.keys[0].k);e=Ec(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=wn("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
575
+ function En(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new I("keystatuseschange"))}p.generateRequest=function(b,c){return Gn(this,c,null)};p.load=function(b){return"persistent-license"==this.g?Gn(this,null,b):Promise.reject(Error("Not a persistent session."))};p.update=function(b){var c=new G;this.md(c,b);return c};
576
+ p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=wn("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Fn(){this.size=0;this.a=void 0}var Hn;p=Fn.prototype;p.forEach=function(b){this.a&&b(this.a,Hn)};p.get=function(b){if(this.has(b))return this.a};
577
+ p.has=function(b){var c=Hn;return this.a&&Hc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
578
+ Jm(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)vn="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;Hn=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=xn;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=zn;window.MediaKeys=Bn;window.MediaKeySystemAccess=
579
+ yn}});function In(b){b=b.target;if("picture-in-picture"==b.webkitPresentationMode){document.pictureInPictureElement=b;var c=new Event("enterpictureinpicture");b.dispatchEvent(c)}else document.pictureInPictureElement==b&&(document.pictureInPictureElement=null),c=new Event("leavepictureinpicture"),b.dispatchEvent(c)}
580
+ function Jn(){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 Kn(){var b=document.pictureInPictureElement;return b?(b.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
581
+ Jm(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;b.requestPictureInPicture&&document.exitPictureInPicture||!b.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,b.requestPictureInPicture=Jn,document.exitPictureInPicture=Kn,document.addEventListener("webkitpresentationmodechanged",In,!0))}});Jm(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function Ln(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Jm(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=Ln)}});function Mn(b,c,d){return new window.TextTrackCue(b,c,d)}function Nn(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}Jm(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=Mn;else if(6==b)window.VTTCue=Nn;else{try{var c=!!Mn(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=Mn)}}});function On(){}On.prototype.parseInit=function(){};
582
+ On.prototype.parseMedia=function(b,c){var d=wc(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(Y){throw new D(2,2,2005);}if(g){if(g=g.getElementsByTagName("tt")[0]){var h=P.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var k=P.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var l=P.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var m=P.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","tickRate");
583
+ d=g.getAttribute("xml:space")||"default";f=g.getAttribute("tts:extent")}else throw new D(2,2,2005);if("default"!=d&&"preserve"!=d)throw new D(2,2,2005);d="default"==d;h=new Pn(h,k,l,m);k=Qn(g.getElementsByTagName("metadata")[0]);l=Qn(g.getElementsByTagName("styling")[0]);m=Qn(g.getElementsByTagName("layout")[0]);for(var n=[],q=0;q<m.length;q++){var x=m[q],w=l,A=f;var C=new Id;var E=x.getAttribute("xml:id");if(E){C.id=E;E=null;A&&(E=Rn.exec(A)||Sn.exec(A));A=E?Number(E[1]):null;E=E?Number(E[2]):null;
584
+ var F,V;if(F=Tn(x,w,"extent"))F=(V=Rn.exec(F))||Sn.exec(F),null!=F&&(C.width=null!=A?100*Number(F[1])/A:Number(F[1]),C.height=null!=E?100*Number(F[2])/E:Number(F[2]),C.widthUnits=V||null!=A?Vd:0,C.heightUnits=V||null!=E?Vd:0);if(x=Tn(x,w,"origin"))F=(V=Rn.exec(x))||Sn.exec(x),null!=F&&(C.viewportAnchorX=null!=E?100*Number(F[1])/E:Number(F[1]),C.viewportAnchorY=null!=A?100*Number(F[2])/A:Number(F[2]),C.viewportAnchorUnits=V||null!=A?Vd:0)}else C=null;C&&n.push(C)}f=Qn(g.getElementsByTagName("body")[0]);
585
+ for(g=0;g<f.length;g++)(q=Un(f[g],c.periodStart,h,k,l,m,n,d))&&e.push(q)}return e};
586
+ var Rn=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,Vn=/^(\d+px|\d+em)$/,Sn=/^(\d+)px (\d+)px$/,Wn=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Xn=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Yn=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Zn=/^(\d*(?:\.\d*)?)f$/,$n=/^(\d*(?:\.\d*)?)t$/,ao=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,bo={left:Nd,center:"center",right:"end",start:Nd,end:"end"},co={left:"line-left",center:"center",right:"line-right"};
587
+ function Qn(b){var c=[];if(!b)return c;for(var d=b.childNodes,e=0;e<d.length;e++){var f="span"==d[e].nodeName&&"p"==b.nodeName;d[e].nodeType!=Node.ELEMENT_NODE||"br"==d[e].nodeName||f||(f=Qn(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function eo(b,c){for(var d=b.childNodes,e=0;e<d.length;e++)if("br"==d[e].nodeName&&0<e)d[e-1].textContent+="\n";else if(0<d[e].childNodes.length)eo(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
588
+ function Un(b,c,d,e,f,g,h,k){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;eo(b,k);k=fo(b.getAttribute("begin"),d);var l=fo(b.getAttribute("end"),d);d=fo(b.getAttribute("dur"),d);var m=b.textContent;null==l&&null!=d&&(l=k+d);if(null==k||null==l)throw new D(2,2,2001);c=new Gd(k+c,l+c,m);if((g=go(b,"region",g,""))&&g.getAttribute("xml:id")){var n=g.getAttribute("xml:id");h=h.filter(function(b){return b.id==n});c.region=h[0]}e=go(b,"smpte:backgroundImage",
589
+ e,"#");ho(c,b,g,e,f);return c}
590
+ function ho(b,c,d,e,f){"rtl"==io(c,d,f,"direction")&&(b.direction="rtl");var g=io(c,d,f,"writingMode");"tb"==g||"tblr"==g?b.writingMode="vertical-lr":"tbrl"==g?b.writingMode="vertical-rl":"rltb"==g||"rl"==g?b.direction="rtl":g&&(b.direction=Hd);if(g=io(c,d,f,"textAlign"))b.positionAlign=co[g],b.lineAlign=bo[g],b.textAlign=Rd[g.toUpperCase()];if(g=io(c,d,f,"displayAlign"))b.displayAlign=Sd[g.toUpperCase()];if(g=io(c,d,f,"color"))b.color=g;if(g=io(c,d,f,"backgroundColor"))b.backgroundColor=g;if(g=io(c,
591
+ d,f,"fontFamily"))b.fontFamily=g;(g=io(c,d,f,"fontWeight"))&&"bold"==g&&(b.fontWeight=700);(g=io(c,d,f,"wrapOption"))&&"noWrap"==g&&(b.wrapLine=!1);(g=io(c,d,f,"lineHeight"))&&g.match(Vn)&&(b.lineHeight=g);(g=io(c,d,f,"fontSize"))&&g.match(Vn)&&(b.fontSize=g);if(g=io(c,d,f,"fontStyle"))b.fontStyle=Ud[g.toUpperCase()];if(e){g=e.getAttribute("imagetype");var h=e.getAttribute("encoding");e=e.textContent;"PNG"==g&&"Base64"==h&&e&&(b.backgroundImage="data:image/png;base64,"+e)}(d=Tn(d,f,"textDecoration"))&&
592
+ jo(b,d);(c=ko(c,f,"textDecoration"))&&jo(b,c)}
593
+ function jo(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&Lb(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&Lb(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
594
+ b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&Lb(b.textDecoration,"overline")}}function io(b,c,d,e){return(b=ko(b,d,e))?b:Tn(c,d,e)}function Tn(b,c,d){for(var e=Qn(b),f=0;f<e.length;f++){var g=P.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=go(b,"style",c,""))?P.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
595
+ function ko(b,c,d){return(b=go(b,"style",c,""))?P.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function go(b,c,d,e){if(!b||1>d.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b<d.length;b++)if(e+d[b].getAttribute("xml:id")==c){f=d[b];break}return f}
596
+ function fo(b,c){var d=null;if(Wn.test(b)){d=Wn.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else Xn.test(b)?d=lo(Xn,b):Yn.test(b)?d=lo(Yn,b):Zn.test(b)?(d=Zn.exec(b),d=Number(d[1])/c.frameRate):$n.test(b)?(d=$n.exec(b),d=Number(d[1])/c.a):ao.test(b)&&(d=lo(ao,b));return d}
597
+ function lo(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function Pn(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=Number(b[1])/Number(b[2]))}Yd["application/ttml+xml"]=On;function mo(){this.a=new On}mo.prototype.parseInit=function(b){var c=!1;(new S).H("moov",Pf).H("trak",Pf).H("mdia",Pf).H("minf",Pf).H("stbl",Pf).ea("stsd",Qf).H("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new D(2,2,2007);};mo.prototype.parseMedia=function(b,c){var d=!1,e=[];(new S).H("mdat",Rf(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new D(2,2,2007);return e};Yd['application/mp4; codecs="stpp"']=mo;
598
+ Yd['application/mp4; codecs="stpp.TTML.im1t"']=mo;function no(){}no.prototype.parseInit=function(){};
599
+ no.prototype.parseMedia=function(b,c){var d=wc(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");d=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new D(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes("X-TIMESTAMP-MAP"))){var f=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=d[0].match(/MPEGTS:(\d+)/m);if(f&&g){e=oo(new Ng(f[1]));if(null==e)throw new D(2,2,2E3);e=c.periodStart+(Number(g[1])/9E4-e)}}g=[];var h=d[0].split("\n");for(f=1;f<h.length;f++)if(/^Region:/.test(h[f])){var k=
600
+ new Ng(h[f]),l=new Id;Qg(k);Og(k);for(var m=Qg(k);m;){var n=l,q=m;(m=/^id=(.*)$/.exec(q))?n.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(q))?n.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(q))?(n.height=Number(m[1]),n.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.regionAnchorX=Number(m[1]),n.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.viewportAnchorX=Number(m[1]),n.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(q)&&(n.scroll=
601
+ "up");Og(k);m=Qg(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;q=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));n=new Ng(m[0]);var x=oo(n),w=Pg(n,/[ \t]+--\x3e[ \t]+/g),A=oo(n);if(null==x||null==w||null==A)throw new D(2,2,2001);m=new Gd(x+q,A+q,m.slice(1).join("\n").trim());Og(n);for(q=Qg(n);q;)po(m,q,h),Og(n),q=Qg(n);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
602
+ function po(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=Kd:b.textAlign=Rd[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==
603
+ c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=qo(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=Td[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=Md,b.line=Number(d[1]),d[2]&&(b.lineAlign=Td[d[2].toUpperCase()])}function qo(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
604
+ function oo(b){b=Pg(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}Yd["text/vtt"]=no;Yd['text/vtt; codecs="vtt"']=no;function ro(){this.a=null}ro.prototype.parseInit=function(b){var c=!1;(new S).H("moov",Pf).H("trak",Pf).H("mdia",Pf).ea("mdhd",function(b){0==b.version?(b.reader.L(4),b.reader.L(4),this.a=b.reader.F(),b.reader.L(4)):(b.reader.L(8),b.reader.L(8),this.a=b.reader.F(),b.reader.L(8));b.reader.L(4)}.bind(this)).H("minf",Pf).H("stbl",Pf).ea("stsd",Qf).H("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new D(2,2,2008);if(!c)throw new D(2,2,2008);};
605
+ ro.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new D(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,n=null;(new S).H("moof",Pf).H("traf",Pf).ea("tfdt",function(b){k=!0;e=0==b.version?b.reader.F():b.reader.yb()}).ea("tfhd",function(b){var c=b.flags;b=b.reader;b.L(4);c&1&&b.L(8);c&2&&b.L(4);n=c&8?b.F():null}).ea("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.F();d&1&&b.L(4);d&4&&b.L(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,od:null};d&256&&
606
+ (k.duration=b.F());d&512&&(k.sampleSize=b.F());d&1024&&b.L(4);d&2048&&(k.od=0==c?b.F():b.Yd());g.push(k)}f=g}).H("mdat",Rf(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new D(2,2,2008);var q=e,x=new DataView(g.buffer,g.byteOffset,g.byteLength),w=new R(x,0);f.forEach(function(b){var f=b.duration||n,g=b.od?e+b.od:q;q=g+(f||0);var k=0;do{var l=w.F();k+=l;var m=w.F(),x=null;"vttc"==Sf(m)?8<l&&(x=w.Xa(l-8)):w.L(l-8);f&&x&&h.push(so(x,c.periodStart+g/d.a,c.periodStart+q/d.a))}while(b.sampleSize&&
607
+ k<b.sampleSize)});return h.filter(xd.Ga)};function so(b,c,d){var e,f,g;(new S).H("payl",Rf(function(b){e=wc(b)})).H("iden",Rf(function(b){f=wc(b)})).H("sttg",Rf(function(b){g=wc(b)})).parse(b);return e?to(e,f,g,c,d):null}function to(b,c,d,e,f){b=new Gd(e,f,b);c&&(b.id=c);if(d)for(c=new Ng(d),d=Qg(c);d;)po(b,d,[]),Og(c),d=Qg(c);return b}Yd['application/mp4; codecs="wvtt"']=ro;z("shaka.util.Dom.createHTMLElement",function(b){return document.createElement(b)});z("shaka.util.Dom.createVideoElement",function(){var b=document.createElement("video");b.muted=!0;b.width=600;b.height=400;return b});z("shaka.util.Dom.asHTMLElement",function(b){return b});z("shaka.util.Dom.asHTMLMediaElement",function(b){return b});z("shaka.util.Dom.removeAllChildren",function(b){for(;b.firstChild;)b.removeChild(b.firstChild)});}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
608
+
609
+ //# sourceMappingURL=shaka-player.compiled.map